Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Mechanical, Automotive, & Materials Engineering

401 Sunset Avenue


Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

MECH-3221 Control Theory


Fall 2022
Final Exam

Exam Instructions

• 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.
• 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.
• Do not waste the examiner’s time by asking questions regarding the correctness of your solution. Only
a limited number of inquiries regarding the exam material will be entertained. If you have uncertainties
about the exam, make sure you have read the entire question, state your assumptions, and proceed.
• Answer all questions, to the best of your ability.

University of Windsor Engineering Code of Ethics


As a member of the University of Windsor Engineering community:

• I promise to behave in a manner that demonstrates my commitment to academic integrity and my


devotion “to high ideals of personal honour and professional integrity” as required by the Code of
Ethics of the Association of Professional Engineers of Ontario.
• I promise to treat my fellow students, the staff and faculty members with fairness and loyalty, respect-
ing the equity, diversity, and inclusivity in my campus community.
• I promise to treat University property and equipment with care and respect.
• I promise to resist and report any behavior that may be in conflict with this oath.

To demonstrate my belief in the University of Windsor’s core values, I pledge to work towards:

• the highest intellectual and ethical standards and life-long learning,


• the highest standards of human rights and freedoms,
• civility and respect for all members of the campus community, and
• making a positive impact on campus.

1
Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

Question 1
Consider a family of three ducklings, walking along a path in a line behind the mother duck, similar to those
pictured in Figure 1.1. Denote the location of the mother duck (i.e., the distance she has travelled along the path)
as 𝑥0 , the location of the first duckling as 𝑥1 , the second duckling as 𝑥2 , and the last duckling as 𝑥3 . Suppose that
the speed of the first duckling is proportional to its distance behind the mother duck, i.e.:

𝑥̇ 1 = 𝑘(𝑥0 − 𝑥1 )

Similarly, the speed of the last duckling is proportional to its distance behind the middle duckling. The middle
duckling has more complex behavior - its speed is proportional to its distance behind the average location of the
duckling ahead and the duckling behind.

a) Form the state space equation that describes the location of all the ducks. Assume that the propor-
tionality constant 𝑘 = 2 m/s/m in all three equations. Use the location of the mother duck (𝑥0 ) as the
input, and give three outputs: 𝑦1 is the distance between the mother duck and the first duckling, 𝑦2
is the distance between the first and second ducklings, and 𝑦3 is the distance between the second and
third ducklings. Hint: 𝐃 ≠ 0.
b) Will all the ducklings stay in a group as the mother duck starts walking, or will the group eventually
break up? Show how you know. Hint: is the system stable?
c) Will any of the ducklings swap positions in the line? Show how you know.

Figure 1.1: Make Way for Ducklings is a sculpture by Nancy Schön, which recreates
the duck family in Robert McCloskey’s children’s classic Make Way for Ducklings. The
original set of bronze statues was installed in Boston Public Garden in 1987, and a copy
was installed in Moscow at Novodevichy Park in 1991. Reproduced from Wikipedia.

2 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

Solution
a) Form the equations
𝑥̇ 1 = 𝑘(𝑥0 − 𝑥1 )
𝑥̇ 3 = 𝑘(𝑥2 − 𝑥3 )
𝑥̇ 2 = 𝑘(0.5(𝑥1 + 𝑥3 ) − 𝑥2 )

⎪ 𝑥̇ ⎫ ⎡−2 0 0 ⎤⎧ 𝑥 ⎫ ⎡2⎤ { }
⎪ 1⎪ ⎪ ⎢ ⎪
⎪ 1⎪ ⎪
⎨ 𝑥̇ 2 ⎬ = 1 −2 1 ⎨𝑥2 ⎬ + ⎢0⎥ 𝑥0


⎪ ⎪ ⎢ ⎥⎪ ⎪ ⎢ ⎥
⎩𝑥̇ 3 ⎪⎭ ⎣0 2 −2⎦ ⎪ ⎩𝑥3 ⎪⎭ ⎣0⎦

𝑦1 = 𝑥0 − 𝑥1
𝑦2 = 𝑥1 − 𝑥2
𝑦3 = 𝑥2 − 𝑥3


⎪ 𝑦 ⎫ ⎡−1 0 0 ⎤⎧ 𝑥 ⎫ ⎡1⎤ { }
⎪ 1⎪ ⎪ ⎢ ⎪
⎪ 1⎪⎪
⎨ 𝑦2 ⎬ = 1 −1 0 ⎨𝑥2 ⎬ + ⎢0⎥ 𝑥0


⎪ ⎪ ⎢ ⎥⎪ ⎪ ⎢ ⎥
⎩𝑦3 ⎪⎭ ⎣0 1 −1⎦ ⎪
⎩𝑥3 ⎪
⎭ ⎣0⎦
b) Find the eigenvalues using det[𝐈𝑠 − 𝐀] = 0

