Skip to content Skip to navigation

Connexions

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

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.

    • External bookmarks
  • E-mail the author

Lenses

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.

This content is ...

In these lenses

  • richb's DSP

    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.

Recently Viewed

Tags

(What is a tag?)

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
Figure 1: Step 1
Subfigure 1.1Subfigure 1.2
Subfigure 1.1 (cconv_s1.png)Subfigure 1.2 (cconv_s2.png)
  • 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).
Figure 2: Step 2
Figure 2 (cconv_s3.png)
  • 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)

Figure 3: Two discrete-time signals to be convolved.
Subfigure 3.1Subfigure 3.2
Subfigure 3.1 (cconv_p1.png)Subfigure 3.2 (cconv_p2.png)

  • h ( ( m ) ) N h ( ( m ) ) N

Figure 4
Figure 4 (cconv_p3.png)

Multiply fm f m and sum sum to yield: y0=3 y 0 3

  • h ( ( 1 m ) ) N h ( ( 1 m ) ) N

Figure 5
Figure 5 (cconv_p4.png)

Multiply fm f m and sum sum to yield: y1=5 y 1 5

  • h ( ( 2 m ) ) N h ( ( 2 m ) ) N

Figure 6
Figure 6 (cconv_p5.png)

Multiply fm f m and sum sum to yield: y2=3 y 2 3

  • h ( ( 3 m ) ) N h ( ( 3 m ) ) N

Figure 7
Figure 7 (cconv_p6.png)

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