You are on page 1of 9

Automatique II Lebanese University

Semester VII - Fall 2018/2019 Faculty of Engineering III


Midterm Exam Department of Electrical and Electronics
Monday November 12, 2018
Time Limit: 90 Minutes Instructor: Dr. Bilal Komati

This exam contains 9 pages (including this cover page and annexes) and 5 questions.
Total of points is 115.

Question Points Score


1 25
2 10
3 16
4 24
5 40
Total: 115

1. This problem consists of five multiple-choice questions. Write your correct answer on
the answer sheet with brief justification.
(a) (5 points) The correct answer is C. Transforming the transfer function, the follow-
ing can be obtained:
z 3 + 2z 2 + 2 1 + 2z −1 + 2z −3
H(z) = =
z 3 − 25z 2 + 0.6z 1 − 25z −1 + 0.6z −2
Then, the difference equation can be obtained as follows:
y(k) = 25y(k − 1) − 0.6y(k − 2) + e(k) + 2e(k − 1) + 2e(k − 3)
The input e(k) = δ(k) is the unit impulse signal and the output is y(k).
Computing the first elements of this sequence:
u(0) = e(0) = 1
u(1) = 25u(0) + 2e(0) = 25 + 2 = 27
u(3) = 25u(1) − 0.6u(0) = 674.4

The correct answer is then answer C.


(b) (5 points) The correct answer is B. Indeed, the poles of the closed loop system are:
p1 = 0.614 and p2 = −0.814.
Both poles are stable since their module is less than 1.
The correct answer is the B since the system is stable for all finite K.
Automatique II Midterm Exam - Page 2 of 9 Monday November 12, 2018

(c) (5 points) The correct answer is C. Indeed, testing the characteristic equation for:

K = 3 ≥ 2.63 ⇒ z 2 + 4.25z + 2.5 = 0 ⇐ p1 = −0.7; p2 = −3.5 ⇔ Unstable


0 < K = 1 ≤ 2.63 ⇒ z 2 + 0.25z + 2.5 = 0 ⇐ p1,2 = −0.125 ± 1.576j ⇔ Unstable
Consequently, we can eliminate choices A, B and D. The remaining choice is C.
(d) (5 points) The correct answer is A. Indeed, the transfer function of the system is:
 
K Gp (s) K A B C
Gp (s) = ⇒ = 2 =K 2 + +
s(0.2s + 1) s s (0.2s + 1) s 0.2s + 1 s
Gp (s) A(0.2s + 1) + Bs2 + Cs(0.2s + 1) (B + 0.2C)s2 + (0.2A + C)s + A
=K = K
s s2 (0.2s + 1) s2 (0.2s + 1)
After identifying term by term:

A = 1

Gp (s)

1 0.2 0.04

0.2A + C = 0 ⇔ C = −0.2A = −0.2 ⇔ =K 2 − +
 s s s 0.2s + 1
B + 0.2C = 0 ⇔ B = −0.2C = 0.04

It can be re-written as:


 
Gp (s) 1 0.2 0.2
=K 2 − +
s s s s+5
Now the discrete equivalent transfer function is given by:
 
−1 Gp (s)
G(z) = (1 − z )Z
s
  
−1 1 0.2 0.2
= (1 − z )Z K − +
s2 s s+5
−1
 
−1 Tz 0.2 0.2
= K(1 − z ) − +
(1 − z −1 )2 1 − z −1 1 − e−5T z −1
 −1
T z (1 − e−5T z −1 ) − 0.2(1 − z −1 )(1 − e−5T z −1 ) + 0.2(1 − z −1 )2 )

−1
= K(1 − z )
(1 − z −1 )2 (1 − e−5T z −1 )
T z −1 − T e−5T z −2 − 0.2 1 − (1 + e−5T )z −1 + e−5T z −2 + 0.2(1 − 2z −1 + z −2 )
 
=K
(1 − z −1 )(1 − e−5T z −1 )
−0.2 + 0.2 + z −1 T + 0.2(1 + e−5T ) − 0.4 + z −2 (−T e−5T − 0.2e−5T + 0.2)
 
