| 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 |
| On this page… |
|---|
Specifying Design Requirements Specifying Parameters to Optimize Specifying Optimization Options Specifying the Simulation Options |
Simulink Design Optimization software works by adjusting parameters in a Simulink model so that chosen response signals within the system behave in a specified way. You choose the signals that you want to shape or constrain by attaching Signal Constraint blocks to them. The constraints on the behavior of the response signals and the tuned parameters are set within the Signal Constraint blocks.
The first step in the response optimization process is to choose which signals in your Simulink model you would like to constrain and to attach Signal Constraint blocks to these signals.
Once you have selected signals to constrain, you need to attach a Signal Constraint block to each of these signals. You can find the Signal Constraint block in the Simulink Design Optimization library in the Simulink Library Browser. Alternatively, you can open Simulink Design Optimization library by typing sdolib at the MATLAB prompt.
To attach a Signal Constraint block to a signal in your model, drag the block from the block library into the model and join the signal line to the inport of the Signal Constraint block. A model can include multiple Signal Constraint blocks, and you can attach the Signal Constraint block to any signal, including signals within subsystems of your model.
Note The Signal Constraint block is not an outport block of the system and does not interfere with a linearization of your model (as opposed to blocks in the Nonlinear Control Design Blockset, the previous name for this product, which were outport blocks). |
Double-click a Signal Constraint block to open the Signal Constraint window associated with it. Within this window you can specify the constraints imposed on the signal. For more information, see Specifying Design Requirements. You can also specify parameters to optimize and optimization settings in this block.
Although you must specify the constraints for each signal individually within each Signal Constraint block, you only need to set the remaining settings such as tuned parameters and optimization settings within one Signal Constraint window as they apply to the whole project.
Opening a Signal Constraint window, automatically creates a response optimization project. The project consists of the following information:
Constraints on all signals that have Signal Constraint blocks attached
Tuned parameters in the system and specifications for these parameters such as initial guesses and maximum and minimum values
Uncertain parameters in the system and specifications for these parameters
Optimization and simulation setup options
A response optimization project exists within a single model; there are no cross-model projects. Additionally, although you can create different sets of constraints and tuned parameters and save these as different response optimization projects, you can only associate one project with the model at any time.
The remaining steps involved in specifying the settings of a response optimization project are discussed in the following sections:
To save the project for use in a later session, see Saving and Loading Response Optimization Projects.
Design requirements include the positions of the constraint bound segments and reference signals specified in the Signal Constraint block. The constraints are used in a response optimization project to define the region in which the response signal must lie.
You can specify the desired response of a signal by enforcing signal bounds or by tracking a reference signal. To enforce signal bounds, select this option at the bottom of the Signal Constraint window, and then position time-domain-based constraint bound segments in the Signal Constraint window. To track a reference signal, select this option at the bottom of the Signal Constraint window, and then plot the signal in the Signal Constraint window. This section provides further details on both methods as well as instructions for editing the figure axes and plotting additional responses.
To specify the desired response signal using time-domain-based constraints, first select the Enforce signal bounds option at the bottom of the Signal Constraint window. Then, constrain the response signal by positioning the constraint bound segments within the figure axes using the following techniques.
When using a Signal Constraint block to directly optimize a Simulink model, by default, the start and stop time are inherited from the Simulink model. However, you can change them with the Simulation Options dialog box. Choose a stop time that captures enough of the desired response's characteristics. When you want the response to settle to a final value, use at least 10 to 20% of the simulation time for constraining the steady-state response. This ensures the proper weighting of requirements on the final value and overall stability.
Constraint-bound segments define the time-domain constraints you would like to place on a particular signal in your model. To position these segments, which appear as a yellow shaded region bordered by a black line, use the mouse to click and drag segments within the Signal Constraint window as shown in the following figure.

To move a constraint segment boundary or to change the slope of a constraint segment, position the pointer over a constraint segment endpoint, and press and hold down the left mouse button. The pointer should change to a hand symbol. While still holding the button down, drag the pointer to the target location, and release the mouse button. Note that the segments on either side of the boundary might not maintain their slopes.
To move an entire constraint segment up, down, left, or right, position the mouse pointer over the segment and press and hold down the left mouse button. The pointer should change to a four-way arrow. While still holding the button down, drag the pointer to the target location, and release the mouse button. Note that the segments on either side of the boundary might not maintain their slopes.
Tip To move a constraint segment to a perfectly horizontal or vertical position, hold down the Shift key while clicking and dragging the constraint segment. This causes the constraint segment to snap to a horizontal or vertical position. |
To use these constraints to optimize signal responses, make sure that the Enforce signal bounds check box is selected at the bottom of the window.
Note It is possible to move a lower bound constraint segment above an upper bound constraint segment, or vice versa, but this produces an error when you attempt to run the optimization. |
When moving constraint bound segments in the Signal Constraint window, it is sometimes helpful to display gridlines on the axes for careful alignment of the constraint bound segments. To turn the gridlines on or off, right-click within the axes of the Signal Constraint window and select Grid.
To position a constraint segment exactly, position the pointer over the segment you want to move and press the right mouse button. Select Edit from the menu to open the Edit Design Requirement dialog box, shown next. For information on using the Edit Design Requirement dialog box, see Edit Design Requirement Dialog Box.

To change the weight of a constraint segment, position the pointer over the segment you want to weight and click the right mouse button. Select Edit from the menu to open the Edit Design Requirement dialog box, shown next. For information on using the Edit Design Requirement dialog box, see Edit Design Requirement Dialog Box.

The Edit Design Requirement dialog box allows you to exactly position constraint segments and to edit other properties of these constraints. The dialog box has two main components:
An upper panel to specify the constraint you are editing
A lower panel to edit the constraint parameters
The upper panel of the Edit Design Requirement dialog box resembles the image in the following figure.
![]()
In the context of the SISO Tool in Control System Toolbox™ software, Design requirement refers to both the particular editor within the SISO Tool that contains the requirement and the particular requirement within that editor. To edit other constraints within the SISO Tool, select another design requirement from the drop-down menu. In the context of the Signal Constraint block, the constraints are always time-bound constraints.
Edit Design Requirement Dialog Box Parameters. The particular parameters shown within the lower panel of the Edit Design Requirement dialog box depend on the type of constraint/requirement. In some cases, the lower panel contains a grid with one row for each segment and one column for each constraint parameter. The following table summarizes the various constraint parameters.
Edit Design Requirement Dialog Box Parameters
| Parameter | Found in | Description |
|---|---|---|
| Time | Upper and lower time response bounds on step and impulse response plots | Defines the time range of a segment within a constraint/requirement. |
| Amplitude | Upper and lower time response bounds on step and impulse response plots | Defines the beginning and ending amplitude of a constraint segment. |
| Magnitude | SISO Tool Open-Loop Bode Editor, Prefilter Bode Editor | Defines the beginning and ending amplitude of a constraint segment. |
| Weight | Upper and lower time response bounds on step and impulse response plots, SISO Tool Open-Loop Bode Editor, Prefilter Bode Editor, Root Locus Editor, Open-Loop Nichols Editor | Defines the weight of a segment within a constraint/requirement. The weight is a measure of the relative importance of this constraint segment when used in a response optimization project. Weights can vary between 0 and 1, where 0 implies that the constraint segment is disabled and does not have to be satisfied, and 1 implies that the constraint segment must be satisfied. The weight of a constraint segment is graphically represented by the thickness of the black constraint line. An invisible constraint segment represents a weight of 0, and a thick constraint segment represents a weight of 1. |
| Frequency | SISO Tool Open-Loop Bode Editor, Prefilter Bode Editor | Defines the frequency range of an edge within a constraint. |
| Slope (dB/decade) | SISO Tool Open-Loop Bode Editor, Prefilter Bode Editor | Defines the slope, in dB/decade, of a constraint segment. It is an alternative method of specifying the magnitude values. Entering a new Slope value changes any previously defined magnitude values. |
| Final value | Step response bounds | Defines the input level after the step occurs. |
| Rise time | Step response bounds | Defines a constraint segment for a particular rise time. |
| % Rise | Step response bounds | The percentage of the step's range used to describe the rise time. |
| Settling time < | SISO Tool Root Locus Editor | Defines a constraint segment for a particular settling time. |
| Settling time | Step response bounds | |
| % Settling | Step response bounds | The percentage of the final value that defines the settling region used to describe the settling time. |
| Percent overshoot < | SISO Tool Root Locus Editor | Defines the constraint segments for a particular percent overshoot. |
| % Overshoot | Step response bounds | |
| % Undershoot | Step response bounds | Defines the constraint segments for a particular percent undershoot. |
| Damping ratio > | SISO Tool Root Locus Editor | Defines the constraint segments for a particular damping ratio. |
| Natural frequency | SISO Tool Root Locus Editor | Defines a constraint segment for a particular natural frequency. To specify the constraint, choose at least or at most from the menu, and then specify the natural frequency of interest. |
| Real | SISO Tool Root Locus Editor | Defines the beginning and end of the real component of a pole-zero region constraint. |
| Imaginary | SISO Tool Root Locus Editor | Defines the beginning and end of the imaginary component of a pole-zero region constraint. |
| Phase margin > | SISO Tool Open-Loop Nichols Editor | Defines a constraint segment for a minimum phase margin. The phase margin specified should be a number greater than 0. |
| Located at | SISO Tool Open-Loop Nichols Editor | Defines the center, in degrees, of the constraint segment defining the phase margin, gain margin, or closed-loop peak gain. The location must be -180 plus a multiple of 360 degrees. If you enter an invalid location point, the closest valid location is selected. |
| Gain margin > | SISO Tool Open-Loop Nichols Editor | Defines a constraint segment for a particular gain margin. |
| Closed-Loop peak gain < | SISO Tool Open-Loop Nichols Editor | Defines a constraint segment for a particular closed-loop peak gain. The specified value can be positive or negative in dB. The constraint follows the curves of the Nichols plot grid, so we recommend that you have the grid on when using this feature. |
| Open loop phase | SISO Tool Open-Loop Nichols Editor | Defines the beginning and end of the open loop phase component of a gain-phase constraint segment. |
| Open loop gain | SISO Tool Open-Loop Nichols Editor | Defines the beginning and end of the open loop gain component of a gain-phase constraint segment. |
Instead of clicking and dragging the constraints to their new positions, you can scale the constraints. To scale the constraints, select Edit > Scale Constraint in the Signal Constraint window. This displays the Scale Constraint dialog box.

