Error: An error occurred while running the simulation and the simulation was terminated
Show older comments
Hii, so I have a simulation in Matlab that I need to run however I keep receiving this following error message :
Error:An error occurred while running the simulation and the simulation was terminated
Caused by:
Derivative of state '1' in block 'simulation/dynamics equation/Integrator' at time 0.0 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)
To put you in context, I am running a simulation controling a basic representation of a spacecraft system with a PD control law. The block that is giving me this error is the following block for the dynamic equations. I tried changing the tolerance and even the solver but it won't budge, the only time it doesn't notify me is when I choose a some random constants for the control gains, constants that do not actually give me the desired output I'm looking for and honestly I'm kind of lost on what I should do. I attach the picture of the dynamic equation block where the issue seems to be. I appreciate any help or guidance.
Thank you.

Accepted Answer
More Answers (0)
Categories
Find more on Event Functions 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!