Skip to Main Content Skip to Search
Product Documentation

Steady-State Operating Points (Trimming) From Specifications

This example shows how to compute a steady-state operating point, or equilibrium operating point, by specifying known (fixed) equilibrium states and minimum state values.

 Code Alternative

  1. Open Simulink® model.

    sys = 'magball';
    open_system(sys)

  2. In the Simulink model window, select Tools > Control Design > Linear Analysis.

    The Linear Analysis Tool for the model opens.

  3. Select Trim Model > Specifications in the Linear Analysis tab.

    By default, all model states are specified to be at equilibrium (as shown in the Steady State column). The Inputs and Outputs tabs are empty because this model does not have root-level input and output ports, respectively.

  4. In the States tab, select Known for the height state.

    The height of the ball should match the reference signal height. This height value should remain fixed during the optimization.

  5. Enter 0 for the minimum bound of the Current state.

  6. Click Trim to compute the operating point.

    This action uses numerical optimization to find the operating point that meets your specifications.

    The Trim progress viewer shows that the optimization algorithm terminated successfully. The (Maximum Error) Block area shows the progress of reducing the error of a specific state or output during the optimization.

    A new variable, op_trim1, appears in the Linear Analysis Workspace.

  7. Double click op_trim1 in Linear Analysis Workspace to evaluate whether the resulting operating point values meet the specifications.

    The Actual dx values are near zero, the desired result, which indicates that the operating point meets the steady state specification.

    The Actual Value of the states falls within the Desired Value bounds.

  8. (Optional) Click Generate MATLAB Code in the Trim drop-down list to automatically generate a MATLAB® script.

    The generated script will contain commands for computing the operating point for this example.

 Related Examples

 More About

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS