0% found this document useful (0 votes)
87 views21 pages

Solutions: Signals & Systems

This document contains information about a final exam for a Signals & Systems course, including: - The exam date, duration, number of problems, and permitted aids. - Details and solutions for 4 problems related to systems analysis and filter design. - Requirements include calculating transfer functions, analyzing system stability, and designing filters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views21 pages

Solutions: Signals & Systems

This document contains information about a final exam for a Signals & Systems course, including: - The exam date, duration, number of problems, and permitted aids. - Details and solutions for 4 problems related to systems analysis and filter design. - Requirements include calculating transfer functions, analyzing system stability, and designing filters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Final Exam February 4th, 2012

Signals & Systems (151-0575-01) Prof. R. D’Andrea

Solutions

Exam Duration: 150 minutes

Number of Problems: 10

Permitted aids: One double-sided A4 sheet.


Questions can be answered in English or German.
Use only the prepared sheets for your solutions. Additional
paper is available from the supervisors.
Page 2 Final Exam – Signals & Systems

Problem 1 5 points

Given a system as below:


x[n] + q[n] + y[n]
Σ Σ
+ +

β z −1 α

z −1

Y (z)
a) Calculate the transfer function Q(z) . (1 point)
Q(z)
b) Calculate the transfer function X(z)
. (1 point)
Y (z)
c) Calculate the system transfer function H(z) = X(z) . (1 point)

d) For what (real) values of α and β is the system bounded (2 points)


input bounded output stable?

Solution 1

a) We begin by writing down the difference equation: y[n] = q[n]+αq[n−2],


from which we have
Y (z) = Q(z)(1 + αz −2 )
Y (z)
= 1 + αz −2
Q(z)
b) q[n] = x[n] + βq[n − 1]:

Q(z) 1
=
X(z) 1 − βz −1
c)
Y (z) Q(z) 1 + αz −2
H(z) = =
Q(z) X(z) 1 − βz −1
d) The system is stable if all the poles lie inside the unit circle.
1 − βz −1 = 0
z=β
Final Exam – Signals & Systems Page 3

Therefore the system is stable if |β| < 1.


Page 4 Final Exam – Signals & Systems

Problem 2 5 points

You are given a system described by the following difference equation.


n
X
y[n] = x[k]
k=−∞

a) Is the system linear? Prove/disprove this. (2 points)


b) Is the system time invariant? Prove/disprove this. (2 points)
c) Using an example, show that the system is not bounded (1 point)
input bounded output stable.

Solution 2

a) Define
n
X
y1 [n] := x1[k]
k=−∞
Xn
y2 [n] := x2[k]
k=−∞

Now let x12 := αx1[n] + βx2[n], from which


n
X
y12 = x12[k]
k=−∞
Xn
= (αx1[k] + βx2[k])
k=−∞
= αy1 [n] + βy2 [n]
The system satisfies the principle of superposition, and is therefore linear.
b) Let x̄[n] := x[n − l], and then
n
X
ȳ[n] = x̄[k]
k=−∞
Xn
= x[k − l]
k=−∞
Final Exam – Signals & Systems Page 5

If we now define m := k − l, then we have

k = −∞ ⇒ m = −∞
k =n⇒m=n−l

from which we get


n−l
X
ȳ[n] = x[m]
m=−∞
= y[n − l].
This implies that a time shift in the input yields the corresponding time
shift in the output.
c) Let x[n] = u[n], then |x[n]| = 1 < ∞ for all n, and y[n] = n, from which
we have that |y[n]| grows unbounded.
Page 6 Final Exam – Signals & Systems

Problem 3 5 points

Given a continuous time first-order low-pass filter of the form

1
H(s) = .
τs + 1

a) Given a sampling time Ts, use the bilinear transformation (2 points)


to convert the continuous time filter to a discrete time filter
of the form
1 + z −1
H(z) = .
a0 + a1 z −1

b) An impulse is applied to the filter as input and the output (3 points)


is measured. Determine the time constant τ of the continu-
ous time filter given that the first element of the measured
impulse response is
1
y[0] =
41
and that the sampling time is

Ts = 0.01.

Solution 3

