You are on page 1of 11

Mechanical, Automotive, & Materials Engineering

92-321 Control Theory


Summer 2012
Final Exam

Engineering is a professional faculty, and as a student of engineering, it is expected that you will behave
in a professional manner during your exam, and abide by the following standards of conduct.

1. Unless explicitly allowed, a candidate must not give assistance to, or receive assistance from, or
communicate in any manner with any person other than the examiner or proctors. A candidate
who is involved in such activity may be subject to disciplinary procedures of the University.

2. The possession of any telecommunications device is strictly prohibited during an exam, and will be
considered as cheating, whether it is used or not. Students found with said devices may be subject
to to disciplinary procedures of the University. If you are in possession of any telecommunications
devices, identify yourself to the proctor and surrender them immediately for the duration of the
exam. Please note that the University is not responsible for lost or stolen items.

3. The possession of any unauthorized aids during an exam will be considered as cheating, whether
it is used or not. Students found with said materials may be subject to disciplinary procedures of
the University.

4. Be prepared to hand in your exam to the proctors immediately after time expires. Students who
delay collection of the exams by the proctor (i.e., they must wait for you to finish writing, sign
your name, etc.,) may be subject to downward adjustment of their grade.

5. Remain seated quietly until all the exams have been collected, not just your own. Recognize that
other students are still holding their exams and could be influenced by any discussions. There
will be plenty of opportunity to discuss the exam outside the hall.

6. Each student will be allowed a maximum of three inquiries regarding the exam material; further
requests for clarification will be denied. If you have uncertainties about the exam, make sure you
have read the entire question, state your assumptions, and proceed. Do not waste the examiner’s
time by asking questions regarding the correctness of your solution.

7. Answer all questions, to the best of your ability.

Also, a general note; be sure to state any assumptions that you believe are necessary, and clearly indicate
which principles you are using to reach your answer.

1 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

Question 1

Consider the two tank fluid system shown in Figure 1. The tanks hold 10000 L and 30000 L of water,
and are at temperatures T1 and T2 respectively. The first tank has a constant 6 L/min flow of water in,
at a temperature Tin . The second tank has a constant 6 L/min flow of water out. The water is circulated
between the tanks, with 12 L/min flowing from tank 1 to tank 2, and 6 L/min flowing from tank 2 to
tank 1. Note that the total volume of water in each tank does not change.

u 1 1 1
6 s +1 s 4 3s+1 6
y

12

Figure 1: A two tank fluid system

a) Write an energy balance equation for each tank, to describe the temperature of the water in
each of the tanks. Assume that the tanks are well insulated, i.e. that the only significant heat
exchange comes from the fluid flow, and that the fluid in the tank is well mixed, i.e. at a uniform
temperature. Hint: the energy flow rate into tank one is qin = 6ρC p Tin + 6ρC p T2 . Information
that you may (or may not) find useful: the density of water is ρ = 1 k g/L, and its thermal capacity
is C p = 4183 J/k g · C ◦ .
b) Draw a block diagram of the system, again with Tin as the input, and Tout as the output. Show
clearly where T1 and T2 are on the diagram.

1
G= +1
s
H = 12
1+s
G s 1+s s+1
= = =
1 + GH 1+s
1 + 12 s s + 12 + 12s 13s + 12
s+1
G=
13s2 + 12s
H =4
s+1
G 13s2 +12s s+1 s+1
= = =
1 + GH s+1
1 + 4 13s2 +12s 13s 2 + 12s + 4s + 4 13s 2 + 16s + 4

s+1 4 4s + 4
 ‹ ‹
=
13s2 + 16s + 4 3s + 1 39s3 + 61s2 + 28s + 4

2 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

u 1 1 1
6 s +1 s 4 3s+1 6
y

12

u s+1 1 1
6 13s+12 s 4 3s+1 6
y

u s+1 1
6 13s2 +12s 4 3s+1 6
y

u s+1 1
6 13s2 +16s+4 4 3s+1 6
y

u 4s+4
6 39s3 +61s2 +28s+4 6
y

3 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

u 4s+4
36 39s3 +61s2 +52s+28
y

u 144s+144
39s3 +61s2 +52s+28
y

4s + 4
G=
39s3 + 61s2 + 28s + 4
H =6
4s+4
G 39s3 +61s2 +28s+4 4s + 4 4s + 4
= = =
1 + GH 4s+4
1 + 6 39s3 +61s2 +28s+4 39s 3 + 61s 2 + 28s + 4 + 24s + 24 39s 3 + 61s 2 + 52s + 28

144s + 144
G(s) =
39s3 + 61s2 + 52s + 28
For third order system, stability requires (39)(28)<(61)(52) — yes, system is stable.

144iω + 144
G(iω) =
−39iω3 − 61ω2 + 52iω + 28
ω=3
432i + 144
G(3i) =
−39(27)i − 61(9) + 52(3)i + 28
144 + 432i
G(3i) =
−521 − 897i
G(3i) = −0.430 − 0.0891i
|G(3i)| = 0.439
∠G(3i) = −2.94
y = (0.439)(4) cos(3t − 2.94) = 1.76 cos(3t − 2.94)

