Lab 5
Lab 5
Background Reading:
1. Different types of filters
a. Low-pass filter:
A low-pass filter is a system that doesn’t affect low frequencies, while
attenuates high frequencies.
b. High-pass filter:
A high-pass filter is a system that doesn’t affect high frequencies while
attenuates low-frequencies.
c. Band-pass filter:
A band-pass filter is a system that doesn’t affect a band of frequencies
while attenuates the remaining set of frequencies.
d. Notch-filter:
A notch filter is a type of band-stop filter that completely blocks a band of
frequencies.
a. Minimum-phase system:
A system is said to be minimum phase if all the zeroes are
present inside the unit circle.
b. Maximum-phase system:
A system is said to be maximum phase if all the zeroes are
present outside the unit circle.
c. Mixed-phase system:
A system is said to be mixed phase if there is a zero present
inside and outside the unit circle.
3. FIR Filters:
In signal processing, a filter is said to be Finite Impulse Response (FIR), if it has
a finite impulse response.
A FIR filter can be represented by a difference equation.
y(n) = 𝑎0 𝑥(𝑛) + ∑ 𝑎𝑘 𝑥(𝑛 − 𝑘)
𝑘
Realization of the difference equation stated above
I. Problems:
1) Determine the zeros for the FIR systems H1(z) = 6+z-1+z-2 and H2(z) = 1-z-1-6z-2, and indicate
whether the system is minimum-phase , maximum phase or mixed phase. Show responses.
i. Observations:
a. The pole-zero plot for H1 is given below
ii. Procedure:
a. First, the equation is to be solved for zeroes and poles.
b. Then, pole-zero plot has to be plotted.
c. The magnitude and phase response are to be calculated and plotted.
iii. Inference:
a. When the phase-response of H1 is observed, we could observe that phase at 0 and
phase at 1 are same and equal to zero. Thus, the system is minimum-phase filter.
b. When the phase-response of H2 is observed, we could observe that phase at 0 and
phase at 1 differ by 3600 . Thus, the system is maximum-phase filter.
i. Observations:
a. The magnitude and phase response for the FIR filter is given below.
ii. Procedure:
a. The magnitude and phase response are to be calculated and plotted.
b. The input signal x(n) has to be defined and its spectrum is to be plotted.
c. The output of the filter is done by convolving x(n) with h(n) and its spectrum is to
be plotted.
iii. Inference:
From the frequency response of the filter, we could observe that the filter stops the
frequency π/4. This could be observed when the spectrum of input and output are
compared.
3. Design an FIR filter that completely blocks the frequency w 0 = π 4 and then compute its
output if the input is x(n) =sin(π/4 n)*u(n) for n = 0,1,2,3,4. Does the filter fulfill your
expectations? Explain.
i. Design:
Consider a general FIR filter of length m.
To have a linear phase,
h(n) = ± h(m-1-n)
Type – 1:
Consider m = 3
H(𝑒 𝑗𝜔 ) = α + β 𝑒 −𝑗𝜔 + α 𝑒 −2𝑗𝜔
H(𝑒 𝑗𝜔 ) = 𝑒 −𝑗𝜔 ( 2∗α∗cos(𝜔) + β )
𝜋 𝜋
For 𝜔 = 4
, H(𝑒 𝑗𝜔 ) = 0 => β = - 2∗α ∗ cos( 4 )
Consider α to be 1,
β = -1.414
h(n) = [1 -1.414 1]
ii. Observations:
a. The magnitude and phase response of the filter designed h(n) is shown below.
iv. Procedure:
a. The magnitude and phase response are to be calculated and plotted.
b. The input signal x(n) has to be defined and its spectrum is to be plotted.
c. The output of the filter is done by convolving x(n) with h(n) and its spectrum is to
be plotted.
v. Inference:
From the frequency response of the filter, we could observe that the filter stops the
frequency π/4.
This will not be observed when the spectrum of input and output are compared
because less than one period has not been given as input.