a) The bilinear transformation mapping continuous time to discrete time


is defined as
 
2 z−1
s= .
Ts z+1
Final Exam – Signals & Systems Page 7

The transfer function H(z) becomes then


 
2 z−1 1 z+1
H(s = ) = 2 z−1  = 2 =
Ts z + 1 τ Ts z+1 + 1 τ Ts (z − 1) + (z + 1)
z+1 z −1 (z + 1)
= 2τ 2τ =  =
(1 − Ts ) + z(1 + Ts
) z −1 (1 − 2τ
) + z(1 + 2τ
)
Ts Ts
1 + z −1
= 2τ −1 .
(1 + 2τ
Ts
) + (1 − Ts
)z

b) The difference equation can be derived from the transfer function H(z)
and reads as

a0 y[n] = x[n] + x[n − 1] − a1 y[n − 1]

or
1 1 a1
y[n] = x[n] + x[n − 1] − y[n − 1].
a0 a0 a0
where

a0 = 1 +
Ts

a1 = 1 − .
Ts
Applying an impulse as input, the coefficient a0 can directly be deter-
mined as
1 1
y[0] = = .
41 a0
Thus
Ts
τ = (a0 − 1) · = 0.2.
2
Page 8 Final Exam – Signals & Systems

Problem 4 5 points

Design a first-order finite impulse response (FIR) filter of the form

y[n] = b0x[n] + b1x[n − 1]

that simultaneously fulfils the following requirements:

1. When the input of the filter equals

x[n] = 1 ∀n,

the output is

lim y[n] = 1.
n→∞

2. The 3dB-bandwith of the filter equals π2 .


(Hint: |H(Ω3dB )| = √12 |H(0)|)

Solution 4

The first requirement implies unity gain and imposes following condition
on the filter coefficients

lim y[n] = 1 = b0 · 1 + b1 · 1 = b0 + b1.


n→∞

The second requirement combined with the fact that the filter has unity
gain or H(0) = 1 yields
π 1 1
|H( )| = √ · 12 = √
2 2 2
or
π 1
|H( )|2 = .
2 2
The transfer function of the filter equals
b0 + b1z −1
H(z) = = b0 + b1 z −1 .
1
Final Exam – Signals & Systems Page 9

Evaluating the transfer function on the unit circle z = ejΩ yields the fre-
quency response

H(Ω) = b0 + b1 e−jΩ = b0 + b1(cos(Ω) − j sin(Ω)) =


= b0 + b1 cos(Ω) +j (−b1 sin(Ω)) .
| {z } | {z }
Re(H(Ω)) Im(H(Ω))

The square magnitude of the frequency response equals

|H(Ω)|2 = Re2(H(Ω)) + Im2 (H(Ω)) =


= b20 + 2b0b1 cos(Ω) + b21 cos2 (Ω) + b21 sin2 (Ω) =
= b20 + 2b0b1 cos(Ω) + b21 .

Thus combining the first requirement

b0 = 1 − b1

with the second requirement


π 1
b20 + 2b0b1 cos( ) + b21 = b20 + b21 =
2 2
yields
1
(1 − b1)2 + b21 = 1 − 2b1 + 2b21 =
2
or
1
2b21 − 2b1 + = 0.
2
The unique solution of this quadratic equation is
1
b1 =
2
and therefore
1
b0 = 1 − b1 = .
2
Page 10 Final Exam – Signals & Systems

Problem 5 5 points

You want to identify a linear time invariant system T with input x[n] and
output y[n]

y[n] = T {x[n]}

which you assume is causal and has the form

b0 + z −1
HID (z) = .
1 + a1 z −1
You apply a causal input to the system that has four elements

x = {x[0], x[1], x[2], x[3]}

and you measure the noisy output

y = {y[0], y[1], y[2], y[3]}.

a) Define Θ = [b0, a1 ]T . Write a matrix equation (3 points)

G = FΘ

where G and F consist only of known entities.


b) Given the input (2 points)

x = {1, 0, 0, 0}

and the output

y = {2, 3, 2, 2}

calculate the coefficients b0 and a1 in the least squares sense.

Solution 5

