Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT)
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT)
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT)
net
6
Discrete Fourier Series (DFS) and
ww Discrete Fourier Transform (DFT)
w.E
asy
En
6.1 INTRODUCTION
gin
Any periodic function can be expressed in a Fourier series representation. The discrete-time
Fourier transform (DTFT) X(w ) of a discrete-time sequence x(n) is a periodic continuous
function of w with a period of 2p. So it cannot be processed by a digital system. For
eer
processing by a digital system it should be converted into discrete form. The DFT converts
the continuous function of w to a discrete function of w. Thus, DFT allows us to perform
ing
frequency analysis on a digital computer.
The DFT of a discrete-time signal x(n) is a finite duration discrete frequency sequence.
.ne
The DFT sequence is denoted by X(k). The DFT is obtained by sampling one period of the
Fourier transform X(w ) of the signal x(n) at a finite number of frequency points. This
sampling is conventionally performed at N equally spaced points in the period 0 £ w £ 2p or
at w k = 2p k/N; 0 £ k £ N – 1. We can say that DFT is used for transforming discrete-time
sequence x(n) of finite length into discrete frequency sequence X(k) of finite length.
The DFT is important for two reasons. First it allows us to determine the frequency
content of a signal, that is to perform spectral analysis. The second application of the DFT is
t
to perform filtering operation in the frequency domain.
Let x(n) be a discrete-time sequence with Fourier transform X(w), then the DFT of x(n)
denoted by X(k) is defined as:
X (k ) X (X ) X (2 Q k/N )
; for k 0, 1, 2, !, N 1
The DFT of x(n) is a sequence consisting of N samples of X(k). The DFT sequence starts at
k = 0, corresponding to w = 0, but does not include k = N corresponding to w = 2p (since
the sample at w = 0 is same as the sample at w = 2p). Generally, the DFT is defined along
412
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 413
with number of samples and is called N-point DFT. The number of samples N for a finite
duration sequence x(n) of length L should be such that N ³ L.
The DTFT is nothing but the Z-transform evaluated along the unit circle centred at the
origin of the z-plane. The DFT is nothing but the Z-transform evaluated at a finite number of
equally spaced points on the unit circle centred at the origin of the z-plane.
To calculate the DFT of a sequence, it is not necessary to compute its Fourier
transform, since the DFT can be directly computed.
DFT The N-point DFT of a finite duration sequence x(n) of length L, where N ³ L is
defined as:
Ç x ( n) e Ç x(n)W !, N 1
N 1 N 1
ww DFT{x ( n)} X (k )
n 0
j 2Q nk/N
n 0
nk
N ; for k 0, 1, 2,
w
IDFT The Inverse Discrete Fourier transform (IDFT) of the sequence X(k) of length N is
defined as:
x ( n) ngi
X (k )
DFT
nee
N
In this chapter, we discuss about discrete-time Fourier series and discrete Fourier transform.
www.EasyEngineering.net
www.EasyEngineering.net
Ç X (k )e
N 1
1 j (2Q /N ) nk
x ( n) for all n
N k 0
where the coefficients X(k) are expressed as:
Ç x ( n) e
N 1
j (2Q /N ) nk
X (k ) for all k
n 0
These equations for x(n) and X(k) are called DFS synthesis and analysis pair. Hence, X(k)
and x(n) are periodic sequences.
The equivalent form for X(k) is:
Ç x ( n) W
N 1
ww X (k)
–j(2p /N)
n 0
nk
N
w
where WN is defined as WN = e .
.Ea
6.2.2 Trigonometric Form of Discrete Fourier Series
given by
syÇE
The trigonometric Fourier series representation of a continuous-time periodic signal x(t) is
x (t ) a0 (an cos nX 0 t bn sin nX 0 t )
T Ô0
x (t ) dt nee
2
T
x (t ) cos nX 0 t dt , n 1, 2, ! rin
an
T Ô0
T
!
g.n
bn
2
T Ô0
x (t ) sin nX 0 t dt, n 1, 2,
An alternative form of the discrete Fourier series comparable to the above equation for x(t)
e t
for the continuous-time periodic signal can be easily found. However, it has different
expressions for odd and even N.
For even N,
( N/2) 1 ( N/2) 1
x ( n) A(0) Ç
k 1
A(k ) cos É k
È
Ê
2Q Ø
nÙ
N Ú
Ç
k 1
B(k ) sin É k
È
Ê
2Q Ø
nÙ
N Ú
ÈNØ
AÉ Ù
Ê2Ú
cos Q n
Here the last term contains cos p n, which is equal to (–1)n, the highest frequency sequence possible.
The constants A(0), A(k) and B(k) will be as follows:
Ç x ( n)
N 1
1
A(0)
N n 0
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 415
!, N2
N 1
A( k )
2
N
Ç x(n) cos k 2NQ n ,
n 0
È
É
Ê
Ø
Ù
Ú
k 1, 2, 1
!, N2
N 1
B( k )
2
N
Ç x(n) sin k 2NQ n ,
n 0
È
É
Ê
Ø
Ù
Ú
k 1, 2, 1
N 1 N 1
A = x(n) cos Q n
2 N n 0
If N is odd, A(0) remains the same as given above; however, A(k) and B(k) given above are
ww
good for k = 0, 1, 2,K, (N – 1)/2, and there will be no A(N/2) coefficient.
So for odd N, we have
( N 1)/2
Ç 2Q Ø ( N 1) / 2
Ç 2Q Ø
w
È È
x ( n) A(0) A( k ) cos É k nÙ B(k ) sin É k nÙ
Ê N Ú Ê N Ú
.EaÇ
k 1 k 1
syE
A(0)
1
N
N 1
n 0
x ( n)
ÇA( k )
2
N
N 1
n 0
È 2Q Ø
x ( n) cos É k
ngi
nÙ , k = 1, 2, …,
Ê N Ú
N 1
2
B( k )
2
N
Ç x(n) sin ÈÉÊ k 2NQ nØÙÚ ,
N 1
nee k = 1, 2, …,
N 1
2
rin
n 0
A(0)
X (0)
e t
N
X (k ) X ( N k ) N
A( k ) , k = 1, 2, …, 1
N 2
j[ X (k ) X ( N k )] N
B( k ) , k = 1, 2, …, 1
N 2
Again if N is odd, A(0) remains the same as given below and A(k) and B(k) will be for
k = 0, 1, 2,K, (N – 1)/2 and there will be no A(N/2).
So for odd N, the relationships between A(k) and B(k) of the trigonometric form and
X(k) of the exponential form for a real x(n) are expressed by
www.EasyEngineering.net
www.EasyEngineering.net
X (0)
A(0)
N
X (k ) X ( N k ) N 1
A( k ) = , k = 1, 2, …,
N 2
j[ X (k ) X ( N k )] N 1
B( k ) = , k = 1, 2, …,
N 2
EXAMPLE 6.1 Find both the exponential and trigonometric forms of the DFS represen-
tation of x(n) shown in Figure 6.1.
ww
w .Ea
syE Figure 6.1 x(n) for Example 6.1.
ngi
Solution: To determine the exponential form of the DFS, we have
WNk e j (2Q /N ) k
Given N = 4
\ W40 1, W41 nee
e j (2Q /4)1 e j (Q /2)
W41 cos
Q
2
j sin
Q
2
j
rin
W42
W43
(W41 ) (W41 )
(W42 )(W41 )
( j) ( j)
( 1)( j)
1
g.n
e
j
W44
The exponential form of DFS is given by
N 1
(W42 ) (W42 ) ( 1)( 1) 1
t
Ç X (k)e
N 1
x ( n)
1
N k 0
j (2Q /N ) nk 1
N
Ç X (k ) W
k 0
nk
N for all n
N 1
1
N
Ç X (k ) e
k 0
j (X0 ) nk
Ç x ( n) W Ç x ( n) e
N 1 N 1
nk j (2Q /N ) nk
where X (k ) N for all k
n 0 n 0
Ç x(n)W
3
For k = 0, X(0) (0) n
4 x (0) x (1) x (2) x (3) 0 1 2 3 6
n 0
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 417
Ç x(n)W
3
For k = 1, X(1) 4
(1) n
x (0)W40 x (1)W41 x (2)W42 x (3)W43
n 0
Ç x(n)W
3
For k = 2, X(2) 4
(2) n
x (0)W40 x (1)W42 x (2)W44 x (3)W46
n 0
Ç x(n)W
3
For k = 3, X(3) (3)n
4 x (0)W40 x (1)W43 x (2)W46 x (3)W49
ww
n 0
0 1( j ) 2( 1) 3( j ) 2 j 2
The complex exponential form of the Fourier series is:
w .Ea x ( n)
1
N
Ç X (k ) W
N 1
k 0
4
nk
Ç s
1 3
x ( n)
yE
4k 0
X ( k ) W4 nk
1
4Í
4
ngi
Ë X (0) X (1) W n X (2)W 2 n X (3) W 3n Û
4 4 Ý
1
4Í
1
nee
Ë6 ( 2 j 2)e j (2Q /4) n ( 2)e j (2Q / 4)2 n ( 2 j 2)e j (2Q /4)3 n Û
Ý
2Í
Ë3 ( 1 j1)e( jQ / 2) n e jQ n (1 j)e j (3Q /2) n Û
Ý
rin
To determine the trigonometric form of DFS, the A(0), A(1), B(1), and A(2) are determined
as:
g.n
A(0)
A(1)
X (0) 6 3
N
4
4 2
X (1) X (4 1) ( 2 j 2) ( 2 j 2)
4
1
e t
X (1) X (4 1) ( 2 j 2) ( 2 j 2)
B(1) j j 1
4 4
È 4Ø X (4/2) 1
AÉ Ù
Ê 2Ú 4 2
Therefore, the trigonometric form of the DFS is determined as:
3 ÈQ Ø ÈQ Ø 1
x ( n) cos É n Ù sin É nÙ cos Q n
2 Ê2 Ú Ê2 Ú 2
www.EasyEngineering.net
www.EasyEngineering.net
w
Then
.Ea
DFS [x(n)] = X(k)
DFS [x (n m)] e j (2Q /N ) mk X (k )
where x(n – m) is a shifted version of x(n).
syE
6.3.3 Symmetry Property
We know that
ngi
DFS [x*(n)] = X*(–k) and DFS [x*(–n)] = X*(k)
g.n
Ý
Ë x ( n) x * ( n) Û
e
and DFS{ j Im[ x (n)]} DFS Ì Ü
ÍÌ 2 ÝÜ
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 419
Î1 Þ
and DFS [ x o ( n)] DFS Ï [ x ( n) x * ( n)]ß
Ð 2 à
1
[ X ( k ) X * ( k )] j Im {X ( k )}
2
ww
and DFS [x2(n)] = X2(k)
If X3(k) = X1(k) X2(k), then the periodic sequence x3(n) with Fourier series coefficients X3(k)
is:
w .Ea x3 (n) Ç x ( m) x ( n m)
N 1
m 0
1 2
Hence
Ç
n
N 1
ee
X ( z)
n 0
x ( n) z n
rin
Let us evaluate X(z) at N equally spaced points on the unit circle, i.e., at z = e j(2p/N)k.
2Q
e j (2Q /N ) k 1 and e j (2Q /N ) k
g.n
e
k
N
Hence, when k is varied from 0 to N – 1, we get N equally spaced points on the unit circle
in the z-plane.
N 1 N 1
t
\ X ( z) z e j (2Q /N ) k Ç x(n) z
n 0
n
z e j (2Q /N ) k Ç x(n) e
n 0
j (2Q /N ) kn
Ç x(n) e
N 1
j (2Q /N ) kn
X (k )
n 0
From the above equations, we get
X (k) X ( z) z e j (2Q /N ) k
www.EasyEngineering.net
www.EasyEngineering.net
Now, we can conclude that the N-point DFT of a finite duration sequence can be obtained
from the Z-transform of the sequence at N equally spaced points around the unit circle.
wwFrequency shifting
N 1
x(n + m)
w
Periodic convolution
Multiplication .Ea
x (m) x (n m)
m 0
1 2
x1(n) x2(n)
1
X1(k) X2(k)
N 1
X (l) X ( k l)
1 2
syE
N
l 0
Symmetry property x*(n) X*(–k)
*
x (–n) X*(k)
Re [x(n)]
ngi 1
Xe ( k ) [ X ( k ) X * ( k )]
2
j Im [x(n)]
nee 1
Xo (k ) [ X (k ) X * ( k )]
2
1
xe ( n) [ x( n) x* (n)]
2
rin Re [X(k)]
1
xo (n) [ x ( n) x* ( n)]
2
g.n
j Im [X(k)]
If x(n) is real
e
X(k) = X *(– k)
Re [X(k)] = Re [X(–k)]
Im [X(k)] = –Im [X(–k)]
|X(k)| = |X *(– k)|
t
X (k ) X ( k )
EXAMPLE 6.2 Compute the DFT of each of the following finite length sequences
considered to be of length N:
(a) x(n) = d (n)
(b) x(n) = d (n – n0), where 0 < n0 < N
(c) x(n) = an, 0 £ n £ N – 1
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 421
Î
Ñ1 for n even
(d) x(n) = Ï
Ñ
Ð0 for n odd
Solution:
(a) Given x(n) = d (n)
Ç x(n)e
N 1
j (2Q /N ) nk
X (k )
n 0
Ç E ( n) e
N 1
j (2Q /N ) nk
1
ww n 0
.EÇa Ç
X (k )
N 1
x ( n)e j (2Q /N ) nk
N 1
E (n n0 )e j (2Q /N ) nk
syE
n 0 n 0
j (2Q /N ) n0 k
e for 0
k
N 1
(c) Given x(n) = an
Ç Çng
N 1 N 1
a n e j (2Q /N ) nk = [ ae j (2Q /N ) k ]n for 0
k
N 1
X (k )
n 0
ine
1 a e N j 2Q k
n 0
e
1 ae j (2Q /N ) k
rin
Î1
Ñ
(d) Given x(n) = Ï
Ñ
Ð0
for n even
for n odd g.n
X (k ) Ç x ( n) e
N 1
n 0
j (2Q /N ) nk
e t
( N / 2) 1 ( N / 2) 1
Ç
n 0
x (2n)e j (2Q /N )2 nk Ç
n 0
x (2n 1)e j (2Q /N )(2 n 1) k
( N/2) 1 ( N/2) 1
Ç
n 0
x (2n)e j (4Q /N )nk Ç
n 0
e j 4Q kn / N
1 e j 2Q k
1 e j 4Q k / N
www.EasyEngineering.net
www.EasyEngineering.net
EXAMPLE 6.3 Find the Z-transform of the sequence x(n) = u(n) – u(n – 6) and sample it
at 4 points on the unit circle using the relation:
X (k) X (z ) z e j (2Q /N )k
, k = 0, 1, 2, 3
Find the inverse DFT of X(k) and compare it with x(n) and comment.
\ X ( z ) 1 z 1 z 2 z 3 z 4 z 5
ww X (k ) X ( z) z e j (2Q /N ) k
X ( z)
z e j (2Q / 4) k
, k 0, 1, 2, 3
w .Ea
The IDFT of X(k) is:
2 2e j (Q /2) k e jQ k e j (3Q /2) k
x¢(n) = {2, 2, 1, 1}
syE
Comparing x¢(n) and x (n), we can find that time domain aliasing occurs in the first two
points because X(z) is not sampled with sufficient number of points on the unit circle.
ngi
Note: The length of the sequence N = 6, and the number of samples taken on the unit
circle to find X(k) is 4. Since N < L, time domain aliasing occurs. That is last 2 samples
(L – N = 2) are added to first two samples due to under sampling.
EXAMPLE 6.4 (a) Find the 4-point DFT of x(n) = {1, –1, 2, –2} directly.nee
Solution:
(b) Find the IDFT of X(k) = {4, 2, 0, 4} directly.
rin
(a) Given sequence is x(n) = {1, –1, 2, –2}. Here the DFT X(k) to be found is N =
4-point and length of the sequence L = 4. So no padding of zeros is required.
We know that the DFT {x(n)} is given by g.n
X (k )
N 1
Ç
n 0
x (n) WNnk
N 1
Ç
n 0
x (n) e j (2Q /N ) nk Ç x(n) e
n 0
3
e
j (Q /2) nk
, k 0, 1, 2, 3
t
Ç x ( n) e
3
\ X (0) 0
x (0) x (1) x (2) x (3) 1 1 2 2 0
n 0
Ç x ( n) e
3
j (Q /2) n
X (1) x (0) x (1) e ( jQ /2) x (2) e jQ x (3) e j (3Q /2)
n 0
1 ( 1) (0 j ) 2( 1 j 0) 2(0 j )
1 j
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 423
Ç x ( n) e
3
jQ n
X (2) x (0) x (1) e jQ x (2) e j 2Q x (3) e j 3Q
n 0
1 1( 1 j 0) 2 (1 j 0) 2( 1 j 0) 6
Ç x ( n) e
3
j (3Q /2) n
X (3) x (0) x (1) e j (3Q /2) x (2) e j 3Q x (3) e j (9Q /2)
n 0
1 1(0 j ) 2( 1 j 0) 2 (0 j) 1 j
\ X(k) = {0, –1 – j, 6, –1 + j}
ww (b) Given DFT is X(k) = {4, 2, 0, 4}. The IDFT of X(k), i.e. x(n) is given by
1
Ç
N 1
X (k ) WN nk
1
Ç X (k ) e
N 1
j (2Q /N ) nk
w i.e. .Ea Ç
x ( n)
x ( n)
N
1
4k
k 0
3
X ( k )e j (Q /2) nk
N k 0
Ç sy
0
E
3
1 1
\ x (0) X ( k ) e0 [ X (0) X (1) X (2) X (3)]
4
1
k 0
[4 2 0 4] 2.5
4
ngi
x (1)
4
1 3
ÇX (k ) e j (Q /2) k
1
4Í
nee
Ë X (0) X (1) e j (Q /2) X (2) e jQ X (3)e j (3Q /2) Û
Ý
4k 0
1 rin
4
1
[4 2(0 j ) 0 4(0 j )] 1 j 0.5
Ç X (k ) e
3
1 g.n
e
Ë X (0) X (1) e jQ X (2) e j 2Q X (3)e j 3Q Û
jQ k
x (2)
4Í Ý
4
1
4
k 0
[4 2( 1 j 0) 0 4( 1 j 0)] 0.5 t
x (3)
1 3
4k 0
ÇX (k ) e j (3Q /2) k
1
4Í
Ë X (0) X (1) e j (3Q /2) X (2) e j 3Q X (3)e j (9Q /2) Û
Ý
1
[4 2(0 j) 0 4(0 j)] 1 j 0.5
4
\ x3(n) = {2.5, 1 – j0.5, – 0.5, 1 + j0.5}
EXAMPLE 6.5 (a) Find the 4-point DFT of x(n) = {1, –2, 3, 2}.
(b) Find the IDFT of X(k) = {1, 0, 1, 0}.
www.EasyEngineering.net
www.EasyEngineering.net
Solution:
(a) Given x(n) = {1, –2, 3, 2}.
Here N = 4, L = 4. The DFT of x(n) is X(k).
Ç Ç Ç x ( n) e
N 1 3 3
\ X (k ) x ( n) WNnk x ( n) e j (2Q / 4) nk j (Q /2) nk
, k 0, 1, 2, 3
n 0 n 0 n 0
Ç x ( n) e
3
X (0) 0
x (0) x (1) x (2) x (3) 1 2 3 2 4
n 0
Ç x ( n) e
3
j (Q /2) n
X (1) x (0) x (1)e j (Q /2) x (2)e jQ x (3)e j (3Q /2)
ww n 0
1 2(0 j) 3( 1 j 0) 2(0 j ) 2 j 4
w X (2)
.Ea
Ç x ( n) e
3
n 0
jQ n
x (0) x (1)e jQ x (2)e j 2Q x (3)e j 3Q
1 2( 1 j 0) 3(1 j 0) 2( 1 j 0) 4
Ç s
yE
3
X (3) x ( n)e j (3Q /2) n x (0) x (1)e j (3Q /2) x (2)e j 3Q x (3)e j (9Q /2)
n 0
\
1 2(0 j) 3( 1 j 0) 2(0 j )
X (k ) {4, 2 j 4, 4, 2 j 4} ngi 2 j 4
1 3
Ç 1 1
x (0)
x (1)
4k 0
1 3
Ç
X ( k )e 0
X ( k )e j (Q /2) k
4
> X (0) X (1) X (2) X (3)@
1
4
e
>1 0 1 0 @ 0.5
1 1
[1 0 e jQ 0] [1 0 1 0] 0
4 4
x (2)
1 3
4k 0
ÇX ( k )e jQ k
1
4Í
Ë X (0) X (1)e jQ X (2)e j 2Q X (3)e j 3Q Û
Ý
1 1
[1 0 e j 2Q 0] [1 0 1 0] 0.5
4 4
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 425
x (3) Ç
1 3
4k 0
X (k )e j (3Q /2) k
1
4Í
Ë X (0) X (1)e j (3Q /2) X (2)e j 3Q X (3)e j (9Q /2) ÛÝ
1 1
[1 0 e j 3Q 0] [1 0 1 0] 0
4 4
\ The IDFT of X(k) = {1, 0, 1, 0} is x(n) = {0.5, 0, 0.5, 0}.
EXAMPLE 6.6 Compute the DFT of the 3-point sequence x(n) = {2, 1, 2}. Using the
same sequence, compute the 6-point DFT and compare the two DFTs.
ww
Solution: The given 3-point sequence is x(n) = {2, 1, 2}, N = 3.
w
N
n 0 n 0
When k = 0, syE Ê 3
X(k) = X(0) = 2 + 1 + 2 = 5
3 Ú Ê 3 3 Ú
When k = 1,
È
X (k ) X (1) 2 É cos
Ê
2Q
3
j sin
2Q Ø
3Ú
È
Ê
ngi
Ù 2 É cos
4Q
3
j sin
4Q Ø
Ù
3 Ú
nee
2 ( 0.5 j 0.866) 2( 0.5 j 0.866)
0.5 j 0.866
When k = 2, X (k ) X (2)
È
2 É cos
Ê
4Q
3
j sin
4Q Ø
3 Ú
È
Ù 2 É cos
Ê
8Q
3
rin
j sin
8Q Ø
3Ú
Ù
x (0) x (1)e j (2Q /6) k x (2) e j (4Q /6) k x (3) e j (6Q /6) k x (4) e j (8Q /6) k
x (5) e j (10Q /6) k
2 e j (Q /3) k 2e j (2Q /3) k
When k = 0, X(0) = 2 + 1 + 2 = 5
www.EasyEngineering.net
www.EasyEngineering.net
ww
When k = 4, X (4) x (0) x (1)e j (4Q /3) x (2)e j (8Q /3)
È
2 É cos
4Q 4Q Ø È 8Q 8Q Ø
j sin Ù 2 É cos j sin Ù
w .Ea
Ê 3 3 Ú Ê 3
2 ( 0.5 j 0.866) 2( 0.5 j 0.866)
0.5 j 0.866
3Ú
When k = 5,
syE
X (5) x (0) x (1)e j (5Q /3) x (2)e j (10Q /3)
È 5Q 5Q Ø È 10Q 10Q Ø
2 É cos
Ê 3 3Ú
ngi
j sin Ù 2 É cos
Ê 3
j sin
3 Ú
Ù
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 427
ww
w .Ea
syEFigure 6.2 Values of WNn for 4-point and 8-point DFTs
TABLE 6.2
ngi
Table showing powers of the factor WN for 4-point and 8-point DFTs
Twiddle factor
W40
4-point DFT
W80
8-point DFT
1
W41
W42
–j W81
W82 rin 0.707 – j0.707
g.n
–1 –j
W43 j W83 –0.707 – j0.707
W44
W45
W46
W40
W41
W42
1
–j
–1
W84
W85
W86
e –1
–0.707 – j0.707
j t
W47 W43 j W87 0.707 + j0.707
EXAMPLE 6.7 Obtain DFT of the sequence x ( n) {x (0), x (1), x (2), x (3)} {1, 0, 1, 2}.
n 0 n 0
www.EasyEngineering.net
www.EasyEngineering.net
w .Ea Ç
X (k ) Ç x(n)W
N 1
n 0
nk
N , k 0, 1, !, N 1
!, N 1
N 1
1
syE x ( n)
N k 0
X ( k )WN nk , n 0, 1, 2,
The first set of N DFT equations in N unknowns may be expressed in matrix form as:
ngi
X = WN x
"
nee
Here X and x are N ´ 1 matrices, and WN is an N ´ N square matrix called the DFT matrix.
Ë X (0) Û
Ì
Ì X (1) Ü
Ü
ËW 0
Ì
N
ÌWN
0
WN0
WN1
WN0
WN2 "
"
WN0
ÜÌ
rin
Û Ë x (0) Û
# g.
Ì Ì 0 ÜÌ
Ì
X (2) ÜÜ ÌWN WN2 WN4 WN2( N 1) Ü Ì x (2) Ü
Ü
# # # # " #
Ì
Ì
Ì
Í X ( N 1)
Ü
Ü
Ü
Ý
Ì
Ì
ÌW 0
Í N WN( N 1) WN2( N 1) "
ÜÌ
ÜÌ
ne Ü
Ü
WN( N 1)( N 1) ÜÝ ÌÍ x ( N 1) ÜÝ
t
6.8 THE IDFT FROM THE MATRIX FORM
The matrix x may be expressed in terms of the inverse of WN as:
x WN1 x
The matrix WN1 is called the IDFT matrix. We may also obtain x directly from the IDFT
relation in matrix form, where the change of index from n to k and the change in the sign of
the exponent in e j(2p /N)nk lead to the conjugate transpose of WN. We then have
1 * ÛT
x Ë WN x
N Í Ý
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 429
1 * ÛT
Comparison of the two forms suggests that WN1 ËWN
Í Ý
.
N
This very important result shows that WN1 requires only conjugation and transposition
of WN, an obvious computational advantage.
ww x ( n) IDFT[ X ( k )]
1
N
[DFT{X
( k )}]
w
This result involves the conjugate symmetry and duality of the DFT and IDFT, and suggests
.Ea
that the DFT algorithm itself can also be used to find the IDFT. In practice, this is indeed
what is done.
EXAMPLE 6.8
syE
Find the DFT of the sequence
x(n) = {1, 2, 1, 0}
ngi
Solution: The DFT X(k) of the given sequence x(n) = {1, 2, 1, 0} may be obtained by
solving the matrix product as follows. Here N = 4.
Ë X (0) Û
Ì
Ì X (1) Ü
Ü
ËWN0
Ì
ÌWN
0
WN0
WN1
WN0
WN2
ÜÌ
WN3 ÜÌ x (1) Ü
nee
WN0 Û Ë x (0) Û
Ü
Ë1
Ì
Ì1 j
1
1
1 1Û Ë 1 Û
ÜÌ Ü
j Ü Ì2 Ü
Ë 4 Û
Ì Ü
Ì j2Ü
Ì
Ì
X (2) ÜÜ
Ì 0
ÌWN WN2 WN4 WN6 Ü
Ü
Ì
Ì
x (2) ÜÜ Ì
Ì
1 1 1 1 1
ÜÌ Ü
rin
ÜÌ Ü Ì
Ì
0 ÜÜ
g.n
Ì X (3) Ü Ì 0 ÜÌ x (3) Ü Ì1
Í Ý ÌÍWN WN3 WN6 WN9 ÜÝ
Í Ý Í j 1 j ÜÝ ÌÍ 0 ÜÝ Ì j2 Ü
Í Ý
www.EasyEngineering.net
www.EasyEngineering.net
EXAMPLE 6.10 Find the 4-point DFT of x(n) = {1, –2, 3, 2}.
Solution: Given x(n) = {1, –2, 3, 2}, the 4-point DFT{x(n)} = X(k) is determined using
matrix as shown below.
Ë1 1 1 1Û Ë 1Û Ë 4 Û
Ì ÜÌ Ü Ì Ü
Ì1 j 1 j Ü Ì 2 Ü Ì 2 j 4Ü
DFT {x (n)} = X (k ) Ì ÜÌ Ü Ì Ü
1 1 1 1 3 4
Ì ÜÌ Ü Ì Ü
Ì1 j 1 j ÜÝ ÌÍ 2 ÜÝ Ì 2 j 4 ÜÝ
Í Í
ww
EXAMPLE 6.11 Find the 8-point DFT of x(n) = {1, 1, 0, 0, 0, 0, 0, 0}. Use the property
of conjugate symmetry.
w
Solution: For given x(n) = {1, 1, 0, 0, 0, 0, 0, 0},
.EaÇ X (k )
N 1
x ( n) e j (2Q /N ) nk Ç x ( n) e
7
j (2Q /8) nk
syE n 0
1e j (Q /4) k
, k
n 0
0, 1, 2, !, 7
Since N = 8, we need to compute X(k) only for k £ (8/2) = 4.
X (0) 1 1 2 ngi
X (1) 1 e j (Q /4)
nee
1 0.707 j 0.707 1.707 j 0.707
X (2) 1 e j (Q /2) 1 0 j 1 j
X (3) 1 e j (3Q /4) 1 0.707 j 0.707 0.293 j 0.707
rin
X (4) 1 e jQ
11 0
With N = 8, conjugate symmetry says X(k) = X *(N – k) = X *(8 – k) and we find g.n
X (5)
X (6)
X
(8 5)
X (8 6)
X
(3)
X (2) 1 j
0.293 j 0.707
e t
X (7) X (8 7) X (1) 1.707 j 0.707
Thus, X (k ) {2,1.707 j 0.707, 1 j, 0.293 j 0.707, 0, 0.293 j 0.707, 1 j, 1.707 j 0.707}
EXAMPLE 6.12 Find the IDFT of X(k)={4, –j2, 0, j2} using DFT.
Solution: Given X(k) = {4, –j2, 0, j2} \ X*(k) = {4, j2, 0, –j2}
The IDFT of X(k) is determined using matrix as shown below.
To find IDFT of X(k) first find X*(k), then find DFT of X*(k), then take conjugate of
DFT {X*(k)} and divide by N.
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 431
Ë1 1 1 1Û Ë 4 Û Ë4Û
Ì1 j 1 j Ü Ì j2Ü Ì8Ü
DFT {X * ( k )} Ì ÜÌ Ü Ì Ü
Ì1 1 1 1Ü Ì 0 Ü Ì4Ü
Ì1 j 1 j ÜÝ ÌÍ j 2 ÜÝ Ì0Ü
Í Í Ý
1 1
\ IDFT [ X (k )] x ( n) [4, 8, 4, 0]
[4, 8, 4, 0] [1, 2, 1, 0]
4 4
ww
\ X*(k) = {4, 2, 0, 4}
The IDFT of X(k) is determined using matrix as shown below.
w To find IDFT of X(k), first find X*(k), then find DFT of X*(k), then take conjugate of
.Ea
DFT {X*(k)} and divide by N.
Ë1 1 1 1Û Ë 4 Û Ë 10 Û
syE
Ì1 j 1 j Ü Ì2Ü Ì 4 j2Ü
DFT [ X * ( k )] Ì ÜÌ Ü Ì Ü
Ì1 1 1 1Ü Ì 0 Ü Ì 2 Ü
Ì1 j 1 j ÜÝ ÌÍ 4 ÜÝ ÌÍ 4 j 2 ÜÝ
Í
\ IDFT {X (k )} x ( n)
1
4 ngi
[10, 4 j 2, 2, 4 j 2]
{2.5, 1 j 0.5, 0.5, 1 j 0.5}
Ë1 1 1 1Û Ë 1Û Ë2 Û g.n
DFT {X * ( k )}
Ì
Ì1
Ì
Ì
1
Ì1
j
1
j
1
1
1 1 1
ÜÌ Ü
j Ü Ì0 Ü
ÜÌ Ü
ÜÌ Ü
j ÜÝ ÌÍ 0 ÜÝ
Ì Ü
Ì0 Ü
Ì Ü
2
Ì Ü
Ì0 Ü
e t
Í Í Ý
1 1
\ IDFT {X (k )} = x ( n) [DFT {X
( k )}]
{2, 0, 2, 0} {0.5, 0, 0.5, 0}
4 4
www.EasyEngineering.net
www.EasyEngineering.net
6.10.1 Periodicity
If a sequence x(n) is periodic with periodicity of N samples, then N-point DFT of the
sequence, X(k) is also periodic with periodicity of N samples.
Hence, if x(n) and X(k) are an N-point DFT pair, then
x (n N ) x ( n) for all n
X (k N ) X (k ) for all k
Proof: By definition of DFT, the (k + N)th coefficient of X(k) is given by
Ç x ( n) e Ç x ( n) e
N 1 N 1
j 2Q n( k N ) / N j 2Q nk/N j 2Q nN/N
X (k N )
ww
But e–j2p n = 1 for all n
n 0
(Here n is an integer)
n 0
e
\ w .Ea X (k N ) Ç x ( n) e
N 1
n 0
j 2Q nk/N
X (k )
6.10.2 Linearity
syE
If x1(n) and x2(n) are two finite duration sequences and if
and
DFT {x1(n)} = X1(k)
DFT {x2(n)} = X2(k) ngi
Then for any real valued or complex valued constants a and b,
DFT {ax1 ( n ) bx2 ( n )} nee
aX1 ( k ) bX 2 ( k )
Ç x ( n) e Ç x ( n) e
N 1 N 1
j 2Q nk/N j 2Q nk/N
a
n 0
1
aX1 ( k ) bX2 ( k )
b
n 0
2
e t
6.10.3 DFT of Even and Odd Sequences
The DFT of an even sequence is purely real, and the DFT of an odd sequence is purely
imaginary. Therefore, DFT can be evaluated using cosine and sine transforms for even and
odd sequences respectively.
Ç x(n) cos
N 1
È 2Q nk Ø
For even sequence, X (k ) É Ù
n 0
Ê N Ú
Ç x(n) sin
N 1
È 2Q nk Ø
For odd sequence, X (k ) É Ù
n 0
Ê N Ú
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 433
Ç x ( N n) e
N 1
ww
Proof: DFT {x ( N n)}
n 0
j 2Q nk/N
w
Changing index from n to m, where m = N – n, we have n = N – m.
N 1
Ç x ( m)e
Now,
.Ea ÇDFT ^ x ( N n)`
m 0
j 2Q k ( N m ) / N
syE N 1
m 0
x ( m)e j (2Q /N ) kN e j (2Q /N ) km
Ç
ngi
N 1
x ( m)e j (2Q /N ) km
m 0
Ç
N 1
m 0 nee
x (m)e j (2Q /N ) km e j 2Q m
Ç x (m)e
N 1
j 2Q m[( N k ) / N ]
rin
X ( N k)
g.n
If
Then,
DFT {x(n)} = X(k)
DFT {x(n) e j2pln/N} = X{(k – l), (mod N)]
e t
Ç x ( n) e
N 1
Proof: DFT {x ( n)e j 2Q l n/N } j 2Q l n/N j 2Q kn/N
e
n 0
Ç x ( n) e
N 1
j 2Q n( k l )/N
n 0
Ç x ( n) e
N 1
j 2Q n( N k l )/N
n 0
www.EasyEngineering.net
www.EasyEngineering.net
Ç x ( n) e
N 1
j 2Q kn/N
Proof: DFT{x * (n)} *
n 0
* *
Ì Ç
Ë N 1
Ín 0
Û
x (n) e j 2Q nk/N Ü
Ý
Ì Ç
Ë N 1
Ín 0
Û
x (n)e j 2Q n( N k )/N Ü
Ý
= X * (N k)
ww DFT{x * ( N n)} X * (k )
w
Proof: IDFT{X * (k )}
.EaÇ
1
N
Ç X (k )e
N 1
k 0
* j 2Q kn/N
* *
1 Ë N 1 Û
Ç
1 Ë N 1 Û
syE Ì
N Ík 0
X ( k )e j 2Q kn/N Ü
Ý
Ì
N Ík 0
X (k )e j 2 Q k ( N n ) / N Ü = x * ( N
Ý
n)
ngi
6.10.7 DFT of Delayed Sequence (Circular time shift of a sequence)
units of time.
If DFT {x(n)} = X(k) nee
Let x(n) be a discrete sequence, and x ¢(n) be a delayed or shifted sequence of x(n) by n0
rin
Proof: By the definition of IDFT,
N 1 2Q g.n
e
1
j nk
IDFT {X (k )} = x ( n) = X ( k )e N
N 1
N k 0
2Q
( n n0 ) k
t
1 j
x (n n0 ) =
N
X (k ) e N
k 0
2Q 2Q
1 N 1 j n0 k j nk
=
N
X (k ) e
N e N
k 0
2Q
j n0 k
= IDFT X (k ) e N
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 435
ww =
N 1
x(n) cos
2Q
nk j sin
2Q
nk
w .Ea =
n 0
N 1
x(n) cos
n 0
N
N
2Q N 1
N
nk j x (n) sin
n 0
2Q
N
nk
syE
Also X (k ) = X R (k ) + jX I ( k )
Therefore, we can say
Real part X R (k ) =
N 1
x(n) cos N
2Q ngi
nk , for 0 k N 1
N 1
n 0
nee
n 0
2Q
Imaginary part XI (k ) = x (n) sin
N
nk ,
for 0 k N 1
rin
When x(n) is real, then X(k) will have the following features:
g.n
(a)
(b)
(c)
(d)
X(k) has complex conjugate symmetry, i.e. X(k) = X* (N – k)
Real component is even function, i.e. XR(k) = XR(N – k)
Imaginary component is odd function, i.e. XI(k) = – XI(N – k)
Magnitude function is even function, i.e. |X(k)| = |X(N – k)|
e t
(e) Phase function is odd function, i.e. X (k ) = X (N k )
(f) If x(n) = x(–n) (even sequence), then X(k) is purely real.
(g) If x(n) = –x(–n) (odd sequence), then X(k) is purely imaginary.
www.EasyEngineering.net
www.EasyEngineering.net
ww n 0
N 1
x 2 (l ) e
j
2Q
lk
w k = 0, 1, ..., N 1
X 2 (k ) = N ,
l0
.Ea
On multiplying the above two DFTs, we obtain the result as another DFT, say, X3(k). Now,
X3(k) will be N-point DFT of a sequence x3(m).
\
syE
X3 (k ) = X1 ( k ) X 2 (k ) and IDFT{X 3 (k )} = x3 (m)
ngi
By the definition of IDFT,
N 1 2Q
1 j mk
X3 ( k ) e
nee m = 0, 1, 2, ..., N 1
x3 (m) = N ,
N k 0
N 1 2Q
1
X1 (k ) X2 (k ) e
rin
j mk
= N
N k 0
Using the above equations for X1(k) and X2(k), the equation for x3(m) is:
g.n
x3 ( m) =
1
N
N 1 N 1
x1 (n) e
k 0 n 0
N 1 N 1
j
2Q
N
nk N 1
N 1
x
l 0
2 (l) e
2Q
j
k (m n l)
2Q
N
lk
e
j
2Q
N
mk
e t
1
x 2 (l ) e
j
= x1 (n) N
N n0 l 0 k 0
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 437
ww
Therefore, x3(m) can be
N 1 N 1 N 1
x3 (m) = x1 (n) x2 (m n) = x1 (n) x2 (m n)
w .Ea
n 0
N 1
n 0
x1 (k ) x2 (n k)
syE k 0
ngi
involves the index [(m – n), mod N], it is called circular convolution.
Hence, we conclude that multiplication of the DFTs of two sequences is equivalent to
the DFT of the circular convolution of the two sequences.
nee
X1 (k ) X 2 (k ) = DFT {x1 (n) x2 (n)}
www.EasyEngineering.net
www.EasyEngineering.net
N 1
DFT {rxy (l)} = DFT x ( n) y ((n l), mod N ) = X (k ) Y ( k )
* *
Then
n 0
where, rxy(l) is the circular cross correlation sequence. The properties of DFT are summarized
in Table 6.3.
TABLE 6.3 Properties of the DFT
ww
Linearity ax1(n) + bx2(n) aX1(k) + bX2(k)
Time reversal x((–n), mod N) = x(N – n) X(N – k)
Circular time shift (delayed sequence) x((n – l), mod N) X(k)e–j2pkl/N
w
Circular frequency shift
.Ea
Circular convolution
x1(n)x2(n)
X((k – l), mod N)
1
X1(k)X2(k)
(X1(k) Å X2(k))
Complex conjugate
syE
Circular correlation
x*(n)
x1(n) Å y*(– n)
N
X *(N – k)
X(k)Y *(k)
x ( n ) y * ( n)
1
N
N 1
X (k )Y * ( k )
rin
The computation of the DFT at the indices k = 0 and (for even N) at k = N/2 can be
simplified using the central ordinate theorems that arise as a direct consequence of the
g.n
defining relations. In particular, we find that X(0) equals the sum of the N signal samples
x(n) and X(N/2) equals the sum of (–1)nx(n) (with alternating sign changes). This also implies
e
that, if x(n) is real valued, so are X(0) and X(N/2). Similar results hold for the IDFT.
The DFT of a real sequence possesses conjugate symmetry about the origin with X(–k)
= X *(k). Since DFT is periodic, X(–k) = X(N – k). This also implies conjugate symmetry
about the index k = 0.5N, and thus X(k) = X*(N – k). t
If N is odd, the conjugate symmetry is about the half integer value 0.5N. The index
k = 0.5N is called the folding index. This is illustrated in Figure 6.3.
Figure 6.3 Conjugate symmetry for (a) N odd and (b) N even.
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 439
The conjugate symmetry suggests that we need compute only half the DFT values to
find the entire DFT.
EXAMPLE 6.15 Let X(k) be a 12-point DFT of a length 12 real sequence x(n). The first
7 samples of X(k) are given by X(0) = 8, X(1) = –1 + j2, X(2) = 2 + j3, X(3) = 1 – j4, X(4)
= –2 + j2, X(5) = 3 + j1, X(6) = –1 – j3. Determine the remaining samples of X(k).
Solution: Given N = 12, we have X(k) = X*(N – k) = X*(12 – k). The first 7 samples of
X(k) are given, the remaining samples are:
X(7) = X*(12 – 7) = X*(5) = 3 – j1
w .Ea
X(11) = X*(12 – 11) = X*(1) = –1 – j2
EXAMPLE 6.16 The DFT of a real signal is {1, A, –1, B, 0, –j2, C, –1 + j}. Find A, B and C.
Solution:
syE
Given X(k) = {1, A, –1, B, 0, –j2, C, –1 + j}, using conjugate symmetry, we have
X (k ) = {X (0), X (1), X (2), X (3), X (4), X (5), X (6), X (7)}
ngi
= {X (0), X * (8 1), X (2), X * (8 3), X (4), X (5), X * (8 6), X (7)}
= {1, 1 j, 1, j 2, 0, j 2, 1, 1 + j}
\ A = –1 – j, B = j2,
nee and C = –1
EXAMPLE 6.17
Solution: rin
Let x(n) = {A, 2, 3, 4, 5, 6, 7, B}. If X(0) = 20 and X(4) = 0, find A and B.
Using central ordinates, we have
X (0) =
7
x(n) = A + 2 + 3 + 4 + 5 + 6 + 7 + B = A + B + 27 = 20 g.n
and
n 0
N
X (4) = X =
7
(1)n x(n) = A 2 + 3 4 + 5 6 + 7 B = 0
e t
2 n0
i.e. A–B+3=0
Therefore, A + B + 27 = 20 and A – B + 3 = 0
Solving the above two equations, we have A = –5 and B = –2.
EXAMPLE 6.18 The DFT of a real signal is X(k) = {1, A, –1, B, –7, –j2, C, –1 + j}. What
is its signal energy?
www.EasyEngineering.net
www.EasyEngineering.net
ww =
1 2
8
2
1 + ( 1 j ) + 1
2
+ j2
2
+ 7
2
+ j2
2
+ 1 + 1 + j
2 2
w =
1
8
[1 + 2 + 1 + 4 + 49 + 4 + 1 + 4] = 8.25
.Ea
EXAMPLE 6.19 Let x(n) be a real valued sequence of length N, and let X(k) be its DFT
syE
with real and imaginary parts XR(k) and XI(k) respectively. Show that if x(n) is real, XR(k) =
XR(N – k) and XI(k) = – XI(N – k) for k = 1, 2, ..., N – 1.
nee
j
x
nk
DFT x * (n) = X (k ) = *
(n) e N
n0
N 1 j
2Q
= x ( n) e N
nk
*
rin
n0
g.n
e
*
N 1 j
2Q
nk j
2Q
Nn
= x ( n) e N e N
n 0
N 1 j
2Q
(N k)
*
t
= x ( n) e N
n0
= X*(N – k)
\ X(k) = X*(N – k)
X (k ) = X R (k ) + jX I (k ) = [X R (N k ) + jX I (N k )]*
= X R* ( N k ) jX I* ( N k )
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 441
\ X R (k ) = X R* ( N k )
and X I (k ) = X I* ( N k )
EXAMPLE 6.20 Show that with x(n) as an N-point sequence and X(k) as its N-point DFT,
N 1 N 1
1
2 2
x ( n) = X (k )
n0
N k 0
Solution:
ww N 1
n 0
x (n)
2
=
N 1
x ( n) x * ( n)
n0
w .Ea =
N 1
n0
1
x ( n)
N
N 1
k 0
X (k ) e
j
2Q
N
nk
*
syE =
N 1
x(n) N
1 N 1
X * (k ) e
j
2Q
N
nk
n 0
N 1
1 ngi k 0
N 1
j
2Q
nk
=
k 0
X * (k )
N
nee n 0
x (n) e N
=
1
N
N 1
X * (k ) X (k ) rin
g.n
k 0
N 1
1
2
e
= X (k )
N
EXAMPLE 6.21
k 0
X (k ) ,
2
(a) X(0), (b) X(3), (c) (d) X (k )
k 0 k 0
Solution:
N 1 2Q
j nk
(a) We know that X (k ) = x ( n) e N , k = 0, 1, ..., N 1
n 0
www.EasyEngineering.net
www.EasyEngineering.net
5 5
\ X (0) = x(n) e0 = x(n) = 1 2 + 3 + 0 1 + 1 = 2
n0 n0
5 2Q 5
j
x ( n) e x (n) (1)n
3n
(b) X (3) = 6 =
n0 n0
X (k ) e
j
2Q
N
nk
, n = 0, 1, ..., N 1
w
k 0
\
.Ea N 1
X (k ) = Nx(0) = 6(1) = 6
k 0
5 syE
(d) From Parseval’s theorem
2
5
= N x (n) = 6 (1)2 + ( 2)2 + (3)2 + (0)2 + ( 1)2 + (1)2
2
ngi
X (k )
k 0 n 0
= 6(1 + 4 + 9 + 0 + 1 + 1 ) = 96
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 443
*
Since DFT {x (n)} = DFT {x ( n)}, we can say that x(n) is real valued.
(d) Using the property of convolution of product of two signals, we have
1 1
DFT {x (n) x (n)} = [ X (k ) X (k ) ] = [(4, j 2, 0, j 2) (4, j 2, 0, j 2)]
N 4
= {6, j 4, 0, j 4}
(e) Using the circular convolution property of DFT, we have
w .Ea
(f) Using Parseval’s theorem, we have
1 1
X (k )
2 2
{4, j 2, 0, j 2}
syE
Signal energy = =
4 4
1
= [16 + 4 + 0 + 4] = 6
EXAMPLE 6.23
4
ngi
If IDFT {X(k)} = x(n) = {1, 2, 1, 0}, using properties of DFT, find
(a)
(b)
IDFT {X(k – 1)}
IDFT {X(k) Å X(k)} nee
(c)
(d)
IDFT {X(k)X(k)}
Signal energy
rin
Solution: Given IDFT {X(k)} = x(n) = {1, 2, 1, 0}
(a) Using modulation property, we have g.n
IDFT {X (k 1)} = x(n) e j 2Q n/4 = x(n) e
jQ
jQ
n
2
3Q
e t
j
= x (0) e0 , x (1) e 2 , x (2) e jQ , x (3) e 2
www.EasyEngineering.net
www.EasyEngineering.net
N 1
2 2 2 2 2
(d) Signal energy = x (n) = x (0) + x (1) + x (2) + x (3)
n0
ww
6.11.1 Linear Convolution Using DFT
w
The DFT supports only circular convolution. When two numbers of N-point sequence are
.Ea
circularly convolved, it produces another N-point sequence. For circular convolution, one of
the sequence should be periodically extended. Also the resultant sequence is periodic with
period N.
syE
The linear convolution of two sequences of length N1 and N2 produces an output
sequence of length N1 + N2 – 1. To perform linear convolution using DFT, both the
sequences should be converted to N1 + N2 – 1 sequences by padding with zeros. Then take N1 +
ngi
N2 – 1-point DFT of both the sequences and determine the product of their DFTs. The
resultant sequence is given by the IDFT of the product of DFTs. [Actually the response is
nee
given by the circular convolution of the N1 + N2 – 1 sequences].
Let x(n) be an N1-point sequence and h(n) be an N2-point sequence. The linear
convolution of x(n) and h(n) produces a sequence y(n) of length N1 + N2 – 1. So pad x(n)
with N2 – 1 zeros and h(n) with N1 – 1 zeros and make both of them of length N1 + N2 – 1.
Let X(k) be an N1 + N2 – 1-point DFT of x(n), and H(k) be an N1 + N2 – 1-point DFT of
rin
h(n). Now, the sequence y(n) is given by the inverse DFT of the product X(k) H(k).
\ y(n) = IDFT {X (k ) H (k )} g.n
This technique of convolving two finite duration sequences using DFT techniques is called
fast convolution. The convolution of two sequences by convolution sum formula
e t
y(n) = x (k ) h(n k ) is called direct convolution or slow convolution. The term fast is
k
used because the DFT can be evaluated rapidly and efficiently using any of a large class of
algorithms called Fast Fourier Transform (FFT).
In a practical sense, the size of DFTs need not be restricted to N1 + N2 – 1-point transforms.
Any number L can be used for the transform size subject to the restriction L ³ (N1 + N2 – 1). If
L > (N1 + N2 – 1), then y(n) will have zero valued samples at the end of the period.
EXAMPLE 6.24 Find the linear convolution of the sequences x(n) and h(n) using DFT.
x(n) = {1, 2}, h(n) = {2, 1}
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 445
Solution: Let y(n) be the linear convolution of x(n) and h(n). x(n) and h(n) are of length 2
each. So the linear convolution of x(n) and h(n) will produce a 3 sample sequence (2 + 2 – 1
= 3). To avoid time aliasing, we convert the 2 sample input sequences into 3 sample
sequences by padding with zeros.
\ x(n) = {1, 2, 0} and h(n) = {2, 1, 0}
By the definition of N-point DFT, the 3-point DFT of x(n) is:
2 2Q 2Q 4Q 2Q
j j j j
x ( n) e
kn k k k
X (k ) = 3 = x (0) e0 + x (1) e 3 + x (2) e 3 =1+2e 3
n 0
ww
When k = 0, X(0) = 1 + 2e0 = 3
j
2Q
= 1 + 2( 0.5 j 0.866) = j 1.732
w
When k = 1, X (1) = 1 + 2e 3
.Ea
When k = 2, X (2) = 1 + 2e
j
4Q
3 = 1 + 2( 0.5 + j 0.866) = j 1.732
syE
By the definition of N-point DFT, the 3-point DFT of h(n) is:
2 j
2Q
nk j
2Q
k j
4Q
k j
2Q
k
= h(0) e0 + h(1) e
ngi
H (k ) = h(n) e 3 3 + h(2) e 3 =2+e 3
n0
When k = 0, H(0) = 2 + 1 = 3
When k = 1, H (1) = 2 + e
j
2Q
3 nee
= 2 + ( 0.5 j 0.866) = 1.5 j 0.866
j
4Q
3 = 2 + ( 0.5 + j 0.866) = 1.5 + j 0.866 rin
g.n
When k = 2, H (2) = 2 + e
Let Y ( k ) = X (k ) H (k ) for k = 0, 1, 2
When k = 0, Y(0) = X(0)H(0) = (3)(3) = 9
When k = 1, Y (1) = X (1) H (1) = ( j1.732) (1.5 j 0.866) = 1.5 j 2.598
When k = 2, Y (2) = X (2) H (2) = (j1.732) (1.5 + j 0.866) = 1.5 + j 2.598
e t
\ Y (k ) = {9, 1.5 j 2.598, 1.5 + j 2.598}
The sequence y(n) is obtained from IDFT of Y(k).
By definition of IDFT,
N 1 2Q
1 j nk
y( n) =
N
Y (k ) e N ; for n = 0, 1, 2, ..., N 1
k 0
2Q 2Q 4Q
1 2
1
Y (k ) e
j nk j n j n
\ y(n) = 3 = Y (0) e 0 + Y (1) e 3 + Y (2) e 3 for n = 0, 1, 2
3 3
k 0
www.EasyEngineering.net
www.EasyEngineering.net
1
When n = 0, y(0) = [Y (0) + Y (1) + Y (2)]
3
1
= [9 + ( 1.5 j 2.598) + ( 1.5 + j 2.598)]
3
1
= [6] = 2
3
2Q 4Q
1 j j
When n = 1, y(1) = Y (0) + Y (1) e 3 + Y (2) e 3
3
ww 1
= [9 + ( 1.5 j 2.598) ( 0.5 + j 0.866) + ( 1.5 + j 2.598) ( 0.5 j 0.866)]
w =
3
.Ea1
3
[9 + 0.75 + 2.25 + 0.75 + 2.25] = 5
1
ngi
= [9 + ( 1.5 j 2.598) ( 0.5 + j 0.866) + ( 1.5 + j 2.598) ( 0.5 j 0.866)]
3
1
= [9 + 0.75 2.25 + 0.75 2.25] = 2
nee
\
3
y(n) = {2, 5, 2} rin
Verification by tabular method g.n
method as shown below.
1
x (n )
2
e
The linear convolution of x(n) = {1, 2} and h(n) = {2, 1} is obtained using the tabular
t
2 2 4
h( n)
1 1 2
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 447
EXAMPLE 6.25 Find the linear convolution of the sequences x(n) and h(n) using DFT.
x(n) = {1, 0, 2}, h(n) = {1, 1}
Solution: Let y(n) be the linear convolution of x(n) and h(n). x(n) is of length 3 and h(n) is
of length 2. So the linear convolution of x(n) and h(n) will produce a 4-sample sequence
(3 + 2 – 1 = 4). To avoid time aliasing, we convert the 2-sample and 3-sample sequences
into 4-sample sequences by padding with zeros.
\ x(n) = {1, 0, 2, 0} and h(n) = {1, 1, 0, 0}
By the definition of N-point DFT, the 4-point DFT of x(n) is:
ww X (k ) =
3
x (n) e
n 0
j
2Q
4
kn
= x (0) e0 + x (1) e
j
Q
2
k
+ x (2) e jQ k + x (3) e
j
3Q
2
k
w
When k = 0,
= 1 + 2 e jQ k
X(0)
.Ea
= 1 +
k = 0, 1, 2, 3
2e0 = 1 + 2 = 3
2e–jp = 1 + 2(–1) = –1
When
When
When
k
k
k
=
=
=
1,
2,
3,
X(1)
X(2)
X(3)
=
=
=
syE 1
1
1
+
+
+
2e–j2p = 1 + 2(1) = 3
2e–j3p = 1 + 2(–1) = –1
\
ngi
X(k) = {3, –1, 3, –1}
By the definition of N-point DFT, the 4-point DFT of h(n) is:
3
h(n) e
j
2Q
nk
nee j
Q
k
+ h(2) e jQ k + h(3) e
j
3Q
k
= h(0) e0 + h(1) e
rin
H (k ) = 4 2 2
n0
=1+ e 2
Q
j k
k = 0, 1, 2, 3
g.n
When k = 0, H(0) = 1 + 1 = 2
When k = 1, H(1) = 1 + e
When k = 2, H(2) = 1 + e
j
jQ
Q
2 =1 j
= 1 1 = 0
e t
3Q
j
2
When k = 3, H(3) = 1 + e =1+j
\ H(k) = {2, 1 – j, 0, 1 + j}
Let Y(k) = X(k)H(k) for k = 0, 1, 2
\ Y (k ) = X (k ) H (k) = {3, 1, 3, 1}{2, 1 j, 0, 1 + j} = {6, 1 + j, 0, 1 j}
The sequence y(n) is obtained from IDFT of Y(k).
www.EasyEngineering.net
www.EasyEngineering.net
By definition of IDFT,
N 1 2Q
1
Y (k ) e
j nk
y(n) = N , for n = 0, 1, 2, 3
N k 0
3 Q
1
Y (k ) e
j nk
\ y(n) = 2
4 k 0
Q 3Q
1 j n j n
= Y (0) e0 + Y (1) e 2 + Y (2) e jQ n + Y (3) e 2 , for n = 0, 1, 2, 3
ww
4
Q 3Q
1 j n j n
w
i.e.
[6 + ( 1 + j ) + ( 1 j )] = 1
2
1
ngi
[6 + ( 1 + j )(j) + ( 1 j) ( j) ]
=
4
1
[6 j 1 + j 1] = 1
nee
rin
=
4
When n = 2, y(2) =
1
4
[6 + ( 1 + j ) e jQ + ( 1 j) e j 3Q ]
g.n
=
=
1
4
1
[6 + ( 1 + j) ( 1) + ( 1 j ) ( 1) ]
[6 + 1 j + 1 j ] = 2
e t
4
3Q 9Q
1 j
When n = 3, y(3) = 6 + ( 1 + j ) e j 2 + ( 1 j ) e 2
4
1
= [6 + ( 1 + j ) ( j ) + ( 1 j ) (j) ]
4
1
= [6 + j + 1 j + 1] = 2
4
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 449
ww h (n )
1 1 0 2
w .Ea
syE
From the above table, y(n) = {1, 1, 2, 2}.
nee
time sequences: (i) Graphical method, (ii) Tabular array method, (iii) Tabular method. Now,
we discuss a method of finding circular convolution using DFT and IDFT.
www.EasyEngineering.net
www.EasyEngineering.net
EXAMPLE 6.26 Perform circular convolution of the following sequences using DFT and
IDFT:
x1(n) = {1, 2, 1, 2} and x2(n) = {4, 3, 2, 1}
ww
Solution: To perform circular convolution of x1(n) and x2(n) using DFT and IDFT, find
X1(k), the DFT of x1(n), X2(k), the DFT of x2(n), then find X3(k) = X1(k)X2(k) and take IDFT
of X3(k) to get x3(n), the circular convolution of x1(n) and x2(n).
.Ea
DFT{x1 (n)} = X1 (k ) =
3
x1 (n) e
n0
j
2Q
N
nk
, k = 0,1, 2,3
syE 0
= x1 (0) e + x1 (1) e
j
2Q
4
k
+ x1 (2) e
j
4Q
4
k
+ x1 (3) e
j
6Q
4
k
= 1 + 2e
j
Q
2
k
ngi
+ e jQ k + 2 e
j
3Q
2
k
When k = 0, X1(0) = 1 + 2 + 1 + 2 = 6
j
Q
j
3Qnee
When k = 1, X1(1) = 1 + 2 e 2 +e jQ
+ 2e 2
\
The 4-point DFT of x2(n) is:
X1(k) = {6, 0, –2, 0}
3 2Q
t
j
x2 (n) e
nk
DFT {x2 (n)} = X 2 (k ) = 4 , k = 0, 1, 2, 3
n0
Q 3Q
j k j k
= x2 (0) e0 + x2 (1) e 2 + x2 (2) e jQ k + x2 (3) e 2
Qk 3Q
j j k
= 4 + 3e 2 + 2e jQ k + e 2
When k = 0, X2(0) = 4 + 3 + 2 + 1 = 10
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 451
Q 3Q
j j
jQ
When k = 1, X2(1) = 4 + 3 e 2 + 2e +e 2 = 4 j3 2 + j = 2 j2
When k = 2, X2(2) = 4 3e jQ 2e j 2Q e j 3Q = 4 3 + 2 1 = 2
3Q 9Q
j j
When k = 3, X2(3) = 4 + 3 e 2 + 2e j 3Q + e 2 = 4 + j3 2 j = 2 + j2
\ X 2 (k ) = {10, 2 j 2, 2, 2 + j 2}
Let X3(k) be the product of X1(k) and X2(k).
\ X3 (k ) = X1 (k ) X2 (k ) = {6, 0, 2, 0}{10, 2 j 2, 2, 2 + j 2}
ww = {60, 0, 4, 0}
\
w x3 (n) = IDFT{X3 (k )} =
.Ea
1
N
N 1
k 0
X 3 (k ) e
j
2Q
N
nk
; n = 0, 1, 2, 3
syE
2Q 4Q 6Q
1 j n j n j n
= X3 (0) e0 + X3 (1) e 4 + X3 (2) e 4 + X3 (3) e 4
4
=
1
4
{60 4e jQ n }
ngi
When n = 0, x3(0) =
1
4
(60 4) = 14
nee
When n = 1, x3(1) =
1 1
(60 4 e jQ ) = (60 + 4) = 16
rin
g.n
4 4
1 1
When n = 2, x3(2) = (60 4 e j 2Q ) = (60 4) = 14
When n = 3, x3(3) =
4
1
4
4
1
(60 4 e j 3Q ) = (60 + 4) = 16
4
e t
\ x3(n) = {14, 16, 14, 16}
EXAMPLE 6.27 Find the circular convolution of x(n) = {1, 0.5}; h(n) = {0.5, 1} by DFT
and IDFT method.
Solution:
The circular convolution y(n) of x(n) and h(n) is computed by DFT method as shown below.
Given x(n) = {1, 0.5}
1 2Q
j
x ( n) e
nk
X (k ) = 2 , k = 0, 1
n 0
www.EasyEngineering.net
www.EasyEngineering.net
\
w .Ea
H(k) = {1.5, – 0.5}
\
syE
y(n) =
1
N
N 1
X (k ) e
k 0
j
2Q
N
nk
=
1 1
2 k 0
X (k ) e
j
2Q
2
nk
, n = 0, 1
=
1
2
[ X (0) + X (1) e jQ n ] ngi
y(0) =
1
2
[2.25 0.25 e 0 ] = 1 nee
y(1) =
1 1
[2.25 0.25 e jQ ] = [2.25 + 0.25] = 1.25 rin
\
2 2
y(n) = x (n) h(n) = {y(0), y(1)} = {1, 1.25}
g.n
6.13 CONVOLUTION OF LONG SEQUENCES (SECTIONED CONVOLUTIONS)
The response of an LTI system for any arbitrary input is given by linear convolution of the
e t
input and the impulse response of the system. While implementing linear convolution in FIR
filters, the input signal sequence x(n) is much longer than the impulse response h(n) of a
DSP system. If one of the sequence is very much longer than the other, then it is very
difficult to compute the linear convolution using DFT for the following reasons:
1. The entire sequence must be available before convolution can be carried out. This
makes long delay in getting the output.
2. Large amounts of memory is required and computation of DFT becomes cumbersome.
To overcome these problems, we go to sectioned convolutions. In this technique, the
longer sequence is sectioned (or splitted) into the size of smaller sequence. If required, the
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 453
longer sequence may be padded with zeros. Then the linear convolution of each section
(block) of longer sequence and the smaller sequence is performed. The output sequences
obtained from the convolutions of all the sections are combined to get the overall output
sequence. There are two methods of sectioned convolutions. They are overlap-add method
and overlap-save method.
ww The linear convolution of each section (of length N) of longer sequence with the
smaller sequence of length N is performed. This gives an output sequence of length 2N – 1.
w
In this method, the last N – 1 samples of each output sequence overlaps with the first N – 1
samples of next section. While combining the output sequences of the various sectioned
.Ea
convolutions, the corresponding samples of overlapped regions are added and the samples of
non-overlapped regions are retained as such.
syE
If the linear convolution is to be performed by DFT (or FFT), since DFT supports only
circular convolution and not linear convolution directly, we have to pad each section of the
longer sequence (of length N) and also the smaller sequence (of length N) with N – 1 zeros
ngi
before computing the circular convolution of each section with the smaller sequence. The
steps for this fast convolution by overlap-add method are as follows:
nee
Step 1: N – 1 zeros are padded at the end of the impulse response sequence h(n) which is
of length N and a sequence of length 2N – 1 is obtained. Then the 2N – 1 point
FFT is performed and the output values are stored.
rin
Step 2: Split the data, i.e. x(n) into m blocks each of length N and pad N – 1 zeros to each
block to make them 2N – 1 sequence blocks and find the FFT of each block.
g.n
Step 3: The stored frequency response of the filter, i.e. the FFT output sequence obtained
in Step 1 is multiplied by the FFT output sequence of each of the selected block in
Step 2.
e
Step 4: A 2N – 1 point inverse FFT is performed on each product sequence obtained in Step 3.
Step 5: The first (N – 1) IFFT values obtained in Step 4 for each block, overlapped with
the last N – 1 values of the previous block. Therefore, add the overlapping values
and keep the non-overlapping values as they are. The result is the linear
t
convolution of x(n) and h(n).
www.EasyEngineering.net
www.EasyEngineering.net
wraparound and the rest corresponds to the regular convolution. To understand this let L =
12 and N = 5. If we pad N by 7 zeros, their regular convolution has 23 (or 2L – 1) samples
with 7 trailing zeros (L – N = 7). For periodic convolution, 11 samples (L – 1 = 11) are
wrapped around. Since the last 7 (or L – N) are zeros only, first four samples (2L – 1) – (L)
– (L – N) = N – 1 = 5 – 1 = 4 of the periodic convolution are contaminated by wraparound.
This idea is the basis of overlap-save method. First, we add N – 1 leading zeros to the longer
sequence x(n) and section it into k overlapping (by N – 1) segments of length M. Typically
we choose M = 2N. Next, we zero pad h(n) (with trailing zeros) to length M, and find the
periodic convolution of h(n) with each section of x(n). Finally, we discard the first N – 1
(contaminated) samples from each convolution and glue (concatenate) the results to give the
required convolution.
ww
Step 1: N zeros are padded at the end of the impulse response h(n) which is of length N
and a sequence of length M = 2N is obtained. Then the 2N point FFT is performed
.Ea
begins with the last N – 1 values in the previous data block, except the first data
block which begins with N – 1 zeros.
syE
Step 3: The stored frequency response of the filter, i.e. the FFT output sequence obtained
in Step 1 is multiplied by the FFT output sequence of each of the selected blocks
obtained in Step 2.
Step 3.
ngi
Step 4: A 2N point inverse FFT is performed on each of the product sequences obtained in
Step 5: The first N – 1 values from the output of each block are discarded and the
nee
remaining values are stored. That gives the response y(n).
In either of the above two methods, the FFT of the shorter sequence need be found
rin
only once, stored, and reused for all subsequent partial convolutions. Both methods allow on-
line implementation if we can tolerate a small processing delay that equals the time required
for each section of the long sequence to arrive at the processor.
g.n
e
EXAMPLE 6.28 Perform the linear convolution of the following sequences using
(a) overlap-add method, (b) overlap-save method.
x(n) = {1, 2, 2, 1, 3, 4, 4, 3} and h(n) = {1, 1}
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 455
w
The computation by the tabular method is shown below.
1
1
1
x1(n)
.Ea
–2
–2 1
2
2
x2(n)
–1
–1 1
3
3
x3(n)
–4
–4 1
4
4
x4( n)
–3
–3
h( n) syE h (n ) h (n ) h( n)
ngi
–1 –1 2 –1 –2 1 –1 –3 4 –1 –4 3
y1(n)
n 0
1
TABLE 6.4
–3
1
Combining the output of the convolution of each section
2
2
3 4 5 6 e 7 8
t
y2(n) 2 –3 1
y3(n) 3 –7 4
y4(n) 4 –7 3
y(n) 1 –3 4 –3 4 –7 8 –7 3
www.EasyEngineering.net
www.EasyEngineering.net
x (n )
1 –2 2 –1 3 –4 4 –3
1 1 –2 2 –1 3 –4 4 –3
h (n )
–1 –1 2 –2 1 –3 4 –4 3
ww
(b) Overlap-save method
Given x (n) = {1, 2, 2, 1, 3, 4, 4, 3} L = 8
and h(n) = {1, –1}; N =2
w .Ea
M = 2N = 4
Add N – 1 = 2 – 1 = 1 leading zero to the longer sequence x(n)
x (n) = {0, 1, 2, 2, 1, 3, 4, 4, 3}
\
syE
If we choose M = 4, we get three overlapping sections of x(n) (we need to zero pad the last
one) described by x1 (n) = {0, 1, 2, 2}, x2 (n) = {2, 1, 3, 4}, x3 (n) = { 4, 4, 3, 0}.
h(n) starts at n = nh =0
ngi
= –1, \ y1(n) = x1(n) Å h(n) starts at n = n1 + nh = –1 + 0 = –1
nee
x1(n) starts at n = n1
x2(n) starts at n = n2 = 2, \ y2(n) = x2(n) Å h(n) starts at n = n2 + nh = 2 + 0 = 2
x3(n) starts at n = n3 = 5, \ y3(n) = x3(n) Å h(n) starts at n = n3 + nh = 5 + 0 = 5
rin
The zero padded h(n) becomes h(n) = {1, –1, 0, 0}. Periodic convolutions of x1(n), x2(n) and
g.n
x3(n) with h(n), i.e. y1(n), y2(n) and y3(n) respectively can be computed by any of the
methods discussed in Chapter 2. The computation by matrices method is shown below.
x1 (n) h( n) = {0, 1, 2, 2} {1, 1, 0, 0} = { 2, 1, 3, 4}
x2 (n) h( n) = {2, 1, 3, 4} {1, 1, 0, 0} = {6, 3, 4, 7}
x3 (n) h(n) = { 4, 4, 3, 0} {1, 1, 0, 0} = { 4, 8, 7, 3}
e t
0 2 2 1 1 2 2 4 3 1 1 6 4 0 3 4 1 4
1 0 2 2 1 1 1 2 4 3 1 3 4 4 0 3 1 8
= , = , =
2 1 0 2
0 3 3 1 2 4
0 4 3 4 4 0 0 7
2 2 1 0 0 4 4 3 1 2 0 7 0 3 4 4 0 3
In overlap-save method, the first N – 1 = 2 – 1 = 1 sample of each output overlaps with the
last N – 1 = 2 – 1 = 1 sample of previous output. So discard the first sample in each section
and save the remaining samples. The overall output is obtained by combining y1(n), y2(n)
and y3(n) as given in Table 6.5.
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 457
n –1 0 1 2 3 4 5 6 7 8
y1(n) –2 1 –3 4
y2(n) 6 –3 4 –7
y3(n) –4 8 –7 3
y(n) 1 –3 4 –3 4 –7 8 –7 3
\ y(n) = {1, 3, 4, 3, 4, 7, 8, 7, 3}
ww
The result is same as that obtained by the overlap-add method.
w
EXAMPLE 6.29 Perform the linear convolution of the following sequences by (a) overlap-
add method, (b) overlap-save method
.Ea
x (n) = {1, 2, 3, 2, 3, 4, 3, 4} and h(n) = {1, 2, 1}
syE
Solution: (a) Overlap-add method
Here the longer sequence is x (n) = {1, 2, 3, 2, 3, 4, 3, 4} of length 8 and the smaller
sequence is h(n) = {1, 2, 1} of length 3. So pad a zero to x(n) and make x(n) of length 9.
So x (n) = {1, 2, 3, 2, 3, 4, 3, 4, 0} .
ngi
Section x(n) into 3 blocks x1(n), x2(n) and x3(n), each of length 3 samples as shown
below.
g.n
Let y1(n), y2(n) and y3(n) be the output of linear convolution of x1 (n), x2(n) and x3(n)
respectively with h(n).
Here, h(n) starts at n = nh
x1(n) starts at n = n1
=
=
0
0, \ y1(n) starts at n = n1 + nh = 0 + 0 = 0
e t
x2(n) starts at n = n2 = 3, \ y2(n) starts at n = n2 + nh = 3 + 0 = 3
x3(n) starts at n = n3 = 6, \ y3(n) starts at n = n3 + nh = 6 + 0 = 6
The convolution of each section (of 3 samples) with h(n) (of 3 samples) yields a 5-sample
output. This can be obtained by any of the methods discussed in Chapter 2. The computation
of y1(n), y2(n) and y3(n) by the tabular method is shown below.
y1 ( n) = x1 (n) * h(n) = {1, 2, 3} * {1, 2, 1} = {1, 0, 2, 8, 3}
y2 ( n) = x2 (n) * h(n) = {2, 3, 4} * {1, 2, 1} = {2, 1, 4, 11, 4}
y3 (n) = x3 (n) * h (n) = {3, 4, 0} * {1, 2, 1} = {3, 2, 11, 4, 0}
www.EasyEngineering.net
www.EasyEngineering.net
1 1 –2 3 1 2 –3 4 1 3 –4 0
h( n) 2 2 –4 6 h (n ) 2 4 –6 8 h (n ) 2 6 –8 0
–1 –1 2 –3 –1 –2 3 –4 –1 –3 4 0
y1(n) = {1, 0, –2, 8, –3} y2( n) = {2, 1, –4, 11, –4} y3( n) = {3, 2, –11, 4, 0}
w
the overlap samples are added.
.Ea
TABLE 6.6 Combining the output of the convolution of each section
syE
n 0 1 2 3 4 5 6 7 8 9 10
y1(n) 1 0 –2 8 –3
y2(n) 2 1 –4 11 –4
y3(n)
ngi 3 2 –11 4 0
nee
y(n) 1 0 –2 10 –2 –4 14 –2 –11 4 0
The last zero is discarded because x(n) was padded with one zero.
\ y(n) = {1, 0, 2, 10, 2, 4, 14, 2, 11, 4}
rin
g.n
Verification: The direct convolution of y(n) = x(n) * h(n), as shown below, gives
y( n) = {1, 2 2, 1 4 + 3, 2 + 6 + 2, 3 + 4 3, 2 6 + 4, 3 + 8 + 3, 4 + 6 4, 3 8, 4}
= {1, 0, 2, 10, 2, 4, 14, 2, 11, 4}
1 –2 3 2
x(n)
–3 4 3 –4
e t
1 1 –2 3 2 –3 4 3 –4
h(n) 2 2 –4 6 4 –6 8 6 –8
–1 –1 –2 –3 –2 3 –4 –3 4
www.EasyEngineering.net
www.EasyEngineering.net
Discrete Fourier Series (DFS) and Discrete Fourier Transform (DFT) h 459
and h( n) = {1, 2, 1} N =3
M = 2N = 6
Add N – 1 = 3 – 1 = 2 leading zeros to the longer sequence x(n)
\ x (n) = {0, 0, 1, 2, 3, 2, 3, 4, 3, 4}
If we choose M = 6, we get three overlapping sections of x(n) (we need to zero pad the last
ww
one) described by
x1 (n) = {0, 0, 1, 2, 3, 2}, x 2 (n) = {3, 2, 3, 4, 3, 4}, x3 (n) = {3, 4, 0, 0, 0, 0}
w h(n) starts at n = nh
.Ea
x1(n) starts at n = n1
x2(n) starts at n = n2
=
=
=
0
–2, \ y1(n) starts at n = n1 + nh = –2 + 0 = –2
2, \ y2(n) starts at n = n2 + nh = 2 + 0 = 2
syE
x3(n) starts at n = n3 = 6, \ y3(n) starts at n = n3 + nh = 6 + 0 = 6
The zero padded h(n) becomes h(n) = {1, 2, 1, 0, 0, 0}. Periodic convolutions of
ngi
x1(n), x2(n) and x3(n) with h(n), i.e. y1(n), y2(n) and y3(n) can be computed by any of the
methods discussed in Chapter 2. The computation by the matrix method is shown below.
0
0 0
2 3 2
2
1 0 1 1 3 4
3 2
1 2 2 2
3
3 4
4 3
3 4 nee 2
3
1 8
2 12
1 0
0 2
3 2 1 1
= ,
3 2 3 4 3
rin 4
1 2
=
2
1 0
3 2 1
0
0
2
0
3 0 0 4 3
2 0 2 3
2
4 3
3 4
2 3
g.n
3
4
0 4
0 14
2
3 2
3
1 0 0 0 10 4
0
3
0
4 3
0
2
0 4
1
3
e
3 0 2
t
4 3 0 0 0 0 2 2
0 4 3 0 0 0 1 11
=
0 0 4 3 0 0 0 4
0 0 0 4 3 0 0 0
0 4 3 0 0
0 0 0
The overall output is obtained by combining y1(n), y2(n) and y3(n) as shown in
Table 6.7.
www.EasyEngineering.net
www.EasyEngineering.net
n –2 –1 0 1 2 3 4 5 6 7 8 9 10 11
y1(n) 1 –2 1 0 –2 10
y2(n) –8 12 –2 –4 14 –2
y3(n) 3 2 –11 4 0 0
y(n) 1 0 –2 10 –2 –4 14 –2 –11 4
ww
The result is same as that obtained earlier by the overlap-add method.
w
SHORT QUESTIONS WITH ANSWERS
.Ea
1. Define DFT of a discrete-time sequence.
Ans. The DFT of a discrete-time sequence designated by X(k) is defined as:
syE
X (k ) =
N 1
x (n) e
j
2 Q nk
N , k = 0, 1, 2, ..., N 1
ngi
n0
nee
domain sequence X(k).
2. Define IDFT.
Ans. The IDFT of an N-point frequency domain sequence X(k) is defined as:
x ( n) =
1 N 1
X (k ) e
j
2Q nk
N , n = 0, 1, 2, ..., N 1 rin
N k 0
g.n
e
It is used to convert an N-point frequency domain sequence X(k) to a finite time
domain sequence x(n).
3. What is the relation between DTFT and DFT?
Ans. The DTFT is a continuous periodic function of w. The DFT is obtained by
sampling DTFT at a finite number of equally spaced points over one period.
t
4. What is the drawback of discrete-time Fourier transform and how is it overcome?
Ans. The drawback of DTFT is, it is a continuous function of w and so it cannot
be processed by a digital system. DFT is sampled version of DTFT. Since it is in
discrete form, it can be processed by a digital system.
5. Give any two applications of DFT.
Ans. Two important applications of DFT are:
1. It allows us to determine the frequency content of a signal, that is, to perform
spectral analysis.
2. It is used to perform filtering operation in the frequency domain.
www.EasyEngineering.net