Block Error, Singularity in Solution?
Show older comments
The error for my sim reads:
- Derivative of state '1' in block 'shifter_system_sim_new/Integration 2' at time 0.01322996254791375 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
I've been trying to resolve this issue for a while and have looked at similar solutions to the same problem but can't figure out what is wrong and how to resolve this error. Will someone please tell me if this error is a sigularity issue or a step size issue? If so, how would I resolve it exactly for it to work?
Files are attached.
5 Comments
Walter Roberson
on 17 Sep 2019
In my experience, it is more often a problem with the model (that is, that with those blocks hooked together and those initial conditions, there is a mathematical singularity in the solution to the equations.) However, in the case of stiff models, trying to solve with a non-stiff solver can lead to problems.
Michael Scirocco
on 17 Sep 2019
Walter Roberson
on 18 Sep 2019
Your 1D Lookup Table6 has breakpoints set at [100, 61, 76.25 , 100] with corresponding output [.0001, 0.1, 58, 58.1] . When I enable debugging checks, it tells me that the input to the block is out of range -- so the input is below 61 or above 100. I have to wonder what your intention is when your first breakpoint is the same as your last breakpoint. Is it possible that you wanted the first breakpoint to be 0 or 1.00 ?
Michael Scirocco
on 18 Sep 2019
Walter Roberson
on 18 Sep 2019
Ah, it looks to me as if I was mis-reading the parameters. I will have another look.
Answers (1)
Walter Roberson
on 18 Sep 2019
0 votes
What I had to do to get your model to execute without error message, was to uncomment the saturation block that feeds the 1D lookup table.
The initial value of the angle is 0, which is less than the first breakpoint of 0.001 that you had established, so your model would abort soon after it initialized. The Saturation Block had a minimum of 0.1 and so prevented that, but the Saturation Block was commented out.
Note: the Saturation Block emits a maximum of 56, which is lower than the two upper breakpoints of 58 and 58.1. You might want to reconsider the saturation limits.
4 Comments
Michael Scirocco
on 18 Sep 2019
Walter Roberson
on 18 Sep 2019
My debugging shows that the position going in on the first iteration is 0. Are you referring to the position after some time?
Michael Scirocco
on 20 Sep 2019
Walter Roberson
on 20 Sep 2019
You have a Gain block named Inertia, with gain 1/J where J is about 9.18e-07 . 1 over that is a little over a million. This boasts very modest values to large values, and that is sent into the integrator 2 to become speed...
Categories
Find more on Discrete Events and Mode Charts in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!