Design of Compensators for a System using Bode Plot Techniques, Assignments of Electrical and Electronics Engineering

This document illustrates the design of phase lag, phase lead, and lag-lead compensators for a particular system using bode plot techniques. It covers three approaches to compensator design, including the design of a single-stage lag compensator, single-stage lead compensator, and a lag-lead compensator. The bode plots for the uncompensated system and compensated systems are provided for each design.

Typology: Assignments

Pre 2010

Uploaded on 02/10/2009

koofers-user-h05-1
koofers-user-h05-1 🇺🇸

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Bode Design Example #7
A. Introduction
This example illustrates the design of phase lag, phase lead, and lag-lead compensators for a particular system using Bode
plot techniques. Differences in the characteristics of the resulting designs will be discussed. The plant model in the standard
unity feedback system is given below.
Gp(s)=C(s)
U(s)=2(s/0.7+1)(s+1)
s(s/0.1+1)(s/4+1)(s/15 + 1) (s/50 + 1) (1)
The plant transfer function is given in the Bode or time-constant form, so the gain in the numerator is the value used to
compute the steady-state error, that is, Kx=2.The system is Type 1 (N=1),so a non-zero, finite steady-state error will be
obtained when the reference input is a ramp signal.
The performance specifications that are imposed on the system are:
Phase margin must be at least 45;
Steady-state error in the closed-loop ramp response must not exceed 0.005.
B. Evaluating Gp(s)Relative to the Specifications
The open-loop system is Type 1, so the plant has the correct System Type Nto satisfy the steady-state error specification.
The steady-state error of the plant for a ramp input is 1/Kxplant,where Kxplant =2.Therefore, the steady-state error is
essplant =1/2=0.5.In order to satisfy the steady-state error specification, the compensator must have a gain
Kc=essplant
essspec
=0.5
0.005 = 100 (2)
The value in (2) will be the total compensator gain regardless of whether the compensator is phase lead, phase lag, or lag-lead
and regardless of the number of stages in the final compensator design. Since the compensators will be designed using Bode
plot techniques, the Kcin (2) is the gain of the compensator when Gc(s)is expressed in the Bode form. If the compensator
is written in pole-zero format, then the gain of the compensator in that format is (Kcg)for a lag compensator, (Kcd)
for a lead compensator, or (Kc/(αgαd)) for a lag-lead compensator.
Fig. 1 shows the Bode plots for the plant transfer function given in (1), and for the case when the compensator gain Kc= 100
is placed in series with the plant. The phase plot is unchanged by the compensator gain.
When the compensator gain Kc= 100 is included in the system to satisfy the steady-state error specification, the phase
margin drops from 65.2to 8.98so the closed-loop system is now unstable. Although Kcwas calculated to achieve the
specified steady-state error, it is clear that additional compensation is needed in order to stabilize the system and actually
obtain that steady-state error.
C. Compensator Designs
1) Overview: Three approaches to compensator design using the Bode plot techniques discussed in class will be shown. The
first approach uses only a phase lag compensator to drop the magnitude curve |KcGp()|down to 0db at the frequency where
the phase curve is 180+45+10=125.This frequency is approximately ω=10.5rad/sec. The magnitude |KcGp()|
at this frequency is approximately 18.3db, which corresponds to an absolute value of αg=8.2378.The resulting design has a
phase margin of 50.2,which satisfies that specification. The bad news is that the design almost becomes conditionally stable.
The phase curve goes to 179while the magnitude |KcGp()|db >0db—due to the lag compensator—so gain reductions
could produce a closed-loop system that is very close to being unstable. The transient response would be totally unacceptable
if the gain reduction occurred.
The second design approach uses only a phase lead compensator to raise the phase curve up by 63.98at the frequency that
will be the compensated gain crossover frequency. It will be seen that a phase margin of only 26is achieved with this design,
considerably less than the specified amount. A second lead compensator design will also be shown, using a larger value for the
“Safety Factor” in the design. The second lead compensator design achieves a phase margin of 47.2,which is satisfactory.
The third design approach will use a lag-lead compensator. The lead part of the compensator will be designed first, with the
goal of raising the phase curve up at the gain crossover frequency of |KcGp()|. After that, the lag part of the compensator
will be designed to drop the combined magnitude of the plant, compensator gain, and lead compensator down to 0db at that
same frequency. Thus, the same frequency will be used for ωxc in both parts of the compensator design; this is critical for the
successful design of a lag-lead compensator.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Design of Compensators for a System using Bode Plot Techniques and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

