You are on page 1of 29

6-1

Chapter 6

The Discrete Fourier Transform

Goal: Given a finite-duration sequence x[n], 0 ≤ n ≤ N − 1, we want to obtain a Fourier


representation for x[n]. This representation, known as the Discrete Fourier Transform (DFT),
will enable us to analyze important properties for Linear systems. The DFT will be shown
to be a very important tool in digital signal processing.

Definition: Given a finite-duration sequence x[n], 0 ≤ n ≤ N − 1, the DFT


X[k], 0 ≤ k ≤ N − 1 is defined as

N
X −1
X[k] = x[n]e−j2πnk/N , 0 ≤ k ≤ N − 1 (6.1)
n=0

The original sequence x[n] can be obtained from the DFT representation X[k]
by the following

N −1
1 X
x[n] = X[k]ej2πnk/N , 0 ≤ n ≤ N − 1 ♦ (6.2)
N k=0
In these notes we will examine various properties pertaining to 6.1 and 6.2. An important
property is the fact that X[k] in 6.1 is periodic with period N , i.e.,
X[k + N ] = X[k] (6.3)
Also, in spite of the fact that x[n] is of finite duration, 0 ≤ n ≤ N − 1, we can still define
x[n] for values of n > N . As an example,
x[N + 1] = x[1] (6.4)

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-2 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

This issue of periodicity can be best studied through the point of view that x[n] is one period
of a periodic sequence x̃[n], and that X[k] is one period of a periodic sequence X̃[k]. For
example, figure 6.1 shows a finite sequence x[n] of length 5 and its periodic extension x̃[n].

x[n]
" "
#

$ $
% &

N =5

 '

n
N −1

x̃[n]

 
  0
  1 (
)

  . , ,
 /
 -


2   *
3
      +

  


 

n
−N −(N − 1) −1 N −1N N +1 2N

Figure 6.1: A finite sequence x[n] and its periodic extension x̃[n].

Therefore, we will examine first the Fourier representation for periodic discrete sequences,
the Discrete Fourier series (DFS).

6.1 The Discrete Fourier Series (DFS)


Consider a periodic sequence x[n],

x̃[n] = x̃[n + rN ] (6.5)

where r is an integer. We can represent x̃[n] in terms of the complex exponentials ej2πkn/N
as follows: ∞
1 X
x̃[n] = X̃[k]ej2πkn/N (6.6)
N k=−∞

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.1. THE DISCRETE FOURIER SERIES (DFS) 6-3

Since the set ej2πkn/N is periodic with period N , that is,


j2πkn j2π(k+rN )n
e N =e N (6.7)

the set ej2πkn/N , 0 ≤ k ≤ N −1 is complete. Therefore, we need only N complex exponentials


to completely represent x̃[n]. Hence, 6.6 can be written in the following finite summation:
N −1
1 X
x̃[n] = X̃[k]ej2πkn/N (6.8)
N k=0

Theorem:

The coefficients X̃[k], 0 ≤ k ≤ N − 1 in 6.8 can be obtained from the sequence


x̃[n] by the following summation

N
X −1
X̃[k] = x̃[n]e−j2πkn/N (6.9)
n=0

Proof :

Multiply both sides of 6.8 by e−j2πrn/N and perform the summation from n = 0
to N − 1, that is,

N
X −1 N −1 N −1
−j2πrn/N 1 XX
x̃[n]e = X̃[k]ej2π(k−r)n/N (6.10)
n=0
N n=0 k=0

Interchange the order of summation in 6.10,

N −1 N −1
( N −1
)
X X 1 X j2π(k−r)n/N
x̃[n]e−j2πrn/N = X̃[k] e (6.11)
n=0 k=0
N n=0

Now the term between the braces has a value of one if (k − r) is an integer
multiple of the period N , i.e.,

N −1 ½
1 X j2π(k−r)n/N 1, (k − r) = mN
e = (6.12)
N n=0 0, otherwise

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-4 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

where m is an integer. We need only consider the case m = 0, i.e.,

N −1 ½
1 X j2π(k−r)n/N 1, k = r
e = (6.13)
N n=0 0, elsewhere

