Professional Documents
Culture Documents
Outline
specifications
open-loop shaping principle
lead and lag controllers
4 basic situations
sketch of PID controllers
Specifications (closed-loop)
Static
desired behavior w.r.t. order k inputs in terms of a maximum allowed absolute error
desired attenuation level w.r.t. constant disturbances acting on the forward loop
tracking of a sinusoidal reference
attenuation of sinusoidal disturbances and measurement noise
Dynamic
Stability
Specifications
CLOSED-LOOP System
Static
equivalent to
OPEN-LOOP System
presence of a sufficient number of poles in 0
and/or at the reference/disturbance angular
frequency sufficiently high gain (in absolute
value)
Necessary conditions require the following
structure in the controller
for sinusoidal
1
Kc
reference or
2
2
h
s +
s
disturbance
Dynamic
bandwidth B3 (and rise time tr)
!c crossover frequency
PM phase margin
taken care by
R(s)
Kc
C(s) = h R(s)
s
d1
d2
+ +
C (s)
r
m+
Kc
sh
R (s)
P (s)
+
+
C (s)
controller
Kc
sh
P (s)
R (s)
P (s)
extended plant
plant
Loop function L (s)
R (s)
dynamic
specifications
Kc
sh
P (s)
static
specifications
5
such that
phase
PM
static specs
Kc
sh
R (s)
static specs
hyp: the necessary part of the controller C (s) has been determined so we have the
extended plant
Kc
we need to determine C (s) so to satisfy also the dynamics specifications and ensure stability
specifications
!c* desired crossover frequency at which we want to have a phase margin of at least PM *
from the extended plant frequency response we need to check which action is necessary
both in terms of magnitude and phase by comparing the actual value of the magnitude and
phase at the future crossover frequency !c*
P (j)
attenuation needed
!c*
|P (j)|dB
amplification needed
|P (j)|dB
P (j)
Remember that the static specifications have already been met (if we ensure stability) and
therefore we do not want to alter this first step.
Therefore, in general, we are not going to use a
elementary functions that can provide these magnitude and phase contributions
lead
compensator
1 + a s
Ra (s) =
a s
1+ m
a
lag
compensator
i s
1+ m
i
Ri (s) =
1 + i s
a > 0
ma > 1
i > 0
mi > 1
Lead compensator
Magnitude (dB)
1 + a s
Ra (s) =
a s
1+ m
a
Phase (deg)
pole in
ma
a
zero
10
0
10
20
1
a
ma
a
pole
zero
45
0
45
pole
90
ma > 1
20
90
ma = 10
a > 0
zero in
1
a
10
Lag compensator
Magnitude (dB)
i s
1+ m
i
Ri (s) =
1 + i s
i > 0
mi > 1
20
10
1
i
0
10
20
pole
zero in
mi
i
pole in
1
i
zero
mi
i
Phase (deg)
90
mi = 10
0
45
90
zero
45
pole
11
Choice of R (s)
we assume C1 (s) (static specs) has already been chosen. Therefore we need to
by evaluating the actual values of the extended plant magnitude and phase at the desired
crossover frequency !c*, understand what action needs to be undertaken:
choose the elementary function(s) Ra(s) and/or Ri(s) (since multiple actions can be
combined) needed
(or !c*i = !)
we solve
in a
12
Universal diagrams
25
16
1 + a s
Ra (s) =
a s
1+ m
a
ma > 1
12
10
20
8
magnitude (dB)
a > 0
14
15
4
3
10
2
5
0 1
10
10
10
normalized frequency
10
70
16
60
50
phase (deg)
14
12
10
8
6
40
4
30
3
20
2
10
0 1
10
10
10
normalized frequency
10
13
Case I
40
20
30
R a (j)
0
20
20
10
Magnitude (dB)
Magnitude (dB)
40
40
60
2
10
10
10
frequency (rad/s)
10
Phase (deg)
50
0
10
20
L(j )
30
90
40
PM *
180
200
270
2
10
specs
10
10
frequency (rad/s)
!c* = !c
60
2
10
10
30
actions needed:
10
frequency (rad/s)
10
90
L(j )
180
200
P (j)
270
2
10
R a (j)
Phase (deg)
10
PM PM *
50
P (j)
50
10
10
frequency (rad/s)
10
14
60
phase (deg)
50
25
40
4
30
20
2
10
0 1
10
we have chosen
10
10
normalized frequency
10
25
16
14
12
10
20
8
magnitude (dB)
desired
phase lead
ma = 16
! = 0.5
therefore to obtain
this lead of 25 together
14
12
10
15
4
3
10
smallest amplification
obtainable (around 1 dB)
2
5
0 1
10
1 dB
0
10
10
normalized frequency
10
15
Case II
40
|P (jc )|dB
20
0
20
P (j)
L(j )
20
10
40
60
4
10
10
10
10
frequency (rad/s)
10
10
50
Phase (deg)
30
Magnitude (dB)
Magnitude (dB)
40
R i (j )
20
40
PM *
180
200
specs
10
30
90
270
4
10
10
10
10
frequency (rad/s)
10
50
60
4
10
10
10
10
10
frequency (rad/s)
10
10
PM PM *
!c*
50
30
actions needed:
magnitude: attenuation of |P (jc )|dB
phase: since
P (jc ) + > P M
Phase (deg)
R i (j )
90
P (j)
L(j )
180
200
270
4
10
10
10
10
frequency (rad/s)
10
10
16
required attenuation
16
12
- 20
10
magnitude (dB)
3
2
0 1
10
10
16
- 40
6
4
- 20
14
12
10
- 50
- 30
10
- 70
negative
values - 60
we choose i as
i = 60/0.1
10
normalized frequency
phase (deg)
- 10
mi = 8
! = 60
therefore to obtain
this attenuation of 1 dB
- 15
we have chosen
14
- 10
0 1
10
10
10
normalized frequency
10
17
mi = 8
! = 70
Ri2(s)
mi = 8
! = 200
80
0
70
R i1(j )
60
R i2(j )
P (j)
40
30
L 1 (j )
P (j)
L 2 (j )
20
Phase (deg)
Magnitude (dB)
50
10
90
L 1 (j )
L 2 (j )
0
180
R i1(j )
10
R i2(j )
200
20
30
4
10
10
10
frequency (rad/s)
10
10
10
10
10
frequency (rad/s)
10
10
Case III
40
20
0
30
|P (jc )|dB
20
40
60
4
10
10
10
10
frequency (rad/s)
10
10
Phase (deg)
50
0
20
10
L(j )
20
R a (j) P (j)
40
PM *
180
200
specs
30
90
270
4
10
R a (j)
10
Magnitude (dB)
Magnitude (dB)
40
10
!c*
10
10
frequency (rad/s)
10
P (j)
50
60
2
10
10
10
10
frequency (rad/s)
10
PM PM *
50
30
actions needed:
magnitude: amplification of |P (jc )|dB
phase: since
P (jc ) + < P M
P M P (jc ) +
Phase (deg)
R a (j)
90
180
200
L(j )
P (j)
270
2
10
10
10
frequency (rad/s)
10
19
find a lead compensator that will give simultaneously the required amplification
and phase lead
find a lead compensator that gives the required lead and gives some
amplification, integrate the required amplification with an additional gain Kc2
greater that 1.
This is usually possible since the static requirement (if any) asks for a gain
sufficiently high.
20
Kc2Ra(s)
16
60
phase (deg)
50
25
8
6
40
4
30
3
20
desired
phase lead
2
10
we can choose
0 1
10
ma = 3
! = 0.9
therefore to obtain
this lead of 25 together
10
10
normalized frequency
10
Kc2 /
[Kc2 ]dB = 20 - 2.5
25
16
14
12
10
20
8
magnitude (dB)
14
12
10
15
we can obtain an
amplification of 2.5 dB)
10
2
5
2.5 dB
Lanari: CS - Loop shaping
Sunday, November 30, 2014
0 1
10
10
10
normalized frequency
10
21
60
14
12
phase (deg)
ma = 6
! = 0.8
10
50
8
6
40
ma = 6
! = 7.5
4
30
3
20
2
10
0 1
10
10
10
normalized frequency
10
40
30
50
R a 1(j)
30
R a 2(j)
20
R a 2(j)
R a 1(j)
Phase (deg)
Magnitude (dB)
10
0
10
20
L 2 (j )
90
L 2 (j )
30
180
L 1 (j )
40
10
10
frequency (rad/s)
L 1 (j )
P (j)
P (j)
50
60
2
10
200
10
270
2
10
10
10
frequency (rad/s)
10
22
Case IV
40
|P (jc )|dB
20
0
20
20
R a (j)
10
40
60
2
10
10
10
frequency (rad/s)
10
50
Phase (deg)
30
Magnitude (dB)
Magnitude (dB)
40
10
R i (j )
20
30
90
40
PM *
180
200
270
2
10
specs
10
!c*
10
frequency (rad/s)
50
60
3
10
10
P
R a P
L = R i R a P
2
10
10
frequency (rad/s)
P (jc ) + < P M
P M P (jc ) +
R i (j )
Phase (deg)
R a (j)
30
actions needed:
10
PM PM *
50
10
90
180
200
P
R a P
L = R i R a P
270
3
10
10
10
frequency (rad/s)
10
10
23
we choose the lead compensator first in such a way to obtain a phase increase of the
required 25 plus an extra (for example of 8) in order to compensate the lag that will be
introduced by the lag compensator
This lead function will also introduce, at the chosen frequency, an amplification of exactly
a (j )|dB
|R
c
34
2.5 dB
mi = 3.2
! = 20
-10.5 dB
< 8
(these numbers are just for illustration purposes and have not been verified)
24
PID controllers
3 basic heuristic actions
Proportional: the control action is set to be directly proportional to the system error (present)
Integral: the control action is set to be proportional to the system error integral (past)
Derivative: the control action is set to be proportional to the system error derivative (future)
output of the
controller
e (s)
m(t) = KP e(t) + KI
m (s)
CPID (s)
e( )d + KD e(t)
m(s)
CP ID (s) =
e(s)
KI
KP +
+ KD s
s
1
KP 1 +
+ TD s
TI s
with
KP
TI =
KI
TD
KD
=
KP
widely spread
fixed structure with 3 tunable parameters KP KD KI
can be tuned automatically even with scarce knowledge of the (simple) plant
basic tuning refers only to static specifications
25
Derivative action is physical not realizable (improper transfer function) we need to approximate
add a high frequency pole in
KP
N
s=
N =
KD
TD
a
CD
(s)
TD s
=
TD
1+ N s
Magnitude (dB)
60
40
tive
a
v
i
r
l de
a
e
d
i
20
0
approx
20
N = 10, 20, 50, 100
40
2
10
10
10
10
frequency (rad/s)
10
10
Phase (deg)
ideal derivative
approximated
derivative action
for various values of N
90
45
N = 10, 20, 50, 100
0
2
10
10
10
10
frequency (rad/s)
10
10
26
CaPID (s)
1
r
1
KI s
+
+ +
m
KP
P (s)
TD s
TD
1+ N s
proportional
proportional + derivative (approximate)
proportional + integrative
27
PD configuration
30
CPa D (s)
= KP
sTD
1+
1 + s TND
= KP
1 + TD NN+1 s
N +1
1
+ N +1 TD N
1/ma
Magnitude (dB)
20
10
0
10 2
10
Phase (deg)
KP = TD = 1, N = 10
1
1+
sTI
KP (1 + TI s)
=
TI
s
Magnitude (dB)
CP I (s) = KP
10
10
10
10
frequency (rad/s)
10
10
10
KP = TI = 1
20
0
2
10
10
10
10
10
frequency (rad/s)
10
10
10
frequency (rad/s)
10
10
10
Phase (deg)
10
10
10
frequency (rad/s)
40
45
0 2
10
PI configuration
10
28
Vocabulary
English
Italiano
lead compensator
funzione anticipatrice
lag compensator
funzione attenuatrice
phase lead
anticipo di fase
phase lag
ritardo di fase
attenuation
attenuazione
amplification
amplificazione
open-loop shaping
29