Control Notes
Control Notes
Ben M. Chen
Associate Professor
Department of Electrical & Computer Engineering
The National University of Singapore
Phone: 874-2289
Office: Block E4-6-7
Email: bmchen@nus.edu.sg
http://vlab.ee.nus.edu.sg/~bmchen
1
Part 1: Course Outline (Part 1)
• Control system design time domain specifications: steady state errors, overshoot,
rise time and settling time.
2
Prepared by Ben M. Chen
Lectures and Tutorials:
Reference Texts:
3
Prepared by Ben M. Chen
Introduction
4
Prepared by Ben M. Chen
What is a control system?
Objective: To make the system OUTPUT and the desired REFERENCE as close
as possible, i.e., to make the ERROR as small as possible.
Desired Government
Economic System
Performance Policies
6
Prepared by Ben M. Chen
A Live Demonstration on Control of a Coupled-Tank System through
Internet Based Virtual Laboratory Developed by NUS
The objective is to control the flow levels of two coupled tanks. It is a reduced-scale
model of some commonly used chemical plants.
7
Prepared by Ben M. Chen
Background
8
Prepared by Ben M. Chen
Background Material: Differentiation
Given a function of time, say f (t), its differentiation is the rate of change of the function.
Mathematically,
df (t ) f (t + ∆t ) − f (t )
f& (t ) = = , ∆t is small
dt ∆t
Example: Consider f (t) = 1. Obviously, the rate of change of a constant is zero, i.e., it
does not change at all.
df (t ) f (t + ∆t ) − f (t ) 1 − 1 0
f& (t ) = = = = =0
dt ∆t ∆t ∆t
df (t ) f (t + ∆t ) − f (t ) (t + ∆t ) − t ∆t
f& (t ) = = = = =1
dt ∆t ∆t ∆t
The rate of change of this function is constant.
9
Prepared by Ben M. Chen
More examples for the differentiation (or derivative or the rate of change):
dx(t )
♦ The rate of change of displacement (x) is called speed (v), i.e., v(t ) = x& (t ) =
dt
2
d x( t )
♦ The rate of change of speed (v) is called acceleration (a), i.e., a (t ) = v&(t ) = &x&(t ) =
dt 2
d sin ωt
♦ The derivative of a sine function is cosine, i.e., = ω cos ωt
dt
d cos ωt
♦ The derivative of a cosine function is minus sine, i.e., = −ω sin ωt
dt
dekt
♦ The derivative of an exponential function is an exponential function, i.e., = ke kt
dt
1 150
0.8
100
0.6
e =1
0 e −t e −∞
=0 et e∞ = ∞
0.4
50
0.2
0 0 10
0 2 4 6 8 10 0 1 2 3 4 5
TIME (Second) TIME (Second)
Prepared by Ben M. Chen
Background Material: Integration
The integration of a function f (t) over a certain interval is the total area of the function within
the interval, e.g., f (t)
a b
b
1 kt
Examples: 1) f (t ) = 1 ⇔ F (t ) = t 2) f (t ) = e k t ⇔ F ( t) = e
k
b b b
1 1 1
∫ 1⋅ dt = F (t ) = F (b ) − F (a ) = b − a ∫ e k tdt = ek t = e kb − e ka
b
a
a
k a k k
a
11
Prepared by Ben M. Chen
Modeling
12
Prepared by Ben M. Chen
Modeling of Some Physical Systems
By the well-known Newton’s Law of motion: f = m a, where f is the total force applied to an
object with a mass m and a is the acceleration, we have
b u
u − bx& = m&x& ⇔ &x& + x& =
m m
This a 2nd order Ordinary Differential Equation with respect to displacement x. It can be
written as a 1st order ODE with respect to speed v = x& :
b u ← model of the cruise control system, u is input force, v is output.
v& + v= 13
m m
Prepared by Ben M. Chen
A cruise-control system:
90 km/h u b u speed v
? v& + v =
+ m m
–
14
Prepared by Ben M. Chen
Basic electrical systems:
i i (t) i (t)
di
v R v =i R v (t) C i =C
dv v (t) L v= L
dt
dt
The sum of voltage drops around any The sum of currents entering/leaving a
close loop in a circuit is 0. note/closed surface is 0.
v2 i1 i1
i5 i5
v1 v3 i4 i4
i2 i2
i3 i3
v1+v2 +v3+v4 +v5 = 0
v5 v4 i1 + i2 + i3 + i4 + i5 = 0
15
Prepared by Ben M. Chen
Modelling of a simple electrical system:
To find out relationship between the input (v i) and the output (vo) for the circuit:
dvo
v R = Ri = RC
dt
i dvo
i=C
dt
R
vi C vo
By KVL, we have v o + v R − vi = 0
dvo
v o + v R − vi = v o + RC − vi = 0
dt
230 Volts vi vo
? RC v&o + vo = vi
+
–
17
Prepared by Ben M. Chen
Control of a Fighter Aircraft
It can be showed that the vertical position of a fighter aircraft can be approximated by the
following equation:
y& (t ) + 0.05 y (t ) = u ( t )
where y(t) is the vertical position (in meters) above the sea level and u(t) is the thrust force.
10000 m u y
? y& ( t ) + 0. 05 y (t ) = u (t )
+ –
18
Prepared by Ben M. Chen
Ordinary Differential Equations
19
Prepared by Ben M. Chen
Ordinary Differential Equations
Many real life problems can be modelled as an ODE of the following form:
&y&(t ) + a1 y& ( t ) + a0 y (t ) = u (t )
This is called a 2nd order ODE as the highest order derivative in the equation is 2. The ODE
is said to be homogeneous if u(t) = 0. In fact, many systems can be modelled or
approximated as a 1st order ODE, i.e.,
y& ( t ) + a0 y (t ) = u (t )
An ODE is also called the time-domain model of the system, because it can be seen the above
equations that y(t) and u(t) are functions of time t. The key issue associated with ODE is: how
to find its solution? That is: how to find an explicit expression for y(t) from the given equation?
20
Prepared by Ben M. Chen
Solutions to a 1st order ODE associated with a fighter aircraft:
y& (t ) + 0.05 y (t ) =
d
(ke −0.05 t ) + 0. 05(ke −0. 05t ) = −0.05ke − 0.05 t + 0.05ke −0 .05t = 0
dt
y ( 0) = ke −0. 05 t
= ke = k = 5000
0
y (t ) = 5000e −0.05 t
t =0
21
Prepared by Ben M. Chen
Vertical Positions of the Fighter Aircraft:
0
0 50 100 150
Time (seconds)
22
Prepared by Ben M. Chen
Laplace Transform
23
Prepared by Ben M. Chen
Laplace Transform and Inverse Laplace Transform
0.8
1.5
0.6
1
0.4
0.5
0.2
Magnitude
Magnitude
0 0
-0.2
-0.5
-0.4
-1
-0.6
-1.5
-0.8
-1 -2
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
TIME (Second) TIME (Second)
F ( s) = L{ f (t )} = ∫ f (t )e −st dt
0
∞ ∞ ∞
1 1 1
∫ ∫
1 1 1
F (s) = f (t ) e dt = e dt = − e − st = − e − ∞ − − e 0 = − ⋅ 0 − − ⋅1 =
− st − st
0 0
s 0 s s s s s
∞ ∞ ∞ ∞
1 −( s + a ) t 1
F ( s) = ∫ f (t )e − st dt = ∫ e −at e − st dt = ∫ e − (s +a )t dt = − e =
0 0 0
s+a 0 s+a
25
Prepared by Ben M. Chen
Inverse Laplace Transform
Given a frequency-domain function F(s), the inverse Laplace transform is to convert it back
to its original time-domain function f (t).
Here are some very useful Laplace and inverse Laplace transform pairs:
f ( t) ⇔ F ( s) f (t ) ⇔ F ( s)
1 a
1 ⇔ sin at ⇔
s s2 + a2
1 s
t ⇔ cos at ⇔
s2 s2 + a2
1 b
−at
⇔ e −at sin bt ⇔
e
s+a (s + a )2 + b2
1 s+a
te−at ⇔ e−at cos bt ⇔
(s + a )2 (s + a )2 + b2 26
Prepared by Ben M. Chen
Some useful properties of Laplace transform:
1. Superposition:
L{a1 f1 (t ) + a 2 f 2 (t )} = a1 L{ f1 (t )}+ a 2 L{ f 2 (t )} = a1 F1 ( s ) + a 2 F2 ( s )
df (t )
L { }
= L f& ( t ) = sL{ f (t )} = sF ( s)
dt
d 2 f (t )
L 2 = L { }
&f&(t ) = s 2 L{ f (t )} = s 2 F ( s )
dt
3. Integration:
t 1
L ∫ f (ζ )dζ = L{ f (t )} = F ( s)
1
0 s s
27
Prepared by Ben M. Chen
Re-express ODE Models using Laplace Transform (Transfer Function)
Recall that the mechanical system in the cruise-control problem with m = 1 can be
represented by an ODE:
v& + bv = u
⇒ (s + b)V ( s ) = U ( s) ⇒
V ( s)
=
1
= G (s )
U ( s) s+b
29
Prepared by Ben M. Chen
Recall that the fighter aircraft vertical positioning system can be represented by an ODE:
y& + 0.05 y = u
⇒ sY ( s ) + 0.05Y ( s ) = U ( s) ⇒ (s + 0.05) Y ( s ) = U (s )
Y ( s) 1
G( s) = =
U (s ) s + 0.05
Controller
+
–
31
Prepared by Ben M. Chen
Feedback Control
32
Prepared by Ben M. Chen
Why do we need a feedback controller ?
To answer this question, let us consider the fighter aircraft vertical positioning system, i.e.,
Y (s ) 1
G( s) = =
U ( s ) s + 0.05
If we want the aircraft to reach 10000 m above the sea level without a controller, one might
guess that we need to apply an input force u(t) = 10000. Let us try to see whether this
works or not. From the Laplace transform table, we have
U ( s ) = L{ 10000} =
10000
s
1 10000 1 1
Y ( s ) = G ( s )U ( s) = = 200000 −
s + 0 .05 s s s + 0 .05
200
100
50
0
0 50 100 150
Time (seconds)
34
Prepared by Ben M. Chen
If we choose u = 500, the resulting position will be y( t ) = 10000 (1 − e−0.05 t )
10
0
0 50 100 150
Time (seconds)
The aircraft will reach the desired level in about 130 seconds. Can we improve this?
Given a system represented by G(s) and a reference R(s), the objective of control system
design is to find a control law (or controller) K(s) such that the resulting output Y(s) is as
close to reference R(s) as possible, or the error E(s) = R(s) –Y(s) is as small as possible.
However, many other factors of life have to be carefully considered when dealing with real-
life problems. These factors include:
uncertainties
disturbances noises
R (s) E (s)
K (s) G ( s)
+ – U (s) Y (s)
nonlinearities
36
Prepared by Ben M. Chen
Control Techniques:
There are tons of research published in the literature on how to design control laws for various
purposes. These can be roughly classified as the following:
♦ Optimal control: Linear quadratic regulator control, Kalman filter, H2 control, developed in
1960s to achieve certain optimal performance and boomed by NASA Apollo Project.
♦ Robust control: H∞ control, developed in 1980s & 90s to handle systems with uncertainties
and disturbances and with high performances. Example: military systems.
♦ Nonlinear control: Currently hot research topics, developed to handle nonlinear systems
with high performances. Examples: military systems such as aircraft, missiles.
♦ Intelligent control: Knowledge-based control, adaptive control, neural and fuzzy control, etc.,
researched heavily in 1990s, developed to handle systems with unknown models.
Examples: economic systems, social systems, human systems. 37
Prepared by Ben M. Chen
Classical Control
Recall that the objective of control system design is trying to match the output Y(s) to the
reference R(s). Thus, it is important to find the relationship between them. Recall that
Y ( s)
G (s ) = ⇒ Y ( s ) = G ( s )U ( s )
U ( s)
Similarly, we have U ( s ) = K ( s ) E ( s ) , and E ( s ) = R ( s ) − Y ( s ) . Thus,
Y ( s ) = G ( s )U ( s ) = G ( s ) K ( s ) E ( s ) = G ( s ) K ( s )[R ( s ) − Y ( s ) ]
Y ( s ) = G ( s ) K ( s ) R ( s ) − G ( s ) K ( s )Y ( s ) ⇒ [1 + G ( s ) K ( s ) ]Y ( s ) = G ( s ) K ( s ) R ( s )
Y (s) G (s )K ( s)
⇒ H ( s) = = Closed-loop transfer function from R to Y. 38
R (s ) 1 + G (s )K ( s)
Prepared by Ben M. Chen
Thus, the block diagram of the control system can be simplified as,
R (s) G ( s) K ( s) Y (s)
H (s ) =
1 + G ( s) K (s )
The whole control problem becomes how to choose an appropriate K(s) such that the
resulting H(s) would yield desired properties between R and Y.
b
We’ll focus on control system design of some first order systems G ( s ) = with a
s+a
ki k s + ki
proportional-integral (PI) controller, K ( s ) = k p + = p . This implies
s s
G ( s) K ( s) bk p s + bk i
H (s ) = = 2
1 + G ( s ) K ( s ) s + ( a + bk p ) s + bk i
The closed-loop system H(s) is a second order system as its denominator is a polynomial s
of degree 2.
39
Prepared by Ben M. Chen
Example 1: The performance of the fighter aircraft with a PI controller ( kp = 0.05, ki = 0.01)
12
10
Vertical Position (kilometers)
10
6
8
4
2
6
0
0 50 100 150
Time (seconds)
4
The response is much faster compared to the system without a controller. The drawback
is that there is a 20% overshoot. 40
Prepared by Ben M. Chen
Example 2: The performance of the fighter aircraft with a PI controller ( kp = 0.1, ki = 0.01)
12
10
10 8
8 4
2
6
0
0 50 100 150
Time (seconds)
4
Performance of the system
2 without a controller
(see Page 35)
0
0 50 100 150
Time (seconds)
The response is faster and the overshoot is smaller. The controller does improve the overall
system performance a great deal. 41
Prepared by Ben M. Chen
System Stability
42
Prepared by Ben M. Chen
Stability of Control Systems e −at ⇔
1
s+a
Example 1: Consider a closed-loop system with,
0 .5
R (s) = 1 Y (s) 0 .5 e − t ⇔
1 s +1
H ( s) =
s2 − 1 &
We have 0 .5 e t ⇔
0.5
s −1
1 1 0.5 0.5
Y (s ) = H (s ) R ( s ) = = = −
s2 − 1 ( s + 1)( s − 1) s −1 s+1
12000
We have
1 1 1 1
Y (s ) = H ( s ) R ( s ) = = = −
s 2 + 3s + 2 ( s + 1)( s + 2 ) s+1 s+2
0.25
0
0 2 4 6 8 10
Time (seconds) 44
Prepared by Ben M. Chen
We consider a general 2nd order system,
R (s) = 0 Y (s)
ωn2
H (s ) = 2
s + 2ζω n s + ωn2
The system is stable if the denominator of the system, i.e., s 2 + 2ζω n s + ωn2 = 0 , has no
positive roots. It is unstable if it has positive roots. In particular,
Marginally Stable
Stable
Unstable
45
Prepared by Ben M. Chen
Behavior of Systems
46
Prepared by Ben M. Chen
Behavior of Second Order Systems with a Step Inputs
Again, consider the following block diagram with a standard 2nd order system,
R (s) = 1/s
ω n2 Y (s)
H ( s) = 2
r=1 s + 2ζω n s + ωn2
47
Prepared by Ben M. Chen
Control System Design with Time-domain Specifications
R (s) = 1/s
ωn2 Y (s)
H (s ) = 2
r=1 s + 2ζω n s + ωn2
overshoot M p
rise time
1 .8 tr
tr ≅ t
ωn ts ts ≅
4.6
1% settling time ζω n
48
Prepared by Ben M. Chen
Control System Design
49
Prepared by Ben M. Chen
Recall that
b k k s + ki
with G ( s ) = and K ( s ) = k p + i = p results a closed-loop system:
s+a s s
Y ( s) G ( s) K ( s) bk p s + bk i
H ( s) = = = 2
R ( s ) 1 + G ( s ) K ( s ) s + ( a + bk p ) s + bk i
We have seen earlier that it would take more than 2 minutes for the fighter aircraft to reach
10000 m if it is without a feedback controller. Let us design a PI controller for it such that the
aircraft will reach the desired vertical level in 30 seconds (i.e., the settling time is 30 sec)
and the maximum overshoot is less than 10%.
To be safe, we choose ζ = 0 .8
4.6 4 .6 4.6 x
ts = ⇒ ωn = = = 0 . 192
ζω n ζt s 0 . 8 × 30
51
Prepared by Ben M. Chen
Recall that the fighter aircraft has a transfer function,
Y (s ) b 1
G( s) = = = ⇒ a = 0.05, b = 1
U ( s) s + a s + 0.05
Then, using the formulae we have just derived, we obtain
Reference Vertical
10000 m Position
0 .0369
0 . 257 +
+ s
–
52
Prepared by Ben M. Chen
Simulation Result:
12
The resulting
overshoot is
Vertical Position (kilometers)
10
about 10% and
8
the settling time
6 is about 30
seconds.
4
Thus, our
2
design goal is
0 achieved.
0 10 20 30 40 50 60
Time (seconds)
53
Prepared by Ben M. Chen
Cruise-Control System Design
1
V ( s) m
Recall the model for the cruise-control system, i.e., = . Assume that the
U (s) s + b
m
mass of the car is 3000 kg and the friction coefficient b = 1. Design a PI controller for it
such that the speed of the car will reach the desired speed 90 km/h in 10 seconds (i.e., the
settling time is 10 s) and the maximum overshoot is less than 25%.
To be safe, we choose ζ = 0 . 6
4 .6 4 .6 4 .6
ts = ⇒ ωn = = = 0 . 767
ζω n ζt s 0 . 6 × 10
54
Prepared by Ben M. Chen
The transfer function of the cruise-control system,
1 1
Y (s ) m = 3000
G ( s) = = ⇒ a = b = 1 3000 = 0.000333
U ( s) s + b s+ 1
m 3000
Again, using the formulae derived,
Reference
Speed
90 km/h
1765
2760 +
+ s
–
55
Prepared by Ben M. Chen
Simulation Result:
120
The resulting
100 overshoot is
less than 25%
80
60 time is about 10
seconds.
40
Thus, our
20
design goal is
achieved.
0
0 2 4 6 8 10 12 14 16 18 20
Time in Seconds
56
Prepared by Ben M. Chen
Final Remarks on the Implementation of Controllers
The implementation of the above controller can be done using analog electronic devices
such as resistors, inductors, capacitors, and operational amplifiers. However, it is more
common nowadays to implement controllers using computers, as it is simple, low cost and
reliable. More importantly, it is much easier to be re-programmed. H
57
Prepared by Ben M. Chen
Tutorials
58
Prepared by Ben M. Chen
Tutorial One - Modeling and Laplace Transforms
c) Given that vi is a unit step input, find the output voltage vo.
i
L=1
vi R=2 vo
59
Prepared by Ben M. Chen
Solution: a) vL= L
di
dt
i
L=1
vi R=2 vo = iR = 2i
By KVL,
di di di
v i = v L + vo = L + iR = + 2i ⇒ + 2 i = v i ODE
dt dt dt
b) Taking Laplace transform on the both sides of the above ODE, we have
I ( s) 1
sI ( s ) + 2 I ( s ) = V i ( s ) ⇒ ( s + 2 ) I ( s ) = Vi ( s ) ⇒ =
Vi ( s ) s + 2
Vo ( s ) 2 I ( s ) 2
⇒ = = Transfer Function
Vi ( s ) Vi ( s ) s+2
60
Prepared by Ben M. Chen
c) The Laplace transform of the unit step input is given by 1/s (see p. 26).
Vo ( s ) 2 2 2 1 a b
= ⇒ Vo ( s ) = V ( s) = ⋅ = +
Vi ( s ) s+2 s+2 i s+2 s s+2 s
Partial fraction
2 1 a b as + bs + 2 b ( a + b ) s + 2 b
⋅ = + = =
s+2 s s+2 s (s + 2)s (s + 2) s
⇒ a + b = 0, 2b = 2 ⇒ b = 1, a = − b = −1
a b 1 1
⇒ Vo ( s ) = + = −
s+2 s s s+2
1 1
v o ( t ) = L−1 − L−1 =1− e
−2t
s s + 2 61
Prepared by Ben M. Chen
The output voltage of the circuit:
0.8
Magnitude
0.6
0.4
0.2
0
0 1 2 3 4 5
Time in seconds
62
Prepared by Ben M. Chen
Q.2. Consider a ball balancing mechanical system below.
c) Given that θ is a unit impulse input, find the response of the position x.
x θ
x
mg sin θ θ
mg
By Newton’s law of motion, i.e., F = ma, where a is the acceleration, m the mass and F is
the force acting on the object in the direction of the motion,
L {&x&} = L{10θ } ⇒ s 2 X ( s ) = 10 Θ ( s ) ⇒
X ( s ) 10
G (s) = = 2
Θ( s ) s
c) The Laplace transform of the unit impulse input is 1. From the above transfer function,
we obtain
10 10 10 1
X ( s) = Θ ( s ) = ⇒ x ( t ) = L−1 2 = 10 L−1 2 = 10 t
s2 s2 s s
Obviously, the ball will roll off the beam after an impulse force acting on it. It is an unstable
system. A controller is definitely needed if one wish to balance the ball at the center of the
beam.
65
Prepared by Ben M. Chen
The position of the ball due to an impulse input:
50
40
Magnitude
30
20
10
0
0 1 2 3 4 5
Time in seconds
66
Prepared by Ben M. Chen
Tutorial Two - Control System Design
Q.1. Consider a simple RL circuit below. It was shown that in Tutorial One
that the settling time of the output response due to a step input is
about 2.5 seconds. Design a PI controller (see the second figure)
such that when it is applied to the circuit, the resulting settling time
due to a unit step input is less than 1 second with a 10% overshoot.
i
R E Vi Vo
L=1 K (s) G(s)
vi R=2 vo + –
67
Prepared by Ben M. Chen
Solution: Consider
R E Vi Vo
K (s) G(s)
+ –
Vo ( s ) = G ( s )Vi ( s ) = G ( s ) K ( s ) E ( s ) = G ( s ) K ( s ) [R ( s ) − Vo ( s ) ]
⇒ [1 + G ( s ) K ( s )]Vo ( s ) = G ( s ) K ( s ) R ( s ) ⇒
Vo ( s )
=
G ( s ) K ( s)
R ( s) 1 + G ( s ) K ( s)
• Recall from Q.1 of Tutorial One that
V ( s) 2 Vo ( s ) G ( s ) K ( s)
G (s) = o = =
Vi ( s ) s + 2 R ( s ) 1 + G ( s) K ( s)
2 k p s + k i
and the PI controller has the form
s + 2 s
=
2 k p s + k i
ki k p s + ki 1+
K ( s) = k p + = s + 2 s
s s 68
Prepared by Ben M. Chen
2 k p s + ki 2( k p s + k i )
Vo ( s ) s + 2 s s( s + 2) 2 ( k p s + ki )
= = =
R(s) 2 k p s + ki 1 + 2 ( k s + k ) s( s + 2) + 2( k p s + k i )
1+
p i
s + 2 s s( s + 2)
Vo ( s ) 2 k p s + 2 ki
⇒ = 2
R ( s ) s + 2 (1 + k p ) s + 2 k i
ωn2
H (s ) = 2
s + 2ζω n s + ωn2
ω n2
2ζω n = 2 (1 + k p ) ⇒ k p = ζω n − 1 ω n2 = 2 k i ⇒ ki =
2
69
Prepared by Ben M. Chen
To achieve an overshoot less than 10%, we obtain from
the figure on the right that ζ > 0 . 6
To be safe, we choose ζ = 0 .8
4.6 4 .6 4.6
ts = ⇒ ωn = = = 5 .75
ζω n ζt s 0.8 × 1 x
Thus, we have
a resistor
k p = ζω n − 1 = 4 . 6 − 1 = 3 . 6
16 .5
K ( s ) = 3 .6 + a capacitor
s
ω n2 5 .75 2
ki = = = 16 .5
2 2
70
Prepared by Ben M. Chen
• Output response of controlled system: • Output response of uncontrolled system:
1 1
0.8 0.8
Magnitude
Magnitude
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 1 2 3 4 5 0 1 2 3 4 5
Time in seconds Time in seconds
71
Prepared by Ben M. Chen
Q.2. Consider a ball balancing mechanical system below. It was shown that
in Tutorial One that the system is unstable. Design a PD controller (see
the second figure) such that when it is applied to the system, the
resulting settling time due to a unit step input is less than 4 second with
a 25% overshoot.
r e θ x
x θ K (s) G(s)
+ –
72
Prepared by Ben M. Chen
Solution: Consider
r e θ x
K (s) G(s)
+ –
X (s) G ( s ) K ( s)
=
R ( s ) 1 + G ( s) K ( s)
10 X (s) G ( s) K ( s )
G (s) = 2 =
s R(s) 1 + G (s) K ( s)
10 (k
and the PD controller has the form 2 p + kd s )
=
s
1 + 2 (k p + k d s )
10
K ( s ) = k p + kd s s
73
Prepared by Ben M. Chen
2 (k p + k d s )
10
10 (k p + k d s ) 10 k d s + 10 k p
=
X (s) s
= 2 = 2
s + 10 (k p + k d s )
1 + 2 (k p + k d s )
R(s) 10 s + 10 k d s + 10 k p
s
ωn2
H (s ) = 2
s + 2ζω n s + ωn2
2ζω n = 10 k d ⇒ k d = 0 .2ζω n ω n2 = 10 k p ⇒ k p = 0 . 1ω n2
As usual, we have ignored the first term in the numerator of the transfer function from R to
X. This is because that it does not affect much the overall response.
74
Prepared by Ben M. Chen
To achieve an overshoot less than 25%, we obtain from
the figure on the right that ζ > 0 . 4
To be safe, we choose ζ = 0 .6
4.6 4.6 4 .6 x
ts = ⇒ ωn = = = 1 . 92
ζω n ζt s 0 .6 × 4
Thus, we have
k p = 0 . 1ω n2 = 0 . 1 × 1 .92 2 = 0 . 37 PD Controller
75
Prepared by Ben M. Chen
• Output response of controlled system: • Output response of uncontrolled system:
1.4 50
1.2
40
1
30
Magnitude
Magnitude
0.8
0.6 20
0.4
10
0.2
0 0
0 1 2 3 4 5 6 0 1 2 3 4 5
Time in seconds Time in seconds
76
Prepared by Ben M. Chen