∑ Sample Midterm Test 1 ( π π

Sample Midterm Test 1 (mt1s02)
Sample Midterm Test 1 (mt1s02)
Covering Chapters 10-13 of Fundamentals of Signals & Systems
Problem 1 (25 marks)
(a) [10 marks] Compute the Fourier transform X ( e
jω
) of the signal x[n] shown below and
sketch its energy density spectrum over the interval [ −π , π ] .
x[n]
2
1
...
...
1 2 3 4
-5 -4 -3 -2 -1
5
n
-1
Answer:
X ( e jω ) =
∞
∑ x[n]e
− jω n
= 2 − e j 2ω + e − j 2ω = 2 − 2 j sin(2ω )
n =−∞
2
1
2
X ( e jω ) = 2[1 − j sin(2ω )] = 4[1 + sin 2 (2ω )] = 4[1 + (1 − cos(4ω ))] = 6 − 2 cos(4ω )
2
2
X ( e jω ) = 6 − 2 cos(4ω )
8
..
.
...
4
π
−π
1
ω
Sample Midterm Test 1 (mt1s02)
(b) [8 marks] Compute the energy of the signal in the frequency interval [ −π
2
,π ] .
2
2
X ( e jω ) = 4 + 2(1 − cos(4ω )) = 6 − 2 cos(4ω )
E[ −π
2
,π ]
2
1
=
2π
= 3+
π
2
∫
−π
1
π
π
1
X (e ) dω =
2π
2
π
2
∫
−π
2
∫ [6 − 2 cos(4ω )] d ω
2
jω
−π
2
cos(4ω )d ω = 3
2
(c) [7 marks] Find the DTFT W (e
jω
) of the periodic signal w[n ] = x[n ] ∗
+∞
∑ δ [n − k 6] .
k =−∞
Answer:
First consider the DTFT of the signal in (a): X ( e
W ( e jω ) = X ( e jω )
2π
6
∞
∑ δ (ω − k
k =−∞
= [2 − 2 j sin(2ω )]
=
2π
3
∞
π
) = 2 − 2 j sin(2ω )
2π
)
6
π
∞
∑ δ (ω − k 3 )
3 k =−∞
∑ [1 − j sin(
k =−∞
jω
π
2π
k )]δ (ω − k )
3
3
Problem 2 (30 marks)
Consider the causal LTI state-space system initially at rest:
x (t ) = Ax(t ) + Bu (t ),
y (t ) = Cx(t ) + Du (t )
 −1 0 
1
, B =   , C = [0 1], D = 0

 1 −2 
0
where x(t ) ∈ \ , u (t ) ∈ \, y (t ) ∈ \ , A = 
2
(a) [8 marks] Find the state transition matrix Φ (t , t0 ) = e
Answer:
We have to diagonalize the A-matrix first
The eigenvalues of the A matrix are:
det(λ I − A) = 0
λ1 = −1, λ2 = −2
Next, we compute the eigenvectors of A:
Eigenvector v1 corresponding to λ1 = −1 :
2
A( t − t0 )
.
Sample Midterm Test 1 (mt1s02)
0   v11   0 0  v11   0
λ + 1
 −1 λ + 2   v  =  −1 1  v  =  0

  12  
  12   
⇒ v11 = 1, v12 = 1
Eigenvector v2 corresponding to λ2 = −2 :
0   v21   −1 0  v21   0
λ + 1
 −1 λ + 2   v  =  −1 0  v  =  0

  22  
  22   
⇒ v21 = 0, v22 = 1
Diagonalizing matrix T = [v1
1 0
v2 ] = 

1 1
Φ (t , t0 ) = e A( t −t0 ) = Tdiag{e − ( t −t0 ) , e −2( t −t0 ) }T −1
1 0  e − ( t −t0 )
=

1 1  0

e − ( t −t0 )
=  − ( t −t )
0
− e −2( t −t0 )
e
  1 0 1 0  e − ( t −t0 )

=

e −2( t −t0 )   −1 1  1 1  − e −2( t −t0 )
0
0
e
−2( t − t0 )





e

At
−1
Laplace transform approach also acceptable: e ↔ ( sI − A)
0
−2( t − t0 )
(b) [10 marks] Compute the impulse response h (t ) of the state-space system. Then, compute
−t
its zero-state response y zs (t ) for the input u (t ) = e q(t − 1) , where q(t ) is the unit step.
Answer:
Impulse response:
 e−t
h(t ) = Ce Bq(t ) = [0 1]  − t
−2 t
e − e
where q (t ) is the unit step.
0  1 
= ( e − t − e −2 t ) q(t )
−2 t   
e  0
At
Laplace-domain solution for zero-state response
Y ( s) = H ( s)U ( s)
1
1
1
−1 − s
we have U ( s ) = e e
, thus
, Re{s} > −1 H ( s ) =
−
s +1
s +1 N
s+2
N
Re{ s }>−1
e −1 e − s
e −1 e − s
Y ( s) =
−
( s + 1) 2 ( s + 2)( s + 1)


1
1 
e −1 e − s
−1 − s 
=
−e e 
−
2
1
s
s + 2 
+
(
1)
s
+
N
 N
 Re{s}>−1 Re{s}>−2 
Re{ s }>−1
3
Re{ s }>−2
Sample Midterm Test 1 (mt1s02)
and the inverse Laplace transform is
y (t ) = e −1 (t − 1)e − ( t −1) − e − ( t −1) + e −2( t −1)  q(t − 1)
= (t − 1)e − t − e − t + e −2 t +1  q(t − 1)
(c) [12 marks] Find the transfer function P ( s ) of the above state-space system which is the
plant in the feedback control system shown below. Suppose that a controller K ( s ) =
s +1
is
s
used. Sketch the Nyquist plot of the loop gain and show approximately where it crosses the
unit circle and the real axis. Assess the stability of the unity feedback control system and
justify your conclusion. Compute the phase margin of the closed-loop system.
+
-
K (s)
P(s)
Answer:
P( s ) =
1
1
1
1
−
= 2
=
, Re{s} > −1
s +1 N
s+2
s + 3s + 2 ( s + 1)( s + 2)
N
Re{ s }>−1
Re{ s }>−2
Loop gain: L( s ) =
1
, Re{s} > 0
s( s + 2)
Nyquist plot:
Nyquist Diagrams
From: U(1)
2
1.5
ω → −∞
0.5
To: Y(1)
Imaginary Axis
1
0
ω → +∞
-0.5
-1
unit circle
-1.5
-2
-0.3
-0.25
-0.2
-0.15
Real Axis
4
-0.1
-0.05
0
Sample Midterm Test 1 (mt1s02)
If the Nyquist contour is indented to include the pole at 0, then we have one pole encircled by the
contour. Therefore, the Nyquist plot should encircle the critical point -1 once counterclockwise, and this
would occur at infinity. The reasoning is as follows: as the Nyquist contour is traversed from
ω = 0− → ω = 0+ , the pole at 0 contributes a net positive phase change of π
which makes the
Nyquist plot wrap around at infinity in the LHP. Therefore, the closed-loop system is stable.
The Nyquist plot does not cross the real axis, except at 0 for infinite frequencies (and at −∞ at DC.)
The Nyquist plot crosses the unit circle approximately at −0.24 − j 0.97 = e
− j1.8
is computed as the difference between −1.8rd = −103 and –180 degrees:
D
, so the phase margin
φm = 77D . [Note that
this result is probably easier to obtain from the Bode plot, which is also an acceptable approach]
Bode Diagrams
From: U(1)
40
30
20
10
0
-10
-20
Phase (deg); Magnitude (dB)
-30
-40
-50
-60
-80
-90
-100
-110
To: Y(1)
-120
-130
-140
-150
-160
-170
-180
-2
10
10
-1
10
0
10
Frequency (rad/sec)
Problem 3 (25 marks)
Consider the LTI unity feedback regulator
d o (t )
0
+ e (t )
-
kK ( s )
u (t )
P(s)
5
+
+
y (t )
1
Sample Midterm Test 1 (mt1s02)
Where P ( s ) =
s −1
s+4
, K ( s) =
and k ∈ [ 0, +∞ ) .
s +1
s + 5s + 6
2
(a) [8 marks] Compute the sensitivity function S ( s ) and the closed-loop characteristic polynomial
p( s ) with k = 1 . Give the steady-state error in the output for a step disturbance d o (t ) = u(t ) .
Answer:
The closed-loop characteristic polynomial is:
p ( s ) = ( s + 1)( s 2 + 5s + 6) + k ( s − 1)( s + 4)
= s 3 + ( k + 6) s 2 + (3k + 11) s + 6 − 4k
.
For k = 1 : p ( s ) = s + 7 s + 14 s + 2 .
3
2
Sensitivity:
S ( s) =
1
=
1 + K ( s ) P( s )
1
 s + 4  s −1 
1+ 
 2

 s + 1   s + 5s + 6 
s 3 + 6s 2 + 11s + 6
= 3
s + 7 s 2 + 14 s + 2
Steady-state error is S (0) =
s 3 + 6s 2 + 11s + 6
=3
s 3 + 7 s 2 + 14 s + 2 s =0
[
(b) [12 marks] Sketch the root locus of this feedback control system for k ∈ 0, +∞ ) .
Answer:
the loop gain is L( s ) = P ( s ) K ( s ) =
•
•
•
k ( s − 1)( s + 4)
.
( s + 1)( s + 2)( s + 3)
The root locus starts at the (open-loop) poles of L( s ) : −1, − 2, −3 for k = 0 and it ends at the
zeros of L( s ) : 1, −4, ∞ for k = +∞ .
On the real line, the root locus will have one segment between the zero 1 and the pole –1, another
segment between poles –2 and –3, and a third segment between zero –4 and −∞ . (this is our
asymptote going to infinity) (Rule 4)
For the one branch of the root locus going to infinity, the asymptote is described by
=
Centre of asymptotes
=
∑ poles of L( s) − ∑ zeros of L( s)
ν −µ
−1 − 2 − 3 − (1 − 4)
= −3
1
6
Sample Midterm Test 1 (mt1s02)
Angle of asymptote
=
2k + 1
π, k = 0
ν −µ
=π
Root locus:
1.5
1
Imag Axis
0.5
0
-0.5
-1
-1.5
-7
-6
-5
-4
-3
-2
-1
Real Axis
0
1
2
3
(c) [5 marks] Find the value of the gain k for which the system becomes unstable.
Answer:
The only branch going into the RHP is on the real line, hence it crosses the imaginary axis at the origin:
p(0) = 0
p( s ) = s 3 + ( k + 6) s 2 + (3k + 11) s + 6 − 4k
p(0) = 0 ⇒ 6 − 4k = 0 ⇔ k = 1.5
7
Sample Midterm Test 1 (mt1s02)
Problem 4 (20 marks)
(a) [10 marks] Compute the Fourier series coefficients {a k } of the signal x[ n] shown below. Write
x[n] as a Fourier series.
x[n]
2
...
-2
4
-1
-4 -3
1
2
...
5
3
7 8
6
9
n
-2
Answer:
The fundamental period of this signal is N=6 and the fundamental frequency is
ω0 =
2π
. The
6
DC component is a 0 = 0 . The other coefficients are obtained using the analysis equation of the
DTFS:
ak =
− jk
1 3
x[n ]e
∑
6 n =−2
2π
n
6
=
− jk
1 2
x[n ]e
∑
6 n =−2
2π
n
6
jk
1
=  −2e
6
2π
2
6
− 2e
jk
2π
6
+ 2e
− jk
2π
6
+ 2e
− jk
2π
2
6



1
2π
2π 2 
=  −2 j sin( k
) − 2 j sin( k
)
3
6
6 
2j
2π
2π 2 
= −  sin( k
) + sin( k
)
3 
6
6 
Numerically,
a0 = 0, a1 = − j
2
3
= − j1.15, a2 = 0, a3 = 0, a4 = 0, a5 = j
2
3
= j1.15
These coefficients are purely imaginary and odd as expected (since the signal is real and odd).
We can write the Fourier series of x[ n] as:
x[n ] =
∑a e
k= 6
k
jkω 0 n
2j
2π
2π 2  jk
= ∑ −  sin( k
) + sin( k
) e
3 
6
6 
k =0
5
8
2π
n
6
Sample Midterm Test 1 (mt1s02)
(b) [10 marks] Compute the output signal y[n ] of the causal LTI system H ( e
the input x[n ] given in (a).
Answer:
The Fourier series of the output is given by:
y[ n ] =
∑be
k= 6
5
= ∑−
k =0
k
jkω0 n
=
∑ H (e
k= 6

2j
1
2π
− jk
3 
 1 − 0.5e 6
jkω 0
)ak e jkω0 n

2π
jk
n
  sin( k 2π ) + sin( k 2π 2 )  e 6

6
6 

9
jω
)=
1
for
1 − 0.5e − jω