You are on page 1of 333

2.

04A
System Dynamics and Control
Spring 2013
G. Barbastathis

02/05/2013

2.004 System Dynamics and Control Spring 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

Described by ordinary differential equations (ODEs) operating on the input (dynamics)

If the ODEs operate on the output as well, then we refer to it as a feedback system

Can be linear or nonlinear

The purpose of control is to ensure that the output


waveform resembles the waveform desired by the user,
despite the systems dynamics and disturbances by noise
Usually, control requires feedback
02/05/2013

2.004 System Dynamics and Control Spring 2013

Example1: Hard Disk Drive (HDD)

Photograph on the right 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/.

Speed Control
Head-Disk Tracking
Courtesy of Robert Scholten. Used with permission.

02/05/2013

2.004 System Dynamics and Control Spring 2013

Hard Disk Drives

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

2.004 System Dynamics and Control Spring 2013

Example 2: The Segway

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

2.004 System Dynamics and Control Spring 2013

Example 3: Manufacturing Automation

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

2.004 System Dynamics and Control Spring 2013

System Classifications
Single vs Multiple Inputs / Single vs Multiple Outputs

SISO (single input - single output)

SIMO

MISO

MIMO

Feed-forward vs feedback
Linear vs nonlinear

02/05/2013

2.004 System Dynamics and Control Spring 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

Feedback: the output is specified by taking


the input into account (somehow)
y(t) +

Plant

x(t)

Controller

02/05/2013

2.004 System Dynamics and Control Spring 2013

HDD Control System

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/.

Michael L. Workman, PhD thesis,


Stanford University, 1987.

Karman Tam et al, US Patent 5,412,809


The inventors. All rights reserved. This content is excluded
from our Creative Commons license. For more information,
see http://ocw.mit.edu/help/faq-fair-use/.
Source: Figure 1 of patent US 5412809 A

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/.

2.004 System Dynamics and Control Spring 2013

2.04A Learning Objectives

Learn the process of modeling linear time-invariant (LTI) dynamical


systems in dual domains: in the time domain using ordinary differential
equations and in the Laplace domain (s-domain).

Understand the behavior of LTI systems qualitatively and quantitatively,


both in the transient and steady-state regimes, and appreciate how it
impacts the performance of electro-mechanical systems.
Introduce feedback control and understand, using the s-domain
primarily, how feedback impacts transient and steady-state
performance.
Learn how to design proportional, proportional-integral, proportionalderivative, and proportional-integral-derivative feedback control
systems meeting specific system performance requirements.

Introduce qualitatively the frequency response of LTI systems and how


it relates to the transient and steady-state system performance.

02/05/2013

2.004 System Dynamics and Control Spring 2013

10

What you need

8.01 and 8.02


basic behavior of mechanical and electrical elements
18.03
Linear ordinary differential equations (ODEs) and systems of ODEs
Laplace transforms

2.003/2.03

from a physical description of system, derive the set of ODEs that


describe it

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

2.004 System Dynamics and Control Spring 2013

11

Lab Rules - IMPORTANT!!


You must stay within the designated
2.04A/2.004 lab space
No working on other classes (e.g. your 2.007
project) allowed in the machine shop
ENTER

3-062

2.678

N
2.672

02/05/2013

2.004 System Dynamics and Control Spring 2013

12

Lab: Equipment Overview

Oscilloscope

DC Power Supply
Function Generator

Data Acquisition Interface Panel

Power Amp

PC
Data Acquisition Hardware:
National Instruments PCI-6221
Tachometer

Rotational Plant

Please read the equipment description before before Thu PM lab!


02/05/2013

2.004 System Dynamics and Control Spring 2013

13

Framework for system control


Mechanical, Electrical, Fluid, Thermal

Time Varying
Frequency Dependent

Input

Dynamic
System

Output

Time Varying
Frequency Dependent

Real Physical System


Multi-Domain Ideal Elements
Network Representations

Modeling

Idealized Representation: Lumped Model


State Variables and LODEs

Resulting Equations of Motion


Laplace Transforms

Transfer Function Representations


Pole Zero Analysis

Linear System
Theory

Frequency Response Analysis

Standard Inputs and Prediction of Responses


Transient Response
Bode Diagrams

System Design Changes;Feedback Control


Steady State Errors
Input Tracking
Response Shaping

Desired Input - Output Response

02/05/2013

Control System
Design

2.004 System Dynamics and Control Spring 2013

14

Example: Car Suspension


System modeling

Model: ordinary differential equation (ODE)


or other mathematical representation

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 dynamics (as is)


Response
Model

System Control

02/05/2013

Desired
response

2.004 System Dynamics and Control Spring 2013

15

Physical realization of systems

Mechanical
Electrical
Fluid
Thermal
Electromechanical
Mechano-fluid
Electro-thermal
Electromechanicalfluidthermal

02/05/2013

2.004 System Dynamics and Control Spring 2013

16

Complex Interconnected Systems?

Combine Mechanical, Electrical


Fluid and Thermal
Common Modeling Method
Linear, Lumped Parameter

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/.

Common Analytical Tools


Linear System Theory

2.12, 2.14, 2.151

Powerful Design Tools


Feedback Control

02/05/2013

2.004 System Dynamics and Control Spring 2013

17

A simple modeling example


Mechanical, Electrical, Fluid, Thermal

Input

Dynamic
System

Output

Real Physical System


Multi-Domain Ideal Elements
Network Representations

Modeling

Idealized Representation: Lumped Model


State Variables and LODEs

Resulting Equations of Motion


LaPlace Transforms

Transfer Function Representations


Pole Zero Analysis

Linear System
Theory

Frequency Response Analysis

Standard Inputs and Prediction of Responses


Transient Response
Bode Diagrams

System Design Changes;Feedback Control


Steady State Errors
Input Tracking
Response Shaping

Desired Input - Output Response

02/05/2013

Control System
Design

2.004 System Dynamics and Control Spring 2013

18

Linear Systems
Suppose
y1 (t)

x1 (t)

x2 (t)

y2 (t)

The system is linear iff


ay1 (t) + by2 (t)

ax1 (t) + bx2 (t)

a, b : constant scalar or tensors

Corollary
ay1 (t)

02/05/2013

ax1 (t)

and

y1 (t) + y2 (t)

x1 (t) + x2 (t)

2.004 System Dynamics and Control Spring 2013

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

Idealized Lumped Parameter Model

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

2.004 System Dynamics and Control Spring 2013

20

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Car suspension model

Mass spring viscous damper system


Free body diagram (no motion)

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

force due to spring


in equilibrium
force because spring
changes length
during motion

Model

equation)

Free body diagram

=) 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

2.004 System Dynamics and Control Spring 2013

General Linear Time-Invariant (LTI) system


dnx
d n 1 x
dnx
dx
dmy
d m 1 y
d1y
an n + an 1 n 1 + an 2 n La1 + a0 x = bm m + bm 1 m 1 + Lb1 1 + b0u
dt
dt
dt
dt
dt
dt
dt
nth-order Linear Ordinary Differential Equation (ODE)
with constant coefficients (time-invariant)

general solution:

x(t) = xhomogeneous (t) + xforced (t)


homogeneous solution: y=0 (no forcing term)
forced solution: a guess solution for the system behavior when y(t)0

02/07/2013

2.004 System Dynamics and Control Spring 2013

Homogeneous and forced solutions


Homogeneous solution:

Im(s)

x(t) = C0 + C1es1t + C2 es2 t + L + Cn esn t


where in general
si = i + j (complex number)

Re(s)

Forced solution: sometimes difficult to guess


but for specific forces of interest, quite easy.
For example, if y(t)=constant, then yforced=constant
as well (but a different constant!)

02/07/2013

2.004 System Dynamics and Control Spring 2013

Commonly used input functions


Step function
(aka Heaviside)

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

2.004 System Dynamics and Control Spring 2013

(t)

Impulse
(aka delta-function
or Dirac function)

t [sec]

1st order system


M v + bv = f (t)
mass

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

2.004 System Dynamics and Control Spring 2013

1st order system: step response

steady state
(final value)

0.632 1

Nise Figure 4.3


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/.

2.004 Fall 07

Lecture 06 Monday, Sept. 17

How is this different than the car suspension system?

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

2.004 System Dynamics and Control Spring 2013

2nd order system: step response

02/07/2013

2.004 System Dynamics and Control Spring 2013

Mechanical system components:


translation

Nise Table 2.4

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

2.004 System Dynamics and Control Spring 2013

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

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

2.004 Spring 13'


1

J 3 10

kg m2

Mechanical system components:


rotation

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/.

Nise Table 2.5


02/07/2013

2.004 System Dynamics and Control Spring 2013


2

Mechanical system components: rotation: gears

Nise Figure 2.27, 2.28


02/07/2013

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/.

2.004 System Dynamics and Control Spring 2013


3

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/.

Nise Figure 2.29


02/07/2013

2.004 System Dynamics and Control Spring 2013


4

Rotational mechanical system:


example

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/.

