4
votes

I downloaded a Simulink model, which I would like to run with a high fixed-step size, because I am more interested in speed than accuracy.

ode3: Works until Fixed-step size 3

Everything over Fixed-step size 4 leads to error. (Other solvers like ode8 lead to an error with other fixed-step sizes.)

This is the error message: Derivative of state '1' in block 'example_HeatPump/HeatPump/HeatPump_basic/model cold side/Integrator' at time 16.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) This is the block where the error occurs

Is there any way to solve this error?

1
No. The math underlying your model is breaking down when the step size is large. You either have to have a small step size or change your model (in some appropriate way.)Phil Goddard
@PhilGoddard thank you very much, can you explain to me why the model can't handle larger step sizes? Doesn't the integrator just add the value up?Anne Bierhoff
I would suggest you look at Solver and Types of Solver. Yes the fixed-step algorithms are performing an accumulation, but that accumulation involves the state derivative, which is what is causing problems when the step size is too large.Phil Goddard

1 Answers

0
votes

Just to add to the reason why the model can't handle larger step sizes. For too large step sizes there can be situations during simulations that one or multiple modelling constraints cannot be satisfied, which leads to such an error. So there can be some constraints in your model, which you do not know of, that lead to this.

Just to give an example, if you have a closed loop linkage system for a multibody system, the constraints are the hinges in the model which link the bodies. For too large step sizes the location of the hinge (which links body 1 & 2) in body 1 and the location of the same hinge in body 2 may not coincide at some point during simulation. For small (numerical) errors, there are ways to cope with this. Larger errors lead to problems.