You are on page 1of 37

Controls Lecture 2

ME4053
Control of a DC Motor
Dr. Ferri
2nd-order DC Motor Model
where
) (
b t a
L a
m
K K b R
J R
T
+
=
) (
b t a
t
m
K K b R
K
K
+
=
( ) 1 ) (
) (
+
=
O
s T s
K
s V
s
m
m
Proportional Control (P-control)
O R E
K
p

M
error actuator
( ) 1 + s T s
K
m
m
( ) ( ) 1 1 +
=
+
=
s T s
K
s T s
K K
G
m m
m p
ol
( )
m m
m
m
T K s T s
T K
K s T s
K
Gcl
/ ) / 1 (
/
1
2
+ +
=
+ +
=
open-loop transfer function:
closed-loop transfer function:
with P-control, m(t) = Kp e(t)
m m
m
T K s T s
T K
Gcl
/ ) / 1 (
/
2
+ +
=
2
/ 4 ) / 1 ( / 1
,
2
2 1
m m m
T K T T
s s

=
Closed-loop poles = roots of denominator of cl-transfer function
0 / ) / 1 (
2
= + +
m m
T K s T s
0 2
2 2
= + +
n n
s s e e ,
Compare characteristic equation with standard form
See that
and
m
m p
m
n
T
K K
T
K
= = e
m m p m
T K K T K 2
1
2
1
= = ,
Root Locus
Real
Imag
-1/Tm
Root Locus
Real
Imag
-1/Tm
K = 0
Closed-loop pole locations
Root Locus
Real
Imag
-1/Tm
K = 0.1/Tm
-1/2Tm
Root Locus
Real
Imag
-1/Tm
K = 0.2/Tm
-1/2Tm
Root Locus
Real
Imag
-1/Tm
K = 0.25/Tm
-1/2Tm
Root Locus
Real
Imag
-1/Tm
K = 0.4/Tm
-1/2Tm
Root Locus
Real
Imag
-1/Tm
K = 0.5/Tm
-1/2Tm
45
O

Root Locus
Real
Imag
-1/Tm
-1/2Tm
0 2 4 6 8 10 12 14 16 18
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
K = 0.1, , = 1.58
K = 0.25, , = 1
K = 0.5, , = 0.707
K = 1, , = 0.5
K = 5, , = 0.22
Time
u
Tm = 1 sec
Unit Step Response, dependence on proportional gain
0 2 4 6 8 10 12
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
Time-domain performance specifications
t
u
unit step response
tr , rise time
=/- 2% of uss
ts , settling time
Mp = max % overshoot
n
s
t
e ,
4
~
|
|
|
.
|

\
|

=
2
1
exp
,
t ,
p
M
Settling time: (usually conservative)
Max % overshoot:
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
,
Mp
Performance Specifications
5% max percent overshoot, Mp = 0.05
But, Mp depends only on ,:
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
,
Mp
|
|
|
.
|

\
|

=
2
1
exp
,
t ,
p
M
m m p m
T K K T K 2
1
2
1
= = ,
m m
2
p
1
4
1
T K
K
,
=
2nd performance specification: ts = 2.5 sec
What is the time constant of a second-order underdamped system?
2 2
2
) (
) (
n n
s s
K
s R
s C
e e , + +
=
for impulsive input, r(t) = o(t), R=1
Time constant corresponds to
n
t
e ,
t
1
= =
-1
ts= 4t
) cos( ) exp( ) ( e e , + = t t A t c
d n
Specifying Mp and ts (or , and t) completely determines the cl poles
0 2
2 2
= + +
n n
s s e e ,
d n n n
i i s s e e , , e e , = =
2
2 1
1 ,
Real
Imag
en
-,en = -1/t
ed
|
, = sin(|)
see that specifying ,
and t locates cl pole
Root Locus with P-control
Real
Imag
-1/Tm
-1/2Tm
line of constant ,
line of constant t
desired cl
pole locations
Root Locus with P-control
Real
Imag
-1/Tm
-1/2Tm
line of constant ,
line of constant t
desired cl
pole locations
See that we can satisfy
the , (or Mp ) requirement,
but not the time-constant
(or ts) requirement with
P-control alone
Proportional plus Derivative Control (PD-control)
O R E
M
error actuator
( ) 1 + s T s
K
m
m
with PD-control,
s K K
d p
+
) ( ) ( ) ( t e K t e K t m
d p
+ =
t
e
high e is corrected
with Kp
high e is corrected
with Kd
.
PD anticipates large
future error
Open-loop transfer function:
Closed-loop transfer function:
( )
( ) 1 +
+
=
s T s
K s K K
G
m
m d p
ol
( )
( ) ( ) 1 + + +
+
=
s T s K s K K
K s K K
G
m m d p
m d p
cl
( ) ( )
2 2 2
2
/
/ / ) 1 (
/
n n
m m d p
m m p m m d
m m d p
cl
s s
T K s K K
T K K T K K s s
T K s K K
G
e e , + +
+
=
+ + +
+
=
m
m p
n
T
K K
= e See that:
m n
m d
T
K K
e
,
2
1 +
=
and
ds
nd
4
t ,
e =
m
m
2
nd
K
T
K
p
e
=
m
m nd
1 2
K
T
K
d

=
e ,
PD design procedure:
OL TF:
( )
( ) 1 +
+
=
s T s
K s K K
G
m
m d p
ol
Real
Imag
PD Root Locus
z
-1/Tm
d p
K K z / =
Zero at:
Desired pole location
-1/td
,d
OL TF:
( )
( ) 1 +
+
=
s T s
K s K K
G
m
m d p
ol
Real
Imag
PD Root Locus
z
-1/Tm
d p
K K z / =
Zero at:
Desired pole location
-1/td
,d
Move zero left or right to make the root locus
pass through the desired cl pole location
OL TF:
( )
( ) 1 +
+
=
s T s
K s K K
G
m
m d p
ol
Real
Imag
PD Root Locus
z
-1/Tm
d p
K K z / =
Zero at:
-1/td
,d
Implementation issues of PD-control
Pure derivative is not a good idea because of noise. Instead of
s
E
M
=
25
25
+
=
s
s
E
M
Approximates a pure derivative at low frequencies (below 25 rad/s)
then levels off so that high-frequency noise is not amplified
Note that closed-loop system has a zero in the numerator- this zero
can sometimes destroy predicted response. In particular, it can give
rise to much larger overshoot then implied by , of cl poles
use
Proportional plus Derivative plus Integral Control (PID-control)
O R E
M
error actuator
( ) 1 + s T s
K
m
m
with PID-control,
t
e
As time grows, integral of error increases, causing m(t) to grow
s
K
s K K
i
d p
+ +
}
+ + = dt e K t e K t e K t m
i d p
) ( ) ( ) (
Low but nonzero steady-state error
Open-loop transfer function:
Closed-loop transfer function:
( )
( ) 1
2
2
+
+ +
=
s T s
K K s K s K
G
m
m i d p
ol
( )
m m i m m p m m d
m m i d p
cl
T K K T K K s T K K s s
T K K s K s K
G
/ / / ) 1 (
/
2 3
2
+ + + +
+ +
=
Compare with the following third-order form:
( )
( )
2 2
2
2 ) (
/
n n
m m i d p
cl
s s s
T K K s K s K
G
e e , o + + +
+ +
=
Choose o, then equate coefficients of powers of s in the denominators
of each expression for Gcl to get 3 equations for Kp, Kd, and Ki
How do we choose o?
Real
Imag
-,en
-o
Choose n to be around 5 so that system
appears to have 2nd-order characteristics
o= n,en
Desired cl pole locations
m
m
2
nd nd
) 2 (
K
T
K
p
e ,e o +
=
m
m nd
1 ) 2 (
K
T
K
d
+
=
o ,e
m
m
2
nd
K
T
K
i
oe
=
PID Gains:
nd
e , o n =
n = your choice
Linear Simulink Model
- Tm.s +s
2
Km(s)
Transfer Fcn2
25s
s+25
Transfer Fcn1
1
s
Transfer Fcn
Time
To Workspace2
Pos
To Workspace1
DesPos
To Workspace
Sum2
Sum1
Sum
Kp
P
Ki
I
Discrete Pulse
Generator
Kd
D
30
Constant
Clock
Nonlinear Simulink Model
-
-
Tm.s +s
2
Km(s)
Transfer Fcn2
25s
s+25
Transfer Fcn1
1
s
Transfer Fcn
Time
To Workspace2
Pos
To Workspace1
DesPos
To Workspace
Sum2
Sum1
Sum
Sign
Saturation
Product
Kp
P
Ki
I
Discrete Pulse
Generator
Dead Zone
Kd
D
30
Constant
Clock
|u|
Abs

X

Input
Output
Tm.s +s
2
Km(s)
Transfer Fcn2
25s
s+25
Transfer Fcn1
1
s
Transfer Fcn
Time
To Workspace2
Pos
To Workspace1
DesPos
To Workspace
Sum2
Sum1
Sum
Sign
Saturation
Product
Kp
P
Ki
I
Discrete Pulse
Generator
Dead Zone
Kd
D
30
Constant
Clock
|u|
Abs
Dead Zone
Saturation
Input Output
Tm.s +s
2
Km(s)
Transfer Fcn2
25s
s+25
Transfer Fcn1
1
s
Transfer Fcn
Time
To Workspace2
Pos
To Workspace1
DesPos
To Workspace
Sum2
Sum1
Sum
Sign
Saturation
Product
Kp
P
Ki
I
Discrete Pulse
Generator
Dead Zone
Kd
D
30
Constant
Clock
|u|
Abs
Upper
Limit
Lower
Limit
Upper
Limit
Lower
Limit
MATLAB
Dead Zone
Experimental
Dead Zone
in
out
in
out
Alternative Nonlinear Simulink Model
Km
Tm.s +s
2
Transfer Fcn2
25s
s+25
Transfer Fcn1
1
s
Transfer Fcn
Time
To Workspace5
DesPos
To Workspace4
Pos
To Workspace2
Saturati on
Product1
Product
1
u
Math
Function
Kd
Gain3
Ki
Gain2
Kp
Gain1
Discrete Pulse
Generator
Dead Zone
1e-6
Constant2
30
Constant1
Clock
If your Simulink model runs
Try using the alternative dead zone model
Try using a different ODE solver
ODE45
ODE23
ODE113
If all else fails: Make a small change in your
gains
very slowly. . .
1. You must include results of week 1
2. Discuss the results of the qualitative investigation of the
P, I and D controllers
3. Compare the SIMULINK models with experimental
results
4. When you compare with a theoretical result you must
show where the theoretical result comes from i.e . the
equation or the model.
5. Data must support your conclusions
6. Make your own sketch of the experiment
Guidance for Controls Reports:

You might also like