Nise Figure 2.30a-b

02/07/2013

2.004 System Dynamics and Control Spring 2013


5

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

2.004 Spring 13'


6

Kinetic

Static

Coulomb friction

velocity

friction

friction

velocity

Coulomb friction is in opposite direction to the velocity;


the magnitude of the friction force is independent of the
magnitude of the velocity
Example: Block sliding on a rough surface
02/07/2013

2.004 System Dynamics and Control Spring 2013


7

Viscous friction

velocity

friction

friction

velocity

Viscous friction is in opposite direction to the velocity;


the magnitude of the friction force is proportional to the
magnitude of the velocity
02/07/2013

2.004 System Dynamics and Control Spring 2013


8

Eddy Currents Viscous friction


Eddy currents are generated when there is relative motion between a conducting object and a
magnetic field. The rotating currents in the conducting object are due to electrons experiencing a
Lorentz force that is perpendicular to their motion and the magnetic field (F=qvB).
The Lorentz force results in current in the radial direction on the flywheel; these currents, since the
wheel is turning, result in an opposing magnetic field and a force resisting the motion.
The Eddy current and the resisting force are both proportional to the velocity |v|; therefore, they resist
motion in a way that is exactly equivalent to viscous friction.

11/28/13

2.004 Spring 13'


9

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

2.004 Spring 12'


11

US Digital Optical Encoder E6S-2048-187


Quick, simple assembly and
disassembly
Rugged screw-together housing
Positive finger-latching connector
Accepts .010" axial shaft play
Tracks from 0 to 100,000 cycles/sec
64 - 2500 CPR | 256 to 10,000 PPR
2 channel quadrature TTL
squarewave outputs

Max speed = 2,400 rpm

Optional index (3rd channel)


-40 to +100C operating temperature
Fits shaft diameters from 2mm to 1"

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

2.004 Spring 12'


12

Converting Tachometer reading


You will monitor the angular velocity profile using the ETach2 electronic

tachometer that is attached to the rotary encoder on the flywheel shaft.

It produces an analog voltage vo proportional to the shaft speed ! ! Vo = Kt !


where the tachometer constant Kt = 0.016 volts/rpm

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

Save your data so that it is readily available later


(online or on USB.)

Coulomb friction (Assume the eect of Coulomb damping is significantly smaller than the eect
of viscous damping)

You will need them for Problem Set 1.


Hand in your results at the end of class.
14

Making A Good Plot with MATLAB


Put a meaningful title
Label each axis (with proper unit)
Label each data source
MATLAB commands:
>> mydata;
>> plot(t_mydata,v_mydata);
>> title(Lab 1 (no mag));
>> xlabel(Time (s));
>> ylabel(Voltage(V));
>> legend(Velocity,Linear);
>> grid;
>>

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

2.004 Spring 13'

Solving the equations of motion

For pure Coulomb damping: J !(t)

= Text (t)

Tc (t)

(The external torque is 0 for our experiment, Tc (t) is relatively constant Tc )


Tc
J t

Solving this ODE =) !(t) = !0

+ Jb !(t) = 0
For pure viscous damping: J !(t)

+ b!(t) = Text =) !(t)


Solving this ODE =) !(t) = !0 e

( Jb )t

16

Fitting an Exponential Function


Estimate from the time at which the response has decayed to:

Slope method

2/13/2013

2.004 Spring 13'


17

Fitting an Exponential Function


Log linear fit:

2/13/2013

2.004 Spring 13'


18

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Goals for today

From ODE to Laplace transform


Laplace transform definition and properties
Using the Laplace transform to derive the flywheel response

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12

From ODE to Laplace transform /1

Recall the ODE we derived for the car suspension:


mx
+ bx + kx = bu + ku.
We need to solve in two steps: homogeneous (with the righthand side equal
to zero, i.e. no input) and the particular solution for the given input.
The homogeneous solution to an LTI ODE is easy, because it is an exponential
function. We can denote the exponent as s, then we obtain
mx
h + bx h + kxh = 0,

xh (t) = Aest .

Substituting yields ms2 + bs + k Aest = 0 and, since we require a nontrivial


solution (A = 0) we must have
ms2 + bs + k = 0.
This is called the systems characteristic equation.

We will say more about its solutions later.

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12

From ODE to Laplace transform /2

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

With this choice of H0 , the ODE is satised by the particular solution


xp (t) = U0
2.004 Spring 13

bs0 + k
s0 t
e
.
ms20 + bs0 + k

Lecture 05 Tuesday, Feb. 12

From ODE to Laplace transform /3

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

Lecture 05 Tuesday, Feb. 12

Laplace transform: definition

Given a function f (t) in the time domain we defne its


Laplace transform F (s) as
Z
F (s) =

+o
0-

f (t)e-st dt.

We say that F (s) is the frequencydomain representation of f (t).


The frequency variable s is a complex number:
s = a + jw,
where a, w are real numbers with units of frequency (i.e. sec-1

Hz).

We will investigate the physical meaning of a, w later when we see examples of


Laplace transforms of functions corresponding to physical systems.

2.004 Fall 07

Lecture 03 Monday, Sept. 10

Example 1: Laplace transform of the step function

Consider the step function (aka Heaviside function)

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

Lecture 03 Monday, Sept. 10

Interlude: complex numbers: what does 1/s mean?

Recall that s = a + jw. The real variables a, w (both in frequency units)


are the real and imaginary parts, respectively, of s. (We denote j 2 = -1.)
Therefore, we can write
1
1
a - jw
a - jw

=
=
= 2
.

s
a + jw
(a + jw) (a - jw)
a + w2
Alternatively, we can represent

the complex number s in polar form s = |s| ej ,

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

Lecture 03 Monday, Sept. 10

Example 2: Laplace transform of the exponential

Consider the decaying exponential function beginning at t = 0


f (t) = e-at u(t),
where a > 0 (note the presence of the step function in the above formula.)
Again we apply the Laplace transform defnition,
Z +o
Z +o
e-at u(t)e-st dt =
e-(s+a)t dt =
F (s) =
0-

=
=

2.004 Fall 07

0-

+o

1
1
-(s+a)t
e
=
0-1 =

-(s
+
a)
-(s + a)
01
.
s+a

Lecture 03 Monday, Sept. 10

Laplace transforms of commonly used functions

Step
function
(aka
Heaviside)

time constant
=

1
,
a

a = 1 sec-1

Nise Table 2.1


7DEOH-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.004 Fall 07

Lecture 03 Monday, Sept. 10

Laplace transforms of commonly used functions

Polynomials

Ramp

function

Quadratic

function

n=2

Nise Table 2.1

7DEOH-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.004 Fall 07

Lecture 03 Monday, Sept. 10

10

Laplace transforms of commonly used functions

Sinusoids

Nise Table 2.1


7DEOH-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.004 Fall 07

Lecture 03 Monday, Sept. 10

11

Laplace transforms of commonly used functions

Impulse function (aka Dirac function)

<(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

Nise Table 2.1

<(t)f (t) = f (0)

(sifting.)

7DEOH-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.004 Fall 07

Lecture 03 Monday, Sept. 10

12

Properties of the Laplace transform


Let F (s), F1 (s), F2 (s) denote the Laplace transforms of f (t), f1 (t), f2 (t),

respectively. We denote L [f (t)] = F (s), etc.

Linearity
L [K1 f1 (t) + K2 f2 (t)] = K1 F1 (s) + K2 F2 (s),

where K1 , K2 are complex constants.

Differentiation

The diferentiation property is the one


that well fnd most useful in
solving linear ODEs with constant coefs.

i
d
f (t)
L
= sF (s) - f (0-);
dt
2

L d f 2(t) = s2 F (s) - sf (0-) - fj(0); and


dt
i
h n
Pn
d
f (t)
n
n-k (k-1)
F
(s)
f
(0-).
=
s
L
k=1 s
d tn
h

Integration

0-

f ()d =

2.004 Fall 07

F (s)
.
s

A more complete set of Laplace transform properties


is in Nise Table 2.2.
Well learn most of these properties in later lectures.
Lecture 03 Monday, Sept. 10

13

Inverting the Laplace transform


Consider
F (s) =

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)

That would be convenient because we know the inverse Laplace transform of


the 1/(s + a) function (its a decaying exponential) and we can also use the
linearity theorem to fnally fnd f (t). All thatd be left to do would be to fnd
the coefcients K1 , K2 .
This is done as follows: frst multiply both sides of (2) by (s + 3). We fnd
2
K2 (s + 3) s=-3
2
= K1 +
=: K1 =
= 1.
s+5
s+5
-3 + 5
Similarly, we fnd K2 = -1.

2.004 Fall 07

Lecture 03 Monday, Sept. 10

14

Inverting the Laplace transform


So we have found
F (s) =

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

Using these and the linearity theorem we obtain

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

Lecture 03 Monday, Sept. 10

15

Use of the Laplace transform to solve ODEs

Example: motor-shaft system from Lecture 2 (and labs)

J w(t)
j
+ bw(t) = Ts (t),

