Control Tutorials For MATLAB and Simulink - Introduction - System Analysis
Control Tutorials For MATLAB and Simulink - Introduction - System Analysis
SYSTEM
ROOT LOCUS predict how the system will respond in both the time and
DIGITAL
In this section, we will show how to determine these
CONTROL
Related
Tutorial Links
Time Resp
Activity
Freq Resp
Activity
Related
External
Links
Time Resp
Video
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 1/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
Freq Resp
Video
Contents
Stability
System Order
First-Order Systems
Second-Order Systems
The time response represents how the state of a dynamic system changes in
time when subjected to a particular input. Since the models we have derived
form analytical solution may be available. However, for most systems, especially
nonlinear systems or those subject to complicated inputs, this integration must
The time response of a linear dynamic system consists of the sum of the
transient response which depends on the initial conditions and the steady-
state response which depends on the system input. These correspond to the
homogenous (free or zero input) and the particular solutions of the governing
differential equations, respectively.
All the examples presented in this tutorial are modeled by linear constant
coefficient differential equations and are thus linear time-invariant (LTI). LTI
systems have the extremely important property that if the input to the system is
sinusoidal, then the steady-state output will also be sinusoidal at the same
frequency, but, in general, with different magnitude and phase. These magnitude
and phase differences are a function of the frequency and comprise the
frequency response of the system.
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 2/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
The frequency response of a system can be found from its transfer function in
the following way: create a vector of frequencies (varying between zero or "DC"
to infinity) and compute the value of the plant transfer function at those
Stability
For our purposes, we will use the Bounded Input Bounded Output (BIBO)
definition of stability which states that a system is stable if the output remains
bounded for all bounded (finite) inputs. Practically, this means that the system
stability. If all poles of the transfer function (values of for which the
denominator equals zero) have negative real parts, then the system is stable. If
any pole has a positive real part, then the system is unstable. If we view the
poles on the complex s-plane, then all poles must be in the left-half plane (LHP)
to ensure stability. If any pair of poles is on the imaginary axis, then the system
is marginally stable and the system will tend to oscillate. A system with purely
imaginary poles is not considered BIBO stable. For such a system, there will
exist finite inputs that lead to an unbounded response. The poles of an LTI
system model can easily be found in MATLAB using the pole command, an
example of which is shown below:
s = tf('s');
G = 1/(s^2+2*s+5)
pole(G)
G =
-------------
s^2 + 2 s + 5
ans =
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 3/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
-1.0000 + 2.0000i
-1.0000 - 2.0000i
Thus this system is stable since the real parts of the poles are both negative.
The stability of a system may also be found from the state-space representation.
In fact, the poles of the transfer function are the eigenvalues of the system
matrix . We can use the eig command to calculate the eigenvalues using
either the LTI system model directly, eig(G), or the system matrix as shown
below.
[A,B,C,D] = ssdata(G);
eig(A)
ans =
-1.0000 + 2.0000i
-1.0000 - 2.0000i
System Order
The order of a dynamic system is the order of the highest derivative of its
First-Order Systems
(1)
(2)
where the parameters and completely define the character of the first-
order system.
DC Gain
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 4/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
The DC gain, , is the ratio of the magnitude of the steady-state step response
to the magnitude of the step input. For stable transfer functions, the Final Value
Theorem demonstrates that the DC gain is the value of the transfer function
Time Constant
Poles/Zeros
Step Response
We can calculate the system time response to a step input of magnitude using
k_dc = 5;
Tc = 10;
u = 2;
s = tf('s');
G = k_dc/(Tc*s+1)
step(u*G)
G =
5
--------
10 s + 1
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 5/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
Note: MATLAB also provides a powerful graphical user interface for analyzing
LTI systems which can be accessed using the syntax
linearSystemAnalyzer('step',G).
If you right-click on the step response graph and select Characteristics, you
can choose to have several system metrics overlaid on the response: peak
response, settling time, rise time, and steady-state.
Settling Time
The settling time, , is the time required for the system output to fall within a
certain percentage (i.e. 2%) of the steady-state value for a step input. The
settling times for a first-order system for the most common tolerances are
provided in the table below. Note that the tighter the tolerance, the longer the
system response takes to settle to within this band, as expected.
10% 5% 2% 1%
Rise Time
The rise time, , is the time required for the system output to rise from some
lower level x% to some higher level y% of the final steady-state value. For first-
order systems, the typical range is 10% - 90%.
Bode Plots
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 6/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
Bode plot of a system in MATLAB using the syntax bode(G) as shown below.
bode(G)
Again the same results could be obtained using the Linear System Analyzer
GUI, linearSystemAnalyzer('bode',G).
(3)
As with the frequency axis, the decibel scale allows us to view a much larger
range of magnitudes on a single plot. Also, as we shall see in subsequent
tutorials, when components and controllers are placed in series, the transfer
function of the overall system is the product of the individual transfer functions.
Using the dB scale, the magnitude plot of the overall system is simply the sum of
the magnitude plots of the individual transfer functions. The phase plot of the
overall system is also just the sum of the individual phase plots.
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 7/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
frequency 0.1a and 10a, the phase changes by approximately -45 degrees for
every factor of ten increase in frequency (-45 degrees/decade).
We will see in the Frequency Methods for Controller Design Section how to use
Bode plots to calculate closed-loop stability and performance of feedback
systems.
Second-Order Systems
(4)
The canonical second-order transfer function has the following form, in which it
(5)
DC Gain
The DC gain, , again is the ratio of the magnitude of the steady-state step
response to the magnitude of the step input, and for stable systems it is the
value of the transfer function when . For the forms given,
(6)
Damping Ratio
(7)
Natural Frequency
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 8/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
The natural frequency is the frequency (in rad/s) that the system will oscillate
at when there is no damping, .
(8)
Poles/Zeros
(9)
Underdamped Systems
rad/sec).
k_dc = 1;
w_n = 10;
zeta = 0.2;
s = tf('s');
G1 = k_dc*w_n^2/(s^2 + 2*zeta*w_n*s + w_n^2);
pzmap(G1)
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 9/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
step(G1)
axis([0 3 0 2])
Settling Time
The settling time, , is the time required for the system ouput to fall within a
certain percentage of the steady-state value for a step input. For a canonical
second-order, underdamped system, the settling time can be approximated by
(10)
The settling times for the most common tolerances are presented in the
following table:
10% 5% 2% 1%
Percent Overshoot
100% overshoot.
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 10/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
(11)
(12)
(13)
(14)
Overdamped Systems
If , then the system is overdamped. Both poles are real and negative;
therefore, the system is stable and does not oscillate. The step response and a
zeta = 1.2;
pzmap(G2)
axis([-20 1 -1 1])
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 11/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
step(G2)
axis([0 1.5 0 1.5])
Critically-Damped Systems
If , then the system is critically damped. Both poles are real and have the
change the value of the damping ratio to 1, and re-plot the step response and
pole-zero map.
zeta = 1;
pzmap(G3)
axis([-11 1 -1 1])
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 12/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
step(G3)
axis([0 1.5 0 1.5])
Undamped Systems
If , then the system is undamped. In this case, the poles are purely
imaginary; therefore, the system is marginally stable and the step response
oscillates indefinitely.
zeta = 0;
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 13/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
pzmap(G4)
step(G4)
axis([0 5 -0.5 2.5])
Bode Plot
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 14/15
11/20/23, 4:43 AM Control Tutorials for MATLAB and Simulink - Introduction: System Analysis
We show the Bode magnitude and phase plots for all damping conditions of a
second-order system below:
bode(G1,G2,G3,G4)
The magnitude of the bode plot of a second-order system drops off at -40 dB per
decade in the limit, while the relative phase changes from 0 to -180 degrees. For
underdamped systems, we also see a resonant peak near the natural frequency,
= 10 rad/s. The size and sharpness of the peak depends on the damping in
the system, and is charaterized by the quality factor, or Q-Factor, defined below.
The Q-factor is an important property in signal processing.
(15)
International License.
https://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=SystemAnalysis#1 15/15