simulink question
10 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
Andreas Goser
2011-6-8
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.
0 个评论
Arnaud Miege
2011-6-8
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Configure Simulation Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!