This example shows how to use the Linear Analysis Tool to linearize a model at the operating point specified in the model. The model operating point consists of the model initial state values and input signals.
The Linear Analysis Tool linearizes at the model operating point by default. If you want to specify a different operating point for linearization, see Linearize at Trimmed Operating Point.
Open Simulink® model.
sys = 'watertank'; open_system(sys)
The Water-Tank System block represents the plant in this control system and includes all of the system nonlinearities.
Open the Linear Analysis Tool for the model.
In the Simulink Editor, select Analysis > Control Design > Linear Analysis.
In the Simulink Editor, define the portion of the model to linearize:
Right-click the PID Controller block output signal, which is the input to the plant. Select Linear Analysis Points > Input Perturbation.
Right-click the Water-Tank System output signal, and select Linear Analysis Points > Open-loop Output.
Inserting this open loop point removes the effects of the feedback signal on the linearization without changing the model operating point.
When you add linear analysis points, marker appear at their locations in the model.
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.
Linearize the model with the specified I/Os, and generate a Bode plot of the linearized model.
Click Bode. The Bode plot of the linearized plant appears.
Tip: Instead of a Bode plot, generate other response types by clicking the corresponding button in the plot gallery.
The linearized system,
linsys1, appears in
the Linear Analysis Workspace.
linsys1 represents the system linearized
at the model operating point. If you do not specify an operating point
for linearization, the Linear Analysis Tool uses the model operating
point by default.
Close Simulink model.