Skip to content Skip to navigation

Connexions

You are here: Home » Content » Fast Convolution

Navigation

Recently Viewed

This feature requires Javascript to be enabled.

Fast Convolution

Module by: Douglas L. Jones. 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: Efficient computation of convolution using FFTs.

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.

Fast Circular Convolution

Since, m=0N1xmhnmmodN=yn is equivalent to Yk=XkHk m 0 N 1 x m h n m N y n is equivalent to Y k X k H k yn y n can be computed as yn=IDFTDFTxnDFThn y n IDFT DFT x n DFT h n

Cost

  • Direct

    • N2 N 2 complex multiplies.
    • NN1 N N 1 complex adds.
  • Via FFTs

    • 3 FFTs + NN multipies.
    • N+3N2log2N N 3 N 2 2 N complex multiplies.
    • 3Nlog2N 3 N 2 N complex adds.
If Hk H k can be precomputed, cost is only 2 FFts + NN multiplies.

Fast Linear Convolution

DFT produces cicular convolution. For linear convolution, we must zero-pad sequences so that circular wrap-around always wraps over zeros.

Figure 1
Figure 1 (figure6.png)

To achieve linear convolution using fast circular convolution, we must use zero-padded DFTs of length NL+M1 N L M 1

Figure 2
Figure 2 (Figure7.png)

Choose shortest convenient N N (usually smallest power-of-two greater than or equal to L+M1 L M 1 ) yn= IDFT N DFT N xn DFT N hn y n IDFT N DFT N x n DFT N h n

note:

There is some inefficiency when compared to circular convolution due to longer zero-padded DFTs. Still, ONlog2N O N 2 N savings over direct computation.

Running Convolution

Suppose L= L , as in a real time filter application, or LM L M . There are efficient block methods for computing fast convolution.

Overlap-Save (OLS) Method

Note that if a length-MM filter hn h n is circularly convulved with a length-NN segment of a signal xn x n ,

Figure 3
Figure 3 (figure4.png)
the first M1 M 1 samples are wrapped around and thus is incorrect. However, for M1nN1 M 1 n N 1 ,the convolution is linear convolution, so these samples are correct. Thus NM+1 N M 1 good outputs are produced for each length-NN circular convolution.

The Overlap-Save Method: Break long signal into successive blocks of N N samples, each block overlapping the previous block by M1 M 1 samples. Perform circular convolution of each block with filter hm h m . Discard first M1 M 1 points in each output block, and concatenate the remaining points to create yn y n .

Figure 4
Figure 4 (Figure1.png)

Computation cost for a length-NN equals 2n 2 n FFT per output sample is (assuming precomputed Hk H k ) 2 FFTs and NN multiplies 2N2log2N+NNM+1=Nlog2N+1NM+1 complex multiplies 2 N 2 2 N N N M 1 N 2 N 1 N M 1 complex multiplies 2Nlog2NNM+1=2Nlog2NNM+1 complex adds 2 N 2 N N M 1 2 N 2 N N M 1 complex adds

Compare to M M mults, M1 M 1 adds per output point for direct method. For a given M M, optimal N N can be determined by finding N N minimizing operation counts. Usualy, optimal N N is 4MNopt8M 4 M Nopt 8 M .

Overlap-Add (OLA) Method

Zero-pad length-LL blocks by M1 M 1 samples.

Figure 5
Figure 5 (figure5.png)

Add successive blocks, overlapped by M1 M 1 samples, so that the tails sum to produce the complete linear convolution.

Figure 6
Figure 6 (Figure2.png)
Computational Cost: Two length N=L+M1 N L M 1 FFTs and M M mults and M1 M 1 adds per L L output points; essentially the sames as OLS method.

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 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 (?)

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