0% found this document useful (0 votes)
32 views4 pages

Program 15

A 100th order FIR low-pass filter with a rectangular window and cutoff frequency of 0.4 rad/s was designed using MATLAB. The magnitude, phase, and impulse responses of the filter were verified using the FDA Toolbox. The filter design involved truncating the infinite Fourier series representing the desired frequency response and windowing the Fourier coefficients to obtain a finite impulse response. Frequency response plots generated using freqz and an impulse response plot produced using impz matched the expected low-pass filter behavior.

Uploaded by

Thomas James
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views4 pages

Program 15

A 100th order FIR low-pass filter with a rectangular window and cutoff frequency of 0.4 rad/s was designed using MATLAB. The magnitude, phase, and impulse responses of the filter were verified using the FDA Toolbox. The filter design involved truncating the infinite Fourier series representing the desired frequency response and windowing the Fourier coefficients to obtain a finite impulse response. Frequency response plots generated using freqz and an impulse response plot produced using impz matched the expected low-pass filter behavior.

Uploaded by

Thomas James
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

47

PROGRAM 15
Object : To design a FIR low-pass filter with given specifications and verify the magnitude, phase
and impulse responses using FDA Toolbox Order=100, rectangular window, cut-off frequency in
rad/s= 0.4

Tool used : MATLAB R2010b and FDA Toolbox


Theory :
Finite Impulse Response (FIR) Filter: The FIR filters are of non-recursive type, whereby the present
output sample is depending on the present input sample and previous input samples. The transfer
function of a FIR causal filter is given by
H(z) =

where h(n) is the impulse response of the filter.

The Fourier transform of h(n)is

H(ejw) = h(n)e-jwn

In the design of FIR filters most commonly used approach is using windows. The desired frequency
response Hd(ejw) of a filter is periodic in frequency and can be expanded in Fourier series. The
resultant series is given by

hd(n) = (1/2) H(ejw)ejwn dw

And known as Fourier coefficients

having infinite length. One possible way of obtaining FIR filter is to truncate the infinite Fourier
series at n = [(N-1)/2] where N is the length of the desired sequence. The Fourier coefficients of
the filter are modified by multiplying the infinite impulse response with a finite weighing
sequence w(n) called a window.
where w(n) = w(-n) 0

for |n| [(N-1)/2]

=0

for |n| > [(N-1)/2]

After multiplying w(n) with hd(n), we get a finite duration sequence h(n) that satisfies the desired
magnitude response,
h(n) = hd(n) w(n)

for

|n| [(N-1)/2]

=0

for

|n| > [(N-1)/2]

The frequency response H(ejw) of the filter can be obtained by convolution of Hd(ejw)
and W(ejw) is given by

H(ejw) = (1/2) Hd(ej) W(ej(w-) d


H(ejw) = Hd(ejw) * W(ejw)

48

Source Code :
clc;
clear all;
wc=input('enter the value of cut off frequency : ');
N=input('enter the order of filter : ');
b=fir1(N,wc,rectwin(N+1));
freqz(b,1);
impz(b,1,100);

Result :
enter the value of cut off frequency : 0.4
enter the order of filter : 100

49

FDA Tool :

50

Conclusion : Successfully designed the FIR low-pass filter with specified parameters using
MATLAB commands and verified the magnitude, phase and impulse responses using the FDA
Toolbox as shown in the figure

You might also like