where Ts (t) = T0 u(t)

Ts (t) w(t)

and w(t = 0) = 0

(step function)

(no spindown).

Taking the Laplace transform of both sides,


J s0(s) + b0(s) =

T0
T0
1
T
1

= 0
: 0(s) =
,
s
b s (J/b)s + 1
b s( s + 1)

where J/b is the time constant (see also Lecture 2).


We can now apply the partial fraction expansion method to obtain

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

Lecture 03 Monday, Sept. 10

16

Use of the Laplace transform to solve ODEs

Example: motor-shaft system from Lecture 2 (and labs)

J w(t)
j
+ bw(t) = Ts (t),

where Ts (t) = T0 u(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

in agreement with the timedomain solution of Lecture 2.

2.004 Fall 07

Lecture 03 Monday, Sept. 10

17

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Goals for today

Transfer function
Flywheel example
Other examples: car suspension system

Poles and zeros in complex s-plane


pole, zero definitions
the significance of poles and zeros:
from s-domain representation to transient characteristics

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


1

Transfer Functions

Consider again the motor-shaft system :

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


2

Transfer Functions in block diagrams

Important: To be able to define the Transfer Function,


the system ODE must be linear with constant coefficients.
Such systems are known as Linear Time-Invariant,
or Linear Autonomous.

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


3

Impedances: rotational mechanical

Nise Table 2.5

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/.

Lecture 05 Tuesday, Feb. 12


4

Impedances: translational mechanical

Nise Table 2.4

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/.

Lecture 05 Tuesday, Feb. 12


5

Transfer Functions: On car suspension system

System ODE: M x
(t) + fv x + Kx = bu + Ku

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


6

Summary

Basic Laplace transform

Obtain transfer functions

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


7

Definition of poles and zeros

Transfer function can usually be written as a numerator divided by a


denominator (both are functions of s):

Poles are all complex solutions to

Zeros are all complex solutions to

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


8

Representation of poles and zeros on the s-plane

2.004 Spring 13

Lecture 05 Tuesday, Feb. 12


9

Lab assignment p.1

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

Lab assignment 05 Tuesday, Feb. 12 - PLEASE RETURN TO THE T.A.


10

Lab assignment p.2

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.

Derive the step response of the flywheel in the Laplace domain

2.004 Spring 13

Lab assignment 05 Tuesday, Feb. 12 - PLEASE RETURN TO THE T.A.


11

Lab assignment p.3

In the presence of the Instructor(s) only, connect the CD motor to


the flywheel and obtain the step response with one, two, three
magnets. Explain the difference based on your Laplace-domain
derivation in the previous question.

2.004 Spring 13

Lab assignment 05 Tuesday, Feb. 12 - PLEASE RETURN TO THE T.A.


12

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Goals for today

Review of translational dynamical variables: position, velocity

Review of rotational dynamical variables: angle, angular velocity

Electrical dynamical variables: charge, current, voltage

Basic electrical components


Resistance
Capacitance
Inductance

DC Motor: an electro-mechanical element


basic physics & modeling
equation of motion
transfer function

Experiment: step and ramp response of the flywheel driven by the


DC motor open loop (no feedback)
2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Impedances: translational mechanical

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

Nise Table 2.4

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Impedances: rotational mechanical

Nise Table 2.5

2.04A Spring 13

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

Lecture 06 Thursday, Feb. 14

Electrical dynamical variables: charge, current, voltage

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Electrical resistance

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Capacitance /1

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Capacitance /2

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Inductance

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

Summary: passive electrical elements; Sources

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14


9

Combining electrical elements: networks


Nise Figure 2.6

Network analysis relies on two physical principles

Kirchhoff Current Law (KCL)


charge conservation

Kirchhoff Voltage Law (KVL)


energy conservation

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

10

Impedances in series and in parallel

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

11

The voltage divider

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

12

Example: the RC circuit

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

13

Interpretation of the RC step response


+
+

+
+

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + +

+ +

+
+

+
-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

14

Example: RLC circuit with voltage source

Nise Figure 2.3

Nise Figure 2.4


-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

15

Quick summary of electrical systems

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

16

Power dissipation in electrical systems

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

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

Lecture 06 Thursday, Feb. 14

18

Physical laws applicable to the DC motor


Lorentz law:

Faraday law:

magnetic field applies force to a current


(Lorentz force)

moving in a magnetic field results


in potential (back EMF)

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

19

DC motor: principle and simplified equations of motion

multiple windings N:
continuity of torque

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

20

DC motor: equations of motion in matrix form

multiple windings N:
continuity of torque

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

21

DC motor: why is Km=Kv?

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

22

DC motor with mechanical load and


realistic electrical properties (R, L)
inductance
(due to windings)

dissipation
(resistance of windings)

dissipation
(viscous friction
in motor bearings)

load
(inertia)

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

23

DC motor with mechanical load and


realistic electrical properties (R, L)
inductance
(due to windings)

dissipation
(resistance of windings)

dissipation
(viscous friction
in motor bearings)

load
(inertia)

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

24

DC motor with mechanical load and


realistic electrical properties (R, L)
inductance
(due to windings)

dissipation
(resistance of windings)

dissipation
(viscous friction
in motor bearings)

load
(inertia)

-RKQ:LOH\ 6RQV$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.04A Spring 13

Lecture 06 Thursday, Feb. 14

25

Lab 06: Running the flywheel with DC motor


open loop
Observe motor behavior under different driving voltages.
Examine transient response of a DC motor
Important: always be ready to turn off the break of power
amplifier when motor is spinning too fast!!
Experimental Setup:

Open-loop

Signal
CH1
Generator

ACH
1

DC motorflywheel
system

Power
Amplifier
PC Data-

ACH2
ETACH2

Acquisition
2.004 Spring 13

Lecture 06 Thursday, Feb. 14

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

Lecture 06 Thursday, Feb. 14

27

Some Hints
Gear Ratio:
F
Gear 1

Gear 2

Unit Conversion:

44
n1
=
180
n2

Power Conservation:

Ka = 2.0 A/V, Km = 0.0292 N-m/A


Pmechanical (t)

2.004 Spring 13

Lecture 06 Thursday, Feb. 14

= T (t) (t)
= Km i(t) (t)

28

Lab assignment p.1

Comment on how todays experiments involving step input are


interpreted differently than we did in Lab 05.

When the DC motor is driven by a step function, how many poles/


zeros do we need to consider, and where are they? How do the
magnets (eddy brakes) influence their locations?

2.04A Spring 13

Lab assignment 06 Thursday, Feb. 14 - PLEASE RETURN TO THE T.A.

29

Lab assignment p.2

When the DC motor is driven by a ramp function, how many poles/


zeros do we need to consider, and where are they? How do the
magnets (eddy brakes) influence their locations?

Comment on the qualitative and quantitative agreement of your


derivations with experiment. Attach sheets with your experimental
results.

2.04A Spring 13

Lab assignment 06 Thursday, Feb. 14 - PLEASE RETURN TO THE T.A.

30

0,72SHQ&RXUVH:DUH
KWWSRFZPLWHGX

$6\VWHPVDQG&RQWUROV
6SULQJ

)RULQIRUPDWLRQDERXWFLWLQJWKHVHPDWHULDOVRURXU7HUPVRI8VHYLVLWKWWSRFZPLWHGXWHUPV

Todays plan

1st order system response: review


the role of zeros

2nd order system response:


example: DC motor with inductance
response classifications:
overdamped
underdamped
undamped

Linearization
from pendulum equation to the harmonic oscillator

2.004 Spring 13

Lecture 07 Thursday, Feb. 21

Review: step response of 1st order systems


steady state
(final value)

Nise Figure 4.3

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/.

Lecture 07 Thursday, Feb. 21

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)

and step excitation

f (t) = F0 step(t)

[where f(t) and F0 have units of torque,]


the step response is

F0
1
!(t) =
b

the angular velocity as t tends to

t/

!1 =

t>0

J
=
b

F0
b

This long-term value is known as the systems steady state


In systems where the output physically represents a velocity, the steady
state is also known as terminal velocity.

2.004 Spring 13

Lecture 07 Thursday, Feb. 21

Steady state in the Laplace domain: the final value thm.

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.

In the case of the flywheel, the transfer function is


For the step response we have
It is easy to verify that

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

Lecture 07 Thursday, Feb. 21

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)

Example: compare the step response of the two systems below:

H0 (s) =

2.004 Spring 13

1
s+p

H(s) =

Lecture 07 Thursday, Feb. 21

s+z
s+p

Step response without zero vs with zero

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 (s) = sF0 (s) + zF0 (s)

) 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

Lecture 07 Thursday, Feb. 21

0
2

4
t [sec]

10

Zero on the right-hand side?


j

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

Lecture 07 Thursday, Feb. 21

0
2

4
t [sec]

10

The general 2nd order system

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

Lecture 07 Thursday, Feb. 21

The general 2nd order system

Nise Figure 4.10

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/.

Lecture 07 Thursday, Feb. 21


9

