Connexions

You are here: Home » Content » Circular Convolution and the DFT
Content Actions
Lenses

What is 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.

This content is ...
Affiliated with (?)
This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • This module is included inLens: Rice University OpenCourseWare
    By: OpenCourseWare ConsortiumAs a part of collection:"Signals and Systems"

    Click the "Rice University OCW" link to see all content affiliated with them.

    Rice University OCW
Also in these lenses
  • This module is included inLens: richb's DSP resources
    By: Richard BaraniukAs a part of collection:"Signals and Systems"

    Comments:

    "My introduction to signal processing course at Rice University."

    Click the "richb's DSP" link to see all content selected in this lens.

    richb's DSP
Tags

(?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Circular Convolution and the DFT

Module by: Justin Romberg

Summary: This module describes the circular convolution algorithm and an alternative algorithm

Introduction

You should be familiar with Discrete-Time Convolution, which tells us that given two discrete-time signals xn x n , the system's input, and hn h n , the system's response, we define the output of the system as
yn=xn*hn=k=-xkhn-k y n x n h n k x k h n k (1)
When we are given two DFTs (finite-length sequences usually of length NN), we cannot just multiply them together as we do in the above convolution formula, often referred to as linear convolution. Because the DFTs are periodic, they have nonzero values for nN n N and thus the multiplication of these two DFTs will be nonzero for nN n N . We need to define a new type of convolution operation that will result in our convolved signal being zero outside of the range n=01N-1 n 0 1 N 1 . This idea led to the development of circular convolution, also called cyclic or periodic convolution.

Circular Convolution Formula

What happens when we multiply two DFT's together, where Yk Y k is the DFT of yn y n ?
Yk=FkHk Y k F k H k (2)
when 0kN-1 0 k N 1
Using the DFT synthesis formula for yn y n
yn=1Nk=0N-1FkHkj2πNkn y n 1 N k 0 N 1 F k H k j 2 N k n (3)
And then applying the analysis formula Fk=m=0N-1fm-j2πNkn F k m 0 N 1 f m j 2 N k n
yn=1Nk=0N-1m=0N-1fm-j2πNknHkj2πNkn=m=0N-1fm1Nk=0N-1Hkj2πNkn-m y n 1 N k 0 N 1 m 0 N 1 f m j 2 N k n H k j 2 N k n m 0 N 1 f m 1 N k 0 N 1 H k j 2 N k n m (4)
where we can reduce the second summation found in the above equation into h ( ( n m ) ) N =1Nk=0N-1Hkj2πNkn-m h ( ( n m ) ) N 1 N k 0 N 1 H k j 2 N k n m yn=m=0N-1fmh ( ( n m ) ) N y n m 0 N 1 f m h ( ( n m ) ) N which equals circular convolution! When we have 0nN-1 0 n N 1 in the above, then we get:
ynfnhn y n f n h n (5)
note: The notation represents cyclic convolution "mod N".

Steps for Cyclic Convolution

Steps for cyclic convolution are the same as the usual convo, except all index calculations are done "mod N" = "on the wheel"
    Steps for Cyclic Convolution
  • Step 1: "Plot" fm f m and h ( ( m ) ) N h ( ( m ) ) N
cconv_s1.pngcconv_s2.png
Subfigure 1.1
Subfigure 1.2
Figure 1: Step 1
  • Step 2: "Spin" h ( ( m ) ) N h ( ( m ) ) N n n notches ACW (counter-clockwise) to get h ( ( n m ) ) N h ( ( n m ) ) N (i.e. Simply rotate the sequence, hn h n , clockwise by nn steps).
cconv_s3.png
Figure 2: Step 2
  • Step 3: Pointwise multiply the fm f m wheel and the h ( ( n m ) ) N h ( ( n m ) ) N wheel. sum=yn sum y n
  • Step 4: Repeat for all 0nN-1 0 n N 1
Example 1: Convolve (n = 4) 
cconv_p1.pngcconv_p2.png
Subfigure 3.1
Subfigure 3.2
Figure 3: Two discrete-time signals to be convolved.
  • h ( ( m ) ) N h ( ( m ) ) N
cconv_p3.png
Figure 4
Multiply fm f m and sum sum to yield: y0=3 y 0 3
  • h ( ( 1 m ) ) N h ( ( 1 m ) ) N
cconv_p4.png
Figure 5
Multiply fm f m and sum sum to yield: y1=5 y 1 5
  • h ( ( 2 m ) ) N h ( ( 2 m ) ) N
cconv_p5.png
Figure 6
Multiply fm f m and sum sum to yield: y2=3 y 2 3
  • h ( ( 3 m ) ) N h ( ( 3 m ) ) N
cconv_p6.png
Figure 7
Multiply fm f m and sum sum to yield: y3=1 y 3 1
Example 2 
The following demonstration allows you to explore this algorithm for circular convolution. See here for instructions on how to use the demo.

Alternative Algorithm

    Alternative Circular Convolution Algorithm
  • Step 1: Calculate the DFT of fn f n which yields Fk F k and calculate the DFT of hn h n which yields Hk H k .
  • Step 2: Pointwise multiply Yk=FkHk Y k F k H k
  • Step 3: Inverse DFT Yk Y k which yields yn y n
Seems like a roundabout way of doing things, but it turns out that there are extremely fast ways to calculate the DFT of a sequence.
To circularily convolve 2 2 N N-point sequences: yn=m=0N-1fmh ( ( n m ) ) N y n m 0 N 1 f m h ( ( n m ) ) N For each n n : N N multiples, N-1 N 1 additions
N N points implies N2 N 2 multiplications, NN-1 N N 1 additions implies ON2 O N 2 complexity.

Comments, questions, feedback, criticisms?

Send feedback