You are on page 1of 29

Digital Signal Processing

Final Exam
2021 - 2022 Fall
07.01.2021

Student Name : SOLUTIONS 1 2 3 4 Total


Student Number : (30p) (20p) (35p) (15p)
Signature :

Time: 90min
 This is a closed books / notes exam.
 Calculators are not allowed.
 Additional / extra answer sheets are not allowed.

Q1. a) Calculate the fast Fourier transform (FFT) for the signal 𝑥[𝑛] = [1 3 5 8] (15)
b) Calculate the inverse discrete Fourier transform (IDFT) for the signal 𝑥[𝑛] = [6 2𝑗 2 − 2𝑗] (15)

a)

𝑥𝑒 [𝑛] = [1 5] , 𝑥𝑜 [𝑛] = [3 8]

⇒ 𝑋𝑒 [𝑘] = [1 + 5 1 − 5] = [6 − 4] , 𝑋𝑜 [𝑘] = [3 + 8 3 − 8] = [11 − 5]

𝑋[𝑘] = 𝑋𝑒 [𝑘] + 𝑊4𝑘 𝑋𝑜 [𝑘] , 𝑘 = 0,1


𝑋[𝑘 + 2] = 𝑋𝑒 [𝑘] − 𝑊4𝑘 𝑋𝑜 [𝑘], 𝑘 = 0,1

𝑋[0] = 6 + 𝑒 −𝑗(2𝜋/4)0 (11) = 6 + 11 = 17


2𝜋
𝑋[1] = −4 + 𝑒 −𝑗( 4 )1 (−5) = −4 + 5𝑗
2𝜋
𝑋[2] = 6 − 𝑒 −𝑗( 4 )0 (11) = 6 − 11 = −5
2𝜋
𝑋[3] = −4 − 𝑒 −𝑗( 4 )1 (−5) = −4 − (−5𝑗) = −4 − 5𝑗

b)
𝑁−1 3
1 1
𝑥[𝑛] = ∑ 𝑋[𝑘]𝑒 𝑗(2𝜋/𝑁)𝑘𝑛 = ∑ 𝑋[𝑘]𝑒 𝑗(2𝜋/4)𝑘𝑛
𝑁 4
𝑘=0 𝑘=0
1
= (6 + (2𝑗)𝑒 𝑗(𝜋/2)𝑛 + 2𝑒 −𝑗(𝜋/2)2𝑛 + (−2𝑗)𝑒 𝑗(𝜋/2)3𝑛 )
4
1 1
𝑥[0] = (6 + (2𝑗)𝑒 𝑗(𝜋/2)0 + 2𝑒 −𝑗(𝜋)0 + (−2𝑗)𝑒 𝑗(3𝜋/2)0 ) = (6 + (2𝑗) + 2 + (−2𝑗)) = 2
4 4
1 1
𝑥[1] = (6 + (2𝑗)𝑒 𝑗(𝜋/2)1 + 2𝑒 −𝑗(𝜋)1 + (−2𝑗)𝑒 𝑗(3𝜋/2)1 ) = (6 + (2𝑗)(𝑗) + 2(−1) + (−2𝑗)(−𝑗)) = 0
4 4
1 1
𝑥[2] = (6 + (2𝑗)𝑒 𝑗(𝜋/2)2 + 2𝑒 −𝑗(𝜋)2 + (−2𝑗)𝑒 𝑗(3𝜋/2)2 ) = (6 + (2𝑗)(−1) + 2(1) + (−2𝑗)(−1))
4 4
=2
1 1
𝑥[3] = (6 + (2𝑗)𝑒 𝑗(𝜋/2)3 + 2𝑒 −𝑗(𝜋)3 + (−2𝑗)𝑒 𝑗(3𝜋/2)3 ) = (6 + (2𝑗)(−𝑗) + 2(−1) + (−2𝑗)(𝑗)) = 2
4 4
Q2. For the system given below, SA corresponds to a zero insertion system that inserts one zero after every input
sample (i.e., 2↑), 𝐻(𝑒 𝑗Ω ) is an ideal low-pass filter with gain 1, and SB corresponds to a decimation system that
extracts every fifth sample of its input (i.e., 5↓).
a) What should be the cut-off frequency of 𝐻(𝑒 𝑗Ω ) to prevent aliasing? Show your calculation or explain your
reasoning.(5)
b) Sketch 𝑇(𝑒𝑗Ω ), 𝑊(𝑒𝑗Ω ) and 𝑌(𝑒𝑗Ω ) based on the input signal’s frequency response provided below, and the cut-
off frequency determined on the previous step. (15)

x[n] 𝑆𝐴 𝐻(𝑒 𝑗Ω ) 𝑆𝐵 y[n]


t [n] w[n]

𝑋(𝑒 𝑗Ω )
… 1 …

π Ω
-π -π/2
−2𝜋/3 2𝜋/3 4𝜋/3 2π 8𝜋/3

a) The signal’s maximum frequency component is at the frequency 2𝜋/3. After the upsampling, it will be at
𝜋/3. If the filter does not cut out any frequency components out of this, after the downsampling the
maximum frequency component will be at 5𝜋/3, which will cause aliasing. In order to prevent aliasing, the
maximum frequency component should be limited to 𝜋 after downsampling, so the filter’s cut-off
frequency should be 𝜋/5.

b)

𝑇(𝑒 𝑗Ω )
… 1 …

−𝜋/3 𝜋 𝜋/3 2𝜋/3 𝜋π 4𝜋/3 5𝜋/3 2𝜋 7𝜋/3 Ω


𝑊(𝑒 𝑗Ω )
… 1 …

−𝜋/5 𝜋 𝜋/5 π𝜋 2𝜋 Ω

𝑌(𝑒 𝑗Ω )
… …

1/5

π𝜋 Ω
-π 2𝜋
Q3. For the system with the LCCDE expression of 𝑦[𝑛] − 2.5𝑦[𝑛 − 1] + 𝑦[𝑛 − 2] = 3𝑥[𝑛]

a) Determine the transfer function of the system. Show your calculations! (10)
b) Draw the pole-zero graph (5)
c) Determine the impulse response of the system if the system is causal. (10)
d) Determine the impulse response of the system if the system is stable. (10)

