Checking for Singularities in Simulink Model

28 views (last 30 days)
Vicente
Vicente on 29 Apr 2015
Answered: Dennie on 16 Oct 2015
Hello!
I've finally finished building the blocks for every equation my system requires, and defined every variable that I may need for making at least one simulation. Some of the variables that I defined in the .m script that I didn't have a meaningful physical value on which to base the calculations, I set to 1 as a standard, just so I would most likely avoid any singularities. But still, after debugging all I could, MATLAB just accused the following singularity error:
Error using prova2 (line 186) Derivative input 1 of 'Full_Vehicle_Model/Tire Model/Tire/Tire Forces/FL/Stretched String Model (Relaxation Lengths - Transient Behavior)/nu', nu, upsilon', upsilon/Integrator' at time 0.0 is Inf or NaN. Stopping simulation. 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 am currently using a step size of 0.005s, and so it is much more likely that there is one singularity somewhere in there, and I just need to find and correct it. I would like to ask if anyone can give me any suggestions on how to check for them, and correct them. This seems like one of those problems that just take forever to solve. I could use some help.
Thank you.
  1 Comment
Samia
Samia on 16 Oct 2015
hello Vicente...did u get solution for ur problem?I am also facing the same problem bt dont know from where to start for its solution.as my model also consists of a lot of sub systems...

Sign in to comment.

Answers (1)

Dennie
Dennie on 16 Oct 2015
Hello Vicente,
Usually these errors occur when the input to an integrator block has a slope of inf. Since it happens at time 0.0, it is probably caused by your initial conditions. Reducing the step size could help Simulink to solve it, but that does not remove the initial flaw. Try checking your initial conditions.
If that does not work, you can check for algebraic loops. However, these usually aren't the problem at time 0,0.

Categories

Find more on General Applications 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!