I notice that while running your Simulink model, you are getting an error and an associated warning message.
It suggests that “there may be a singularity in the solution”, if you attest that there isn’t any then the diagnostic suggests “reducing the fixed step size or tightening the error tolerance”. But the warning message above the error clearly mentions that you are already simulating at minimum step size.
This error typically appears in these scenarios:
- Model has large fluctuations in signals, that the solver can’t handle.
- Algebraic branch that divides by a signal that can become zero pushes Inf/NaN into downstream Integrators.
- Incorrect sum-block signs or gain parameters can convert a damping loop into runaway feedback, forcing state values toward ∞ (Positive-feedback divergence).
- Fixed-step solvers (or variable-step solvers with loose tolerances) may take steps that skip over rapid dynamics, triggering the minimum-step warning when they can’t satisfy error tolerances.
- Models with widely varying time scales (e.g., electrical circuits or chemical kinetics) are “stiff,” and nonstiff solvers will struggle with rapid transients.
Here are a few diagnostic techniques, that will help you pin-point the issue:
- Port Value Display / Simulation Data Inspector: Break on Inf/NaN and trace upstream to the block introducing non-finite values
- Step-through debugging: Use the blog’s step-by-step port value animation to watch signals evolve in slow motion and catch the instant divergence occurs
- Plot logged states: Enable state logging and plot the problematic state to confirm divergence or NaN appearance
Possible Solutions:
- Switch to a stiff solver like “ode15s” or another implicit method designed for stiffness.
- In variable-step mode, try decreasing absolute/relative tolerances.
- Try adding a “Transport Delay” block (with microsecond-scale delay) as it can smooth abrupt changes and help the solver.
- Ensure any Sum blocks in feedback paths use the correct polarity to prevent divergence.
- Add a small bias or use a <Switch> to avoid dividing by zero in custom blocks or gains.
Hope this helps you pinpoint and resolve the solver issues in your model!
Credits:
- The following answer (on the forum) by Athul Prakash, a MathWorks staff: https://www.mathworks.com/matlabcentral/answers/474563-error-in-simulink-singularity-in-solution#answer_386766
- The following blog by Guy Rouleau, MathWorks staff: https://blogs.mathworks.com/simulink/2024/07/22/derivative-of-state-1-in-block-x-y-integrator-at-time-0-55-is-not-finite/
- Helpful answers by the community on the following thread: https://www.mathworks.com/matlabcentral/answers/252574-derivative-of-state-1-in-block-x-y-integrator-at-time-0-55-is-not-finite