a)
𝑌(𝑧) − 2.5𝑧 −1 𝑌(𝑧) + 𝑧 −2 𝑌(𝑧) = 3𝑋(𝑧)

𝑌(𝑧) 3 3 3𝑧 2
𝐻(𝑧) = = = =
𝑋(𝑧) 1 − 2.5𝑧 −1 + 𝑧 −2 (1 − 2𝑧 −1 )(1 − 0.5𝑧 −1 ) (𝑧 − 2)(𝑧 − 0.5)

4 1
𝐻(𝑧) = −
1 − 2𝑧 −1 1 − 0.5𝑧 −1
b)
Poles: 0.5, 2
Zeros: 0, 0

Unit circle

c) ROC: |𝑧| > 2


4 1
𝐻(𝑧) = −
1 − 2𝑧 −1 1 − 0.5𝑧 −1

ℎ[𝑛] = 4(2)𝑛 𝑢[𝑛] − (0.5)𝑛 𝑢[𝑛] = ((2)𝑛+2 − (0.5)𝑛 )𝑢[𝑛]

d)

ROC: 0.5 < |𝑧| < 2


4 1
𝐻(𝑧) = −
1 − 2𝑧 −1 1 − 0.5𝑧 −1

ℎ[𝑛] = −4(2)𝑛 𝑢[−𝑛 − 1] − (0.5)𝑛 𝑢[𝑛]


Q4. Draw the amplitude responses |𝐻(𝑒𝑗Ω )| for the filters designed with the pole-zero positions given below.
Make sure that your drawings are consistent / compatible with each other.

a) Poles: 0.7 , Zeros: - 1

b) Poles: 0.7 , - 0.7 , Zeros: j , -j

c) Poles: 0.7𝑒𝑗𝜋/3 , 0.7𝑒−𝑗𝜋/3 , 0 , Zeros: 1 , 𝑒𝑗2𝜋/3, 𝑒−𝑗2𝜋/3

a) b)

c)
Digital Signal Processing
Make Up Exam
2021 - 2022 Fall
25.01.2022

Student Name : SOLUTIONS 1 2 3 4 Total


Student Number : (25p) (30p) (30p) (15p)
Signature :

Time: 85min
 This is a closed books / notes exam.
 Calculators are not allowed.

Q1. Consider the LTI system with the impulse response ℎ[𝑛] = (1/2)𝑛 𝑢[𝑛]
a) Find the frequency response 𝐻(𝑒 𝑗Ω ) of the system (10)
b) Determine the output 𝑦[𝑛] of this system for 𝑥[𝑛] = (2)𝑛 𝑢[−𝑛 − 2] using convolution. (15)

a)
∞ ∞ ∞ ∞
𝑗Ω −𝑗Ω𝑛 𝑛
𝐻(𝑒 ) = ∑ 𝑥[𝑛]𝑒 = ∑ (1/2)𝑛 𝑢[𝑛]𝑒 −𝑗Ω𝑛
= ∑(1/2) 𝑒𝑛 −𝑗Ω𝑛
= ∑(0.5𝑒 −𝑗Ω )
𝑛=−∞ 𝑛=−∞ 𝑛=0 𝑛=0

0−1 1
= −𝑗Ω
=
0.5𝑒 − 1 1 − 0.5𝑒 −𝑗Ω

b)
∞ ∞
1 𝑛−𝑘
𝑦[𝑛] = ∑ 𝑥[𝑘]ℎ[𝑛 − 𝑘] = ∑ (2)𝑘 𝑢[−𝑘 − 2] ( ) 𝑢[𝑛 − 𝑘]
2
𝑘=−∞ 𝑘=−∞

∑ (2)𝑘 (1/2)𝑛−𝑘 𝑛+2<0


𝑘=−∞
= −2

∑ (2)𝑘 (1/2)𝑛−𝑘 𝑛+2≥0


{𝑘=−∞
𝑛

(2)−𝑛 ∑ (4)𝑘 𝑛 < −2


𝑘=−∞
= −2

(2)−𝑛 ∑ (4)𝑘 𝑛 ≥ −2
{ 𝑘=−∞

4𝑛+1
(2)−𝑛 𝑛 < −2
= 3
−1
−𝑛
4
(2) 𝑛 ≥ −2
{ 3

2𝑛+2
𝑛 < −2
= 3
−𝑛−2
2
{ 3 𝑛 ≥ −2
2) a) Calculate the fast Fourier transform (FFT) for the signal 𝑥[𝑛] = [2 1 1 2] (15)
b) Calculate the inverse discrete Fourier transform (IDFT) for the signal 𝑋[𝑘] = [3 0 6] (15)

a)

𝑥𝑒 [𝑛] = [2 1] , 𝑥𝑜 [𝑛] = [1 2]

⇒ 𝑋𝑒 [𝑘] = [2 + 1 2 − 1] = [3 1] , 𝑋𝑜 [𝑘] = [1 + 2 1 − 2] = [3 − 1]

𝑋[𝑘] = 𝑋𝑒 [𝑘] + 𝑊4𝑘 𝑋𝑜 [𝑘] , 𝑘 = 0,1


𝑋[𝑘 + 2] = 𝑋𝑒 [𝑘] − 𝑊4𝑘 𝑋𝑜 [𝑘], 𝑘 = 0,1

𝑋[0] = 3 + 𝑒 −𝑗(2𝜋/4)0 (3) = 3 + 3 = 6


2𝜋
𝑋[1] = 1 + 𝑒 −𝑗( 4 )1 (−1) = 1 + (−𝑗)(−1) = 1 + 𝑗
2𝜋
𝑋[2] = 3 − 𝑒 −𝑗( 4 )0 (3) = 3 − 3 = 0
2𝜋
𝑋[3] = 1 − 𝑒 −𝑗( 4 )1 (−1) = 1 − (−𝑗)(−1) = 1 − 𝑗

b)
𝑁−1 2
1 1 1
𝑥[𝑛] = ∑ 𝑋[𝑘]𝑒 𝑗(2𝜋/𝑁)𝑘𝑛 = ∑ 𝑋[𝑘]𝑒 𝑗(2𝜋/3)𝑘𝑛 = (3 + 0𝑒 𝑗(2𝜋/3)𝑛 + 6𝑒 𝑗(2𝜋/3)2𝑛 )
𝑁 3 3
𝑘=0 𝑘=0

