You are on page 1of 18

Q1

a) As system is defined as a difference equation. Is this a continuous or discrete-


time system? Explain your reasons. (5 marks)

The system is discrete-time since it is represented by a difference equation.

b) Write down the difference equation for a 4th order IIR system. (5 marks)

y(n)  a(1) y(n  1)  a(2) y(n  2)  a(3) y(n  3)  a(4) y(n  4)


 b(0) x(n)  b(1) x(n  1)  b(2) x(n  2)  b(3) x(n  3)  b(4) x(n  4)

c) Explain the reason for sampling a continuous-time signal. (5


marks)

Signals by nature are continuous-time, sampling converts signal to discrete-


time to allow processing by digital technology.
d) Write down the mathematical expression for the z-transform pair.
(5
marks)


X ( z)   x ( n) z
n  
n

1
 X ( z) z
n 1
x ( n)  dz
j 2

e) Draw the signal flow graph for a 2nd order FIR system. (5 marks)

z-1 z-1
x(n)

b(0) b(1) b(2)

y(n)
Q2

Figure 2.1 shows both the real part (𝐻𝑅 [𝑘]) and imaginary part (𝐻𝐼 [𝑘]) of the 4-point
DFT of ℎ[𝑛]. The length of h[n] is 𝑀 = 2. Given that. Also shown in the figure is the
signal 𝑥[𝑛].

𝐻𝑅 [𝑘] 𝐻𝐼 [𝑘]
2

1 1 1

𝑘 𝑘
0 1 2 3 0 1 2 3

-1

𝑥[𝑛]
2

1 1

𝑘
-1 0 1

Figure 2.1

a) Find all possible value of 𝑦[𝑛] when ℎ[𝑛] is real and causal. Given that 𝑦[𝑛] =
𝑥[𝑛] ∗ ℎ[𝑛]

Answer:
3
1
ℎ[𝑛] = ∑ 𝐻[𝑘]𝑒 𝑗2𝜋𝑘𝑛/4
4
𝑘=0
1
ℎ[0] = (2 + 1 − 𝑗 + 1 + 𝑗) = 1
4
1 𝑗𝜋 𝑗3𝜋
ℎ[1] = (2 + (1 − 𝑗)𝑒 2 + (1 + 𝑗)𝑒 2 ) = 1
4
the 2-point ℎ[𝑛] = [1 1]

𝑦[𝑛] = 𝑥[𝑛] ∗ ℎ[𝑛]


𝑦[𝑛] = 0 for 𝑛 < −1
𝑦[−1] = 1(1) = 1
𝑦[0] = 1(1) + 1(2) = 3
𝑦[1] = 1(2) + 1(1) = 3
𝑦[2] = 1(1) = 1
𝑦[𝑛] = 0 for 𝑛 > 2
b) What are the frequencies (in rad/s) present in the 4-point DFT of the 𝐻(𝑘)

Answer:
For 4-point DFT, present frequencies are:

𝜔𝑘 = 2𝜋𝑘/4, 𝑘 = 0, 1, 2, 3
𝜔0 = 0
𝜔1 = 𝜋/2
𝜔2 = 𝜋
𝜔3 = 3𝜋/2

c) Plot a 3-point DFT of ℎ[𝑛] in terms of its magnitude response, |𝐻[𝑘]| and its
phase response, 𝐻[𝑘].

Answer:
ℎ[𝑛] = [1 1]
1

𝐻[𝑘] = ∑ ℎ[𝑛]𝑒 −𝑗2𝜋𝑘𝑛/3


𝑛=0
𝐻[0] = 1 + 1 = 2
𝐻[1] = 1 + 𝑒 −𝑗2𝜋/3 = 0.5 − 𝑗0.866
𝐻[2] = 1 + 𝑒 −𝑗4𝜋/3 = 0.5 + 𝑗0.866

Then,
|𝐻[𝑛]| = √𝐻𝑅2 + 𝐻𝐼2
|𝐻[0]| = 2, |𝐻[1]| = 1 and |𝐻[2]| = 1
𝐻
𝐻[𝑛] = 𝑡𝑎𝑛−1 𝐻 𝐼
𝑅
𝐻[0] = 0, 𝐻[1] = −1.0472 and 𝐻[2] = 1.0427

d) Compute 2-point DFT of 𝑥[𝑛] and prove that aliasing occurs when the 2-point
DFT is used to reconstruct the original image.

Answer:
1

𝑋[𝑘] = ∑ 𝑥[𝑛]𝑒 −𝑗2𝜋𝑘𝑛/2


