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

  1. Evaluates the model's block parameter expressions to determine their values.
  2. Determines signal attributes, e.g., name, data type, numeric type, and dimensionality, not explicitly specified by the model and checks that each block can accept the signals connected to its inputs.
  1. 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.

  1. Determined memory needed for work vectors, states, and run-time parameters for each block
  2. Performs block reduction optimizations.
  3. Flattens the model hierarchy by replacing virtual subsystems with the blocks that they contain (see Atomic Versus Virtual Subsystems).
  4. Sorts the blocks into the order in which they need to be executed during the execution phase (see Determining Block Update Order).
  5. Determines the sample times of all blocks in the model whose sample times you did not explicitly specify.
  6. Allocates and initializes memory used to store the current values of each block's states and outputs.

  Subsystems Model Execution Phase