| Simulink® Control Design™ | ![]() |
| On this page… |
|---|
How to Create Accurate Operating Points Impact of Blocks on the Simulink Model Operating Point |
Particular Simulink blocks and modeling situations can sometimes cause difficulties with computing operating points (trimming). However, by understanding what it means to trim a Simulink model and by using the correct modeling techniques, you can create accurate operating points for use in further analysis and design.
This section consists of examples that highlight modeling situations that can lead to problems when computing operating points, with recommendations for ways to avoid these situations.
The full operating point in a Simulink model is specified in a number of ways by the blocks in the model:
Integrator, State Space, and Transfer Function blocks have their outputs defined by double-valued discrete states.
Source blocks such as Constant or Step blocks have their output specified by their block dialog parameters.
Blocks such as Backlash, Memory, and Stateflow blocks have an internal state representation that impacts block outputs.
It is important to understand the impact of the blocks on the full operating point of your Simulink model. In particular, blocks with internal state representation can have a profound impact when you search for operating points or linearize a Simulink model. For more information on which blocks' states are included in an operating point versus a full model operating point, see Simulink Model Operating Points in the Simulink Control Design getting started documentation.
The following simple Simulink model shows the impact of blocks with internal states on the full operating point of a Simulink model. Each Backlash block has internal states that are initialized by the Initial output block dialog parameter.

The operating point for this model in the Simulink Control Design software does not include the backlash block states that exist in the model. See the following table for a comparison.
| States | Inputs | |
|---|---|---|
| Full model operating point | 2 | 1 |
| Operating point | 0 | 1 |
In this case, the value specified for the root level input is not propagated through the full model. However, the initial output for the Backlash1 block is propagated through the model.
When you linearize this model, the linearization is performed around the full model operating point, which includes the two states. For the input and output points specified in this model, the second backlash block is not in the linearization path and thus its state does not impact the linearization result.
Blocks with internal states that cannot be seen by the operating point object include:
Action Subsystem blocks which are not enabled
Backlash block
Embedded MATLAB Function block with persistent data
Transport Delay and Variable Transport Delay blocks
Memory block
Rate Transition block
Stateflow blocks
S-Function blocks with states not registered as Continuous or Double Value Discrete
To determine when your model contains any of these blocks with internal states, run the following command:
sldiagnostics('modelname','CountBlocks')This command returns a list of all the blocks in the model and the number of occurrences of each.
The following techniques provide strategies for working with models containing blocks with internal states:
Block specific techniques
Removing, replacing blocks, or both
Linearizing at steady state using linearization snapshots
Block specific techniques exist for accurately computing operating points and linearizing models that contain the following blocks with internal states:
For other blocks with internal states, you should consider their impact on the analysis tools in the Simulink Control Design software in the following ways:
When searching for an operating point you should determine if the output of the block impacts any of the state derivatives or desired output levels.
When linearizing a model you should ascertain the effects on the model operating point. In particular, you should determine the effect on blocks between linearization input and output points.
If the block does have impact, consider replacing it using a configurable subsystem when searching for an operating point and linearizing.
In many cases, performing a linearization using linearization snapshots avoids the challenges associated with blocks with internal states. You can linearize your model at steady state using linearization snapshots as described in Linearizing at Specified Simulation Times and Linearizing at Simulation Events.
Memory Blocks. When you have Memory blocks in your model, you can configure the block to use a steady state output value when using the Simulink Control Design software. The model delayex.mdl, shown below, illustrates this issue.

In this model the Memory block is configured in the block dialog to have an initial output of 0 but is driven by a Constant block with an output of 1. This causes the output signal of the block to be 0 in the operating point. However, in the steady-state operating point for this model, the output of the Memory block is 1. When searching for an operating point or when linearizing a model at a steady state condition, select the Direct feedthrough of input during linearization option in the block dialog. This will force the output of the Memory block to be the same as the input during operating point searches or linearization.

Transport Delay and Variable Transport Delay Blocks. When you have Transport Delay or Variable Transport Delay blocks in your model, you can properly configure the initial outputs of these blocks so that operating point searches or linearization uses the correct output value at steady state condition. The discussion in Memory Blocks applies to configuring the initial outputs of the Transport Delay and Variable Transport Delay blocks.
Backlash Block. The initial output and the output at the steady-state operating point of the Backlash block do not always match. There is no way to force the output of the Backlash block to be the same as the input during operating point searches or linearization. Extra care should be taken when working with a model containing Backlash blocks.
When computing operating points (trimming) for a SimMechanics™ model, you first need to put it in trimming mode. To do this:
Locate and open the machine environment (Env) block for the system.
From the Parameters pane, set Analysis mode to Trimming. Click OK to close the block dialog box. This will create an output port in the model that contains constraints related to errors in the system that must be set to zero for a steady state operating point.
To set these constraints to zero within a project for the model in the Control and Estimation Tools Manager, select Operating Points in the pane on the left, and then select Compute Operating Points > Outputs. Within this pane, set all constraints to 0.
At this point you can enter other design specifications on the states and inputs, and then compute an operating point for your model. After you have finished computing operating points for the SimMechanics model, make sure that you reset the Analysis mode to Forward dynamics in the Env block dialog box.
When you compute an operating point from design specifications (trimming), it is often important to begin with a set of state and input values that are close to the actual steady state operating point values that you are trying to compute. To do this you can simulate the model for a specified period of time and then take a snapshot of the state and input values at that time. You can do this using either the Control and Estimation Tools Manager (see Creating Operating Points from Simulation in the Simulink Control Design getting started documentation for more information) or using the findop function (see Extracting Values from Simulation for more information).
You can then use the values from the simulation snapshot as initial values for an operating point that you compute from specifications using optimization methods. To initialize the operating point specifications using these snapshot values, click the Import Initial Values button in the Compute Operating Points pane of the Control and Estimation Tools Manager, or use the initopspec function. For more information, see Importing Operating Points.
![]() | Troubleshooting Linearization Results | Function Reference | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |