Design bandpass digital filter for the frequency range 20 HZ to 200 HZ
5 ビュー (過去 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
0 件のコメント
回答 (1 件)
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 件のコメント
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 Center および File Exchange で Filter Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!