Hi,

In your scilab context, you are defining Kp and Ki variables.
In the context of your xcos simulation, you define again Kp and Ki.
This seems to be the root cause of the warnings.

Please find the updated attached scilab script where Kp have been replaced by Kp0 and Ki have been replaced by Ki0. Note that the context of the xcos simulation is still updated with Kp and Ki.

Could you give me your feedback ?

Thanks.



Le 27/02/2013 12:17, amiege a écrit :
Hi, I am trying to tune a PID controller in Xcos, very much in the same way as described in http://wiki.scilab.org/Xcos/Examples/PID Optimization of a PID. 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.

Here is the output of the command window:
-->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
Thanks in advance,

Arnaud

DC_motor_test.zcos <http://mailinglists.scilab.org/file/n4026069/DC_motor_test.zcos> tune_DC_motor_PID.sce <http://mailinglists.scilab.org/file/n4026069/tune_DC_motor_PID.sce>
------------------------------------------------------------------------
View this message in context: PID tuning in Xcos <http://mailinglists.scilab.org/PID-tuning-in-Xcos-tp4026069.html> Sent from the Scilab users - Mailing Lists Archives mailing list archive <http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> at Nabble.com.


_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users


--
Alexandre HERISSE
Xcos developer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.70
http://www.scilab-enterprises.com

Attachment: tune_DC_motor_PID.sce
Description: application/scilab-sce

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to