Confidential: Final Examination Semester Ii SESSION 2014/2015 (Solution)

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

CONFIDENTIAL

FINAL EXAMINATION SEMESTER II


SESSION 2014/2015
(SOLUTION)

COURSE CODE : SKEL4223

COURSE NAME : DIGITAL SIGNAL PROCESSING

LECTURER : P.M. DR. SYED ABD. RAHMAN B. SYED ABU BAKAR

DR. KHAIRUL HAMIMAH BT ABAS

DR. NOR AINI BT ZAKARIA

PROGRAMME : SKEL, SKEM

SECTION : 01, 02, 03

TIME : 2.5 HOURS

DATE :

INSTRUCTION TO CANDIDATE :
PART A: Answer all questions.
PART B: Answer two (2) questions only.
*NOTES ON TWO(2) PIECES OF A4 PAPERS ARE ALLOWED
*CALCULATORS ARE ALLOWED

THIS SOLUTION BOOKLET CONSISTS OF 13 PAGES INCLUDING THE FRONT COVER


PART A : ANSWER ALL QUESTIONS
2
SKEL4223

QUESTION 1

a) Given the sinusoid signal 𝑥(𝑡) = 5 cos(200𝜋𝑡) + 2 cos(100𝜋𝑡). Determine whether


aliasing will occur or not for a given sampling frequency 𝑓𝑠 as below. Justify your answer.
i) 𝑓𝑠 = 500𝐻𝑧
ii) 𝑓𝑠 = 200𝐻𝑧
[5 marks]
Solution:
To avoid aliasing, 𝑓𝑠 ≥ 2𝑓𝑚𝑎𝑥 = 2(100) = 200𝐻𝑧. Thus;
i) No aliasing
ii) No aliasing

b) Let 𝑥[𝑛] = 2𝑛 𝑢[𝑛] − (1 + 2𝑛 )𝑢[𝑛 − 4] + 𝑢[𝑛 − 6]. Sketch and label the signal
𝑥[3 − 𝑛].
[5 marks]
Solution:
𝑥[𝑛] 𝑥[3 − 𝑛]
8 8

4 4

2 2

1 1
-2 -1
4 5 𝑛
𝑛 1 2 3
0 1 2 3

-1 -1 -1
-1
3
SKEL4223

c) Define the following:


i) Linear and time invariant system [3 marks]
ii) FIR system [1 mark]
iii) IIR system [1 mark]

Solution:
i) LTI system is a system that are both linear and time-invariant. Let 𝑥1 [𝑛] and
𝑥2 [𝑛] be any two input signals to a system and their outputs are 𝑦1 [𝑛] and 𝑦2 [𝑛]
respectively. If 𝛼1 𝑥1 [𝑛] + 𝛼2 𝑥2 [𝑛] corresponds to 𝛼1 𝑦1 [𝑛] + 𝛼2 𝑦2 [𝑛], then the
system is linear. A system is said to be time invariant if when 𝑦[𝑛] is the output
that corresponds to 𝑥[𝑛], then for any 𝜏 , 𝑦[𝑛 − 𝜏] is the output that corresponds
to 𝑥[𝑛 − 𝜏].
ii) FIR system a system with finite length of impulse response
iii) IIR will have an infinite impulse response.

d) Let signal 𝑦[𝑛] − 2𝑛𝑦[𝑛 − 1] = 𝑥[𝑛]. Mathematically, prove whether the system is an
LTI system or not.
[5 marks]
Solution:
The system is linear as 𝑦𝑎 [𝑛] = 𝑦𝑏 [𝑛] as below
𝑦𝑎 [𝑛] − 2𝑛𝑦𝑎 [𝑛 − 1] = (𝑥1 [𝑛] + 𝑥2 [𝑛])
𝑦𝑏 [𝑛] − 2𝑛𝑦𝑏 [𝑛 − 1] = 𝑥1 [𝑛] + 𝑥2 [𝑛]