Bode Design Example

A. Introduction

This example illustrates the design of phase lag, phase lead, and lag-lead compensators for a particular system using Bode plot techniques. Differences in the characteristics of the resulting designs will be discussed. The plant model in the standard unity feedback system is given below.

Gp(s) =

C(s) U (s)

2 (s/ 0 .7 + 1) (s + 1) s (s/ 0 .1 + 1) (s/4 + 1) (s/15 + 1) (s/50 + 1)

The plant transfer function is given in the Bode or time-constant form, so the gain in the numerator is the value used to compute the steady-state error, that is, Kx = 2. The system is Type 1 (N = 1), so a non-zero, finite steady-state error will be obtained when the reference input is a ramp signal. The performance specifications that are imposed on the system are:

  • Phase margin must be at least 45 ◦;
  • Steady-state error in the closed-loop ramp response must not exceed 0. 005.

B. Evaluating Gp(s) Relative to the Specifications

The open-loop system is Type 1, so the plant has the correct System Type N to satisfy the steady-state error specification. The steady-state error of the plant for a ramp input is 1 /Kx−plant, where Kx−plant = 2. Therefore, the steady-state error is ess−plant = 1/2 = 0. 5. In order to satisfy the steady-state error specification, the compensator must have a gain

Kc = ess−plant ess−spec

The value in (2) will be the total compensator gain regardless of whether the compensator is phase lead, phase lag, or lag-lead and regardless of the number of stages in the final compensator design. Since the compensators will be designed using Bode plot techniques, the Kc in (2) is the gain of the compensator when Gc(s) is expressed in the Bode form. If the compensator is written in pole-zero format, then the gain of the compensator in that format is (Kc/αg ) for a lag compensator, (Kc/αd) for a lead compensator, or (Kc/ (αgαd)) for a lag-lead compensator. Fig. 1 shows the Bode plots for the plant transfer function given in (1), and for the case when the compensator gain Kc = 100 is placed in series with the plant. The phase plot is unchanged by the compensator gain. When the compensator gain Kc = 100 is included in the system to satisfy the steady-state error specification, the phase margin drops from 65. 2 ◦^ to − 8. 98 ◦^ so the closed-loop system is now unstable. Although Kc was calculated to achieve the specified steady-state error, it is clear that additional compensation is needed in order to stabilize the system and actually obtain that steady-state error.

C. Compensator Designs

1) Overview: Three approaches to compensator design using the Bode plot techniques discussed in class will be shown. The first approach uses only a phase lag compensator to drop the magnitude curve |KcGp (jω)| down to 0 db at the frequency where the phase curve is − 180 ◦^ +45◦^ +10◦^ = − 125 ◦. This frequency is approximately ω = 10. 5 rad/sec. The magnitude |KcGp (jω)| at this frequency is approximately 18. 3 db, which corresponds to an absolute value of αg = 8. 2378. The resulting design has a phase margin of 50. 2 ◦, which satisfies that specification. The bad news is that the design almost becomes conditionally stable. The phase curve goes to − 179 ◦^ while the magnitude |KcGp (jω)|db > 0 db—due to the lag compensator—so gain reductions could produce a closed-loop system that is very close to being unstable. The transient response would be totally unacceptable if the gain reduction occurred. The second design approach uses only a phase lead compensator to raise the phase curve up by 63. 98 ◦^ at the frequency that will be the compensated gain crossover frequency. It will be seen that a phase margin of only 26 ◦^ is achieved with this design, considerably less than the specified amount. A second lead compensator design will also be shown, using a larger value for the “Safety Factor” in the design. The second lead compensator design achieves a phase margin of 47. 2 ◦, which is satisfactory. The third design approach will use a lag-lead compensator. The lead part of the compensator will be designed first, with the goal of raising the phase curve up at the gain crossover frequency of |KcGp (jω)|. After that, the lag part of the compensator will be designed to drop the combined magnitude of the plant, compensator gain, and lead compensator down to 0 db at that same frequency. Thus, the same frequency will be used for ωxc in both parts of the compensator design; this is critical for the successful design of a lag-lead compensator.