1 1
𝑥[0] = (3 + 0𝑒 𝑗(2𝜋/3)0 + 6𝑒 𝑗(4𝜋/3)0 ) = (3 + 0 + 6) = 3
3 3

1 1 1 √3 1 √3
𝑥[1] = (3 + 0𝑒 𝑗(2𝜋/3)1 + 6𝑒 𝑗(4𝜋/3)1 ) = (3 + 0 (− + 𝑗) + 6 (− − 𝑗)) = 1 − 1 − √3𝑗
3 3 2 2 2 2

= −√3𝑗

1 1 1 √3 1 √3
𝑥[2] = (3 + 0𝑒 𝑗(2𝜋/3)2 + 6𝑒 𝑗(4𝜋/3)2 ) = (3 + 0 (− − 𝑗) + 6 (− + 𝑗)) = 1 − 1 + √3𝑗
3 3 2 2 2 2

= √3𝑗
Q3. A stable system has LCCDE expression 𝑦[𝑛] − 3.5𝑦[𝑛 − 1] − 2𝑦[𝑛 − 2] = 2𝑥[𝑛 − 1]
a) Determine the transfer function of the system. Show your calculations! (10)
b) Determine the ROC (5)
c) Determine the impulse response of the system. Is this system causal? (15)

a)

𝑌(𝑧) − 3.5𝑧 −1 𝑌(𝑧) − 2𝑧 −2 𝑌(𝑧) = 2𝑧 −1 𝑋(𝑧)

𝑌(𝑧) 2𝑧 −1 2𝑧 −1
𝐻(𝑧) = = =
𝑋(𝑧) 1 − 3.5𝑧 −1 − 2𝑧 −2 (1 + 0.5𝑧 −1 )(1 − 4𝑧 −1 )

b)

|−0.5| < |𝑧| < |4| ⟹ 0.5 < |𝑧| < 4

c)

2𝑧 −1 −4/9 4/9
𝐻(𝑧) = −1 −1
= −1
+
(1 + 0.5𝑧 )(1 − 4𝑧 ) 1 + 0.5𝑧 1 − 4𝑧 −1

ROC is 0.5 < |𝑧| < 4:

4 4
ℎ[𝑛] = − (−0.5)𝑛 𝑢[𝑛] − (4)𝑛 𝑢[−𝑛 − 1]
9 9

OR

2𝑧 −1 −1
1/9 8/9
𝐻(𝑧) = = 2𝑧 ( + )
(1 + 0.5𝑧 −1 )(1 − 4𝑧 −1 ) 1 + 0.5𝑧 −1 1 − 4𝑧 −1

ROC is 0.5 < |𝑧| < 4:

2 16
ℎ[𝑛] = (−0.5)𝑛−1 𝑢[𝑛 − 1] + (4)𝑛−1 𝑢[−(𝑛 − 1) − 1]
9 9
2 1
= (−0.5)𝑛−1 𝑢[𝑛 − 1] + (4)𝑛+1 𝑢[−𝑛]
9 9

System is not causal, as ℎ[𝑛] ≠ 0 for 𝑛 < 0.


OR
System is not causal as ROC is not |𝑧| > 4
Q4. Design a third-order band-pass filter using pole-zero placement that satisfies the following requirements:
- The filter should be causal and stable
- |𝐻(𝑒𝑗Ω )| = 0 at Ω = 0 and Ω = 2𝜋/3
- Maximum |𝐻(𝑒𝑗Ω )| is obtained at Ω = 𝜋/3
Determine the pole and zero locations, and draw the pole-zero graph

A possible pole – zero placement is: Zeros: +1, 𝑒𝑗2𝜋/3 , 𝑒−𝑗2𝜋/3


Poles: 0, 0.8𝑒𝑗𝜋/3 , 0.8𝑒−𝑗𝜋/3
MEH329 Digital Signal Processing
Final Exam
2018 / 2019 Fall – 1.Ö.
11.01.2019

Student Name : 1 2 3 4 Total


Student Number : (30p) (20p) (30p) (20p)
Signature :

Time: 85min
 This is a closed books / notes exam.
 Calculators are not allowed.
 Additional / extra answer sheets are not allowed.

Q1. a) Calculate the discrete Fourier transform (DFT) for the signal 𝑥[𝑛] = [4 3 2 1]
b) Calculate the fast Fourier transform (FFT) for the signal 𝑥[𝑛] = [4 3 2 1]

a)
𝑁−1 3
−𝑗(2𝜋/𝑁)𝑘𝑛
𝑋[𝑘] = ∑ 𝑥[𝑛]𝑒 = ∑ 𝑥[𝑛]𝑒 −𝑗(2𝜋/4)𝑘𝑛 = 4 + 3𝑒 −𝑗(𝜋/2)𝑘 + 2𝑒 −𝑗(𝜋/2)2𝑘 + 1𝑒 −𝑗(𝜋/2)3𝑘
𝑛=0 𝑛=0

𝑋[0] = 4 + 3𝑒 −𝑗(𝜋/2)0 + 2𝑒 −𝑗(𝜋)0 + 1𝑒 −𝑗(3𝜋/2)0 = 4 + 3 + 2 + 1 = 10

𝑋[1] = 4 + 3𝑒 −𝑗(𝜋/2)1 + 2𝑒 −𝑗(𝜋)1 + 1𝑒 −𝑗(3𝜋/2)1 = 4 + 3(−𝑗) + 2(−1) + 1(𝑗) = 2 − 2𝑗

𝑋[2] = 4 + 3𝑒 −𝑗(𝜋/2)2 + 2𝑒 −𝑗(𝜋)2 + 1𝑒 −𝑗(3𝜋/2)2 = 4 + 3(−1) + 2(1) + 1(−1) = 2

𝑋[3] = 4 + 3𝑒 −𝑗(𝜋/2)3 + 2𝑒 −𝑗(𝜋)3 + 1𝑒 −𝑗(3𝜋/2)3 = 4 + 3(𝑗) + 2(−1) + 1(−𝑗) = 2 + 2𝑗

b)

𝑥𝑒 [𝑛] = [4 2] , 𝑥𝑜 [𝑛] = [3 1]

