frequency compensator ee3cl4: introduction to linear...

28
EE 3CL4, §9 1 / 31 Tim Davidson Frequency Domain Approach to Compensator Design Lead Compensators Lag Compensators EE3CL4: Introduction to Linear Control Systems Section 9: Design of Lead and Lag Compensators using Frequency Domain Techniques Tim Davidson McMaster University Winter 2018

Upload: phamdat

Post on 15-Mar-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §91 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

EE3CL4:Introduction to Linear Control Systems

Section 9: Design of Lead and Lag Compensators usingFrequency Domain Techniques

Tim Davidson

McMaster University

Winter 2018

Page 2: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §92 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Outline

1 Frequency Domain Approach to Compensator Design

2 LeadCompensators

3 LagCompensators

Page 3: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §94 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Frequency domain design

• Analyze closed loop using open loop transfer functionL(s) = Gc(s)G(s)H(s).

• We would like closed loop to be stable:• Use Nyquist’s stability criterion

• We might like to make sure that the closed loop remains stableeven if there is an increase in the gain

• Require a particular gain margin• We might like to make sure that the closed loop remains stable

even if there is additional phase lag• Require a particular phase margin

• We might like to make sure that the closed loop remains stable evenif there is a combination of increased gain and additional phase lag

• Require minω

∣∣L(jω)− (−1)∣∣ to be large enough

Page 4: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §95 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Frequency domain design

• We might like to control the damping ratio of the dominantpole pair

• Use the fact that φpm = f (ζ)

• We might like to control the steady-state error constants• For step, ramp and parabolic inputs, these constants

are related to the behaviour of L(s) around zero; i.e.,behaviour near DC

• We might like to influence the settling time• Roughly speaking, the settling time decreases with

increasing bandwidth

• Once we have a general idea of the shape of the Nyquistdiagram, is some of this information available in a moreconvenient form?

Page 5: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §96 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Bode diagram

L(jω) =1

jω(1 + jω)(1 + jω/5)

• Gain margin ≈ 15 dB

• Phase margin ≈ 43◦

Page 6: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §97 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Compensators and Bodediagram

• We have seen the importance of phase margin• If G(s) does not have the desired margin,

how should we choose Gc(s) so thatL(s) = Gc(s)G(s) does?

• To begin, how does Gc(s) affect the Bode diagram• Magnitude:

20 log10(|Gc(jω)G(jω)|

)= 20 log10

