How to create a frequency domain bandstop filter?

25 views (last 30 days)
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

Star Strider
Star Strider on 12 Dec 2021
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.
.

More Answers (0)

Categories

Find more on Digital and Analog Filters in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!