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

beacuse this question is too difficult for me, can some one to do it . and thank

ID: 2266610 • Letter: B

Question

beacuse this question is too difficult for me, can some one to do it . and thanks so much for your helps...

Design of Butterworth Band Stop IIR filter Objectives: ° To design a band stop Butterworth IIR filter using transformations To use Matlab to simulate the designed filter, obtain and analyse the filter characteristics Prelab: The desired Band stop filter has to meet the following specification Stop band IC3/PP3 to IC3/PP3dB 20 dB attenuation at (IC3/PP3 +100) and (IC3/PP3-200) Hz The pass band attenuation for Butterworth Filter is 3 dB i) Design the Butterworth band stop IIR filter using impulse invariant method. ii) Design the Butterworth band stop IIR filter using Bilinear transformation method. -The gain at 0 is unity Note: Use PP3 as lower stop band frequency (IC3-612, PP3-452) Lab work: i) Develop a MATLAB codes for both the design methods. i Simulate the filter designed in prelab (i) in MATLAB and obtain the results. i) Simulate the filter designed in prelabi) in MATLAB and obtain the response. Post Lab i) Compare the responses obtained using both the design methods. ii) Analyse the responses and suggest the appropriate method for designing with reference to the responses obtained.

Explanation / Answer

Program code :

close all;clear;clc;

%% Declarations

ts = 0.001;

fs = 1/ts;

fc = 5;

t = 0:ts:2;

Wn = pi*fc/(2*fs);

n = 3;

%% Preparation

signal = cos(2*pi*fc*t);

noise = rand(1, length(signal)); % Generating Random Noise

noisySignal = signal + noise;

%% Filtering Stage

[b,a] = butter(n, Wn, 'low');

filteredSignal = filter(b, a, noisySignal);

filteredSignal = filteredSignal - mean(filteredSignal); % Subtracting the mean to block DC Component

%% Plotting

figure(1)

subplot(3,1,1)

plot(t, signal, 'linewidth', 1.5)

title('Signal')

ylim([-1.5 1.5])

grid minor

subplot(3,1,2)

plot(t, noise)

title('Noise')

ylim([-1.5 2])

grid minor

subplot(3,1,3)

plot(t, noisySignal)

title('Noisy Signal')

ylim([-1.5 1.5])

grid minor

figure(2)

plot(t, filteredSignal, 'r', 'linewidth', 1.5)

hold on

plot(t, signal, 'linewidth', 1.5)

hold off

legend('Filtered Signal', 'Original Signal')

grid minor

ylim([-1.5 1.5])