𝑛=−1
𝑋[0] = 1 + 2 + 1 = 4
𝑋[1] = 𝑒 𝑗𝜋 + 2 + 𝑒 −𝑗𝜋 = 0
Then, 𝑥[𝑛] can be computed as below
1
1
𝑥[𝑛] = ∑ 𝑋[𝑘]𝑒 𝑗2𝜋𝑘𝑛/2
2
𝑘=0
1
𝑥[−1] = (4) = 2
2
1
𝑥[0] = (4) = 2
2
1
𝑥[1] = (4) = 2
2

𝑥[𝑛] = [2 2 2]. This is not similar to the original 𝑥[𝑛]. Thus, it is proved that
aliasing occurs.

Q3

The discrete frequency representation of a signal based on the 16 point DFT (Discrete
Fourier Transform) is

X(k)= 2 k=3
= -j8 k=5
= j8 k=11
=2 k=13
=0 elsewhere

It is assumed that the sampling frequency is 16 kHz.

a) From the frequency representation X(k), the desired signal has higher
frequency compared to the interference signal.

i) Calculate the frequency and energy of the desired signal.


(5 marks)
Frequency resolution is 16000/16=1000 Hz/sample
Signal at k=5, then the signal frequency is 5x1000=5000 Hz
Signal energy
N 1 161
Ex  
n 0
X (k ) X * (k )   X (k ) X * (k )
n 0

 X (5) X * (5)  X (11) X * (11)  8 2  8 2  64  64


 128

ii) Calculate the time representation of the signal x(n). (5 marks)

N 1 161
 2kn  1  2kn 
 
1
x(n)  X (k ) exp j  X (k ) exp j 
N
n 0  N  16 n0  16 
X (3)  2 3n  X (5)  2 5n  X (11)  2 11n  X (13)  2 13n 
 xp j  exp j  xp j  xp j 
16  16  16  16  16  16  16  16 

1  2 3n  1  2 5n  1  2 5n  1  2 3n 
 exp j   j exp j   j exp  j   exp  j 
8  16  2  16  2  16  8  16 
1  2 3n   2 3n 
 cos   sin  
4  16   16 

b) The information on two possible digital filters with low pass frequency
response are as follows

Butterworth IIR Filter


The filter order can be calculated by using the following formula :
tan(f stop ) 1.2
k ,N 
tan(f pass ) log10 (k )

where fstop is the normalized stop band frequency and fpass is the
normalized pass band frequency.

FIR filter – rectangular window function


0.46
The normalized transition band is f  where N is the filter order.
N

Choose one of the two digital filters to remove the interference signal from
the frequency representation X(k).
i) Define the filter chosen filter specifications. (5 marks)

Solution based on IIR filter


The filter order can be calculated by using the following formula :
tan(f stop ) tan( 5000 / 16000)
k   2.2398
tan(f pass ) tan( 3000 / 16000)
1.2
N  3.4261  3
log10 (2.2398)

Filter specifications are as follows:


Filter order is 3, frequency representation is high pass, cut-off frequency is
5000 Hz, stop band frequency is 3000, no passband or stopband ripple,
sampling frequency is 16,000Hz.

Solution for FIR filter


0.46
The normalized transition band is f  . Assuming low pass, the
N
normalized transition band is fstop-fpass=(5000-3000)/16000. The filter
order is
0.46 0.46
N   3.68  4
f 2000 / 16000

Filter order is 4, frequency representation is high pass, cut-off frequency is


5000 Hz, stop band frequency is 3000, passband or stopband ripple are
present, sampling frequency is 16,000Hz.

ii) Describe the design procedure for the chose filter. (5 marks)

Design procedure for IIR

1 Defined the filter specifications : cutoff frequency fc, sampling frequency fsamp,
pass band characteristics , transition characteristics, stop band characteristics, and
filter order.
2 Choose the analog filter prototype H(s).
3 Calculate the cutoff frequency of the equivalent analog filter Ωc where fc,norm is
the normalized cutoff frequency of the desired digital filter.
1
4 Since high pass perform the following conversion: s  .
s
5 Apply frequency scaling H ( s)  H ( s) s  s / 
c

6 Derive the transfer function for the digital filter H(z) by making the substitution
H ( z )  H ( z ) s 2( z 1) /( z 1) [Note : this is valid if cutoff frequency is normalized to

the sampling frequency]


7 Verify the resulting frequency response of the digital filter by replacing
z=exp(j2f) in the transfer function H(z).

Design procedure for FIR

