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

3.1 Design Two Lowpass Filters Design two lowpass FIR filters with M 30 and ae 0

ID: 2290874 • Letter: 3

Question

3.1 Design Two Lowpass Filters Design two lowpass FIR filters with M 30 and ae 0.5m = 2m(fe/f.) = 2n(2500/ 10000), one using a Hamming window, the other with a Rectangular window. For the measurement of passband and stopband edges, there are two approaches: use the filterdesign GUI and read numbers from the plot, zooming when necessary, or export the filter coefficients from the GUI and use MATLAB to make plots of the magnitude of the frequency response using freekz (or freqz) and plot. In MATLAB zooming would be more precise and reliable because the frequency sampling can be specified in the call to freekz. (a) For the filter obtained with the rectangular window, determine an accurate measurement of the pass- band edge (up) assuming the passband ripple specification is ,-0.1, ie.. 1 0.1 (b) For the filter obtained with the rectangular window, determine an accurate measurement of the stop band edge () assuming the stopband ripple specification is ,01 (c For the filter obtained wth the Hamming window, determine an accurate measurement of the pass- band edge (wp) assuming the passband ripple specification is ,-0.01, i.e., l t 0.01 (d) For the filter obtained with the Hamming window, determine an accurate measurement of the stopband edge () assuming the stopband ripple specification is -0.01 (e Question: is the cutoff frequency half way between (p) and() for both filters? Instructor Verification (separate page)

Explanation / Answer

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