The simulation below is a bouncing ball model. Instead of wiring State port to the determine Initial condition, I wired integrator output. The result after first time step is shown and the output from Initial condition block is zero. Why ?
答案 0 :(得分:0)
When stepping through the model, at the bottom of the model there is a hyperlink to View diagnostics
. In the diagnostics you'll see the message:
Detected algebraic loop path(s) through integrator reset or IC ports.
Results may not be intuitive (see documentation). Use integrator state
port to avoid algebraic loops.
Note the Results may not be intuitive
part. Basically the algebraic loop solver is overriding the IC block, and you need to use the state-port for the feedback to the initial condition.