Enter the amount by which you want the constraints to scale and the point about which you want to scale them, and then click OK.
To split a constraint segment, position the pointer over the segment to be split, and press the right mouse button. Select Split from the context menu. The segment splits in half. You can now manipulate each segment individually.

To join two neighboring constraint segments, position the pointer over one constraint segment, and press the right mouse button. Select Join left or Join right from the menu to join the segment to the left or right respectively.
When you are optimizing the step response of your system, an alternative method of positioning the constraint bound segments is to specify the desired step response characteristics such as rise time, settling time, and overshoot.
To specify step response characteristics, select Goals > Desired Response in the Signal Constraint window or right-click in the white space of the figure window and select Desired Response from the context menu. This displays the Desired Response dialog box. Select Specify step response characteristics to display the step response specifications as shown in the following figure.

The top three options specify the details of the step input:
Initial value: Input level before the step occurs
Step time: Time at which the step takes place
Final value: Input level after the step occurs
The remaining options specify the characteristics of the response signal. Each of the step response characteristics is illustrated in the following figure.

Rise time: The time taken for the response signal to reach a specified percentage of the step's range. The step's range is the difference between the final and initial values.
% Rise: The percentage used in the rise time.
Settling time: The time taken until the response signal settles within a specified region around the final value. This settling region is defined as the final step value plus or minus the specified percentage of the final value.
% Settling: The percentage used in the settling time.
% Overshoot: The amount by which the response signal can exceed the final value. This amount is specified as a percentage of the step's range. The step's range is the difference between the final and initial values.
% Undershoot: The amount by which the response signal can undershoot the initial value. This amount is specified as a percentage of the step's range. The step's range is the difference between the final and initial values.
Enter values for the response specifications in the Response Specifications dialog box, based on the requirements of your model, and then click OK. The constraint segments now reflect the constraints specified.
Specifying a Reference Signal. You can specify the desired response as an ideal or reference trajectory. First, select the Track reference signal option at the bottom of the Signal Constraint window. Then, plot the reference signal within the figure axes using the following techniques. You can use this reference signal in addition to, or instead of, enforcing signal bounds.
Plotting the Reference Signal. Plot a reference signal by selecting Goals > Desired Response in the Signal Constraint window or by right-clicking in the white space of the figure window and selecting Desired Response from the context menu. This displays the Desired Response dialog box. Select the radio button labeled Specify reference signal to display the reference signal setup as shown in the following figure.

