Personal tools
  •  
You are here: Home Electrical and Computer Engineering Signals and Systems Lecture 9: Convolution Using the DFT

Lecture 9: Convolution Using the DFT

Document Actions
  • Content View
  • Bookmarks
  • CourseFeed
Schedule :: The DFT :: Aliasing & Leakage :: Examples :: The FFT :: Convolution

We have seen the convolution theorem over and over: convolution in time is the transform of multiplication in the frequency domain. By numerically computing the transform using the DFT, we can compute convolutions of sequences. There are some issues to be very careful of, however, since the DFT imposes certain requirements on the signals. We will worry later about this. For the moment, consider the computational complexity. Suppose I have a sequence $x$ of $N$ points and another sequence $y$ also of $N$ points. We know that the convolution will have $2N-1$ points. Computation of each of the outputs requires approximately $N^2$ computations. The overall complexity for computing convolution is therefore $O(N^2)$ .

But here is the neat thing: We compute the DFT of $x$ and the DFT of $y$ , multiply the points in the frequency domain, then transform back:

\begin{displaymath}X_r = \mbox{DFT}(x_k) \end{displaymath}

\begin{displaymath}Y_r = \mbox{DFT}(y_k) \end{displaymath}

\begin{displaymath}Z_r = X_r Y_r \end{displaymath}

\begin{displaymath}z_k = \mbox{IDFT}(Z_r) \end{displaymath}

This sure seems like the long way around the barn! But, consider the number of computations if we do the DFTs using FFTs: Each transform requires $O(N\log_2 N)$ operations, the multiplication is $O(N)$ , and the inverse transform is $O(N\log_2 N)$ . The overall computation is $O(N\log_2 N)$ . (That's how orders are computed!). So it requires fewer computations (by far!) than straightforward convolution, at least of $N$ is large enough. This is, in fact, the way M ATLAB computes its convolutions. This is also the way that symbolic packages (such as Mathematica) compute their multiplications of large integers.

Now the issues regarding use of the DFT for convolution. Recall that the DFT always assumes that the signal is periodic . This is the key to understanding the convolution. The convolution is done on periodic signals, where the period is the number of points in the DFT, and the result of the convolution is periodic also. Suppose that we are dealing with $N$ -point DFTs. We can define a convolution which is periodic with period $N$ by

\begin{displaymath}y_k = f_k*g_k = \sum_{n=0}^{N-1} f_n g_{((k-n))} \end{displaymath}

The notation $((k-n))$ is used to indicate that the difference is taken modulo $N$ . Suppose $N=10$ , and $f_k$ is a sequence 6 points long and $g_k$ is a sequence 10 points long. Draw sequences, and their 10-periodic extensions. Show graphically what the periodic convolution is. The periodic convolution is the convolution computed when DFTs are used.

Suppose we don't want the effects of the circular convolution; we just want regular linear convolution. What we need to do is zero pad. If $f_k$ is a sequence of length $N$ and $g_k$ is a sequence of length $M$ , then their convolution will have $N+M-1$ points. If we take a DFT with at least that many points, there will be no wrap around. Show pictures.

Copyright 2008, by the Contributing Authors. Cite/attribute Resource . admin. (2006, June 07). Lecture 9: Convolution Using the DFT. Retrieved January 07, 2011, from Free Online Course Materials — USU OpenCourseWare Web site: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Signals_and_Systems/9_5node5.html. This work is licensed under a Creative Commons License Creative Commons License