Simulink Control Design™ - MathWorks

(Tuis.) #1

Compute Operating Points Using Custom Constraints


and Objective Functions


Typically, when computing a steady-state operating point for a Simulink® model using an
optimization-based search, you specify known fixed values or bounds to constrain your
model states, inputs, or outputs. However, some systems or applications require
additional flexibility in defining the optimization search parameters.

For such systems, you can specify custom constraints, an additional optimization objective
function, or both. When the software computes a steady-state operating point, it applies
these custom constraints and objective function in addition to the standard state, input,
and output specifications.

You can specify custom equality and inequality constraints as algebraic combinations of
model states, inputs, and outputs. These constraints let you limit the operating point
search space by specifying known relationships between inputs, outputs, and states. For
example, you can specify that one model state is the sum of two other states.

You can also specify a custom scalar objective function as an algebraic combination of
model states, inputs, and outputs. Using the objective function you can optimize the
steady-state operating point based on your application requirements. For example,
suppose that your model has multiple potential equilibrium points. You can specify an
objective function to find the steady-state point with the minimum input energy.

For complex models, you can specify a custom mapping function that selects a subset of
the model inputs, outputs, and states to pass to the custom cost and constraint functions.

You can specify custom optimization functions when trimming your model:


  • At the command line: Create an operating point specification using operspec, and
    specify the custom functions using the CustomConstrFcn, CustomCostFcn, and
    CustomMappingFcn properties of the specification.

  • Using Steady State Solver: On the Specification tab, click Trim Options. In the
    Trim Options dialog box, in the Custom Optimization Functions section, specify the
    function names.

  • Using the Linear Analysis Tool: On the Linear Analysis tab, in the Operating Point
    drop-down list, click Trim Model. In the Trim the model dialog box, on the Options
    tab, in the Custom Optimization Functions section, specify the function names.


1 Steady-State Operating Points

Free download pdf