4 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

Question 2

A classic problem in feedback control is the inverted pendulum, as seen in Figure 2. The pendulum is
pinned to a base that is free to slide on a smooth surface. The objective is to automatically apply forces
f to the base to impart the motion required to prevent the pendulum from falling over. Assume some
actuator, not shown, applies the force. The linearized equations of motion of the pendulum are:

f = (m1 + m2 )ẍ − m2 l θ̈

and
m2 g lθ = m2 l 2 θ̈ − m2 l ẍ

m2

f m1

Figure 2: An inverted pendulum

θ (s)
a) Find the transfer function f (s) .
b) Assume that the masses m1 = 0.5 k g and m2 = 0.25 k g, and the length of the pendulum is
l = 0.3 m. What do the roots tell you about the behaviour of the system?
c) If a closed loop PD control is applied to the system using the angle of the pendulum as feedback
(i.e., e = (θ r e f − θ )), find the minimum values of k P , k D required to stabilize the system and
prevent the pendulum from falling over.
d) Find the values of k P and k D required to give a natural frequency of ωn = 2π r ad/s (i.e., 1 Hz),
and a damping ratio of ζ = 0.707.
e) Why does a PD controller provide a better solution than the simple P controller in this problem?

From the equations of motion

f = (m1 + m2 )ẍ − m2 l θ̈
and
gθ = l θ̈ − ẍ
So
f = (m1 + m2 )(l θ̈ − gθ ) − m2 l θ̈ = m1 l θ̈ − (m1 + m2 )gθ
θ (s) 1
=
f (s) m1 ls2 − (m1 + m2 )g

5 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

With the values given


θ (s) 1
=
f (s) 0.15s − (0.75)9.81
2

0.15s2 − (0.75)9.8 = 0
Æ
s = ± 9.81(5) = ±7.00
Note that the system is unstable (as expected), τ = 1/7.00 = 0.143 sec.
With the controller added
θ (s) kD s + kP
=
θ r e f (s) m1 ls2 + k D s − (m1 + m2 )g + k P

For stability
−(m1 + m2 )g + k P > 0
k P > 0.75g > 7.36 N /r ad
kD > 0
When the controller is added v
t k − 0.75(9.81)
P
ωn = 2π =
0.15
4π2 (0.15) + 0.75(9.81) = k P = 13.3 N /r ad

kD kD kD k
ζ = 0.707 = p = p = p = D
2 (0.15)(k P − 0.75(9.81)) 2 (0.15)(13.3 − 0.75(9.81)) 2 (0.15)(5.94) 1.89

k D = 1.33 N · s/r ad
The inverted pendulum is an undamped second order system. In order to add some damping to the
system, we need derivative feedback. Otherwise, the proportional controller will only give an undamped
oscillatory system.

6 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

Question 3

Consider the mechanism shown in Figure 3. Two small carts of mass mA = mB = 2 k g, roll on a
horizontal surface. Motion of the carts is caused by a force applied to the first cart, as shown. In
addition, the motion of the two carts is coupled by damper with coefficient c = 1 N · s/m, and the first
body, (we’ll label it body A) is fastened to the ground by a spring of stiffness k = 1 N /m. Neglect the
mass of the wheels of the carts, and consider only horizontal motions.
A force is applied to body A, and the resulting displacement of body B is measured. One possible
state space representation of the resulting equations of motion is the A, B, C system matrices given
below (D=0), which relate the input force on body A to the output displacement of body B.

yB (t)

fA(t)

A,m = 2 B,m = 2

k=1 c=1

Figure 3: A two body system

 
−0.5 0.2236 −0.2739
A = −1.118 −0.1 −0.08165
0 −0.4899 −0.4
 
−0.5
B= 0 
0
 
C = 0 0 −0.9129
a) What do the resulting eigenvalues of the A matrix, given below, tell you about this system?

Number Real Imaginary


1 -0.1141 0.5576
2 -0.1141 -0.5576
3 -0.7718 0
y
b) Find the transfer function G(s) = f B of the open loop system. You may use any method you wish,
A
but the following identity may prove helpful. Hint: BC = (3x1)(1x3) = (3x3).
det[Is − A + BC] − det[Is − A] det[Is − (A − BC)] − det[Is − A]
G(s) = C[Is − A]−1 B = =
det[Is − A] det[Is − A]
c) In an attempt to make the location of body B follow the commanded location yin , the force on
body A is applied using a PID controller with gains k P = 3, k I = 4, and k D = 2, using the location
of body B as the feedback signal, i.e., the error e = yin − yB . Find the transfer function of the
y
closed loop system G(s) = yinB .

7 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

d) Find a state space representation of the closed loop system.

The system is stable, and oscillatory. There is one fast real root with time constant τ = 1.30 sec,
and one slow oscillatory mode with ωn = 0.569 rad/s=0.0906 Hz, ζ = 0.200, τ = 8.76 sec.
   
−0.5 0.2236 −0.2739 −0.5  
A − BC = −1.118 −0.1 −0.08165 −  0  0 0 −0.9129
0 −0.4899 −0.4 0
   