Define the reference signal by entering vectors, or variables from the workspace, for the time and amplitude of the signal, and then clicking OK. To turn the reference signal on or off, right-click in the white space of the figure window and select Show > Reference Signal.
Before running the optimization, you must define which system parameters are tunable. By tuning these parameters, Simulink Design Optimization software makes the response signal meet the imposed constraints. In addition, you can define uncertain parameters to account for plant uncertainty in your response optimization project. The tunable and uncertain parameters can be scalar, vector, or matrix.
Simulink Design Optimization software optimizes the response signals of the model by varying the model's tuned parameters so that the response signals lie within the constraint bound segments or closely match a specified reference signal. You can specify these tuned parameters by selecting Optimization > Tuned Parameters in a Signal Constraint window.
Note When you have more than one Signal Constraint block in your model, you need to specify the tuned parameters in only one window as these settings apply to all constrained signals within the model. |

Within the Tuned Parameters dialog box, the tuned parameters are shown in a list on the left. To add a tuned parameter to your response optimization project, click the Add button. This action opens the Add Parameters dialog box which lists all model parameters currently available in the MATLAB workspace.

Note If a parameter is already listed in the Tuned parameters list of the Tuned Parameters window, it does not appear in the Add Parameters dialog box. |
Select the parameters that you want to tune, then click OK to add them to the Tuned parameters list. To delete a parameter from the Tuned parameters list, select the parameter you want to delete and click Delete.
To display the settings for a particular tuned parameter, select it within the Tuned Parameters list. Its settings appear on the right under Optimization Settings, as listed in the following table.
| Setting | Description | Default |
|---|---|---|
Name | The name of the parameter. | Not an editable field |
Value | The current value of the parameter. | Not an editable field |
Initial guess | The initial value used by the optimization method. A well-chosen initial guess can speed up the optimization and help keep the solution away from undesirable local minima. You can edit this field with numbers, variables, or expressions to provide an alternate initial guess. | The current value of the parameter |
Minimum | The minimum value, or lower bound, that you would like the parameter to take. You can edit this field to provide an alternate minimum value. | -Inf |
Maximum | The maximum value, or upper bound, that you would like the parameter to take. You can edit this field to provide an alternate maximum value. | Inf |
Typical value | The tuned parameters are scaled, or normalized, by dividing their current value by a typical value. You can edit this field to provide an alternate scaling factor. | The initial value of the parameter |
Tuned | This check box indicates whether this parameter is tunable. Select it if you want this parameter to be tuned during the optimization. Unselect if you do not want this parameter to be tuned during the optimization but you would like to keep it on the list of tuned parameters (for a subsequent optimization). | Selected |
Referenced by | A list of all blocks this parameter appears in. | Not an editable field |
After selecting the tuned parameters for the project and editing their optimization settings, click OK to save your changes and exit the Tuned Parameters dialog box.
Sometimes parameters in your model depend on independent parameters that do not appear in the model. The following steps give an overview of how to tune and include uncertainty in these independent parameters. example follows in the next section:
Add the independent parameters to the model workspace (along with initial values).
Define a Simulation Start function that runs before each simulation of the model. This Simulation Start function defines the relationship between the dependent parameters in the model and the independent parameters in the model workspace.
The independent parameters now appear in the Add Parameters dialog box when you select Tuned parameters or Uncertain parameters. Add these parameters to the list of tuned parameters to tune them during the response optimization.
Caution Avoid adding independent parameters together with their corresponding dependent parameters to the lists of tuned and uncertain parameters. Otherwise, the optimization could give incorrect results. For example, when a parameter x depends on the parameters a and b, avoid adding all three parameters to the lists of tuned and uncertain parameters. |
Assume that the parameter Kint in the model srotut1 is related to the parameters x and y according to the relationship Kint=x+y. Also assume that the initial values of x and y are 1 and -0.7, respectively. To tune x and y instead of Kint, first define these parameters in the model workspace. To do this,
Select Model Workspace under the srotut1 node in the tree browser within the Model Explorer window.