1 Defined the filter specifications : cutoff frequency fc, sampling frequency fsamp, pass
band characteristics , transition characteristics, stop band characteristics, and filter
order M.
2 Calculate the filter impulse response from the specification h(n).
3 Truncate the filter to M length and delay the filter impulse response by (M-1)/2. The
resulting filter impulse response becomes b(n)=h(n-(M-1)/2)
4 Apply window function w(n) such that b(n)=w(n)b(n).
5 Verify the resulting frequency response of the digital filter by replacing z=exp(j2f)
in the transfer function B(z).

iii) Sketch the expected frequency representation of the chosen filter.


(5 marks)

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 1000 2000 3000 4000 5000 6000 7000 8000

IIR - No passband and stop band ripple


1.4

1.2

0.8

0.6

0.4

0.2

0
0 1000 2000 3000 4000 5000 6000 7000 8000

FIR- passband and stop band ripple present


Q4

The poles and zeros for a linear time-invariant system are defined as follows

(poles) 0.6851 + j0.5754, 0.6851 - j0.5754, 0.8433 + j0.3913, 0.8433 - j0.3913

(zeros) 0.8478 + j0.5304, 0.8478 - j0.5304, 0.8478 + j0.5304, 0.8478 - j0.5304

a) Sketch the poles and zero plot for the system. (3 marks)

0.8

0.6 2

0.4
Imaginary Part

0.2

-0.2

-0.4
2
-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real Part

b) Is the system IIR or FIR? Explain your reasons. (2 marks)

The system is IIR because the poles have non zero values

c) Sketch the frequency representation of the system and determine if it’s


pass, high pass, bandpass or bandstop. (5 marks)

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

The frequency representation is bandstop.


d) Calculate the cut off frequency or frequencies of the system. (5 marks)

The upper and lower cut off can estimated from the poles using the
following formula
fs  imag( pole) 
f  a tan 
2  real( pole) 

Since no information is given on the sampling frequency, then choose it a


1. To calculate the upper frequency cutoff chose the pole : 0.6851 +
j0.5754
fs  imag( pole)  1  0.5754 
f c,hi  a tan   a tan   0.1112
2  real( pole)  2  0.6851

To calculate the lower cutoff frequency chose the pole : 0.8433 + j0.3913
fs  imag( pole)  1  0.3913 
f c,lo  a tan   a tan   0.06913
2  real( pole)  2  0.8433 

e) Calculate the transfer function of the system H(z). (10 marks)

From the given poles and zeros


(poles) 0.6851 + j0.5754, 0.6851 - j0.5754, 0.8433 + j0.3913, 0.8433 -
j0.3913
(zeros) 0.8478 + j0.5304, 0.8478 - j0.5304, 0.8478 + j0.5304, 0.8478 -
j0.5304

Calculate the denominator terms


(z - 0.6851 j0.5754)(z - 0.6851 j0.5754)(z- 0.8433 j0.3913)(z- 0.8433 j0.3913)
(z 2 - 2  0.6851z  (0.68512  0.57542 ))(z 2 - 2  0.8433z  (0.84332  0.39132 ))
(z 2 - 1.702z  0.8004)(z 2 - 1.6866z  0.8643)
Calculate the numerator terms
(z - 0.8478 j0.5304)(z - 0.8478 j0.5304)(z- 0.8478 j0.5304)(z - 0.8478 j0.5304)
(z 2 - 2  0.8478z  (0.84782  0.53042 ))(z 2 - 2  0.8478z  (0.84782  0.53042 ))
(z 2 - 1.6956z  1)(z 2 - 1.6956z  1)

The transfer function is


(z 2 - 1.6956z  1)(z 2 - 1.6956z  1)
H ( z) 
(z 2 - 1.702z  0.8004)(z 2 - 1.6866z  0.8643)
Q5

Three FIR filters are described as below where ℎ1 [𝑛] is an allpass filter.

ℎ1 [𝑛] = 𝛿[𝑛]
1 1 1
ℎ2 [𝑛] = 3 𝛿[𝑛] + 3 𝛿[𝑛 − 1] + 3 𝛿[𝑛 + 1]
ℎ3 [𝑛] = ℎ1 [𝑛] − ℎ2 [𝑛]

6
𝑥[𝑛]

2 2 2
1

𝑛
0 1 2 3
4
Figure 5.1