From 6.13 and 6.11

N
X −1 N
X −1
x̃[n]e−j2πrn/N = X̃[k] (6.14)
n=0 k=0,k=r

Therefore,

N
X −1
X̃[k] = x̃[n]e−j2πkn/N (6.15)
n=0

Q.E.D.

In summary, given a periodic sequence x̃[n] = x̃[n + rN ], r is an integer, the Discrete


Fourier Series (DFS) representation is:
N −1
1 X
x̃[n] = X̃[k]ej2πkn/N (6.16)
N k=0
N
X −1
X̃[k] = x̃[n]e−j2πkn/N (6.17)
n=0

4
If we define the parameter WN = e−j2π/N , we can write 6.16 and 6.17, in terms of WN as:
N −1
1 X
x̃[n] = X̃[k]WN−kn (6.18)
N k=0
N
X −1
X̃[k] = x̃[n]WNkn (6.19)
n=0

Notes:

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.1. THE DISCRETE FOURIER SERIES (DFS) 6-5

1. Both x̃[n] and X̃[k] are periodic with period N .

2. X̃[k] is, in general, complex. Therefore, it will be characterized


in terms of an amplitude and phase for every value of k.

Example 1:


X
x̃[n] = δ[n + rN ] (6.20)
r=−∞

where

½
1, n = 0
δ[n] = (6.21)
0, otherwise
N
X −1
X̃[k] = x̃[n]e−j2πkn/N (6.22)
n=0
N
X −1
= δ[n]e−j2πkn/N (6.23)
n=0

(Notice that over one period x̃[n] = δ[n])

X̃[k] = 1 for all 0 ≤ k ≤ N − 1 (6.24)

The results are plotted in figure 6.2.

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-6 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

x̃[n]

 


 




 :
;

   

 
 
  

n
0 N −1 N

X̃[k]

,
-
,
- ./ 01 4 23
6
4
5
6
7
1 89
*
+
&
'
(
)
&
'

<
=
$
%
"
# !
 




<
=

<
=

k
0 N −1 N

Figure 6.2: Plots for Example 1.

Example 2:

X
x̃[n] = x[n + rN ] (6.25)
r=−∞
½
1, o ≤ n ≤ 4
where x[n] = (6.26)
0, else
and N = 10
N
X −1
X̃[k] = x̃[n]e−j2πkn/N , N = 10
n=0
X9 4
X
−j2πkn/10
= x̃[n]e = 1 e−j2πkn/10
n=0 n=0
−j2πk5/10
1−e sin(πk/2)
= −j2πk/10
= e−j2πk/10 (6.27)
1−e sin(πk/10)

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.1. THE DISCRETE FOURIER SERIES (DFS) 6-7

x̃[n]




 

 



1




 
&
' () *+ ,- ./
f
g
h
i
f
g
d
e
b
c
`
a




   






"
!
$ "
#
$
%
r
s
p r
s
p
q
l
m
n
o
j
k
l
m
j
k
n
−10 0 1 2 3 4 10 11 12 13 14 \

|X̃[k]| J
K
F
G
6
7
6
7
2
3
X X
Y ]

H
I 5 4
5
Z Z
[ \

J F 6 6 2 X X
K G 7 7 3 Y ]

B > > : : 0 0 L L
C ? ; ; 1 1 M M U U V

’
“
’
“
’
“
’
“
’
“
D
E
@
’
“
@
A
<
’
“
<
=
’
“
8
9
’
“
’
“
R
S
’
“
N
O QP
’
“
T QP
’
“
T W
’
“
^
_
’
“
^
_
’
“
’
“
k
0 1 2 3 4 5 6 7 8 9 10

ang X̃[k]
π
t ‚
u v ƒ  Ž

  € ‹ Œ

” ”
•
”
•
”
•
”
•
w x
”
•
”
•
} ~
”
•
~
”
•

”
•
”
•
”
•
‰
”
•
Š
”
•
”
•

”
•
”
•
”
• k
{ | ‡ ‡ ˆ ˆ

„ „  
y z … … † † ‘ ‘

−π Denotes indeterminate ang X̃[k]

Relationship between the DFS representation X̃[k] and the sequence Fourier transform
X(ejfd ) over one period of the periodic sequence x̃[n]. Let x[n] represent one period of x̃[n],
i.e.,
½
x̃[n], 0 ≤ n ≤ N − 1
x[n] = (6.28)
0 otherwise

Illustration:
Now,

N
X −1
X(fd ) = x[n]e−j2πfd n (6.29)
n=0
N
X −1
≡ x̃[n]e−j2πfd n
n=0

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-8 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

2
3
2
3 4
0
1
0
1
x̃[n] $ $
%

. "
5 6 / #

,
7 - !

8 8 * *  
9 9 : + 

( 
; < ) 

& 

n
= ' 

0 1 2 N
x[n]
 
 










 
 



 



>

>
?

n
0 N

Figure 6.3:

Therefore,
N
X −1
X̃[k] = x[n]e−j2πkn/N (6.30)
n=0

Comparing 6.29 and 6.30, we see that

X̃[k] = X(fd )|fd = k (6.31)


N

This corresponds to sampling the sequence Fourier transform at N equally spaced frequen-
cies between fd = 0 and fd = 1 with a frequency spacing of N1 .

Example 3:

Consider x[n] in example 2, i.e.,

½
1, 0 ≤ n ≤ 4,
x[n] = (6.32)
0, otherwise
The Fourier transform of one period x̃[n] is given by

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.1. THE DISCRETE FOURIER SERIES (DFS) 6-9

4
X
X(fd ) = 1 e−j2πfd n (6.33)
n=0
sin(5πfd )
= e−j4πfd (6.34)
sin(πfd )

Comparing 6.27 with 6.34 we see that

X̃[k] = X(fd )|fd = k (6.35)


10

Recall:

1. X(fd ) is continuous in fd and periodic with period 1.

2. X̃[k] is discrete (defined only for integer values of k) and periodic


with period N .

From 6.34 the magnitude and phase for X(fd ) and X̃[k] can be plotted as in
figure 6.4.

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-10 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

|X(ejfd )|, |X̃[k]|

    ' (

  )
 
 
 % &

<

   # $


! "

<

1 3 fd
0 2
1 2
2

0 5 10 15 20 k

ang X(ejfd ), ang X̃[k]


π

= = = = = = = = = = = =
> > > > > > > > > > > >

 *
    +

,
  - .

fd
    1 / 2

8 4
9 5

: 6
; 7 3

−π

Figure 6.4: Plots for Example 3 illustrating that the DFS coefficients of a periodic sequence
are samples of the sequence Fourier transform of one period.

¦¦¦

6.2 Properties of the Discrete Fourier Series (DFS)


(i) Linearity
Consider two periodic sequences x̃1 [n] and x̃2 [n], both with period N such that

DF S
x̃1 [n] ←→ X̃1 [k] (6.36)
DF S
and x̃1 [n] ←→ X̃1 [k] (6.37)
DF S
Then ax̃1 [n] + bx̃2 [n] ←→ aX̃1 [k] + bX̃2 [k] (6.38)

Proof : Use definitions.

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.2. PROPERTIES OF THE DISCRETE FOURIER SERIES (DFS) 6-11

(ii) Shift of a Sequence

a. Time Shift
DF S
If x̃[n] ←→ X̃[k] (6.39)
DF S
then x̃[n − m] ←→ e−j2πkm/N X̃[k] (6.40)

Proof :
N
X −1
4
DFS {x̃[n − m]} = x̃[n − m]e−j2πkn/N (6.41)
n=0

Let [n − m] = l,
then n|N −1
n=0 , l|N
−m
−1−m
, n=l+m (6.42)

N −1−m
X
DFS {x̃[n − m]} = x̃[n]e−j2πk(l+m)/N (6.43)
l=−m
N −1−m
X
−j2πkm/N
= e x̃[l]e−j2πkl/N (6.44)
l=−m
−j2πkm/N
≡ e X̃[k] (6.45)

Q.E.D.

b. Frequency Shift

DF S
If x̃[n] ←→ X̃[k] (6.46)
DF S
then ej2πnl/N x̃[n] ←→ X̃[k − l] (6.47)

Proof :
© j2πnl/N ª 4 N
X −1
DFS e x̃[n] = ej2πnl/N x̃[n]e−j2πkn/N (6.48)
n=0
N
X −1
= x̃[n]e−j2π(k−l)n/N (6.49)
n=0

≡ X̃[k − l] (6.50)

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-12 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

Q.E.D.
(iii) Duality of Discrete Fourier Series Coefficients
Recall that for a continuous-time signal x(t), the duality property of the Fourier transform
was stated as follows:
If x(t) ←→ X(f ) then (6.51)
X(t) ←→ x(−f ), f in Hz. (6.52)
Example 4:

T
1

t 0 f
− T2 T
2 1
− T1 T

T 1

t f
1 1
− 2T 2T
−2T −T T 2T 3T

Figure 6.5: Duality in the continuous-time.

Now consider the Discrete Fourier Series (DFS).

N −1
4 1 X
x̃[n] = X̃[k]ej2πkn/N
N k=0
N −1
1 X
x̃[−n] = X̃[k]e−j2πkn/N
N k=0
N
X −1
N x̃[−n] = X̃[k]e−j2πkn/N
k=0
n o
4
= DFS X̃[k]

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.2. PROPERTIES OF THE DISCRETE FOURIER SERIES (DFS) 6-13

Hence,

DF S
If x̃[n] ←→ X̃[k] then (6.53)
DF S
X̃[n] ←→ N x̃[−k] (6.54)
¦¦¦
(iv) Symmetry Properties for the DFS
Consider a real sequence x̃[n], it is straight forward to prove the following properties:
a. X̃[k] = X̃[−k]

b. Re{X̃[k]} = Re{X̃[−k]}

c. Im{X̃[k]} = −Im{X̃[−k]}

d. |X̃[k]| = |X̃[−k]|

e. ang X̃[k] = −ang X̃[−k]

DF S
f. x̃e [n] = 21 (x̃[n] + x̃[−n]) ←→ Re{X̃[k]}

DF S
g. x̃o [n] = 21 (x̃[n] − x̃[n]) ←→ jIm{X̃[k]}
where xe [n] is an even sequence, xo [n] is an odd sequence, Re{ } denotes the real part and
Im{ } denotes the imaginary part.

(v) Periodic Convolution


Let x̃1 [n] and x̃2 [n] be two periodic sequences each with period N and with discrete Fourier
series coefficients denoted by X̃1 [k] and X̃2 [k], respectively. If we form the product
X̃3 [k] = X̃1 [k]X̃2 [k] (6.55)
then the periodic sequence x̃3 [n] with Fourier series coefficients is
N
X −1
x̃3 [n] = x̃1 [m]x̃2 [n − m] (6.56)
m=0

Proof :

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-14 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

Consider the sequence x̃3 [n] defined as in 6.56. The DFS coefficients X̃3 [k] is

N
X −1
4
X̃3 [k] = x̃3 [n]e−j2πkn/N (6.57)
n=0
N
( −1
−1 N
)
X X
= x̃1 [m]x̃2 [n − m] e−j2πkn/N (6.58)
n=0 m=0
N
X −1 N
X −1
= x̃1 [m] x̃2 [n − m]e−j2πkn/N (6.59)
m=0 n=0

From the shifting property

N
X −1
x̃2 [n − m]e−j2πkn/N = e−j2πkm/N X̃2 [k] (6.60)
n=0

From 6.59 and 6.60, we get

X̃3 [k] = X̃1 [k]X̃2 [k] (6.61)

Q.E.D.

In summary,
N
X −1
DF S
x̃1 [m]x̃2 [n − m] ←→ X̃1 [k]X̃2 [k] (6.62)
m=0

The left-hand side of the above equation is known as periodic convolution.

Periodic Convolution
Consider two periodic sequences x̃1 [n] and x̃2 [n] with the same period N . The periodic
convolution
N
X −1
x̃3 [n] = x̃1 [m]x̃2 [n − m] (6.63)
m=0

is calculated as follows:

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.2. PROPERTIES OF THE DISCRETE FOURIER SERIES (DFS) 6-15

1. Form the inverted sequence x̃2 [n − m] = x̃2 [−(m − n)] and the
product x̃1 [m]x̃2 [−(m − n)] for various values of n.

2. The sum is carried over the finite interval 0 ≤ m ≤ N − 1.

Note:

The values of x̃2 [n − m] in the interval 0 ≤ m ≤ N − 1 repeat periodically for m


outside that interval.

Example 5: Periodic Convolution

¦¦¦

Corollary:

From the duality theorem, if we exchange the roles of time and frequency, we
obtain an identical result to the periodic convolution, that is,

If x̃3 [n] = x̃1 [n]x̃2 [n] (6.64)

where x̃1 [n] and x̃2 [n] are periodic sequences each with period N , then the DFS
coefficients are given by

N −1
1 X
X̃3 [k] = X̃1 [l]X̃2 [k − l] (6.65)
N l=0

The proof of the above result is similar to the proof of periodic convolution in the time
domain we provided before. The reader should justify the above result. It is to be noted
that the convolution
N
X −1
X̃1 [l]X̃2 [k − l] (6.66)
l=0

is also periodic with period N .

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-16 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

x̃2 [m]

−N 0 N m

x̃1 [m]

m
−N 0 N

x̃2 [−m]

−N 0 N n

x̃2 [1 − m] = x̃2 [−(m − 1)]

m
−N 0 N
x̃2 [2 − m] = x̃2 [−(m − 2)]

m
−N 0 N

Figure 6.6: Procedure for forming the periodic convolution of two periodic sequences.

6.3 The Discrete Fourier Transform (DFT)


Consider a finite-duration sequence x[n] of length N . Form the periodic sequence x̃[n] such
that ∞
X
x̃[n] = x[n + rN ] (6.67)
r=−∞
c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.3. THE DISCRETE FOURIER TRANSFORM (DFT) 6-17

Periodic Sequence (Period N) DFS Coefficients (Period N)

1. x̃[n] X̃[k] periodic with period N

2. x̃1 [n], x̃2 [n] X̃1 [k], X̃2 [k] periodic with period N

3. ax̃1 [n] + bx̃2 [n] aX̃1 [k] + bX̃2 [k]

4. X̃[n] N x̃[−k]

5. x̃[n − m] WNkm X̃[k]

6. WN−ln x̃[n] X̃[k − l]


PN −1
7. m=0 x̃1 [m]x̃2 [n − m] X̃1 [k]X̃2 [k]

1
PN −1
8. x̃1 [n]x̃2 [n] N l=0 X̃1 [l]X̃2 [k − l]

9. x̃[n] X̃[((−k))N ]

10. x̃[((−n))N ] X̃[k]

11. Re{x̃[n]} X̃ep [k] = 12 {X̃[k] + X̃[−k]}

12. jIm{x̃[n]} X̃op [k] = 12 {X̃[k] − X̃[−k]}

13. x̃ep [n] = 12 {x̃[n] + x̃[−n]} Re{X̃[k]}

14. x̃op [n] = 12 {x̃[n] − x̃[−n]} jIm{X̃[k]}



 X̃[k] = X̃[−k]



 Re{X̃[k]} = Re{X̃[−k]}
15. Symmetry properties Im{X̃[k]} = −Im{X̃[−k]}
(for real x[n]) 


 |X̃[k]| = |X̃[−k]|

 6
{X̃[k]} = −6 {X̃[−k]}

16. x̃ep [n] = 12 {x̃[n] + x̃[−n]} Re{X̃[k]}


(for real x[n])
17. x̃op [n] = 12 {x̃[n] − x̃[−n]} jIm{X̃[k]}
(for real x[n])
c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-18 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

where r is an integer.
Therefore,
½
x̃[n], 0 ≤ n ≤ N − 1
x[n] = (6.68)
0, otherwise

Recall that

N −1
1 X
4
x̃[n] = X̃[k]ej2πkn/N (6.69)
N k=0
N
X −1
X̃[k] = x̃[n]e−j2πkn/N (6.70)
n=0

where both x̃[n] and X̃[k] are periodic with period N .


Now x[n] is equal to one period of x̃[n]. To maintain a duality between the time domain
and frequency domain, we choose the Fourier Coefficients that are associated with x[n] to
be a finite-duration sequence corresponding to one period of X̃[k]. This sequence will be
referred to as X[k], i.e.,
½
X̃[k], 0 ≤ k ≤ N − 1
X[k] = (6.71)
0, otherwise

The DFT equations

N
X −1
Analysis: X[k] = x[n]e−j2πkn/N , 0≤k ≤N −1 (6.72)
n=0
NX−1
1
Synthesis: x[n] = X[k]ej2πkn/N , 0≤n≤N −1 (6.73)
N k=0

Symbolically, we will write the above equations as

DF T
x[n] ←→ X[k] (6.74)

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.4. PROPERTIES OF THE DFT 6-19

Periodicity of the DFT

Question: Is x[n] defined for n > N ?


Answer: Unfortunately, yes.

To see that x[n] is still defined for n > N , we substitute in 6.73 for values of n > N , i.e.,
N −1
1 X
x[N + m] = X[k]ej2πk(N +m)/N (6.75)
N k=0
N −1
1 X
= X[k]ej2πkm/N · e|{z}
j2πk
(6.76)
N k=0
1
≡ x[m] (6.77)

Hence, while we consider the DFT representation valid for finite-duration sequences, we
cannot ignore the inherent periodicity resulting from the DFT definitions. As we will show
next, all of the properties of the DFT can be deduced from the DFS by restricting the
observation in the time-domain n and the frequency domain k to a window of length N .
Specifically, 0 ≤ n ≤ N − 1 and 0 ≤ k ≤ N − 1.

6.4 Properties of the DFT


(i) Linearity
Consider two sequences x1 [n] and x2 [n]. Adjust the two sequences so that they will have the
same length, N (i.e., add zeros to the shorter sequence). Now,
DF T
If x1 [n] ←→ X1 [k], 0≤k ≤N −1 (6.78)
DF T
and x2 [n] ←→ X2 [k] (6.79)
DF T
then ax1 [n] + bx2 [n] ←→ aX1 [k] + bX2 [k], 0≤k ≤N −1 (6.80)

(ii) Circular Shift


Let ½
x̃[n], 0 ≤ n ≤ N − 1
x[n] = (6.81)
0, otherwise
We can write x̃[n] as
x̃[n] = x[n mod N ] (6.82)

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-20 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

where n mod N denotes modulo N summation

Note:

a = b mod N if
b = a + iN, i = integer

Define
x̃1 [n] = x̃[n − m] = x[(n − m) mod N ] (6.83)
Recall that
X̃1 [k] = e−j2πkm/N X̃[k] (6.84)

½
x̃[n], 0 ≤ n ≤ N − 1
Now if x[n] =
0, otherwise
½
x̃1 [n] = x̃[n − m] = x[(n − m) mod N ], 0 ≤ n ≤ N
then x1 [n] =
0, otherwise

Also, from the definitions,

X[k] = X̃[k], 0≤k ≤N −1 (6.85)


X1 [k] = X̃1 [k], 0≤k ≤N −1 (6.86)

Hence, the circular shift effect can be written as follows:

DF T
If x[n] ←→ X[k] (6.87)

then
DF T
x[(n − m) mod N ], 0≤n≤N −1 ←→ X[k]e−j2πkm/N (6.88)

How to Perform Circular Shift?

1. Construct x̃[n] from x[n]

2. x[(n − m) mod N = x̃[n − m], so perform the shift


on x̃[n] and consider only 0 ≤ n ≤ N − 1.

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.4. PROPERTIES OF THE DFT 6-21

Example 6: Circular shift

x[n]

0 N n

(a)

x̃[n]

0 N n

(b)

x̃1 [n] = x̃[n + 2]

0 N n

(c)

x̃1 [n], 0≤n≤N −1
x1 [n] =
0, otherwise

0 N n

(d)

Figure 6.7: Circular shift of a finite-length sequence; i.e., the effect in the same time domain
of multiplying the DFT of the sequence by a linear phase factor.

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-22 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

(iii) Duality of the DFT Coefficients

DF T
If x[n] ←→ X[k]
DF T
then X[n] ←→ N x[−k mod N ], 0 ≤ k ≤ N − 1

Note:

For 0 ≤ n ≤ N − 1, the following relations hold

n mod N = n
−n mod N = N − n

(iv) Circular Convolution


DF T
Consider two finite-duration sequences x1 [n] and x2 [n] of length N . If x1 [n] ←→ X1 [k] and
DF T
x2 [n] ←→ X2 [k].

Form

X3 [k] = X1 [k]X2 [k] 0≤k ≤N −1

then
N
X −1
x3 [n] = x1 [m]x2 [(n − m) mod N ]
m=0
N
X −1
= x2 [m]x1 [(n − m) mod M ]
m=0

Proof :
From the DFS equation (periodic convolution)
If X̃3 [k] = X̃1 [k]X̃2 [k] then
N
X −1
x̃3 [k] = x̃1 [m]x̃2 [n − m]
m=0

Now let,

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.4. PROPERTIES OF THE DFT 6-23
½
x̃1 [n], 0 ≤ n ≤ N − 1
x1 [n] =
0, otherwise
½
x̃2 [n], 0 ≤ n ≤ N − 1
x2 [n] =
0, otherwise
i.e.,
x̃1 [n] = x1 [n mod N ]
x̃2 [n] = x2 [n mod N ]
Let, ½
x̃3 [n], 0 ≤ n ≤ N − 1
x3 [n] =
0, otherwise
½ PN −1
= m=0 x̃1 [m]x̃2 [n − m], 0 ≤ n ≤ N − 1
0, otherwise
Since,
x̃1 [m] = x1 [m] for 0 ≤ m ≤ N − 1
x̃2 [n − m] = x2 [(n − m) mod N ] for 0 ≤ m ≤ N − 1
Therefore,
N
X −1
x3 [n] = x1 [m]x2 [(n − m)/bmodN ]
m=0

This relation is denoted by circular convolution. We will use the symbol °



instead of ∗ to denote circular convolution, i.e.,

x3 [n] = x1 [n] °
∗ x2 [n]
N
X −1
= x1 [m]x2 [(n − m) mod N ]
m=0

Example 7:
x1 [n] = δ[n − 1]
½ −n
a , o≤n≤4
x2 [n] =
0, otherwise
N = 5.

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-24 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

1 x1 [m] = δ[n − 1]

0 5 m

1 x2 [m]

0 5 m

n=0 x2 [−m]

0 5 m

n=1 x2 [−(m − 1)]

0 5 m

x3 [n]

0 5 n

Figure 6.8: Circular Convolution for Example 7

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.4. PROPERTIES OF THE DFT 6-25

Example 8: Consider the circular convolution below for N = 8.

1
x1 [m]

0 1 2 3 4 5 6 7 m

1
x2 [m]
x̃2 [m]

0 1 2 3 4 5 6 7 m

n=0
x3 = 4 x2 [−m]

x̃2 [−m]

0 m

n=1
x3 = 4

0 m

n=2
x3 = 4

0 m

n=3
x3 = 4

0 m

n=4
x3 = 5

0 m

n=5
x3 = 6

0 m
6
5 5
x3 [n]
4 4 4 4 4

0 1 2 3 4 5 6 7 n

Figure 6.9: Example 8, Circular Convolution

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-26 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

Example 9: Same as example 8 with shorter sequences.

1 x1 [m]

0 1 2 3 4 5 6 7 m

1 x2 [m]
x̃2 [m]

0 1 2 3 4 5 6 7 m

n=0 x2 [−m]
x3 = 1 x̃2 [−m]

0 m

n=1 x̃2 [−(m − 1)]


x3 = 2

0 m

n=2 x̃2 [−(m − 2)]


x3 = 3

0 m

n=3
x3 = 4

0 m

n=4
x3 = 3

0 m

n=5
x3 = 2

0 m
4
3 3 x3 [n]
2 2
1 1

0 1 2 3 4 5 6 7 n

Figure 6.10: Circular Convolution, Example 9

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.5. LINEAR CONVOLUTION USING THE DFT 6-27

6.5 Linear Convolution using the DFT

1. Linear Convolution of two sequences


Consider two sequences x1 [n] and x2 [n] of lengths L and P points, respectively. Suppose we
want to combine these two sequences by linear convolution to obtain a third sequence by
linear convolution, i.e.,


X
x3 [n] = x1 [m]x2 [n − m] (6.89)
m=−∞

Clearly, the product x1 [m]x2 [n − m] is zero for all m whatever n < 0 and n > L + P − 2.
Therefore, (L +P −1) is the maximum length of the sequence x3 [n] resulting from the Linear
Convolution of a sequence of length L with a sequence of length P .

2. Linear Convolution using the DFT


The DFT provides the circular convolution. To make the circular convolution similar to the
linear convolution, we pad the two sequences x1 [n] and x2 [n] with zeros to make the two
sequences have a length of L + P − 1. The following example illustrates this idea.

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6-28 CHAPTER 6. THE DISCRETE FOURIER TRANSFORM

Example 10: Linear Convolution using the DFT

x1 [n] = x2 [n]
1

n
0 L=P
(a)

x3 [n] = x1 [n] ∗ x2 [n]

n
0 2L − 1
(b) x3 [n − N ],
L N =L=6

n
0 N
(c)
x3 [n + N ],
L N =L=6

−N 0 n
(d)
x1 [n] °
∗ x2 [n]
L
N =L=6

n
0 N −1
(e)
x1 [n] °
∗ x2 [n]
N =L=6

0 2L − 1 n
(f )

Figure 6.11: Illustration that circular convolution is equivalent to linear convolution followed
by aliasing. (a) The sequences x1 [n] and x2 [n] to be convolved. (b) The linear convolution
of x1 [n] and x2 [n]. (c) x3 [n − N ] for N = 6. (d) x3 [n + N ] for N = 6. (e) x1 [n] °∗ x2 [n],
which is equal to the sum of (b), (c), and (d) in the interval 0 ≤ n ≤ 5. (f) x1 [n] °∗ x2 [n].

¦¦¦

c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005
6.5. LINEAR CONVOLUTION USING THE DFT 6-29

Finite-Length Sequence (Length N) N-Point DFT (LengthN)


1. x[n] X[k]

2. x1 [n], x2 [n] X1 [k], X2 [k]

3. ax1 [n] + bx2 [n] aX1 [k] + bX2 [k]

4. X[n] N x[((−k)N ]

5. x[((n − m))N ] WNkm X[k]

6. WN−ln x[n] X[((k − l))N ]


PN −1
7. m=0 x1 (m)x2 [((n − m))N ] X1 [k]X2 [k]
1
PN −1
8. x1 [n]x2 [n] N l=0 X1 (l)X2 [((k − 1))N ]

9. x[n] X[((−k))N ]

10. x[((−n))N ] X[k]

11. Re{x[n]} Xep [k] = 12 {X[((k))N ] + X[((−k))N ]}

12. jIm{x[n]} Xop [k] = 21 {X[((k))N ] − X[((−k))N ]}

13. xep [n] = 12 {x[n] + x[((−n))N ]} Re{X[k]}

14. xop [n] = 12 {x[n] − x[((−n))N ]} jIm{X[k]}




 X[k] = X[((−k))N ]


 Re{X[k]} = Re{X[((−k))N ]}
15. Symmetry properties Im{X[k]} = −Im{X[((−k))N ]}
(for real x[n]) 


 |X[k]| = |X[((−k))N ]|
 6
{X[k]} = −6 {X[((−k))N ]}

16. xep [n] = 12 {x[n] + x[((−n))N ]} Re{X[k]}


(for real x[n])
17. xop [n] = 21 {x[n] − x[((−n))N ]} jIm{X[k]}
(for real x[n])

Figure 6.12: Summary of Properties of the Discrete Fourier Transform


c
°A Course on Digital Signal Processing, Dr. Aly Farag, 2005

You might also like