Digital filter in IDL [message #5370] |
Fri, 01 December 1995 00:00 |
yafeng
Messages: 4 Registered: December 1995
|
Junior Member |
|
|
Does anyone know if there is a butterworth filter in IDL?
There is a filter called digital_filter in IDL. It is supposed not
to cause phase shift. But when I implemented this digital filter
in to my data, it does cause phase shift. Anybody tried this
routine?
Thanks a lot.
Yafeng Li
IDL programmmer
|
|
|
Re: Digital filter in IDL [message #5371 is a reply to message #5370] |
Fri, 01 December 1995 00:00  |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
Meili Zhong (yafeng@leland.Stanford.EDU) wrote:
: Does anyone know if there is a butterworth filter in IDL?
: There is a filter called digital_filter in IDL. It is supposed not
: to cause phase shift. But when I implemented this digital filter
: in to my data, it does cause phase shift. Anybody tried this
: routine?
Digital_filter (the routine) designs FIR filters. Such filters have
linear phase shifts, which may be forced exactly to zero by judicious
discarding of output points. This follows from the equivalence of time
delay and linear phase shift.
For example, if the filter has 9 taps, then it will cause a delay of 4
samples (think what happens when a delta function enters the filter).
This will show up as 4*360 degrees of phase shift across the spectrum.
If you discard the first 4 points output by the filter, you'll find that
the phase shift is now zero.
Butterworth filters, and their digital equivalents, are IIR filters, and
as such have non-linear phase response, which cannot be corrected
(exactly) by discarding samples. A useful trick is to pass your data
through such filters once forwards, then again backwards, to cancel out
the non-linearities. The major advantage of IIR filters is in reducing
the number of computations required to achieve a certain sharpness of
transition, so unless you are doing real-time filtering, the FIR filter
produced by digital_filter should do the trick.
Peter
P.S. Have a look at Oppenheim and Schafer "Digital Signal Processing"
or "Signals and Systems" to learn more.
--------------------------------
Peter Webb, HP Labs Medical Dept
E-Mail: peter_webb@hpl.hp.com
Phone: (415) 813-3756
|
|
|