Asked by Michael Scirocco
on 17 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.

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.

Walter Roberson
on 18 Sep 2019

Michael Scirocco
on 20 Sep 2019

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??

Walter Roberson
on 20 Sep 2019

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 5 Comments

## Walter Roberson (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/480822-block-error-singularity-in-solution#comment_746971

## Michael Scirocco (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/480822-block-error-singularity-in-solution#comment_747026

## Walter Roberson (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/480822-block-error-singularity-in-solution#comment_747056

## Michael Scirocco (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/480822-block-error-singularity-in-solution#comment_747070

## Walter Roberson (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/480822-block-error-singularity-in-solution#comment_747072

Sign in to comment.