Frequency Response Example:: S S S K KGH
Frequency Response Example:: S S S K KGH
2.5
1.5
0.5
Imag
Axis 0
-0.5
-1
-1.5
-2
-2.5
-4 -3 -2 -1 0 1 2
Real Axis
The Open-Loop Frequency Response (Bode Diagram) is plotted with the command
1 of 11
4-23-2010
And the Gain and Phase margins are computed with the command
EDU» margin(G)
-20
Magnitude (dB)
-40
-60
-80
-100
-50
-100
Phase (deg)
-150
-200
-250
-300
10-1 100 101 102
Frequency (rad/sec)
This plot show a Gain Margin (GM) = 13.979 dB and a Phase Margin of 75.636 degrees.
The Gain Margin indicates that the control gain can be increased by 13.979 dB
(10(14/20) = 5) from K = 1 = 0dB before the system will go unstable.
2 of 11
4-23-2010
The Phase Margin indicates that at the current gain (K = 1), the system can absorb an
addition phase lag of 75.636 before it will go unstable.
0.8
0.7
0.6
0.5
Amplitude
0.4
0.3
0.2
0.1
0
0 1.6 3.2 4.8 6.4 8
Time (sec.)
Although the step response is stable, the steady state error is 33%. Could we reduce it by
increasing the gain K from K = 1 (0 dB) to K = 2 (6.02 dB) ? Yes, just add 6.02 dB to the
frequency response shift it up 6.02 dB at all frequencies. Let’s plot it with the Matlab
commands
3 of 11
4-23-2010
has the predicted, less stable response with better steady-state error.
Bode Diagram
Gm=7.9588 dB (at 3.3166 rad/sec), Pm=35.425 deg. (at 2.0639 rad/sec)
50
Magnitude
(dB)
-50
-100
-50
-100
Phase
(Deg)
-150
-200
-250
-300 -1 0 1 2
10 10 10 10
Frequency
(rad/sec)
StepResponse
1.4
1.2
Amplitude 0.8
0.6
0.4
0.2
0
0 2 4 6 8 10 12
Time (sec.)
4 of 11
4-23-2010
Integral Controller:
The transfer function of an integral controller is:
Gc ( s ) = K s
The frequency response of this controller is plotted using the Matlab command
Adding the magnitude and phase of the Integral controller to the magnitude and phase of
the original controller can be done either graphically or analytically. The result is the
Bode diagram of the open-loop transfer function
& K #& 12 # & 12 #
KGH = $ ! $ ! = K$ !
% s " % (s + 1)(s + 2 )(s + 3)" % s (s + 1)(s + 2 )(s + 3)"
of the system shown in the figure below.
5 of 11
4-23-2010
R (s ) E (s ) K A(s ) 12 C (s )
s (s + 1)(s + 2)(s + 3)
, K=1
The resulting system has a Gain Margin, GM = -1.6 dB and the Phase Margin,
PM = -7 degrees so it is unstable. To stabilize the system at an acceptable GM = 8 dB
and PM = 45degrees requires a reduction in integral control gain by a factor of at least
8+1.6 = 9.6 dB to meet the gain margin requirement. The new control gain
The resulting bode diagram has a GM=8 dB and a PM=36 degrees and is shown below.
This reduced gain now meets the gain margin (GM) requirement but does not achieve the
required phase margin, PM = 45 degrees.
6 of 11
4-23-2010
To achieve the require phase margin, decrease the gain K further. How much? Look at
the Bode Diagram for K = 0.33and make an estimate. The 0 dB crossing point needs to
move from about ! = 0.55 to about ! = 0.42. This requires a further magnitude
adjustment of about 3 dB = 0.7. Try K=0.33*0.7 = 0.23. Matlab Computes this system’s
GM = 11.2 dB and PM = 48. degrees. The 0 dB crossing shows a bandwidth of about 0.4
rad/sec yielding a time constant of approximately ! = 2.5 seconds.
7 of 11
4-23-2010
The system integral controller design is Gc = 0.23 s and has the closed-loop step
response given by the closed-loop transfer function
T (s) =
Gc G p
=
(0.23 *12)
1 + Gc G p s 4 + 6 s 3 + 11 s 2 + 6s + (0.23 * 12 )
This system has a steady-state gain T (0) = 1 and no steady-state error at any gain because
the open-loop system is type 1. The closed-loop system step response is given below.
The system’s overall time constant is slower than predicted, Ts approximately 20 seconds
yielding an equivalent time constant ! = about 5 seconds.
Proportional-Derivative Control:
A Proportional-Derivative (PD) control generates a “lead” action. This control will both
increase the speed of response and further stabilize the system.
& K #
K p + K d s = K d $$ s + p !
Kd !
% "
Propose a controller with a “zero” at K p K d = ! = 0.4 rad/sec. This additional control
makes the controller transfer function
Gc = K
(s + 0.4)
s
8 of 11
4-23-2010
yielding the Open-Loop system transfer function for the P-D plus Integral controller
& (s + 0.4 )# & 12 # & 12( s + 0.4) #
KGH = K $ $ ! = K$ !
% s " % (s + 1)(s + 2 )(s + 3)" % s (s + 1)(s + 2 )(s + 3)"
!
The Bode diagram (open-loop frequency response) of this system with the modified
controller for K=1 shows a decrease in phase lag about the zero “corner” frequency.
This new “P-D+I” controlled system has a gain margin GM = 11.9 dB and a phase
margin PM = 55 degrees while retaining zero steady-state error. Furthermore, the
bandwidth of the system ! = about 1.3 rad/sec (look at the 0 dB crossing) yielding an
expected time constant ! = about 0.76 seconds and a settling time Ts = about 3 seconds.
It should be substantially faster than with only “I” action. The step response for the
closed-loop system
T (s) =
Gc G p
=
(1.0 *12)(s + 0.4)
1 + Gc G p 4
s +6s 3
+ 11 s 2 + 6s + (1.0 * 12 )(s + 0.4 )
12s + 0.48
=
s 4 + 6 s 3 + 11 s 2 + 18s + 4.8
9 of 11
4-23-2010
You should see that although we have used the analytical model to explain what is
happening and allow easy Matlab plotting of results, WE DID NOT NEED THE PLANT
MODEL to do the design. In fact, the use of a Bode diagram allows the simple addition
of the controller frequency response to a measured plant frequency response.
Understanding with a transfer function model is important BUT you can simply add the
controller transfer function to a measured plant transfer function if you do not have a
transfer function model available.
A Final Note:
The addition of the “Proportional-Derivative” term to the Integral controller meant that
we did not need to add a “pole” to the PD controller to implement it. If we wanted to add
a “PD” term to the original system, we would have had to use something like
10 of 11
4-23-2010
' K $
%% s + p "
Kd "
Gc = K d & #
(s + ! LP )
where ! LP is some frequency above the frequency of the “zero” K p K d = ! = 0.4
rad/sec. I might try something like ! LP = 4 rad/sec.
Gc = K
(s + 0.4)
(s + 4.0)
which has the Bode diagram,
This diagram shows explicitly the phase lead generated by the pole-zero pair on the real
axis with the pole to the left (high frequency ! = 4.0 rad/sec) of the zero (low
frequency ! = 0.4 rad/sec). This figure also shows the 20 dB = 10 (linear) magnitude
reduction that results at zero frequency normally causing reduced system steady-state
accuracy through the resulting larger steady-state error.
11 of 11