Main Content

Specify Frequency-Domain Requirements

This topic shows how to specify frequency-domain requirements in the Sensitivity Analyzer. To specify frequency-domain requirements, you require the Simulink® Control Design™ toolbox.

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 Sensitivity Analyzer, in the New Requirement drop-down list, select Gain and Phase Margin. A Create Requirement dialog box opens where you specify upper or lower bounds on the gain and phase margin. A new requirement with the name specified in Name appears in the Requirements area of the app.

    Crreate Requirement dialog box

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

    Bode plot showing gain and phase margins

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

  3. 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 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).

  4. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  5. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 Sensitivity Analyzer, in the New Requirement drop-down list, select Bode Magnitude. A Create Requirement dialog box opens where you specify the lower or upper bounds on the magnitude of the system response. A new requirement with the name specified in Name appears in the Requirements area of the app.

  2. Specify the requirement type in the Type drop-down list.

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

  4. Insert or delete bound edges.

    Click the add button to specify additional bound edges.

    To delete a bound edge, select a row, and click the delete button.

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

  6. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  7. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

Alternatively, you can use the Bode Plot, 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 Sensitivity Analyzer, in the New Requirement drop-down list, select Closed-Loop Peak Gain. A Create Requirement dialog box opens where you specify an upper bound on the closed-loop peak gain of the system. A new requirement with the name specified in Name appears in the Requirements area of the app.

  2. Specify the upper bound in Closed-Loop peak gain.

  3. 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 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).

  4. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  5. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 poles of a system:

  1. In the Sensitivity Analyzer, in the New Requirement drop-down list, select Damping Ratio. A Create Requirement dialog box opens where you specify a lower bound on the damping ratio of the system. A new requirement with the name specified in Name appears in the Requirements area of the app.

  2. Specify the lower bound on the damping ratio in Damping ratio.

  3. 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 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).

  4. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  5. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 poles of a system:

  1. In the Sensitivity Analyzer, in the New Requirement drop-down list, select Natural Frequency. A Create Requirement dialog box opens where you specify a bound on the natural frequency of the system. A new requirement with the name specified in Name appears in the Requirements area of the app.

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

  3. 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 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).

  4. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  5. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 a system:

  1. In the Sensitivity Analyzer, in the New Requirement drop-down list, select Settling Time. A Create Requirement dialog box opens where you specify an upper bound on the approximate settling time of the system. A new requirement with the name specified in Name appears in the Requirements area of the app.

  2. Specify the upper bound on the approximate settling time in Settling time.

  3. 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 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).

  4. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  5. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 Sensitivity Analyzer, in the New Requirement drop-down list, select Singular Values. A Create Requirement dialog box opens where you specify the lower or upper bounds on the singular values of the system. A new requirement with the name specified in Name appears in the Requirements area of the app.

  2. Specify the requirement type using the Type drop-down list.

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

  4. Insert or delete bound edges.

    Click the add buttonto specify additional bound edges.

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

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

  6. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  7. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 Sensitivity Analyzer.

    In the New Requirement drop-down list 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 on a signal. A new requirement with the name specified in Name appears in the Requirements area of the app.

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

  3. 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 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).

  4. Close the Create Requirement dialog box.

    The requirement in the Requirements area of the app is updated with the specified characteristics.

  5. (Optional) Plot the requirement.

    1. In the Sensitivity Analysis tab of the app, in the Requirements area, select the requirement.

    2. In the Plots tab of the app, select the plot type to generate a graphical display of the requirement.

    The plot is populated when you perform evaluation. A positive value indicates that the requirement has been violated.

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 Sensitivity Analyzer, in the New Requirement drop-down list, select Custom Requirement.

    A Create Requirement dialog box opens where you specify the reference signal to track. A new requirement with the name specified in Name appears in the Requirements area of the app.

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

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

  4. (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 combination of parameters in the parameter set.

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

    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.

  5. (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. Select the signal and click the right arrow button to add it to the signal set.

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

        Click OK. A new variable, with the specified name, appears in the Create Requirement dialog box.

    • 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).

  6. Select the check-box corresponding to the signal or system, and close the Create Requirement dialog box.

    The requirement created in the Requirements area of the app is updated with the specified characteristics.

You can now evaluate the requirement. For more information, see Evaluate Design Requirements. When you perform evaluation, a positive requirement value indicates that the requirement has been violated.

Related Topics