The system is not time-invariant because any delay 𝜏 applied to 𝑥[𝑛 − 𝜏] does not
corresponds to output 𝑦[𝑛 − 𝜏] as shown below
Delay at the input → 𝑦[𝑛] − 2𝑛𝑦[𝑛 − 1] = 𝑥[𝑛 − 𝜏]
Delay at the output → 𝑦[𝑛 − 𝜏] − 2(𝑛 − 𝜏)𝑦[𝑛 − 𝜏 − 1] = 𝑥[𝑛 − 𝜏]

Thus, the system is not an LTI system.


4
SKEL4223

e) Sketch the ROC for each of the signal below:


i)

[2 marks]
ii)

[3 marks]
Solution:
i) Im ii) Im

ȁ𝑧ȁ < 𝛼
𝛼1 < ȁ𝑧ȁ < 𝛼2
α 𝛼1
= 𝜋𝑟 2
Re Re
𝜶𝟐

f) A system is described by a difference equation as 𝑦[𝑛] − 0.8𝑦[𝑛 − 1] = 𝑥[𝑛]. Find


the transfer function, 𝐻(𝑧) of the system and its impulse response ℎ[𝑛].
[5 marks]
Solution:
𝑦[𝑛] − 0.8𝑦[𝑛 − 1] = 𝑥[𝑛]
𝑌(𝑧) − 0.8𝑧 −1 𝑌(𝑧) = 𝑋(𝑧)
𝑌(𝑧)(1 − 0.8𝑧 −1 ) = 𝑋(𝑧)

𝑌(𝑧) 1
𝐻(𝑧) = =
𝑋(𝑧) 1 − 0.8𝑧 −1
ℎ[𝑛] = 0.8𝑛 𝑢[𝑛]
5
SKEL4223

g) The input 𝑋(𝜔) is applied to the system, 𝐻(𝜔), as shown in Figure 1. Given 𝑋(𝜔) and
𝐻(𝜔) as follows;
𝑋(𝜔) = 1 + 𝑒 −𝑗𝜔 + 𝑒 −𝑗2𝜔
𝐻(𝜔) = 𝑒 −𝑗𝜔 + 2𝑗𝑠𝑖𝑛(𝜔)

Determine the magnitude response, ȁ𝑌(𝜔)ȁ. Give your answer in trigonometric terms.

𝑋 (𝜔) 𝑌 (𝜔)
𝐻 (𝜔)

Figure 1. System, 𝐻(𝜔)


[5 marks]
Solution:
𝑌(𝜔) = 𝐻(𝜔). 𝑋(𝜔)

= (2𝑗 𝑠𝑖𝑛 (𝜔) + 𝑒 −𝑗𝜔 )(1 + 𝑒 −𝑗𝜔 + 𝑒 −𝑗2𝜔 )

𝑒 𝑗𝜔 − 𝑒 −𝑗𝜔
= (2𝑗 ( ) + 𝑒 −𝑗𝜔 ) (1 + 𝑒 −𝑗𝜔 + 𝑒 −𝑗2𝜔 )
2𝑗

= 𝑒 𝑗𝜔 + 1 + 𝑒 −𝑗𝜔

= 1 + 2𝑐𝑜𝑠 (𝜔)

ȁ𝑌(𝜔)ȁ = √(1 + 2 𝑐𝑜𝑠 (𝜔))2

h) An LTI system has an impulse response, ℎ[𝑛] = 2[𝑛 + 3] + 2[𝑛 − 3]. Determine the
magnitude response, ȁ𝐻(𝜔)ȁ using trigonometric terms.
[5 marks]
Solution:
𝐻(𝑧) = 2𝑧 3 + 2𝑧 −3
𝐻(𝑒 𝑗𝜔 ) = 2𝑒 𝑗3𝜔 + 2𝑒 −𝑗3𝜔
= 2 (𝑒 𝑗3𝜔 + 𝑒 −𝑗3𝜔 )
= 2 ( 2 𝑐𝑜𝑠(3𝜔))
= 4 𝑐𝑜𝑠(3𝜔)
ȁ𝐻(𝜔)ȁ = ȁ4 𝑐𝑜𝑠(3𝜔)ȁ
6
SKEL4223

i) Find the inverse DFT of 𝑋[𝑘] if 𝑋[𝑘] is described as 𝑋[𝑘] = [4 1 1]


