Using Simulink |
 |
Simulating Dynamic Systems
Simulating a dynamic system refers to the process of computing a system's states and outputs over a span of time, using information provided by the system's model. Simulink simulates a system when you choose Start from the model editor's Simulation menu, with the system's model open.
Simulation of the system occurs in two phases: model initialization and model execution.
Model Initialization Phase
During the initialization phase, Simulink:
- Evaluates the model's block parameter expressions to determine their values.
- Flattens the model hierarchy by replacing virtual subsystems with the blocks that they contain (see Atomic Versus Virtual Subsystems).
- Sorts the blocks into the order in which they need to be executed during the execution phase (see Determining Block Update Order).
- Determines signal attributes, e.g., name, data type, numeric type, and dimesionality, not explicitly specified by the model and checks that each block can accept the signals connected to its inputs.
Simulink uses a process called attribute propagation to determine
unspecified attributes. This process entails propagating the attributes of a
source signal to the inputs of the blocks that it drives.
- Determines the sample times of all blocks in the model whose sample times you did not explicitly specify.
- Allocates and initializes memory used to store the current values of each block's states and outputs.
| Subsystems | | Model Execution Phase |  |