Chapter 8 Control
Chapter 8 Control
Chapter 8
What is a Control System?
• An interconnection of components
forming a system to provide a
desired system response
• The study of control provides us with
a process for analyzing and
understanding the behavior of a
system with some input
• It also introduces methods for
achieving the desired system
response
What sorts of Systems?
Example: systems which uses control system
techniques
– Vehicle Control and Design (land, sea, air, space)
– understanding how the system responds to
external disturbances
– Biomedical (cardiac system, dialysis machine) –
design and control of the system with relation to
human interaction
– Stock Market - understanding the relationship
between interest rates and inflation where one
drives the other
– Biological - determining the relationship between
the outcome of a natural phenomenon when the
system is disturbed
Ex: Flyball Governor
Flyball Governor (1788)
• Regulate speed of
steam engine
• Reduce effects of
variations in load
(disturbance
rejection)
• Major advance of
industrial revolution
Ex: CAR Driving
• Consider a car driving
on a curved road
• Under normal driving
conditions the
direction of the car is
continuously adjusted
using feedback from
the driver
Representing a Control System
• Block diagram shows relationship
between components
• Driver performs numerous functions
including measurement, control and
selecting destinations
Control =
Sensing + Computation + Actuation
GOAL
Stability: system maintains desired operating point (hold steady speed)
Performance: system responds rapidly to changes (accelerate to 6 m/sec)
Robustness: system tolerates perturbations in dynamics (mass, drag, etc)
Representing a Control System
We can expand the driver block to show
the various functions they perform
A General Control System
• Many control systems can be
characterized by these components
Open Loop Control System
An Open Loop control system does not
include feedback Disturbance
Closed Control System
A Closed Loop control system includes
feedback
A Mechanical Control System
Cistern fill is
controlled
variable
Float ball acts
as feedback
Valve is closed
as water level
rises
Mathematical Modeling
• A system model is one or more equations
that describe the relationship between the
system variables – often the input (s) and
output (s) of the system
• For physical systems, these equations are
derived from study of the physical
properties of the system such as
mechanics, fluids, electrical,
thermodynamics, etc.
Mathematical Modelling
• To understand system
performance, a
mathematical model of
the plant is required
• This will eventually allow
us to design control
systems to achieve a
particular specification
Mathematical Modelling
• Spring damper
system
• Mass M is suspended
by a spring and
damper
• Force f is applied
• How do we describe
the motion of this
system y(t)?
Free Body Diagram
Draw an FBD
Insert forces acting on
body
Sum forces
Modern Control System Components
Disturbances
Actuator Noise Control I/P Physical Process
Actuators Actual Output
Desired
Control I/P
Sensed O/P
Reference Input Controller Sensors
Sensor Noise
(Desired Output)
Equipped w A/D,
CPU, D/A ports
Simulating Dynamic Systems
• Dynamic systems are often modeled
using ordinary differential equations or
ODEs
• ODEs are algebraic relationships
between the independent variable and
its derivatives with respect to a single
dependent variable
• MATLAB is a useful computational tool
to simulate dynamic equations
Simulating Dynamic Systems….
Model: rigid body physics (Ph 1)
sx s x 0
Review of the Laplace transform
• Laplace transform of a second derivative:
d 2 x t st d 2 x t
Lxt L 2
e 2
dt s 2
x s sx 0
x 0
dt 0 dt
ms 2
bs k x s F s mx 0 ms c x 0
• The transient response is the solution of the above
ODE if the forcing function F(t) = 0
• Ignoring the transient response and after
rearrangement
x s 1
F s ms bs k
2
x t sxs x0
Ct C / s2
step 1/ s
cost s / s 2 2
sint / s2 2
Review of the Laplace transform
C t C
LINEAR CONTROL SCHEMES
• Number of ways by which a controller can react to
the error signal and supply the output for
actuators.
• The on/off or two-step control.
• The proportional (P) control, which produces a
control signal proportional to error.
• The derivative (D) control, which produces a
control signal proportional to the rate of change of
error.
• It is an anticipatory control that measures existing
rate of change of error, anticipates incoming
larger error and applies correction before the
larger error is arrived.
*Derivative control is never used alone.
LINEAR CONTROL SCHEMES
• The integral (I) control, which produces a
control signal that is proportional to integral of
the error with time.
• The integral controller can be considered as
“looking-back” summing all the errors and then
responding.
• Combination modes: Combinations of above
strategies like proportional plus derivative
(PD), proportional plus integral (PI),
proportional plus integral plus derivative (PID)
are often used to achieve the desired
performance.
LINEAR CONTROL SCHEMES
• The approximate linear model of an individual
joint is obtained by ignoring the configuration
dependent nature of link inertias, interaction
inertias and gravity torques.
• Linear controller based on this approximate
model serves as a good approximation and
results in a satisfactory trajectory tracking
performance for the highly geared (non-direct
drive) joint,
• Such controllers are used in a vast majority of
industrial robots.
• This is basis for the study of more complex
nonlinear control schemes.
CHARACTERISTICS OF SECOND
ORDER LINEAR SYSTEMS
2
d y dy
a 2 2 a1 a0 y b0 x
dt dt
a 2 s Y ( s) a1 sY ( s) a0Y ( s) b0 X ( s)
2
d2y dy Y ( s) b0 n2
2 2
y b 2
0 nx G( s) 2
X ( s) s 2 n s n2
2 n n
dt dt
CHARACTERISTICS OF SECOND
ORDER LINEAR SYSTEMS
+ E(s) b0 n2
R(s) Y(s)
s 2 2 n s n2
Y ( s) G( s) b0 n
2
2
R( s) 1 G( s) s 2 n s (1 b0 ) n2
The second order linear characteristic equation
of the closed-loop system
CHARACTERISTICS OF SECOND
ORDER LINEAR SYSTEMS
s 2 n s n 0
2 2
Legend
y(t)
0.5
= 1
< 1
0
0 2 4 6 8 10 12 14 16
Time, t
CHARACTERISTICS OF SECOND ORDER
LINEAR SYSTEMS
(i) Damping ratio greater than unity
y(t ) 1
e n t
2 ( 2 1)
( 2 1) e n ( 2 1) t
( 1) e
2
n ( 2 1) t
1 2
LINEAR SECOND ORDER SISO MODEL
OF A MANIPULATOR JOINT...
a a Ba
Motor
1
Link
2 I
Ia
B
m J mm Bmm T1
m TL J m J L m Bm BL m
2 2
M B d
a I a M a Ba B a d
2 2
LINEAR SECOND ORDER SISO MODEL
OF A MANIPULATOR JOINT...
• Since the configuration
dependent term M is reduced by
a factor , with <<1
• Ieff is almost constant for highly
geared manipulators.
• This is small compared to direct
drive manipulator (=1)
LINEAR SECOND ORDER SISO MODEL OF A
MANIPULATOR JOINT...
To summarize the assumptions made
• The links are rigid bodies.
• Link inertia is constant.
• Non-linear interacting terms like the
interaction and centrifugal torques and
gravity torque are ignored.
• Non-linear effects like coulomb friction and
external disturbance are ignored.
• Backlash is ignored.
LINEAR SECOND ORDER SISO MODEL OF A
MANIPULATOR JOINT...
+ Armature
ea ia eb .
ea K b a ia Ra
Joint Control a Motor Driver ea DC Joint
System (desired) Circuitry Motor
Motor dynamics
• When a conductor moves in a magnetic
field, a voltage is generated
– Called back EMF: eb K 2a
– Where a is the rotor angular velocity
armature inductance armature resistance
dia
L Ri a V eb
dt
Motor dynamics
• Since this is a permanent magnet
motor, the magnetic flux is constant,
we can write: m K1ia K mia
torque constant
d m
• Similarly: eb K 2m K b
dt
back EMF constant
integrator
Motor dynamics
• to express the system as a transfer
function from the input to the output
angular displacement
– But we have two potential inputs: the load
torque and the armature voltage
– First, assume L = 0 and solve for m(s):
Jms 2 Bms m s I s Ls R Jms 2 Bms
Km
a m s V s K bs m s
Km
m s Km
V s sLs R J ms Bm K bK m
Motor dynamics
• Assuming V(s) = 0 and solve for m(s):
K bs m s K m K bs m s L s
Ia s
J m s Bm s m s
2
Ls R Ls R r
m s Ls R / r
L s sLs R J ms Bm K bK m
Note that this is a function of the gear ratio
– The larger the gear ratio, the less effect
external torques have on the angular
displacement
Motor dynamics
• In this system there are two ‘time
constants’
– Electrical: L/R and Mechanical: Jm/Bm
• the electrical time constant is assumed
to be small compared to the
mechanical time constant
– Thus, ignoring electrical time constant will
lead to :
m s Km / R m s 1/
V s sJ m s Bm K bK m / R L s sJ m s Bm K b K m / R
Motor dynamics
• Rewriting these in the time domain gives:
m s
J mm t Bm K b K m / R m t K m / R V t
Km / R
V s sJ m s Bm K bK m / R
m s 1/
J mm t Bm K bK m / R m t 1/ R L t
L s sJ m s Bm K b K m / R
J B ut d t
• By superposition of the solutions of these
two linear 2nd order ODEs:
Motor dynamics
•the dynamic eq. of a DC motor attached
to a load is written as:
Jt Bt ut d t
Where u(t) is the input and d(t) is the
disturbance (e.g. the dynamic coupling from
motion of other links)
•To represent this as a transfer function,
take the Laplace transform:
Js 2
Bs s U s Ds
Setpoint controllers
• Let us discuss two initial controllers: PD
and PID
– Both attempt to drive the error (between a
desired trajectory and the actual trajectory)
to zero
• The system can have any dynamics, but
we will concentrate on the previously
derived system
PD controller
u t K p et K d e t
• Control law:
Js Bs s K sK s K sK s Ds
2
p d p d
d
Js B K s K s K sK s Ds
2
d p p d
d
s
K sK s Ds
p d
d
Js 2 B K d s K p
PD controller
The denominator is the characteristic
polynomial s B K s K 0
2 d p
J J
The roots of the characteristic polynomial
determine the performance of the system
s 2 2s 2 0
If the closed-loop system is treated as a
damped second order system, this allows
us to choose values of Kp and Kd
• Thus Kp and Kd are:
K p 2J Kd 2J B
• A natural choice is = 1 (critically damped)
Limitations of the PD controller:
– for illustration, let our desired trajectory be a step input and our
disturbance be a constant as well:
s , Ds
C
d D
s s
– Putting this into our system :
s
K p sK d C D
s Js 2 B K d s K p
– For these conditions, what is the steady-state value of the
displacement?
s K p sK d C sD K sK d C D K pC D D
ss lim lim p
C
s 0
s Js 2 B K d s K p s 0 Js 2 B K d s K p Kp Kp
U s K p K d s E s
Ki
• In the Laplace domain:
s
s
K s
d
2
K ps K i d s sDs
Js 3 B K d s 2 K ps K i
PID controller
• The integral term eliminates the steady
state error that can arise from a large
disturbance
• How to determine PID gains
1.Set Ki = 0 and solve for Kp and Kd
2.Determine Ki to eliminate steady state error
• However, we need to be careful of the stability
conditions
B K d K p
Ki
J
PID controller
• Stability
– The closed-loop stability of these systems is
determined by the roots of the characteristic
polynomial
– If all roots (potentially complex) are in the ‘left-half’
plane, our system is stable
• for any bounded input and disturbance
– A description of how the roots of the characteristic
equation change (as a function of controller gains) is
very valuable
• Called the root locus
PARTITIONED PD CONTROL SCHEME
• A linear controller based on a Partitioned
Proportional Derivative (PPD) control strategy
is slightly different from a simple PD controller.
• It is useful for systems that are more complex.
• The controller is partitioned into two parts: a
model-based portion and a servo portion, such
that the joint-parameters (Ieff and Beff in this
case) appear only in the model-based portion.
• The approximate model of the manipulator
joint developed in previous section is used to
implement this controller.
PARTITIONED PD CONTROL
SCHEME
Servo-based Model based
Joint
+ (s)
a + (s)
a 1 (s)
a
2
s Ieff
(Ieff s 2 +B eff s)
+ +
Beff s
K d s+K p
E(s)
+
(s)
d
PARTITIONED PD CONTROL
SCHEME
a I eff a Beff a
a (s) ( I eff s Beff s) a (s)
2
a ( s) I eff a ( s) Beff s a ( s) ( s ) s 2 ( s )
a a
n K p
Kd
• damping ratio
2 Kp
• the controller for the manipulator should
be critically damped, that is = 1.
K d 2 K p 2 n
PARTITIONED PD CONTROL
SCHEME
• Time taken to compute the servo error, the PD
law control gains and to command a new
value of torque, is non-zero and is known as
the cycle time.
• Resulting command torque is a ‘discrete
staircase’ function and the servo error is non-
zero at the beginning of each cycle.
• The controller will reduce this nonzero servo
error to zero during each cycle.
• Hence, the actual trajectory tracked will be
close to, but not exactly the same as the
desired trajectory.
PARTITIONED PD CONTROL
SCHEME
• Apart from a damping ratio of unity, another
factor that constrains the selection of control
gains is the flexibility of links, which are
assumed to be rigid bodies in the development
of the joint model.
• The unmodeled structural flexibility of the link
and other mechanical elements produces
resonance at frequencies other than natural
frequency, n.
• Since these structural flexibilities have been
ignored, the controller must be designed so as
not to excite these unmodeled resonances.
PARTITIONED PD CONTROL
SCHEME
Disturbance rejection
• The purpose of control system is to reject
disturbance. If additional input of a
disturbance force fdist.
s 2 E(s) Kd sE (s) K p E(s) f dist
• Let us consider the simplest kind of
disturbance, namely when fdist is a constant.
• Steady state analysis can be performed by
analyzing the system at rest. K e f
p dist
Unmodeled flexibility
• Gearing, shafts, bearings and driven links
are not flexible.
• In reality all of these elements have finite
stiffness and their flexibility if modelled
would increase the order of the system.
• If the system is sufficiently stiff the natural
frequencies of these unmodeled resonances
are very high and can be neglected
compared to the influence of the dominant
second order poles that we have modeled
Unmodeled flexibility
• We must be careful not to excite these
resonances.
• As a rule of thumb, we must limit our closed
loop natural frequencies
n 0.5 res
This provides us some guideline to choose
gains in controller.
PARTITIONED PD CONTROL
SCHEME
I0 ω0 is the structural
res 0 frequency when effective
I max
inertia is I0
In order to prevent exciting these structural
oscillations and also to ensure structural
stability, the controller natural frequency n
must be limited to 0.5 res.
I0
n 0.5 0
I max
PARTITIONED PD CONTROL
SCHEME
The control gains Kp and Kd for the PD
controller are selected using following
equation
2 I0
K p (0.5 0 )
I max
Kd 2 K p
Effect of External Disturbance
• The performance of the partitioned PD
controller in the presence of an
external disturbance or noise is
examined now
Servo-based Model based
(s)
dist Joint
+
+ (s)
'
a + (s)
a 1 (s)
a
s2 I eff
(Ieff s 2+B eff s)
+ +
Beff s
Kd s+K p
E(s)
(s)
d +
Effect of External Disturbance
• The error dynamics in the Laplace
domain
s E(s) K d sE (s) K p E(s) dist (s)
2
s s
K
E ( s)
s( s K d s K p )
2
Effect of External Disturbance
• The steady-state error is defined as
ess Lim s E ( s )
s 0
s
the error dynamics for the PPID controller
is written as
Ki
s E (s) K d sE (s) K p E ( s)
2
E ( s) 0
s
PID CONTROL SCHEME
Servo-based Model based
(s)
dist Joint
+
+ (s)
'
a
+ (s)
a 1 (s)
a
s2 Ieff
I eff s 2+B eff s
+ +
Beff s
Kd s+K p +Ki /s
E(s)
(s)
d +