Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
37 views

Control Notes

The document provides an overview of a control systems course including the course outline, lectures, tutorials and reference texts. It also gives examples of control systems and background material on differentiation, integration and modeling physical systems using Newton's law of motion. The document is intended to introduce students to the topic of control systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Control Notes

The document provides an overview of a control systems course including the course outline, lectures, tutorials and reference texts. It also gives examples of control systems and background material on differentiation, integration and modeling physical systems using Newton's law of motion. The document is intended to introduce students to the topic of control systems.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

SC01: Control Systems

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)

• Introduction to control systems; ordinary differential equations; Laplace transform;


basic principle of feedback

• Modelling of physical systems

• Control system design — stability issues

• Control system design time domain specifications: steady state errors, overshoot,
rise time and settling time.

• Control system design using Proportional-Integral-Derivative (PID) control


technique.

2
Prepared by Ben M. Chen
Lectures and Tutorials:

• Total lecture hours for the 1st part: 6.5 hours.

• Total tutorial hours for the 1st part: 2 hours.

Reference Texts:

• G. F. Franklin, J. D. Powell and A. Emami-Naeimi, Feedback Control of


Dynamic Systems, 3rd Edition, Addison Wesley, New York, 1994.

• Z. Gajic and M. Lelic, Modern Control Systems Engineering, Prentice Hall,


London, 1996.

3
Prepared by Ben M. Chen
Introduction

4
Prepared by Ben M. Chen
What is a control system?

aircraft, missiles, Information


Desired INPUT
economic systems, about the
Difference: to the
performance: cars, etc system:
ERROR system
REFERENCE OUTPUT

Controller System to be controlled


+

Objective: To make the system OUTPUT and the desired REFERENCE as close
as possible, i.e., to make the ERROR as small as possible.

Key Issues: 1) How to describe the system to be controlled? (Modelling)

2) How to design the controller? (Control)


5
Prepared by Ben M. Chen
Some Control Systems Examples:

REFERENCE INPUT OUTPUT


Controller System to be controlled
+

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

Example: Consider f (t) = t. The rate of change of this function is

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

∫ f (t )dt = F (t ) a = F (b ) − F (a ) , where F& (t ) = f (t ) .


b
Mathematically, we write it as
a

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

A simple mechanical system:


&x& acceleration
A cruise-control
x displacement
system friction
force b x& mass force u
m

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:

REFERENCE INPUT OUTPUT


Controller
+

90 km/h u b u speed v
? v& + v =
+ m m

14
Prepared by Ben M. Chen
Basic electrical systems:

resistor capacitor inductor

i i (t) i (t)
di
v R v =i R v (t) C i =C
dv v (t) L v= L
dt
dt

Kirchhoff’s Voltage Law (KVL): Kirchhoff’s Current Law (KCL):

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

dvo A dynamic model


RC + v o = vi ⇔ RC v&o + vo = vi
dt of the circuit
16
Prepared by Ben M. Chen
Control the output voltage of the electrical system:

REFERENCE INPUT OUTPUT


vi R vo
Controller C
+

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.

Reference Input Output


Controller
+ –

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 ) = 0, y (0) = 5000, the initial condition

The ODE is homogeneous. Replace the ODE with

y& ( t ) ⇔ s1 = s & y (t ) ⇔ s 0 = 1 s + 0.05 = 0 ⇒ s = −0.05

The solution is then given by y ( t ) = ke st = ke −0. 05t, where k is a constant to be determined.

Substitute this function into the ODE,

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

It is indeed a solution. To find k, we use initial condition

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:

Vertical Position (kilometers) 4

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

Let us first examine the following time-domain functions:


1 2

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)

A cosine function with a frequency f = 0.2 Hz. x (t ) = cos(0.4πt ) + sin(0.8πt )cos(1.6πt )


Note that it has a period T = 5 seconds. What are frequencies of this function?

Laplace transform is a tool to convert a time-domain function into a frequency-domain one