⇒ 𝑋𝑒 [𝑘] = [4 + 2 4 − 2] = [6 2] , 𝑋𝑜 [𝑘] = [3 + 1 3 − 1] = [4 2]

𝑋[𝑘] = 𝑋𝑒 [𝑘] + 𝑊4𝑘 𝑋𝑜 [𝑘] , 𝑘 = 0,1


𝑋[𝑘 + 2] = 𝑋𝑒 [𝑘] − 𝑊4𝑘 𝑋𝑜 [𝑘], 𝑘 = 0,1

𝑋[0] = 6 + 𝑒 −𝑗(2𝜋/4)0 (4) = 6 + 4 = 10


2𝜋
𝑋[1] = 2 + 𝑒 −𝑗( 4 )1 (2) = 2 − 2𝑗
2𝜋
𝑋[2] = 6 − 𝑒 −𝑗( 4 )0 (4) = 6 − 4 = 2
2𝜋
𝑋[3] = 2 − 𝑒 −𝑗( 4 )1 (2) = 2 − (−2𝑗) = 2 + 2𝑗
Q2. For the system given below, SA corresponds to a zero insertion system that inserts one zero after every input
sample (i.e., 2↑), 𝐻(𝑒 𝑗Ω ) is an ideal low-pass filter with gain 1, and SB corresponds to a decimation system that
extracts every sixth sample of its input (i.e., 6↓).
a) What should be the cut-off frequency of 𝐻(𝑒 𝑗Ω ) to prevent aliasing? Show your calculation or explain your
reasoning.
b) Sketch 𝑇(𝑒𝑗Ω ), 𝑊(𝑒𝑗Ω ) and 𝑌(𝑒𝑗Ω ) based on the input signal’s frequency response provided below, and the cut-
off frequency determined on the previous step.

x[n] 𝑆𝐴 𝐻(𝑒 𝑗Ω ) 𝑆𝐵 y[n]


t [n] w[n]

𝑋(𝑒 𝑗Ω )
… 1 …

-π/2 π Ω
-π −𝜋/2 𝜋/2 3𝜋/2 2π 5𝜋/2

a) The signal’s maximum frequency component is at teh frequency 𝜋/2. After the upsampling, it will be at
𝜋/4. If the filter does not cut out any frequency components out of this, after the downsampling the
maximum frequency component will be at 6𝜋/4, which will cause aliasing. In order to prevent aliasing, the
maximum frequency component should be limited to 𝜋 after downsampling, so the filter’s cut-off
frequency should be 𝜋/6.

b)

𝑇(𝑒 𝑗Ω )
… 1 …

−𝜋/4 𝜋 𝜋/4 3𝜋/4 𝜋π 5𝜋/4 7𝜋/4 2𝜋 9𝜋/4 Ω


𝑊(𝑒 𝑗Ω )
… 1 …

−𝜋/6 𝜋 𝜋/6 π𝜋 2𝜋 Ω

𝑌(𝑒 𝑗Ω )
… …

1/6

π𝜋 Ω
-π 2𝜋
Q3. A stable system has the LCCDE representation given by:
𝑦[𝑛] − 1.5𝑦[𝑛 − 1] − 𝑦[𝑛 − 2] = 3𝑥[𝑛] − 𝑥[𝑛 − 1]

a) Draw the block diagram of the system


b) Determine the transfer function of the system
c) Draw the pole-zero graph, and determine the ROC
d) Derive the impulse response of the system

a)
x[n] 3 y[n]
+ +

z-1 z-1
-1 1.5
+ +

z-1
1

b)
𝑌(𝑧) − 1.5𝑧 −1 𝑌(𝑧) − 𝑧 −2 𝑌(𝑧) = 3𝑋(𝑧) − 𝑧 −1 𝑋(𝑧)

𝑌(𝑧) 3 − 𝑧 −1 3 − 𝑧 −1 2 1
𝐻(𝑧) = = −1 −2
= −1 −1
= −1
+
𝑋(𝑧) 1 − 1.5𝑧 − 𝑧 (1 − 2𝑧 )(1 + 0.5𝑧 ) 1 − 2𝑧 1 + 0.5𝑧 −1

c)
3 − 𝑧 −1 3𝑧(𝑧 − 1/3)
𝐻(𝑧) = =
(1 − 2𝑧 −1 )(1 + 0.5𝑧 −1 ) (𝑧 − 2)(𝑧 + 0.5)
Poles: - 0.5, 2
Zeros: 0, 1/3

Unit circle

The system is stable, therefore ROC should include the unit circle ⇒ 𝑅𝑂𝐶 ∶ 0.5 < |𝑧| < 2

d) Based on ROC and the transfer function,

ℎ[𝑛] = −2(2)𝑛 𝑢[−𝑛 − 1] + (−0.5)𝑛 𝑢[𝑛]


Q4. Roughly draw the amplitude responses |𝐻(𝑒𝑗Ω )| for the following filters with the pole-zero positions given
below. Make sure that your drawings are consistent / compatible with each other.

a) Poles: - 0.8 , Zeros: 1

b) Poles: 0.8 , Zeros: -1

c) Poles: - 0.8 , Zeros: - 1

d) Poles: 0.8 𝑒𝑗𝜋/6 , 0.8 𝑒−𝑗𝜋/6 , Zeros: 1, -1

a) b)

c) d)
MEH329 Digital Signal Processing
Final Exam
2018 / 2019 Fall – 2.Ö.
11.01.2019

Student Name : 1 2 3 4 Total


Student Number : (30p) (20p) (30p) (20p)
Signature :

Time: 85min
 This is a closed books / notes exam.
 Calculators are not allowed.
 Additional / extra answer sheets are not allowed.

Q1. a) Calculate the fast Fourier transform (FFT) for the signal 𝑥[𝑛] = [1 4 3 2]
b) Calculate the inverse discrete Fourier transform (IDFT) for the signal 𝑥[𝑛] = [10 2 − 2𝑗 2 2 + 2𝑗]

a)

𝑥𝑒 [𝑛] = [1 3] , 𝑥𝑜 [𝑛] = [4 2]

⇒ 𝑋𝑒 [𝑘] = [1 + 3 1 − 3] = [4 − 2] , 𝑋𝑜 [𝑘] = [4 + 2 4 − 2] = [6 2]