The general 2nd order system

Nise Figure 4.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

Lecture 07 Thursday, Feb. 21

10

The underdamped 2nd order system

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

Lecture 07 Thursday, Feb. 21

11

The underdamped 2nd order system

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

Lecture 07 Thursday, Feb. 21

12

The underdamped 2nd order system

forced response,
sets steady state

Nise Figure 4.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

Lecture 07 Thursday, Feb. 21

13

Transients in the underdamped 2nd order system

Nise Figure 4.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.004 Spring 13

Lecture 07 Thursday, Feb. 21

14

Transient qualities from pole location in the s-plane

Nise Figure 4.19


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

Lecture 07 Thursday, Feb. 21

15

Linearization

This technique can be used to approximate a non-linear system

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

Lecture 07 Thursday, Feb. 21

16

Linearizing systems: the pendulum

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

Lecture 07 Thursday, Feb. 21

17

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Observing 2nd order system behavior

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

You need to know


1st order systems
Laplace transforms

We will cover (here and in Lecture 07)


the basics of 2nd order system behavior

You do not need to know yet


how feedback systems work (we will cover in detail in the second
part of the class)
2.004 Spring 13

Lecture 08 Thursday, Feb. 21 LAB

Flywheel: switching to angular position as output /1

We modeled the flywheel as a SISO system with the torque r(t) as


input and the angular velocity (t) as output. Schematically,
r(t)

!(t)

R(s)

(s)

J !(t)

+ b!(t) = r(t)

1
(s)
=
R(s)
Js + b

Time domain (ODE)

Laplace domain (TF)

Now let us consider instead the angular displacement


Z (t) as the
output. This is related to (t) via an integral:

(t) =

!(t0 )dt0

1
s

In the Laplace domain, the relationship becomes (s) = (s)

Using the TF for (s) we obtain

2.004 Spring 13

1
(s)
=
R(s)
s(Js + b)

Lecture 08 Thursday, Feb. 21 LAB

Flywheel: switching to angular position as output /2

Schematically,
r(t)

(t)

R(s)

(s)

+ b(t)
= r(t)
J (t)

1
(s)
=
R(s)
s(Js + b)

Time domain (ODE)

Laplace domain (TF)

Some important observations:


the diagrams in this and the previous page correspond to the
same physical system; however, the physical quantity that we
choose to represent the output is different;
the ODE for (t) can be obtained by inverse-Laplace
transforming the TF (s)/R(s) [recall that multiplying by s in the
Laplace domain is equivalent to taking a derivative in the time
domain] or by deriving the equation of motion in the time domain
using Newtons law for rotational systems. The results are of
course consistent (check that!)
2.004 Spring 13

Lecture 08 Thursday, Feb. 21 LAB

Flywheel with feedback: a tunable 2nd order system


j

b/J

The transfer function

