Using Simulink Previous page   Next Page

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.

A Simulink component called the Simulink Engine responds to a Start command, performing the following steps.

Model Compilation

First, the Simulink engine invokes the model compiler. The model compiler converts the model to an executable form, a process called compilation. In particular, the compiler

Link Phase

In this phase, the Simulink Engine allocates memory needed for working areas (signals, states, and run-time parameters) for execution of the block diagram. It also allocates and initializes memory for data structures that store run-time information for each block. For built-in blocks, the principal run-time data structure for a block is called the SimBlock. It stores pointers to a block's input and output buffers and state and work vectors.

Method Execution Lists

In the Link phase, the Simulink engine also creates method execution lists. These lists list the most efficient order in which to invoke a model's block methods to compute its outputs. Simulink uses the block sorted order lists generated during the model compilation phase to construct the method execution lists.

Block Priorities

Simulink allows you to assign update priorities to blocks (see Assigning Block Priorities). Simulink executes the output methods of higher priority blocks before those of lower priority blocks. Simulink honors the priorities only if they are consistent with its block sorting rules.


Previous page  Model Methods Simulation Loop Phase Next page

© 1994-2005 The MathWorks, Inc.