Professional Documents
Culture Documents
b) Write down the difference equation for a 4th order IIR system. (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)
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]
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
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 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
a) From the frequency representation X(k), the desired signal has higher
frequency compared to the interference signal.
N 1 161
2kn 1 2kn
1
x(n) X (k ) exp j X (k ) exp j
N
n 0 N 16 n0 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
where fstop is the normalized stop band frequency and fpass is the
normalized pass band frequency.
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)
ii) Describe the design procedure for the chose filter. (5 marks)
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
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(j2f)
in the transfer function B(z).
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
1.2
0.8
0.6
0.4
0.2
0
0 1000 2000 3000 4000 5000 6000 7000 8000
The poles and zeros for a linear time-invariant system are defined as follows
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
The system is IIR because the poles have non zero values
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 upper and lower cut off can estimated from the poles using the
following formula
fs imag( pole)
f a tan
2 real( pole)
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
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𝑐𝑜𝑠𝜔)|
𝜔 𝜔
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
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
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