Documentation Center

  • Trial Software
  • Product Updates

Batch Linearization Efficiency When You Vary Parameter Values

You can use the slLinearizer interface and the linearize command to batch linearize a model by varying model parameter values. When you vary the value of tunable parameters, both tools are efficient. Their efficiency results from using a single model compilation to compute linearizations for all parameter grid points. Tunable parameters refers to parameters whose values you can change during model simulation without recompiling the model. Common tunable parameters include the Gain parameter of the Gain block and Numerator and Denominator coefficients of the Transfer Fcn block.

In contrast, when you vary the value of nontunable parameters, both tools compile the model for each parameter grid point. This repeated compilation makes batch linearization slower. To take advantage of the efficiency of single model compilation, convert your nontunable parameters to tunable parameters. For example, suppose your model uses the Inline parameters option (see Inline parameters) to optimize the generated code's memory and processing requirements. 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.

    Tip   Suppose you are performing batch linearization by varying the values of tunable parameters and notice that the software is recompiling the model more than necessary. Check if you have specified linearization options and have set the AreParamsTunable option to false. Setting this option to false can cause unnecessary model recompilations. You specify linearization options using an object created by linearizeOptions.

See Also


Related Examples

More About

Was this topic helpful?