Using Simulink    

The Advanced Pane

The Advanced pane allows you to set various options that affect simulation performance.

Model parameter configuration

Inline parameters.   By default you can modify ("tune") many block parameters during simulation (see Tunable Parameters). Selecting this option makes all parameters nontunable except those that you specify. Making parameters nontunable enables Simulink to treat them as constants, thereby speeding up simulation. Using the Model Parameter Configuration dialog box (see Model Parameter Configuration Dialog Box) to specify the parameters you want to remain tunable when this option is selected. To display the dialog, select the adjacent Configure button.

When this option is selected, the only parameters that you can change during simulation are parameters that meet the following conditions:

To tune a parameter that meets these conditions, change the value of the corresponding workspace variable and choose Update Diagram (Ctrl+D) from the Simulink Edit menu.

If you select this option, Simulink moves constant signals out of the simulation loop. This speeds up the simulation.

Optimizations

Block reduction.   Replaces a group of blocks with a synthesized block, thereby speeding up execution of the model.

Boolean logic signals.   Causes blocks that accept Boolean signals to require Boolean signals. If this option is off, blocks that accept inputs of type boolean also accept inputs of type double. For example, consider the following model.

This model connects signals of type double to a Logical Operator block, which accepts inputs of type boolean. If Boolean logic signals option is on, this model generates an error when executed. If Boolean logic signals option is off, this model runs without error.

Parameter pooling..   This option is used for code generation (see the Real-Time Workshop documentation for more information). Leave this option on if you are not doing code generation.

Signal storage reuse.   Causes Simulink to reuse memory buffers allocated to store block input and output signals. If this option is off, Simulink allocates a separate memory buffer for each block's outputs. This can substantially increase the amount of memory required to simulate large models. So you should select this option only when you need to debug a model. In particular, you should disable signal storage reuse if you need to:

Zero-crossing detection.   Enables zero crossing detection during variable-step simulation of the model. For most models, this speeds up simulation by enabling the solver to take larger time steps. If a model has extreme dynamic changes, disabling this option can speed up the simulation but can also decrease the accuracy of simulation results. See Zero Crossing Detection for more information.

Model Parameter Configuration Dialog Box

The Model Parameter Configuration dialog box allows you to override the Inline parameters option (see Model parameter configuration) for selected parameters.

The dialog box has the following controls.

Source list..   Displays a list of workspace variables. The options are:

Refresh list.   Updates the source list. Click on this button if you have added a variable to the workspace since the last time the list was displayed.

Add to table.   Adds the variable(s) selected in the source list to the adjacent table of tunable parameters.

New.   Defines a new parameter and adds it to the list of tunable parameters. Use this button to create tunable parameters that are not yet defined in the MATLAB workspace.

Storage Class.   Used for code generation. See the Real-Time Workshop documentation for more information.

Storage type qualifier.   Used for code generation. See the Real-Time Workshop documentation for more information.


 The Diagnostics Pane Improving Simulation Performance and Accuracy