(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

Low gain (overdamped)

b/J

High gain (underdamped)


:open-loop poles
(no feedback or K=0)

2.004 Spring 13

Lecture 08 Thursday, Feb. 21 LAB

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

Lecture 08 Thursday, Feb. 21 LAB

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Today: using MATLAB to model LTI systems

2nd order system example:


DC motor with inductance
derivation of the transfer function
transient responses using MATLAB
open loop
closed loop (with feedback)
Effect of feedback gain

2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

DC motor system with non-negligible inductance

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

Lecture 09 Tuesday, Feb. 26

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

PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

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.

PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

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.

PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

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?

PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

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.

PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

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.

PLEASE TURN IN THIS PAGE BEFORE YOU LEAVE THE LAB


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

APPENDIX
MATLAB Control Systems Toolbox
Tutorial

2.004 Spring 13

Lecture 09 Tuesday, Feb. 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

Lecture 09 Tuesday, Feb. 26

10

MATLAB Linear Model Representation

Transfer functions
H(s) =

s+2
s2 + s + 10

sys = tf ([1, 2] ,[1, 1, 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

Lecture 09 Tuesday, Feb. 26

11

State-space System Representation Example


inductance
(due to windings)

dissipation
(resistance of windings)

dissipation
(viscous friction
in motor bearings)

Recall from Lecture 5

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

Lecture 09 Tuesday, Feb. 26

12

State-space System Representation Example

Reorganizing the system and write in matrix form


8
di
>
>
L
+ Ri + Kv ! = vs
>
< dt
>
>
>
:J d! + b! = Km i
dt
d
=)
dt

i
!

-R
L

>
>
Km
b
> d!
:
=
i- !
dt
J
J
- KLv
- Jb

Km
J

i
!

1
L

vs

Here our input is vs and output is ; we also have


y(t) =

=)

8
di
R
Kv
>
>
=
i
! + vs
> dt
<
L
L

i
!

+ [0] vs (t)

Now we have our A B C D matrices ready

2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

13

State-space System Representation Example


In MATLAB, we can represent the motor system using following
command: (need to define all parameters first)
A = [-R/L -Kv/L; Km/J -b/J];
B = [1/L; 0];
C = [0 1];
D = [0];
sys_dc = ss(A,B,C,D)

We can also convert this state-space system to transfer function or


Pole/zero/gain form:

sys_tf = tf(sys_dc)
sys_zpk = zpk(sys_dc)

%(to transfer function)


%(to ZPK form)

NOTE: The state-space representation is best suited for numerical


computations and is most accurate for most cases.

2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

14

LTI Objects and Manipulation


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

Lecture 09 Tuesday, Feb. 26

15

Creating Multiple Transfer Functions


Assume the three transfer functions are

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:

N = {[1, 0], [1, 1], [1, 2]};


D = {[1, 5], [1, 6], [1, 1, 5]};
sys = tf(N, D)

2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

16

Interconnecting Linear Models -- Arithmetic Operations

Addition (parallel systems):


tf(1, [1 0]) + tf([1 1], [1 2]);

This line represents

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

Multiplication (cascaded systems):


2 * tf(1,[1 0])*tf([1 1],[1 2]);

This line represents 2

1 s+1

s s+2

Transfer function:
2s+2
-------------s^2 + 2 s

2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

17

Interconnecting Linear Models -- Feedback loop


Example system:

sys_f = feedback(tf(1,[1 0]), tf([1 1],[1 2])

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

Lecture 09 Tuesday, Feb. 26

18

The LTI Viewer


LTI Viewer GUI allows you to analyze the time- and frequency-domain
responses of one or more linear models.
This syntax
Syntax:
opens a step response plot
of your models
ltiview(model1,model2,...,modelN)

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

Lecture 09 Tuesday, Feb. 26

19

General LTI Viewer Menus

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

Lecture 09 Tuesday, Feb. 26

20

Adding More Plots To LTI Viewer

Select Edit > Plot Configurations.

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

Lecture 09 Tuesday, Feb. 26

21

Change Plot Type

To view a different type of response on a plot, right-click and select a plot


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

Lecture 09 Tuesday, Feb. 26

22

Analyze System Performance

Right-click to select performance characteristics.

Click on the dot that appears to view the characteristic value.


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

Lecture 09 Tuesday, Feb. 26

23

Importing Models into the LTI Viewer

Select Import under the File menu. This opens the Import
System Data dialog box

All the models available in your MATLAB workspace are listed


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

Lecture 09 Tuesday, Feb. 26

24

Alternative Command to Simulate Different Responses

you can open the LTI Viewer and import systems from the MATLAB
prompt.
ltiview('step', sys)

This syntax views the


step response of our

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

Multiple plots are allowed. Example: ltiview({'step';'impulse'},sys)


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

25

Displaying Response Characteristics

Right-click on the plot

Example: select Characteristics > Rise Time.

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

Lecture 09 Tuesday, Feb. 26

26

Toggling Model Visibility


This figure shows how to clear the second of the three models using
right-click menu options.

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

Lecture 09 Tuesday, Feb. 26

27

The Linear Simulation Tool


In the LTI Viewer, right-click the plot area and select Plot Types >
Linear Simulation.

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

Lecture 09 Tuesday, Feb. 26

28

Using The Linear Simulation Tool


Specify the time duration you want to simulate:
Import the time vector by clicking Import time (From workspace)
Enter the end time the time interval in seconds
Specify the input signal
Click Import signal to import it from the MATLAB workspace or a
file
Click Design signal to create your own inputs
If you have a state-space model, you can specify the initial
conditions
click the Initial states tab

For a continuous model, select an interpolation method


2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

29

Functions for Frequency and Time Response

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

Lecture 09 Tuesday, Feb. 26

30

Using a Response Command


Example:
h = tf([1 0],[1 2 10])
impulse(h)

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

Lecture 09 Tuesday, Feb. 26

31

Response for Multiple Systems

Command (Collect transfer functions into a vector array):


Plot:

h = [tf(10,[1 2 10]) , tf(1,[1 1])]


step(h)

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

Lecture 09 Tuesday, Feb. 26

32

Alternative Command for Multiple Systems


Syntax:
stepplot(sys1, 'r' , sys2, 'y--' , sys3, 'gx')
This
command generates a step plot (sys1 with
solid red lines, sys2 with yellow dashed lines,

impulseplot(sys1, 'r' , sys2, 'y--' , sys3, 'gx')


bodeplot(sys1, 'r' , sys2, 'y--' , sys3, 'gx')

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

Lecture 09 Tuesday, Feb. 26

33

Controller Design -- PID Tuner


To launch the PID Tuner, use the pidtool command:
pidtool(sys,type)
Type

The PID Tuner automatically designs a controller for your plant.


You can use the Response time slider to try to improve the loop
performance

2.004 Spring 13

Lecture 09 Tuesday, Feb. 26

34

The PID Tuner

Controller type

Response
type

Response time slider

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

Lecture 09 Tuesday, Feb. 26

35

The PID Tuner

Right click on the plot and select Characteristics to mark the


characteristic times.

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

Lecture 09 Tuesday, Feb. 26

36

The SISO Design Tool

Open the control design GUIs with the following command

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

Lecture 09 Tuesday, Feb. 26

37

Define The Control Architecture

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

Lecture 09 Tuesday, Feb. 26

38

Specifying System Data

In the Architecture
tab, click System Data

You can select values


or transfer functions
from MATLAB
workspace or a *.mat
file

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

Lecture 09 Tuesday, Feb. 26

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

Lecture 09 Tuesday, Feb. 26

40

Graphically Tuning Control Parameters


In the Graphical Tuning tab, you can configure the plots you want
to see in the Graphical Tuning 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

Lecture 09 Tuesday, Feb. 26

41

Graphically Tuning Control Parameters


In the Graphical
Tuning Window, you
can grab and drag the
pink squares using
the small hand in the
toolbar. This changes
the constant multiplier
value of the
compensator.
You can also add
poles and zeros in this
window using the
cross and circle in
the toolbar.

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

Lecture 09 Tuesday, Feb. 26

42

Viewing Damping Ratios


Right-click on the root locus graph and select Requirements >
New to add a design requirement.
In the New Design Requirement dialog box choose Damping
ratio

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

Lecture 09 Tuesday, Feb. 26

43

Viewing Damping Ratios


Applying damping ratio requirements to the root locus plot results in a pair
of shaded rays at the desired slope
Try moving the complex pair of poles you added to the design so that they
are on the 0.707 damping ratio line.

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

Lecture 09 Tuesday, Feb. 26

44

Analysis Plot

In the Analysis Plots tab, select a plot type

Select the type of response for each 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

Lecture 09 Tuesday, Feb. 26

45

Analysis Plot

Click Show analysis plot in the Analysis plots tab

This displays the real-time specific performance characteristics for


your system. Compare values to design requirements.

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

Lecture 09 Tuesday, Feb. 26

46

Storing and Retrieving Intermediate Designs


Click the Design History node or Store Design, both located on
the SISO Design Task node 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

Lecture 09 Tuesday, Feb. 26

47

Exporting the Compensator and Models


After you design the controller, you may want to save your design parameters
for future implementation.

Select File > Export in the Control and Estimation Tools Manager

Select File > Export in the Graphical Tuning 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

Lecture 09 Tuesday, Feb. 26

48

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Goals for today

Feedback topology
Negative vs positive feedback

Example of a system with feedback


Derivation of the closed-loop transfer function
Specification of the transient response by selecting
the feedback gain

Steady-state error
General steady error determination
Steady-state error with external disturbance input

MATLAB LTI system analysis

2.004 Spring 13

Lecture 11 Tuesday, Mar. 1

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

Today: we examine the first case only (tracking)

We will discuss disturbances in a future lecture

2.004 Spring 13

Lecture 11 Tuesday, Mar. 1

The problem with system dynamics


(for example)

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

Because system response is determined by system transfer function G(s)


R(s)

C(s)
G(s)

2.004 Spring 13

C(s) = G(s)R(s) 6= R(s)

Lecture 11 Tuesday, Mar. 1

Suggested solution: invert the Transfer Function


Now indeed
R(s)
G(s)

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

Disturbances are amplified (we will talk about these later)


2.004 Spring 13

Lecture 11 Tuesday, Mar. 1

Instead: feedback (sort-of) inverts the TF


R(s) +

K:

C(s)

G(s)

Feedback gain

G(s) :

Open Loop (OL) transfer function

Closed Loop transfer function

C(s) = KG(s) R(s)

Note: if

C(s)
=?
R(s)
C(s)

KG(s)
C(s)
=
R(s)
1 + KG(s)

K ! 1 ) C(s) R(s) ) Tracking!!

2.004 Spring 13

Lecture 11 Tuesday, Mar. 1

Negative feedback loop with feedback controller

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/.

Nise Figure 5.6

2.004 Spring 13

Lecture 11 Tuesday, Mar. 1

Positive feedback

Equivalent system:

Nise Figure 5.6

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/.

Generally, positive feedback is dangerous: it may lead


to unstable response (i.e. exponentially increasing) if not used with care
2.004 Spring 13

Lecture 11 Tuesday, Mar. 1

A more general feedback system

Nise Figure 5.6

Plant: the system we want to control (e.g., elevator plant: input=voltage,


output=elevator position)
Controller: apparatus that produces input to plant (i.e. voltage to elevators motor)
Transducers: converting physical quantities so the system can use them
(e.g., input transducer: floor button pushedvoltage;
output transducer: current elevator position voltage)
Feedback: apparatus that contributes current system state to error signal (e.g.,
in elevator system, error=voltage representing desired position voltage representing
current position 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

Lecture 11 Tuesday, Mar. 1


8

Transient response of a feedback system

Nise Figure 5.15

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

Lecture 11 Tuesday, Mar. 1


9

Transient response of a feedback system

Nise Figure 5.15

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

Lecture 11 Tuesday, Mar. 1


10

Transient response of a feedback system

Nise Figure 5.15

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

Lecture 11 Tuesday, Mar. 1

11

Adjusting the transient by feedback

Nise Figure 5.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

Lecture 11 Tuesday, Mar. 1


12

Generalizing: steady-state error for arbitrary input

Unit step input:


Steady-state error =
unit step output as t

2.004 Spring 13

Ramp input:
Steady-state error =
ramp output as t

Lecture 11 Tuesday, Mar. 1

13

Generalizing: steady-state error for arbitrary system,


unity feedback
reference
signal

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

Lecture 11 Tuesday, Mar. 1

14

Generalizing: steady-state error for arbitrary system,


unity feedback
reference
signal

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

Lecture 11 Tuesday, Mar. 1

15

Steady-state error and static error constants

Note: the system must be stable (i.e., all poles


on left-hand side or at the origin) for these calculations to apply
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

Lecture 11 Tuesday, Mar. 1

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

Lecture 11 Tuesday, Mar. 1

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

Lecture 11 Tuesday, Mar. 1

18

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

Department of Mechanical Engineering

2.04A Systems and Controls


Spring 2013
Supplement to Lecture 10
Dynamics of a DC Motor with Pinion Rack Load and Velocity Feedback
As an extension to Lecture 10, here we will analyze a DC motor connected to a pinion
rack with a massdamper load. The motor isconnected in a velocityfeedback con
guration with a dierential opamp providing the error signal as shown in Figure 1
below. This is similar to the ywheel that we have been studying in the labs, with
the important dierence that now the ywheel is assumed to be connected to a rack
and pinion converting angular motion to translational motion. Such conversions occur
often in mechanical systems.
Plant transfer function
We begin by analyzing the plant, i.e., the motor connected directly to a voltage
source input vs (t) and velocity output v(t). The result that we are about to derive is
referred to as the plant model. After we know the plant model, we can proceed to
model the entire system which includes the velocity feedback loop.
To analyze the plant, we begin by writing the bynow familiar electrical equation
of motion that is derived from KVL on the electrical circuit including the motor:
vs (t) i(t)R ve (t) = 0 vs (t) = i(t)R + Kv (t),

(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)

In the Laplace domain, the equation of motion is rewritten as


Km I(s) = Js(s) + D(s) + Tp (s).

(4)

Figure 1: Schematic of the feedback system to control the velocity of a pinion


We still have to nd Tp (s). This is done by forcebalance on the translational part of
the load, i.e. the pinions rack that carries the mass M . If Fp (t) denotes the force by
the pinion on the rack, then in the time domain we have
Fp (t) = M v(t) + fv v(t),

(5)

Fp (s) = M sV (s) + fv V (s).

(6)

or, in the Laplace domain,

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)

In the Laplace domain, we equivalently have


Tp (s) = rFp (s),
V (s) = r(s).

(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),

(9) and (10) to (4) to obtain


V (s)
+ r (M s + fv ) V (s)
r
J + r2 M
D + r 2 fv
s+
V (s).
rKm
rKm

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)

Substituting the (revised) numerical values R = 1, Km = 1N m/A. Kv =


1V
sec/rad, J = 0.1kg m2 , D = 0.5kg m2 / (rad sec), M = 9kg, fv = 5kg/sec and
r = 0.1m = 0.3162m, we obtain
V (s)
0.3162
=
Vs (s)
s+2

