| Contents | Index |
This example shows how to use the Linear Analysis Tool to linearize a model at a trimmed steady-state operating point (equilibrium operating point).
The operating point is trimmed by specifying constraints on the operating point values, and performing an optimization search that meets these state and input value specifications.
Open Simulink model.
sys = 'magball'; open_system(sys)

In the Simulink model window, select Tools > Control Design > Linear Analysis.
This opens the Linear Analysis Tool for the model.
In the Operating Point list, select Trim model....

This action opens the Trim Model tab.
Click Specifications.
By default, all model states are specified to be at equilibrium (as shown in the Steady State column).

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.

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

Click
to compute
the operating point.

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

In the Simulink model window, define the portion of the model to linearize for this linearization task:
Right-click the Controller block output signal (input signal to the plant). Select Linearization Points > Input Point.
Right-click the Magnetic Ball Plant output signal, and select Linearization Points > Output Point.
Right-click the Magnetic Ball Plant output signal again, and select Linearization Points > Open Loop.
In the Linear Analysis Tool, select the Exact Linearization tab. In the Operating Point drop-down list, select op_trim1.

Click
to linearize
the model at the specified operating point.
(Optional) Click Generate MATLAB Code in the Linearize drop-down list to automatically generate a MATLAB script.
The generated script contains commands for linearizing the plant for this example.
![]() | Linearize at Model Operating Point | Linearize at Simulation Snapshots and Triggered Events | ![]() |

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |