Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design two lowpass FIR filters with M = 50 and omega_c = 0.6 pi, one using a Ham

ID: 2083599 • Letter: D

Question

Design two lowpass FIR filters with M = 50 and omega_c = 0.6 pi, one using a Hamming window, the other with a Rectangular window. Repeat the process with two FIR bandpass filters (M = 50) using cutoff frequencies at omega_c1 = 0.3 pi and omega_c2 = 0.6 pi. Discussion questions to consider: How close is the designed filter to an ideal filter? Is the Hamming-window design better? Why? How many zeros are found in the z-plane? Where are they located? How do the zero locations relate to the passbands and stopbands of the filters?

Explanation / Answer

close all,

clear all,

clc,

CutOFF_Freq = 0.6;

Filter_Order = 50;

Filter_Type = 'low';

window = 'haming';

b = fir1(Filter_Order,CutOFF_Freq,Filter_Type,'haming','normalization','scale'); % DEfault Window - Haming

figure, freqz(b,1,512);

str = strcat('Low Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);    title(str);

figure, zplane(b);

str = strcat('Z-Plane --> Low Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);    title(str);

Filter_Type = 'low';

window = 'rectwin';

b2 = fir1(Filter_Order,CutOFF_Freq,Filter_Type,'rectwin','normalization','scale'); % DEfault Window - Haming

figure, freqz(b2,1,512);

str = strcat('Low Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);    title(str);

figure, zplane(b);

str = strcat('Z-Plane --> Low Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);    title(str);

Filter_Type = 'bandpass';

window = 'haming';

b = fir1(Filter_Order,[0.3 0.6],Filter_Type,'rectwin','normalization','scale'); % DEfault Window - Haming

figure, freqz(b,1,512);

str = strcat('Band Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);   title(str);

figure, zplane(b);

str = strcat('Z-Plane --> Band Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);    title(str);

Filter_Type = 'bandpass';

window = 'rectwin';

b = fir1(Filter_Order,[0.3 0.6],Filter_Type,'rectwin','normalization','scale'); % DEfault Window - Haming

figure, freqz(b,1,512);

str = strcat('Band Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);   title(str);

figure, zplane(b);

str = strcat('Z-Plane --> Band Pass Filter, Order = ',num2str(Filter_Order),' Window = ',window);    title(str);

Discussion:

Band-pass filter has maximum gain in pass band region.Therefore, lots of poles opposite the imaginary axis should be around the band pass frequency.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote