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
댓글 수: 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!