MATLAB Answers

0

Block Error, Singularity in Solution?

Asked by Michael Scirocco on 17 Sep 2019
Latest activity Commented on by Walter Roberson
on 20 Sep 2019
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

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 ?
Well it is a motor simulation to test different motor specs, which also takes into consideration the load of a clutch on a car.
For the load, I’m inputting the position (in degrees) [between 0 and 58] and outputting the torque [between 61 and 76.25]. The relationship between the two are linear. I’m also trying to make it so that if the input is not in the position range I care about, then it puts a “wall “up so that it only shows the range of motion that I care about. How do I create this lookup table? I tried putting limits on the input inside the lookup table parameters/data but it gave me the error above. How do I do it?
Ah, it looks to me as if I was mis-reading the parameters. I will have another look.

Sign in to comment.

1 Answer

Answer by Walter Roberson
on 18 Sep 2019

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

Show 1 older comment
My debugging shows that the position going in on the first iteration is 0. Are you referring to the position after some time?
Well I expect the first position to be 0. The idea is that it shows me the motor's range of motion in degrees (from 0 to 58) over time so I can see how a specific motor handles the requirements of the load. I was expecting the position to start at 0, ramp up to 58 in a short period of time.
I don't know why the position becomes such a huge negative number. When I take the saturation out and make the lookup table from just [0, 58] and [61, 76.25] it gives me a value of around -300. Why is my position still negative??
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...

Sign in to comment.