𝑋[𝑘] = 𝑋𝑒 [𝑘] + 𝑊4𝑘 𝑋𝑜 [𝑘] , 𝑘 = 0,1


𝑋[𝑘 + 2] = 𝑋𝑒 [𝑘] − 𝑊4𝑘 𝑋𝑜 [𝑘], 𝑘 = 0,1

𝑋[0] = 4 + 𝑒 −𝑗(2𝜋/4)0 (6) = 4 + 6 = 10


2𝜋
𝑋[1] = −2 + 𝑒 −𝑗( 4 )1 (2) = −2 − 2𝑗
2𝜋
𝑋[2] = 4 − 𝑒 −𝑗( 4 )0 (6) = 4 − 6 = −2
2𝜋
𝑋[3] = −2 − 𝑒 −𝑗( 4 )1 (2) = −2 − (−2𝑗) = −2 + 2𝑗

b)
𝑁−1 3
1 1
𝑥[𝑛] = ∑ 𝑋[𝑘]𝑒 𝑗(2𝜋/𝑁)𝑘𝑛 = ∑ 𝑋[𝑘]𝑒 𝑗(2𝜋/4)𝑘𝑛
𝑁 4
𝑘=0 𝑘=0
1
= (10 + (2 − 2𝑗)𝑒 𝑗(𝜋/2)𝑛 + 2𝑒 −𝑗(𝜋/2)2𝑛 + (2 + 2𝑗)𝑒 𝑗(𝜋/2)3𝑛 )
4
1 1
𝑥[0] = (10 + (2 − 2𝑗)𝑒 𝑗(𝜋/2)0 + 2𝑒 −𝑗(𝜋)0 + (2 + 2𝑗)𝑒 𝑗(3𝜋/2)0 ) = (10 + (2 − 2𝑗) + 2 + (2 + 2𝑗))
4 4
=4
1
𝑥[1] = (10 + (2 − 2𝑗)𝑒 𝑗(𝜋/2)1 + 2𝑒 −𝑗(𝜋)1 + (2 + 2𝑗)𝑒 𝑗(3𝜋/2)1 )
4
1
= (10 + (2 − 2𝑗)(𝑗) + 2(−1) + (2 + 2𝑗)(−𝑗)) = 3
4
1
𝑥[2] = (10 + (2 − 2𝑗)𝑒 𝑗(𝜋/2)2 + 2𝑒 −𝑗(𝜋)2 + (2 + 2𝑗)𝑒 𝑗(3𝜋/2)2 )
4
1
= (10 + (2 − 2𝑗)(−1) + 2(1) + (2 + 2𝑗)(−1)) = 2
4
1
𝑥[3] = (10 + (2 − 2𝑗)𝑒 𝑗(𝜋/2)3 + 2𝑒 −𝑗(𝜋)3 + (2 + 2𝑗)𝑒 𝑗(3𝜋/2)3 )
4
1
= (10 + (2 − 2𝑗)(−𝑗) + 2(−1) + (2 + 2𝑗)(𝑗)) = 1
4
Q2. For the system given below, SA corresponds to a zero insertion system that inserts one zero after every input
sample (i.e., 2↑), 𝐻(𝑒 𝑗Ω ) is an ideal low-pass filter with gain 1, and SB corresponds to a decimation system that
extracts every fifth sample of its input (i.e., 5↓).
a) What should be the cut-off frequency of 𝐻(𝑒 𝑗Ω ) to prevent aliasing? Show your calculation or explain your
reasoning.
b) Sketch 𝑇(𝑒𝑗Ω ), 𝑊(𝑒𝑗Ω ) and 𝑌(𝑒𝑗Ω ) based on the input signal’s frequency response provided below, and the cut-
off frequency determined on the previous step.

x[n] 𝑆𝐴 𝐻(𝑒 𝑗Ω ) 𝑆𝐵 y[n]


t [n] w[n]

𝑋(𝑒 𝑗Ω )
… 1 …

-π/2 π Ω
-π −𝜋/2 𝜋/2 3𝜋/2 2π 5𝜋/2

a) The signal’s maximum frequency component is at the frequency 𝜋/2. After the upsampling, it will be at
𝜋/4. If the filter does not cut out any frequency components out of this, after the downsampling the
maximum frequency component will be at 5𝜋/4, which will cause aliasing. In order to prevent aliasing, the
maximum frequency component should be limited to 𝜋 after downsampling, so the filter’s cut-off
frequency should be 𝜋/5.

b)

𝑇(𝑒 𝑗Ω )
… 1 …

−𝜋/4 𝜋 𝜋/4 3𝜋/4 𝜋π 5𝜋/4 7𝜋/4 2𝜋 9𝜋/4 Ω


𝑊(𝑒 𝑗Ω )
… 1 …

−𝜋/5 𝜋 𝜋/5 π𝜋 2𝜋 Ω

𝑌(𝑒 𝑗Ω )
… …

1/5

π𝜋 Ω
-π 2𝜋
Q3. A causal LTI system has the impulse response ℎ[𝑛] = 2((0.5)𝑛 + (−0.25)𝑛 )𝑢[𝑛]

a) Determine the transfer function of the system. Show your calculations!


b) Draw the pole-zero graph, and determine the ROC
c) Determine the LCCDE representation of the system
d) Draw the block diagram of the system

a)
∞ ∞ ∞

𝐻(𝑧) = ∑ ℎ[𝑛]𝑧 −𝑛 = 2 ∑ (0.5)𝑛 𝑢[𝑛]𝑧 −𝑛 + 2 ∑ (−0.25)𝑛 𝑢[𝑛]𝑧 −𝑛


𝑛=−∞ 𝑛=−∞ 𝑛=−∞

