Hi,

I am trying to tune a PID controller in Xcos, very much in the same way as described in <a href="http://wiki.scilab.org/Xcos/Examples/PID" target="_top" rel="nofollow" link="external">http://wiki.scilab.org/Xcos/Examples/PID Optimization of a PID</a>. However, it doesn't seem to work, the output of the model is not changing at all, despite the PID gains being changed (albeit not very much) by the optimization routine. Am I doing anything wrong? Using Scilab 5.4.0. Files are attached below. <br/><br/>

Here is the output of the command window:

<pre>-->exec('D:\Work\Mathematical modelling\Scilab\tune_DC_motor_PID.sce', -1)
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredWarning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 1 - Kp = 2.000000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 2 - Kp = 2.001000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 3 - Kp = 1.999000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 4 - Kp = 2.002000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 5 - Kp = 1.998000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 6 - Kp = 2.000000 Ki = 0.011000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 7 - Kp = 2.000000 Ki = 0.009000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 8 - Kp = 2.000000 Ki = 0.012000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 9 - Kp = 2.000000 Ki = 0.008000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 10 - Kp = 2.000000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 11 - Kp = 2.001000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 12 - Kp = 1.999000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 13 - Kp = 2.002000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 14 - Kp = 1.998000 Ki = 0.010000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 15 - Kp = 2.000000 Ki = 0.011000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 16 - Kp = 2.000000 Ki = 0.009000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 17 - Kp = 2.000000 Ki = 0.012000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignoredEvaluation 18 - Kp = 2.000000 Ki = 0.008000 y = 0.218898 
Warning the variable Kp do not match any context variable name
ignoredWarning the variable Ki do not match any context variable name
ignored </pre>

Thanks in advance,<br/><br/>

Arnaud<br/><br/>

<a href="http://mailinglists.scilab.org/file/n4026069/DC_motor_test.zcos" target="_top" rel="nofollow" link="external">DC_motor_test.zcos</a> <br/>
<a href="http://mailinglists.scilab.org/file/n4026069/tune_DC_motor_PID.sce" target="_top" rel="nofollow" link="external">tune_DC_motor_PID.sce</a>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://mailinglists.scilab.org/PID-tuning-in-Xcos-tp4026069.html">PID tuning in Xcos</a><br/>
Sent from the <a href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">Scilab users - Mailing Lists Archives mailing list archive</a> at Nabble.com.<br/>