in which information about frequencies of the function can be captured. It is often much
easier to solve problems in frequency-domain with the help of Laplace transform.
24
Prepared by Ben M. Chen
Laplace Transform:

Given a time-domain function f (t), its Laplace transform is defined as follows:


F ( s) = L{ f (t )} = ∫ f (t )e −st dt
0

Example 1: Find the Laplace transform of a constant function f (t) = 1.

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

Example 2: Find the Laplace transform of an exponential function f (t) = e – a t.

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

2. Differentiation: Assume that f (0) = 0.

 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

Taking Laplace transform on both sides of the equation, we obtain

L{ v& + bv} = L{ u} ⇒ L{ v&}+ L{ bv} = L{ u}

⇒ sL{ v}+ bL{ v } = L{ u} ⇒ sV (s ) + bV (s ) = U ( s )

⇒ (s + b)V ( s ) = U ( s) ⇒
V ( s)
=
1
= G (s )
U ( s) s+b

This is called the transfer function of the system model


28
Prepared by Ben M. Chen
A cruise-control system in frequency domain:

REFERENCE INPUT OUTPUT


Controller
+

R (s) U (s) 1 speed V (s)


driver? auto? G ( 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

Taking Laplace transform on both sides of the equation, we obtain

L{ y& + 0.05 y} = L{ u} ⇒ L{ y& }+ 0.05L{ y} = L{ 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

This is the transfer function of the fighter aircraft


30
Prepared by Ben M. Chen
Control the fighter aircraft in frequency domain:

Reference Input Output

Controller
+

R(s) U(s) Y(s)


1
? G(s) =
+
– s +0.05

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 

Taking inverse Laplace transform, we obtain y( t ) = 200000 (1 − e−0.05 t )


33
Prepared by Ben M. Chen
The vertical position of the aircraft: It reaches 200000 m instead of the desired 10000 m.

200

Vertical Position (kilometers)


150

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

Vertical Position (kilometers)


8

0
0 50 100 150
Time (seconds)

The aircraft will reach the desired level in about 130 seconds. Can we improve this?

The answer is yes and the solution is to use a feedback controller.


35
Prepared by Ben M. Chen
In general, a feedback control system can be represented by the following block diagram:

R (s) E (s) U (s) Y (s)


K (s) G ( s)
+ –

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:

♦ Classical control: Proportional-integral-derivative (PID) control, developed in 1940s and used


for control of industrial processes. Examples: chemical plants, commercial aeroplanes.

♦ 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

Let us examine the following block diagram of control system:

R (s) E (s) U (s) Y (s)


K (s) G ( s)
+ –

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

Vertical Position (kilometers)


8

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

Vertical Position (kilometers)


Vertical Position (kilometers)

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

Using the Laplace transform table on Page 26, we obtain y ( t ) = 0 .5 ( e t − e − t )

12000

10000 This system is said to be unstable because the


8000 output response y(t) goes to infinity as time t is
y (t ) 6000 getting larger and large. This happens because
4000
the denominator of H(s) has one positive root at
2000
s = 1.
0
0 2 4 6 8 10
Time (seconds) 43
Prepared by Ben M. Chen
Example 2: Consider a closed-loop system with,
R (s) = 1 1 Y (s)
H ( s) = 2
s + 3s + 2

We have
1 1 1 1
Y (s ) = H ( s ) R ( s ) = = = −
s 2 + 3s + 2 ( s + 1)( s + 2 ) s+1 s+2

Using the Laplace transform table on Page 26, we obtain y ( t ) = e − t − e −2 t

0.25

0.2 This system is said to be stable because


the output response y(t) goes to 0 as time
0.15
y (t )
t is getting larger and large. This happens
0.1
because the denominator of H(s) has no
0.05 positive roots.

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

The behavior of the system is as follows:

The behavior of the system is


fully characterized by ζ ,
which is called the damping
ratio, and ω n , which is called
the natural frequency.

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

R (s) E (s) U (s) Y (s)


K (s ) G ( s)
+ –

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

Compare this with the standard 2nd order system:


2ζω n − a
kp =
2ζω n = a + bk p b
ωn2
H (s ) = 2 ωn2 = bk i ω n2
s + 2ζω n s + ωn2 ki =
b
The key issue now is to choose parameters kp and k i such that the above resulting system
has desired properties, such as prescribed settling time and overshoot. 50
Prepared by Ben M. Chen
Fighter Aircraft Control System Design

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 achieve an overshoot less than 10%, we obtain


from the figure on the right that ζ > 0 . 6

To be safe, we choose ζ = 0 .8

To achieve a settling time of 30 sec., we use

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

2ζω n − a 2ζω n − a 2 × 0 .8 × 0 . 192 − 0 .05


kp = kp = = = 0 . 257
b b 1
ω n2 ω n2 0 .192 2
ki = ki = = = 0 . 0369
b b 1

The final flight control system:

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 achieve an overshoot less than 25%, we obtain


from the figure on the right that ζ > 0 . 4

To be safe, we choose ζ = 0 . 6

To achieve a settling time of 10 s, we use x

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,

2ζω n − a 2ζω n − a 2 × 0 . 6 × 0 . 767 − 1 / 3000


kp = kp = = = 2760
b b 1 / 3000
ω n2 ω n2 0 . 767 2
ki = ki = = = 1765
b b 1 / 3000

The final cruise-control system:

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

and the settling


Speed in km/h

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

Reference Controller Vertical


10000 m Position
0 .0369
0 . 257 +
+ s

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

Q.1. Consider a simple RL circuit below.

a) Find an ordinary differential equation in terms of the current i to


characterize the dynamics of the circuit.

b) Find the transfer function from the input vi to the output v o.

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