∞ ∞
−1 )𝑛
0 − (0.5𝑧 −1 )0 0 − (0.25𝑧 −1 )0
= 2 ∑(0.5𝑧 + 2 ∑(−0.25𝑧 −1 )𝑛 = 2 + 2 ,
(0.5𝑧 −1 ) − 1 (−0.25𝑧 −1 ) − 1
𝑛=0 𝑛=0

𝑖𝑓 |0.5𝑧 −1 | < 1 𝑎𝑛𝑑 |−0.25𝑧 −1 | < 1

1 1 4 − 0.5𝑧 −1 (4𝑧)(𝑧 − 0.125)


=2 + 2 = =
1 − 0.5𝑧 −1 1 + 0.25𝑧 −1 (1 − 0.5𝑧 −1 )(1 + 0.25𝑧 −1 ) (𝑧 − 0.5)(𝑧 + 0.25)

b)
Poles: 0.5, - 0.25
Zeros: 0, 0.125

Unit circle

The system is causal, therefore ROC is outside of the outermost pole ⇒ 𝑅𝑂𝐶 ∶ |𝑧| > 0.5
Note that this is also evident from the calculations for the transfer function

c)
𝑌(𝑧)(1 − 0.25𝑧 −1 − 0.125𝑧 −2 ) = 𝑋(𝑧)(4 − 0.5𝑧 −1 )

𝑦[𝑛] − 0.25𝑦[𝑛 − 1] − 0.125𝑦[𝑛 − 2] = 4𝑥[𝑛] − 0.5𝑥[𝑛 − 1]


d)

x[n] 4 y[n]
+ +

z-1 z-1
-0.5 0.25
+

z-1
0.125
Q4. Design a second-order filter using pole-zero placement that satisfies the following requirements:
- The filter should be causal and stable
- |𝐻(𝑒𝑗Ω )| = 0 at Ω = 0 and Ω = 𝜋
- Maximum |𝐻(𝑒𝑗Ω )| is obtained at Ω = 𝜋/3
a) Determine the pole and zero locations and draw the pole-zero graph
b) Roughly draw the the magnitude response |𝐻(𝑒𝑗Ω )|

The filter has to be causal and stable, therefore all the poles should be inside the unit circle.
|𝐻(𝑒𝑗Ω )| = 0 at Ω = 0 and Ω = 𝜋 means that there are two zeros located at 𝑧 = 𝑒𝑗0 = 1 and 𝑧 = 𝑒𝑗𝜋 = −1
𝑗𝜋/3
Maximum |𝐻(𝑒𝑗Ω )| is obtained at Ω = 𝜋/3, therefore the two poles should be located at 𝑧 = 𝑑𝑒 , where 𝑑 < 1
−𝑗𝜋/3
for the causal and stable system, and its complex conjugate 𝑧 = 𝑑𝑒

A possible pole – zero placement is:


Zeros: -1, +1
Poles: 0.8𝑒𝑗𝜋/3 , 0.8𝑒−𝑗𝜋/3

|𝐻(𝑒𝑗Ω )|:
MEH329 Digital Signal Processing
Final Exam
2017 / 2018 Fall – 1.Ö.
23.12.2017

Student Name : 1 2 3 4 5 Total


Student Number : (20p) (30p) (25p) (10p) (15p)
Signature :

Time: 85min
 This is a closed books / notes exam.
 Calculators are not allowed.
 Additional / extra answer sheets are not allowed.

Q1. Roughly draw the amplitude responses |𝐻(𝑒𝑗Ω )| for the following filters with the pole-zero positions given
below. Make sure that your drawings are consistent / compatible with each other. (20p)

a) Poles: 0.9 , Zeros: -1

b) Poles: −0.5 , Zeros: 1

c) Poles: −0.5 , −0.4 + 𝑗0.3 , −0.4 − 𝑗0.3 , Zeros: 1, 1, 1

d) Poles: −𝑗0.9 , +𝑗0.9 , Zeros: -1, 1

a) b)

c) d)
Q2. For the system given below, SA corresponds to a zero insertion system that inserts one zero after every input
sample (i.e., 2↑), 𝐻(𝑒 𝑗Ω ) is an ideal low-pass filter with cut-off frequency 𝜋/2 and gain 1, and SB corresponds to a
decimation system that extracts every fourth sample of its input (i.e., 4↓).
a) Sketch 𝑇(𝑒𝑗Ω ), 𝑊(𝑒𝑗Ω ) and 𝑌(𝑒𝑗Ω ), based on the input signal’s frequency response provided below. (15p)
b) Take four equidistant samples at frequencies Ω = (2𝜋/4)𝑘 from 𝑌(𝑒𝑗Ω ) and calculate the inverse discrete Fourier
transform (inverse DFT - IDFT) (not inverse DTFT!) to obtain a pseudo version of y[n] (15p)

x[n] 𝑆𝐴 𝐻(𝑒 𝑗Ω ) 𝑆𝐵 y[n]


t[n] w[n]

𝑋(𝑒 𝑗Ω )
… 1 …

π Ω
-π -π/2
−𝜋/2 𝜋/2 3𝜋/2 2π 5𝜋/2

𝑇(𝑒 𝑗Ω )
… 1 …

−𝜋/4 𝜋 𝜋/4 3𝜋/4 𝜋π 5𝜋/4 7𝜋/4 2𝜋 9𝜋/4 Ω


𝑊(𝑒 𝑗Ω )
… 1 …

−𝜋/4 𝜋 𝜋/4 3𝜋/4 𝜋π 5𝜋/4 7𝜋/4 2𝜋 9𝜋/4 Ω


𝑌(𝑒 𝑗Ω )
… …
1/4

−𝜋/4 𝜋 𝜋/4 3𝜋/4 𝜋π 5𝜋/4 7𝜋/4 2𝜋 9𝜋/4 Ω


𝑌[𝑘] = [𝑌(𝑒 𝑗0 ) 𝑌(𝑒 𝑗2𝜋/4 ) 𝑌(𝑒 𝑗4𝜋/4 ) 𝑌(𝑒 𝑗6𝜋/4 )] = [1⁄4 1⁄8 0 1⁄8]

𝑁−1 3
1 2𝜋
𝑗( )𝑘𝑛 1 2𝜋
𝑗( )𝑘𝑛 1 1 𝑗(2𝜋)0𝑛 1 𝑗(2𝜋)1𝑛 2𝜋
𝑗( )2𝑛 1 𝑗(2𝜋)3𝑛
𝑦[𝑛] = ∑ 𝑌[𝑘]𝑒 𝑁 = ∑ 𝑌[𝑘]𝑒 4 = ( 𝑒 4 + 𝑒 4 +0𝑒 4 + 𝑒 4 )
𝑁 4 4 4 8 8
𝑘=0 𝑘=0