m/sec
.
V

(14)

Feedback transfer function


The velocity output is measured by a tachometer and fed back via a dierential
amplier. It is important to note that the tachometer converts the velocity to a voltage;
that voltage is then used as input in the negative terminal of the opamp. The positive
terminal is connected to a reference voltage. We will now take a few steps to appreciate
the signicance of the feedback and reference voltages.
Looking rst at the feedback loop, we model the tachometer as producing a voltage
Vtach equal in numerical value to the translational velocity v of the mass. This means
that
Volts
Vtach (t) [Volts] = 1
v(t).
(15)
m sec
This relationship expresses an ideal linear transducer with unit gain. It is especially
important to note that the unit conversion requires the presence of a unity gain with
units Volts/ (m/sec). In many practical situations the relationship is not unity; we
would then have to take transduction into account as a nonunity gain in the feedback
path. Moreover, many transducers are approximately linear but saturate or exhibit
other types of nonlinearities if the measured variables (the velocity, in this case) be
come too large. In the interest of keeping this discussion as clear as possible, we will
3

Vref

v(t)

Vtach
1

Figure 2: Block diagram representing the physical system of Figure 1.


neglect these practical diculties and assume an ideal unitygain tachometer; as we
proceed with the solution of this ideal case, however, it is important to keep in mind
its limitations in actual systems. Also, to avoid notational clutter we will hereafter
cease the explicit mention of units in each equation.1
As you will learn in 2.678 (or other classes on electronics), the voltage at the output
of the dierential amplier is given by
R2
(Vref Vtach ) .
R1

(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

v [m/ (sec V)]


0.1365
0.2402
0.4415
0.6126
0.9405

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

OpenLoop velocity response


8

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

ClosedLoop velocity response

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

ClosedLoop error signal

Figure 3: Unit step response of the velocity control system.

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

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Todays goal

Introduce root locus


Close loop transfer function &characteristic equation
Root locus with an example

Rules for sketching root locus

Observation of Root Locus with MATLAB s graphical user interface

2.04A Spring 13

Lecture 11 Thursday, Feb. 28

Close-loop transfer function and characteristic equation

Consider a unity feedback control loop

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/.

Closed-loop transfer function:

G(s) =

N (s)
D(s)

KG(s)
KN (s)
Gclosed (s) =
=
1 + KG(s)
D(s) + KN (s)

The closed-loop characteristic equation:

1 + KG(s) = 0
More generally: D(s) + KN (s) = 0
2.04A Spring 13

Lecture 11 Thursday, Feb. 28

What is root locus

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

as the loop gain K varies from 0 to 1


Example:

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

Lecture 11 Thursday, Feb. 28

Cranking up the gain J


Type 0 system (no disturbance)

Type 1 system with 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.04A Spring 13

Lecture 11 Thursday, Feb. 28

Cranking up the gain L


Type 1 system (no 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.04A Spring 13

Lecture 11 Thursday, Feb. 28

Cranking up the gain: poles and step response

Root
Locus

2.04A Spring 13

Lecture 11 Thursday, Feb. 28

Root Locus for non-unity negative feedback systems

Caveat: K>0
(i.e., negative
feedback)

Closed loop TF:

Nise Figure 8.1

Open loop TF:


KG(s)

Condition for closed-loop pole: denominator of closed-loop TF must equal zero:

2.04A Spring 13

Lecture 11 Thursday, Feb. 28

Break-in
point

Root Locus terminology

Breakaway
point
Real-axis
segment

RL imaginary axis
intercept

Breakaway
point

Nise Figure 8.10

Asymptote
angle
Departure/Arrival
angles

Branches
Asymptote
real-axis
intercept

Nise Figure 8.12

Nise Figure 8.25

Nise Figure 8.19

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

Lecture 11 Thursday, Feb. 28

Root-locus sketching rules

Rule 1: # branches = # poles


Rule 2: always symmetrical about the real axis
Rule 3: real-axis segments are to the left of an odd number of realaxis finite poles/zeros

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

Lecture 11 Thursday, Feb. 28

Root-locus sketching rules

Rule 4: RL begins at poles, ends at zeros

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

Lecture 11 Thursday, Feb. 28

10

Poles and zeros at infinity

2.04A Spring 13

Lecture 11 Thursday, Feb. 28

11

Root Locus sketching rules

Rule 5: Asymptotes: angles and real-axis intercept

Nise Figure 8.12


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

Lecture 11 Thursday, Feb. 28

12

Root Locus sketching rules

Rule 6: Real axis break-in and breakaway points

maxK for this


real axis
segment

minK for this


real axis
segment

Nise Figure 8.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

Lecture 11 Thursday, Feb. 28

13

Root Locus sketching rules

Rule 6: Real axis break-in and breakaway points

maxK for this


real axis
segment

minK for this


real axis
segment

Nise Figure 8.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

Lecture 11 Thursday, Feb. 28

14

Root Locus sketching rules

Rule 7: Imaginary axis crossings

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

Lecture 11 Thursday, Feb. 28

15

Root Locus sketching rules

Rule 7: Imaginary axis crossings

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

Lecture 11 Thursday, Feb. 28

16

Root Locus sketching rules summary


Rule 1: # branches = # poles
Rule 2: symmetrical about the real axis
Rule 3: real-axis segments are to the left of an odd number of realaxis finite poles/zeros
Rule 4: RL begins at poles, ends at zeros
Rule 5: Asymptotes: angles, real-axis intercept

Rule 6: Real-axis break-in and breakaway points

Rule 7: Imaginary axis crossings (transition to instability)

2.04A Spring 13

Lecture 11 Thursday, Feb. 28

17

Practice 1: Sketch the Root Locus

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/.

Nise Figure P8.2

2.04A Spring 13

Lecture 11 Thursday, Feb. 28

18

Practice 2:

Are these Root Loci valid? If not, correct them

Nise Figure P8.1

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/.

Lecture 11 Thursday, Feb. 28

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

2.004 Spring 12'

20

System Modeling

Km /N
Js + B

Ka
Kt

G(s)
21

System Parameters

22

Procedures

In MATLAB workspace, construct necessary system data


(transfer functions) based on the system model
Graphically tune the control parameters of the following general
forms.
C(s) = a1 ,

C(s) = a2 + b2 s,

C(s) = a3 + b3 /s

At the end of the class, turn in your result parameters, root


locus plots and system response.

12/03/13

2.004 Spring 13'

23

Useful Matlab Commands

>> 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

2.004 Spring 12'

24

Tips 1
In the command window type in sisotool tool open the SISO

Design Tool Interface.

Select appropriate control architecture

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.

Enter or import system system data (G, H) from workspace.

12/03/13

2.004 Spring 12'

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

plot under Graphical Tuning.

You can drag/add/remove poles & zeros in this graphical root


locus design window. Simulation result is instantaneous.
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

2.004 Spring 12'

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

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

2.04A Class Project: the Tower


with Active Damping

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

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.)

Courtesy of Rob Pongsajapan on flickr. CC-BY


&DUWRRQVVRXUFHVXQNQRZQ$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

Simplified Building Model

We can model a tall building as a single


degree of freedom lumped-parameter
system.

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

Passive Vibration Damping


Sliding Mass, m2

One way to stabilize these


tall builds from swaying too
much during earthquakes or
from high winds is to install
enormous pendulum
weights. When the building
sways sideways the
pendulum doesn't want to
move (inertia) and exerts a
pull in the opposite
direction.

Wind force,
Fw(t)

Spring

Damper

Passive Damper
(Tuned Mass Damper)

Ground
2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

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

Lecture 09 Wednesday, Feb. 27

Burj Khalifa (http://www.burjkhalifa.ae/)

Burj Khalifa

Taipei 101

Courtesy of Natalie of designedbynatalie.com. CC-BY-NC


Courtesy of ADTeasdale on flickr. CC-BY

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

Taipei 101 (http://www.taipei-101.com.tw)

Courtesy of Jirka Matousek on flickr. CC-BY


Courtesy of Stefan Tan. Used with permission.

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

The Tuned Mass Damper in Taipei 101

The passive wind damper with a


diameter of 5.5 meters and
weighting 660 metric tons, is
also the largest in the world now.

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/.

Courtesy of Daniel M. Shih. Used with permission.

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

Active Damper Design


Sliding Mass, m2
controller

sensor
Spring

actuator
Wind force, Fw(t)

Damper

The actuator is commanded by a


control system, which requires
sensor feedback

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

Experimental System

air-bearings

voice-coils

wire spring
accelerometer

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

tall building

10

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

11

Available Impulse Response Data


(Course Lockers\2.004\Labs\Tower Data)
Building Response

B1 and K1

Compare your transfer


function impulse
response to this one.

2.004 Spring 13

Damper Response
B2 and K2

Open Loop System Response

Lecture 09 Wednesday, Feb. 27

12

Estimating Parameters (Building)

Determine after 36.8% amplitude decay


Logarithmic decrement method

x1
x1
1
ln
= ln
=
x2
N 1 xN

Damped period

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

13

Estimating Parameters (Damper)

2.004 Spring 13

Lecture 09 Wednesday, Feb. 27

14

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Todays goal

Root Locus examples and how to apply the rules


single pole
single pole with one zero
two real poles
two real poles with one zero
three real poles
three real poles with one zero

Extracting useful information from the Root Locus


transient response parameters
limit gain for stability

2.04A Spring 13

Lecture 12 Tuesday, March 5

Root Locus definition

Root Locus is the locus on the complex plane of closed-loop poles


as the feedback gain is varied from 0 to .

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)

Lecture 12 Tuesday, March 5

...
2

Root-locus sketching rules

Rule 1: # branches = # poles


Rule 2: always symmetric with respect to the real axis
Rule 3: real-axis segments are to the left of an odd number of realaxis finite poles/zeros
Root Locus

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

nothing to the left


of one zero +
one pole
5

Lecture 12 Tuesday, March 5

to the left of
the pole

3
2
(seconds1)

Root-locus sketching rules

Rule 4: begins at poles, ends at zeros

K
X(s)
=
Y (s) CL
s + (K + 2)

closedloop
= (K + 2) ! 1, as
pole

K!1

X(s)
Y (s)

closedloop
pole

CL

We say that this TF


has a zero at infinity
Root Locus

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

nothing to the left


of one zero +
one pole
5

Lecture 12 Tuesday, March 5

to the left of
the pole

3
2
(seconds1)

Root Locus sketching rules

Rule 5: Real-axis intercept and angle of asymptote


a

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

Two branches (Rule 1)


Symmetric (Rule 2)
On real axis to the left of the

2
3.5

2.5

2.04A Spring 13

1.5
1
(seconds1)

0.5

0.5

a = /3

Two zeros at infinity (Rule 4)

first pole at -1 (Rule 3)

1.5

4
5
8

Three branches (Rule 1)


Symmetric (Rule 2)
On real axis to the left of the first pole

at -1 and the third pole at -3 (Rule 3)


Three zeros at infinity (Rule 4)
7

Lecture 12 Tuesday, March 5

4
3
(seconds1)

Root Locus sketching rules

Rule 6: Real axis breakaway and break-in points b


Solve

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

Two branches (Rule 1)


Symmetric (Rule 2)
On real axis to the left of the

2
3.5

2.5

2.04A Spring 13

1.5
1
(seconds1)

0.5

0.5

a = /3

Two zeros at infinity (Rule 4)

first pole at -1 (Rule 3)

1.5

4
5
8

Three branches (Rule 1)


Symmetric (Rule 2)
On real axis to the left of the first pole

1.423

at -1 and the third pole at -3 (Rule 3)


Three zeros at infinity (Rule 4)
7

Lecture 12 Tuesday, March 5

4
3
(seconds1)

Root Locus sketching rules


Rule 7: Imaginary axis crossings
Solve

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

Three branches (Rule 1)


Symmetric (Rule 2)
On real axis to the left of the first pole

1.423

at -1 and the third pole at -3 (Rule 3)


Three zeros at infinity (Rule 4)
7

Lecture 12 Tuesday, March 5

4
3
(seconds1)

What else is the Root Locus telling us

Gain = product of distances to the poles

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

Lecture 12 Tuesday, March 5

4
3
(seconds1)

The zeros are pulling the Root Locus

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

Lecture 12 Tuesday, March 5

3
2
(seconds1)

Practice 1: Sketch the Root Locus

Nise Figure P8.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

Lecture 12 Tuesday, March 5

10

Practice 2:
Are these Root Loci valid? If not, correct them

Nise Figure P8.1


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

Lecture 12 Tuesday, March 5

11

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Classification of feedback compensators


compensator
C(s) +

Gp (s)

plant

compensator
R(s)

C(s) +

s+z
K
s

Proportional (P)

plant
R(s)

Gp (s)

Proportional-Integral (PI)

can meet one transient specification


(e.g. rise time)

can meet one specification (e.g. rise time)


zero steady-state error

other specifications (e.g. overshoot) unmet


steady state error

other specifications (e.g. overshoot) unmet


decreases stability (RL moves to the right)

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

Lecture 13 Tuesday, Mar. 5, 2013

Compensator rules of thumb


Nise Figure 9.1

Nise Figure 9.7

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

Lecture 13 Tuesday, Mar. 5, 2013

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

Lecture 13 Tuesday, Mar. 5, 2013

Evaluating different PD controllers

Gc (s) = K(s + 3)

Gc (s) = K

Nise Figure 9.15

(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

Lecture 13 Tuesday, Mar. 5, 2013

Example: speeding up the response

The closed-loop poles shown here are with


proportional control, designed for

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

Lecture 13 Tuesday, Mar. 5, 2013

Example: speeding up the response

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

Lecture 13 Tuesday, Mar. 5, 2013

Example: speeding up the response


PD

(
)
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

Lecture 13 Tuesday, Mar. 5, 2013

Example: speeding up the response


PD

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

Lecture 13 Tuesday, Mar. 5, 2013

Example: speeding up the response


PD

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

Lecture 13 Tuesday, Mar. 5, 2013

Example: speeding up the response


PD

(
)
K s+z

0.3162
s (s + 2)

PD compensator
zero

closed-loop poles

K=6.325 gives %OS=6.7; Ts=1.86sec


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

Lecture 13 Tuesday, Mar. 5, 2013

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

2.004 Spring 13'

11

Precision Position Control Example:


Scanning Electron Microscope (SEM) In Semiconductor Fabrication Process

300 mm diameter wafer


45 nm feature size
Control Console
Vacuum Chamber

200,000x magnification

Diameter of a human hair 0.1 mm = 1e5 nm


VRXUFHVXQNQRZQ$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

3/5/2013

2.004 Spring 13'

12

Position Sensing Using Encoder and EDAC2


Encoder Types:

Incremental (Relative): Only the relative


position of the shaft is known. No absolute 0
position.
Absolute: Unique code for each shaft position
(e.g., by adding a reference input to an
incremental encoder).

Reset Button
VRXUFHVXQNQRZQ$OOULJKWVUHVHUYHG7KLVFRQWHQWLVH[FOXGHGIURPRXU&UHDWLYH
&RPPRQVOLFHQVH)RUPRUHLQIRUPDWLRQVHHKWWSRFZPLWHGXKHOSIDTIDLUXVH

3/5/2013

2.004 Spring 13'

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

2.004 Spring 13'

14

Plant Transfer Functions


Now we are dealing with POSITION CONTROL,
DO NOT use the velocity transfer function.
TF voltage to velocity:

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) =

2.004 Spring 13'

(s)
1 (s)
Ka Km /N
=
=
s Vc (s)
s (Jeq s + Beq )
Vc (s)

15

Comparison of Closed-Loop Transfer Functions

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)

2.004 Spring 13'

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

2nd Order System Poles

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

2.004 Spring 13'

18

Control Action Comparison


P improve speed but with steady-state error
D improve stability but sensitive to noise
I improve steady state error but with less stability, overshoot, longer transient,
integrator windup (we will discuss PI and PID control next week)

3/5/2013

2.004 Spring 13'

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

2.004 Spring 13'

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

2.004 Spring 13'

21

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Improving the steady-state error: simple integrator


Integrator as a Compensator:
Eliminates the steady-state error,
since it increases the system Type;
however, our desirable closed-loop
pole A is no longer on the
root locus;
this is because the new pole at s=0
changes the total angular
contributions to A so that the
180 condition is no longer
satisfied.
This means that our desirable
transient response characteristics
that would have been guaranteed by A
are no longer available L
Nise Figure 9.3
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

Lecture 14 Thursday, March 7

Improving the steady-state error: PI controller


Ideal Integral Compensator
(or Proportional-Integral Compensator):
Includes a zero on the negative real
axis but close to the integrators pole
at the origin. The zero

has approximately the same


angular contribution to A as the
integrators pole at the origin;
therefore, the two cancel out;

moreover, it contributes the same


magnitude to the pole at A, so
A is reached with the same feedback
gain K.
The net effect is that we have fixed
the steady-state error without
affecting the transient response J

Nise Figure 9.3


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

Lecture 14 Thursday, March 7

Implementing the PI controller

Nise Figure 9.8

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

Lecture 14 Thursday, March 7

Example (Nise 9.1)

Nise Figure 9.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.04A Spring 13

Lecture 14 Thursday, March 7

Steady-state and transients with the PI controller


UNCOMPENSATED
(Proportional controller)

COMPENSATED
(PI controller)

Nise Figure 9.5

Nise Figure 9.6

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

Lecture 14 Thursday, March 7

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

Lecture 14 Thursday, March 7

(Another) Limitation of P-control


Steady-state error
Kp is limited by the saturation limit of the system
Large Kp may amplify noise and disturbances and lead to instability

2.04A Spring 13

Lecture 14 Thursday, March 7

P Control Steady-Sate Errors


In real world a set-point profile is often more complex than a simple
step input.

2.04A Spring 13

Lecture 14 Thursday, March 7

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

Lecture 14 Thursday, March 7

P, I, and PI Comparison
P Control: steady-state error
I Control: overshoot, longer transient, integrator windup

Set-point

2.04A Spring 13

Lecture 14 Thursday, March 7

10

Comparison of Closed-Loop Transfer Functions


Let K = Ka Km

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

Complex pole pair

(Kp s + Ki )KKt
Vt (s)
=
=A
=A
2
R(s)
Js + (B + Kp KKt )s + Ki KKt

Lecture 14 Thursday, March 7

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

; set Kp to 2 and Ki to 1 and run simulation for 5 seconds.

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

Lecture 14 Thursday, March 7

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

Lecture 14 Thursday, March 7

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

2.04A Class Project

Tall Building Active Damping

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

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.)

