Using Simulink | ![]() ![]() |
Processing at Each Time Step
Simulink computes a block's outputs by invoking the block's output function. Simulink passes the current time and the block's inputs and states to the output function as it may require these arguments to compute the block's output. Simulink updates the output of a discrete block only if the current step is an integral multiple of the block's sample time.
Simulink computes a block's discrete states by invoking its discrete state update function. Simulink computes a block's continuous states by numerically integrating the time derivatives of the continuous states. It computes the time derivatives of the states by invoking the block's continuous derivatives function.
Simulink uses a technique called zero crossing detection to detect discontinuities in continuous states. See "Zero Crossing Detection" on page 3-14 for more information.
Simulink repeats steps 1 through 4 until the simulation stop time is reached.
![]() | Model Execution Phase | Determining Block Update Order | ![]() |