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 the Simulink® model.
sys = 'magball'; open_system(sys)
Open the Linear Analysis Tool for the model.
In the Simulink model window, select Analysis > Control Design > Linear Analysis.
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 Linear Analysis Points > Input Perturbation.
Right-click the Magnetic Ball Plant output signal, and select Linear Analysis Points > Open-loop Output.
Annotations appear in the model indicating which signals are designated as linearization I/O points.
Tip Alternatively, if you do not want to introduce changes to the Simulink model, you can specify the linearization I/O points in the Linear Analysis Tool. See Specify Portion of Model to Linearize in Linear Analysis Tool.
In the Linear Analysis Tool, select Trim model, in the Operating Point list.
By default, all model states are specified to be at equilibrium (as shown in the Steady State column).
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.
Compute the operating point.
A new variable, op_trim1, appears in the Linear Analysis Workspace.
Select the operating point to be used for linearization.
In the Exact Linearization tab, select op_trim1 from the Operating Point list.
Linearize the model at the specified operating point.