=K
(1 − z −1 )(1 − e−5T z −1 )
After replacing T = 0.4 and e−5T = e−5×0.4 = e−2 = 0.1353 in the equation:
z −1 [0.4 + 0.2 + 0.2 × 0.1353 − 0.4] + z −2 (−0.4 × 0.1353 − 0.2 × 0.1353 + 0.2)
G(z) = K
(1 − z −1 )(1 − 0.1353z −1 )
0.2271z −1 + 0.1188z −2
=K
(1 − z −1 )(1 − 0.1353z −1 )
z + 0.5232
= 0.2271K
(z − 1)(z − 0.1353)
Automatique II Midterm Exam - Page 3 of 9 Monday November 12, 2018

Now the characteristic equation can be written as follows:

1 + G(z) = 0
z + 0.5232 (z − 1)(z − 0.1353) + 0.2271K(z + 0.5232)
1+G(z) = 1+0.2271K =
(z − 1)(z − 0.1353) (z − 1)(z − 0.1353)
Hence, the characteristic equation can be written as follows:

(z − 1)(z − 0.1353) + 0.2271K(z + 0.5232) = 0


⇔ z 2 − (1 + 0.1353)z + 0.1353 + 0.2271Kz + 0.1188K = 0
⇔ z 2 + (0.2271K − 1.1353)z + 0.1353 + 0.1188K = 0

Now testing the characteristic equation for the four given options:
• if K = 7.25, the system has two poles in closed loop zp = −0.2555 ± 0.9651j
with amplitude 0.9983 < 1, then the system is stable
• if K = 10.5, the system has two poles in closed loop zp = −0.6244 ± +0.9964j
with amplitude 1.1759 > 1, then the system is unstable
Consequently, the correct answer is A since the other options are all wrong and the
system is stable for K = 7.25.
(e) (5 points) The correct answer is D. Manual calculation of the convolution proves
this.
Intuitively, the first impulse from x[n] occurs at time n = 1, meaning the first
impulse response occurs at time n = 2 (due to the 1-sample delay in h[n]). This
discounts options (a) and (c), which both show response at time n = 1.
Referring to the convolution definition:

X
x[n] ∗ h[n] = x[n − k]h[k]
k=−∞

We see that when x[n] overlaps h[n] (e.g. for n = 3), x[n] ∗ h[n] = 2. This discounts
option (b), leaving option (d) as the correct answer.
2. The continuous-time signal x(t) = sin(2πt) is uniformly sampled with sampling time Ts ,
resulting in the discrete-time signal x[n].
(a) (7 points) Using the definition of the periodicity:

x[n] = x[n + N ]
sin(2πnTs ) = sin(2π(n + N )Ts ) = sin(2πnTs + 2πN Ts )

which implies that N Ts ∈ Z. Given that N ∈ N and Ts > 0, we can constrain this
further to N TS ∈ N . The fundamental period N0 is the smallest positive integer N
such that this condition holds.
(b) (3 points) We have that Ts = 1/5, thus N/5 ∈ N and it follows that N0 = 5, which
is the fundamental period of the discrete-time sequence. Consequently, N should
be a multiple of 5.
Automatique II Midterm Exam - Page 4 of 9 Monday November 12, 2018

3. Consider the closed-loop discrete-time system below, where K is a control gain to be


chosen.
(a) (8 points) The open loop transfer function is:
1 K
D(s)G(s) = K ⇒ Kp = D(1)G(1) = = 4K
z − 0.75 1 − 0.75
If K = 1:
Kp = D(1)G(1) = 4
The system is stable so the steady-state error exists.
The steady state error is given by:
1 1 1 1
ess = = = = = 20%
1 + Kp 1 + D(1)G(1) 1+4 5

(b) (8 points) To have a steady state error less than 5% to a step input, the following
relation should be satisfied:
1 1
ess = = ≤ 0.05 ⇔ 4K + 1 ≥ 20 ⇔ K ≥ 4.75
1 + Kp 1 + 4K
For this value of the gain the characteristic equation 1 + D(s)G(s) = can be used
to determine the poles of the system:
K
1 + D(s)G(s) = 0 ⇔ 1 + = 0 ⇔ zp − 0.75 + K = 0 ⇔ zp = 0.75 − K
zp − 0.75
For K ≥ 4.75, the pole of closed loop system is zp ≤ −4 and hence |zp | > 1 which
shows that the system is unstable.
4. Consider the equation
u(k) = 1.96u(k − 1) − 0.9608u(k − 2) + 0.009753e(k − 1) − 0.009851e(k − 2)
(a) (6 points) The transfer function is given by:
U (z) 0.009753z −1 − 0.009851z −2 0.009753z − 0.009851
H(z) = = =
E(z) 1 − 1.96z −1 + 0.9608z −2 z 2 − 1.96z + 0.9608

(b) (6 points) The poles of the transfer function are: z = 0.9801 ± 0.0098j. The zero
is z = 1.0101.
(c) (3 points) Yes since both poles have a module less than 1.
(d) (9 points) Using zero pole matching technique, we know that z map to esT . The
poles and the zero of the transfer function in continuous time and discrete time are
given as in the following table:
Type Continuous time Discrete time
Poles −2 ± j 0.9801 ± 0.0098j
Zero 1 1.0101
dc Gain -0.2 -0.2
Automatique II Midterm Exam - Page 5 of 9 Monday November 12, 2018

Using the poles and zero results, we can show that H(z) can be obtained using zero
pole matching technique with one time delay for a sampling period T = 0.01 s.
5. This problem considers a continuous-time system with a transfer function
a2
G(s) = 2
s − a2
This might model the linearized behavior of a magnetic suspension. Note that both
poles are real-axis, with one in the right-half plane.
(a) (2 points) This system has two poles at a and −a. Both poles are real but one of
the poles has positive real part. Thus, The system is unstable.
(b) (5 points) The transfer function in the continuous time domain is:
a2
G(s) =
s 2 − a2

G(s) a2
=
s s(s2 − a2 )
A B C
= + +
s s−a s+a
As − Aa2 + Bs2 + Bas + Cs2 − Cas
2
=
s(s − a)(s + a)
(A + B + C)s2 + (Ba − Ca)s − Aa2
=
s(s − a)(s + a)
By equivalence:  

 A + B + C = 0  A = −1

B−C =0 ⇔ B = 1/2
 − Aa2 = a2
 
 C = 1/2

G(s) −1 1/2 1/2


= + +
s s s−a s+a
Finding the Z-transform using the table:
−1
   
G(s) 1/2 1/2
Z =Z + +
s s s−a s+a
−1
 
1/2 1/2
= + +
1 − z −1 1 − eaT z −1 1 − e−aT z −1
1 1
−z
 
2
z 2
z
= + +
z − 1 z − eaT z − e−aT
−(z − eaT )(z − e−aT ) + 12 (z − 1)(z − e−aT ) + 21 (z − 1)(z − eaT )
=z
(z − 1)(z − eaT )(z − e−aT )
Automatique II Midterm Exam - Page 6 of 9 Monday November 12, 2018

− z 2 − (eaT + e−aT )z + 1 + 12 z 2 − (1 + e−aT )z + e−aT + 21 z 2 − (1 + eaT )z + eaT


     
=z
(z − 1)(z − eaT )(z − e−aT )
−1 + 21 + 21 z 2 + eaT + e−aT − 21 (1 + e−aT ) − 12 (1 + eaT ) z − 1 + 21 e−aT + 21 eaT
  
=z
(z − 1)(z − eaT )(z − e−aT )

1
eaT + e−aT − 2 z + 21 eaT + e−aT − 2
   
G(s) 2
Z =z
s (z − 1)(z − eaT )(z − e−aT )
1 −aT
aT

e + e − 2 z (z + 1)
= 2
(z − 1)(z − e )(z − e−aT )
aT

Then,
z−1
 
G(s)
Geq (z) = Z
z s
z − 1 2 e + e−aT − 2 z (z + 1)
1 aT

=
z (z − 1)(z − eaT )(z − e−aT )
1
eaT + e−aT − 2 (z + 1)

2
=
(z − eaT )(z − e−aT )

(c) (2 points) For a = 40 and T = 0.001 sec, the term:


1 aT
e + e−aT − 2 = 8 × 10−4

2
Then,
8 × 10−4 (z + 1)
Geq (z) =
(z − 0.9608)(z − 1.0408)
8 × 10−4 (z + 1)
= 2
(z − 2.0016z + 1)
The answer matches as expected.
(d) (3 points) The poles map closely to z = esT due to the fact that the sampling
frequency is significantly higher than the frequency of the poles.

es1 T = 1.0408 = p1z

