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

조회 수: 6 (최근 30일)
Ganesh Petkar
Ganesh Petkar 2017년 4월 5일
댓글: Star Strider 2017년 4월 10일
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