3
1 1 1 1 1 1
𝑦[0] = ∑ 𝑌[𝑘] = ( + + 0 + ) =
4 4 4 8 8 8
𝑘=0
3
1 2𝜋
𝑗( )𝑘1 1 1 1 1 1
𝑦[1] = ∑ 𝑌[𝑘]𝑒 4 = ( + (𝑗) + 0 + (−𝑗)) =
4 4 4 8 8 16
𝑘=0

3
1 2𝜋
𝑗( )𝑘2 1 1 1 1
𝑦[2] = ∑ 𝑌[𝑘]𝑒 4 = ( + (−1) + 0 + (−1)) = 0
4 4 4 8 8
𝑘=0

3
1 2𝜋
𝑗( )𝑘3 1 1 1 1 1
𝑦[3] = ∑ 𝑌[𝑘]𝑒 4 = ( + (−𝑗) + 0 + (𝑗)) =
4 4 4 8 8 16
𝑘=0
Q3
x[n] y[n]
+ +

z-1 z-1
Block diagram of a causal system is given on the left. For this
-5/2 5/4
+ + system;

z-1 z-1
1 -1/4

Q3a. Determine the linear constant coefficient difference equation (LCCDE).


(10p)

Q3b. Draw the roots and ROC and Find H(𝑒 𝑗𝛺 ).


(10p)

Q3c. Is this system stable?


(5p)
ROC: |𝑧| > 1 => Unstable
Q4. Let 𝑥[𝑛] = {𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 } be a 4-point sequence and 𝑋[𝑘] = {𝑋0 , 𝑋1 , 𝑋2 , 𝑋3 } be its 4-point DFT. Find a 4-point
IDFT of 𝑌[𝑘] = {𝑋0 , −𝑗𝑋1 , −𝑋2 , 𝑗𝑋3 } in terms of x[n] .

Q5 Calculate the fast Fourier transform (FFT) 𝑋[𝑘] for the sequence x[n] = u[n] - u[n-4] by time decimation (15p)
MEH329 Digital Signal Processing
Final Exam
2017 / 2018 Fall – 2.Ö.
23.12.2017

Student Name : 1 2 3 4 5 Total


Student Number : (20p) (30p) (25p) (10p) (15p)
Signature :

Time: 85min
 This is a closed books / notes exam.
 Calculators are not allowed.
 Additional / extra answer sheets are not allowed.

Q1. a) Calculate the discrete Fourier transform (DFT) for the signal 𝑥[𝑛] = [2 2 0 1]
b) Calculate the fast Fourier transform (FFT) for the signal 𝑥[𝑛] = [2 2 0 1] using either time-decimation or
frequency-decimation.

a)
𝑁−1 3
−𝑗(2𝜋/𝑁)𝑘𝑛
𝑋[𝑘] = ∑ 𝑥[𝑛]𝑒 = ∑ 𝑥[𝑛]𝑒 −𝑗(2𝜋/4)𝑘𝑛 = 2 + 2𝑒 −𝑗(𝜋/2)𝑘 + 0 + 1𝑒 −𝑗(3𝜋/2)𝑘
𝑛=0 𝑛=0

𝑋[0] = 2 + 2𝑒 −𝑗(𝜋/2)0 + 0 + 1𝑒 −𝑗(3𝜋/2)0 = 2 + 2 + 0 + 1 = 5

𝑋[1] = 2 + 2𝑒 −𝑗(𝜋/2)1 + 0 + 1𝑒 −𝑗(3𝜋/2)1 = 2 + 2(−𝑗) + 0 + 1(𝑗) = 2 − 𝑗

𝑋[2] = 2 + 2𝑒 −𝑗(𝜋/2)2 + 0 + 1𝑒 −𝑗(3𝜋/2)2 = 2 + 2(−1) + 0 + 1(−1) = −1

𝑋[3] = 2 + 2𝑒 −𝑗(𝜋/2)3 + 0 + 1𝑒 −𝑗(3𝜋/2)3 = 2 + 2(𝑗) + 0 + 1(−𝑗) = 2 + 𝑗

b)

𝑥𝑒 [𝑛] = [2 0] , 𝑥𝑜 [𝑛] = [2 1]

⇒ 𝑋𝑒 [𝑘] = [2 + 0 2 − 0] = [2 2] , 𝑋𝑜 [𝑘] = [2 + 1 2 − 1] = [3 1]

𝑋[𝑘] = 𝑋𝑒 [𝑘] + 𝑊4𝑘 𝑋𝑜 [𝑘] , 𝑘 = 0,1


𝑋[𝑘 + 2] = 𝑋𝑒 [𝑘] − 𝑊4𝑘 𝑋𝑜 [𝑘], 𝑘 = 0,1

𝑋[0] = 2 + 𝑒 −𝑗(2𝜋/4)0 (3) = 2 + 3 = 5


2𝜋
𝑋[1] = 2 + 𝑒 −𝑗( 4 )1 (1) = 2 − 𝑗
2𝜋
𝑋[2] = 2 − 𝑒 −𝑗( 4 )0 (3) = 2 − 3 = −1
2𝜋
𝑋[3] = 2 − 𝑒 −𝑗( 4 )1 (1) = 2 − (−𝑗) = 2 + 𝑗
Q2. A stable system has the LCCDE representation given by:
𝑦[𝑛] − 2.25𝑦[𝑛 − 1] + 0.5𝑦[𝑛 − 2] = 2.25𝑥[𝑛] − 𝑥[𝑛 − 1]

a) Determine the transfer function of the system (10)


b) Draw the zero-pole graph, and determine the ROC (10)
c) Derive the impulse response of the system (5)
d) Determine the frequency response of the system, if possible. If it is not possible, explain the reason. (5)

a)
𝑌(𝑧) − 2.25𝑧 −1 𝑌(𝑧) + 0.5𝑧 −2 𝑌(𝑧) = 2.25𝑋(𝑧) − 𝑧 −1 𝑋(𝑧)

𝑌(𝑧) 2.25 − 𝑧 −1 2.25 − 𝑧 −1 2 0.25