a) The difference equation of the system reads as

y[n] = b0x[n] + x[n − 1] − a1 y[n − 1].


Final Exam – Signals & Systems Page 11

Applying a causal input, the output y[n], n = 0, 1, 2, 3 becomes


y[0] = b0x[0]
y[1] = b0x[1] + x[0] − a1 y[0]
y[2] = b0x[2] + x[1] − a1 y[1]
y[3] = b0x[3] + x[2] − a1 y[2]
This can be written in a matrix equation where the LHS consists only
of known elements independent of the filter coefficients
   
y[0] x[0] 0  
y[1] − x[0] x[1] −y[0] b0
y[2] − x[1] = x[2] −y[1] a1 .
   

y[3] − x[2] x[3] −y[2]

b) Solving for the vector Θ in the least squares sense results in


Θ⋆ = (FT F)−1FT G.
Setting the elements of F and G according to the given input and
output yields
   
2 2
3 − 1 2
G= 2 − 0 = 2
  

2−0 2
and
 
1 0
0 −2
F=
0 −3 .

0 −2
Thus
   
  1 0   2
1 0 0 0  0 −2)−1 1 0 0 0 2 =
  
(FT F)−1FT G = (
0 −2 −3 −2 0 −3 0 −2 −3 −2 2
0 −2 2
      
1 0 2 2 b
= 1 = 14 = 0 .
0 17 14 17 a1
Page 12 Final Exam – Signals & Systems

Problem 6 5 points

Given a finite impulse response filter (FIR) of the form


x[n] + 4x[n − 1] + x[n − 2]
y[n] =
6
and a zero-mean white noise input signal x[n] with variance σx2 .
a) Determine the frequency response of the filter in polar de- (2 points)
scription

H(Ω) = R(Ω)ejφ(Ω) .

b) Using the result of a), determine the power spectral density (1 points)
function Syy (Ω) of the output y[n].
σy2
c) Using the result of b), calculate the ratio σx2
. (2 points)
(Hint : cos2 (Ω) = 21 (1 + cos(2Ω)))

Solution 6

a) Transforming the difference equation in the z-domain yields


X(z) + 4z −1X(z) + z −2X(z)
Y (z) = .
6
The transfer function therefore equals
Y (z) 1 + 4z −1 + z −2
H(z) = = .
X(z) 6
Evaluating the transfer function on the unit circle z = ejΩ defines the
frequency response
1 + 4e−jΩ + e−j2Ω
H(Ω) = ,
6
which can be transformed to polar description in the following way
e−jΩ jΩ
H(Ω) = (e + 4 + e−jΩ ) =
6
−jΩ
e
= (cos(Ω) + j sin(Ω) + 4 + cos(Ω) − j sin(Ω)) =
6
(2 cos(Ω) + 4) −jΩ
= e = R(Ω)ejφ(Ω) .
6
Final Exam – Signals & Systems Page 13

b) The power spectral density (PSD) of the output depends on the PSD
of the input and the square magnitude of the frequency response
Syy (Ω) = |H(Ω)|2Sxx (Ω).
The PSD of zero-mean white noise is constant and equals
Sxx (Ω) = σx2 .
The magnitude of the frequency response equals R(Ω) and therefore
the PSD of the output becomes
1
Syy (Ω) = R2(Ω)σx2 = (4 cos2 (Ω) + 16 cos(Ω) + 16)σx2 =
36
1
= (cos2 (Ω) + 4 cos(Ω) + 4)σx2 .
9
c) The variance σy2 of the output can be calculated from the inverse
Fourier transform of the PSD Syy (Ω) as following

1
σy2 = Ryy [k = 0] = Syy ejΩ·0 dΩ =

−π

1 1
= (cos2 (Ω) + 4 cos(Ω) + 4)dΩ · σx2 =
2π 9
−π
 
Zπ Zπ Zπ 
σx2  1 
=  (1 + cos(2Ω))dΩ + 4 cos(Ω)dΩ +4 1dΩ =
18π −π 2 

|−π {z } −π
0
 
 Zπ Zπ Zπ 
σx2  1 1 
=  1dΩ + cos(2Ω)dΩ +4 1dΩ =
18π  2
 2 

