
Derivative of state in block is not finite, how to fix?
14 views (last 30 days)
Show older comments
Hi!
I'm trying to make a simulation in simulink for a projectile using F=ma but i get the error that the derivative is not finite at the block highlighted. I've tried reducing the timestep and it doesn't fix it so I'm worried there might be a singularity in the solution and I have no idea how to fix that.
Any help is greatly appreciated, thanks!

0 Comments
Answers (1)
Sam Chak
on 26 Mar 2025
Hi @Jamie
Mathematically, the issue is likely caused by the Sum block at the end of the feedback loop, where the squared velocity value continues to be added to the state equation, resulting in the integrand growing until the solver can no longer maintain a sufficiently small step size. Please review the right-hand side of the state equation. My advice is to first run the simulation in MATLAB using ode45. If successful, you can then implement it in Simulink.

0 Comments
See Also
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!