⎡ 𝑠 0 0⎤ ⎡−2 0 0 ⎤ ⎡𝑠 + 2 0 0 ⎤
𝐈𝑠 − 𝐀 = ⎢0 𝑠 0⎥ − ⎢ 1 −2 1 ⎥ = ⎢ −1 𝑠 + 2 −1 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣0 0 𝑠 ⎦ ⎣ 0 2 −2⎦ ⎣ 0 −2 𝑠 + 2⎦
Use the first column to find the determinant to take advantage of the zero.
(𝑠 + 2)((𝑠 + 2)(𝑠 + 2) − (−1)(−2)) = (𝑠 + 2)(𝑠 2 + 4𝑠 + 2) = 𝑠 3 + 4𝑠 2 + 2𝑠 + 2𝑠 2 + 8𝑠 + 4 = 𝑠 3 + 6𝑠 2 + 10𝑠 + 4 = 0

Using the Routh-Hurwitz criterion, all the coefficients are positive, and
(6)(10) > (1)(4)
So, all the criteria are met, i.e., the system is stable, and none of the ducklings will drift off to infinity.
c) Find roots
(𝑠 + 2)(𝑠 2 + 4𝑠 + 2) = 0
𝑠 = −2
or √
−4 ± 16 − 8 √
𝑠= = −2 ± 2 = −3.414, −0.586
2
All the roots are negative, confirming the stability, and all are real, so there will be no oscillation in
the response, i.e., none of the ducklings will change position.

3 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

Question 2
A double integrator is fitted with a PD feedback controller, as shown in Figure 2.1. This particular controller is
tuned such that 𝑘P = 𝑘D = 𝑘.

a) Find the closed loop transfer function of this system.


b) Consider the root locus diagram of this system, shown in Figure 2.2. Suppose that you would like to
select the roots at 𝑠 = −1 ± 1i. What is the required value of 𝑘? What is an important feature of this
choice?
c) Suppose that you would like to select the roots at 𝑠 = −2. What is the required value of 𝑘? What is an
important feature of this choice?
d) Suppose that 𝑘 = 0.5. Find the natural frequency, damping ratio, damped natural frequency, and time
constant of the system.
√ √
e) Suppose that 𝑘 = 0.5 and that 𝑢 = 3 sin ( 22 𝑡 ). Find an expression for 𝑦(𝑡) that holds after some time
has passed. Approximately how much time must pass before your answer is correct? Show how you
know.

𝑢 𝑘P + 𝑘D 𝑠 1/𝑠 2 𝑦
-

Figure 2.1: A block diagram of a double integrator with a PD controller.

1
imag(s)

−1
−6 −5 −4 −3 −2 −1 0
real(s)

Figure 2.2: Root locus plot of the system shown in Figure 2.1, with 𝑘D = 𝑘P . The roots
begin at the origin, trace out a circle of unit radius centered at 𝑠 = −1, touch at 𝑠 = −2,
and end at either 𝑠 = −∞ or 𝑠 = −1.

4 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

Solution
a) Closed loop transfer function

𝐺
𝑇 (𝑠) =
1 + 𝐺𝐻
𝑘P + 𝑘D 𝑠
𝐺=
𝑠2
𝐻 =1
P 𝑘 +𝑘 𝑠
D
𝐺 𝑠2 𝑘P + 𝑘D 𝑠 𝑘(𝑠 + 1)
𝑇 (𝑠) = = 𝑘P +𝑘D 𝑠
= 2
= 2
1 + 𝐺𝐻 1 + 𝑠2 𝑘P + 𝑘D 𝑠 + 𝑠 𝑠 + 𝑘𝑠 + 𝑘

b) Roots at 𝑠 = −1 ± 1i

−𝑘 ± 𝑘 2 − 4𝑘
𝑠= = −1 ± 1i
2
Setting 𝑘 = 2 gives √
−2 ± 4 − 8
𝑠= = −1 ± 1i
2

This corresponds to 𝛽 = 45◦ , and therefore 𝜁 = 0.5 = 0.707 (recall cos 𝛽 = 𝜁 ). This is the threshold
to eliminate resonance, and is a good balance between speed of response and overshoot. It is also the
value that gives the maximum damped natural frequency in this case (the root locus shows that it is
the largest possible imaginary part).
c) Roots at 𝑠 = −2 √
−𝑘 ± 𝑘 2 − 4𝑘
𝑠= = −2
2
Setting 𝑘 = 4 gives √
−4 ± 42 − 16
𝑠= = −2 ± 0 = −2
2
This corresponds to 𝜁 = 1, critical damping, repeated roots. This is the threshold to eliminate overshoot
in the transient response. It is the transition from an oscillatory solution to exponential solution.
d) 𝑘 = 0.5
√ √
−0.5 ± 0.52 − 4(0.5) 7
𝑠= = −0.25 ± i
2 4
−1
𝜏= =4
−0.25

𝑘 √
𝜔n = = 0.5 = 0.707
𝑚

5 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame


7
𝜔d = = 0.661
4
𝜁 = 0.25/0.707 = 0.354
e) Find 𝑦(𝑡) from the frequency response.

𝑘(𝑠 + 1) 0.5(𝑠 + 1)
𝑇 (𝑠) = =
𝑠 2 + 𝑘𝑠 + 𝑘 𝑠 2 + 0.5𝑠 + 0.5
0.5(𝑠 + 1) 0.5(0.707i + 1)
𝑇 (i𝜔) = =
𝑠2 + 0.5𝑠 + 0.5 (0.707i)2 + 0.5(0.707i) + 0.5
0.5 + (0.5)0.707i
=
(0.5)0.707i

0.52 + 0.53 √
|𝑇 (i𝜔)| = = 3
02 + 0.53
Note that we have a second order system that is lightly damped, and excited close to its natural fre-
quency, which is close to its resonance frequency, so we should not be surprised by a result greater
than one.
(0.5)0.707 (0.5)0.707
∠𝑇 (i𝜔) = tan−1 − tan−1 = 0.615 − 1.571 = −0.955
( 0.5 ) ( 0 )

Here we need to take the tan inverse of infinity, but we known that tan goes to infinity at 90 degrees,
so the inverse is just 𝜋/2. √
2
𝑦(𝑡) = 3 sin 𝑡 − 0.955
( 2 )
Note the root of three squared. This expression relies on the dissipation of the transient terms, which
takes about 3–4 𝜏, or 12–16 seconds.

6 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

Question 3
Recently, one of the most widely publicized applications of feedback control was the introduction of the Segway
personal transportation system, as shown in Figure 3.1a. The Segway is a single axle vehicle that is automatically
stabilized by application of torque through the drive axle. Without the control system in place, the vehicle would
just tip over. A simple model of a Segway style vehicle is shown in Figure 3.1b. The vehicle is modeled as two
bodies, one rolling, and the other as a slender bar. The wheels and axle have mass 𝑚1 and radius 𝑟. The upper body
(which includes the rider) has mass 𝑚2 and length 𝑙. The location of the lower body is given by 𝑥, and the angle of
the upper body is given by 𝜃, where 𝜃 = 0 indicates that the upper body is vertical. The motor generates a moment
𝑀 on the wheels, that is reacted against the upper body. The linearized equations of motion are

3 𝑙
𝑀= 𝑚 + 𝑚2 𝑟 𝑥̈ − 𝑚2 𝑟 𝜃̈ (1)
(2 1 ) 2

and
𝑙 1 𝑙
𝑀 + 𝑚2 𝑔 𝜃 = 𝑚2 𝑙2 𝜃̈ − 𝑚2 𝑥̈ (2)
2 3 2
a) Complete the block diagram of the Segway model shown in Figure 3.2 by finding the values of 𝑎, 𝑏,
𝑐, and 𝑑. Hint: you might find it helpful to substitute the parameter values given in Table 1 into the
equations first.
𝜃(𝑠)
b) Simplify the block diagram to find the transfer function of the system 𝐺(𝑠) = 𝑀(𝑠) . See Figure 3.3 for
a hint on how to begin.
c) What are the poles of the system? Is it unstable as you would expect?
d) Suppose that the moment applied by the motor is determined using a PID type controller where the
error signal is based on the angle of the upper body relative to a commanded angle, i.e., 𝑒 = 𝜃in − 𝜃, as
shown in Figure 3.4. Find the transfer function of the closed loop system 𝜃𝜃in .
e) If the gain 𝑘I = 16𝑘D , find any limits on the values of 𝑘P , 𝑘D , and 𝑘I such that the controller will stabilize
the system.

Table 1: Model parameter values

Parameter Value
mass lower body 𝑚1 20 kg
mass upper body 𝑚2 70 kg
wheel radius 𝑟 0.2 m
length of upper body 𝑙 1.8 m
gravity 𝑔 9.8 m/s

7 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

𝑚2
𝑙

𝑟 𝑚1

𝑥
(a) Segway photo (b) Simple Segway model

Figure 3.1: Segway personal transporter

𝑀 + 𝜃
+ - 𝑎 𝑑 1/𝑠 2

Figure 3.2: A block diagram of the Segway model.

𝑒
𝑀 + 𝜃
+ - 𝑎 𝑑 1/𝑠 2

Figure 3.3: A block diagram with three summation blocks in a row.

𝜃in 𝑘P + 𝑘D 𝑠 + 𝑘I /𝑠 𝐺(𝑠) 𝜃
-