−π
| −π {z } −π
2
  02
σ 1 σ
= x · 2π + 4 · 2π = x .
18π 2 2
σy2
Therefore the ratio σx2 equals 12 .
Page 14 Final Exam – Signals & Systems

Problem 7 5 points

You are given a signal x[n], below, to analyze.

x[n] = {1, −1, 0, 0}

a) What is the Discrete Fourier Transform (DFT), X[k]? (2 points)

You want to isolate the low frequency content of x[n], and keep only fre-
quencies in the range Ω ∈ [0, π2 ], to yield the (real) signal y[n].
b) Write down the DFT Y [k], and from that calculate the (3 points)
signal y[n].

Solution 7

2π π
a) We have x[n] = {1, −1, 0, 0}, N = 4, WN = e−j N = e−j 2
N
X −1
X[k] = x[n]WNkn
n=0
−j π2 0k π
= 1e − 1ej 2 1k
π
= 1 − e−j 2 k
This gives:

X[0] = 0
X[1] = 1 + j
X[2] = 2
X[3] = 1 − j

b) Because it is a real signal, the DFT contains only three distinct frequen-
cies: Ω0 = 0, Ω1 = π2 , Ω2 = π. To eliminate the frequencies above π2 , we
set:

Y [0] = X[0] = 0
Y [1] = X[1] = 1 + j
Y [2] = 0
Y [3] = Y [N − 3]∗ = 1 − j
Final Exam – Signals & Systems Page 15

Note that Y [3] is not zero. If one sets Y [3] = 0, but keeps Y [1] = 1 + j the
inverse DFT would yield a signal with imaginary components.
The time series y[n] is now calculated using the inverse DFT:
N −1
1 X
y[n] = Y [k]WN−kn
N
k=0
1 π π 
= (1 + j)ej 2 n + (1 − j)ej 2 3n
4

1 1
y[0] = ((1 + j) + (1 − j)) =
4 2
1 1
y[1] = ((1 + j)(j) + (1 − j)(−j)) = −
4 2
1 1
y[2] = ((1 + j)(−1) + (1 − j)(−1)) = −
4 2
1 1
y[3] = ((1 + j)(−j) + (1 − j)(j)) =
4 2
 
1 1 1 1
y[n] = ,− ,− ,
2 2 2 2
Page 16 Final Exam – Signals & Systems

Problem 8 5 points

Given the linearized motion equation of an inverted pendulum on a cart

φ̈(t) = aφ(t) + bu(t).

where φ(t) is the deviation of the pendulum from the upper equilibrium and
u(t) is the input to the system. The output of the system is the deviation
φ(t).
a) Discretize the equation using the Euler Method (3 points)
φ(t) − 2φ(t − Ts ) + φ(t − 2Ts)
φ̈(t) ≈
Ts2
and provide the discrete state space representation with two
states.
b) Let a = 3, b = 1 and Ts = 1. Is the system controllable? (1 point)

c) Is the system observable? (1 point)

Solution 8

a) Define y[n] = φ(t) and u(t) = x[n] for t ∈ [nTs, (n + 1)Ts).


Then
y[n] − 2y[n − 1] + y[n − 2]
= ay[n] + bx[n]
Ts2
or
Ts2b 2 1
y[n] = x[n] + y[n − 1] − y[n − 2].
1 − aTs2 1 − aTs2 1 − aTs2

Introducing the states


   
q1 [n] y[n − 2]
=
q2 [n] y[n − 1]
Final Exam – Signals & Systems Page 17

the state space representation reads as follows


     " #
q1 [n + 1] 0 1 q1 [n] 0
= −1 2 + Ts2b x[n]
q2 [n + 1] 1−aTs2 1−aTs2 q2 [n] 1−aTs2
h 
i q [n]  h 2 i
−1 2 1 Ts b
y[n] = 1−aTs2 1−aTs2 + 1−aT 2 x[n]
q2 [n] s

or
q[n + 1] = Aq[n] + Bx[n]
y[n] = Cq[n] + Dx[n].
b) The system is controllable if the matrix
 
B AB
has full rank. From a)
 