10 −2^10 −1^100 101 102 103

0

50

100

Frequency (r/s)

Magnitude (db) & Phase (deg)

Gp(s) = 2(s/0.7+1)(s+1)/[s(s/0.1+1)(s/4+1)(s/15+1)(s/50+1)], Kc = 100

Kc = 1: ωx = 0.52394 r/s, PM = 65.2082 deg ωφ = 30.0806 r/s, GM = 69.3811 = 36.8248 db

Kc = 100: ωx = 35.746 r/s, PM = −8.9766 deg ωφ = 30.0806 r/s, GM = 0.69381 = −3.1752 db

Fig. 1. Bode plots for the uncompensated system Gp(s) and for KcGp(s) when Kc = 100.

2) Design of the Lag Compensator: In order for a lag compensator design to work, the phase of Gp (jω) must pass through the correct value to satisfy the phase margin specification (plus some safety factor) at some allowed frequency. In this example, there is no requirement on the gain crossover frequency, so any value for ωxc is allowed. The phase margin specification P M ≥ 45 ◦^ plus a safety factor of 10 ◦^ means that the phase curve must pass through − 125 ◦. At approximately the frequency ω = 10. 5 rad/sec (ω = 10. 471 rad/sec), the phase curve equals − 125 ◦. Therefore, this frequency will be chosen as the compensated gain crossover frequency ωxc. (The phase curve also passes through − 125 ◦^ at two lower frequencies,

  1. 11 rad/sec and 0. 35 rad/sec. The larger magnitude values at those lower frequencies would require multiple stages of lag compensation. This is the reason that ωxc = 10. 5 rad/sec was chosen.) At the frequency 10. 5 rad/sec, the magnitude is |KcGp (jω)| = 18. 3 db, which is equivalent to an absolute value of 8. 2378. Thus, the lag compensator must provide an attenuation of αg = 8. 2378 at high frequencies. The value of the zero of the compensator will correspond to a frequency one decade lower than the compensated gain crossover frequency, that is, zcg = ωxc/10 = 1. 0471. The value of the compensator pole is smaller than the value of the compensator zero by the factor αg, so pcg = zcg /αg = 0. 1271. The lag compensator is

Gc−Lag(s) =

Kc

μ s zcg

μ s pcg

³ (^) s

  1. 0471

³ (^) s

  1. 1271

Kc αg

(s + zcg) (s + pcg)

12 .139 (s + 1.0471) (s + 0.1271)

This compensator transfer function is placed in series with the plant transfer function Gp(s) to form the complete forward- path system in the unity feedback, closed-loop system. The Bode plots for the compensated system are shown in Fig. 2. The compensated phase margin with the lag compensator is 50. 2 ◦^ and the steady-state error is 0. 005 , so both specifications are satisfied. A comparison of all the designs will presented at the end of this example.

10 − 10 − 10 0 10 1 10 2 10 3 10

−300 4

0

50

100

Frequency (r/s)

Magnitude (db) & Phase (deg)

Lead−Compensated System

ωx = 66.0083 r/s, PM = 26.0016 deg ωφ = 122.5269 r/s, GM = 3.1429 = 9.9466 db

Gc−Lead(s) = 100(s/15.2675+1)/(s/285.9113+1)

Fig. 3. Bode plots for the compensated system with a single-stage lead compensator; Safety Factor = 10◦.

4) Design of Lead Compensator #2: In order to satisfy the phase margin specification, a second lead compensator will be designed, this one using a larger value for the safety factor. After a trial-and-error approach with different values, the design shown here uses a safety factor of 35 ◦. The amount of added phase shift with this value is

φmax = (45◦^ + 35◦) − (180 + (− 188. 98 ◦)) = (45◦^ + 35◦) − (− 8. 98 ◦) = 88. 98 ◦^ (6)

This value for φmax is much too large for a single stage of lead compensation, being nearly equal to the theoretical limit of 90 ◦. Therefore, two identical stages of compensation will be designed, each producing one-half of the total amount of phase shift required.

φmax -design =

φmax 2

= 44. 49 ◦^ (7)