Courtesy of Rob Pongsajapan on flickr. CC-BY


Cartoons sources 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/.

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

Simplified Building Model

We can model a tall building as a single


degree of freedom lumped-parameter
system.

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

Passive Vibration Damping


Sliding Mass, m2

One way to stabilize these


tall builds from swaying too
much during earthquakes or
from high winds is to install
enormous pendulum
weights. When the building
sways sideways the
pendulum doesn't want to
move (inertia) and exerts a
pull in the opposite
direction.

Wind force,
Fw(t)

Spring

Damper

Passive Damper
(Tuned Mass Damper)

Ground
2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

Taipei 101 (http://www.taipei-101.com.tw)

Taipei 101

Courtesy of Jirka Matousek on flickr. CC-BY

2.04A Spring 13

Courtesy of Stefan Tan. Used with permission.

Lecture 16&17 March 12&14 (Tue-Thu)

The Tuned Mass Damper in Taipei 101

The passive wind damper with a


diameter of 5.5 meters and
weighting 660 metric tons, is
also the largest in the world now.

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/.

Courtesy of Daniel M. Shih. Used with permission.

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

Active Damper Design


Sliding Mass, m2
controller

sensor
Spring

actuator
Wind force, Fw(t)

Damper

The actuator is commanded by a


control system, which requires
sensor feedback

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

Experimental System

air-bearings

voice-coils

wire spring
accelerometer

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

tall building

System Modeling

Air Bearings

Relative Velocity
Sensor:
Voice Coil

Actuator:
Voice Coil

Accelerometer

Spring
Sliding
mass
Building

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

Tower feedback schematic

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)

(disturbance & actuation vector)

y=

v1
v2

v1

v1
v 2 V v1

measured

(observation vector)

w(t)

disturbance input (force due to wind)

a(t)

actuation input (force due to voice coil)

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

Lecture 16&17 March 12&14 (Tue-Thu)

10

Procedure #1

Obtain the Towers equation of motion

Derive the state-space representation of the system


q = Aq + Bu
y = Cq + Du

where

u=

y=

x1
6 v1 7
7
q6
4 x2 5
v2
w(t)
a(t)

(disturbance & actuation vector)

v1
v2

(state vector)

v1

(observation vector)

Hint: see also Problem 4 of PSet 4


2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

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

Lecture 16&17 March 12&14 (Tue-Thu)

12

Procedure #3 - Controlling the actuation force


The force from the wind w(t) is the disturbance, whereas the force
from the actuator is the controller which is meant to cancel the
disturbance. Both can be thought of as inputs to the tower plant. The
outputs are the velocity v1(t) and relative velocity v2(t)-v1(t), because
this is what our sensors measure. Thus, this is a MIMO (multipleinput, multiple-output) system.
The input to the feedback system is the difference between the
outputs from the sensors and the desired outputs (recall that the
desired outputs are the input commands). To quiet the Tower, the
input command/desired output requires the vibration of motion to
equal zero, i.e. (v1 (t) = 0 and v2 (t)

v1 (t) = 0) . Obtain a SISO model

that equivalently models this MIMO system [we will help you.]
2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

13

Procedure #4 - Controlling the actuation force


Design a PID controller using graphical tuning and analysis plots
from MATLAB SISOTOOL.
You will have to move around the zeros of the PID controller and
play around with the gains quite a bit to obtain a reasonable
response (i.e., quieting the Tower.)
However, all controller gain values must be limited to <2.0

Verify your controller design first using a simulation (uncomment the


last part of PID_template.m). Save and print some representative
responses from good and bad controllers.

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

14

Procedure #5 - Design verification


Test on the real system. Dont be surprised if you find yourself
having to experimentally modify your PID design slightly compared
to the simulation; this is because our model can not fully represent
the real system. Also, dont expect any dramatic improvements; the
PID controller is quite limited in what it can do.
Turn in plots with the responses of the experimental and explain your
reasoning of the design process. Clearly note your final controller
design. Compare your system performance with and without the
controller. (Hint: use a characteristic time).
Demonstrate your PID design effectiveness on the actual system to
the instructors.

2.04A Spring 13

Lecture 16&17 March 12&14 (Tue-Thu)

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

Lecture 16&17 March 12&14 (Tue-Thu)

16

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

Department of Mechanical Engineering

2.04A Systems and Controls


Spring 2013
Supplement to Lecture 18
Control of an inverted pendulum

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 ;

= mgl sin (t) + T (t).


ml2 (t)
g sin (t) = T (t) .
(t)
l
ml
Approximating sin (t) (t), we nd the linearized equation of motion as

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

Answer: Laplace transforming, we obtain


g
T (s)
s2 (s) (s) =
l
ml2

(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:

Root Locus Editor for Open Loop 1 (OL1)


5

Imag Axis

5
10

Real Axis

Root Locus Editor for Open Loop 1 (OL1)


1

0.8

0.6

0.4

Imag Axis

0.2

0.2

0.4

0.6

0.8

1
10

2
Real Axis

The zero can be farther than s = 3 or in between s = 0 and s = 3. Either


one can stabilize the system with a big gain. The second conguration (the zero
in between the two poles) will generally need a much bigger gain to stabilize. So
the rst one (zero to the left of the stable pole) is more practical choice (and
agrees with our general strategy for PD control that we saw earlier in this class.)
g) What is the additional information that the PD controller accounts for to succeed
in stabilizing the system where the P controller failed?
Answer: The additional information is velocity. In the PD controller, D stands
for derivative action. The error signal in the feedback loop (reference - output)
contains velocity as well as displacement. Therefore the controller sees how big
the error is and also how fast the error changes (the rate of error growth or decay.)

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

System: Closed Loop r to y


I/O: r to y

4 Peak amplitude: 3.53

Step Response

Overshoot (%): 21.8


At time (sec): 1.41

3.5

System: Closed Loop r to y


I/O: r to y
Final Value: 2.89

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.

The openloop transfer function is now


(s + zI ) 1
K(s + zD )
.
s
s2 9
This system includes one free integrator, so the steady state error to a step input
is zero.
We can conrm that by computing the steady state output as
 
1
y() = lim s
s0
s

(s + zI ) 1
s s2 9 = 1.
(s + zI ) 1
1 + K(s + zD )
s
s2 9
K(s + zD )

Therefore, the steadystate error is indeed e() = 1 y() = 0.


Step Response

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:

System: Closed Loop r to y


I/O: r to y
Peak amplitude: 4.72
Overshoot (%): 372
At time (sec): 1.5

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

PIDcompensated root locus

Zoomin on the PDcompensated


root locus (from question f)
near the origin. Clearly, z = p .

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

Answer: Now we control the individual gains of the P , I, and D components as


follows:

The transfer function of the PID controller is


K1 s + K2 + K3 s2
.
s
This is very similar to the approach that we took to control the 2.04A Tower in
the lab last week.
From the new requirement, we obtain the following relations:
d > 1.9513.
0.2 > exp

1 2

> 0.4559 (cos < 0.4559 < 62.8771 ).

The desired pole location can be drawn as follows:

All we need to do in this problem is to nd K1 , K2 , and K3 that make the


(dominant) closedloop poles to be in the desired region. Matlab allows us to
change K, zD and zI in the previous questions.
Alternatively, since we can change individual gains of K1 , K2 , and K3 , we want
to introduce another trick that you can play with. The transfer function of the
compensator has a secondorder numerator, so we can actually use a pair of
complex zeros as controller. (Many of you used that approach last week for the
2.04A Tower.) For example, when we add a pair of zeros at s = 3.7 j2.04
(and a pole at s = 0 of course), then you can satisfy the desired step response.
The resulting gains for this particular case are K3 = 28.208, K2 = 17.9, and
K1 = 7.4; and the root locus and step response are shown below.
9

Root Locus Editor for Open Loop 1 (OL1)


10

Imag Axis

10
20

15

10

Real Axis

Step Response

System: Closed Loop r to y


I/O: r to y
1.4
Peak amplitude: 1.2
Overshoot (%): 19.5
At time (sec): 0.164

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

The step response meets the transient requirements rather well.

10

MIT OpenCourseWare
http://ocw.mit.edu

2.04A Systems and Controls


Spring 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

You might also like