Taking inverse Laplace transform, we obtain

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

The output voltage

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.

a) Find an ordinary differential equation in terms of the position x to


characterize the dynamics of the system.

b) Find the transfer function from the input θ to the output x.

c) Given that θ is a unit impulse input, find the response of the position x.

x θ

Assume the angle θ is changing in a small range. For simplicity,


assume that the gravity g = 9.8 ≈ 10.
63
Prepared by Ben M. Chen
Solution: a) The only force acts on the system is the weight of the ball

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,

F = ma ⇒ mg sin θ = ma = m &x& ⇒ &x& = g sin θ

Since θ is assumed to be small, it can be shown that sin θ ≈ θ. Thus,

&x& = g sin θ ⇒ &x& = g θ = 10 θ


64
Prepared by Ben M. Chen
b) The transfer function from the input θ to the output x can be obtained by

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

• RL Circuit • Control System

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

Comparing this with the standard 2nd order system

ωn2
H (s ) = 2
s + 2ζω n s + ωn2

we can match almost all parameters by selecting:

ω 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

To achieve a settling time of 1 sec., we use

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:

settling time = 1 second settling time = 2.5 seconds

overshoot = 9 % < 10 % overshoot = 0 %

The output voltage


1.2

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)
+ –

• Ball Balancing System • Control System

72
Prepared by Ben M. Chen
Solution: Consider
r e θ x
K (s) G(s)
+ –

Following exactly the same procedure as in Q.1, we can derive

X (s) G ( s ) K ( s)
=
R ( s ) 1 + G ( s) K ( s)

• Recall from Q.2 of Tutorial One that

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 

Again, comparing this with the standard 2nd order system

ωn2
H (s ) = 2
s + 2ζω n s + ωn2

we can match almost all parameters by selecting:

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

To achieve a settling time of 4 sec., we use

4.6 4.6 4 .6 x
ts = ⇒ ωn = = = 1 . 92
ζω n ζt s 0 .6 × 4

Thus, we have

k d = 0 .2ζω n = 0 .2 × 0 .6 × 1 .92 = 0 .23


K ( s ) = 0 . 37 + 0 . 23 s

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:

settling time = 4 seconds An unstable system

overshoot = 25 % The ball will roll off the beam

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

You might also like