Select Add > MATLAB Variable within the Model Explorer to add a new variable to the model workspace. A new variable appears within the pane labeled Contents of: Model Workspace. Change the variable name to x and the initial value to 1.
Repeat step 3 to add a variable y with an initial value of -0.7. The Model Explorer window should now look like the following figure.

To add the Simulation Start function defining the relationship between Kint and the independent parameters x and y, select File > Model Properties in the srotut1 window, and then select Callbacks in the Model Properties dialog box.
Under Simulation start function, enter the name of a new M-file, for example, srotut1_start.
Create a new M-file with this name. The contents of the M-file should define the relationship between the parameters in the model and the parameters in the workspace. For this example, the M-file should look something like the following:
wks = get_param(gcs, 'ModelWorkspace')
x = wks.evalin('x')
y = wks.evalin('y')
Kint = x+y;
Note You must first use the get_param function to get the variables x and y from the model workspace before you can use them to define Kint. |
When you add a new tuned or uncertain parameter, x and y should now appear in the Add Parameters dialog box.

Several options can be set to tune the results of optimization. These options include the optimization methods and the tolerances the methods use.
To set options for optimization, select Optimization > Optimization Options in the Signal Constraint window. This opens the Options dialog box.

Note If the optimization fails, a good first work-around is to change the Gradient-type to Refined. For more information on this option, refer to Selecting Additional Optimization Options. |
Both the Method and Algorithm options define the optimization method. Use the Optimization method area of the Options dialog box to set the optimization method and its algorithm.
![]()
For the Method option, the three choices are:
Gradient descent (default) — Uses the Optimization Toolbox function fmincon to optimize the response signal subject to the constraints.
Pattern search — Uses the Genetic Algorithm and Direct Search Toolbox function patternsearch, an advanced direct search method, to optimize the response. This option requires the Genetic Algorithm and Direct Search Toolbox.
Simplex search — Uses the Optimization Toolbox function fminsearch, a direct search method, to optimize the response. Simplex search is most useful for simple problems and is sometimes faster than Gradient descent for models that contain discontinuities.
The following table summarizes the Algorithm options for Gradient descent:
| Algorithm Option | Learn More |
|---|---|
| Active-Set (default) | fmincon Active Set Algorithm in the Optimization Toolbox documentation. |
| Interior-Point | fmincon Interior Point Algorithm in the Optimization Toolbox documentation. |
| Trust-Region-Reflective | fmincon Trust Region Reflective Algorithm in the Optimization Toolbox documentation. |
Use the Optimization options panel to specify when you want the optimization to terminate.

Parameter tolerance: When using the Simplex search method, the optimization terminates when successive parameter values change by less than this number. For more details, refer to the discussion of the parameter TolX in the reference page for the Optimization Toolbox function fmincon.
Constraint tolerance: This number represents the maximum relative amount by which the constraints can be violated and still allow a successful convergence.
Function tolerance: The optimization terminates when successive function values are less than this value. Changing the default Function tolerance value is only useful when you are tracking a reference signal or using the Simplex search method. For more details, refer to the discussion of the parameter TolFun in the reference page for the Optimization Toolbox function fmincon.
Maximum iterations: The maximum number of iterations allowed. The optimization terminates when the number of iterations exceeds this number.
Look for maximally feasible solution: When selected, the optimization continues after it has found an initial solution, until it finds a maximally feasible, optimal solution. When this option is unselected, the optimization terminates as soon as it finds a solution that satisfies the constraints and the resulting response signal sometimes lies very close to the constraint segment. In contrast, a maximally feasible solution is typically located further inside the constraint region.
By varying these parameters you can force the optimization to continue searching for a solution or to continue searching for a more accurate solution.
At the bottom of the Optimization Options panel is a group of additional optimization options.

