Professional Documents
Culture Documents
04A
System Dynamics and Control
Spring 2013
G. Barbastathis
02/05/2013
System
Input
y(t)
May be scalar or vector
Usually can be defined by
the user
It is subject to noise (or errors)
Mechanical,
electrical, etc.
elements
Output
x(t)
May be scalar or vector
Usually the user specifies
a desired form
Sometimes it can be measured,
others it can not
If the ODEs operate on the output as well, then we refer to it as a feedback system
Can be linear or nonlinear
Speed Control
Head-Disk Tracking
Courtesy of Robert Scholten. Used with permission.
02/05/2013
Youtube user jpstanley0. This work is shared under a Creative Commons Attribution-NonCommericial-NoDerivs 2.5 License.
This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/05/2013
Speed Control
Stability Control
http://www.segway.com/
Segway. All rights reserved. This content is excluded from our Creative Commons
license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/05/2013
http://www.youtube.com/watch?v=iwIzPjS5L6w
KUKA Robotics/Headland Machinery. All rights reserved. This content is excluded from our
Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/05/2013
System Classifications
Single vs Multiple Inputs / Single vs Multiple Outputs
SIMO
MISO
MIMO
Feed-forward vs feedback
Linear vs nonlinear
02/05/2013
Feedforward vs feedback
Feedforward: acts without taking the output
into account
Example: your dishwasher does not measure the
cleanliness of plates during its operation
Plant
x(t)
Controller
02/05/2013
Michael L. Workman. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/05/2013
IEEE. All rights reserved. This content is excluded from our Creative Commons
license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/05/2013
10
2.003/2.03
We will review these here as necessary; but please refer back to your
materials from these classes, anticipating the topics that we cover
02/05/2013
11
3-062
2.678
N
2.672
02/05/2013
12
Oscilloscope
DC Power Supply
Function Generator
Power Amp
PC
Data Acquisition Hardware:
National Instruments PCI-6221
Tachometer
Rotational Plant
13
Time Varying
Frequency Dependent
Input
Dynamic
System
Output
Time Varying
Frequency Dependent
Modeling
Linear System
Theory
02/05/2013
Control System
Design
14
Hardware
BMW. All rights reserved. This content is excluded from our Creative Commons
license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
System Control
02/05/2013
Desired
response
15
Mechanical
Electrical
Fluid
Thermal
Electromechanical
Mechano-fluid
Electro-thermal
Electromechanicalfluidthermal
02/05/2013
16
Circuit-Like Analysis:
source unknown. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/05/2013
17
Input
Dynamic
System
Output
Modeling
Linear System
Theory
02/05/2013
Control System
Design
18
Linear Systems
Suppose
y1 (t)
x1 (t)
x2 (t)
y2 (t)
Corollary
ay1 (t)
02/05/2013
ax1 (t)
and
y1 (t) + y2 (t)
x1 (t) + x2 (t)
19
Modeling
y(t)
Hardware
x(t)
m1
m2
b
BMW. All rights reserved. This content is excluded from our Creative Commons
license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
x + a2 x + a1 x = b2 y + b1 y
mathematical representation
ODE
or
x1
or
a12
x1
a21 a22
x2
a11
b1
y(t)
X(s)
2 n s + n2
= 2
Y (s) s + 2 n s + n2
x
time domain
equation(s) of motion
Laplace domain
transfer function
x2
b2
State Space
y(t) = c1 c2
x1
2
02/05/2013
20
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Force balance
8
2
d
>
System ODE : < m x
dt2
(2nd order ordinary
FK
>
:
linear differential
Fdv
2 x
Equation of motion:
02/07/2013
Mg
Mg
FK0
FK0
Model
equation)
=) m
dt2
FK + Fv
=
=
-K(x - u)
-fv (x - u )
Kx + Ku
d2 x
=) m 2 =
dt
force due to
viscous damping
Kx + Ku
fv x + fv u
fv x +=)
fv u m d x + Kx + f x = Ku + f u
v
v
dt2
d2 x
=) m 2 + Kx + fv x = Ku + fv u
dt
general solution:
02/07/2013
Im(s)
Re(s)
02/07/2013
step(t) =
0,
1,
Ramp
function
ramp(t) =
t < 0;
t > 0.
0,
t,
t < 0;
t > 0.
= t step(t)
Sinusoidal
function
0,
t < 0;
f (t) =
sin(!t), t 0.
= sin(!t) step(t)
02/07/2013
(t)
Impulse
(aka delta-function
or Dirac function)
t [sec]
viscous
damping
force
one time constant
Impulse response:
equivalent to setting an initial condition v(t=0)
v(t = 0) = v0
v(t) = v0 e
t/
0. 368 e
t>0
time constant =
M
b
Step response:
f(t) is the step function (or Heaviside function)
f (t) = F0 step(t) =
v(t = 0) = 0
02/07/2013
0,
F0 ,
t < 0;
t > 0.
F0
v(t) =
1
b
t/
t>0
steady state
(final value)
0.632 1
2.004 Fall 07
Figure John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/07/2013
02/07/2013
Table John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/07/2013
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Rotational Plant
**Read the Description of the Experimental Rotational Plant**
DC motor
Power cable
Encoder output
Gear set
Flex coupling
Gear set
Copper flywheel
Flywheel
11/28/13
J 3 10
kg m2
Table John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
Figure John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
Gear transformations
Figure John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
Figure John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
02/07/2013
Damping Model
Viscous Damping
Coulomb Damping
Coulomb damping results from the sliding of two
dry surfaces. The friction generated by the relative
motion of the two surfaces is a source of energy
dissipation. It is opposite to the direction of motion
and is independent of surface area, displacement or
position, and velocity
2/13/2013
Kinetic
Static
Coulomb friction
velocity
friction
friction
velocity
Viscous friction
velocity
friction
friction
velocity
11/28/13
In-class experiment
Familiarize with the laboratory equipment and software
tools
Study the frictional characteristics of the motor, gear train,
and bearings in the flywheel system
Explore the effect of damping on the flywheel system
10
Optical Encoders
Regular phase
Quadrature phase
Hewlett Packard. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
11/28/12
source unknown. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
11/28/12
V0 (t)
!(t) =
Kt
13
Procedure
Spin the flywheel by hand, and record the angular velocity decay !(t), using the computer-based
Chart Recorder(VI),(Remember to convert the Chart Recorder output to angular velocity.)
Repeat the same procedure with one and two magnets (damper) on the flywheel
Generate clearly labeled plots and indicate, for each case, which kind of friction dominate the
damping behavior. For viscous damping, also compute the time constant . (J 3 10
kg m2 )
Extra credit: Can you determine the damping coefficient for each viscous case and torque due to
Coulomb friction (Assume the eect of Coulomb damping is significantly smaller than the eect
of viscous damping)
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks
for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
11/28/13
15
= Text (t)
Tc (t)
+ Jb !(t) = 0
For pure viscous damping: J !(t)
( Jb )t
16
Slope method
2/13/2013
2/13/2013
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
2.004 Spring 13
xh (t) = Aest .
2.004 Spring 13
The particular solution is, generally, more dicult to nd, because we need to
guess its form, depending on the input function and its derivatives, as they
appear on the righthand side. However, if the input happens to be an
exponential function
u(t) = U0 es0 t ,
then we can easily guess that the particular solution (output) would be of the
same form, i.e.
xp (t) = H0 U0 es0 t
Substituting into the ODE we obtain
ms20 + bs0 + k H0 U0 es0 t = (bs0 + k) U0 es0 t H0 =
bs0 + k
.
ms20 + bs0 + k
bs0 + k
s0 t
e
.
ms20 + bs0 + k
It was the insight of two French mathematicians, Fourier and Laplace (who
were vicious competitors and accused each other of stealing each others idea)
that the particular solution for an exponential input can be exploited in the
case of LTI (linear and time invariant) ODE as follows:
U 1 e s1 t
H 1 U 1 e s1 t
U2 es2 t
H 2 U 2 e s2 t
U1 es1 t + U2 es2 t + . . .
H1 U1 es1 t + H2 U2 es2 t + . . .
...
...
This is the superposition principle. Thus, if we can express any input function
as a superposition of exponentials, then we can nd the output of the system,
also as a superposition of exponentials. This led to the idea of the Laplace and
Fourier transforms. In this class, we consider the former only, as it is more
appropriate for calculating transient response, i.e. for t > 0 assuming initial
conditions are given for t = 0.
2.004 Spring 13
+o
0-
f (t)e-st dt.
Hz).
2.004 Fall 07
0, t < 0,
u(t) =
1, t > 0.
According to the Laplace transform defnition,
Z
Z +o
U (s) =
u(t)e-st dt =
0-
=
=
2.004 Fall 07
+o
0-
1 e-st dt =
+o
1
1 -st
e
=
0-1 =
-s
-s
0-
1
.
s
=
=
= 2
.
s
a + jw
(a + jw) (a - jw)
a + w2
Alternatively, we can represent
2
2 1/2
where |s| = a + w
is the magnitude and
6 s = atan (w/a) the phase of s.
It is straightforward to derive
1
1
1
1 -j
=
e
: =
and
s
|s|
s
|s|
2.004 Fall 07
1
= -6 s.
s
jw
|s |
ss
a
-s
=
=
2.004 Fall 07
0-
+o
1
1
-(s+a)t
e
=
0-1 =
-(s
+
a)
-(s + a)
01
.
s+a
Step
function
(aka
Heaviside)
time constant
=
1
,
a
a = 1 sec-1
2.004 Fall 07
Polynomials
Ramp
function
Quadratic
function
n=2
7DEOH-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.004 Fall 07
10
Sinusoids
2.004 Fall 07
11
<(t)
t
t=0
It represents a pulse of
infnitessimally small duration; and
fnite energy.
Mathematically, it is defned by the properties
Z +o
<(t) = 1;
(unit energy) and
-o
+o
-o
(sifting.)
7DEOH-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.004 Fall 07
12
Linearity
L [K1 f1 (t) + K2 f2 (t)] = K1 F1 (s) + K2 F2 (s),
Differentiation
i
d
f (t)
L
= sF (s) - f (0-);
dt
2
Integration
0-
f ()d =
2.004 Fall 07
F (s)
.
s
13
2
.
(s + 3)(s + 5)
(1)
We seek the inverse Laplace transform f (t) = L-1 [F (s)] :i.e., a function f (t)
such that L [f (t)] = F (s).
Let us attempt to rewrite F (s) as
F (s) =
2
K1
K2
=
+
.
(s + 3)(s + 5)
s+3 s+5
(2)
2.004 Fall 07
14
2
1
1
=
.
(s + 3)(s + 5)
s+3 s+5
From the table of Laplace transforms (Nise Table 2.1) we know that
1
L-1
s+3
1
L-1
s+5
e-3t u(t)
e-5t u(t).
and
2
1
1
L-1 [F (s)] = L-1
= e-3t - e-5t .
= L-1
(s + 3)(s + 5)
s+3 s+5
The process we just followed is known as partial fraction expansion.
2.004 Fall 07
15
J w(t)
j
+ bw(t) = Ts (t),
Ts (t) w(t)
and w(t = 0) = 0
(step function)
(no spindown).
T0
T0
1
T
1
= 0
: 0(s) =
,
s
b s (J/b)s + 1
b s( s + 1)
K2
T0 1
T0 1
1
T0 K1
0(s) =
+
=
=
.
b
s
+
1
b
s
+
1
b
s
s
+
(1/
)
s
s
2.004 Fall 07
16
J w(t)
j
+ bw(t) = Ts (t),
Ts (t) w(t)
We have found
and w(t = 0) = 0
T0
0(s) =
b
(step function)
(no spindown).
1
1
s s + (1/ )
Using the linearity property and the table of Laplace transforms we obtain
w(t) = L
-1
T0
-t/r
[0(s)] =
1-e
,
b
2.004 Fall 07
17
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Transfer function
Flywheel example
Other examples: car suspension system
2.004 Spring 13
Transfer Functions
2.004 Spring 13
2.004 Spring 13
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
System ODE: M x
(t) + fv x + Kx = bu + Ku
2.004 Spring 13
Summary
2.004 Spring 13
2.004 Spring 13
2.004 Spring 13
Derive the flywheel TF for one, two, three magnets, using the values
of moment if inertia J and viscous damping b from the previous lab
How many zeros and/or poles are there in the flywheel TF? Plot
their location(s) on the complex plane for the case of three magnets
2.004 Spring 13
If you remove two of the three magnets, will the pole(s) move to the
left or to the right? Explain the relationship of your answer to the
change you observe in the time domain.
2.004 Spring 13
2.004 Spring 13
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
2.04A Spring 13
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
Electrical resistance
2.04A Spring 13
Capacitance /1
2.04A Spring 13
Capacitance /2
2.04A Spring 13
Inductance
2.04A Spring 13
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
10
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
11
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
12
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
13
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + +
+ +
+
+
+
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
14
2.04A Spring 13
15
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
16
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
17
DC Motor as a system
Transducer:
Converts energy from one domain (electrical)
to another (mechanical)
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
18
Faraday law:
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
19
multiple windings N:
continuity of torque
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
20
multiple windings N:
continuity of torque
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
21
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
22
dissipation
(resistance of windings)
dissipation
(viscous friction
in motor bearings)
load
(inertia)
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
23
dissipation
(resistance of windings)
dissipation
(viscous friction
in motor bearings)
load
(inertia)
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
24
dissipation
(resistance of windings)
dissipation
(viscous friction
in motor bearings)
load
(inertia)
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
2.04A Spring 13
25
Open-loop
Signal
CH1
Generator
ACH
1
DC motorflywheel
system
Power
Amplifier
PC Data-
ACH2
ETACH2
Acquisition
2.004 Spring 13
26
Procedure
Make sure all devices are powered off; connect function generator, power amplifier, flywheel
system and PC data acquisition system as shown in the previous slide.
Add one magnet to the flywheel damper, open Chart Recorder to record ACH1 and ACH2;
turn on function generator, power amplifier and start experiment.
Obtain system response for a ramp function with Freq: 0.2 Hz, Amp: 0.5 V, offset: 0 V. Repeat
experiment using a sine function with same parameters. Record your response. Referring to
materials we learned from last lecture, comment on the behavior of DC motor- flywheel
system.
Use a DC signal with 0.2 V offset. Start experiment and record DC motor transient response
data. Convert voltage signal to motor speed (you will need to make use of gear ratio).
Generate appropriate plots of motor speed & amplified current V.S time. Compute mechanical
power of the DC motor.
Set your function generator to generate a square function(SQUA), set frequency to 0.04 Hz,
amplitude to 0.200V and offset to 0.100V. Collect a full period of flywheel response and
function generator signal. (You can take a screen shots of the plot in Chart Recorder)
2.004 Spring 13
27
Some Hints
Gear Ratio:
F
Gear 1
Gear 2
Unit Conversion:
44
n1
=
180
n2
Power Conservation:
2.004 Spring 13
= T (t) (t)
= Km i(t) (t)
28
2.04A Spring 13
29
2.04A Spring 13
30
0,72SHQ&RXUVH:DUH
KWWSRFZPLWHGX
$6\VWHPVDQG&RQWUROV
6SULQJ
)RULQIRUPDWLRQDERXWFLWLQJWKHVHPDWHULDOVRURXU7HUPVRI8VHYLVLWKWWSRFZPLWHGXWHUPV
Todays plan
Linearization
from pendulum equation to the harmonic oscillator
2.004 Spring 13
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
Steady-state
Note that as t, the exponential decays away, and the step response
tends to 1, i.e. the value of the driving force.
More generally, if we consider a flywheel-like viscously damped system with
equation of motion expressed as 1st order linear time-invariant ODE
J! (t) + b!(t) = f (t)
f (t) = F0 step(t)
F0
1
!(t) =
b
t/
!1 =
t>0
J
=
b
F0
b
2.004 Spring 13
It turns out that we can predict the steady state of a system directly
in the Laplace domain by using the following property known, for
obvious reasons, as the final value theorem:
limt!1 g(t) = lims!0 sG(s).
which holds generally if g(t) and G(s) form a Laplace transform pair.
F (s) =
lims!0 s(s) =
1
(s)
=
F (s)
Js + b
F0
F0
) (s) =
s (Js + b)
s
F0
b
in agreement with the result for the steady state of this system
in the previous page
2.004 Spring 13
A word on zeros
Transfer function
with a zero
H(s) =
1
1
s+z
=s
+z
D(s)
D(s)
D(s)
Derivative
operator
Amplification
(gain)
H0 (s) =
2.004 Spring 13
1
s+p
H(s) =
s+z
s+p
U (s) =
1
s
F0 (s)
1
H0 (s) =
s+p
) f0 (t) =
F (s)
s+z
H(s) =
s+p
Example:
1.8
1.6
1
1
p
pt
1
s
1
s+p
Please verify
yourselves this
partial-fraction
expansion!
t > 0.
) f (t) =
d
f0 (t) + zf0 (t) = e
dt
without
zero
2.5
1.4
1.2
f0 [a.u.]
p = 0.5;
z = 1.0
1
1 1
=
F0 (s) =
s s+p
p
0.8
pt
z
1
p
pt
t > 0.
with
zero
f [a.u.]
1
U (s) =
s
1.5
0.6
-0.5
0.4
-1
-0.5
0.5
0.2
0
2
2.004 Spring 13
4
t [sec]
10
0
2
4
t [sec]
10
0.9
0.25
0.6
0.2
f [a.u.]
0.4
0.5
0.2
0.3
0.4
0.2
0.6
0.1
0.8
4
t [sec]
Example:
2
1.8
1.6
p = 0.5;
1.4
1
2
10
2.5
1.2
f0 [a.u.]
without
zero
(lhs)
1.0
0.4
-0.5
0.6
0.7
0
2
0.8
0.8
4
t [sec]
with
zero
(lhs)
10
f [a.u.]
-0.5
0.8
f [a.u.]
1.5
0.6
-0.5
0.4
-1
-0.5
0.5
0.2
0
2
2.004 Spring 13
4
t [sec]
10
0
2
4
t [sec]
10
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
10
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
11
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
12
forced response,
sets steady state
2.004 Spring 13
13
2.004 Spring 13
14
2.004 Spring 13
15
Linearization
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
16
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
17
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Today we will
change the flywheel output so it becomes a 2nd order system
employ a feedback scheme such that we can tune the 2nd order
system response from overdamped to undamped
!(t)
R(s)
(s)
J !(t)
+ b!(t) = r(t)
1
(s)
=
R(s)
Js + b
(t) =
!(t0 )dt0
1
s
2.004 Spring 13
1
(s)
=
R(s)
s(Js + b)
Schematically,
r(t)
(t)
R(s)
(s)
+ b(t)
= r(t)
J (t)
1
(s)
=
R(s)
s(Js + b)
b/J
(s)
1
=
R(s)
s(Js + b)
has two poles: one at b/J (same as the 1st order system we had considered
earlier, when angular velocity was the output) and one at the origin. The pole at
the origin results from the integrator, i.e. the integral operation that converts
angular velocity !(t) to angular position (t).
To make the flywheel response look more like the standard 2nd order system,
we can introduce feedback. This is physically implemented by connecting the
function generator to the positive inlet of the amplifier and the output of the
position meter to the negative inlet and specifying a feedback gain K in the
computer interface. Without going into the details of the derivation (we will
do that extensively in the following weeks) the transfer function of the system
with feedback becomes
(s)
K
=
R(s)
Js2 + bs + K
The purpose of the lab is to observe experimentally that at low gain, i.e.
small values of K, the response is overdamped; whereas at high gain, i.e. for
large values of K, the response becomes underdamped.
We will verify these observations with mathematical rigor in the following weeks.
For now, please consider K as a knob which you can turn to tune the response
from overdamped to underdamped. More details will come, we promise!
b/J
b/J
2.004 Spring 13
Lab procedure
First, please read carefully the previous three introductory pages, and make sure you are
comfortable with the flywheel as a 2nd order system (now that weve defined the angular position
as output) and the role of gain K in tuning the transfer function.
Derive the roots of the polynomial Js2+bs+K=0 and verify that for small values of K they are both
real, whereas for large values of K they form a complex pair (i.e. both have the same real part,
and the imaginary parts have equal magnitude but opposite signs).
With help from your TA, verify all the connections in your system, especially where the inputs and
outputs are applied. Identify the definition of K in your digital interface.
Now use a step function as input to the flywheel, and try different values of K. Record at least two
overdamped responses (for two low values of K) and two underdamped responses (for two high
values of K) and the values of K for which you observed them.
For the underdamped responses, estimate the values of damping ratio and damped oscillation
frequency d (you will find definitions of these quantities in Lecture 07.)
Hand in printouts of your results (or email in digital form) to the TA at the end of the lab.
2.004 Spring 13
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
Theoretical tasks
Derive the values of damping ratio , natural frequency n
analytically based on the TF from the previous page
Express the conditions such that the 2nd order DC motor model
would become over/under damped
MATLAB tasks /1
Select values of R, L, b, J, Km(=Kv) such that the open-loop (OL)
response should be overdamped. Calculate the poles of the
transfer function based on your choices, and compare the rise time
of the response you get from MATLAB with the rise time that you
expect from the theory. Make sure to turn off the feedback loop by
setting the value of the gain to equal zero. Print out the MATLAB plots.
MATLAB tasks /2
Select values of R, L, b, J, Km(=Kv) such that the open-loop (OL)
response should be underdamped. Calculate the poles of the
transfer function based on your choices, and compare the rise time,
overshoot and damped oscillation frequency of the response you get
from MATLAB with the corresponding values that you expect from the
theory. Make sure to turn off the feedback loop by setting the value
of the gain to equal zero. Print out the MATLAB plots.
MATLAB tasks /3
Now set the value of the inductance L to zero, and keep the
feedback loop turned off by setting the value of the gain to equal
zero. How does the open-loop (OL) response change in MATLAB?
MATLAB tasks /4
Restore the value of the inductance L to non-zero, and select the
remaining values such that the open-loop (OL) response is again
overdamped. Now turn on the feedback loop by gradually cranking
up the value of the feedback gain. At some point, you will observe
that the response becomes underdamped (oscillatory.) Print out the
low-gain response (overdamped) and high-gain response
(underdamped) and record the value of gain where the transition
happens.
MATLAB tasks /5
In the last lab, we also had a second-order system where we
observed the response change from over- to underdamped by
cranking up the gain in the experimental flywheel system. Comment
on the difference(s) between the model for the last labs experiment
and the model used in this labs numerical exploration.
APPENDIX
MATLAB Control Systems Toolbox
Tutorial
2.004 Spring 13
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
10
Transfer functions
H(s) =
s+2
s2 + s + 10
State-space Models
A, B, C, and D are matrices of appropriate dimensions, x is the state vector, and u and
y are the input and output vectors respectively.
Note: There are also other more complex forms of linear systems
2.004 Spring 13
11
dissipation
(resistance of windings)
dissipation
(viscous friction
in motor bearings)
load
(inertia)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
12
i
!
-R
L
>
>
Km
b
> d!
:
=
i- !
dt
J
J
- KLv
- Jb
Km
J
i
!
1
L
vs
=)
8
di
R
Kv
>
>
=
i
! + vs
> dt
<
L
L
i
!
+ [0] vs (t)
2.004 Spring 13
13
sys_tf = tf(sys_dc)
sys_zpk = zpk(sys_dc)
2.004 Spring 13
14
Control System Toolbox software uses custom data structures called LTI objects.
The state-space model we have created for the DC motor is called an SS object.
There are also TF, ZPK, and FRD objects.
LTI objects enable you to manipulate linear systems as single entities using get
command in MATLAB, we can see the detailed entities.
get(sys_dc)
sys_dc.a=A_new
(This line allows you to manipulate
individual quantities)
2.004 Spring 13
15
s
s+1
s+2
,
and 2
s+5 s+6
s +s+5
Collect all numerators and denominators in cells; use the following MATLAB command:
2.004 Spring 13
16
1 s + 1 (s + 2) + s(s + 1)
+
=
s s+2
s(s + 2)
Transfer function:
s^2 + 2 s + 2
------------------s^2 + 2 s
1 s+1
s s+2
Transfer function:
2s+2
-------------s^2 + 2 s
2.004 Spring 13
17
Transfer function:
s+2
-----------------s^2 + 3 s + 1
NOTE: You can use the lft function to create more complicated feedback
structures.
2.004 Spring 13
18
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
19
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
20
You can also designate specific type of plots to view on the right hand side of
this window.
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
21
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
22
2.004 Spring 13
23
Select Import under the File menu. This opens the Import
System Data dialog box
2.004 Spring 13
24
you can open the LTI Viewer and import systems from the MATLAB
prompt.
ltiview('step', sys)
More options:
'step'
-------- Step response
'impulse' -------- Impulse response
'initial'
-------- Initial condition
'lsim'
-------- Linear simulation
'pzmap' -------- Pole/zero map
'bode'
'nyquist'
'nichols'
----------------------
Bode plot
Nyquist plot
Nichols plot
25
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
26
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
27
You can also use the lsim function at the MATLAB prompt:
Syntax: lsim(modelname)
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
28
29
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
30
Plot:
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
31
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
32
NOTE: Options for plot color and shape are optional (all in blue solid
lines)
Example: stepplot(sys1, sys2, sys3, sys4, sysN)
2.004 Spring 13
33
2.004 Spring 13
34
Controller type
Response
type
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
35
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
36
sisotool
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
37
In the
Architecture
tab, click
Control
Architecture
Select proper
architecture and
specify the sign of
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
38
In the Architecture
tab, click System Data
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
39
Compensator Design
In the Compensator Editor tab, you can manually define the
compensator form.
Right click on the Dynamics table allows you to add/delete Poles,
Zeros, Integrators, Differentiators etc.
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
40
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
41
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
42
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
43
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
44
Analysis Plot
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
45
Analysis Plot
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
46
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
47
Select File > Export in the Control and Estimation Tools Manager
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks
of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 13
48
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Feedback topology
Negative vs positive feedback
Steady-state error
General steady error determination
Steady-state error with external disturbance input
2.004 Spring 13
Why feedback?
Two reasons:
to make the system output resemble as much as possible a
given input (tracking)
example: target-tracking missiles
to reduce the effect of disturbances in the system output
example: minute adjustments in steering wheel while we
drive
2.004 Spring 13
Desired
R(s)
System
C(s)
Actual
1.8
1.6
1.4
1.2
Response [a.u.]
C(s)
1
0.8
0.6
0.4
0.2
0
2
Why?
4
t [sec]
10
C(s)
G(s)
2.004 Spring 13
C(s)
(s)
C(s) = G(s) G
(s)R(s) = R(s)
Problems
What if we dont know the transfer function exactly?
(or if there is some variation among systems manufactured in a factory)
GOOD
original (poles)
j!
BAD
compensated (zeros)
original (poles)
j!
compensated (zeros)
Systems with more zeros than poles are not physically realizable
(but they are realizable if we use digital implementation)
E.g.
G(s) =
s
(s + p1 )(s + p2 )
more poles
(s) =
(s + p1 )(s + p2 )
s
more zeros
K:
C(s)
G(s)
Feedback gain
G(s) :
Note: if
C(s)
=?
R(s)
C(s)
KG(s)
C(s)
=
R(s)
1 + KG(s)
2.004 Spring 13
Equivalent system:
Figures John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
Positive feedback
Equivalent system:
Figures John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
11
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
2.004 Spring 13
Ramp input:
Steady-state error =
ramp output as t
13
error
signal
plant &
controller
output
signal
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
14
error
signal
plant &
controller
output
signal
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
15
2.004 Spring 13
16
Disturbances
disturbance
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
17
Disturbances
disturbance
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
18
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
(1)
where we used the relationship ve = Kv for the motors backemf and we have
neglected the inductance. In the Laplace domain, this equation becomes
Vs (s) = I(s)R + Kv (s).
(2)
Next we must write the mechanical equation of motion as torque balance on the
motors shaft. The motors torque is provided by the electrical current through the
windings, and is Km i(t). There are three torques counteracting the motor: (i) the
pinion inertia J, (ii) the rotational viscous damper D, and (iii) the torque exercised
by the translational elements (mass M and translational viscous damper fv ) via the
pinion gear. Since at the moment we do not know how to express torque (iii), let us
denote it by Tp . The timedomain equation of motion of the motor shaft then becomes
Km i(t) = J (t) + D(t) + Tp (t).
(3)
(4)
(5)
(6)
We can now relate the pinion torque Tp to the pinion force Fp and the angular velocity
to the translational velocity v. Assuming that the pinion is perfectly cylindrical and
neglecting backlash or other nonlinearities due to the gears, then in the timedomain
we have
Tp (t) = rFp (t),
v(t) = r(t).
(7)
(8)
(9)
(10)
Finally, we need to collect all the above results towards a plant transfer function of
the form V (s)/Vs (s) (Laplace transform of the output velocity v divided by the Laplace
transform of the input voltage vs .) To do this, we must eliminate the intermediate
dynamical variables I(s), (s), Tp (s), and Fp (s). This is done by rst substituting (6),
Km I(s) = (Js + D)
I(s) =
(11)
Now that we have a relationship between current I(s) and translational velocity V (s),
we substitute it in (2) along with (10) to obtain
Vs (s) =
J + r2 M
D + r 2 fv
s+
rKm
rKm
RV (s) + Kv
V (s)
.
r
(12)
We are basically done; all thats left is to rewrite (12) in proper transfer function form,
clearly indicating the location of the pole:
rKm
R J + r2 M
V (s)
=
.
Vs (s)
D + r2 fv + Km Kv /R
s+
J + r2 M
(13)
m/sec
.
V
(14)
Vref
v(t)
Vtach
1
(16)
The motor circuit does not load the opamp (the reason we use the opamp in the
rst place is that it produces a voltage independent of the loadagain, under ideal
conditions.) Therefore, the source voltage applied to the DC motor in the feedback
conguration is
R2
Vs (s) =
(Vref Vtach ) K (Vref Vtach ) ,
(17)
R1
where we have denoted K R2 /R1 . We will refer to K as the feedback gain, as we
saw in Lecture 10.
Collecting the above results from the plant and the feedback loop analysis, we can
see that the feedback system is adequately represented as shown in Figure 2. The box
labeled as plant & controller represents the cascade of the opamp with the plant.2
The box labeled feedback represents the tachometer.
1
In real life we should be prepared to reproduce the units associated with each equation as needed,
and occasionally use them as sanity check!
2
The plant transfer function is particularly simple yet it includes the electrical and mechanical
dynamics of the DC motor including the rotational part (shaft with pinion) and the translational part
(rack geared to the pinion and carrying the mass load.)
Using the closedloop transfer function that we derived in class and is shown again
in Figure 2, we obtain
V (s)
0.3162K
=
.
(18)
Vref (s)
s + 2 + 0.3162K
Interpretation of the feedback transfer function
To appreciate the eect of feedback in system behavior, we start by comparing the
closedloop transfer function (18) to the plant (openloop) transfer function (14). We
observe the following:
1. The plants pole is at 2rad/sec; whereas the closedloop pole depends on the
feedback gain K and is located at 2 0.3162K. Therefore, the plants time
constant is = 0.5sec whereas the closedloop systems time constant is =
1/ (2 + 0.3162K) sec. In this system, as we increase the gain K the closedloop
system pole moves to the left on the splane; therefore, the closedloop system
response becomes faster.
2. The plants steady state value is v = 0.1581m/sec; whereas the closedloop
systems steadystate value also depends on the feedback gain K and is v =
0.3162K/ (2 + 0.3162K). In this system, as we increase the gain K the closed
loop systems steadystate value approaches 1; therefore, for large K the output
velocity is numerically approximately equal to the reference voltage Vref .
The rst observation means that we can specify (control) the feedback systems
time constant (speed) by changing the gain K. The second observation means that,
for large K, the feedback system acts to approximately match its output (velocity)
to the reference input (voltage.) In other words, if we apply a step function voltage
Vref = V0 u(t) and wait for a few time constants, the feedback systems output will
match (numerically) our reference voltage amplitude V0 . With some thought, you can
convince yourselves that, in fact, any time we change Vref externally, the system will
race to approximately match the velocity v to our new reference; and it will do so at
very high speed because high gain K also implies very small closedloop time constant.
It is important to note that, even though for large feedback gain K the closedloop
systems steady state is approximately equal to unity, it is not exactly so; the dierence
is called the steady state error and in this case it is
e = 1
0.3162K
2
=
.
2 + 0.3162K
2 + 0.3162K
(19)
Table 1 illustrates the trends described above. The feedback gain K is specied by
changing the resistance R2 . In practice, one might use a variable resistor (trimmer)
to make feedback gain adjustments more conveniently.
Its worthwhile to question the physical origin of the steadystate error (19) in
the velocity feedback system. Recall that the output of the dierential amplier, as
function of the voltages applied to the input terminals is given by (16). This can be
rewritten as
R2
Vs (s) =
E(s),
(20)
R1
5
R1 [k]
1
1
1
1
1
R2 [k]
1
2
5
10
100
K
1
2
5
10
100
[sec]
0.4317
0.3799
0.2793
0.1937
0.0297
e (%)
86.35
75.98
55.85
38.74
5.95
Table 1: Time constant, steadystate velocity and steadystate error for the velocity
control system.
where E(s) represents the Laplace transform of the error signal (see Figure 2.) In
other words, the motor is driven by a voltage proportional to the dierence between the
reference voltage and the (transduced) velocity. In response to vs , the DC motor draws
as much current as necessary from the opamp to drive the rotational/translational
loads.
Now consider a motor that is initially at rest and the sequence of events after Vref
is turned on: Since v(t = 0) = 0, the error signal at the dierential ampliers input
is initially equal to Vref . This produces a voltage vs and, in turn, provides current to
the motor to overcome the loads inertia and friction and start rotating the shaft. The
shaft rotation causes the rack to translate (via the pinion gear coupling) and, since
v(t) is now increasing, the feedback signal Vtach at the opamps terminal begins
to increase as well. This causes the error signal to decrease and, in turn, vs decreases
as well. This sequence continues until the load has reached steadystate, which in
this case we can also call terminal velocity. At steady state, there is no acceleration,
i.e. the terms , v in (3), (5) vanish. However, from these two equations we can see
that some residual torque is still required to overcome the rotational and translational
friction in the system. The dierence between the voltages at the input terminals of
the dierential amplier must, therefore, remain equal to e to provide the requisite
voltage (and current) to the DC motor so that it can keep the shaft rotating at constant
velocity despite the friction. The unfortunate outcome is that the output velocity
never reaches the numerical value of Vref ; this is, of course, undesirable, but it is an
unavoidable property of the feedback topology that we chose here. Well learn later
that other feedback topologies, e.g. the PID controller circuit that we will learn
about later, can correct this problem.
The physical description of the previous paragraph explains the origin of the terms
reference voltage and error signal. Moreover, we can also understand why the
steadystate error diminishes as the feedback gain K grows larger: the voltage vs
applied to the motor is K times the error signal; therefore, if K increases, then a
smaller error signal can drive the DC motor with a suciently large voltage vs to
overcome friction at steady state. The terminal velocity would then inch up to a
numerical value closer to Vref .
To conclude, we have plotted the unit step response of the system in openloop
conguration and feedback (closedloop) conguration sidebyside for comparison in
6
1
0.9
0.8
0.8
0.7
0.7
0.6
0.6
v [m/sec]
v [m/sec]
1
0.9
0.5
0.4
0.3
0.3
0.2
0.2
0.1
0.1
0.5
1
t [sec]
1.5
0
0
0.6
e [V]
0.7
0.5
0.4
0.3
0.2
0.1
1
t [sec]
1.5
K=1
K=2
K=5
K=10
K=100
0.8
0.5
1.5
0.9
0
0
1
t [sec]
K=1
K=2
K=5
K=10
K=100
0.5
10
i [A]
0.5
0.4
0
0
K=1
K=2
K=5
K=10
K=100
0
0
ClosedLoop current
0.5
1
t [sec]
1.5
Figure 3. The gure also includes the evolution of the current through the DC motor
and the error signal applied between the opamps terminals. We can verify the trends
described above, especially the time constant and steady state error of the closedloop
step response as we vary the feedback gain K.
We might wish, ideally, to have K because in this limit the steadystate error
is eliminated and, moreover, the systems response is speediest. In practice, this is not
possible or even desirable because of several reasons:
a) We can see from (11) that the current through the DC motor includes a term
proportional to the derivative of the translational velocity. If the velocity changes
very fast, its derivative becomes large, which means that the motor must draw
a large current from the opamp. Even though in our ideal model the opamp
can produce as much current as wed like, real life opamps can produce a limited
maximum current. If we select the feedback gain K to be large enough to require
the DC motor to draw more than the opamps available maximum current, the
opamp will saturate. This is a nonlinear eect that weve neglected in our
analysis.
b) We recall from Lecture 6 that the DC motor has a nite inductance L which we
7
can neglect if the systems response is slow enough. If we select the feedback
gain K to be large enough to require a response of time constant comparable
to the time constant due to L, then L will limit the response speed. This is
a linear eect that weve neglected in our analysis. In Problem Set 3, we ask
you to modify the model to include L, which will allow you to explore feedback
dynamics in a secondorder system.
c) There are other phenomena that weve neglected: e.g., the internal gain and input
resistance of the opamp were both assumed to be innite in the dierential
amplier model; the DC motor itself has nonlinearities (e.g. dead zone), etc.
Finally, not to mince words, we must always be mindful that if we drive too
much current through an opamp or DC motor, we might burn either or both of
them!!
The above caveats do not reduce the value of our simplied model; they just serve as a
warning that simple models, powerful as they can be with the intuitive understanding
of the physical world that they provide us with, they are limited by their inherent
assumptions. A good Engineer must know which is the minimum complexity required
to deal eectively with each given situation, and use just that amount of complexity.
(This rule is known as Occams razor.)
The last question (and perhaps the most relevant one) is: why use feedback at all?
From our analysis above, it is clear that by using feedback we can get the system to
behave in ways that its natural (openloop) physics do not allow, e.g. we can get a
faster response than the openloop system. It is also convenient that we can set the
desired output (velocity) as an external reference voltage Vref and then have the system
race to match the output to our reference input. In many cases, the most important
reason for using feedback is disturbance cancelation. We have not yet developed the
necessary tools to analyze this eect; but it is important to emphasize even now that
if the system is subject to a disturbance beyond our control, e.g. electrical noise,
mechanical vibrations, etc. which might cause the output to deviate from the desired
value Vref , then the feedback loop will act to cancel that disturbance.
A cars cruise control option is a good example of feedback action canceling distur
bances; if you have ever used cruise control, you probably know already its utility and
its limitations (e.g., if the car needs to climb a steep hill while on cruise control, the
engine might not be able to provide enough torque, and the speed then drops or the
engine might even stall.) We will examine in detail disturbance cancelation in the near
future.
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Todays goal
2.04A Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
G(s) =
N (s)
D(s)
KG(s)
KN (s)
Gclosed (s) =
=
1 + KG(s)
D(s) + KN (s)
1 + KG(s) = 0
More generally: D(s) + KN (s) = 0
2.04A Spring 13
Root locus is all values of s that satises the system characteristic equation:
1 + KG(s) = 0 or more generally: D(s) + KN (s) = 0
G(s) =
0.3162
s+2
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
Root
Locus
2.04A Spring 13
Caveat: K>0
(i.e., negative
feedback)
2.04A Spring 13
Break-in
point
Breakaway
point
Real-axis
segment
RL imaginary axis
intercept
Breakaway
point
Asymptote
angle
Departure/Arrival
angles
Branches
Asymptote
real-axis
intercept
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
Example
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
10
2.04A Spring 13
11
2.04A Spring 13
12
2.04A Spring 13
13
2.04A Spring 13
14
system response
contains undamped
terms at this point
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
15
system response
contains undamped
terms at this point
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
16
2.04A Spring 13
17
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
18
Practice 2:
2.04A Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
19
In-class Experiment 4
What Is Root Locus Design?
A common technique involving iterating on a design by
manipulating the compensator gain, poles, and zeros in the root
locus diagram.
As system parameter k varies over a range of values, the root locus
diagram shows the trajectories of the closed-loop poles of the
feedback system.
SISO Design Tool in MATLAB:
A graphical-user interface that allows the user to tune control
parameters from root locus design and system response simulation.
12/03/13
20
System Modeling
Km /N
Js + B
Ka
Kt
G(s)
21
System Parameters
22
Procedures
C(s) = a2 + b2 s,
C(s) = a3 + b3 /s
12/03/13
23
>> B=0.014;J=0.03;N=44/180;ka=2;km=0.0292;kt=0.016;
>> G=tf([ka*km/N],[J,B]);
Transfer function:
Setup transfer function
0.2389
--------------0.03 s + 0.0872
12/18/12
24
Tips 1
In the command window type in sisotool tool open the SISO
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks of The
MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or
brand names may be trademarks or registered trademarks of their respective holders.
12/03/13
25
Tips 2
Under Compensator Editor tab, create general form of
K
K
s2 + K s + K
controller model (e.g : Kd s + Kp + Ki /s = Kd
)
s
12/03/13
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks of The
MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or
brand names may be trademarks or registered trademarks of their respective holders.
2.004 Spring 12'
26
Tips 3
Select design plots you want to use and click on show design
27
Tip4
Select Step for Plot 1, check closed loop r to y. Show analysis plot
under Analysis Plot tab generates a real-time step response of your system.
(You can also look at other plots)
Courtesy of The MathWorks, Inc. Used with permission. MATLAB and Simulink are registered trademarks of The
MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or
brand names may be trademarks or registered trademarks of their respective holders.
28
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
2.004 Spring 13
Problem
Wind loading of skyscrapers causes tall building sway.
Upper floor occupants suffer from motion sickness when the building sways in the wind
since people are sensitive to accelerations as small as 0.05 m/s2 (0.005 g).
Too much building sway can also lead to long-term structural damage.
The Hancock Tower in Boston had a problem with falling windows. (The Hancock Tower
now has two passively controlled 300 ton sliding masses on the 58th floor.)
2.004 Spring 13
2.004 Spring 13
Wind force,
Fw(t)
Spring
Damper
Passive Damper
(Tuned Mass Damper)
Ground
2.04A Spring 13
Skyscrapers
Burj Khalifa Skyscraper became the tallest building (828 meters or
2,717 feet) in the world when it was officially opened on 4th
January 2010.
TIME Diagram by Joe Lertola Time, Inc. All rights reserved. This content is excluded from our
Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
Burj Khalifa
Taipei 101
2.004 Spring 13
2.004 Spring 13
2.004 Spring 13
sensor
Spring
actuator
Wind force, Fw(t)
Damper
2.004 Spring 13
Experimental System
air-bearings
voice-coils
wire spring
accelerometer
2.004 Spring 13
tall building
10
2.004 Spring 13
11
B1 and K1
2.004 Spring 13
Damper Response
B2 and K2
12
x1
x1
1
ln
= ln
=
x2
N 1 xN
Damped period
2.004 Spring 13
13
2.004 Spring 13
14
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Todays goal
2.04A Spring 13
Y (s)
X(s)
1
G(s) =
s+2
X(s)
Y (s)
OL
Open-Loop
pole
1
s+2
j!
Y (s) +
1
G(s) =
s+2
X(s)
Y (s)
Root Locus
K=1
CL
K
s+2+K
Open-Loop
pole
j!
K=0
As K varies from 0 to 1
2.04A Spring 13
X(s)
...
2
0.4
0.3
X(s)
Y (s)
0.2
OL
1
=
s+2
0.2
0.15
0.1
0
0.1
X(s)
Y (s)
OL
s+5
s+2
1 branch
0.05
0
0.05
to the left of
the single pole
0.2
0.1
0.15
0.3
0.4
8
0.1
1 branch
j (seconds )
j (seconds1)
Root Locus
2.04A Spring 13
4
3
(seconds1)
0.2
6
to the left of
the pole
3
2
(seconds1)
K
X(s)
=
Y (s) CL
s + (K + 2)
closedloop
= (K + 2) ! 1, as
pole
K!1
X(s)
Y (s)
closedloop
pole
CL
0.3
X(s)
Y (s)
0.2
OL
1
=
s+2
0.15
0.1
K=0
K=1
0
0.1
5,
as
K!1
X(s)
Y (s)
OL
s+5
s+2
1 branch
0.05
0
K=0
K=1
0.05
to the left of
the single pole
0.2
0.1
0.15
0.3
0.4
8
0.1
1 branch
1
j (seconds1)
0.2
5K + 2
!
K +1
Root Locus
j (seconds )
0.4
K (s + 5)
(K + 1) s + (5K + 2)
2.04A Spring 13
4
3
(seconds1)
0.2
6
to the left of
the pole
3
2
(seconds1)
Root Locus
2
1.5
P
finite poles
finite zeros
P
#finite poles # finite zeros
(2m + 1)
P
#finite poles # finite zeros
Root Locus
1
G(s)
=
4
(s + 1) (s + 2) (s + 3)
1
G(s) =
(s + 1) (s + 3)
3
2
0.5
j (seconds )
j (seconds1)
a = /2
0
0.5
2
3.5
2.5
2.04A Spring 13
1.5
1
(seconds1)
0.5
0.5
a = /3
1.5
4
5
8
4
3
(seconds1)
1
b
zn
X
q
1
b
pq
Root Locus
Root Locus
2
1.5
1
G(s)
=
4
(s + 1) (s + 2) (s + 3)
1
G(s) =
(s + 1) (s + 2)
3
2
0.5
j (seconds )
j (seconds1)
a = /2
0
0.5
b
2
3.5
2.5
2.04A Spring 13
1.5
1
(seconds1)
0.5
0.5
a = /3
1.5
4
5
8
1.423
4
3
(seconds1)
KG (j!x ) =
Root Locus
5
1
G(s)
=
4
(s + 1) (s + 2) (s + 3)
K = 60
!x 3.32
3
2
1
j (seconds )
a = /3
0
1
2
3
4
5
8
2.04A Spring 13
1.423
4
3
(seconds1)
Root Locus
Root Locus
j (seconds1)
1
G(s)
=
4
(s + 1) (s + 2) (s + 3)
p 2
0.5
K = 60
K = 2p
2
2
1
1.5
1
G(s) =
(s + 1) (s + 2)
j (seconds )
0
0.5
p 0
2 p 5
1
1
0
11
p 12
1
2
3
1.5
2
3.5
4
3
2.5
2.04A Spring 13
1.5
1
(seconds1)
0.5
0.5
5
8
4
3
(seconds1)
Because of Rule 4
Therefore, adding a zero makes the response
faster
stable
Root Locus
Root Locus
15
G(s) =
10
j (seconds1)
j (seconds )
s+5
G(s) =
(s + 1) (s + 3)
10
3
16
14
12
10
2.04A Spring 13
8
6
(seconds1)
s+5
(s + 1) (s + 2) (s + 3)
15
6
3
2
(seconds1)
2.04A Spring 13
10
Practice 2:
Are these Root Loci valid? If not, correct them
2.04A Spring 13
11
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
Gp (s)
plant
compensator
R(s)
C(s) +
s+z
K
s
Proportional (P)
plant
R(s)
Gp (s)
Proportional-Integral (PI)
compensator
C(s) +
K s+z
plant
Gp (s)
compensator
R(s)
Proportional-Derivative (PD)
speeds up response
improves stability (RL moves to the left)
may worsen steady state error
noisy
C(s) +
(
K2
K s+z +
s
plant
R(s)
Gp (s)
Proportional-Integral-Derivative (PID)
complete transient specification
(rise time & overshoot)
no steady-state error
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
Integral action
eliminates steady-state error; but,
by itself, the integrator slows down
the response;
therefore, a zero (derivative action)
speeds the response back up
to match the response speed
of the uncompensated system
Derivative action
speeds up the transient response;
it may also improve the steady-state error;
but
differentiation is a noisy process
(we will deal with this later
in two ways: the lead compensator
and the PID controller)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
Example
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
Gc (s) = K(s + 3)
Gc (s) = K
(proportional)
K=23.7
%OS=23.2
Tr=0.688 sec
K=35.3
%OS=27.5
Tr=0.236 sec
K=51.4
%OS=25.4
Tr=0.197 sec
K=20.86
%OS=27.2
Tr=0.305 sec
Gc (s) = K(s + 2)
(pole-zero
cancellation)
Gc (s) = K(s + 4)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
(
)
K s+z
pc+
0.3162
s (s + 2)
j
O
S=
co
ns
ta
nt
135
pc
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
K s+z
0.3162
s (s + 2)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
K s+z
0.3162
s (s + 2)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.004 Spring 13
(
)
K s+z
0.3162
s (s + 2)
PD compensator
zero
closed-loop poles
2.004 Spring 13
10
Experiments
Closed-loop position control with derivative control action:
Experiment #1: P and PD Control of Position
Experiment #2: Compare your results with a Simulink Simulation
Deliverables:
Properly annotated plots showing your results
Comments and discussions on your observations and results
3/5/2013
11
200,000x magnification
3/5/2013
12
Reset Button
VRXUFHVXQNQRZQ$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH
3/5/2013
13
P, PI and PD Controllers
P Controller
(t)
R(s)
Encoder
Kpos
R(s)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
3/5/2013
14
Ka Km /N
(s)
=
Vc (s)
Jeq s + Beq
position to velocity:
1
(s)
=
(s)
s
TF voltage to position:
3/5/2013
Gp (s) =
(s)
1 (s)
Ka Km /N
=
=
s Vc (s)
s (Jeq s + Beq )
Vc (s)
15
Let
P Control:
GCL (s) =
KKp
(s)
=
R(s)
Js2 + Bs + KKp Kpos
Common form
PD Control:
3/5/2013
GCL (s) =
s2 + 2!n s + !n2
K (Kp + Kd s)
(s)
=
Js2 + (B + Kd KKpos ) s + KKp Kpos
R(s)
16
System Parameters
J 0.03 N-m2
B 0.014 N-m-s/rad
Ka = 2.0 A/V
Km 0.0292 N-m/A
V
s
1rev
)(60 min
)( 2rad
) = 0.153 V/(rad/s)
Kt = (0.016 rev/min
N=
44
180
= 0.244
Ke 1.5 V/rad
17
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
3/5/2013
18
3/5/2013
19
Procedure EX1
Connect the computer-based as before except we need to use the EDAC2
instead of ETACH2. The set-up is very similar. Install one magnet.
Important: ALWAYS RESET EDAC2 BEFORE EACH TRIAL
(The flywheel could go out of control, be ready to stop the loop at any time.)
Before starting the experiment, spin the flywheel so that the position mark on
the flywheel is observable and define an initial position.
Set the function generator to output a DC signal with 1.0 V offset. Set Kp to 2,
3, 4 and start experiment. Record a transient response for each case.
Spin the wheel back to its initial position. Set Kp to 2 and Kd to 1. Repeat the
experiment. Try two other (reasonable) combinations of Kp and Kd control
parameters. Compare P and PD control results.
Select your favorite combination of PD control parameters, run experiment as
before after the plant reaches steady state, continuously change your DC
offset by pressing the up or down button; observe controlling of the plant.
3/5/2013
20
Procedure EXP2
Define a Matlab SISO model to represent the flywheel with voltage as
input and position as output. Simulate a P control with Kp = 2.
Change your controller design to PD. Choose 2 combinations of Kp
and Kd values from EXP1 and run simulation.
Compare your simulation with results from EXP1 and comment on
agreement or discrepancy between theory and experiment.
3/5/2013
21
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
2.04A Spring 13
2.04A Spring 13
PI compensator TF:
where
K2
=
K1 +
s
K
K1 ,
K1
K2
s+
K1
s
K2
K1
K(s + z)
=
s
Another implementation is the lag compensator, which you can learn about
in more advanced classes (e.g., 2.14.)
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
2.04A Spring 13
COMPENSATED
(PI controller)
Transient:
UNCHANGED!
Steady-state error=0
FIXED!
Nise Figure 9.7
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
In-class experiments
Elimination of steady-state error through the use of integral (I), and
proportional plus integral (PI) control.
Experiment #1: Pure Integral Control & PI Control
Experiment #2: Compare your results with a Simulink Simulation
Hand in:
Properly annotated plots showing your results.
Comments and discussions on your observations and results. (How do the
P, I, and PI control actions look and feel like?)
2.04A Spring 13
2.04A Spring 13
2.04A Spring 13
PI Controller
P Controller
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
P, I, and PI Comparison
P Control: steady-state error
I Control: overshoot, longer transient, integrator windup
Set-point
2.04A Spring 13
10
1
N
P Control:
Vss
PI Control:
A
Kp KKt
= lim = Gcl (s) = A
s!0
S
Js + B + Kp KKt
A real zero
Gcl (s) =
Vss = lim
s!0
2.04A Spring 13
(Kp s + Ki )KKt
Vt (s)
=
R(s)
Js2 + (B + Kp KKt )s + Ki KKt
A
Gcl (s)
s
(Kp s + Ki )KKt
Vt (s)
=
=A
=A
2
R(s)
Js + (B + Kp KKt )s + Ki KKt
11
Procedures
EXP1: Connect the computer-based controller same as Lab 5, install one magnet
Make function generator to produce a DC with offset = 1.0 V. Set Kp = 0, Ki = 0.5
and 0.2. Make sure power amplifier break is turned on and record system response
for 4 to 5 seconds for each case.
Set Kp = 2, and Ki = 1 and record your response data. Compute steady-state error.
Compare this result with pure integral control and pure proportional control from
Lab 5. Change Kp and Ki both to 3, repeat experiment. Discuss your results, pay
attention to the motion of flywheel when the in square wave drops down to 0.
What effect does a integrator have on system performance?
EXP2:
Modify the controller design in your Simulink model from Lab 5 to have a
Kp +of
Ki s
form
12
System Parameters
John Wiley & Sons. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
2.04A Spring 13
Problem
Wind loading of skyscrapers causes tall building sway.
Upper floor occupants suffer from motion sickness when the building sways in the wind
since people are sensitive to accelerations as small as 0.05 m/s2 (0.005 g).
Too much building sway can also lead to long-term structural damage.
The Hancock Tower in Boston had a problem with falling windows. (The Hancock Tower
now has two passively controlled 300 ton sliding masses on the 58th floor.)
2.04A Spring 13
2.04A Spring 13
Wind force,
Fw(t)
Spring
Damper
Passive Damper
(Tuned Mass Damper)
Ground
2.04A Spring 13
Taipei 101
2.04A Spring 13
Taipei Financial Center Corp. All rights reserved. This content is excluded
from our Creative Commons license. For more information,
see http://ocw.mit.edu/help/faq-fair-use/.
2.04A Spring 13
sensor
Spring
actuator
Wind force, Fw(t)
Damper
2.04A Spring 13
Experimental System
air-bearings
voice-coils
wire spring
accelerometer
2.04A Spring 13
tall building
System Modeling
Air Bearings
Relative Velocity
Sensor:
Voice Coil
Actuator:
Voice Coil
Accelerometer
Spring
Sliding
mass
Building
2.04A Spring 13
w(t)
desired
v1
v2 - v1
v1
v2 _ v1
+
-
u=
Controller
Tower
Observer
(sensors)
a(t)
3
x1
6 v1 7
7
q6
4 x2 5
v2
q = Aq + Bu
y = Cq + Du
error
3
x1
6 v1 7
6
7
4 x2 5
v2
w(t)
a(t)
(state vector)
y=
v1
v2
v1
v1
v 2 V v1
measured
(observation vector)
w(t)
a(t)
We will attempt to control the Tower using only the v2-v1 signal as input to a PID controller. Thus, we can apply all
that we learnt on SISO controllers in the class so far; performance, however, will be limited.
Using both output signals as input to the controller constitutes what is known as state-space control. It is the most
powerful of all, but falls outside the scope of our introductory class. Next week we will play around with a statespace controller to see what it can do, without going too much into the details.
2.04A Spring 13
10
Procedure #1
where
u=
y=
x1
6 v1 7
7
q6
4 x2 5
v2
w(t)
a(t)
v1
v2
(state vector)
v1
(observation vector)
11
Procedure #2
The PID_template.m code template provideGXQGHU$GdLWLRQDO
0DWHULDOVLQWKH/HFWXUH1RWHV /DEVFontains all system physical
parameters the
and it allows you to convert
system state-space transfer
function
each
to transfer functions of
output respect to each input.
parameters
Numerical values for the system
are on the last page of this
handout.
Download the template file and make sure you understand its
contents compared to the mathematical state-space representation.
Enter your A, B, C, D state-space matrices into the template and
comment on the open-loop system response to an impulse in w(t)
[abrupt and very brief knock by a wind gust.]
2.04A Spring 13
12
that equivalently models this MIMO system [we will help you.]
2.04A Spring 13
13
2.04A Spring 13
14
2.04A Spring 13
15
System Parameters
m1
m2
k1
k2
b1
b2
Kact
Ksensor
Ka
2.04A Spring 13
=
=
=
=
=
=
=
=
=
5.11 kg
0.945 kg
1120 N/m
75 N/m
0.87 N-sec/m
8.4 N-sec/m
7.1 N/A
7.1 Volts-sec/m
2 Amp/Volt
16
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
a) Derive the inverted pendulums equation of motion; then linearize the equation
that you derived by assuming that the angle is very small ( 1rad).
Answer: From the following free body diagram, the equation of motion can be
found by torque balance between the torque due to gravity, mg l; inertial torque
and the externally applied torque T (t). We nd
ml2 ;
g (t) = T (t) .
(t)
l
ml
b) With the angle as output and torque T as input, and using numerical values
l = 1.09m, m = 0.8417kg, derive the transfer function of the inverted pendulum
system.
1
(s)
1/ml2
= 2
.
T (s)
s g/l
Using the given numerical values and g = 9.81(m/s2 ), we nd the transfer func
tion as
(s)
1
1
= 2
=
.
T (s)
s 9
(s + 3)(s 3)
Note that these questions are identical to Practice Problem Set 1, Problem 3,
except here we are neglecting dissipation b.
c) Deduce from the transfer function that the inverted pendulum system is unstable.
Describe an experiment you could do with everyday objects to verify this result.
Answer: The transfer function has a pole in the righthand plane, thus the system
is unstable.
Just like the example during lectures, stabilizing a stick so that it stands vertically
without falling is a good example of an unstable system. The point is that if
the stick were to stand perfectly vertical, it would not fall; but the slightest
angular perturbation away from the vertical position (e.g. due to wind or slight
motion of your hand, etc.) will grow rapidly causing the stick to fall from its
vertical position. Because of its extreme sensitivity to perturbation the inverted
pendulum is the archetypal unstable system.
Notice that if we tried a longer stick, the unstable pole + g/l would move
closer to the real axis, i.e. the time constant would increase. This means that
the transient response become slower and easier to control! Try this with two
pens, one longer than the other and you will be convinced.
d) We will now perform a sequence of attempts to stabilize and control the inverted
pendulum. First we consider proportional (P) control. Draw the block diagram
of the proportional control system, indicating clearly and thoroughly the signals
owing over the arrows and the transfer functions of the blocks in your diagram.
Answer: The block diagram with P controller is
e) Using the root locus technique, argue that with proportional control we cannot
stabilize this system; at best, we can make it marginally stable.
Answer: The root locus of the system is as follows:
2
Root Locus
4
Imaginary Axis
4
4
0
Real Axis
As the gain K increases, the closedloop poles start moving from s = 3 along the
real axis. After they meet at s = 0, they start moving along the imaginary axis.
When the poles are on the real axis, the system is unstable. When the poles are
on the imaginary axis, the system is marginally stable. Thus this system cannot
be stabilized with a proportional (P) controller.
f ) Next we consider proportionalderivative (PD) control. Draw the modied block
diagram and root locus, and argue that the inverted pendulum system can now
be stabilized with appropriate choice of gain.
Answer: The block diagram with PD controller.
To move the closedloop poles into the lefthand plane, we need want to add a
zero in lefthand plane. There are two possibilities:
Imag Axis
5
10
Real Axis
0.8
0.6
0.4
Imag Axis
0.2
0.2
0.4
0.6
0.8
1
10
2
Real Axis
To understand why this is useful, consider the following: suppose that the error
is big, but decreasing due to previous control input, then you can aord to use
smaller control input because you dont want to generate huge overshoot. Con
versely, if the error is increasing because of a disturbance, the PD controller will
detect the fast increase as well as the rate that the error is growing and succeed
in compensating the error much better than the proportional (P) controller that
take into account the error alone.
h) Let us now design the PD controller for the following transient specications:
peak time Tp = 1.61sec and overshoot 20%. Interpret these specications as the
locations of the desired closedloop dominant poles on the splane. What is the
natural frequency of the desired (compensated) system?
Answer: From Tp = 1.61(sec) and 20% OS specication,
=
ln(%OS/100)
2
= 0.4559, and
+ ln (%OS/100)
Tp =
= 1.61(s).
n 1 2
Thus, the natural frequency n = 2.1924(rad/s), the damped natural frequency
d = n 1 2 =1.9513(rad/s), and = n = 0.9766. The desired pair of
poles are s = jd = 0.9766 j1.9513.
i) Find the location of the PD controllers zero and gain K that meet our transient
specications.
Answer: There is a systematic way of carrying out this design, and it is described
in detail in the textbook, section 9.3. We will skip this geometrical derivation
(however, if you are seriously interested in control as subject for further study,
then you should pay more attention to it; and you will see it again in more ad
vanced control electives.) We will use Matlab to carry out the design. Note,
however, that in Matlab we should dene the plant transfer function (two real
poles at s = 3) separately from the controller transfer function. To avoid con
fusion with the gain, change the following option in the Control and Estimation
Tools Manager : in the menu EditSISO Tool Preferences..., select the
tab Options and under Tuned parameters select the Zero/Pole/Gain option.
This way, Matlab will display the controllers transfer function in a manner
compatible to our notation in class.
With these steps, we nd the approximate zero location as zD 7 and closed
loop gain K 2 (Matlab gives the more accurate value 1.9519.)
j) Now get Matlab to display the step response of the PDcompensated inverted
pendulum. Explain why the overshoot is slightly higher and the peak time slightly
shorter than our design targets.
Answer: From Matlabs sisotool, the step response is as follows:
5
Step Response
3.5
Amplitude
3
2.5
2
1.5
1
0.5
0
0
Time (sec)
Note that Tp = 1.41(s) and %OS is 21.8%. This is because the damping ratio
and natural frequency n are computed by approximation of the actual system as
a 2nd order system whose poles are equal to the dominant poles of the actual sys
tem. The actual system has an additional zero due to the PD controller; therefore,
we expect the exact response to be slightly dierent: derivative action will cause
the peak time to become slightly shorter (faster) than the approximated system,
and the overshoot to become slightly larger than the approximated system.
k) What is the steadystate error? Calculate it directly from the closedloop transfer
function of your PDcompensated inverted pendulum and then verify your result
using Matlab.
Answer: The steady state value ss can be found as follows:
1
KG(s)
7.0455K
() = lim s
=
= 2.8939,
s0
s 1 + KG(s)
9 + 7.0455K
s + 7.0455
and K = 1.9519. Therefore, the steady state error
s2 9
e() = 1 y() = 1.8939 or 189.39%. Notice that the exact step response
found from Matlab in question (k) agrees well with our estimate.
where G(s) =
l) As a nal eort to correct this system, let us attempt to eliminate the steadystate
error by PID compensation without degrading the transient, if at all possible.
We maintain the same derivative term that we found from the previous questions
(since the desired transient has already been achieved) and cascade an integral
controller. Use a safety factor of 10 for the relative size of the integral controllers
zero relative to the plants stable pole. Verify with Matlab that indeed the PID
controller has eliminated the steadystate error.
Answer: We add a PI controller. The block diagram is as follows:
I
Note that the transfer function of the PI controller is s+z
not pure integrator.
s
Since the question requires to use a safety factor of 10, zI = 0.3.
(s + zI ) 1
s s2 9 = 1.
(s + zI ) 1
1 + K(s + zD )
s
s2 9
K(s + zD )
3.5
3
Amplitude
2.5
2
1.5
1
0.5
0
0
6
Time (sec)
10
12
m) Now use Matlab to adjust the gain such that the peak time requirement is met.
What goes horribly wrong when you do that? This seems to suggest that the
PID controller does not work as advertised in this case, i.e. it does not leave the
transient response unchanged. Can you explain why this system is dierent than
the PID control example that we saw in class?
Answer: At the gain K = 1.52, the step response is as follows:
Step Response
Amplitude
4
0
100
200
300
Time (sec)
400
500
600
As we try to get the desired peak time as decreasing gain K, the overshoot
becomes huge. Also when we decrease the gain more, then the system becomes
unstable.
The reason for the excessive overshoot in the PIDcompensated system is as
follows: We note that the breakaway point of the PDcompensated system (before
cascading the PI compensator) is at a very small negative value. This means that
the root locus passes very close to the origin. Therefore, the usual PI controller
assumption that the PI zeropole pair does not have a signicant total angular
contribution to the (uncompensated) root locus is no longer true. Compare the
schematics below.
Root Locus Editor for Open Loop 1 (OL1)
8
Imag Axis
8
20
15
10
Real Axis
n) Suggest a strategy to get around this problem with the same PID controller but
dierent gains, now interpreting the peak time and overshoot requirements as
upper bounds: achieve peak time less than Tp,max = 1.61sec and overshoot no
more than 20%. Calculate the nal PID controllers gains K1 , K2 , K3 (notation
same as in the Nise textbook and Lecture 33).
8
1 2
Imag Axis
10
20
15
10
Real Axis
Step Response
1.2
Amplitude
1
0.8
0.6
0.4
0.2
0
0
0.1
0.2
0.3
0.4
0.5
Time (sec)
0.6
0.7
0.8
10
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.