Bandpass Filter By Using Butter

4 visualizzazioni (ultimi 30 giorni)
Okan
Okan il 4 Lug 2012
Hi,
I am trying to perform bandpass filter by using butter command and after I perform bandpass filter, I calculate the FFT Amplitudes of data just filtered. However, the the plot of FFT Amplitudes doesn' t resemble those usually plotted for Ambient Noise Data. Also, the related part of My Code is below;
fNorm = [0.1/(100/2), 20/(100/2)];
[b, c] = butter(4, fNorm, 'bandpass');
a = filtfilt(b, c, a);
How can I solve this problem?

Risposte (2)

Wayne King
Wayne King il 4 Lug 2012
You haven't given us a lot to go on because we don't know what you mean by:
"However, the plot of FFT Amplitudes doesn' t resemble those usually plotted for Ambient Noise Data"
A couple things:
  • Because your highpass frequency here is 0.1 Hz, do you really need a bandpass filter? Can't you just remove the mean with
sig = detrend(sig,0);
and then just design a lowpass filter:
[B,A] = butter(4,(2*20)/100);
  • You are using filtfilt() to implement zero phase filtering. You should realize that is equivalent to multiplying the Fourier transform of your signal by the magnitude-squared Fourier transform of the filter's frequency response. For a Butterworth filter, the frequency response in the passband will be essentially 1, so that won't make much difference there, but outside the passband, using filtfilt() will provide more attenuation than just using the filter with filter() (No zerophase filtering)
  1 Commento
Dr. Seis
Dr. Seis il 4 Lug 2012
Wayne - the frequency response of true ambient noise (seismic) data should resemble that of random noise. However, depending on location, there may be things off in the distance away from a seismometer (like car traffic, farm equipment, trains, cows, etc.) that might show up in the frequency response, too. (I assume its seismic data based on their previous posts, which they still have not responded to).
Zero phase filtering is important in processing seismic data (we do not want to affect the phase of our signal). To do this we filter the data forwards and backwards (as you say) to preserve the phase in our signal... but I typically only design a 2-pole Butterworth so that the fall off using "filtfilt" will resemble a 4-pole using "filter".

Accedi per commentare.


Dr. Seis
Dr. Seis il 4 Lug 2012
Okan - Ambient noise is like random noise... the frequency domain response (if you were to plot the abs of the frequency domain amplitudes) should be relatively flat. However, as soon as you filter the data you will be removing/attenuating frequency components and the spectrum will (of course) no longer be approx. flat.
Or is there some other concern?

Community Treasure Hunt

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

Start Hunting!

Translated by