Documentation

Batch Linearization Efficiency When You Vary Parameter Values

You can use the Simulink® Control Design™ linearization tools to batch linearize a model by varying model parameter values. When you vary the value of tunable parameters, the linearization tools use a single model compilation to compute linearizations for all parameter grid points, resulting in efficiency. The term Tunable parameters refers to parameters whose values you can change during model simulation without recompiling the model. In general, only parameters that represent mathematical variables are tunable. Common tunable parameters include the Gain parameter of the Gain block, PID gains of the PID Controller block, and Numerator and Denominator coefficients of the Transfer Fcn block.

In contrast, when you vary the value of nontunable parameters, the linearization tools compile the model for each parameter grid point. This repeated compilation makes batch linearization slower. Parameters that specify the appearance or structure of a block, such as the number of inputs of a Sum block, are not tunable. Parameters that specify when a block is evaluated, such as a block's sample time or priority, as also not tunable.

To take advantage of the efficiency of single model compilation, convert nontunable parameters that you want to vary to tunable parameters. For example, suppose that your model uses the Inline parameters option (see Inline parameters) to optimize the memory and processing requirements of generated code. Before batch linearizing the model, clear this check box to make your model parameters tunable. Some parameters, such as block sample times, cannot be made tunable.

Suppose that you are performing batch linearization by varying the values of tunable parameters and notice that the software is recompiling the model more than necessary. To improve efficiency, check how the AreParamsTunable option is set for the linearization. To do so:

  • At the command line, if you are using a linearization-options set created by linearizeOptions, make sure the AreParamsTunable option is set to false.

  • In Linear Analysis Tool, AreParamsTunable is always set to false.

See Also

|

Related Examples

More About

Was this topic helpful?