Main Content

Specify Time-Domain Design Requirements in the App

In the Response Optimizer, you can specify the following time-domain requirements:

After you specify the constraints, you can see if the requirements are satisfied by optimizing the design variables. For more information, see Specify Optimization Options.

Specify Piecewise-Linear Lower and Upper Bounds

To specify upper and lower bounds on a signal:

  1. In the Response Optimizer , select Signal Bound in the New drop-down list. A window opens where you specify upper or lower bounds on a signal.

  2. Specify a requirement name in the Name box.

  3. Select the requirement type using the Type list.

  4. Specify the edge start and end times and corresponding amplitude in the Time (s) and Amplitude columns.

  5. Click the Add button to specify additional bound edges.

    Select a row and click the Delete button to delete a bound edge.

  6. In the Select Signals to Bound area, select a logged signal to apply the requirement to.

    If you have already selected signals, as described in Specify Signals to Log, they appear in the list. Select the corresponding check-box.

    If you have not selected a signal to log:

    1. Click the Add button. A Create Signal Set dialog box opens where you specify the logged signal.

    2. In the Simulink® model window, click the Simulink signal or Simscape™ block to which you want to add a requirement.

      The Create Signal Set dialog box updates and displays the name of the block and the port number where the selected signal is located.

    3. In Signal set field, enter a name for the selected signal set.

      Click OK. A new variable, with the specified name, appears in the Data area of the Response Optimizer.

  7. Click OK.

    A variable with the specified requirement name appears in the Data area of the app. A graphical display of the requirement also appears in the Response Optimizer app window.

  8. (Optional) In the graphical display, you can:

Alternatively, you can add a Check Custom Bounds block to your model to specify piecewise-linear bounds.

Specify Signal Property Requirements

To specify signal property requirements:

  1. In the Response Optimizer, select Signal Property in the New drop-down list. A Create Requirement window opens where you specify signal property requirements.

  2. In the Name box, specify a requirement name.

  3. In the Specify Property area, specify a signal property requirement using the Property and Type lists and the Bound box.

     Property List

     Custom Signal Property

  4. In the Select Signals to Bound area, select the logged signal to which you want to apply the requirement.

    The signal selected must have numeric type data (either floating-point or integer). Also, if the property selected is Signal median, Signal variance, or Signal interquartile range, then the signal data must be floating-point (either double or single).

    If you have already selected a signal, as described in Specify Signals to Log, the signal appears in the list. Select the corresponding check box for that signal.

    If you have not selected a signal to log:

    1. Click the Add button. A Create Signal Set dialog box opens where you specify the logged signal.

    2. In the Simulink model window, click the Simulink signal or Simscape block to which you want to add a requirement.

      The Create Signal Set dialog box updates and displays the name of the block and the port number where the selected signal is located.

    3. In Signal set field, enter a name for the selected signal set.

      Click OK. A new variable, with the specified name, appears in the Data area of the Response Optimizer.

  5. Click OK.

    A variable with the specified requirement name appears in the Data area of the app. An iteration plot depicting the signal property for each iteration also appears in the Response Optimizer app window.

Specify Step Response Characteristics

To apply a step response requirement to a signal in your model, specify the step response characteristics as follows:

  1. Select a step response requirement from the Response Optimizer.

    In the New drop-down menu of the app, in the New Time Domain Requirement section, select Step Response Envelope.

    A Create Requirement dialog box opens where you specify the step response requirements on a signal.

  2. Specify a requirement name in the Name field of the dialog box.

  3. Specify the step response characteristics:

    Amplitude vs time plot showing the step response characteristics

    • 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

    • Rise time — The time taken for the response signal to reach a specified percentage of the step range. The step range is the difference between the final and initial values.

    • % Rise — The percentage of the step range used with Rise time to define the overall rise time characteristics.

    • Settling time — 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 settling range, defined in % Settling.

    • % Settling — The percentage of the step range value that defines the settling range of settling time characteristic specified in 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 range. The step 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 range. The step range is the difference between the final and initial values.

  4. Specify the signal to be bound.

    To apply this requirement to a model signal, in the Select Signals to Bound area, select a logged signal to which you will apply the requirement.

    If you have already selected a signal to log, as described in Specify Signals to Log, it appears in the list. Select the corresponding check-box.

    If you have not selected a signal to log:

    1. Click the Add button. The Create Signal Set dialog box opens where you specify the logged signal.

    2. In the Simulink model window, click the Simulink signal or Simscape block to which you want to add a requirement.

      The Create Signal Set dialog box updates and displays the name of the block and the port number where the selected signal is located.

    3. In Signal set field, enter a name for the selected signal set.

      Click OK. A new variable, with the specified name, appears in the Data area of the Response Optimizer.

