| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Design Optimization |
| Contents | Index |
| Learn more about Simulink Design Optimization |
A model is robust when it's response does not violate design requirements under parameter variations. When you optimize model parameters, your model may contain additional 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 then use the Simulink Design Optimization software to incorporate the parameter uncertainty to test the robustness of your design. 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 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.
To learn more, see Example — Optimizing Parameters for Model Robustness Using the GUI.
Note You cannot add uncertainty to controller or plant parameters when designing controllers using optimization-based methods in the SISO Design Tool. |
There are two sampling methods for computing uncertain parameter values. Both methods create several sample parameter values within the range of uncertainty, as described in the following sections:
To learn how to specify the sampling method, see the following sections:
The Random (Monte Carlo) sampling method computes random values of uncertain parameters within a specified range. When you select the Random (Monte Carlo) method, you must also specify the following settings:
Number of sample values
Nominal parameter value
Range of parameter values
When you specify more than one uncertain parameter, the sampling method creates random parameter values within a hypercube. This hypercube is defined by the minimum and maximum values of all uncertain parameters. For example, the following figure shows two uncertain parameters, a and b, which range in value from 0 to 3 and 1 to 2.5 respectively. In the figure, the sample values appear as black dots and are scattered randomly within the rectangle.

The Grid sampling method computes specified values of uncertain parameters within the range of uncertainty. When you select the Grid method, you must specify the following settings:
Nominal parameter value
Vector of sample parameter values
The sampling method uses the sample parameter values to compute the number of samples for the uncertain parameter.
When you specify more than one uncertain parameter, the sample values form a grid of combinations. For example, the following figure shows two uncertain parameters, a and b, with sample values [0 1 2 3] and [1 1.5 2 2.5]. In the figure, the sample values appear as black dots to form the grid.

To optimize parameters for model robustness using the GUI:
In the Block Parameters: Signal Constraint window, select Optimization > Uncertain Parameters.
This action opens the Uncertain Parameters dialog box.

By default, the Account for parameter uncertainty check box is selected. This implies that the optimization method takes into account the parameter uncertainty during optimization. You can exclude the parameter uncertainty during optimization by clearing this option.
Select the sampling method from the Sampling method drop-down list.
To learn more about the sampling methods, see Sampling Methods for Computing Uncertain Parameter Values.
To add an uncertain parameter:
Click Add to open the Add Parameters dialog box.
The dialog box lists all model parameters currently available in the MATLAB workspace.

Select the parameters in the Add Parameters dialog box, and then click OK.
This action adds the parameters to the Uncertain Parameters dialog box.

For each parameter in the Uncertain Parameters dialog box, you can change the nominal, minimum and maximum values.
In the Optimized responses area of the GUI, configure the sample parameter values to use during optimization by selecting:
Nominal response check box to include the nominal values of the uncertain parameters
All sample parameter values check box to include all sample values of the uncertain parameters
Min and max values only check box to include only the minimum and maximum values of the uncertain parameters
Click OK to add the uncertain parameters to the response optimization project.
When you optimize the parameters for robustness, the optimization method uses the responses computed using all the uncertain parameter values to adjust the model parameters. For an example of testing and optimizing parameters for model robustness using the GUI, see Example — Optimizing Parameters for Model Robustness Using the GUI.
You can also optimize parameters for model robustness by including parameter uncertainty at the command line. The following table summarizes the commands for model robustness. For detailed information about using each command, see the corresponding reference page.
| Command | Purpose |
|---|---|
| setunc | Specify parameter uncertainty in response optimization project |
| gridunc | Sampling method for computing a grid of uncertain parameter values |
| randunc | Sampling method for computing random samples of uncertain parameter values |
The following example shows how to optimize parameters for model robustness.
Open the Simulink model by typing the model name at the MATLAB prompt:
sldo_model1_desreq_optim
The following Simulink model opens.

The command also opens the Block Parameters: Signal Constraint window.

The Simulink model parameters have already been optimized to meet the following step response requirements:
Maximum overshoot of 10%
Maximum rise time of 10 seconds
Maximum settling time of 30 seconds
To learn how to optimize model parameters to meet design requirements, see Tutorial — Optimizing Parameters to Meet Time-Domain Requirements Using the GUI in the Simulink Design Optimization Getting Started Guide.
To specify parameter uncertainty:
In the Block Parameters window, select Optimization > Uncertain Parameters.

This action opens the Uncertain Parameters dialog box.

To learn more about the options in this dialog box, see How to Optimize Parameters for Model Robustness Using the GUI.
Click Add to open the Add Parameters dialog box.

Select w0 and zeta, and click OK.
This action adds the parameters to the Uncertain Parameters dialog box.

The Nominal column displays the nominal value of the parameters as specified in the Simulink model. The Min and Max columns specify the range in which the parameter can vary with respect to its nominal value. By default, the minimum and maximum parameter values vary by 10% of the nominal value.
Click OK to close the Uncertain Parameters dialog box.
To test the model robustness to the uncertain parameters, select Plots > Plot Current Response in the Signal Constraint block window.
The Block Parameters window updates, as shown in the following figure.

The window shows the following plot lines:
The plot line shown as the solid black curve corresponds to the model's response computed using the optimized parameters and the nominal values of the uncertain parameter.
The four plot lines shown as the dashed black curves correspond to the model's response with the minimum and maximum values of the uncertain parameters.
The dashed plot lines show that the model's response during the period of 10 to 15 seconds violates the design requirements.
To optimize the parameters for model robustness, select Optimization > Start.
This action opens the Optimization Progress window, which displays the optimization iterations.

After the optimization completes, the message Successful termination indicates that the model's response meets all the specified design requirements. The Optimization Progress window also displays the optimized parameter values.
Examine the final response in the updated Block Parameters window.
The final response of the model appears as the solid black curve. The model's response with the uncertain parameter values now meets the design requirements.

![]() | Optimizing Parameters Using the GUI | Accelerating Model Simulations During Optimization | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |