System Control
6-2. Motor Control
P f K Yi
Professor Kyongsu Yi
©2009 VDCL
Vehicle Dynamics and Control Laboratory Vehicle Dynamics and Control Laboratory
Seoul National University
Motor Position Control
c( )
G s 1
A
s
1 s e
R
u
1. Proportional
( ) G s K
A 1
D s s
c
( )
pG s K 1
1 ( )
e R
G s A
1 ( )
( 1) 1
1
c
p
G s s s K A R
: Type 1
p1
DG K A
s s
1 s s ( 1) s s 1
2
Motor Position Control
Unit step response : R=1 [rad]
0
1 1 1
lim 1 1 (0)
ss s
e s
DG s DG
1 0
1
: no steady state position error Ramp input response : R=t [rad]p p p [ ]
0 2 0
1 1 1 1
lim lim
1 1
ss s s p
e s
DG s K A s
0
1 1
1 1
lim
s p ps s K A K A
s
: finite error
1
p p
s s
3
Motor Position Control
2 PI control
( )
PK
ID G s K
s
2. PI control
: Type 2
s
2
1
P I
K s K A DG s s
Ramp input response : R=t [rad]
21 1 1
e 1 R
DG
2
2
1 1
1 1
p I
DG K s K A s
s s
2
1 1
p I
K s K A
s s
2
1
p Is s K s K A
lim ( ) 0
e
ss se s
: no steady state position error0
( )
ss s
4
Ch 4. Basic properties of Feedback
Feedback control system
1. Stability
2. Performance
Disturbance Rejection
Steady-state error
transient (dynamic properties)
3. Robustness : sensitivity of the system to change in model parameter
5
Stability of Feedback Systems
=
) (
) ( )
( ) ( 1
) ( )
( ) (
s Q
s P s
H s G
s G s
R s
C
Poles : s
iRe( )s 0
; stable
Re( )si 0; stable Characteristic equation
Q s( )01
0
b b
b
b s
n b
1s
n1 b
1s b
0 0 b
n n n n6
Routh’s Stability Criterion
Ch t i ti ti
=
Characteristic equation
0
0
1 1
1
b
s
b s b s
b
n n n nNumber of the characteristic equation with positive real parts
• Rooth’s Criterion
7
=Number of sign changes of the first column have the same sign
Routh’s Stability Criterion
E l 1)
=
Example 1)
240 152
72 10
) (
2 3
4
5
s s s s s
s P R
C
Two sign change
Q(s)=0 has two roots with positive real parts
unstable
unstable
8
Routh’s Stability Criterion
E l 2)
=
Example 2)
prevents completion of the array method 1)
s 11 x
4 2 3
4 2 2 1
) 5
( x x x x
s
Q
method 2)
set Q s s ( )( 1) 0
x4
set
9
two sign change unstable
E l 3)
Routh’s Stability Criterion
=
Example 3)
2
K
2
2 4 3 2
2
( ) ( 1)( 2)
( ) ( 1)( 2) 3 3 2
1 ( 1)( 2)
C s s s s s K K
R s K s s s s K s s s s K
s s s s
7 0
29K
K 149 K 010
0 14
K 9
Analog/Digital Controller
11
DC motor
J
b
K i T
m m m t a l
a
a a a a e m
J b K i T
L di R i v K dt
Negligible armature inductance and load torque disturbance
L
a 0 T
lJ
b
K i T
m m m t a l
e m a a a
J b K i T
K R i v
12
DC motor
, ( ) ( )
m m m
s s s
Speed control
1 ( ) ( ) ( )
m a t a
m a l
J R K R
s s V s T s
bR K K bR K K bR K K
bR
aK K
t e bR
aK K
t ebR
aK K
t e
s 1
m( ) s AV s
a( ) BT s
l( )
: A
Time constantVoltage gain rad/(volt sec)
:
: A B
Voltage gain, rad/(volt sec) torque gain, rad/(N m sec)
13
DC motor
( ) ( ) ( )
( ) ( ) ( )
m m m t a l
e m a a a
J s s b s K I T s K s R I s V s
Speed control
( ) ( ) ( ) /
a m m l t
I s J s b s T s K
R R
( )
a( )
a( ) ( )
e m m m l a
t t
R R
K s J s b s T s V s
K K
( ) ( ) ( )
1 ( ) ( )
e t a a m m t a a l
m a t
m a
a t e a t e
K K bR R J s s K V s R T s
J R K
s s V s
bR K K bR K K
a l( )
a t e
R T s
bR K K
a t e a t e
a t e( ) ( ) ( )
1 1
m a l
A B
s V s T s
s s
Steady –state,
v
a a T ,
l b w
ss Aa Bb
14
DC motor
Open loop control
B Tl
ref
Hr Dol
1 A
s
m
A Va
1 sec
r
H volt
rad
( open-loop transfer function)
ol ol
K volt D open loop controller
volt
m
A
H K
( open loop transfer function)D K
r ol
1
ref
H K s
1
a ol ref ol ref
ss ol ref
v D K
w A K K
K
ol A
No steady-state error when load torque
T
l 0
15
DC motor
Closed-loop(transfer function) control
B A Tl
ref
Hr Dcl
1 A
s
m
A Va
H
1 volt sec
H
cl cl
K volt D closed loop controller
volt
Hy
y
1
H sensor
rad
1 sec
r
H Input shaping volt
rad
K A B
( ) ( ) ( )
1 1
cl
m ref l
cl cl
K A B
s s T s
s K A s K A
( ) ( ) 1
m cl r cl
D A
s T s H s H D A
( )
( ) 1 1
1
cl r
ref cl y
cl y
T s H
s D H A s D H A
s
cl
f
A K
, then
,
1
m ss ref
A K
cl
cl
1
A K
m ss,
ref16
DC motor
Disturbance Rejection (non zero )
Open-loop
ss
A K
ol refB T
l
T
lss ol ref l
ref
B T
l
Closed-loop1 1
cl
ss ref l
cl cl
A K B
A K A K T
17
DC motor
Numerical Examples
1 sec, 10, 50, 100 / sec, 0.1
60 A B
refrad T
l
Open-loop
100 50 0.1 95 / sec 5%
ss
rad error
Closed-loop
A K B
0, 99 100 99 / sec
1 100
cl
l ss ref
cl
T A K rad
A K
0.5
99 0.05 98.95
1 1
cl
ss ref l
cl cl
A K B
A K A K T
로 만들자
Reject disturbances by a factor of at least 100 compared with the open loop system, 1 A Kclcl 100
cl
9.9
K
0.051% variation from the speed w/o disturbance18
DC motor
Sensitivity of System Gain to Parameter Changes
Motor Control
Open-loop
( ) ( ) ( )
1 1
m ol ref l
A B
s K s T s
s s
Closed-loop
( ) ( ) ( )
1 1
cl
m ref l
cl cl
K A B
s s T s
s K A s K A
cl( ) T s
19
DC motor
Sensitivity of System Gain to Parameter Changes
Motor Gain Variations
A A A
Open-loop
: the nominal gain ol ol ol
ol ol
T T K A A
K A K A
ol ol
T K A
( 0)
ol ol
T T s
ol ol
T K A
ol
ol
ol ol
T A
T A
; 10% error in A would yield a 10% error inTolol
1
ol
T A
T A
; sensitivity, s, of the gain from to with respect to the parameter A
ref
m20
DC motor
Sensitivity of System Gain to Parameter Changes
Motor Gain Variations
A A A
AA K
A K
1
cl
cl cl
cl
A A K
T T
A A K
1
cl cl
cl
T A K
A K
dTcl
T A
Tcl A dTcl A
Closed-loop
cl
Tcl A
dA
cl cl
T T dA A
cl cl
cl cl
dT A
T A
T A T dA
; sensitivity
Tcl
A cl
cl cl
S sensitivity of T with respect to A A dT
T dA
21 1 1
cl
cl cl cl cl
cl cl
cl
A K K K A K
A
A K A K
A K
1
1 A Kcl
; less sensitive compared to open loop
STol 1 ;
1 1
1 ;
1 10 9.9 100
ol
SA
21
Open/Closed loop control systems
controller
=
R Ts 1
k kc
controller open loop y
controller closed loop R
1 Ts
k
kc y
Open loop Transfer function 에서
k k k Ts
R y
c c
1 1
1
이 되어야 error=0 이 된다. Closed loop Transfer function 에서
k k Ts
k k k
Ts k k R
y p p
1 1
k k Ts
Ts k k
R p
p
1
1 1
Steady/ state error for 1
( ) R s
s
Open loop Transfer function 에서 e ss 0
k k k
k k e k
p p
p
ss
1
1 1 1
Closed loop Transfer function 에서
22
p p
Open/Closed loop control systems
=
예외의 경우에 대한 예>
1 ,
10
k
k 인 model error 가 있을 경우
Open loop Transfer function 에서
1 , ( ) 1.1
y k k k k
y t
, ( )
(10% steady state error)1
c
R k Ts y k
( y )Closed loop Transfer function 에서
k e k
p
ss
1 1
101 1 1 100
1
100
k k e
kp ss
let
1 k
k
1 1 1
, 0.009
100 ( )
k k , e
ss
100 1 10(11) 111
1 ( )
ss
k k k
23
The Classical Three-term Controller (PID controller)
Motor Speed Control (unity feedback)
Tl
0
( )
( ) ( )
t
a P I t D
a I
v K e K e d K de dt
V s K
U s D s K K s
Dc
e
ref
va
1 A
s /
B A
m
( ) ( ) D sc( ) KP K sD E s E s s
s1
P- control
( ) ( ) ( )
1 1
cl
m ref l
cl cl
A K B
s s T s
s A K s A K
0 0
Kcl KP, KI 0, KD 0 K K K K
PI- control
ref ma P ref m I
v K K
s
2 2
( ) ( ) ( )
1 1
P I
m ref l
A K s K Bs
s s T s
A K A K A K A K
( ) I
c P
s D s K K
s
24
2 2
( ) ( ) ( )
1 1
m ref l
P I P I
s A K s A K s A K s A K
Steady state m ref 0 Tl ref
The Classical Three-term Controller (PID controller)
Motor Speed Control (unity feedback)
PID- control ( )
( ) ( )
I
c P D
K
D s U s K K s
E s s
( )
1 1
P D
I
E s s
K T s
T s
0
Non-negligible armature inductance LLa 0
0 2 1 2
( )
a a m t e m t a a a l
m t a a a l
L s R J s b K K K v L s R T a s a s a s K v L s R T
PID control, Va KP KI K sD
ref m
s
K K
0 2 1 2 t P KI D m( ) t P KI D ref( )
a a
la s a s a K K K s s K K K s s L s R T
s s
2
3 2
( ) t D t P t I
m
K K s K K s K K
s K K K K K K
3 2
0 1 2
2
3 2
0 1 2
m( )
t D t P t I
a a
l
t D t P t I
a s a K K s a K K s K K L s R s
a s a K K s a K K s K K T
25
Ex 4.6) Ch.eq.
3 parameters for 3 ch. Roots ; arbitrary
3 2
0 1 t D 2 t P t I 0
a s a K K s a K K sK K
Ziegler-Nicholas Tuning Rules for PID controllers
+ e
_
r
1
cc
1
di
K T s
T s
uplant
Method 1) Transient response method
R(max slope)Method 1) Transient response method
PLANT
L
Stepinput
1 0.9, 3.3
c
c i
K for P control RL
K T L for PI control
RL
input
1.2, 2 , 0.5
c i d
K T L T L for PID control
RL
• This method works good if the unit step response is (sigmod)
26• This method works good if the unit step response is (sigmod)
shaped
Ziegler-Nicholas Tuning Rules for PID controllers
Method 2) Ultimate sensitivity method Method 2) Ultimate sensitivity method
PLANT
+
_
K
c1
K
c 1,
n increase
K increase
decrease
• Increase until you hit the stability limit K
c 0.5 UK K for P control
0.5
0.45 , 0.83
0.6 , 0.5 0.125
c U
c U i U
c U i U i U
K K for P control
K K T P for PI control
K K T P T P for PID control
27
PID controllers – reviews, gain tuning
Gd
d
c( ) e G s
R
u y
GP
1) ( )
P( )
I t( )
Dde u t K e t K e t dt K
0 d
( ) ( ) ( )
( )
P I t D
I
c P D
dt
G s K K K s
s
1 1
P D
i
K T s
T s
2) Ziegler-Nichols Tuning Rules
3) I - control : no steady-state error, disturbance rejection
28
3) I control : no steady state error, disturbance rejection
D - control : additional damping
Integrator Anti-windup
• PI- control
saturation
u I
P
K K
s e
R
uc y
Plant u
uc
u um in
um ax
1. Large R Large saturation integration of error, Large increases until the sign of the error changesc very large overshoot
u u u
cu
increases until the sign of the error changes very large overshoot (wind up) poor transient responseu
c2. Solution to this problem : integrator anti-windup
- “ turn off” the integral action when the actuator saturates Digital control :
(i l t ti t max) Fi 4 22
" if u u , K
I 0"
(implementation-next page) Fig 4.22
29
Integrator Anti-windup
• PI- controller with anti-windup (Fig 4.22)
i KP
KI
s e
R
uc u
saturation
uc
u um in
um ax
uI
K u
y
m a x
u
Ka uc
KP
(a)
KI
s e
R
uc u
saturation
uc
u um in
um ax
KP
uI
(b) Implementation of anti-windup with a single non-linearity saturation :
u u
y
Ka
saturation :
u u
max30
Integrator Anti-windup
• First order lag equivalent (during saturation)
e K sP KI uc
a I
sK K
(d)
Should be large enough
K
aThe anti-windup : provide local feedback to make the controller stable alone when the main loop is opened by signal saturation (and any circuit which does this will perform as anti-windup)
e
R
w
e
R
r cl
H D G y
Hy
H
v
Hr
31
Integrator Anti-windup
If , then
y r
H H
e
R
D G y
w
D G y
1
v
32
Integrator Anti-windup
Ex) The Effect of anti-windup
Consider a plant with the following transfer function for small signals Consider a plant with the following transfer function for small signals
( ) 1 G s s
and a PI controller,
( )
I2 4
c P
D s k k
s s
in the unity feedback configuration. The input to the plant is limited to .
1.0
Study the effect of anti-windup on the response of the system
33
Integrator Anti-windup
) i h i i d
2 Kp
Control
1) Without anti-windup
Step Saturation
1/s
Plant Output
4 Ki
1/s Integrator
2 K 1
Control1
2) With anti-windup
Step1 Saturation1
1/s
Plant1 Output1
Kp1
4 Ki1
1/s Integrator1
Step1 Ki1 Saturation1 Plant1 Output1
10 Ka
Integrator1
34
Integrator Anti-windup
0 4 0.6 0.8
1 without anti-windup
with anti-windup
-0.4 -0.2 0 0.2 0.4
Control
0 1 2 3 4 5 6 7 8 9 10
-1 -0.8 -0.6
ti [ ]
time [sec]
1 2 1.4 1.6
without anti-windup with anti-windup
0 6 0.8 1 1.2
Output
0 0.2 0.4 0.6
35
0 1 2 3 4 5 6 7 8 9 10
0
time [sec]
Steady-state Tracking and System Type
Fig 4 26 w
Fig 4.26
R
w
Hr Dcl G
y
Hy
v
Fig 4.26, Fig 4.27 Feedback control block diagram Fig 4.28 unity feedback systemg y y w
R
D u G y
v
DG G DG
Y R W V
1 1 1
1 1 1
DG DG DG
D DG D
U R W V
DG DG DG
1 G DG
Actual error
(not error signal in feedback loop) 1
1 1 1
G DG
E R Y R W V
DG DG DG
36
Steady-state Tracking and System Type
• Definition
The sensitivity : 1 S 1
DG
The complementary sensitivity : DG
1 1
T S DG
DG
ESRSGW TV
•
A major goal of controlto keep the error small for any input and the face of parameter changes both and should be kept small
S T
p~ frequency band
S T
37
Steady state Error in Unity Feedback control systems
=
R E(s) G(s) C(s)
) 1 (
) 1 )(
1 (
) 1 (
) 1 )(
1 ) (
(
2
1
s T s
T s
T S
s T s
T s
T s K
G
p N
n b
a
N=0 ; Type 0, N=1 ; Type 1, N=2 ; Type 2 Steady state Error 를 생각해보자
) 1 (
)
(s R s
E ( )
) ( ) 1
( R s
s s G
E
1) 일 경우 (unit step input), s s
R 1
) (
1 1 1
s
0 0
1 1 1
lim ( ) lim
1 ( ) 1 (0)
ss s s
e sE s s
G s s G
Static position error constant
; 0
k Type system kp
0
;
lim ( ) (0) ; 1
; 2
p s
yp y
k G s G Type system
Type system
1
38
; 0
1 1
; 1, 2,..
1 0
ss p
p
Type system e k
Type system
k
Steady state Error in Unity Feedback control systems
1
=
2) 12 일 경우 (unit step input), ( )
R s s
0 2 0 0
1 1 1 1
lim lim lim
1 ( ) ( ( ) 1) ( )
ss s s s
e s
G s s s G s sG s
Static velocity error constant kv
0 ; 0
lim ( ) (0) ; 1
v
Type system
k SG s G k Type system
; 0
1 1
; 1
ss
Type system
e Type system
k k
; 2, 3..
s p
Type system
v 0 ; 2, 3,..k k
Type system
3) 1 일 경우 ( i i )
3) 13 일 경우 (unit step input), ( )
R s s
3 2
0 0
1 1 1
lim lim
1 ( ) ( )
ss s s
e s
G s s s G s
Static acceleration error constant ka
0 ; 0
0 ; 1
Type system Type system
; 0,1
1 1 Type system
2 0
0 ; 1
lim ( ) (0)
; 2
; 3
a s
Type system
k S G s G
k Type system Type system
1 1
; 2
; 3, 4,..
0
ss a
e Type system
k k
Type system
39
Open/Closed loop control systems
controller
=
R Ts 1
k kc
controller open loop y
controller closed loop R
1 Ts
k
kc y
Open loop Transfer function 에서
k k k Ts
R y
c c
1 1
1
이 되어야 error=0 이 된다. Closed loop Transfer function 에서
k k Ts
k k k
Ts k k R
y p p
1 1
k k Ts
Ts k k
R p
p
1
1 1
Steady/ state error for 1 ( ) R s s
Open loop Transfer function 에서 ess 0
k k k
k k e k
p p
p
ss
1
1 1 1
Closed loop Transfer function 에서
40
p p
Open/Closed loop control systems
=
예외의 경우에 대한 예>
1 ,
10
k
k 인 model error 가 있을 경우
Open loop Transfer function 에서
1 , ( ) 1.1
y k k k k
y t
, ( )
(10% steady state error)1
c
R k Ts y k
( y )Closed loop Transfer function 에서
k e k
p
ss
1 1
101 1 1 100
1
100
k k e
kp ss
let
1 k
k
1 1 1
, 0.009
100 ( )
k k , e
ss
100 1 10(11) 111
1 ( )
ss
k k k
41
System Type for Reference Tracking
• System type : the degree of the polynomial for which the steady-state system error is a nonzero finite constant
• type 0 : finite error to be a step input which is an input polynomial of zero degree
Reference input
W V 0
1
E 1 R SR
DG
1
( )
k1( ) 1
kr t t t R
s
Steady state error
0
lim ( ) lim ( ) 1
t
e t e
ss ssE s
0
0 1
lim 1 ( )
1
1 1
lim 1
s
s k
s R s
DG s DG s
42
1 DG s
System Type for Reference Tracking
Step input
if DG has no pole at the origin, i.e.
DG (0) 0
0
1 1 1
lim 0
1 1 (0)
ss s
e s
DG s DG
Type 0
K
DG (0)
: “position error constant Type 0 , : position error constant Type 1 ,P
(0) K
DG
0
1 ( ) DG G s
s
Type 2 ,2 0
1 ( )
DG G s
s
43
System Type for Reference Tracking
System
0
0
( ) 1
n n ( )
DG G s G s
s s
: no pole at the origin
G s
0( )
0
( )
nG s K
0 1
0
1 1
lim 1
1 ( )
ss s k
n
e s
G s s s
0
( )
n0 0
lim 1
( )
n
n k
s
s
s G s s
If , then
n k e 0
, thenn k e
0 1
n k
, then1
n
e Type n
K 0
n k
, then1 1 0
e Type
K
1 K
0Type 0 ; 0, 0
1 1
ss
n k
e
K : position error const
K
0 0
1 ( ) 1
ss G s K K0: position error const
Kp
Type 1 ; 1, 1
1 1 1
ss ( )
n k
e G K K
Kv