Hi, I found out whats wrong basically in my system I have modeled. I hadnt had the input pushed in to the workspace variable block_output.
I fixed that issue and now the system and output look like this. Note: I used D gain fixed at 1 as my system is unstable without D <http://mailinglists.scilab.org/file/n4030515/SystemDiagram-Opt.gif> <http://mailinglists.scilab.org/file/n4030515/BeforeOptimization.gif> When I initialized the x0 variable to [1;5] (Initial P and I gains), The optimization routine calculated the optimum gains 1 and 5 for P and I respectively after 90 iterations. * Evaluation 90 - P = 0.999831 I = 4.997351 y = 0.007559 (y_error = 0.015119, y_diff = 0.000000) * and the system response for the square wave looks like this <http://mailinglists.scilab.org/file/n4030515/BeforeOpt-Prog.gif> Then I tried to initialize the x0 variable to [1;1] and started the optimization routine; after 72 iterations I got 1 for P and 1 for I as optimal gains. * Evaluation 71 - P = 0.999973 I = 1.001996 y = 0.240250 (y_error = 0.446943, y_diff = 0.033557) Evaluation 72 - P = 0.999973 I = 0.997996 y = 0.240493 (y_error = 0.447429, y_diff = 0.033557) * 1. Why is that the optimization routine seems to take optimal values very close to the initially given values. ? I am not a pro but I guess it might have something to do with quasi-Newton method which had been used in this example as its only possible to find local minima ? In this case do we need to guess the correct value approximately before running the optimization ? 2. How can I incorporate D gain in to this. Thanks a lot in advance. -- View this message in context: http://mailinglists.scilab.org/PID-tuning-with-Optimization-tp4030508p4030515.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.scilab.org/mailman/listinfo/users
