LECTURE 4 Design via Frequency Response Lag Compensator (1)
LECTURE 4 Design via Frequency Response Lag Compensator (1)
The gain margin is found by using the phase plot to find the frequency, GM ( phase crossover
frequency), where the phase angle is ±180°. At this frequency, we look at the magnitude
plot to determine the gain margin, GM, which is the gain required to raise the magnitude
curve to 0 dB.
Phase margin is the amount that the phase angle can be changed before instability occurs
if the gain is held at unity.
The phase margin is found by using the magnitude curve to find the frequency, (gain
cross-over frequency), where the gain is 0 dB. On the phase curve at that frequency, the
phase margin, , is the difference between the phase value and 180°.
% ⁄
= (Equation (1))
% ⁄
= (1 − 2 ) + 4 +4 +2 (Equation (3))
Similarly, to relate to peak time, we substitute = ⁄ 1− into Equation (2) and obtain
= (1 − 2 ) + 4 +4 +2 (Equation (4))
= (Equation (5))
This relationship will enable us to evaluate the percentage overshoot from the phase margin found
from the open-loop frequency response.
• Transient response design via cascade compensation
Recall with root locus, we can identify a specific point as having a desired transient
response characteristic. We can then design cascade compensation to operate at that point
and meet the transient response specifications.
And from Equation (5) we seen that phase margin is related to percentage overshoot and
from Equations (3) and (4) bandwidth is related to both damping ratio and settling time or
peak time.
When we design cascade compensation using frequency response methods to improve the
transient response, we have to reshape the open-loop transfer function’s frequency
response to meet both the phase-margin requirement (percentage overshoot) and the
bandwidth requirement (settling time or peak time).
• The following summary are the important points to be remember on compensator design via
frequency response methods:
(1) An open-loop stable system is stable in closed-loop if the open-loop magnitude frequency
response has a gain of less than 0 dB at the frequency where the phase frequency response is
±180°.
(2) Percentage overshoot is reduced by increasing the phase margin, and the speed of the response
is increased by increasing the bandwidth.
(3) Steady-state error is improved by increasing the low-frequency magnitude responses.
4.2 Transient Response via Gain Adjustment
Let us start with the design via frequency response methods by discussing the link between phase
margin, transient response, and gain. In Equation (5), the relationship between damping ratio
(equivalently percentage overshoot) and phase margin was shown for ( ) = .Thus, if we
can vary the phase margin, we can vary the percentage overshoot. Looking at Figure 3, we see that if we
desire a phase margin, represented by CD, we would have to raise the magnitude curve by AB.
Thus, a simple gain adjustment can be used to design phase margin and, hence, percentage overshoot.
Figure 3: Bode plots showing gain adjustment for a desired phase margin
The following steps summarize the design procedure by which we can determine the gain to meet a
percentage overshoot requirement using the open-loop frequency response and assuming dominant
second-order closed-loop poles:
1. Draw the Bode magnitude and phase plots for a convenient value of gain.
2. Using Equations (1) and (5), determine the required phase margin from the percentage
overshoot.
3. Find the frequency, on the Bode phase diagram that yields the desired phase margin, CD, as
shown on Figure 3.
4. Change the gain by an amount AB to force the magnitude curve to go through 0 dB at . The
amount of gain adjustment is the additional gain needed to produce the required phase margin.
Example 4.1: Transient Response via Gain Adjustment
Problem: For the position control system shown in Figure 4, find the value of preamplifier gain, K, to
yield a 9.5% overshoot in the transient response for a step input using frequency response methods.
Step 1: Choose K = 1 (you can select any arbitrary value) to start the magnitude plot for open-loop
transfer function by using a command ‘bode’ in MATLAB and the plots are shown in Figure 5.
Step 2: Using Equation (1), a 9.5% overshoot implies = 0.6 for the closed-loop dominant poles.
Equation (5) yields a 59.2° phase margin for a damping ratio of 0.6.
Step 3: Locate on the phase plot the frequency that yields a 59.2° phase margin. This frequency is found
where the phase angle is the difference between 180° and 59.2°, or –120.8°. From the phase plot, the
value of the phase-margin frequency is 14.76 rad/sec (you can zoom the phase plot obtained from
MATLAB (Figure 5) for finding the frequency for the phase value –120.8°)
Step 4: At a frequency of 14.76 rad/sec on the magnitude plot, the gain is found to be –55.3 dB (you can
zoom the magnitude plot obtained from MATLAB (Figure 5) for finding the dB value for the frequency
14.76 rad/sec). This magnitude has to be raised to 0 dB to yield the required phase margin.
20 = 55.3 ⟹ = 2.765
.
⟹ = 10 = 582.1
Since the log-magnitude plot was drawn for K = 1, a 55.3 dB increase, or K = 1 × 582.1 = 582.1, would
yield the required phase margin for 9.5% overshoot.
Therefore, the gain-adjusted open-loop transfer function is
100 × 582.1 58210
( )= =
( + 36)( + 100) ( + 36)( + 100)
Now, the open-loop transfer function can be checked for the given specification in MATLAB.
From Figure 6, it is clear that the percentage overshoot is 8.6% for K = 582.1 (desired is 9.5%, so
overdesign) and the peak time is 0.181 secs.
Solving the problem in Example 1 shown in Figure 4 using MATLAB SISOTOOL:
1. Type the following steps in MATLAB command window to determine the damping ratio for
9.5% overshoot:
ov = 9.5
damp =(-log(ov/100))/(sqrt(pi^2+log(ov/100)^2))
2. Then, type the following step in MATLAB command window to determine the phase margin for
the obtained damping ratio from the above step:
Pm = atan(2*damp/(sqrt(-2*damp^2+sqrt(1+4*damp^4))))*(180/pi)
Note:
In MATLAB, ‘log(x)’ is the natural logarithm of x, and ‘atan’ is the inverse tangent and it returns the
value in radians, therefore the value has to converted into degrees by multiplying with 180/pi.
3. Then, type sisotool to open SISO Design GUI. The following two window (Window 1 (See
Figure 7), Window 2 (See Figure 8)) appears:
and Select Plot Type as None for Plots 2 and 3, and make sure that the Plot Type are None for
all the plots except Plot 1.
5. Then, go to Architecture tab in Control and Estimation Tools Manager window, and Click
System Data… for import data for given open loop system. In that, the default value of 1 will be
shown for G, H, C and F. Now, Double-click the Data for G to remove the value 1 and type the
following syntax to load the system open-loop transfer function ( ) =
tf(100,[1 136 3600 0]) and Click OK in the System Data window.
6. Now, the Bode magnitude and phase plots for the given system G will be appeared in SISO Design
for SISO Design Task window. In that, Right-click either inside Magnitude plot or inside Phase
plot, and Select Grid. Now, grid appears in bode plots along with gain margin (G.M.) and phase
margin (P.M.) values as shown below:
Figure 9: Bode Magnitude and Phase plots for the system, G(s) given in Figure 4
7. Now, Grab the stability margin point in the magnitude diagram (indicated by orange circle) and
raise the magnitude curve until the phase curve shows the phase margin calculated by the formula
typed in MATLAB Command window and shown in the MATLAB Command
Window as Pm (that is, 59.1621).
8. After raising the magnitude curve for the phase margin value of 59.2 deg (shown in Phase plot),
Right-click in the Bode plot area, Select Edit Compensator… and read the gain under
Compensator in the resulting window. That gain value is the value of open-loop K for the given
system. Here, the value shown for Compensator is C = 584 (Remember, the value is 582.1 with
manual calculations)
Remember, (∞) = ( )
= ⟹ = ( ) hence we can calculate for Kv if given G(s)
⟶ ⟶
The Bode plots for the open-loop transfer function for K = 5821 are shown in Figure 10.
Figure 10: Bode magnitude and phase plots for Example 2 for K = 5821
Step 2: The phase margin required for a 9.5% overshoot ( = 0.6) is found from Equation (5) to be
59.2°. We increase this value of phase margin by 10° (according to Ogata, it is 5° to 12°) to 69.2° in order
to compensate for the phase angle contribution of the lag compensator. Now find the frequency where the
phase margin is 69.2°. This frequency occurs at a phase angle of –180° + 69.2° = –110.8° and is found to
be 9.74 rad/s (from Phase plot of Figure 10). At this frequency, the magnitude plot must go through 0dB.
The magnitude at 9.74 rad/s is now +24.05 dB≅+24 dB (from Magnitude plot of Figure 10). Thus, the lag
compensator must provide –24 dB attenuation at 9.74 rad/s.
Steps 3 and 4: We now design the compensator. First draw the high-frequency asymptote at –24 dB.
Arbitrarily select the higher break frequency to be about one decade below the phase-margin frequency,
or 0.974 rad/s. Starting at the intersection of this frequency with the lag compensator’s high-frequency
asymptote, draw a –20 dB/decade line until 0 dB is reached. The compensator must have a dc gain of unity
to retain the value of Kv that we have already designed by setting K = 5821. The lower break frequency is
found to be 0.064 rad/s (See Figure 11).
Figure 11: Manual procedure in Bode Magnitude plot for Steps 3 and 4
Now, the value of higher break frequency is taken as compensator zero, that is = 0.974 and the low-
frequency value is the value of compensator pole and that is equal to 0.064. And in Step 2, we see that the
compensator should provide –24 dB attenuation at 9.74 rad/s. Therefore, we have to find the gain value
corresponds to –24 dB as follows:
.
20 = −24 ⇒ = −1.2 ⇒ = 10 = 0.063
. ( . )
Hence, the lag compensator’s transfer function is ( )=
( . )
. ( . )
Finally, the compensated system’s forward transfer function is ( ) ( ) = ( )( )( .
.
)
The performance comparison of gain-compensated system and lag-compensated system are given in the
below table (obtained from simulation results):
Parameter Gain-compensated system Lag-compensated system
diagrams to design a lag compensator to yield a tenfold improvement in steady-state error over the gain
compensated system while keeping the percentage overshoot at 20% (Given in Exercise 4.1).
ANSWERS:
Gain-compensated system to yield a tenfold improvement in steady-state error while maintaining 20%
overshoot:
( )=
( )( )
Reference textbook
Norman S. Nise, ‘Control Systems Engineering’, Sixth Edition, John Wiley and Sons, 2011.