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

6 visualizaciones (últimos 30 días)
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

Respuestas (1)

Star Strider
Star Strider el 5 de Abr. de 2017
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 comentarios
Ganesh Petkar
Ganesh Petkar el 10 de Abr. de 2017
Thanks for your input. I would like to know how to remove the noise from the signal having same frequency?
Star Strider
Star Strider el 10 de Abr. de 2017
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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by