How to create a frequency domain bandstop filter?
25 views (last 30 days)
Show older comments
Shehzaib Shafique
on 12 Dec 2021
Commented: Star Strider
on 12 Dec 2021
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
0 Comments
Accepted Answer
Star Strider
on 12 Dec 2021
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
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
More Answers (0)
See Also
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!