Help with Simulink Integrator Block

2 visualizaciones (últimos 30 días)
Ryan Kinzie
Ryan Kinzie el 17 de Jul. de 2020
Respondida: Jemima Pulipati el 22 de Jul. de 2020
I have gotten this error: "Derivative of state '1' in block 'NAME OF BLOCK' 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)". I have tried changing my intitial conditions to an array of non-zero values and I have also tried every different continuous solver that Simulink will allow me. So far nothing has worked.

Respuestas (1)

Jemima Pulipati
Jemima Pulipati el 22 de Jul. de 2020
The error maybe due to a model instability.
One way to remove the error is to open the dialog box of the 'Integrator' block, select 'Limit output' and specify an initial condition and saturation limits which are meaningful for your model.
You can also open the 'Configuration Parameter' and set the diagnostic 'Inf or NaN block output' to 'error'. From the error generated for the specific block the actual issue can be decoded (Example: divide by zero) which can be avoided in logic.
Below is information on tools that may assist you in further improving the model stability:
  1. Solver Profiler: The Solver Profiler can help you visualize your model dynamics and see where they may be unstable. Using the Solver Profile is described at this link
  2. Use Stepping Options to pause the simulation and view signal values before the error occurs.
Additionally, hierarchy is recommended when building complex models to improve readability. In case you are interested in that, information on converting your model to use subsystems may be found here

Categorías

Más información sobre Configure Simulation Conditions en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by