Professional Documents
Culture Documents
Questions:
1 Given the following pole zero diagram of a system
Im
2
x2 2
Re
-2
Separate the system into H min ( z ) and H ap ( z ) . Write the full transfer function
as a product of the two and mark clearly which part is H min ( z ) and which part
is H ap ( z ) .
Solution
There are two zeros outside the unit circle. Those are reflected to their
conjugate reciprocal locations at H min ( z ) . The poles stay at the same location
at H min ( z ) .
At H ap ( z ) the two zeros of the original system stay at the same location but
there will be two new poles to cancel the new zeros of H min ( z ) .
H min ( z ) H ap ( z )
Im Im
2
0.25 x2 0.25
0.25 0.25 2
Re Re
-0.25 -0.25
-2
H ( z)
[ z − (0.25 + 0.25 j )][ z − (0.25 − 0.25 j )] ⋅ [ z − (2 + 2 j )][ z − (2 − 2 j )]
z
2
[
z − (0.25 + 0.25 j ) ][ z − (0.25 − 0.25 j ) ]
H min ( z )
H ap ( z )
z−2
H1 ( z ) =
z − 0.5
1
transfer function of the overall transfer function of the two systems
H min ( z )
combined will be
1 1
HT ( z) =H1 ( z ) ⋅
H min ( z )
=( H min ( z ) ⋅ H ap ( z ) ) ⋅ H min ( z )
=H ap ( z )
So
=H1 ( z ) ⋅
1−0.5
z −1 1− 0.5
−1
z
H min ( z ) H ap ( z )
z −1 − 0.5
H
= T ( z) ap ( z )
H=
1 − 0.5 z −1
0.5
-0.5
0.5 Re
-0.5
Solution
For reality we need the symmetry about the real axis.
For stability we need all poles to be inside the unit circle.
For causality we need the number of poles be at least as the number of zeros.
0.5
-0.5
0.5 Re
-0.5
From what was said before and the diagram, it is now easy to write the transfer
function:
H ( z) =
( z − (0.5 − j 0.5) )( z − (0.5 + j 0.5) )
( z − (−0.5 + j 0.5) )( z − (−0.5 − j 0.5) )
For all designs – plot the frequency response 0 to π rad/smp
4 Design a HPF with a rectangular window. Cutoff frequency is 1KHz and
sampling frequency is 4KHz.
a. Design a 2nd order filter. Write the impulse response h[n]=…
b. Design a 4th order filter. Write the impulse response h[n]=…
c. Design a 6th order filter. Write the impulse response h[n]=…
d. What is the filters attenuation at 500Hz and 1.5KHz in any case?
Solution
From the table:
0.8
magnitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
0.8
magnitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
0.8
magnitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
0.9
0.8
0.7
0.6
magnitude
0.5
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
x[n] z −1
+ + z −1
z −1
0.2773 -0.3445
+ y[n]
Pay attention! A 3rd order filter is either type 2 or type 4 and both cannot
be BSF.
Look at the frequency response you get. Is it A BSF? NO!!!
6 Design a 6th order LPF. The cutoff frequency is 750Hz and the sampling
frequency is 3KHz.
a. Use a rectangular window. What is the impulse response of the filter
h[n]=…?
b. Use a Bartlett window. What is the impulse response of the filter
h[n]=…?
c. Use a Hanning window. What is the impulse response of the filter
h[n]=…?
Solution
6th order filter N=6, M=3
From the table:
750 1
=ωc 2=
π π
3000 2
1
Sin π (0 − 3)
hd [0] = 2 = −0.1061
π (0 − 3)
1
Sin π (1 − 3)
=hd [1] = 2 0
π (1 − 3)
1
Sin π (2 − 3)
=hd [2] = 2 0.3183
π (1 − 3)
1
π
2 1
hd [3] =1− =
π 2
hd [4] = hd [2]
hd [5] = hd [1]
hd [6] = hd [0]
1
hd [n] =−0.1061 ⋅ δ [n] + 0.3183 ⋅ δ [n − 2] + δ [n − 3] + 0.3183 ⋅ δ [n − 4] − 0.1061 ⋅ δ [n − 6]
2
Rectangular window : h[n] = hd [n]
th
6 order LPF rectangular window
1.2
0.8
magnitude
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
Bartlett window
2n / M 0≤n≤M /2 2n / 6 0≤n≤3
w [ n ] = 2 − 2n / M M / 2 ≤ n ≤ M ⇒ 2 − 2n / 6 3 ≤ n ≤ 6
0 else 0 else
w[0] = 0
w[1] = 0.3333
w[2] = 0.6667
w[3] = 1
w[4] = 0.6667
w[5] = 0.3333
w[6] = 0
h[n] hd [n] ⋅ w[n]
=
1
] 0.6667 ⋅ 0.3183 ⋅ δ [n − 2] + δ [n − 3] + 0.6667 ⋅ 0.3183 ⋅ δ [n − 4]
h[n=
2
th
6 order LPF Bartlett window
1
0.9
0.8
0.7
0.6
magnitude
0.5
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
Hanning window
1 2π n 1 2π n
1 − cos 0≤n≤M 1 − cos 0 ≤ n ≤ 6
=w [ n] 2 M ⇒ 2 6
0 else 0 else
w[0] = 0
w[1] = 0.25
w[2] = 0.75
w[3] = 1
w[4] = 0.75
w[5] = 0.25
w[6] = 0
[n] hd [n] ⋅ w[n]
h=
1
h[n] = 0.75 ⋅ 0.3183 ⋅ δ [n − 2] + δ [n − 3] + 0.75 ⋅ 0.3183 ⋅ δ [n − 4]
2
th
6 order LPF Bartlett window
1
0.9
0.8
0.7
0.6
magnitude
0.5
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3
frequency [rad/smp]
Solution
f sample = 20 KHz
f P = 5.5 KHz
f S = 6.5 KHz
δ = 0.05
Calculating the window
fP 5500
Ω P 2π =
= 2π = 1.7279 rad / smp
f sample 20000
fS 6500
Ω S 2π =
= 2π = 2.0420 rad / smp
f sample 20000
ΩP + ΩS
=
ΩC = 1.8850 rad / smp
2
∆Ω = Ω S − Ω P = 0.3142 rad / smp
(The MATLAB function for zeroth-order modified Bessel function of the 1st
Kind is besseli(0,x) )
The sesired impulse response for LPF is
N
sin ΩC n −
2 N
n≠
N 2
hd [n] = π n−
2
ΩC N
n=
2 2
N
In this case N=13 so there is no n = 2
26
sin 1.5708 n −
2
n ≠ 13
26
hd [n] = π n−
2
1.5708
n = 13
π
Now we multiply the desired impulse response by the window to get the actual
impulse response
[n] hd [n] ⋅ w[n]
h=
The frequency response of the filter will be
th
13 order LPF Kaiser window
1.2
0.8
magnitude
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8
frequency [rad/smp]