How to create a frequency domain bandstop filter?

Hi
I have a signal and i want to create a frequency-domain bandstop filter to remove a noise of 1100 Hz. i have already removed this frequency by using IIR notch filter. Now i want to learn how can i create a frequency domain bandstop filter?
Can someone please guide?
Thank you in advance

 Accepted Answer

Use the fftfilt function, and the FIR filter that produces the desired result.
A suitable, simple notch filter —
Fs = 5000; % Sampling Frequency (Must Be > 2200)
Fn = Fs/2; % Nyquist Frequency
Ws = [1090 1110]/Fn; % Stopband (Normalised)
order = 2^8 % Can Be Anything (I Like Powers-Of-2), Higher Values -> Narrower Stopband
order = 256
h1 = fir1(order, Ws, 'stop'); % Create Filter
figure
freqz(h1, 1, 2^12, Fs)
sgtitle(sprintf('Bode Plot: Order %d, 1100 Hz Stopband Filter', order))
Use the correct Sampling Frequency. Experiment to get different filter designs.
.

2 Comments

Thank you so much sir. It really helped a lot
As always, my pleasure!
.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!