This example shows how to use the Linear Analysis Tool to analyze the open-loop response of a control system for stability margin analysis.
Open-loop response is the combined response of the plant and the controller, excluding the effect of the feedback loop. For example, the next block diagram shows a single-loop control system.
Open-loop response corresponds to the linear response of the plant and the controller. If C(s) and P(s) are linear, the corresponding linear systems is C(s)P(s).
In Simulink® Control Design™, the linearization I/O points and the loop opening that correspond to open-loop response look something like this:
However, if there is no loop opening at the output of Water-Tank System block, the resulting linear model is different:
Compute a linear model of the combined controller-plant system without the effects of the feedback signal. Use a Bode plot of the resulting linear model to see the open-loop response.
Open Simulink model.
sys = 'watertank'; open_system(sys)
The Water-Tank System block represents the plant in this control system and contains all of the system nonlinearities.
In the Simulink Editor, define the portion of the model to linearize:
Right-click the PID Controller block input signal (the output of the Sum block). Select Linear Analysis Points > Input Perturbation.
Right-click the Water-Tank System 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.
Open the Linear Analysis Tool for the model.
In the Simulink Editor, select Analysis > Control Design > Linear Analysis.
By default, the I/O points you specified in the model are the selected Analysis I/Os for linearization, as displayed in the Analysis I/Os menu.
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.
View the minimum stability margins for the model.
Right-click the plot and select Characteristics > Minimum Stability Margins.
The Bode plot displays the phase margin marker. Click the marker to show a data tip that contains the phase margin value.
Close Simulink model.