Design bandpass digital filter for the frequency range 20 HZ to 200 HZ

6 次查看(过去 30 天)
Hi, I have wav file having frequency range from 20HZ to 5khz. I would like design digital filter for the fequency range 20HZ to 200HZ so please help me to design bandpass filter using matlab code or please share any example code for the same.
Thanks In Advance Ganesh

回答(1 个)

Star Strider
Star Strider 2017-4-5
You can adapt this example:
Fs = 5000; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
Wp = [20 200]/Fn; % Passband Frequencies (Normalized)
Ws = [19 201]/Fn; % Stopband Frequencies (Normalized)
Rp = 10; % Passband Ripple (dB)
Rs = 50; % Stopband Ripple (dB)
[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs); % Filter Order
[c,b,a] = cheby2(n,Rs,Ws); % Filter Design
[sosbp,gbp] = zp2sos(c,b,a); % Convert To Second-Order-Section For Stability
figure(1)
freqz(sosbp, 2^16, Fs) % Bode Plot Of Filter
set(subplot(2,1,1), 'XLim',[0 250]) % ‘Zoom’ X-Axis To See Passband
set(subplot(2,1,2), 'XLim',[0 250]) % ‘Zoom’ X-Axis To See Passband
  2 个评论
Ganesh Petkar
Ganesh Petkar 2017-4-10
Thanks for your input. I would like to know how to remove the noise from the signal having same frequency?
Star Strider
Star Strider 2017-4-10
My pleasure.
If you have broadband noise in the same part of the spectrum as your signal, a frequency-selective filter will not remove it. You might be able to use a wavelet decomposition. There is a tutorial on this in the Wavelet Toolbox. I have no recent experience with wavelets, so I cannot help with that.)
If you have narrow-band noise, for example 50 Hz or 60 Hz powerline noise, use a notch filter. See Remove the 60 Hz Hum from a Signal (link) for a tutorial.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Filter Design 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by