Exp6 Edsp Rohit
Exp6 Edsp Rohit
- 16/10/23
2 Theory Overview
The time domain classification of a digital filter based on the length of its
impulse response sequence leads to the finite impulse response(FIR) filter
There are four types of ideal filters(LPF,HPF,BPF,BSF) are usually defined
based on the magnitude function |H(e jω)|.
These ideal filters have doubly infinite impulse responses and are unrealizable as
they are not causal. In practice, realizable approximations to the ideal filters can
be made.
The design of FIR filter is therefore based on a direct approximation of the
specified magnitude response .
A variety approaches has been proposed for the design of FIR filters.A direct and
straightforward method is based on truncating the Fourier series representation of
the prescribed frequency response using windows.
3 Matlab Programs
%CB.EN.U4ELC21048
clc
clear all
close all
if mod(tap, 2) == 0
m = (tap) / 2;
else
m = (tap - 1) / 2;
end
n = -m:m;
arr = 1:2*m+1;
if stat <= 33
disp("rectangular")
h = zeros(size(arr));
arr = 1;
for i = -m:m
if i == 0
h(arr) = 2 * fcn
else
end
w(arr)=1;
arr = arr + 1;
end
stem(n,ans);
xlabel('Frequency (Hz)');
ylabel('Magnitude');
disp("Hanning")
arr = 1;
h = zeros(size(arr));
w = zeros(size(arr));
ans = zeros(size(arr));
for i = -m:m
if i == 0
h(arr) = 2 * fcn;
else
end
arr =arr + 1;
end
stem(n,ans);
xlabel('Frequency (Hz)');
ylabel('Magnitude');
disp("Hamming")
arr = 1;
h = zeros(size(arr));
w = zeros(size(arr));
ans = zeros(size(arr));
for i = -m:m
if i == 0
h(arr) = 2 * fcn;
else
end
arr =arr + 1
end
stem(n,ans);
xlabel('Frequency (Hz)');
ylabel('Magnitude');
disp("Blackman")
arr = 1;
h = zeros(size(arr));
w = zeros(size(arr));
ans = zeros(size(arr));
for i = -m:m
if i == 0
h(arr) = 2 * fcn;
else
end
arr =arr + 1;
end
stem(n,ans);
xlabel('Frequency (Hz)');
ylabel('Magnitude');
end
Output
Rectangular Window-
Plot:
References
[1] https://in.mathworks.com/support.html.
[2] Dimitris G.Monolakis John G.Prokais. Digital Signal Processing,Principles,
Algorithms and Applications. The Prentice Hall International Ins, 1996.
[3] Sanjit K Mitra. Digital Signal Processing, A Computer-Based Approach. The
Mcgrawhill Publishing Companies, 2008.
The Fir digital filter is desinged in this experiment using the windowing method
The different types of windowing method like rectangular, triangular , hanning
,hamming and black man window is introduced.
The windowing method is powerful tool for designing a fir filter.
The Choice Of the window function can have an impact on the filter’s frequency
Response and characteristics.
For example, Hanning and Hamming windows are often used for smoother
frequency responses, while the Blackmann window provides better attenuation
Properties.
Signature