<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><font face="monospace">Hi,<br>
<br>
In your scilab context, you are defining Kp and Ki variables.<br>
In the context of your xcos simulation, you define again Kp and
Ki.<br>
This seems to be the root cause of the warnings.<br>
<br>
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.<br>
<br>
Could you give me your feedback ?</font><font face="monospace"><br>
<br>
Thanks.</font><br>
<br>
<br>
<br>
Le 27/02/2013 12:17, amiege a écrit :<br>
</div>
<blockquote cite="mid:1361963844361-4026069.post@n3.nabble.com"
type="cite">Hi,
I am trying to tune a PID controller in Xcos, very much in the
same way as described in <a moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://mailinglists.scilab.org/file/n4026069/DC_motor_test.zcos"
target="_top" rel="nofollow" link="external">DC_motor_test.zcos</a>
<br>
<a moz-do-not-send="true"
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 width="300" align="left">
View this message in context: <a moz-do-not-send="true"
href="http://mailinglists.scilab.org/PID-tuning-in-Xcos-tp4026069.html">PID
tuning in Xcos</a><br>
Sent from the <a moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre HERISSE
Xcos developer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.70
<a class="moz-txt-link-freetext" href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a> </pre>
</body>
</html>