Main Content

Specify Frequency-Domain Design Requirements in the App

Specify Lower Bounds on Gain and Phase Margin

To specify lower bounds on the gain and phase margin of a linear system:

  1. In the Response Optimizer, select Gain and Phase Margin in the New list. A window opens where you specify lower bounds on the gain and phase margin of your linear system.

  2. Specify a requirement name in Name.

  3. Specify bounds on the gain margin or phase margin, or both.

    • Gain margin — Amount of gain increase or decrease required to make the loop gain unity at the frequency where the phase angle is –180°.

    • Phase margin — Amount of phase increase or decrease required to make the phase angle –180° when the loop gain is 1.0

    To specify a lower bound on the gain margin or phase margin, or both, select the corresponding check box and enter the lower bound value.

  4. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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).

  5. 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.

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

Alternatively, you can use the Check Gain and Phase Margins (Simulink Control Design) block to specify bounds on the gain and phase margin. (Requires Simulink® Control Design™.)

Specify Piecewise-Linear Lower and Upper Bounds on Frequency Response

To specify upper or lower bounds on the magnitude of a system response:

  1. In the Response Optimizer, select Bode Magnitude in the New list. A window opens where you specify the lower or upper bounds on the magnitude of the system response.

  2. Specify a requirement name in the Name box.

  3. Specify the requirement type using the Type list.

  4. Specify the edge start and end frequencies and corresponding magnitude in the Frequency and Magnitude columns.

  5. Insert or delete bound edges.

    Click to specify additional bound edges.

    Select a row and click to delete a bound edge.

  6. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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 app window. 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 use the Check Bode Characteristics (Simulink Control Design) block to specify bounds on the magnitude of the system response. (Requires Simulink Control Design.)

Specify Bound on Closed-Loop Peak Gain

To specify an upper bound on the closed-loop peak response of a system:

  1. In the Response Optimizer, select Closed-Loop Peak Gain in the New list. A window opens where you specify an upper bound on the closed-loop peak gain of the system.

  2. Specify a requirement name in the Name box.

  3. Specify the upper bound on the closed-loop peak gain in the Closed-Loop peak gain box.

  4. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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).

  5. Click OK.

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

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

Alternatively, you can use the Check Nichols Characteristics (Simulink Control Design) block to specify bounds on the magnitude of the system response. (Requires Simulink Control Design.)

Specify Lower Bound on Damping Ratio

To specify a lower bound on the damping ratio of the system:

  1. In the Response Optimizer, select Damping Ratio in the New list. A window opens where you specify a lower bound on the damping ratio of the system.

  2. Specify a requirement name in the Name box.

  3. Specify the lower bound on the damping ratio in the Damping ratio box.

  4. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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).

  5. Click OK.

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

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

Alternatively, you can use the Check Pole-Zero Characteristics (Simulink Control Design) block to specify a bound on the damping ratio. (Requires Simulink Control Design.)

Specify Upper and Lower Bounds on Natural Frequency

To specify a bound on the natural frequency of the system:

  1. In the Response Optimizer, select Natural Frequency in the New list. A window opens where you specify a bound on the natural frequency of the system.

  2. Specify a requirement name in the Name box.

  3. Specify a lower or upper bound on the natural frequency in the Natural frequency box.

  4. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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).

  5. Click OK.

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

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

Alternatively, you can use the Check Pole-Zero Characteristics (Simulink Control Design) block to specify a bound on the natural frequency. (Requires Simulink Control Design.)

Specify Upper Bound on Approximate Settling Time

To specify an upper bound on the approximate settling time of the system:

  1. In the Response Optimizer, select Settling Time in the New list. A window opens where you specify an upper bound on the approximate settling time of the system.

  2. Specify a requirement name in the Name box.

  3. Specify the upper bound on the approximate settling time in the Settling time box.

  4. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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).

  5. Click OK.

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

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

Alternatively, you can use the Check Pole-Zero Characteristics (Simulink Control Design) block to specify the approximate settling time. (Requires Simulink Control Design.)

Specify Piecewise-Linear Upper and Lower Bounds on Singular Values

To specify piecewise-linear upper and lower bounds on the singular values of a system:

  1. In the Response Optimizer, select Singular Values in the New list. A window opens where you specify the lower or upper bounds on the singular values of the system.

  2. Specify a requirement name in the Name box.

  3. Specify the requirement type using the Type list.

  4. Specify the edge start and end frequencies and corresponding magnitude in the Frequency and Magnitude columns, respectively.

  5. Insert or delete bound edges.

    Click to specify additional bound edges.

    Select a row and click to delete a bound edge.

  6. In the Select Systems to Bound section, select the linear systems to which this requirement applies.

    Linear systems are defined by snapshot times at which the model is linearized and sets of linearization I/O points defining the system inputs and outputs.

    1. Specify the simulation time at which the model is linearized using the Snapshot Times box. 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 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 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 use the Check Singular Value Characteristics (Simulink Control Design) block to specify bounds on the singular value. (Requires Simulink Control Design).

Specify Step Response Characteristics

To apply a step response requirement to a linearization of your model (requires Simulink Control Design), 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 Frequency Domain Requirement section, select Step Response Envelope.

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

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

  3. Specify 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 systems to be bound.

    To apply this requirement to a linearization of your Simulink model:

    1. In the Select Systems to Bound area, 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 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).

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

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 to review or edit the function.

    If the function does not exist, clicking 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 . A Create Signal Set dialog box opens where you specify the logged signal.

      2. In the Simulink model window, click the signal 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 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

Related Topics