a) Compute and plot 𝑦[𝑛] = 𝑥[𝑛] ∗ ℎ3 [𝑛] where 𝑥[𝑛] is as shown in Figure 5.1
Answer:
2 1 1
ℎ3 [𝑛] = ℎ1 [𝑛] − ℎ2 [𝑛] = 𝛿[𝑛] − 𝛿[𝑛 − 1] − 𝛿[𝑛 + 1]
3 3 3
Thus,
𝑦[𝑛] = 0 𝑓𝑜𝑟 𝑛 < −1
1 1
𝑦[−1] = − (1) = −
3 3
2 1
𝑦[0] = (1) − (2) = 0
3 3
1 2 1 4
𝑦[1] = − (1) + (2) − (6) = −
3 3 3 3
1 2 1 8
𝑦[2] = − (2) + (6) − (2) =
3 3 3 3
1 2 1 4
𝑦[3] = − (6) + (2) − (2) = −
3 3 3 3
1 2 2
𝑦[4] = − (2) + (2) =
3 3 3
1 2
𝑦[5] = − (2) = −
3 3
𝑦[𝑛] = 0 𝑓𝑜𝑟 𝑛 > 5

8/3

𝑦[𝑛]

2/3

𝑛
-1 0 1 2 3 4
5
-1/3
-2/3
b) Describe the LTI system of the 𝑦[𝑛] = 𝑥[𝑛] ∗ ℎ3 [𝑛] in term of its stability and
causality. Explain your answer
Answer:
- The system is stable because its impulse response, ℎ3 [𝑛] is bounded. Thus, a
bounded input will also produce bounded output.
- The system is not causal because ℎ3 [−1] ≠ 0

c) Proves that ℎ2 [𝑛] is a lowpass filter and ℎ3 [𝑛] is a highpass filter by sketching
their magnitude frequency response.
Answer:
1 1
|𝐻2 (𝜔)| = | (1 + 𝑒 −𝑗𝑤 + 𝑒 𝑗𝑤 )| = | (1 + 2𝑐𝑜𝑠𝜔)|
3 3
1
|𝐻3 (𝜔)| = |𝐻1 (𝜔) − 𝐻2 (𝜔)| = |1 − 3 (1 + 2𝑐𝑜𝑠𝜔)|

|𝐻2 (𝜔)| |𝐻3 (𝜔)|


1 1

𝜔 𝜔
Based on𝜋 plots above,
2𝜋 it can 𝜋 be concluded that ℎ2 [𝑛] is a𝜋lowpass2𝜋 filter as as
𝜋 its
|𝐻2 (𝜔)|3pass the low
3 frequency and suppress the high frequency.
3 3It can also be
concluded that ℎ3 [𝑛] is a highpass filter as its |𝐻3 (𝜔)| pass the high frequency and
suppress the low frequency