[5 marks]
Solution:
1 𝑁−1 𝑗2𝜋𝑘𝑛
𝑥[𝑛] = ∑ 𝑋[𝑘]𝑒 𝑁
𝑁 𝑘=0

1 2 1
𝑥[0] = ∑ 𝑋[𝑘]𝑒 0 = (4 + 1 + 1) = 2
3 𝑘=0 3

1 2 𝑗2𝜋𝑘 1 𝑗2𝜋 𝑗4𝜋


𝑥[1] = ∑ 𝑋[𝑘]𝑒 3 = (4 + 𝑒 3 + 𝑒 3 ) = 1
3 𝑘=0 3

1 2 𝑗4𝜋𝑘 1 𝑗4𝜋 𝑗8𝜋


𝑥[2] = ∑ 𝑋[𝑘]𝑒 3 = (4 + 𝑒 3 + 𝑒 3 ) = 1
3 𝑘=0 3

j) If 𝐻() is to be sampled into 𝐻[𝑘], determine the number of sample 𝑁 if 𝐻(0.5) is to


be mapped to 𝐻[1].
[5 marks]
Solution:
𝜔 = 0.5𝜋, 𝑘 = 1

2𝜋𝑘
𝜔 =
𝑁
2𝜋
𝑁 = = 4
0.5𝜋
7
SKEL4223

PART B : ANSWER 2 (TWO) QUESTIONS ONLY.

QUESTION 2
Observe the following system function, 𝐻(𝑧), as given by the pole-zero plot in Figure 2.

0.8
0.5+0.7i
0.6

0.4
-0.8+0.3i
Imaginary Part

0.2

-0.2

-0.4
-0.8-0.3i

-0.6

-0.8 0.5-0.7i
-1

-1 -0.5 0 0.5 1
Real Part

Figure 2

a) Is the above system an FIR or IIR system? Justify your answer


[5 marks]
Solution:
This is an IIR because the existence of 2 poles

b) Obtained the system function expression 𝐻(𝑧)


[7 marks]
Solution:
1 − 𝑧 −1 + 0.74𝑧 −2
𝐻(𝑧) =
1 + 1.6𝑧 −1 + 0.73𝑧 −2

c) Obtained the difference equation for the above system.


[5 marks]
Solution:
𝑦[𝑛] = −1.6𝑦[𝑛 − 1] − 0.73𝑦[𝑛 − 2] + 𝑥[𝑛] − 𝑥[𝑛 − 1] + 0.74𝑥[𝑛 − 2]
8
SKEL4223

d) Sketch the magnitude spectrum of the above system. Describe what the system does.
[8 marks]
Solution:
First is to find the frequency location of the zeros and poles as follows:
0.7
Zeros: 𝜔 = tan−1 (0.5) = 0.3𝜋
0.3
Poles: 𝜔 = 1 − tan−1 (−0.8) = 0.9𝜋

Then, the magnitude in dB of ȁ𝐻(𝜔)ȁ𝑑𝐵 at both 𝜔 = 0.3𝜋 and 𝜔 = 0.9𝜋 are:


1−𝑒 −𝑗0.3𝜋 +0.74𝑒 −𝑗0.3𝜋
ȁ𝐻(0.3𝜋)ȁ𝑑𝐵 = 20 log10 | | = −21
1+1.6𝑒 −𝑗0.3𝜋 +0.73𝑒 −𝑗0.3𝜋

1−𝑒 −𝑗0.9𝜋 +0.74𝑒 −𝑗0.9𝜋


ȁ𝐻(0.9𝜋)ȁ𝑑𝐵 = 20 log10 | | = 28
1+1.6𝑒 −𝑗0.9𝜋 +0.73𝑒 −𝑗0.9𝜋

1−1+0.74
To have a proper sketch,compute also ȁ𝐻(0)ȁ𝑑𝐵 = 20 log10 |1+1.6+0.73| = −13 and
1−𝑒 −𝑗𝜋 +0.74𝑒 −𝑗𝜋
ȁ𝐻(𝜋)ȁ𝑑𝐵 = 20 log10 | | = 26.5 .
1+1.6𝑒 −𝑗𝜋 +0.73𝑒 −𝑗𝜋

