Simulink Control Design™ - MathWorks

(Tuis.) #1

Batch Compute Steady-State Operating Points for


Parameter Variation


Block parameters configure a Simulink model in several ways. For example, you can use
block parameters to specify various coefficients or controller sample times. You can also
use a discrete parameter, like the control input to a Multiport Switch block, to control the
data path within a model. Varying the value of a parameter helps you understand its
impact on the model behavior. Also, you can vary the parameters of a plant model in a
control system to study the robustness of the controller to plant variations.

When trimming a model using findop, you can specify a set of parameter values for
which to trim the model. The full set of values is called a parameter grid or parameter
samples. findop computes an operating point for each value combination in the
parameter grid. You can vary multiple parameters, thus extending the parameter grid
dimension.

Which Parameters Can Be Sampled?


You can vary any model parameter with a value given by a variable in the model
workspace, the MATLAB workspace, or a data dictionary. In cases where the varying
parameters are all tunable (Simulink), findop requires only one model compilation to
find operating points for varying parameter values. This efficiency is especially
advantageous for models that are expensive to compile repeatedly.

Vary Single Parameter


To vary the value of a single parameter for batch trimming with findop, specify the
parameter grid as a structure having two fields. The Name field contains the name of the
workspace variable that specifies the parameter. The Value field contains a vector of
values for that parameter to take during trimming.

For example, the Watertank model has three parameters defined as MATLAB workspace
variables, a, b, and A. The following commands specify a parameter grid for the single
parameter for A.

param.Name = 'A';
param.Value = Avals;

Here, Avals is an array specifying the sample values for A.

Batch Compute Steady-State Operating Points for Parameter Variation
Free download pdf