((|Gc(jω)|

)+ 20 log10

(|G(jω)|

)• Phase:

∠Gc(jω)G(jω) = ∠Gc(jω) + ∠G(jω)

Page 7: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §99 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Lead Compensators

• Gc(s) =Kc(s+z)

s+p , with |z| < |p|, alternatively,

• Gc(s) = Kcα

1+sατ1+sτ , where p = 1/τ and α = p/z > 1

• Bode diagram (in the figure, K1 = Kc/α):

Page 8: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §910 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Lead Compensation

• What will lead compensation, do?• Phase is positive: might be able to increase phase

margin φpm

• Slope is positive: might be able to increase thecross-over frequency, ωc , (and the bandwidth)

Page 9: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §911 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Lead Compensation

• Gc(s) = Kcα

1+sατ1+sτ

• By making the denom. real, can show that∠Gc(jω) = atan

(ωτ(α−1)1+α(ωτ)2

)• Max. occurs when ω = ωm = 1

τ√α=√

zp

• Max. phase angle satisfies tan(φm) =α−12√α

• Equivalently, sin(φm) =α−1α+1

• At ω = ωm, we have |Gc(jωm)| = Kc/√α

Page 10: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §912 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Bode Design Principles (lead)

• Set the loop gain so that desired steady-state errorconstants are obtained

• Insert the compensator to modify the transientproperties:

• Damping: through phase margin• Response time: through bandwidth

• Compensate for the attenuation of the lead network, ifappropriate

To maximize impact of phase lead, want peak of phase nearωc of the compensated open loop

Page 11: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §913 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Design Guidelines1 For uncompensated (i.e., proportionally controlled)

closed loop, set gain Kp so that steady-state errorconstants of the closed loop meet specifications

2 Evaluate the phase margin, and the amount of phaselead required.

3 Add a little “safety margin” to the amount of phase lead4 From this, determine α using sin(φm) =

α−1α+1

5 To maintain steady-state error const’s, set Kc = Kpα6 Determine (or approximate) the frequency at which

KpG(jω) has magnitude −10 log10(α).7 If we set ωm of the compensator to be this frequency,

then Gc(jωm)G(jωm) = 1 (or ≈ 1). Hence, thecompensator will provide its maximum phasecontribution at the appropriate frequency

8 Choose τ = 1/(ωm√α). Hence, p = ωm

√α.

9 Set z = p/α.10 Compensator: Gc(s) =

Kc(s+z)s+p .

Page 12: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §914 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Example

• Type 1 plant of order 2: G(s) = 5s(s+2)

• Design goals:• Steady-state error due to a ramp input less than 5% of

velocity of ramp• Phase margin at least 45◦ (implies a damping ratio)

• Steady state error requirement implies Kv = 20.• For prop. controlled Type 1 plant: Kv = lims→0 sKpG(s).

Hence Kp = 8.• To find phase margin of prop. controlled loop we need

to find ωc , where |KpG(jωc)| =∣∣ 40

jωc(jωc+2)

∣∣ = 1

• ωc ≈ 6.2rad/s• Evaluate ∠KpG(jω) = −90◦ − atan(ω/2) at ω = ωc

• Hence φpm, prop = 18◦

Page 13: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §915 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Example

• φpm, prop = 18◦. Hence, need 27◦ of phase lead• Let’s go for a little more, say 30◦

• So, want peak phase of lead comp. to be 30◦

• Solving α−1α+1 = sin(30◦) yields α = 3. Set Kc = 3× 8

• Since 10 log10(3) = 4.8 dB we should choose ωm to bewhere 20 log10

(∣∣ 40jωm(jωm+2)

∣∣) = −4.8 dB

• Solving this equation yields ωm = 8.4rad/s• Therefore z = ωm/

√α = 4.8, p = αz = 14.4

• Gc(s) =24(s+4.8)

s+14.4

• Gc(s)G(s) = 120(s+4.8)s(s+2)(s+14.4) , actual φpm = 43.6◦

• Goal can be achieved by using a larger target foradditional phase, e.g., α = 3.5

Page 14: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §916 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Bode Diagram

Page 15: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §917 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Step Response

Page 16: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §918 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Ramp Response

Page 17: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §919 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Ramp Response, detail

Page 18: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §921 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Lag Compensators• Gc(s) =

Kc(s+z)s+p , with |p| < |z|, alternatively,

• Gc(s) =Kcα(1+sτ)

1+sατ , where z = 1/τ and α = z/p > 1• Bode diagrams of lag compensators for two differentαs, in the case where Kc = 1/α

Page 19: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §922 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

What will lag compensation do?

• Since zero and pole are typically close to the origin,phase lag aspect is not really used.

• What is useful is the attenuation above ω = 1/τ :gain is −20 log10(α), with little phase lag

• Can reduce cross-over frequency, ωc , without addingmuch phase lag

• Tends to reduce bandwidth

Page 20: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §923 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Qualitative example

• Uncompensated system has small phase margin• Phase lag of compensator does not play a large role• Attenuation of compensator does:ωc reduced by about a factor of a bit more than 3

• Increased phase margin is due to the natural phasecharacteristic of the plant

Page 21: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §924 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Bode Design Principles (lag)

For lag compensators:• Set the loop gain so that desired steady-state error

constants are obtained• Insert the compensator to modify the phase margin:

• Do this by reducing the cross-over frequency• Observe the impact on response time

Basic principle: Set attenuation to reduce ωc far enough sothat uncompensated open loop has desired phase margin

Page 22: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §925 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Design Guidelines1 For uncompensated (i.e., proportionally controlled)

closed loop, set gain Kp so that steady-state errorconstants of the closed loop meet specifications

2 Evaluate the phase margin, analytically, or using aBode diagram. If that is insufficient. . .

3 Determine ω′c , the frequency at which theuncompensated open loop, KpG(jω), has a phasemargin equal to the desired phase margin plus 5◦.

4 Design a lag comp. so that the gain of the compensatedopen loop, Gc(jω)G(jω), at ω = ω′c is 0 dB

• Choose Kc = Kp/α so that steady-state error const’sare maintained

• Place zero of the comp. around ω′c/10 so that at ω′c weget almost all the attenuation available from the comp.

• Choose α so that 20 log10(α) = 20 log10(|KpG(jω′c)|).With that choice and Kc = Kp/α, |Gc(jω′c)G(jω′c)| ≈ 1

• Place the pole at p = z/α• Compensator: Gc(s) =

Kc(s+z)s+p

Page 23: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §926 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Example, same set up as leaddesign

• Type 1 plant of order 2: G(s) = 5s(s+2)

• Design goals:• Steady-state error due to a ramp input less than 5% of

velocity of ramp• Phase margin at least 45◦ (implies a damping ratio)

• Steady state error requirement implies Kv = 20.• For prop. controlled Type 1 plant: Kv = lims→0 sKpG(s).

Hence Kp = 8.• To find phase margin of prop. controlled loop we need

to find ωc , where |KpG(jωc)| =∣∣ 40

jωc(jωc+2)

∣∣ = 1

• ωc ≈ 6.2rad/s• Evaluate ∠KpG(jω) = −90◦ − atan(ω/2) at ω = ωc

• Hence φpm, prop = 18◦

Page 24: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §927 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Example

• Since want phase margin to be 45◦, we set ω′c such that∠G(jω′c) = −180◦ + 45◦ + 5◦ = −130◦. =⇒ ω′c ≈ 1.5

• To make the open loop gain at this frequency equal to 0 dB,the required attenuation is 20 dB. Actual curves are around2 dB lower than the straight line approximation shown

• Hence α = 10. Set Kc = Kp/α = 0.8

• Zero set to be one decade below ω′c ; z = 0.15

• Pole is z/α = 0.015.

• Hence Gc(s) =0.8(s+0.15)

s+0.015

Page 25: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §928 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Example: Comp’d open loop

• Compensated open loop: Gc(s)G(s) = 4(s+0.15)s(s+2)(s+0.015)

• Numerical evaluation:• new ωc = 1.58• new phase margin = 46.8◦• By design, Kv remains 20

Page 26: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §929 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Step Response

Page 27: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §930 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Ramp Response

Page 28: Frequency Compensator EE3CL4: Introduction to Linear ...davidson/EE3CL4/slides/LeadLagBode_hando… · Introduction to Linear Control Systems ... Analyze closed loop using open loop

EE 3CL4, §931 / 31

Tim Davidson

FrequencyDomainApproach toCompensatorDesign

LeadCompensators

LagCompensators

Ramp Response, detail