Design Optimization Using Frequency-Domain Check Blocks (GUI)

This example shows how to optimize a design to meet frequency-domain requirements using the Design Optimization tool. 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 Check Bode Characteristics block and optimize a rectifier filter parameters to meet gain and bandwidth requirements, and minimize a custom objective.

Model Structure

The model sdorectifier includes the following blocks:

  • Full-Wave Rectifier block — An Abs block

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

  • Filter Design Requirements blockCheck Bode Characteristics block that specifies the gain and bandwidth design requirements

Design Requirements

The design optimization problem is multi-objective. The design must:

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

  • Limit the gain across the frequency range 2Hz—60Hz to at most 0db

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

  • 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. Open the Design Optimization tool for the model.


    The plot shows the gain and bandwidth requirements specified in the Filter Design Requirements block. See their values in the Bounds tab of the Block Parameters dialog box.

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

    The custom objective is specified 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 to view this function.

    1. Select Custom Requirement in the New drop-down list.

      A window opens where you specify the custom requirement.

    2. Specify the following:

      • Enter MaxMinRL in Requirement Name

      • Enter @sdorectifier_cost in Requirement function. The optimization solver calls the specified function handle.

      • Select min in Requirement type

      Click OK. A new variable MaxMinRL appears in Design Optimization Workspace of the Design Optimization tool.

Specify Design Variables

Before you begin this task, specify the design requirements as described in Specify Design Requirements.

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

  1. Select New in the Design Variables Set drop-down list.

    A window opens where you specify design variables.

  2. Click R, L and C to select them.

  3. Click to add the selected parameters to a design variables set.

  4. Specify the value range for each design variable:

    • R in the range 1–50 ohms

    • L in the range 1–500mH

    • C in the range 1µF–1mF

    • Because the variables are different orders of magnitude, specify scaling factors in the corresponding Scale column of the variables:

      • R by 25

      • L by 0.05

      • C by 0.0005

      Click OK. A new variable DesignVars appears in Design Optimization Workspace of the Design Optimization tool.

Optimize Design

Before you begin this task, you must have already specified the design requirements and design variables, as described in Specify Design Requirements and Specify Design Variables, respectively.

  1. (Optional) View the current response of the model. Click .

    The plot shows that the model does not meet the specified gain and bandwidth requirements.

    You also see that the filter voltage signal overshoots its steady-state value and contains significant harmonic content in the Voltage scope window.

  2. Click Optimize.

    An optimization progress window opens.

    After the optimization completes, the optimization progress window resembles the next figure. After a few iterations, the optimization converges to satisfy the filter bandwidth requirements.

    The filter voltage signal in the Voltage scope window also settles to within its steady-state value in around 0.08 seconds without any overshoot and the harmonic content is significantly reduced from the initial design.

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

    The plot displays the last five iterations. The final response using the optimized parameter values appears as the thick 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 Design Optimization Workspace and view the updated values in the Variable Preview area.

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

Was this topic helpful?