Below is the sketch:

40

20
Magnitude (dB)

-20

-40
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)

This is a200high pass filter system.


Phase (degrees)

150

100

50

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
9
SKEL4223

QUESTION 3
A continuous signal 𝑥(𝑡) defined below is to be sampled into its digital signal 𝑥[𝑛].
𝑥(𝑡) = 5 cos(2𝜋1000𝑡 + 0.2) + 2cos(2𝜋3500𝑡 + 0.1)

a) State what is the minimum sampling rate required so that 𝑥[𝑛] represents 𝑥(𝑡) without
loss of information.
[3 marks]
Solution:
It should be twice of the highest frequency. Hence, in this case the sampling frequency,
𝑓𝑠 , is 7kHz.

b) Suppose the contribution of the signal at 3500Hz is to be removed from 𝑥[𝑛], name the
appropriate filter that will achieve this.
[3 marks]
Solution:
Since, this frequency is at the low frequency range we use a low pass filter.

c) If the required filter is to be designed using FIR windowing method and the window
function to be used is the Hamming window function given below, and assuming that the
transition frequency is 0.5kHz and the sampling frequency is 8kHz.

2𝜋𝑛
𝑤[𝑛]𝐻𝑎𝑚𝑚𝑖𝑛𝑔 = 0.54 − 0.46 cos ( ), 0≤𝑛 ≤𝑁−1
𝑁−1

i) Compute the required length of the FIR filter.


[5 marks]
Solution:
3.3 transition width 0.5
From the given formula, N = . ∆f = sampling frequency = = 0.0625
∆f 8
3.3
Thus, N = 0.0625 = 52.8 ≈ 53
10
SKEL4223

ii) Choose appropriate normalized cutoff frequency


[3 marks]
Solution:
2
Choose in between 1kHz and 3.5kHz. Hence, choose 2kHz. Hence 𝑓𝑐 = 8 = 0.25

iii) Write down the impulse response, ℎ[𝑛], for this filter
[5 marks]
Solution:
sin 𝜔𝑐 (𝑛 − 26) 2𝜋𝑛
(0.54 − 0.46 cos ( )) , 𝑛 ≠ 26
ℎ[𝑛] = { 𝜋(𝑛 − 26) 52
1, 𝑛 = 26
2
𝑓𝑐 = = 0.25
8

iv) Compute the value for ℎ[0] and ℎ[25].


[6 marks]
Solution:
Using the above equation we can directly compute Thus:
sin(2×𝜋×0.25×−26)
ℎ[0] = ×(0.54 − 0.46 cos(0)) = 0
𝜋×−26
sin(2×𝜋×0.25×−1) 50𝜋
ℎ[25] = × (0.54 − 0.46 cos ( )) = 0.3172
𝜋×−1 52
11
SKEL4223

QUESTION 4
You are asked to design a Butterworth IIR lowpass digital filter that has the following
specification requirements:
Passband : 0 – 300 Hz
Stopband : 1 – 2 kHz
Passband Ripple : 3 dB
Stopband Attenuation : 20 dB
Sampling Frequency : 5 kHz

With the above information, determine the following (all non–integer numbers should be in 3
decimal points only):

a) Pass- and Stop-band edge frequencies for the Butterworth analog prototype lowpass
filter.
[6 marks]
Solution:
All we need to do is to find the prewarping frequencies from the normalized prototype.
Hence;
2𝜋×300
𝜔𝑝′ = 𝑡𝑎𝑛 ( ) = 0.1908
2×5000
2𝜋×1000
𝜔𝑠′ = 𝑡𝑎𝑛 ( ) = 0.7265
2×5000
𝜔𝑠′ 0.7265
𝜔𝑠𝑝 = ′ = = 3.8077
𝜔𝑝 0.1908
Thus, the prewarped pass- and stopband edge frequencies for the prototype LowPass
filter are: 1, and 3.8077 respectively

b) Order, 𝑁, of the prototype lowpass filter.


