Simulink Error "Derivative input -47 ..." with integrator block

1 vue (au cours des 30 derniers jours)
Bettina
Bettina le 11 Sep 2013
Hello Everybody,
I hope somebody can help me, because I cannot find a solution to my Problem. In a rather big Simulink Model I am using an Integrator Block. The Integrator Input Signal is give from a Merge Block - I have been plotting this Signal via a scope: the Input Signal is continually Zero!
Additionally I have an external Initial Condition Port - this Port is continually 100.
So the Integrator should normally do nothing - integrate 0 the the Initial value of 100. When I copy this Subsystem to a new file and put the vales manually, it works as it should - and the result is continually 100.
When I try running the model, I get the very confusion error message: Derivative input -47 of 'NameOfBlock' at time 0.08 is Inf or NaN. Stopping simulation. 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 already tried to put a Saturation to the Input port - with no results. Also I have tried in the Configuration Parameters - Data Import/Export - Save to Workspace - to plot the States. There I get 56 States and 2 of These becom 1e+16 , is this already Inf? But I cannot define, which state this is.
Why is it, that I get an error message with Input Port Nr. -47 ?!?!
Can anybody give my a tipp, how to locate the error?
I would be very gratefull ...
  1 commentaire
Kaustubha Govind
Kaustubha Govind le 11 Sep 2013
Perhaps you can try using the Simulink Debugger to understand where the model diverges?

Connectez-vous pour commenter.

Réponse acceptée

Guy Rouleau
Guy Rouleau le 11 Sep 2013
The port "-47" is a bug. I would recommend recommend trying in R2013b (I think it is fixed in this latest release). Also, you can contact technical support to get more information on this bug.
A few things you can try to debug your NaN error:
- Log the states in structure format, that way you will have a block name associated with the values.
- As recommend by Kaustubha, use the debugger. You have the possibility to put a breakpoint ofn Nan, which should help identifiy where this all starts.
- You might want to try this central submission to see what happens between two steps of the simulink solver:

Plus de réponses (1)

Bettina
Bettina le 12 Sep 2013
Hallo back and thanks for the two answers,
I have tried the Simulink Debugger and there I found the NaN Breakpoint. I tried with the conditional breakpoint on the Signal itself, but Simulink would not allow this.
The Statement that the port "-47" is a bug, was really usefull, because I startet banging my head angainst the wall with this Integrator block.
The Debugger showed my insted, that a completly different Block was running out of an look up table data-range. How it ended up with this error report, I still can't see.
But now I fixed the look Up table and it runs fine. Thanks again!

Catégories

En savoir plus sur General Applications dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by