simulink question
조회 수: 20 (최근 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!