band pass filter a signal using FFT

조회 수: 47 (최근 30일)
zozo
zozo 2012년 4월 16일
댓글: Joydeb Saha 2021년 6월 19일
I have a random signal containing frequencies from 1Hz to 1000Hz (as viewed on a spectrogram).
I want to extract the signal containing freqs from 200Hz to 600Hz from it and zero out other frequencies (band pass filter). How can I do it in freq. domain efficiently? (since my signal is very long, doing it in time domain is time consuming using filter coefficient method)
Please help with an example.

채택된 답변

Wayne King
Wayne King 2012년 4월 16일
With such a high sampling frequency and that many samples, why don't you downsample the signal using decimate()?
Since you are only interested in content between 100 and 300 Hz, you can downsample that signal a lot - by at least a factor of 25.
y = decimate(input,25);
That will give you data sampled at 2 kHz and make designing your filter much, much easier.
  댓글 수: 2
zozo
zozo 2012년 4월 16일
this works well..thank you sir. :)
Jan
Jan 2012년 11월 27일
If this solves your problem, please accept this anser.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Wayne King
Wayne King 2012년 4월 16일
Have you considered fftfilt()?
You can design your FIR filter using fdesign.bandpass and then use fftfilt().
  댓글 수: 2
zozo
zozo 2012년 4월 16일
fs=1000;
t=0:1/fs:2-1/fs;
x=sin(2*pi*100*t)+cos(2*pi*200*t)+sin(2*pi*150*t)+cos(2*pi*60*t);
f = fs*linspace(0,1,length(x));
plot(f,abs(fft(x)))
i want to have only 100Hz,150Hz freqs in my output signal. How can I do this using fdesign.bandpass?
[I tried but Iam having problems specifying inputs to the function]
zozo
zozo 2012년 4월 16일
Also, how do I convert the object 'd' into double to use it as an input to fftfilt() ?

댓글을 달려면 로그인하십시오.


Wayne King
Wayne King 2012년 4월 16일
d = fdesign.bandpass('Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2',75,100,150,175,50,0.5,50,1e3);
Hd = design(d);
y = filter(Hd,x);
If you want an IIR filter
Hd1 = design(d,'butter');
y1 = filter(Hd1,x);
plot(psd(spectrum.periodogram,y1,'Fs',1e3,'NFFT',length(y1)));
  댓글 수: 7
zozo
zozo 2012년 4월 16일
It is a signal recorded by an array of microphones. When viewed on a spectrogram, there was a line passing between the band of 100Hz and 300Hz. To further process it, I needed to scoop out signal from this band of frequencies(ignore other frequencies to reduce noise contribution) efficiently.
Joydeb Saha
Joydeb Saha 2021년 6월 19일
How to remove the spikes from the data with a narrow bandpass filter? How to apply an inverse FFT algorithm to recreate the time-series data (filtered) from the frequency domain to the time domain? attaching the data.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by