Prev: How to extract different rows and columns from different images and then mixing them to form new matrix
Next: Multi Dimensional Indexing
From: Arvind Kumar on 18 Apr 2010 17:49 Hi , I am using the GA toolbox to design a PID controller. In my fitness function I run a simulink model. The PID values are getting passed to the simulink model but for some of these values the simulation stops with the following error. "Derivative input 1 of 'ref_ctrl/Reformer/Subsystem2/Manifold Dynamics/Integrator' at time 3.791942778982691 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances). " Is it possible to skip those values in the population for which the simulation does nt run and go on to the next value in the population. Help and suggestions are greatly appreciated. Thanks Arvind
From: Arkadiy Turevskiy on 19 Apr 2010 14:14 Can I ask why you are using GA Toolbox to design a PID controller? Does not seem to be the right tool for the job. I would recommend using PID Tuner in Simulink Control Design: http://www.mathworks.com/products/demos/slcontrol/designing-a-pid-controller-for-a-dc-motor-video-demo/ If you prefer optimization-based tuning (if you are tuning controller and limiting amplitude of actuator request at the same time, for example), I would recommend using Simulink Design Optimization: http://www.mathworks.com/products/sl-design-optimization/demos.html?file=/products/demos/shipping/sldo/pidtrack_demopad.html As far as the error message you are getting, just try changing Simulink solver to variable step instead of fixed step you have now. HTH. Arkadiy "Arvind Kumar " <arvindkumarms(a)gmail.com> wrote in message <hqfuoh$j9g$1(a)fred.mathworks.com>... > Hi , > > I am using the GA toolbox to design a PID controller. In my fitness function I run a simulink model. The PID values are getting passed to the simulink model but for some of these values the simulation stops with the following error. > > "Derivative input 1 of 'ref_ctrl/Reformer/Subsystem2/Manifold Dynamics/Integrator' at time 3.791942778982691 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances). " > > Is it possible to skip those values in the population for which the simulation does nt run and go on to the next value in the population. > > Help and suggestions are greatly appreciated. > > Thanks > Arvind
From: Arvind Kumar on 13 May 2010 11:52
I tried changing the solver. It gives an error for all of the variable step solvers. "Arkadiy Turevskiy" <arkadiy.turevskiy(a)mathworks.com> wrote in message <hqi6hc$dbq$1(a)fred.mathworks.com>... > Can I ask why you are using GA Toolbox to design a PID controller? Does not seem to be the right tool for the job. > > I would recommend using PID Tuner in Simulink Control Design: > http://www.mathworks.com/products/demos/slcontrol/designing-a-pid-controller-for-a-dc-motor-video-demo/ > > If you prefer optimization-based tuning (if you are tuning controller and limiting amplitude of actuator request at the same time, for example), I would recommend using Simulink Design Optimization: > http://www.mathworks.com/products/sl-design-optimization/demos.html?file=/products/demos/shipping/sldo/pidtrack_demopad.html > > As far as the error message you are getting, just try changing Simulink solver to variable step instead of fixed step you have now. > > HTH. > Arkadiy > > "Arvind Kumar " <arvindkumarms(a)gmail.com> wrote in message <hqfuoh$j9g$1(a)fred.mathworks.com>... > > Hi , > > > > I am using the GA toolbox to design a PID controller. In my fitness function I run a simulink model. The PID values are getting passed to the simulink model but for some of these values the simulation stops with the following error. > > > > "Derivative input 1 of 'ref_ctrl/Reformer/Subsystem2/Manifold Dynamics/Integrator' at time 3.791942778982691 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances). " > > > > Is it possible to skip those values in the population for which the simulation does nt run and go on to the next value in the population. > > > > Help and suggestions are greatly appreciated. > > > > Thanks > > Arvind |