d) From ℎ3 [𝑛], it explain that a highpass filter can be constructed using an allpass
filter and a lowpass filter. Thus, determine the allpass filter needed to construct a
highpass filter based on the delayed ideal lowpass filter (ℎ𝑙 [𝑛]) given below.
𝜔𝑐
𝑓𝑜𝑟 𝑛 = 2
𝜋
ℎ𝑙 [𝑛] =
𝜔𝑐 sin(𝜔𝑐 (𝑛 − 2))
𝑓𝑜𝑟 𝑛 ≠ 2
{ 𝜋 (𝜔𝑐 (𝑛 − 2)
Answer:
Allpass filter is described as ℎ𝑖𝑑𝑒𝑎𝑙 [𝑛] = 𝛿[𝑛]. As ℎ𝑙 [𝑛] is a delayed ideal lowpass
filter by 2 points, thus the allpass filter should also delayed by 2 points to
construct the highpass filter. The delayed Allpass filter is ℎ[𝑛] = 𝛿[𝑛 − 2]

e) For practical realization, compute the lowpass FIR filter coefficients for ℎ𝑙 [𝑛] in
(d) if a causal rectangular window of size 𝑀 = 5 is used to truncate the filter ℎ𝑙 [𝑛].
Use 𝜔𝑐 = 0.5.
Answer:
The causal rectangular window, 𝜔[𝑛] is,

𝜔[𝑛]

𝑛
0 1 2 3
4

Thus, the FIR filter coefficients are:

0.5 sin(0.5(−2))
ℎ𝑙 [0] = = 0.1339
𝜋 (0.5(−2)
0.5 sin(0.5(−1))
ℎ𝑙 [1] = = 0.1526
𝜋 (0.5(−1)
0.5
ℎ𝑙 [2] = = 0.1592
𝜋
0.5 sin(0.5(1))
ℎ𝑙 [3] = = 0.1526
𝜋 (0.5(1)
0.5 sin(0.5(2))
ℎ𝑙 [4] = = 0.1339
𝜋 (0.5(2)
Q6
1
Figure 6.1 shows a pole-zero plot for a system function where it’s ROC is |𝑧| > 2
𝐼𝑚
𝑧 − 𝑝𝑙𝑎𝑛𝑒

𝑅𝑒
1 1

2 2

Figure 6.1

a) Proves that the difference equation below is corresponds to the pole-zero plot in
Figure 6.1
𝑦[𝑛] = 𝑦[𝑛 − 1] + 0.25𝑦[𝑛 − 2] − 0.25𝑦[𝑛 − 3] + 𝑥[𝑛 − 2] − 𝑥[𝑛 − 3]
Answer:
𝑦[𝑛] − 𝑦[𝑛 − 1] − 0.25𝑦[𝑛 − 2] + 0.25𝑦[𝑛 − 3] = 𝑥[𝑛 − 2] − 𝑥[𝑛 − 3]
𝑌(𝑧) − 𝑌(𝑧)𝑧 −1 − 0.25𝑌(𝑧)𝑧 −2 + 0.25𝑌(𝑧)𝑧 −3 = 𝑋(𝑧)𝑧 −2 − 𝑋(𝑧)𝑧 −3
𝑌(𝑧) 𝑧 −2 − 𝑧 −3
𝐻(𝑧) = =
𝑋(𝑧) 1 − 𝑧 −1 − 0.25𝑧 −2 + 0.25𝑧 −3
𝑧 −3 (𝑧 − 1)
= −3 3
𝑧 (𝑧 − 𝑧 2 − 0.25𝑧 + 0.25)
(𝑧 − 1)
=
(𝑧 − 1)(𝑧 − 0.5)(𝑧 + 0.5)
1
=
(𝑧 − 0.5)(𝑧 + 0.5)
This proves that the given difference equation is corresponds to the pole-zero plot
in Figure 6.1

b) Find the impulse response of the system.


Answer:
1 𝐴 𝐵
𝐻(𝑧) = = +
(𝑧 − 0.5)(𝑧 + 0.5) 𝑧 − 0.5 𝑧 + 0.5
𝐴 = 𝐻(𝑧)(𝑧 − 0.5)|𝑧=0.5 = 1
𝐵 = 𝐻(𝑧)(𝑧 + 0.5)|𝑧=−0.5 = −1
1 1 𝑧 −1 𝑧 −1
𝐻(𝑧) = − = −
𝑧 − 0.5 𝑧 + 0.5 1 − 0.5𝑧 −1 1 + 0.5𝑧 −1
ℎ[𝑛] = 0.5𝑛−1 𝑢[𝑛 − 1] − (−0.5)𝑛−1 𝑢[𝑛 − 1]

c) Draw the direct-form 1 realization of the system


Answer:
1 𝑧 −2
𝐻(𝑧) = =
(𝑧 − 0.5)(𝑧 + 0.5) 1 − 0.25𝑧 −2

1
𝑥[𝑛] 𝑧−2 𝑦[𝑛]

−0.25
𝑧−2

d) Sketch the pole-zero plot of 𝑌(𝑧) if the input of the system is described by the
pole-zero plot in Figure 6.2. Also determine the stability and causality of 𝑦[𝑛].

𝐼𝑚
3
𝑃1 = +𝑗
2
𝑃3
1 √13
𝑅𝑒 < |𝑧| <
1 1 2 2
− Figure 6.2
2
Answer: 3
𝑃2 = −𝑗
2
𝐼𝑚
3
𝑃1 = +𝑗
𝑃3 &𝑃4 𝑃5 2 1 √13
𝑅𝑒 < |𝑧| <
1 1 2 2
− 3
2 𝑃2 = −𝑗
2
- 𝑦[𝑛] is stable as the unit circle is inside the ROC
- 𝑦[𝑛] is not causal because there are 2 poles outside the unit circle
e) Plot the 4-point DFT (𝐻[𝑘]) of the system function.
Answer:
1 1
𝐻(𝑧) = = 2
(𝑧 − 0.5)(𝑧 + 0.5) 𝑧 − 0.25

For 4-point DFT,


1
𝐻[𝑘] =
𝑒 𝑗𝜋𝑘
− 0.25
1 4
𝐻[0] = =
1 − 0.25 3
1 4
𝐻[1] = 𝑗𝜋 =−
𝑒 − 0.25 5
1 4
𝐻[2] = 𝑗2𝜋 =
𝑒 − 0.25 3
1 4
𝐻[3] = 𝑗3𝜋 =−
𝑒 − 0.25 5

You might also like