−0.5 0.2236 −0.2739 0 0 0.4564
A − BC = −1.118 −0.1 −0.08165 − 0 0 0 
0 −0.4899 −0.4 0 0 0
 
−0.5 0.2236 −0.7303
A − BC = −1.118 −0.1 −0.08165
0 −0.4899 −0.4
 
s + 0.5 −0.2236 0.7303
[Is − A + BC] =  1.118 s + 0.1 0.08165
0 0.4899 s + 0.4
 
s + 0.5 −0.2236 0.2739
Is − A =  1.118 s + 0.1 0.08165
0 0.4899 s + 0.4
det[Is − A + BC] − det[Is − A]
G(s) = C[Is − A]−1 B =
det[Is − A]
det[Is−A] = (s+0.5) ((s + 0.1)(s + 0.4) − (0.08165)(0.4899))−(1.118) ((−0.2236)(s + 0.4) − (0.2739)(0.4899))
det[Is − A] = (s + 0.5)(s2 + 0.5s) + (0.25s + 0.1 + 0.15)
det[Is − A] = (s + 0.5)(s2 + 0.5s) + (0.25s + 0.25)
det[Is − A] = (s3 + 0.5s2 + 0.5s2 + 0.25s) + (0.25s + 0.25)
det[Is − A] = s3 + s2 + 0.5s + 0.25
det[Is − A + BC] =
(s + 0.5) ((s + 0.1)(s + 0.4) − (0.08165)(0.4899)) − (1.118) ((−0.2236)(s + 0.4) − (0.7303)(0.4899))
det[Is − A + BC] = (s + 0.5)(s2 + 0.5s) + (0.25s + 0.1 + 0.4)
det[Is − A + BC] = s3 + s2 + 0.5s + 0.5
det[Is − A + BC] − det[Is − A] = 0.25

0.25
G(s) =
s3 + s2 + 0.5s + 0.25
So closed loop system becomes

0.25 k D s2 + k P s + k I
G=
s3 + s2 + 0.5s + 0.25 s
H =1

8 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

0.25(k D s2 +k P s+k I )
G s4 +s3 +0.5s2 +0.25s
=
1 + GH 0.25(k D s2 +k P s+k I )
1 + s4 +s3 +0.5s 2 +0.25s

G 0.25(k D s2 + k P s + k I )
= 4
1 + GH s + s3 + 0.5s2 + 0.25s + 0.25(k D s2 + k P s + k I )
G 0.25(k D s2 + k P s + k I )
= 4
1 + GH s + s3 + (0.5 + 0.25k D )s2 + 0.25(1 + k P )s + 0.25k I
G 0.5s2 + 0.75s + 1
= 4
1 + GH s + s3 + s2 + s + 1

0 1 0 0
 
0 0 1 0
A=
0 0 0 1

−1 −1 −1 −1

0
 
 0
B= 
0
1
 
C = 1 0.75 0.5 0

9 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

Question 4
Bonus Question
(1 mark)
When the root locus method was first proposed in 1948, it was introduced in paper that was published
over the objections of reviewers who thought the method would have no useful applications. By the
early 1950’s the method was widely used in the design of aircraft control systems. Who was the author
of this paper?

Useful Information
Laplace transforms

F(s) f(t)
1 δ(t)

1
s us (t)

1
s+a e−at

b
s2 +b2
sin bt
s
s2 +b2
cos bt

b
(s+a)2 +b2
e−at sin bt

s+a
(s+a)2 +b2
e−at cos bt

df
sF (s) − f (0) dt

df d2 f
s2 F (s) − s f (0) − dt d t2
t=0

For a transfer function of the form


c3 s3 + c2 s2 + c1 s + c0
G(s) =
s4 + d3 s3 + d2 s2 + d1 s + d0
A possible state space representation is

0 1 0 0
 
 0 0 1 0 
A=
0 0 0 1

−d0 −d1 −d2 −d3

0
 
 0 
B=
0

1

10 ©B.P. Minaker, 2012


Mechanical, Automotive, & Materials Engineering

 
C= c0 c1 c2 c3
The Fourier series for a square wave of amplitude ±a, with frequency ω r ad/s is

4a 1 1
 ‹
f (t) = sin(ωt) + sin(3ωt) + sin(5ωt) + ...
π 3 5

The magnitude of a complex number


p
c + di c2 + d 2
=p
a + bi a2 + b2

The angle of a complex number

c + di
 ‹  ‹  ‹
d b
∠ = t an−1 − t an−1
a + bi c a

The determinant of a matrix A, is computed by choosing any row or column, proceeding along this
row or column, multiplying each entry of the row or column by the determinant of the ‘minor’ (i.e, the
matrix, with the row and column of the current entry ommitted.) Additionally, the sign of every other
entry is reversed. This relies on the recognition that the determinant of a 2x2 matrix is the product of
the main diagonal, less the product of the off-diagonal. For example, using the first column
 
a11 a12 a13
A =  a21 a22 a23 
a31 a32 a33

det[A] = a11 (a22 a33 − a23 a32 ) − a21 (a12 a33 − a13 a32 ) + a31 (a12 a23 − a13 a22 )

11 ©B.P. Minaker, 2012

You might also like