Figure 3.4: A block diagram of the Segway model with a PID controller fitted.

8 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

Solution
a) Substitute values
3 𝑙
𝑀= 𝑚1 + 𝑚2 𝑟 𝑥̈ − 𝑚2 𝑟 𝜃̈
(2 ) 2
𝑀 = 20𝑥̈ − 12.6𝜃̈
𝑙 1 𝑙
𝑀 + 𝑚2 𝑔 𝜃 = 𝑚2 𝑙2 𝜃̈ − 𝑚2 𝑥̈
2 3 2
̈
𝑀 + 617.4𝜃 = 75.6𝜃 − 63𝑥̈
By inspection of the diagram, we see that the 𝑐 term is a gain on 𝜃 and therefore the 𝑏 term is a gain on
̈ The first is added to 𝑀, and the second is subtracted. Comparing with the second equation shows
𝜃.
that 𝑏 = 75.6, 𝑐 = 617.4. The first equation adds something to 𝑥̈ to find 𝜃,so
̈ 𝑎 = 20/63, 𝑑 = −1/12.6.
b) See block diagram below for simplification. Moving the sum in front of 𝑎 means we need to cancel it,
i.e., 𝑒 = 1/𝑎, but now we have three sums in a row, and can rearrange the sequence as we like. Then
we can simplify each loop.
(𝑎+1)𝑑
(𝑎 + 1)𝑑 0.116
𝐺(𝑠) = = 1+𝑏𝑎𝑑𝑐𝑎𝑑 = 2
(1 + 𝑏𝑎𝑑)𝑠 2 − 𝑐𝑎𝑑 𝑠 2 − 1+𝑏𝑎𝑑 𝑠 − 17.2

c)
𝑠 2 − 17.2 = 0
𝑠 = ±4.14
The positive pole indicates that the system is unstable.
d) Closed loop transfer function with the PID controller in place is:

P D 𝑘 𝑠+𝑘 𝑠 2 +𝑘
I 0.116
𝐺 𝑠 𝑠 2 −17.2 0.116(𝑘P 𝑠 + 𝑘D 𝑠 2 + 𝑘I )
𝑇 (𝑠) = = 2 =
1 + 𝐺𝐻 1 + 𝑘P 𝑠+𝑘𝑠D 𝑠 +𝑘I 𝑠20.116 𝑠(𝑠 2 − 17.2) + 0.116(𝑘P 𝑠 + 𝑘D 𝑠 2 + 𝑘I )
−17.2

0.116(𝑘P 𝑠 + 𝑘D 𝑠 2 + 𝑘I )
=
𝑠 3 − 17.2𝑠 + 0.116𝑘D 𝑠 2 + 0.116𝑘P 𝑠 + 0.116𝑘I
0.116(𝑘P 𝑠 + 𝑘D 𝑠 2 + 𝑘I )
=
𝑠 3 + 0.116𝑘D 𝑠 2 + (0.116𝑘P − 17.2)𝑠 + 0.116𝑘I
e) Check for stability using Routh-Hurwtiz
𝑘I > 0
𝑘D > 0
0.116𝑘P − 17.2 > 0
𝑘P > 148.8

9 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

(0.116𝑘D )(0.116𝑘P − 17.2) > 0.116𝑘I


0.01336𝑘D 𝑘P − 1.987𝑘D > 0.116𝑘I
0.01336𝑘P − 1.987 > 0.116𝑘I /𝑘D
0.01336𝑘P > 0.116𝑘I /𝑘D + 1.987
𝑘P > 8.653𝑘I /𝑘D + 148.8
𝑘P > 8.653(16) + 148.8 = 287.2

10 ©BP Minaker PhD PEng, 2022


Mechanical, Automotive, & Materials Engineering
401 Sunset Avenue
Windsor, Ontario, Canada N9B 3P4
519 253 3000 (2616)
www.uwindsor.ca/mame

1/𝑎
𝑀 + 𝜃
+ - 𝑎 𝑑 1/𝑠 2

1/𝑎
𝑀 + 𝜃
+ - 𝑎 𝑑 1/𝑠 2

𝑀 1 + 1/𝑎 𝑎𝑑 1/𝑠 2 𝜃
+ -

𝑀 𝑎+1 𝑎𝑑 𝜃
𝑎 + (1+𝑏𝑎𝑑)𝑠 2

𝑀 𝑎+1 𝑎𝑑 𝜃
𝑎 (1+𝑏𝑎𝑑)𝑠 2 −𝑐𝑎𝑑

𝑀 (𝑎+1)𝑑 𝜃
(1+𝑏𝑎𝑑)𝑠 2 −𝑐𝑎𝑑

Figure 3.5: A block diagram.

11 ©BP Minaker PhD PEng, 2022

You might also like