Lecture 27: Loop Shaping

advertisement
Professor Walter W. Olson
Department of Mechanical, Industrial and Manufacturing Engineering
University of Toledo
Loop Shaping
Outline of Today’s Lecture
 Review
 PID Theory
 Integrator Windup
 Noise Improvement
 Static Error Constants (Review)
 Loop Shaping
 Loop Shaping with the Bode Plot
 Lead and Lag Compensators
 Lead design with Bode plot
 Lead design with root locus
 Lag design with Bode plot
PID: A Little Theory
 Consider a 1st order function where the 1st method of Ziegler
Nichols applies
 The general transfer function for this system is
P(s) 
K
sa
 The term e  st
e
 st 0

K
1
a s
1
a
e
 st 0
 Ka
1
Ta s  1
e
 st 0
is the transport lag and delays the action for
t0 seconds. Therefore L  t 0
 The term Ta is the time constant for the system. T measured on
the graph is an estimate of this.
0
PID: A Little Theory
 The method 1 PI controller applied to the loop equation is





1 
T 
1  
1
 st 0 
k p 1 
P
(
s
)

0.9
1

K
e




L s    a Ta s  1
Ti s 
K
L






0.3  


assum ing that L  t 0 ,
K  Ka
and T  T a

1 
T s  0.333  sL
 0.9 T s  0.3   1
 sL 
k p 1 
e
 0.9
e
 P(s)  
  Ts  1

T
s
L
s
L
s
T
s

1








i 

L
1
0.9
e
 sL
F  s   L
T s  0.333
 Ls  Ts  1
e
1
 f  t  L  1  t  L 
 sL
 0.9
T s  0.333
 s  Ts  1
2
tim e shifted by L
PID: A Little Theory
 In Method 2, the gain was increased until the system was
nearly a perfect oscillatory system.
 Since the gain changes the oscillatory patterns, the lowest order
system that this could represent would by a 3rd order system.
G (s) 
K
s  as  bs  K
3
2
 For this system to oscillate, there must be a solution of the
characteristic function for K real and positive where s=±wi
s  as  bs  K  0
3
2
 w i  a w  bw i  K  0 for s  w i
3
2
w i  a w  bw i  K  0 for s   w i
3
2
 K  a w  K cr  a w
2
2
and Pcr 
2
w
PID: A Little Theory
 Applying the PI Controller:
C P I ( s ) P ( s )  0.45 K cr

1.2  
K

2
1 
 3
  0.45 a w
2
Pcr s   s  as  bs  K 

2

1.2 w  
aw

1 
 3

2
2
2  s   s  as  bs  a w 

2



aw
s  0.191 w
 s  0.191 w  
2
4


C P I ( s ) P ( s )  0.45 a w 

0.45
a
w

 3
 3
2
2 
2
2
s
s

as

bs

a
w
s
s

as

bs

a
w


 

 
2
Integrator Windup
 We have tacitly assumed that the controlled devices could meet
the demands of the controls that we designed.
 However real devices have limitations that may prevent the system
from responding adequately to the control signal
 When this occurs with an integrating controller, the error which is
used to amplify the control signal may build up and saturate the
controller.
 We refer to this as “integrator windup”:
 the system can’t respond and the integrator signal is extremely large
(often maxed out on a real controller)
 the result is an uncontrolled system that can not return to normal
operating conditions until the controller is reset
Integrator Windup
 To avoid windup, a possible solution is to provide a
correcting error from the actuator by adding another loop:
(the actuator has to be extracted from the plant)
kp
++
++
+
kd s
ki
1
++
s
-1
A( s )
-1
++
P(s)
Derivative Noise Improvement
 A major problem with using the derivative part of the PID
controller that the derivative has the effect of amplifying the
high frequency components which, for most systems, is likely
to be noise.
Without PID
With PID
Derivative Noise Improvement
 One way to improve the noise rejection at higher frequencies
is to apply a second order filter that passes low frequency and
rejects high frequency
 The natural frequency of the filter should be chosen as
wn 
Nk p
kd
with N chosen to give the controller the bandwidth
necessary, usually in the range of 2 to 20
 The controller then has the design
2

ki
wn


C P ID ( s )   k p 
 kd s   2
2 
s

  s  2w n s  w n 
Static Error Constants
 If the system is of type 0 at low frequencies will be level.
 A type 0 system, (that is, a system without a pole at the origin,)
will have a static position error, Kp, equal to
lim G ( jw )  K  K p
w0
 If the system is of type 1 (a single pole at the origin) it will
have a slope of -20 dB/dec at low frequencies
 A type 1 system will have a static velocity error, Kv, equal to the
value of the -20 dB/dec line where it crosses 1 radian per second
 If the system is of type 2 ( a double pole at the origin) it will
have a slope of -40 dB/dec at low frequencies
 A type 2 system has a static acceleration error,Ka, equal to the
value of the -40 dB/dec line where it crosses 1 radian per second
Static Error Constants
Kv(dB)
G (s) 
2( s  0.1)
s ( s  0.1 s  4)
2
Error
signal
E(s)
Input
r(s)
Loop Shaping
++
Controller
C(s)
Open Loop
Signal
B(s)
Plant
P(s)
Output
y(s)
Sensor
-1
 We have seen that the open loop transfer function,
B ( s )  C ( s ) P ( s ),has
profound influences on the closed loop response
 The key concept in loop shaping designs is that there is some ideal open loop
transfer (B(s)) that will provide the design specifications that we require of our
closed loop system
 Loop shaping is a trial and error process:
 Everything is connected and nothing is independent
 What we gain in one area may (usually?) causes loss in other areas
 Often times, out best controller is a compromise between demands
 To perform loop shaping we can used either the root locus plots or the Bode
plots depending on the type of response that we wish to achieve
 We have already considered an important form of loop shaping as the PID
controller
Loop Shaping with the Bode Plot
 The open loop Bode plot is the natural design tool when designing in the
frequency domain.
 For the frequency domain, the common specifications are bandwidth, gain cross
over frequency, gain margin, resonant frequency, resonant frequency gain,
phase margin, static errors and high frequency roll off.
-3 db
Roll off Rate dB/dec
Resonant peak gain, dB
Bandwidth rps
Resonant peak frequency rps
Gain cross over
frequency rps
Loop Shaping with the Bode Plot
Increase of gain
also increases
bandwidth and
resonant gain
Poles bend the magnitude and
phase down
Zeros bend the magnitude and
the phase up
Break frequency
corresponds to the
component pole or zero
Lead and Lag Compensators
 The compensator with a transfer function
C (s)  K
sa
sb
is called a lead compensator if a<b and
a lag compensator if b>a
 The lead and the lag compensator can be used together
 Note: the compensator
sa
does add a steady state gain of
that needs to be accounted for in the final design
sb
a
b
 There are analytical methods for designing these compensators
(See Ogata or Franklin and Powell)
Lead Compensator
 The lead compensator is used to improve stability and to improve transient
characteristics.
 The lead compensator can be designed using either frequency response or root
locus methods
 Usually, the transient characteristics are better addressed using the root locus
methods
 Addressing excessive phase lag is better addressed using the frequency methods
 The pole of the system is usually limited by physical limitations of the
components use to implement the compensator
 In the lead compensator, the zero and pole are usually separated in frequency
from about .4 decades to 1.5 decades depending on the design
Lead Compensator (Frequency Design)
Note:
1) the lead compensator opens
up the high frequency region
which could cause noise
problems
2) The Lead compensator adds
phase
C (s) 
sa
sb
ab
 
a
b

1  sin f
f
wm
b1
1  sin f
a  wm 
b
Mechanical
Lead
Compensator
b2
a
xi
x0

k
y
Example
 An aircraft has a pitch rate control as shown. Design a lead
compensator for this system for a static velocity error of
4/sec, and a phase margin of 40 degrees.
Aircraft Pitch
Rate Dynamics
Compensator
R
++
2  s  .0 5 
C(s)
s ( s  0 .1 s  4 )
2
-1
Y
Example
Current System:
33
4

0.0224
K v  10
20
 0.0224
N o G ain M argin
-33dB
When design a lead
compensator first adjust
the gain to meet the static
error condition
In this case the gain needs
the be increase by 180 or
20Log10180= 45.1 dB
added
Example
Gain Adjusted System
12 dB
Then noting where the
phase currently is, that
is the desired location for
the peak of the lead phase
f spec – Pm=40-0.153
+ a small safety = 55 deg
 
a

b
1  sin f
1  sin f

0.1808
 0.0994
1.8192
a  w m   19.1 0.0994  6.0222 rps
b
a


6.0222
 60.5775 rps
0.0994
Finally adjust them as
necessary
Example
Initial design: Phase good but Kv not
Gain needs to be increased by
about 20 dB
Final design:
 60.58  s  6.022
C L ead ( s )   180  

 6.022  s  60.58
C L ead ( s )  1810
s  6.022
s  60.58
Example
 An aircraft has a pitch rate control as shown. The response of
the pitch control is under damped, sluggish has an
objectionable transient vibration mode. Design a lead
compensator that provides a damping ratio of between 0.45
to 0.50 and 5% settling time of 150 seconds which reduces
the vibration mode as much as possible.
R
++
2  s  .0 5 
C(s)
s ( s  0 .1 s  4 )
2
-1
Y
Example
The root locus from the complex poles has very little damping and causes the
vibration seen in the response. There is a pole at -0.01 on the real axis that is
dominant and causes the sluggish behavior.
Strategy: Use a lead compensator to bend the curves to the left and into the 0.6
damping region. The zero of the compensator should counteract the vibrational
mode
Example
The initial design with the pole at -5 and the zero at -1 had the desired effect
of bending the root locus to the left and removing most of the vibration. However
the pole is still too close to the origin such that 0.6 damping can not be achieved.
Example
We achieved the specifications once the pole of the compensator was moved
out to -9 and we adjusted the gain for the 0.6 damping.
Final com pensator design: C (s)=16
s 1
s9
Lag Compensator
 Lag compensators are used to improve steady state
characteristics where the transient characteristics are
adequate and to attenuate high frequency noise
 In order to not change the transient characteristics, the zero
and pole are located near the origin on the root locus plot
 The starting point for the design on a root locus is to start with
a pole location at about s = -0.001 and then locate the pole as
needed for the desired effect
 In order to not give up too much phase, the zero and pole are
located away from the phase margin frequency
Lag Compensator
Mechanical
Lag
Compensator
b2
xi
k
b1
b
a
x0
Note that the lag compensator causes
a drop in the magnitude and phase
This could be useful in reducing
bandwidth, and improving gain
margin; however it might reduce
phase margin
Example
 A linear motor has an open loop rate transfer function of
G (s) 
24
s s  2s  6
It is desired that the system have a static velocity error
constant greater than 20/sec, a phase margin of 45 degrees
plus or minus 5 degrees and gain crossover frequency of 1
radian/sec. Design a lag compensator for this system.
Linear Motor
Compensator Rate Dynamics
R
24
++
s s  2s  6
C(s)
-1
Y
Example
4.9dB
4.9
K v  10 20  1.7579
Km 
20
 11.3  use 12
1.7579
Current System:
Phase margin is
low and the static
velocity error constant
must be improved.
K  12 * 24  288
20 log 10 288  49.18
Start by correcting the
static velocity error constant
Example
Gain Adjusted:
Gain and Phase
Margin problems
Need to shape
the curve like this
Need to move PM to here
try placing a pole
at -0.01 rps and
adjust the zero
Example
Final Design
 .0 1  s  .2 0
C ( s)  12  

 .2 0  s  0 .0 1
C ( s )  0 .6
s  .2 0
s  0 .0 1
Summary
 Static Error Constants (Review)
 Loop Shaping
 Loop Shaping with the Bode Plot
 Lead and Lag Compensators
 Lead design with Bode plot
 Lead design with root locus
 Lag design with Bode plot
Next: Sensitivity Analysis
Download