Skip to content Skip to navigation

Connexions

You are here: Home » Content » Efficiency in Filtering

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Efficiency in Filtering

Module by: Don Johnson. E-mail the author

User rating (How does the rating system work?)
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)

Summary: Compares the efficiency of frequency-domain and time-domain filtering.

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.

To determine for what signal and filter durations a time- or frequency-domain implementation would be the most efficient, we need only count the computations required by each. For the time-domain, difference-equation approach, we need N x 2 q +1 N x 2 q 1 . The frequency-domain approach requires three Fourier transforms, each requiring K2logK K 2 K computations for a length-KK FFT, and the multiplication of two spectra ( 6K 6 K computations). The output-signal-duration-determined length must be at least N x +q N x q . Thus, we must compare

N x 2q+16 N x +q+32 N x +qlog2 N x +q N x 2 q 1 6 N x q 3 2 N x q 2 N x q (1)
Exact analytic evaluation of this comparison is quite difficult (we have a transcendental equation to solve). Insight into this comparison is best obtained by dividing by N x N x .
2q+161+q N x +321+q N x log2 N x +q 2 q 1 6 1 q N x 3 2 1 q N x 2 N x q (2)
With this manipulation, we are evaluating the number of computations per sample. For any given value of the filter's order qq, the right side, the number of frequency-domain computations, will exceed the left if the signal's duration is long enough. However, for filter durations greater than about 10, as long as the input is at least 10 samples, the frequency-domain approach is faster so long as the FFT's power-of-two constraint is advantageous.

The frequency-domain approach is not yet viable; what will we do when the input signal is infinitely long? The difference equation scenario fits perfectly with the envisioned digital filtering structure, but so far we have required the input to have limited duration (so that we could calculate its Fourier transform). The solution to this problem is quite simple: Section the input into frames, filter each, and add the results together. To section a signal means expressing it as a linear combination of length- N x N x non-overlapping "chunks." Because the filter is linear, filtering a sum of terms is equivalent to summing the results of filtering each term.

xn=m=-xnm N x yn=m=-ynm N x x n m x n m N x y n m y n m N x (3)
As illustrated in Figure 1, note that each filtered section has a duration longer than the input. Consequently, we must literally add the filtered sections together, not just butt them together.

Figure 1: The noisy input signal is sectioned into length-48 frames, each of which is filtered using frequency-domain techniques. Each filtered section is added to other outputs that overlap to create the signal equivalent to having filtered the entire input. The sinusoidal component of the signal is shown as the red dashed line.
Figure 1 (sig25.png)

Computational considerations reveal a substantial advantage for a frequency-domain implementation over a time-domain one. The number of computations for a time-domain implementation essentially remains constant whether we section the input or not. Thus, the number of computations for each output is 2 q +1 2 q 1 . In the frequency-domain approach, computation counting changes because we need only compute the filter's frequency response Hk H k once, which amounts to a fixed overhead. We need only compute two DFTs and multiply them to filter a section. Letting N x N x denote a section's length, the number of computations for a section amounts to N x +qlog2 N x +q+6 N x +q N x q 2 N x q 6 N x q . In addition, we must add the filtered outputs together; the number of terms to add corresponds to the excess duration of the output compared with the input (qq). The frequency-domain approach thus requires 1+q N x log2 N x +q+7q N x +6 1 q N x 2 N x q 7 q N x 6 computations per output value. For even modest filter orders, the frequency-domain approach is much faster.

Exercise 1

Show that as the section length increases, the frequency domain approach becomes increasingly more efficient.

Solution

Let NN denote the input's total duration. The time-domain implementation requires a total of N2q+1 N 2 q 1 computations, or 2q+1 2 q 1 computations per input value. In the frequency domain, we split the input into N N x N N x sections, each of which requires 1+q N x log2 N x +q+7q N x +6 1 q N x 2 N x q 7 q N x 6 per input in the section. Because we divide againby N x N x to find the number of computations per input value in the entire input, this quantity decreasesas N x N x increases. For the time-domain implementation, it stays constant.

Note that the choice of section duration is arbitrary. Once the filter is chosen, we should section so that the required FFT length is precisely a power of two: Choose N x N x so that N x +q=2l N x q 2 l

Content actions

Give Feedback:

E-mail the module author | Rate 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)

Download:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

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

What is in a lens?

Lens makers point to 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 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