Articles

Home  >  Articles  >  General Articles  >  Hybrid FIR and IIR Filters
Printer Friendly Version

Hybrid FIR and IIR Filters

Page: 1 2 3 4
by John Ehlers -  Aug 28, 2006
6.2 (from 5 ratings)

Figure 1.  Frequency Response of a 4 Bar SMA.

Figure 2.  Frequency Response of a 6th Order FIR filter notches 2, 3, and 4 bar cycles.

All FIR filters do not need to have symmetrically distributed coefficients.  For example, the coefficients of a 4-bar WMA are [4 3 2 1]/10.  The delay of a 4-bar WMA is only 1 bar at all frequencies and its frequency response is shown in Figure 3.  Clearly, there are no notches because of the asymmetrical coefficient weighting.  Additional smoothing  can be obtained by increasing the length of the filter.  For example, a 7-bar WMA frequency response is shown in Figure 4.  The lag of a 7-bar WMA is 2 bars at all frequencies.

Figure 3.  Frequency Response of a 4-bar WMA.

Figure 4.  Frequency Response of a 7-bar WMA.

The responses of these FIR filters can be contrasted to the response of an IIR filter.  For example, and EMA that has a 2-bar low frequency lag has the frequency response shown in Figure 5.  Comparing Figure 5 to Figure 4 we see that the 7-bar WMA has marginally better smoothing than the 5-bar EMA.  The real difference between these filters is in their lag characteristics.  While the 7-bar WMA has a 2-bar lag at all frequencies, the lag of the 5-bar EMA is shown in Figure 6.  The low frequency lag is 2 bars, but this lag quickly decreases so the frequencies whose period are shorter than about 8 bars have a modest lead.  This really is inconsequential because these shorter cycles have been reduced in amplitude by the filter.

Figure 5.  Frequency Response of a 5-bar EMA.

Page: 1 2 3 4
» Page 3




Copyright © 2001-2008 Trade2Win Ltd.