simulink question

10 views (last 30 days)
ban cha
ban cha on 8 Jun 2011
when I run the similink model, I frequently get the message The model 'untitled' does not have continuous states, hence using the solver 'VariableStepDiscrete' instead of the solver 'ode45' specified in the Configuration Parameters dialog. Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be limited to be less than this value.
How can i solve this problem

Answers (2)

Andreas Goser
Andreas Goser on 8 Jun 2011
I recommend that you set the solver and the step size to something that makes numerical sense for your application. You can find this in the Simulation -> Configuration Parameters -> Solver menu.

Arnaud Miege
Arnaud Miege on 8 Jun 2011
The reason for the first warning is because you don't have any continuous states in your model, only discrete states, so Simulink changed the solver from ode45 (which is what you specified the solver to be, and which is a variable-step solver that handles continuous states) to the "VariableStepDiscrete" solver, which is also a variable-step solver but designed to handle only discrete states. To get rid of the warning, change the solver from ode45 to VariableStepDiscrete in the configuration parameters (see Andreas' answer). I would suggest you also read the section of the Simulink documentation on Choosing a Solver.
The second warning is because your stop time is set to 10s and your max step size to auto, which is the default. When auto is selected, Simulink sets the max step size to the stop time divided by 50, i.e. 0.2s in your case. To get rid of the warning, set the max step size to something other than auto, in the same place as where you set the solver.
HTH,
Arnaud

Categories

Find more on Configure Simulation Conditions in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!