[8 marks]
Solution:
To determine the order, 𝑁, of the Butterworth filter, we use the following formula
12
SKEL4223
𝐴𝑠
1010 − 1
𝑙𝑜𝑔 ( 𝐴𝑝 )
𝑁≥ 10 10
−1
𝜔𝑠𝑝
2 𝑙𝑜𝑔 ( 𝑝 )
𝜔𝑝

Computing all the parameters:


𝐴𝑠 20 𝐴𝑝 3
10 10 − 1 = 1010 − 1 = 99, 10 10 − 1 = 1010 − 1 = 0.995
99
𝑙𝑜𝑔 (0.995) = 1.998

For the prototype:


𝑝
𝜔
𝜔𝑝𝑝 = 1; 𝜔𝑠𝑝 = 3.8077; 2 𝑙𝑜𝑔 (𝜔𝑠𝑝) = 2 𝑙𝑜𝑔(3.8077) = 1.1613
𝑝

Thus,
1.998
𝑁 ≥ 1.161 = 1.721 => Let 𝑁 = 2

c) Find the transfer function, 𝐻(𝑠), of the prototype lowpass filter.


[6 marks]
Solution:
First, the poles of the 2nd order Butterworth LowPass prototype filter are given as:
(2 + 2 − 1)𝜋 (2 + 2 − 1)𝜋 √2 𝑗√2
𝑠𝑝,1 = 𝑐𝑜𝑠 [ ] + 𝑗𝑠𝑖𝑛 [ ]=− +
4 4 2 2

The other pole will just the conjugate of the 1st one, hence:
√2 𝑗√2
𝑠𝑝,2 = − −
2 2

Thus, the 𝑠-plane transfer function, 𝐻(𝑠), is


1 1
𝐻(𝑠) = =
(𝑠 − 𝑠𝑝,1 )(𝑠 − 𝑠𝑝,2 ) 𝑠 2 + √2𝑠 + 1
13
SKEL4223

The frequency scaled 𝑠-plane transfer function is


1
𝐻 ′ (𝑠) = 𝐻(𝑠)ȁ 𝑠 = 2
𝜔𝑝′ 𝑠 𝑠
(𝜔 ′ ) + √2 (𝜔 ′ ) + 1
𝑝 𝑝

𝜔𝑝′2
=
𝑠 2 + √2𝑠𝜔𝑝′ + 𝜔𝑝′2

d) Obtain the system function, 𝐻(𝑧), of the discrete-time filter using the bilinear
transform.
[7 marks]
Solution:
Now applying the bilinear transformation

′ (𝑠)ȁ
𝜔𝑝′2
𝐻(𝑧) = 𝐻 𝑧−1 =
𝑠=
𝑧+1 𝑧−1 2 𝑧−1
(𝑧 + 1) + √2𝜔𝑝′ (𝑧 + 1) + 𝜔𝑝′2

𝜔𝑝′2 (𝑧 + 1)2
=
(𝑧 − 1)2 + √2𝜔𝑝′ (𝑧 − 1)(𝑧 + 1) + 𝜔𝑝′2 (𝑧 + 1)2

Carry out the multiplication and then multiply top and bottom by 𝑧 2 , should give us the
following expression
𝜔𝑝′2 1 + 2𝑧 −1 + 𝑧 −2
𝐻(𝑧) = ×
1 + √2𝜔𝑝′ + 𝜔𝑝′2 2(𝜔𝑝′2 − 1)𝑧 −1 (1 − √2𝜔𝑝′ + 𝜔𝑝′2 )𝑧 −2
1+ +
1 + √2𝜔𝑝′ + 𝜔𝑝′2 1 + √2𝜔𝑝′ + 𝜔𝑝′2

Computing the parameter values


1 + √2𝜔𝑝′ + 𝜔𝑝′2 = 1.306; 𝜔𝑝′2 − 1 = −0.964

1 − √2𝜔𝑝′ + 𝜔𝑝′2 = 0.767; 𝜔𝑝′2 = 0.036

Substituting the above values into the expression will give us


0.028(1 + 2𝑧 −1 + 𝑧 −2 )
𝐻(𝑧) =
1 − 1.476𝑧 −1 + 0.587𝑧 −2

You might also like