Alternatively, you can use the Check Step Response Characteristics block to specify step response bounds for a signal.

 See Also

Track Reference Signals

Use reference tracking to force a model signal to match a desired signal. To track a reference signal:

  1. In the Response Optimizer, select Signal Tracking in the New drop-down list. A window opens where you specify the reference signal to track.

  2. Specify a requirement name in the Name box.

  3. Define the reference signal by entering vectors, or variables from the workspace, in the Time vector and Amplitude fields.

    Click Update reference signal data to use the new amplitude and time vector as the reference signal.

  4. Specify how the optimization solver minimizes the error between the reference and model signals using the Tracking Method list:

    • SSE — Reduces the sum of squared errors

    • SAE — Reduces the sum of absolute errors

  5. In the Specify Signal to Track Reference Signal area, select a logged signal to apply the requirement to.

    If you already selected a signal to log, as described in Specify Signals to Log, they appear in the list. Select the corresponding check-box.

    If you have not selected a signal to log:

    1. Click the Add button. A Create Signal Set dialog box opens where you specify the logged signal.

    2. In the Simulink model window, click the Simulink signal or Simscape block to which you want to add a requirement.

      The Create Signal Set dialog box updates and displays the name of the block and the port number where the selected signal is located.

    3. In Signal set field, enter a name for the selected signal set.

      Click OK. A new variable, with the specified name, appears in the Data area of the Response Optimizer.

    4. Select the check-box corresponding to the signal and click OK.

    A variable with the specified requirement name appears in the Data area of the app. A graphical display of the signal bound also appears in the Response Optimizer app window.

Note

When tracking a reference signal, the software ignores the maximally feasible solution option. For more information on this option, in the Response Optimization tab, click Options > Optimization Options, and click Help.

Alternatively, you can use the Check Against Reference block to specify a reference signal to track.

 See Also

Impose Elliptic Bound on Phase Plane Trajectory of Two Signals

You can impose an elliptic bound on the phase plane trajectory of two signals in your Simulink model. The phase plane trajectory is a plot of the two signals against each other. You specify the radii, center, and rotation of the bounding ellipse. You also specify whether you require the trajectory of the two signals to lie inside or outside the ellipse.

The following image shows the bounding ellipse and an example of the phase plane trajectory of two signals.

Bounding Ellipse and Phase Plane trajectory

The X-Y plane is the phase plane defined by the two signals. rx and ry are the radii of the bounding ellipse along the x and y axes, and θR is the rotation of the ellipse about the center. The ellipse center is at (x0,y0). In the image, the phase plane trajectory of the signals lies within the bounding ellipse for all time points t1 to tn.

To specify the elliptical bound requirement:

  1. In the Response Optimizer, in New drop-down list, select Ellipse Region Constraint.

    New option in the Response Optimization toolstrip

    In the Create Requirement dialog box, specify the requirement.

    Create Requirement dialog box

  2. Specify a requirement name in Name.

  1. Specify the two signals that you want to impose the requirement on. The signals define the X-Y plane of the bounding ellipse. To specify the signals, click the corresponding Select buttons.

    Specify ellipse bound section where you select the two signals

    When you click Select, the Create Signal Set dialog box opens.

    In the Simulink model window, click the Simulink signal or Simscape block to which you want to add the requirement. The Create Signal Set dialog box updates with the name of the block and the port number where the selected signal is located.

    Once you have specified the logged signal in the Create Signal Set dialog box, the signal appears in the Create Requirement dialog box.

  2. Specify the radii of the bounding ellipse as real positive finite values in Semi-axis length. You specify rx and ry that are the x-axis and y-axis radii before any rotation about the ellipse center.

  3. Specify the location of the center of the bounding ellipse in Center. You specify x0 and y0, the x and y coordinates of the center, as real finite values.

  4. Specify the angle of rotation of the ellipse about its center as a real finite scalar in Angle (rad).

  5. Specify the bound Type as one of the following:

    • '<=' — Ellipse is an upper bound. The phase plane trajectory of the two signals should lie inside or on the ellipse.

    • '>=' — Ellipse is a lower bound. The phase plane trajectory of the two signals should lie outside or on the ellipse.

  1. (Optional) To create an iteration plot that shows the evaluated requirement value for each optimization iteration, select Create Plot. The plot is populated when you perform optimization. During optimization, the software computes the signed minimum distance of each point in the phase plane trajectory to the bounding ellipse. The maximum of these signed distances is returned and plotted at each iteration. A positive value indicates that the requirement has been violated and at least one of the trajectory points lies outside the bounding region.

  2. Click OK.

    A new variable, with the specified requirement name, appears in the Data area of the Response Optimizer. A graphical display of the requirement also appears in the Response Optimizer app window.