𝐻(𝑧) = = −1 −2
= −1 −1
= −1
+
𝑋(𝑧) 1 − 2.25𝑧 + 0.5𝑧 (1 − 2𝑧 )(1 − 0.25𝑧 ) 1 − 2𝑧 1 − 0.25𝑧 −1

b)
2.25 − 𝑧 −1 2.25𝑧(𝑧 − 1/2.25)
𝐻(𝑧) = −1 −1
=
(1 − 2𝑧 )(1 − 0.25𝑧 ) (𝑧 − 2)(𝑧 − 0.25)

Poles: 0.25, 2
Zeros: 0, 1/2.25

Unit circle

The system is stable, as stated in the question, therefore ROC should include the unit circle

⇒ 𝑅𝑂𝐶 ∶ 0.25 < |𝑧| < 2

c) Based on ROC and the transfer function,

ℎ[𝑛] = −2(2)𝑛 𝑢[−𝑛 − 1] + 0.25(0.25)𝑛 𝑢[𝑛]

= −(2)𝑛+1 𝑢[−𝑛 − 1] + (0.25)𝑛+1 𝑢[𝑛]

d) The system is stable,

𝑗Ω
2.25 − 𝑒 −𝑗Ω
𝐻(𝑒 ) =
1 − 2.25𝑒 −𝑗Ω + 0.5𝑒 −𝑗Ω
Q3 A block diagram of a causal LTI system is depicted. x[n] y[n]
For this system;
z-1
0.6 -1

z-1
-0.08

Q3a. Determine the linear constant coefficient difference equation (LCCDE).


(10p)

𝑦[𝑛] − 2.5𝑦[𝑛 − 1] + 𝑦[𝑛 − 2] = 𝑥[𝑛] − 𝑥[𝑛 − 2]

Q3b. Check the stability in a bounded input-bounded output (BIBO) sense.


(10p)

Q3c. Determine the magnitude response at    / 2 .


(5p)
Q4 Design a second-order filter using pole-zero placement that satisfies the following requirements: (10p)
1) the magnitude response is 0, at 𝑤1 = 0 and 𝑤2 = 𝜋 and ;
2) the maximum magnitude is obtained at 𝑤3 = 𝜋/4
Determine the locations of poles and zeros of the required filter and then compute its system function H(z).

Q5. In the figure, SA corresponds to a zero insertion system that inserts one zero after every input sample
(i.e., 2↑) and SB corresponds to a decimation system that extracts every second sample of its input (i.e., 2↓).
𝐻(𝑒 𝑗𝑤 ) is an ideal low-pass filter with cut-off frequency 𝜋/8. (15p)

x[n] 𝑆𝐴 𝐻(𝑒 𝑗𝑤 ) 𝑆𝐵 y[n]


t[n] w[n]

Plot 𝑇(𝑒 𝑗𝑤 ), 𝑊(𝑒 𝑗𝑤 ) and 𝑌(𝑒 𝑗𝑤 ) when the input, 𝑋(𝑒 𝑗𝑤 ), is shown as in the figure;

X(ejw)
1

-π -π/2 π/2 π w
Type equation here.
MEH329 Digital Signal Processing
Final Exam Solutions
2012/2013 Fall
10.01.2013
Student Number : 1 (35p) 2 (35p) 3 (40p) Total
Signature :
Time: 85min
Q1
Q1a. Explain both advantage and disadvantage of finite impulse response (FIR) systems over infinite impulse response (IIR)
(5p) systems.

Advantage: Guranteed to be stable.


Disadvantage: Larger length of filter (more computation)

Q1b. Explain the relationship between DTFT, DFT and Z-transform.


(10p)
X  e j   X  z  z e j
X  k   X  e j  2
 k
N

1 ,    / 2
Q1c. Consider the system given in the figure below. The frequency response is given by H e    0
j
.
(10p) 
 , otherwise

Find the output y  n  for the input sequences (assume M=N=2):

 
sin  n 
   3  8 
i) x  n   cos  n  , ii) x  n   cos  n , iii) x  n  
4   4  n

 
sin  n 
1   1   1 8 
i) y  n  cos  n  , ii) y  n  cos  n  , iii) x  n  
2 4  2 4  2 n
Q1d.
(10p)
Assume M=3 and N=2 is given for this system. Plot the spectrum of upsampler output and Y e   for the input signal
j

whose spectrum given below.


Q2

A block diagram of a causal LTI system is depicted above. For this system;

Q2a. Determine the linear constant coefficient difference equation (LCCDE) which specifies this system.
(5p)
3 1
y  n  y  n  1  y  n  2  x  n  x  n  2
2 2

Q2b. Check the stability in a bounded input-bounded output (BIBO) sense.


(10p)
 3 1 1 2 
1  z  z  Y  z   1  z  X  z 
2

 2 2 

H  z 
1  z 2

1  z 1 1  z 1   1  z 1
1  z 1  z 2 1  z 1  1  z 1  1  z 1
3 1 1 1
2 2  2  2
The pole z=1/2 is inside the unit circle. Therefore, given causal system is stable in a BIBO sense.

Find the output of the system for the input x  n   1 u  n and initial condition y  1  1 and y  2  1 .
Q2c. n
(10p)
Q2d.   j  1   j  1 
(10p) 1  1  2  z 1  1  2  z 
H  z         Draw direct form-I and direct form-II structure of the system.
1  j 1  j 1 
1  1  j  z  1  1  j  z  1  2 z 
1
1 z 
 2 
5
1  2 z 1  z 2
H z  4
1 9 2 1 3 1 4
1  2z  z  z  z
4 2 2
Q3 Consider the discrete-time sequence x  n  1 3 2 1
Q3a. Find 4-point DFT coefficients X  k  .
(10p)
X  k   7, 1  j 2, 1, 1  j 2


Find the finite-length sequence y  n  whose 4-point DFT is Y  k   e X k  .
j k
2
Q3b.
(15p)

 X  k / 2 , k is even

Q3c. Find the finite-length sequence z  n  whose 8-point DFT is Z  k    .
(15p) 
 0 , k is odd

Convolution:

 X  e e
 1
DTFT and Inverse DTFT: X e j     x  n e  jn , x  n  j jn
d
n  2 

Assist.Prof.Dr. M. Kemal GÜLLÜ

You might also like