"Unable to reduce step size"-error occurs when a scope is connected to specific outputs.

29 ビュー (過去 30 日間)
Fred
Fred 2017 年 3 月 8 日
コメント済み: Tony Castillo 2020 年 1 月 15 日
My simulation works but when I try to observe certain states in my simulation using scopes, an error occurs: "An error occurred while running the simulation and the simulation was terminated Caused by: Unable to reduce the step size without violating a minimum step size of 1.43102346483262E-21 at time 4.0279729643616539E-7 for model 'modelname'". Solver is ode23t, relative tolerance is 1e-3, absolute tolerance is set to 'auto'. This is strange because if I remove the scope again, the simulation will not crash.. How is this error possible?
  1 件のコメント
Fred
Fred 2017 年 4 月 27 日
Well turns out it helped to plug a memory block between the scope and the state it is supposed to log. I still do not know why this happened.

サインインしてコメントする。

回答 (1 件)

Jyotish Robin
Jyotish Robin 2017 年 3 月 14 日
Hi Fred!
This error can happen when the solver is unable to solve the equations within the step-size provided.
One of the recommended ways to resolve this error is to increase the number of consecutive minimum steps the model is taking. This value can be modified by expanding the ' Additional options' section in solver section of the configuration parameters.
In this section, you should see a dialog box with the title ' Number of consecutive min steps:' next to it. Increase the value in this box.
You can also try to relax all the tolerances in the model from the Model Configuration Parameters.
Hope it helps!
  2 件のコメント
Fred
Fred 2017 年 3 月 16 日
編集済み: Fred 2017 年 3 月 16 日
Thank you for your comprehensive answer that showed me that I did not explain my problem clearly. The point is: I have a simulation file with said solver settings. It already has some scopes attached to signals. NOW when I start simulating, it will not crash. If after that, I connect a scope to another signal (that existed before! It has been calculated in the run that did NOT crash), I get the error I told about. How is this possible? Randomly getting simulation errors after just adding in a single scope?
Tony Castillo
Tony Castillo 2020 年 1 月 15 日
Hi Fred,
I have been having a warning not an error like you explained in this blog, nonetheless, I have overcome it, just increasing my 'Number of consecutive min steps: from 1 to 3', and also I have changed to 'Robust' the Solver reset method. I can notice the simulation takes maybe 3 more times than before, but it is entirely executed without any warning. Even though I was diving into Matlab help, I could not find anything where it is explained in detail, so I wonder, how the increase of 'Number of consecutive min steps might affect if does to the accuracy of the simulation?.
I would like to receive an answer so as to clarify my doubts about that subject.
Best regards,

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by