The value of αd is computed from this design value of 44. 49 ◦, rather than the total φmax.

αd =

1 − sin

φmax -design

1 + sin

φmax -design

1 − sin (44. 49 ◦) 1 + sin (44. 49 ◦)

Each stage of the compensator will shift the magnitude curve by 10 log 10 (1/αd) , so the frequency must be found where the magnitude of |KcGp (jω)| is −20 log 10 (1/αd) = − 15. 1 db. That frequency will be the compensated gain crossover frequency, and the value is ωxc = ωmax = 72. 3 rad/sec. The compensator zero and pole are zcd = ωxc

αd = 31. 095 and pcd = zcd/αd = 176. 73. The lead compensator is

10 − 10 − 10 0 10 1 10 2 10 3 10

−300 4

0

50

100

Frequency (r/s)

Magnitude (db) & Phase (deg)

Two−Stage Lead−Compensated System

ωx = 72.3465 r/s, PM = 47.2197 deg ωφ = 181.2376 r/s, GM = 4.242 = 12.5515 db

Gc−Lead−2(s) = 100(s/31.0946+1)^2 /(s/176.7318+1)^2

Fig. 4. Bode plots for the compensated system with a single-stage lead compensator; Safety Factor = 35◦.

Gc−Lead− 2 (s) =

Kc

μ s zcd

μ s pcd

³ (^) s

  1. 095

³ (^) s

  1. 73

´ 2 ⇒^

Kc (αd)^2

(s + zcd)^2 (s + pcd)^2

3230 .4 (s + 31.095)^2 (s + 176.73)^2

The Bode plots for this design are shown in Fig. 4. The phase margin is 47. 2 ◦^ with this design, so the specifications are satisfied since the steady-state error is still 0. 005. The value of 35 ◦^ for the safety factor was determined by trial-and-error as mentioned above. Therefore, this design was not as straightforward as the lag or first lead compensator. However, the design goals were satisfied by this design, while they were not with the first lead compensator.

5) Design of the Lag-Lead Compensator: a) Lead Compensator Stage: The first step in the design of the lead compensator is to determine the amount of positive phase shift that must be added at a specified frequency in order to satisfy the phase margin specification. Since we know that a lag-lead will be designed—rather than just a lead compensator—the frequency where the phase shift will be measured is the specified value for the compensated gain crossover frequency instead of the original value of ωx (unless that is the specified value). The value for ωxc that will be used for this design will be the value of the gain crossover frequency for |KcGp (jω)| , that is, ωxc = 35. 7 rad/sec. At the chosen compensated gain crossover frequency ωxc = 35. 7 rad/sec, the system has a phase shift of − 188. 98 ◦, as obtained from the data array in MATLAB using the bode function. It could also be computed directly from the transfer function KcGp(jω) or it could be determined from the Bode phase plot. If the value is obtained graphically from the plot, the accuracy and resolution obviously will not be as good as if the value is determined analytically from the transfer function or from the MATLAB data array. With this value for ∠KcGp(jωxc), the effective “phase margin” of the uncompensated system KcGp (jω) is

The value of the parameter αg is the value of |Gcd (j 35 .7) Gp (j 35 .7)| when that magnitude is expressed as an absolute value.

αg = |Gcd (j 35 .7) Gp (j 35 .7)|abs val = 4. 3274 (17)

The zero of the lag compensator can be placed rather arbitrarily. If it is placed one decade below the compensated gain crossover frequency, or lower, then the phase margin specification will be satisfied due to the 10 ◦^ safety factor included in the calculation of φmax. For this example, the zero will be placed one decade below ωxc.

zcg = ωxc 10

pcg = zcg αg

The lag compensator’s transfer function is

Gcg(s) =

μ s zcg

μ s pcg

³ (^) s

  1. 57

³ (^) s

  1. 82603

αg

(s + zcg) (s + pcg)

0 .23108 (s + 3.57) (s + 0.82603) Note that the gain Kc = 100 was included with the lead portion of the compensator. It could have been included with the lag portion instead, or the gain could be split between the two stages in any manner desired, as long as the product of the gains (in the time-constant form of the transfer function) is 100. The total compensator for the system is the product of the lead and lag parts. In the Bode or time-constant form, the compensator’s transfer function is

