Documentation Center

  • 評価版
  • 製品アップデート

Contents

Design Optimization to Meet Custom Signal Requirements (GUI)

This example shows how to optimize a design to meet a custom signal requirement. You optimize the controller parameters to minimize the plant actuation signal energy while satisfying step response requirements.

  1. Load a saved Design Optimization tool session.

    load sldo_model1_custom_signal_session
    sdotool(SDOSessionData);

    The following Simulink® model opens.

    The Design Optimization tool, configured with the following settings, also opens:

    • Step response characteristics, specified on the output of the Plant block, that the model output must satisfy:

      • Maximum overshoot of 5%

      • Maximum rise time of 10 seconds

      • Maximum settling time of 30 seconds

    • Design variable set with the controller parameters Kp, Ki and Kd. These parameters have a minimum value of 0.

    • The variables for step requirements (PlantResponse), logged signal (PlantOutput) and design variables (DesignVars) which appear in the Design Optimization Workspace.

  2. Specify a signal to log. You apply the custom requirement on this logged signal.

    1. Select New > Signal.

      A window opens where you select a signal to log.

    2. In the Simulink model window, click the output of the Controller block.

      The window updates to display the selected signal.

    3. Select the signal and click to add it to the signal set.

    4. In Signal set, enter PlantActuator.

      Click OK. A new variable PlantActuator appears in the Design Optimization Workspace.

  3. Specify the custom requirement to apply to the signal.

    The custom requirement calls the objective function sldo_model1_minimize_energy which returns the energy in the PlantActuator signal. The signal energy is minimized. This function accepts:

    • An input argument data which is a structure with fields for the design variables in the Design Optimization Workspace. Signals are logged for the nominal and uncertain parameter values if there are any.

    • Returns the objective value to be minimized.

      Tip   To see the contents of this function, type edit sldo_model1_minimize_energy .

    1. Select New > Custom Requirement.

      A window opens where you specify the custom requirement.

    2. Specify MinimizeEnergy as the Requirement Name.

    3. Specify @sldo_model1_minimize_energy as the Requirement function.

    4. Select min as the Requirement type.

  4. In the Select Model Signals area, select the PlantActuator check box to associate the custom requirement with that signal.

    Click OK. A new variable appears in the Design Optimization Workspace. The window also updates to graphically display the custom signal requirement.

  5. Click Optimize.

    After a few iterations, the optimization converges to meet both the custom signal and step response requirements.

  6. Close the model.

    setOption(sdotool('sldo_model1'),'NoPromptClose',true)
    bdclose('sldo_model1')
Was this topic helpful?