Midterm 1 Solutions

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

EECS 120 Signals & Systems University of California, Berkeley: Spring 11

Midterm 1 solutions

Problem 1:
Part a)
Let x[n] = δ[n] , then we can iterate to solve for h[n] = δ[n] + δ[n − 1] + 0.25h[n − 2] . Starting
with y[n] = 0 for n ≤ 1 , we obtain the impulse response

h[0] = δ[0] + δ[−1] + 0.25h[−2] = 1


h[1] = δ[1] + δ[0] + 0.25h[−1] = 1
h[2] = δ[2] + δ[1] + 0.25h[0] = 0.25
h[3] = δ[3] + δ[2] + 0.25h[1] = 0.25
h[4] = δ[4] + δ[3] + 0.25h[2] = 0.252
h[5] = δ[5] + δ[4] + 0.25h[3] = 0.252
 0.25n/2

for n even and n ≥ 0
h[n] = 0.25 (n−1)/2 for n odd and n ≥ 0
0 otherwise

Or, using Fourier transform methods, we obtain the impulse response

Y (ejw ) − 0.25e−2jw Y (ejw ) = X(ejw ) + e−jw X(e−jw )


Y (ejw ) 1 + e−jw 1 1
H(ejw ) = jw
= −2jw
= −0.5 jw
+ 1.5
X(e ) 1 − 0.25e 1 + 0.5e 1 − 0.5ejw
h[n] = −0.5(−0.5)n u[n] + 1.5(0.5)n u[n]

which is an equivalent expression.


Part b)
To test for stability, we check to see if the impulse response is absolutely summable

X ∞
X
|h[k]| = | − 0.5(−0.5)k u[k] + 1.5(0.5)k u[k]|
k=−∞ k=−∞
X∞
= | − 0.5(−0.5)k + 1.5(0.5)k |
k=0
1 1 8
= −0.5 + 1.5 = <∞
1 + 0.5 1 − 0.5 3
Therefore, the LTI system is stable.

Problem 2:

1
The input is periodic with period N = 5 , so the fundamental period of the output is also N = 5 .
First we compute the Fourier series coefficients of the input, ak ,
N −1
1 X 2π 1
ak = x[n] e−jk N n = 0 ≤ k ≤ 4.
N 5
n=0

Then we find the frequency response of the system



X sin( 5ω
2 )

H(e ) = h[n]e−jωn = ω .
n=−∞
sin( 2 )

Since the system is LTI, the response to the signal ejω0 n is H(ejω0 )ejω0 n . Therefore we have

jk 2π 1 sin(πk) 1 k = 0, ±5 · · ·
bk = H(e N ) ak = = ,
5 sin( πk
5 ) 0 o.w.

where {bk } are the Fourier series coefficients of the output.

Problem 3:
Part a)
To determine the Fourier transform, notice that the continuous time signal is just a convolution
of two square pulses

1, |t| < 1 2 sin(ω)
z(t) = → Z(jw) =
0, |t| > 1 ω

By using the convolution in time property


 2
2 sin(ω)
x(t) = z(t) ∗ z(t) → X(jw) = Z(jw)Z(jw) =
ω

Part b)

 −ωe−2jω , −1 ≤ ω ≤ 0

X(jw) = ωe−2jω , 0<ω≤1


0, otherwise

2
To find the continuous-time signal, we can evaluate the synthesis equation
Z ∞
1
x(t) = |X(jω)|ej∠X(jω) ejωt dω
2π −∞
Z 0 Z 1
1 −2jω jωt 1
= −ωe e dω + ωe−2jω ejωt dω
2π −1 2π 0
Z 0 Z 1
1 jωt−2jω 1
= −ωe dω + ωejωt−2jω dω
2π −1 2π 0
Z 1 Z 1
1 −jω(t−2) 1
= ωe dω + ωejω(t−2) dω
2π 0 2π 0
Z 1
1
= ω(e−jω(t−2) + ejω(t−2) )dω
2π 0
1 1
Z Z Z
= ω cos (ω(t − 2)) dω, using integration by parts udv = uv − vdu
π 0
  1
1 1 1
= ω sin (ω(t − 2)) + 2
cos (w(t − 2)) , t 6= 2
π t−2 (t − 2) 0
 
1 1 1 1
= sin (t − 2) + cos (t − 2) − , t 6= 2
π t−2 (t − 2)2 (t − 2)2

When t = 2 , the integral evaluates to


Z 1
1
x(t) = ω(e−jω(t−2) + ejω(t−2) )dω, t = 2
2π 0
1 1
Z
1
= ωdω = , t=2
π 0 2π

Problem 4:
Substituting x[n] = ejωn and using the fact that y[n] = H(ejω )ejωn (or equivalently by taking
the Fourier transform from both sides), we obtain the frequency response
b + e−jω
H(ejω ) = ,
1 − 12 e−jω
with the norm
p
jω |b + e−jω | (b + cos(ω))2 + sin(ω)2
|H(e )| = = .
|1 − 21 e−jω |
q
(1 − 12 cos(ω))2 + 41 sin(ω)2

We want to have
1 1
(b + cos(ω))2 + sin(ω)2 = (1 − cos(ω))2 + sin(ω)2 .
2 4
Doing a little bit of algebra, and using the fact that sin(ω)2 + cos(ω)2 = 1 , one can see that
b = − 21 satisfies this equation.

3
Problem 5:
i) Group delay is just the slope of the phase response of the filter, such as

d
− ∠H(ejω ) = 1
dw
which is equivalent to

∠H(ejω ) = −w + Constant (3 points)

ii)
Since
Z
1
h[n] = H(ejω )ejω dw
2π 2π

At n = 0, we have
Z
1
h[0] = H(ejω )dw = 1 (4 points)
2π 2π

iii) Since
Z
1 X
|H(ejω )|2 dw = |h[n]|2 = 2
2π 2π n
2 2 2
h [0] + h [1] + h [2] = 2
h2 [1] + h2 [2] = 1
2 is different from ( h[0] + h[1] + h[2] )2 (4 points)
P
Note: n |h[n]|

It should be clear now that we are looking for a solution taking the form such as

H(ejω ) = e−jω A(ejω )

where the A(ejω ) is always a real number, and e−jω provides the linear phase response de-
manded in part i). From part ii) and iii), we have

H(ejω ) = 1 + h[1]e−jω + h[2]e−2jω


= e−jω (ejω + h[1] + h[2]e−jω )

Notice that if h[1] = 0 and h[2] = 1 , the above equation can be simplified into 2cos(ω)e−jω ,
π
which meet all three contraints. While with h[1] = 0 and h[2] = −1 , it becomes 2sin(ω)e−jω+j 2 .
Hence, the solution is NOT unique.
Also, it is okay if one recognized that it is analogous to the FIR filter example we covered in
lectures (Feb23), and applied the conclusion. In that case, one needs to point out the desired
FIR filter could either take the form of type I or III, therefore, the solution is again not unique.
(4 points)
For part b), the case that h[0]=h[2]=1 is shown.

4
Figure 1: Some Figures

5
Figure 2: Some Figures

You might also like