Mark

]]>I don’t understand why they use a Butterworth filter. It is maximally flat in the passband. How is this of any great value? The group delay is non-constant over the passband.

That’s true if you apply it in the forward direction only. However, the implementation that Mann is using (Matlab’s filtfilt function) is applied first in the forward, then that output is run backwards through the filter. The filtfilt implementation produces a zero group delay, at the cost of being non-causal of course.

]]>In terms of the amplitude spectrum, it is the amplitude spectrum that is being modified in order for the filter to work. There are many types of filter but the two common ones used in my area of expertise are the Ormsby (“boxcar”) filter and the Butterworth filter.

For an Ormsby filter used as a band pass filter then you would set four parameters – F1, F2, F3 and F4 which are the filter “corner” points. The amplitude spectrum from zero frequency to F1 is set to zero. From F1 to F2 the amplitude spectrum of the filter increases linearly from zero to one. Between F2 and F3 the amplitude spectrum is flat with a magnitude of one and then again decreases linearly back to zero between frequencies F3 and F4. To run the same filter in low pass mode you would only specify frequencies F3 and F4, the amplitude spectrum of the filter then being a constant 1 from zero frequency up to F3 and then linearly tapering down to zero amplitude at F4. Diagram below has frequency along the x-axis and amplitude on the Y-axis

        F2                    F3

          +++++++++++

         +                       +

        +                          +

———————————

        F1                          F4

A Butterworth filter in bandpass mode is defined by two filter points, equivalent to F3 and F4 in the above picture. However, the slope of the filter is then defined in dB/Octave (an octave is a doubling/halving of the frequency), usually referred to as the roll-on or roll-off the filter. With a Butterworth filter the decay therefore never causes the signal to actually zero any frequency, the amplitude is simply progressively more attentuated away from the pass band. For a low pass Butterworth the filter would be defined by one frequency (F3 in the above picture). Below this frequency the signal is not modifed, above this frequency the signal is progressively attenuated according to the filter slope. A gentle slope might be -6dB/Octave, more agressive slopes might be -18dB/Octave.

For an Ormsby filter, if the two frequencies defining the slope (Ie F1/F2 or F3/F4) are too close together and the slope then becomes very steep this can create an undesirable “ringing” effect in the resulting filtered signal. Butterworth filters are regarded as more gentle in this regard, although if the roll-off slope is made very steep (eg -72 dB/Octave) then ringing is likely to be observed in the filtered signal.

The other aspect of filter design that has to be considered is the length of the filter (sometimes called the operator). The operator has to be of sufficient length to properly work as the required filter.

After designing the filter then it is applied by convolution, either in the time domain (reverse order of operator then repeatedly shift, cross-multiply with signal, add products) or in the frequency domain (multiply amplitude spectra of signal and filter, add phase spectra).

]]>Also this is a digital rather than analogue filtering application. FIR digital filters allow for constant group delay. The simplest would be a moving time average. If you had say a 10 year average, obviously the first and final 5 years of the data set would be unavailable. A more complex filter is easily developed with a simple algorithm explained in most introductory texts on digital signal processing. (Rabiner and Gold, Oppeinhamer and Schaefer)

I have recent experience with this technique because professionally I developed a real-time interpolator to allow frequency conversion enabling legacy games to replay their high quality sounds in a gaming environment. Linear phase is great, though not strictly necessary, in interpolation, because the output data can be verified by inspection.

]]>a) Truncate the series after filtering to where the filtered response is valid or

How would you normally determine where the valid portion of the filtered response starts and ends?

]]>(b) apply a cosine taper to the filtered response in order to smooth the end amplitudes to zero.

Yes. but that would make the trend go down instead of up and therefore is a no-no. ;)

Mark

]]>(a) Truncate the series after filtering to where the filtered response is valid or

(b) apply a cosine taper to the filtered response in order to smooth the end amplitudes to zero.

For applications such as seismic processing for oil exploration, losing the start or end of the series is academic as the response at the start or end of the time series is generally of no interest. However, when relating well log (borehole) data to the seismic response the truncation effect can be annoying and will result in the analysis having to disregard (lose or throwaway) data at the end of the filtered time series.

You cannot low pass filter a time series and expect meaningful results which can be analysed to still remain at the ends of the filtered signal.

]]>