es2 T = 0.9608 = p2z


The pole-zero map is shown in the figure below:
(e) (3 points) The block diagram is given by the figure below where:
• r(t) and r(k) are the reference signal in the continuous and discrete time domain
respectively;
Automatique II Midterm Exam - Page 7 of 9 Monday November 12, 2018

1 zero
poles
0.8 unit circle
0.6

0.4

Imaginary Part
0.2

-0.2

-0.4

-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real Part

p(t)
r(t) r(k) e(k) u(k) u(t) + y(t)
ADC + C(z) DAC + G(s)

ADC
y(k) y(t)

• e(k) is the error signal in the discrete time domain


• u(t) and u(k) are the system (control) input signal in the continuous and dis-
crete time domains respectively;
• y(t) and y(k) are the output signal in the continuous and discrete time domains
respectively;
• p(t) is the disturbance signal;
• The DAC is a Digital-to-Analog Converter;
• The ADCs represent Analog-To-Digital Converters.
(f) (2 points) Using the figure, the root locus show that the poles of the system are
outside the unit circle which prove that system is unstable for all K.
(g) (6 points) The specifications can be translated as follows:
• overshoot less than 5% ⇒ ζ = 0.6(1 − Mp ) = 0.57
• rise time less than 3 milliseconds ⇒ ωn ≥ 1.8
tr
= 600 ⇒ ωn ≥ 600
• settling time less than 10 milliseconds ⇒ σ ≥ 4.6
ts
= 460 ⇒ σ ≥ 460
• steady-state-error less than 7% for a unit step input (will be calculated later)
(h) (2 points) Since α = 0.9608 is a pole of the discrete time transfer function Geq (z),
a first approach in the lead compensator would be to cancel this pole in closed loop.
Thus, it is a reasonable choice.
(i) (3 points) The choice of K will be critical since it influences the stability, the closed
loop behavior and the steady state error. From the steady state error, we can
Automatique II Midterm Exam - Page 8 of 9 Monday November 12, 2018

find the condition on K to reach the specifications in terms of steady state error.
Knowing that the steady state error is given as follows:
1
ess = < 0.07
1 + Kp

and that,

z − α 8 × 10−4 (z + 1)
Kp = lim D(z)G(z) = lim K = −0.0392K
z→1 z→1 z (z 2 − 2.0016z + 1)

Then,
1 1
= < 0.07 ⇔ K > 338.92
1 + Kp 1 − 0.0392K
(j) (5 points) The specifications need to be translated into the z-plane specifications:
• Compute the radius: r = e−σT = e−460×0.001 = 0.6313
• ζ = 0.57

• ωn = 10T ≥ 600 ⇔ N ≥ 1.91
• Mark these specifications on the z-plane plot as in the following figure

0.8

0.6
0.6
0.4 0.57
Imaginary Part

0.2

-0.2

-0.4
0.6
-0.6

-0.8

-1
-1 -0.5 0 0.5 1
Real Part

The root locus should be inside these specifications. We can see that there is a part
of the system inside the z-plane specifications region. However, we should verify
if the gain condition is satisfied. Looking at the poles of the system when is just
inside the ζ = 0.57 spiral, the poles are given by p1,2 = 0.377 ± j0.38. Computing
the value of K using the characteristic equation 1 + KD(z)G(z) = 0 we can find
that K = 359 which is larger than 338.92.
Consequently, the controller D(z) is able to answer the system requirements.
(k) (2 points) We can observe from the root locus, the choice of K was so close to the
limit found for the steady state error. To improve the system response and have
more stable controller, we can add more lead to the compensation. More lead is
Automatique II Midterm Exam - Page 9 of 9 Monday November 12, 2018

Root Locus
1

0.8

0.6
0.6
0.4 0.57

0.2

Imaginary Axis
0

-0.2

-0.4
0.6
-0.6

-0.8

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Real Axis

obtained by increasing the separation between the compensation’s pole and zero.
Therefore, let’s keep the zero where it is and move the compensation pole to the left.
Moving the compensation pole to the left leads to the second choice of β = −0.4.
(l) (3 points) This controller can also answer the specifications. We have more liberty
in the choice of the gain.
(m) (2 points) Since both controllers satisfy the specifications and since the specifica-
tions are just verified, this response can be the one for any of the two controllers.

You might also like