Upload
others
View
39
Download
0
Embed Size (px)
Citation preview
ABRIGHT Page 1 3/8/10
E102 MATLAB Control System Toolbox 1
Root Locus Design MATLAB Control System Toolbox is introduced by means of a case study of the design of a dc servomotor control system. A dc motor with the armature circuit and the rotor is shown below:
The armature circuit has resistance Ra and inductance La. The motion of the rotor causes a back emf proportional to the rotor's angular velocity e me K != & where Ke is the back emf constant. The rotor has inertia Jm, viscous friction coefficient b and experiences a disturbance torque Td. The torque exerted on the rotor by the armature is directly proportional to the armature current t aK i where Kt is the motor torque constant. The governing equations are:
Armature Circuit: a m
a a a a e
di dv i R L K
dt dt
!= + +
Rotor Dynamics: 2
2
m m
m d t a
d dJ T K i b
dt dt
! != + "
• Build the Simulink model of the dc motor
ABRIGHT Page 2 3/8/10
1
theta
Td
torque disturbance
va
armaturevoltage
1s
1s
1s
Kt
Ke
Rab
1/La 1/Jm
Rewriting the governing equations in terms of the variables, , ,m a dy u v w T!= = = gives
;a a a a e m t au i R L i K y J y w K i by= + + = + !& & && &
Taking the Laplace transform of the governing equations gives
2( ) ( ) ( ) ( ); ( ) ( ) ( ) ( )a a a a e m t a
U s I s R L sI s K sY s J s Y s W s K I s bsY s= + + = + ! Eliminate ( )
aI s gives ( )( ) ( ) ( ) ( ) ( )Y s H s U s D s W s= + where
( )( )2( ) ; ( ) ;t a a
tm a a t e
K L s RH s D s
KJ s bs L s R K K s
+= =
+ + +
We wish to control the motor’s angular position output y to track a reference command r using a controller ( )C s acting on the error e r y= ! .
The closed loop response
( ) ( ) ( ) ( )( ) ( ) ( )
1 ( ) ( ) 1 ( ) ( )
C s H s D s H sY s R s W s
C s H s C s H s= +
+ +
with closed loop error 1 ( ) ( )
( ) ( ) ( )1 ( ) ( ) 1 ( ) ( )
D s H sE s R s W s
C s H s C s H s= !
+ +
ABRIGHT Page 3 3/8/10
Design Problem Statement A dc motor has the specifications:
20.15 ; 1.2 / ; 0.6 / ; 0.6 / ; 0.05 ; 1.2m t e a aJ kgm b Nms rad K Nm A K Vs rad L H R= = = = = = !
Design a controller so that the servomotor response to a unit step reference command 1r = rad, satisfies the following specifications
1. 2% settling time < 1 s 2. Peak overshoot < 10% 3. Maximum steady state error
max0.01
sse = rad to a constant disturbance torque
dT = 0.5Nm
Root Locus Design Substituting the dc motor parameters, the plant transfer function is
( )2
80( )
32 240H s
s s s=
+ +
and the disturbance transfer function is 24
( )12
sD s
+=
We will start with a proportional controller with transfer function ( )C s P=
The characteristic equation is ( )2
801 ( ) ( ) 1
32 240
PC s H s
s s s+ = +
+ +
Rewrite the characteristic equation in the form ( )2
801 ( ) ( ) 1
32 240KG s H s P
s s s+ = +
+ +
with K = P as the adjustable gain. The root locus is a plot of the trajectories of the roots of 1 ( ) ( )KG s H s+ in the complex plane as K is varied between !" and+! . Type in the MATLAB workspace >>s=tf('s') >>GH=80/s/(s^2+32*s+240) Transfer function: 80 -------------------- s^3 + 32 s^2 + 240s
ABRIGHT Page 4 3/8/10
The command tf creates a transfer function representation in the complex variable ‘s’. The subsequent command defines the transfer function of interest. We can now use the Control System Toolbox command rlocus to draw the root locus of 1 ( ) ( )KG s H s+ >> rlocus(GH)
-80 -60 -40 -20 0 20 40-60
-40
-20
0
20
40
60Root Locus
Real Axis
Imaginary Axis
MATLAB draws the root locus for K > 0. • Draw the root locus of G(s)H(s) for K < 0. You should be able to infer that the P-control system is stable over the range 0 < K < Km. You can determine the upper bound by clicking on the root locus line and dragging the pointer to where the root locus crosses the imaginary axis. The value of Km ! 95. (Hint: You may want to zoom in on the root locus plot close to the origin for a better view). Let's choose a value of K to try to meet the overshoot specifications on the design. A 10% overshoot constraint means that the damping factor for the closed loop system should be about ζ = 0.6. Place a grid of lines of constant damping ratio ( ζ) and natural frequency (ωn) on your root locus >> sgrid
ABRIGHT Page 5 3/8/10
Now click on the root locus line and drag the pointer to where the root locus crosses the ζ = 0.6 grid line.
-14 -12 -10 -8 -6 -4 -2 0 2 4 6
-20
-15
-10
-5
0
5
10
15
0.080.180.280.380.52
0.66
0.8
0.94
0.080.180.280.380.52
0.66
0.8
0.94
2.5
5
7.5
10
12.5
15
17.5
2.5
5
7.5
10
12.5
15
17.5
20
System: GHGain: 13.5Pole: -3.96 + 5.3iDamping: 0.598Overshoot (%): 9.57Frequency (rad/sec): 6.61
Root Locus
Real Axis
Imaginary Axis
You should get a value of K! 13.5. Use this value to verify the step response of your closed loop system. Build the Simulink model of the dc servomotor control system
theta
1
torque disturbance
Td
dc Motor
Td
va
theta
Stepr
Proportional
P
ABRIGHT Page 6 3/8/10
• Run the simulation of the servomotor control system with P control 13.5P =
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
0.2
0.4
0.6
0.8
1
1.2
1.4P Control of Servomotor P=13.5
time (s)
!m
overshoot = 9 percent
settling time = 0.9 s
The overshoot and settling time specifications are met. However the steady state error
1 1.07 0.07ss sse r y= ! = ! = ! rad is outside the desired bounds. We can calculate the value of P required to meet the steady state error requirement. The steady state error is given by
0 0lim ( ) lim ( ) limsse s s
s sD(s)H(s)e e t sE s R(s)- W(s)
1+C(s)H(s) 1+C(s)H(s)!" ! !
# $= = = % &
' (
( )( )
( )2 2
80 24 /1280( ) ( ) ; ( ) ( )
32 240 32 240
sPC s H s D s H s
s s s s s s
+= =
+ + + +
( )( )
( )
( )
2 2
2 20
32 240 80 24 /12lim
32 240 80 32 240 80ss
s
s s s s se R(s)- W(s)
s s s + P s s s + P!
" #+ + +$ %=$ %+ + + +& '
For a unit input 1( )R s
s= and a constant disturbance ( ) d
TW s
s= , 2
ss de T
P= !
For a maximum steady state error max
0.01sse = , then for 0.5 100
dT P= ! "
ABRIGHT Page 7 3/8/10
If we choose the proportional gain P = 100 to satisfy the steady state requirement, the root locus shows that the response will be unstable! (poles in the RHP)
-15 -10 -5 0 5
-20
-15
-10
-5
0
5
10
15
20
0.090.190.30.40.54
0.68
0.82
0.94
5
10
15
20
5
10
15
20
0.090.190.30.40.54
0.68
0.82
0.94
System: GHGain: 101Pole: 0.194 + 15.8iDamping: -0.0123Overshoot (%): 104Frequency (rad/sec): 15.8
Root Locus
Real Axis
Imaginary Axis
Clearly we need to improve our controller design. We will examine the choice of a proportional-plus-derivative PD controller in the next part.