optimizing parameters for robustness
what is robustness?
a design is robust when its response does not violate design requirements under model parameter variations. your model may contain parameters whose values are not precisely known. such parameters vary over a given range of values and are defined as uncertain parameters. you may know the nominal value and the range of values in which these uncertain parameters vary.
you can use simulink® design optimization™ software to incorporate the parameter uncertainty to test the robustness of your design. when you optimize parameters for robustness, the optimization solver uses the responses computed using all the uncertain parameter values to adjust the design variable values.
you can specify the same parameter both as a design and uncertain variable. however, you cannot use a parameter both as a design and uncertain variable in the same optimization run. also, you cannot add uncertainty to controller or plant parameters during optimization-based control design in the control system designer.
the uncertain variables can be scalar, vector, matrix or an expression.
you can test and optimize parameters for model robustness in the following ways:
before optimization. specify the parameter uncertainty before you optimize the parameters to meet the design requirements. in this case, the optimization method optimizes the signals based on both nominal parameter values as well as the uncertain values. this mode requires more computational time.
after optimization. specify the parameter uncertainty after you have optimized the model parameters to meet design requirements. you can then test the effect of the uncertain parameters by plotting the model's response. if the response violates the design requirements, you can optimize the parameters again by including the parameter uncertainty during the optimization.
sampling methods for uncertain parameters
sample values for uncertain parameters are a vector of numerical values. you can
specify the vector yourself or generate a vector of random numbers using the
software. the sample values you specify can be uniformly distributed or random. for
example, four sample values for two uncertain parameters a and
b in the range [0 3]
and [1
2.5]
may look like the following figure.
there are two methods to determine the number of sample values to use during optimization:
only the combination of minimum and maximum values (circled)
combination of the entire set of values (all solid dots in the previous figure)
tip
using only the minimum and maximum values during optimization increases the computation speed when compared to using the entire set of values.
for the previous example, there are 4 combinations using the minimum and maximum values and 16 combinations if you use all sample values.
in the response optimizer, you specify the sampling method using the options as shown in the following figure.
optimize parameters for robustness (gui)
this example shows how to optimize a design to meet a custom signal requirement. you optimize the controller parameters to minimize the plant actuation signal energy while satisfying step response requirements.
load a saved response optimizer session.
load sldo_model1_desreq_optim_sdosession
sdotool(sdosessiondata);
the sdotool
command opens the simulink model sldo_model1_desreq_optim.slx
and a saved response optimizer session.
the parameters of this model, kp
, ki
and kd
, have already been optimized to meet the following step response requirements:
maximum overshoot of 5%
maximum rise time of 10 seconds
maximum settling time of 30 seconds
specify parameter uncertainty.
in the uncertain variables set drop-down list, select new.
a window opens where you specify uncertain variables.
click w0
and zeta
to select them. click the arrow to add the selected parameters to an uncertain variables set.
the software displays the following parameter settings:
variable — parameter name
nominal value — nominal value of the parameters as specified in the simulink model
uncertain values — values that the uncertain parameter can take. by default, the maximum and minimum values vary by 10% of the nominal value.the total number of sample values to use during optimization is a combination of the maximum and minimum values of the uncertain parameters.
the check-box indicates that the parameter is included in the uncertain variable set. the default uncertain variable set name is uncvars
.
click ok. a new variable uncvars
appears in data area of the response optimizer.
instead of specifying sample values, you can also auto-generate random values in a specific range. to do so, select a parameter and click set uncertain values.
a window opens where you specify the range and the number of samples.
to test the model robustness to the uncertain parameters, click plot model response.
the step response plot, displaying the requirements, updates.
the solid curve corresponds to the model response computed using the optimized parameters and nominal values of the uncertain parameter. the four dashed curves correspond to the model response with the minimum and maximum values of the uncertain parameters. the dashed plot lines show that the response during the period of 10 to 20 seconds violates the design requirements.
to optimize the parameters for model robustness, click optimize.
the optimization progress report dialog displays the optimization iterations. after the optimization completes, the message optimization converged
indicates that the final model response computed by varying the uncertain parameters meets the specified design requirements.
to examine the responses, select uncvar
and click plot model response on the time plot tab.
the final responses appear as the thick solid and dashed curves. the nominal and uncertain responses with parameter variations now meet the design requirements.
referenced model variables
if your model contains referenced models, you can
create an uncertain variable set using variables in the referenced models, using the
create uncertain variables set dialog. for example, the
first variable in the dialog box, slew
, is listed as
sdoratelimitedcontroller:slew
.
sdoratelimitedcontroller
is the name of the referenced model
with the variable slew
. the slew
variable has
the same value for all instances of the sdoratelimitedcontroller
model. in contrast, the variable kd
can have a different value
for each instance of the referenced model containing it. for example, the second
variable in the dialog box is listed as
sdomultiplemotors/control_1:kd
. the upper-level model
sdomultiplemotors
has block control_1
,
which is a referenced model that has variable kd
. the value of
this variable can be different than kd
in block
control_2
, which is the third variable in the dialog box. to
enable instance-specific values, kd
is specified as a model
argument in the referenced model workspace.