Display Level. The Display level option specifies the form of the output that appears in the Optimization Progress window. The options are Iterations, which displays information after each iteration, None, which turns off all output, Notify, which displays output only if the function does not converge, and Termination, which only displays the final output.
For more information on the type of iterative output that appears for the method you selected using the Method option, see the discussion of output for the corresponding function.
| Method | Function | Output Information |
|---|---|---|
| Gradient descent | fmincon | fmincon section of Function-Specific Output Headings in the Optimization Toolbox documentation |
| Simplex search | fminsearch | fminsearch section of Function-Specific Output Headings in the Optimization Toolbox documentation |
| Pattern search | patternsearch | Display to Command Window Options in the Genetic Algorithm and Direct Search Toolbox documentation |
Restarts. In some optimizations the Hessian may become ill conditioned and the optimization does not converge. In these cases it is sometimes useful to restart the optimization after it stops, using the endpoint of the previous optimization as the starting point for the next one. To automatically restart the optimization, indicate the number of times you want to restart in this field.
Gradient Type. When using Gradient descent as the optimization method, Simulink Design Optimization software calculates gradients based on finite difference methods. The default method for computing the gradients is Basic. The Refined method offers a more robust and less noisy gradient calculation method than Basic, although it is sometimes more expensive and does not work with certain models such as SimPowerSystems models. If the optimization fails, a good first work-around, before changing solvers or adding parameter bounds, is to change Gradient type to Refined.
To optimize the response signals of a model, Simulink Design Optimization software runs simulations of the model.
You can set options for these simulations by selecting Optimization > Simulation Options in the Signal Constraint window. This opens the Options dialog box.


By default, the Start time and Stop time are automatically set to the model's start and stop times. To specify alternative start and stop times for the response optimization project, enter them under Simulation time.
Note Simulink Design Optimization software automatically replaces the stop-time value in Stop time with the largest time value in the constraints. This prevents the software from entering an infinite loop. |
When running the simulation, Simulink software solves the dynamic system using one of several solvers. You can specify several solver options under Solver options in the Options dialog box.

The type of solver can be variable-step or fixed step. Variable step solvers keep the error within specified tolerances by adjusting the step size the solver uses. Fixed-step solvers use a constant step-size. When your model's state's are likely to vary rapidly, a variable-step solver is often faster.
Variable-Step Solvers. When you select Variable-step as the solver Type, you can choose any of the following as the Solver:
Discrete (no continuous states)
ode45 (Dormand-Prince)
ode23 (Bogacki-Shampine)
ode113 (Adams)
ode15s (stiff/NDF)
ode23s (stiff/Mod. Rosenbrock)
ode23t (Mod. stiff/Trapezoidal)
ode23tb (stiff/TR-BDF2)
See the Simulink documentation for information on these solvers.
Variable-Step Solver Options. When you select Variable-step as the Simulink solver Type, you can also set several other parameters that affect the step size of the simulation:
Maximum step size: The largest step size solver can use during a simulation
Minimum step size: The smallest step size solver can use during a simulation
Initial step size: The step size solver uses to begin the simulation
Relative tolerance: The largest allowable relative error at any step in the simulation
Absolute tolerance: The largest allowable absolute error at any step in the simulation
Zero crossing control: Set to on for the solver to compute exactly where the signal crosses the x-axis. This is useful when using functions that are nonsmooth and the output depends on when a signal crosses the x-axis, such as absolute values.
By default, the values for these options are automatically chosen. To choose your own values, enter them in the appropriate fields. For more information on these options, and the circumstances in which to use them, see the Simulink documentation.
Fixed-Step Solvers. When you select Fixed-step as the solver Type, you can choose any of the following as the Solver:
Discrete (no continuous states)
ode5 (Dormand-Prince)
ode4 (Runge-Kutta)
ode3 (Bogacki-Shanpine)
ode2 (Heun)
ode1 (Euler)
See the Simulink documentation for information on these solvers.
When you select Fixed-step as the solver Type, you can also set Fixed step size, which determines the step size the solver uses during the simulation. By default, Simulink automatically chooses a value for this option.