0
B=
− 12
     1
0 1 0 −2
AB = 1 1 = 1 .
2
−1 − 2 2
Thus the system is controllable as
 
  0 − 21
B AB =
− 12 12
has full rank. This can readily be seen as the rows are linearly inde-
pendent.
c) Similarly, the system is observable if
 
C
CA
has full rank. From a)
1 
C= 2 −1
 
1  0 1  
CA = 2 −1 1 = − 21 3
2
2 −1
and thus the system is observable as
   1 
C −1
= 21 3
CA −2 2
has full rank as the rows are linearly independent.
Page 18 Final Exam – Signals & Systems

Problem 9 5 points

Consider a linear, time-invariant system y[n] = T {x[n]}, with transfer


function H(z).
a) Give an equation for the step response s[n] = T {u[n]} as a (1 point)
function of the system’s impulse response h[n] = T {δ[n]}.
b) Show that the steady state step response of the system can (3 points)
be calculated by evaluating the transfer function at z = 1,
i.e.
lim s[n] = H(z) z=1.
n→∞

c) If the system is unstable, we expect lim s[n] to be un- (1 point)


n→∞
bounded. However, H(z) z=1 may still be finite. How is

this possible, considering your answer above in b)?

Solution 9

a) For any input, the output is:

y[n] = h[n] ∗ x[n]


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

Specifically, for a step input we have



X n
X
s[n] = h[k]u[n − k]. = h[k].
k=−∞ k=−∞

b) By definition,

X
H(z) = h[k]z −k
k=−∞
X∞
⇒H(1) = h[k]
k=−∞
Final Exam – Signals & Systems Page 19

Using the result for b) above, we have


n
X
lim s[n] = lim h[k]
n→∞ n→∞
k=−∞

X
= h[k]
k=−∞
= H(1)
c) For unstable systems, the unit circle is excluded from the region of
convergence, i.e. it is meaningless to evaluate the transfer function at
z = 1.
The transfer function on its own does not contain any information about
stability.
Page 20 Final Exam – Signals & Systems

Problem 10 5 points

You are given a continuous time system, of the form

q̇(t) = A q(t) + B x(t)


y(t) = C q(t) + D x(t)

You are to discretize the system over a sample time of Ts by using a hold
device at the input, such that

x(t) = xd [n] for t ∈ [nTs, (n + 1)Ts),

to yield a discrete time system of the form

qd [n + 1] = Ad qd [n] + Bd xd [n]
yd [n] = Cd qd [n] + Dd xd [n].

a) Determine the exact discretization Ad , Bd , Cd and Dd using (1 point)


A, B, C and D; such that yd [n] = y(nTs ).
   
0.5 0.5 3  
For some system you calculate Ad = , Bd = , Cd = 0 1
0 0.75 3
and Dd = 0.
Y (z)
b) What is the system transfer function H(z) = X(z) ? (2 points)

c) Is this system bounded input bounded output stable? (2 points)


Why/why not?

Solution 10

a) We define matrices M and G, and use the sampling time Ts , to get


 
A B
M=
0 0
 
A d B d
G = eM Ts =
g21 g22
Cd = C
Dd = D
Final Exam – Signals & Systems Page 21

b) There are two ways of approaching this problem:

H(z) = C(zI − A)−1B + D


  
1   z − 0.75 0.5 3
= 0 1 +0
(z − 0.5)(z − 0.75) 0 z − 0.5 3
3(z − 0.5)
=
(z − 0.5)(z − 0.75)
3
=
z − 0.75
Alternatively, we notice that

y[n] = q2[n]
= 0.75q2[n − 1] + 3u[n − 1]
= 0.75y[n − 1] + 3u[n − 1]

from which we can directly write


3z −1
H(z) =
1 − 0.75z −1
c) The transfer function has a pole at z = 0.75, which lies inside the unit
circle, so it is BIBO stable.
Alternatively, we can directly read off the eigenvalues of A, which are
λ1 = 0.5 and λ2 = 0.75. Both of these eigenvalues lie inside the unit circle,
so the system is stable (states decay to zero), and therefore also BIBO
stable.

You might also like