Skip to content Skip to navigation

Connexions

You are here: Home » Content » Quantization Error in FIR Filters

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Recently Viewed

This feature requires Javascript to be enabled.

Quantization Error in FIR Filters

Module by: Douglas L. Jones

Summary: FIR filters suffer from both data and coefficient quantization; each has different effects. Double-precision accumulation inside the FIR filter structure greatly reduces the data quantization error.

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

In digital filters, both the data at various places in the filter, which are continually varying, and the coefficients, which are fixed, must be quantized. The effects of quantization on data and coefficients are quite different, so they are analyzed separately.

Data Quantization

Typically, the input and output in a digital filter are quantized by the analog-to-digital and digital-to-analog converters, respectively. Quantization also occurs at various points in a filter structure, usually after a multiply, since multiplies increase the number of bits.

Direct-form Structures

There are two common possibilities for quantization in a direct-form FIR filter structure: after each multiply, or only once at the end.

Figure 1
(a) Single-precision accumulate; total variance =MΔ212 M Δ 2 12
Figure 1(a) (fig1QuantErrorFIR.png)
(b) Double-precision accumulate; variance =Δ212 Δ 2 12
Figure 1(b) (fig2QuantErrorFIR.png)
In the latter structure, a double-length accumulator adds all 2B1 2 B 1 bits of each product into the accumulating sum, and truncates only at the end. Obviously, this is much preferred, and should always be used wherever possible. All DSP microprocessors and most general-pupose computers support double-precision accumulation.

Transpose-form

Similarly, the transpose-form FIR filter structure presents two common options for quantization: after each multiply, or once at the end.

Figure 2
(a) Quantize at each stage before storing intermediate sum. Output variance =MΔ212 M Δ 2 12
Figure 2(a) (fig3QuantErrorFIR.png)
or
(b) Store double-precision partial sums. Costs more memory, but variance =Δ212 Δ 2 12
or (fig4QuantErrorFIR.png)

The transpose form is not as convenient in terms of supporting double-precision accumulation, which is a significant disadvantage of this structure.

Coefficient Quantization

Since a quantized coefficient is fixed for all time, we treat it differently than data quantization. The fundamental question is: how much does the quantization affect the frequency response of the filter?

The quantized filter frequency response is DTFThQ=DTFThinf. prec.+e= H inf. prec. w+ H e w DTFT h Q DTFT h inf. prec. e H inf. prec. w H e w Assuming the quantization model is correct, H e w H e w should be fairly random and white, with the error spread fairly equally over all frequencies w-ππ w ; however, the randomness of this error destroys any equiripple property or any infinite-precision optimality of a filter.

Exercise 1

What quantization scheme minimizes the L 2 L 2 quantization error in frequency (minimizes -ππ|Hw H Q w|2dw w H w H Q w 2 )? On average, how big is this error?

Ideally, if one knows the coefficients are to be quantized to BB bits, one should incorporate this directly into the filter design problem, and find the MM BB-bit binary fractional coefficients minimizing the maximum deviation ( L L error). This can be done, but it is an integer program, which is known to be np-hard (i.e., requires almost a brute-force search). This is so expensive computationally that it's rarely done. There are some sub-optimal methods that are much more efficient and usually produce pretty good results.

Comments, questions, feedback, criticisms?

Send feedback