You can choose to plot several different signals in the Signal Constraint window, including reference signals, initial response signals, and response signals generated during the optimization.
To plot a reference signal, use the methods in Plotting the Reference Signal.
To display the current response signal, based on the current parameter values, right-click within the white space of the Signal Constraint window and select Plot Current Response. The current response appears as a thick white line.
To turn the display of the initial response signal on or off, right-click within the white space of the Signal Constraint window and select Show > Initial Response. The initial response is the response of the signal based on parameter values in place before the optimization is run. The initial response appears as a blue line.
To turn on, or off, the display of the response signal at intermediate steps during the optimization, right-click within the white space of the Signal Constraint window and select Show > Intermediate Steps. The response signal at an intermediate step is based on parameter values at an intermediate point in the optimization.
Modifying Properties of Response Plots. This section discusses how you can change the properties of response plots. Select Edit > Axes Properties in the Block Parameters: Signal Constraint window and select Labels to open the Property Editor dialog box.
This figure shows the Property Editor dialog box for a step response.

In general, you can change the following properties of response plots.
Labels -- Titles and X- and Y-labels
Limits -- Numerical ranges of the x- and y- axes
As you make changes in the Property Editor, they display immediately in the response plot. Conversely, if you make changes in a plot using right-click menus, the Property Editor for that plot automatically updates. The Property Editor and its associated plot are dynamically linked.

To specify new text for plot titles and axis labels, type the new string in the field next to the label you want to change. The label changes immediately as you type, so you can see how the new text looks as you are typing.

Default values for the axes limits make sure that the maximum and minimum x and y values are displayed. If you want to override the default settings, change the values in the Limits pane fields. The Auto-Scale check box automatically clears if you click a different field. The new limits appear immediately in the response plot.
To reestablish the default values, select the Auto-Scale check box again.
After you have specified constraints and the parameters to optimize, as described in Specifying Design Requirements and Specifying Parameters to Optimize respectively, you can run the optimization.
Run the optimization by selecting Optimization > Start in the Signal Constraint window, or click the Start button, which is the small triangle located on the control panel below the menus.
Simulink Design Optimization software uses optimization methods to find parameter values that allow a feasible solution, or best fit in the case of reference tracking, to the given constraints. Once the appropriate signals have been constrained with signal bounds or by tracking a reference signal, the tuned parameters set, and (optionally) any uncertain parameters and optimization settings specified, you are ready to run the optimization.
Simulink Design Optimization software begins by plotting the initial response in blue in the Signal Constraint window. During the optimization, intermediate responses are also plotted in various colors. The final response is plotted in black. If uncertainty is included in the optimization, the uncertain response signals are plotted as dashed lines, along with the nominal response as a solid line.

Simulink Design Optimization software changes the values of the tuned parameters within the MATLAB workspace and displays the final value in the Optimization Progress window. Alternatively, you can enter a parameter name at the MATLAB prompt to see its final value.
The Optimization Progress window displays numerical output. The form of this output depends on the optimization method being used. To learn more, see Selecting Optimization Methods and the discussion of Display level in Selecting Additional Optimization Options.

Note The Gradient descent optimization method may violate the bounds on parameter values when it cannot satisfy the signal constraints specified in the Signal Constraint block and the bounds on parameter values simultaneously. To learn how to troubleshoot this problem, see Troubleshooting Optimization Results. |
If the optimization does not converge the first time, it often converges after adjusting the constraints or tuned parameter characteristics, or choosing different options. For more information, see Troubleshooting Optimization Results.
![]() | Overview of Optimizing Model Parameters | Optimizing Parameters for Model Robustness | ![]() |

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 |