Main Content

Design Optimization Using Frequency-Domain Check Blocks (GUI)

This example shows how to optimize model parameters to meet frequency-domain requirements using the Response Optimizer. Simulink® Control Design™ software must be installed to optimize a design to meet frequency-domain design requirements.

In this example, you specify the design requirements in a Bode Plot, Check Bode Characteristics (Simulink Control Design) block. You optimize rectifier filter parameters to meet gain and bandwidth requirements by minimizing a custom objective.

Full Wave Rectifier Model

Open the model.

open_system('sdorectifier.slx')

Model Structure

The model sdorectifier includes the following blocks:

sdorectifier model with full-wave rectifier block and rectifier filter subsystem connected between source block and a scope block

  • Full-Wave Rectifier block — An Abs block

  • Rectifier Filter subsystem — RLC filter implemented using integrator and gain blocks

  • Filter Design Requirements block — Bode Plot, Check Bode Characteristics (Simulink Control Design) block that specifies the gain and bandwidth design requirements

Design Requirements

The design optimization problem has several objectives. The design must:

  • Have a –3 dB bandwidth of at least 2 Hz

  • Limit the gain across the frequency range 2 Hz – 60 Hz to at most 0 dB

  • Limit the gain above 60 Hz to at most –20 dB

  • Maximize the filter resistance R

  • Minimize the filter inductance L

The requirements ensure that the rectifier filter combination has minimal high frequency content, responds quickly to voltage changes, and limits filter currents.

Specify Design Requirements

  1. To open the app, in the Apps gallery, click Response Optimizer.

    Bode Plot

    The Bode plot 1 tab shows the gain and bandwidth requirements specified in the Filter Design Requirements block in the model. To see their values, double-click the block to open the Block Parameters dialog box, and select the Bounds tab.

  2. Specify a custom objective to minimize the filter inductance and maximize the resistance.

    The custom objective is already defined in the sdorectifier_cost function. The function accepts the design variables R and L and returns the objective to be minimized.

    Tip

    Type edit sdorectifier_cost in the command line to view this function.

    1. In the New drop-down list, select Custom Requirement.

      Custom Requirement is highlighted in the drop-down list for New

    2. Specify the following values in the Create Requirement window, and click OK:

      • In the Name edit box, enter MaxMinRL.

      • In the Type edit box, select Minimize the function output

      • In the Function edit box, enter @sdorectifier_cost. The optimization solver calls the specified function handle.

      Create Requirement dialog box with the specified values entered

      A new requirement variable MaxMinRL is created, and appears in the Data area in the Response Optimizer. The Iteration plot 1 tab shows the value of MaxMinRL at each iteration during the optimization.

Specify Design Variables

When you optimize the model response, the software modifies the design variable values to meet the design requirements.

  1. In the Design Variables Set drop-down list, select New.

    Drop-down list for design variables set

    Select C, L, and R in the Create Design Variable Set window. Click the left arrow with C button to add the selected parameters to a design variables set.

    Create Design Variables Set dialog box with the parameters C, L, and R

  2. Specify the value range for each design variable, and click OK:

    • C in the range 1 µF–1 mF

    • L in the range 1–500 mH

    • R in the range 0.01–50 ohms

      Create Design Variables Set dialog box with the specified ranges for the design variables

    A new variable DesignVars is created, and appears in the Data area of the Response Optimizer.

Optimize Design

  1. To view the current response of the model, click Plot Model Response.

    Bode plot

    The Bode plot 1 window in the Response Optimizer shows that the model output goes out of the region bounded by the design requirement line segments.

    In the Voltage scope window, you see that the filter voltage signal overshoots its steady-state value and contains significant harmonic content.

    Voltage scope window

  2. Click Optimize.

    The Optimization converged message in the Optimization Progress Report indicates that the optimization method found a solution to satisfy the filter bandwidth requirements.

    Optimization progress report

    The harmonic content in the filter voltage signal is reduced from the initial design.

    Voltage scope window

  3. Verify that the model meets the gain and bandwidth requirements.

    Bode plot

    The plot displays the output of the last five iterations. The final response using the optimized parameter values appears as the thick blue line.

    The optimized response lies in the white region bounded by the design requirement line segments and thus meets the requirements.

  4. Click DesignVars in the Data area and view the updated values in the Variable Preview area.

    The optimized values of the design variables are automatically updated in the Simulink model.

See Also

(Simulink Control Design)

Related Topics