Gc−Lag−Lead(s) = Gcd(s) · Gcg (s) =

³ (^) s

  1. 2603

´ ³ (^) s

  1. 57

³ (^) s

  1. 69

´ ³ (^) s

  1. 82603

and in the pole-zero format, the transfer function of the complete lag-lead compensator is

Gc−Lag−Lead(s) =

432 .74 (s + 8.2603) (s + 3.57) (s + 154.69) (s + 0.82603)

Either form of the transfer function, (21) or (22), may be used. Note that the two transfer functions have different gains. In the time-constant form, the gain in the transfer function is Kc, computed in (2). In the pole-zero form, the gain in the transfer function is Kc/ (αdαg ). The Bode plots for the complete lag-lead compensated system are shown in Fig. 5. The actual phase margin is 50. 4 ◦, larger than the specified minimum value, so the phase margin specification is satisfied. The gain crossover frequency is equal to the value specified.

10 −2^10 −1^100 101 102 103

0

50

100

Frequency (r/s)

Magnitude (db) & Phase (deg)

Lag−Lead−Compensated System

ωx = 35.8958 r/s, PM = 50.4165 deg ωφ = 94.9923 r/s, GM = 5.0339 = 14.0382 db

Gc−Lag−Lead(s) = 100(s/3.5746+1)(s/8.2603)/[(s/0.82603+1)(s/154.6887+1)]

Fig. 5. Bode plots for the lag-lead compensated system.

10 − 10 − 10 0 10 1 10 2 10

−50 3

0

10

Frequency (r/s)

Magnitude (db)

Closed−Loop Magnitudes for the Compensated Systems

−3 db

1

2

3

4

1 = Lag Compensator

2 = Lead Compensator #

3 = Lead Compensator #

4 = Lag−Lead Compensator

P

P = Uncompensated Plant

Fig. 6. Comparison of the closed-loop frequency-domain magnitudes.

systems responds more rapidly that the uncompensated plant (without Kc). The curve for the closed-loop system with Kc is not shown since that system is unstable. The closed-loop step responses are shown in Fig. 7. The overshoots and response times follow the results predicted by the closed-loop magnitudes in Fig. 6. The uncompensated plant is the slowest of all the stable systems, while the system with lead compensator #1 has the largest overshoot. The system with lead compensator #2 has the fastest response, corresponding to the largest bandwidth. Of all the stable compensated systems, the lag-compensated system is the slowest, as indicated by the smaller bandwidth. The system with the lag-lead compensator has the smallest overshoot and the second fastest settling time. The system with only Kc is clearly unstable, as indicated by the negative phase margin that was obtained for that system. The closed-loop step responses are shown in Fig. 8. Again, the instability of the system with Kc is evident. The actual steady-state errors of 0.5 for the plant and 0.005 for the compensated systems cannot be seen on a plot without zooming in considerably. There is not a clear choice among the three compensators that satisfy the specifications. Unless the very short settling time in the step response obtained by lead compensator #2 is required, either the lag compensator or the lag-lead compensator might be preferred since they both produce less overshoot. The lag-lead system is approximately 15 times faster that the lag-compensated system and has slightly less overshoot. Therefore, the system with the lag-lead compensator might be the best choice, unless very high speed is required. My personal first choice is the lag-lead compensated system, and my personal second choice is the lag-compensated system.

0 5 10 15 20 25

0

1

Step Response

Uncompensated Plant

PO = 17.9958%, Ts = 17.425 sec

0 0.5 1 1.5 2

0

20

40

60

Step Response

Plant with Kc = 100

0 1 2 3 4 5

0

1

Step Response

Lag Compensation

PO = 17.0537%, Ts = 2.94 sec

0 0.5 1 1.5 2

0

1

Step Response

Lead Compensation

PO = 45.6858%, Ts = 0.288 sec

0 0.5 1 1.5 2

0

1

Step Response

Lag−Lead Compensation

Time (s)

PO = 14.6735%, Ts = 0.196 sec

0 0.5 1 1.5 2

0

1

Step Response

Two−Stage Lead Compensation

Time (s)

PO = 22.2913%, Ts = 0.088 sec

Fig. 7. Comparison of the closed-loop step responses.