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.
"Unable to reduce step size"-error occurs when a scope is connected to specific outputs.
10 views (last 30 days)
Show older comments
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?
Answers (1)
Jyotish Robin
on 14 Mar 2017
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 Comments
Tony Castillo
on 15 Jan 2020
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,
See Also
Categories
Find more on Event Functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!