Specify Custom Requirements

You can specify custom requirements, such as minimizing system energy. To specify custom requirements:

  1. In the Response Optimizer, in New drop-down menu, select Custom Requirement. The Create Requirement dialog box opens where you specify the custom requirement.

  2. Specify a requirement name in Name.

  3. Specify the requirement type in the Type drop-down menu.

  4. Specify the name of the function that contains the custom requirement in Function. The field must be specified as a function handle using @. The function must be on the MATLAB path. Click the open folder button to review or edit the function.

    If the function does not exist, clicking the open folder button opens a template MATLAB file. Use this file to implement the custom requirement. The default function name is myCustomRequirement.

  5. (Optional) To prevent the solver from considering specific parameter combinations, select Error if constraint is violated. Use this option for parameter-only constraints.

    During an optimization iteration, the solver first evaluates requirements with this option selected.

    • If the constraint is violated, the solver skips evaluating any remaining requirements and proceeds to the next iteration.

    • If the constraint is not violated, the solver evaluates the remaining requirements for the current iteration. If any of the remaining requirements bound signals or systems, then the solver simulates the model.

    For more information, see Skip Model Simulation Based on Parameter Constraint Violation (GUI).

    Note

    If you select this check box, then do not specify signals or systems to bound. If you do specify signals or systems, then this check box is ignored.

  6. (Optional) Specify the signal or system, or both, to be bound.

    You can apply this requirement to model signals, or a linearization of your Simulink model (requires Simulink Control Design™ ), or both.

    Click Select Signals and Systems to Bound (Optional) to view the signal and linearization I/O selection area.

    • To apply this requirement to a model signal:

      In the Signal area, select a logged signal to which you will apply the requirement.

      If you have already selected a signal to log, as described in Specify Signals to Log, it appears in the list. Select the corresponding check box.

      If you have not selected a signal to log:

      1. Click the Add button. A Create Signal Set dialog box opens where you specify the logged signal.

      2. In the Simulink model window, click the Simulink signal or Simscape block to which you want to add a requirement.

        The Create Signal Set dialog box updates and displays the name of the block and the port number where the selected signal is located.

      3. In Signal set field, enter a name for the selected signal set.

        Click OK. A new variable, with the specified name, appears in the Data area of the Response Optimizer.

    • To apply this requirement to a linear system:

      1. Specify the simulation time at which the model is linearized in Snapshot Times. For multiple simulation snapshot times, specify a vector.

      2. Select the linearization input/output set from the Linearization I/O area.

        If you have already created a linearization input/output set, it appears in the list. Select the corresponding check box.

        If you have not created a linearization input/output set, click the Add button to open the Create linearization I/O set dialog box. For more information on using this dialog box, see Create Linearization I/O Sets.

      For more information on linearization, see What Is Linearization? (Simulink Control Design).

  7. Click OK.

    A new variable, with the specified name, appears in the Data area of the Response Optimizer. A graphical display of the requirement also appears in the Response Optimizer app window.

 See Also

Edit Design Requirements

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.

Design requirement drop-down

In the Control System Designer (Control System Toolbox) app in Control System Toolbox™, you can edit design requirements from the analysis plots. The Design requirement drop-down list will contain all the requirements on that plot.

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

ParameterFound inDescription
TimeUpper and lower time response bounds on step and impulse response plotsDefines the time range of a segment within a constraint/requirement.
AmplitudeUpper and lower time response bounds on step and impulse response plotsDefines the beginning and ending amplitude of a constraint segment.
Slope (1/s)Upper and lower time response boundsDefines the slope, in 1/s, 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 valueStep response boundsDefines the input level after the step occurs.
Rise timeStep response boundsDefines a constraint segment for a particular rise time.
% RiseStep response boundsThe percentage of the step range used to describe the rise time.
Settling timeStep response boundsDefines a constraint segment for a particular settling time.
% SettlingStep response boundsThe percentage of the step range that defines the settling region used to describe the settling time.
% OvershootStep response boundsThe percentage amount by which the signal can exceed the final value before settling.
% UndershootStep response boundsDefines the constraint segments for a particular percent undershoot.

Related Topics