0% found this document useful (0 votes)
31 views32 pages

Chapter5 Part1

The document discusses frequency analysis of continuous-time and discrete-time signals using Fourier series and transforms. It highlights the advantages of the Discrete Fourier Transform (DFT) over the Discrete-Time Fourier Transform (DTFT) due to computational efficiency, and introduces Fast Fourier Transform (FFT) algorithms. Additionally, it covers concepts such as power density spectrum, Parseval’s relation, and energy density spectrum for both periodic and aperiodic signals.

Uploaded by

bsaiuttej100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views32 pages

Chapter5 Part1

The document discusses frequency analysis of continuous-time and discrete-time signals using Fourier series and transforms. It highlights the advantages of the Discrete Fourier Transform (DFT) over the Discrete-Time Fourier Transform (DTFT) due to computational efficiency, and introduces Fast Fourier Transform (FFT) algorithms. Additionally, it covers concepts such as power density spectrum, Parseval’s relation, and energy density spectrum for both periodic and aperiodic signals.

Uploaded by

bsaiuttej100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Chapter

DFT and FFT


5 Algorithms

Frequency analysis or spectral analysis of continuous-time signals are usually

performed in radio communication applications. To perform frequency analysis, it is

necessary to convert the time domain signal into an equivalent frequency domain

representation. The frequency domain representaion of signal is referred to as spectrum.

Continuous-time Fourier series and Fourier transform are used in the spectral

analysis of continuous signals. Similarly discrete-time periodic signal can be represented

and analysed in frequency domain by discrete Fourier series. The aperiodic discrete-

time signal having finite energy may be represented by discrete-time Fourier transform

(DTFT) and discrete Fourier transform (DFT). The spectrum of the DTFT will be a

continuous function of frequency and it is not computationally efficient. The spectrum

of DFT is discrete and computations will be easy. Hence DFT is preferred over DTFT.

Moreover fast Fourier transform (FFT) algorithms are available for the computation

of DFT.

5.1 Discrete Fourier Series (DFS)


A periodic sequence x(n) with period ‘N’ can be represented by discrete Fourier

series consists of ‘N’ harmonically related exponential functions.

N 1 2 kn
j
x(n) =  Ck e N , n = 0, 1.........N –1 .......(5.1)
k0
5.2 Digital Signal Processing

{Ck } are the coefficients in the series


2 kn
1 N 1 j
Ck = 
N n 0
xn e bg
N ,k = 0, 1...... N –1 .......(5.2)

{Ck } is a periodic sequence with fundamental period N.


Ck+N = Ck
A complete description of the signal in time domain or frequency domain can be
obtained by any ‘N’ consecutive samples.

Example 5.1
Determine the spectra of the signal x(n) = { 2 , 2, 0, 0 } with fundamental time
A
period N = 4

Solution
Since the given signal is a periodic discrete-time signal, the discrete Fourier series
can be applied to find the spectra.
The coefficients of the discrete Fourier series from Eq. (5.2)

3 2 kn
j
Ck =
1
4
 bg
xn e 4 , k = 0,1, 2, 3
n0

R| k 3 k U|
S| b g b g  xb 2g e
j
=
1
x 0 e0  x 1 e 2  j k
bg
x 3 e
j
2
V|
4
T W
1R L k  j si n k OPUV
Ck =
4T
S 2  2M cos
N 2 2 QW

The coefficients C0, C1, C2, C3 can be determined for k = 0, 1, 2, 3


1
C0 = {2+2}=1
4
1 1 1
C1 = { 2 – j2 } = – j
4 2 2
1
C2 = {2–2}=0
4
1 1 1
C3 = { 2 + j2 } = +j
4 2 2
DFT and FFT Algorithms 5.3

The magnitude spectra can be drawn by the |Ck| values


|C0| = 1

FG 1 IJ  FG  1 IJ
2 2

1
|C1| =
H 2K H 2K 2

|C2| = 0

FG 1 IJ  FG 1 IJ
2 2

1
|C3| =
H 2K H 2K 2

The phase spectra can be drawn by the Ck values.


C1 = tan–1 LMN 1/ 2 OPQ = – /4
1/ 2
C 0 = 0,

C 2 = 0, C3 = tan–1 LM 1/ 2 OP = /4


N 1/ 2 Q
The magnitude spectrum is shown in Fig. 5.1
| Ck |
1

1/ 2

-4 -3 -2 -1 0 1 2 3 4 5 6 7 k

Per iodic wit h N = 4

Fig. 5.1 Magnitude spectrum of periodic signal in Example 5.1

The phase spectrum is shown in Fig. 5.2.

Ck



-4 -3 -2 -1 0 1 2 3 4 5 6 7 k

-

Fig. 5.2 Phase spectrum of periodic signal in Example 5.1


5.4 Digital Signal Processing

5.1.1 Power density spectrum and Parseval’s relation


The distribution of power in frequency domain is represented by power density
spectrum.
The average power of the signal x(n) in time domain is given by
N 1
1 2
P =
N
 x( n ) .......(5.3)
n 0

To draw the spectrum, the power is derived interms of Fourier coefficients {Ck}
Rearranging the Eq. (5.3) as
N 1
P =
1
N
 bg bg
x n x* n
n0

N 1 F N 1 j
2 kn I
xbn g G  JJ
1
=  GH Ck* e N
N n0 k0 K
Interchanging the order of summation in the above equation, we get

N 1 F1 N 1 j
2 kn I
P =  Ck* GG N  bg
xn e N JJ
k 0 H n 0 K
N 1
=  Ck* .Ck
k0
N 1
2
P =  Ck .......(5.4)
k0

The sequence |Ck|2 is the distribution of power as a function of frequency and


is called as parseval’s relation for discrete-time periodic signals.

5.2 Discrete Time Fourier Transform [DTFT]


Continuous-time aperiodic (non periodic) signals are analysed by Fourier
transform. Similarly discrete-time nonperiodic finite-energy signals are represented
in frequency domain by discrete-time Fourier transform. The Fourier transform of
discrete-time nonperiodic finite-energy signal is defined as

X() = 
n  
bg
x n e j  n .......(5.5)
DFT and FFT Algorithms 5.5

From the above transform [DTFT] and continuous-time Fourier transform, we


can draw a continuous spectrum. But there is a basic difference between them.
For continuous-time Fourier transform, the spectrum of a signal have a frequency
range of (– ), but the frequency range of discrete-time signal is unique over the
frequency interval (–,) or (0,2). This is proved by periodicity property of discrete-
time Fourier transform.
If X() is periodic with time period 2k, then

X( + 2k) =  x( n ) e j (   2 k )n k=1,2,3..........
n 


=  x( n ) e j  n e j 2 kn
n 

We know that e–j2kn = cos(2kn) – jsin(2kn) = 1– 0 = 1



Hence X( + 2k) =  x( n ) e j  n
n 

X( + 2k) = X() .......(5.6)


From the Eq. (5.6), it is proved that the frequency range of discrete-time signal
is limited to (–,) or (0, 2). Hence the inverse Fourier transform for discrete-time
signal is given by

z

x(n) =
1
2
bg
X  ej  n d  .......(5.7)


Existence (Convergence) of DTFT


The DTFT equation will converge, if x(n) is absolutely summable.

 bg
xn <  .......(5.8)
n 

This is the sufficient and stronger Dirichlet condition. The first two Dirichlet
conditions of continuous-time signals are not applicable in discrete-time signal.
Some signals are not absolutely summable, but they are square summable.

i.e., 
n 
bg
xn
2
  .......(5.9)

The above equation is a weaker condition than Eq. (5.8)


5.6 Digital Signal Processing

5.2.1 Energy Density Spectrum (or) Parseval’s relation for aperiodic signal
The nonperiodic signals are finite-energy signals. The distribution of energy in
the frequency domain of these signals is represented by energy density spectrum.
The energy of a discrete-time signal x(n) is defined as

E =  xn bg 2
.......(5.10)
n 


E = 
n  
bg bg
x n x* n

Replacing x*(n) by inverse DTFT

b g LMM 21 z OP
 
E =  xn bg
X *  e j  n d 
PQ
n  N 

Interchanging the order of summation and integration

z b gLMM  xbng e OP d
 
1  j n
E = X* 
2  N n  PQ
z

=
1
2
X* b g. X b g d


z

E =
1
2
bg
X 
2
d .......(5.11)


In the above equation

sxx() = bg
X 
2
.......(5.12)

Eq. (5.12) represents the distribution of energy as a function of frequency and it


is called energy density spectrum of x(n).
From the above discussions, we can write

z
 
E = 
n 
xn bg 2

1
2
bg
X 
2
d .......(5.13)


The above relation is referred to as Parseval’s relation for discrete-time aperiodic


signals with finite energy.
DFT and FFT Algorithms 5.7

Example 5.2
Determine Fourier transform of x(n) = anu(n) for –1 < a < 1. Also draw the
energy density spectrum.
Solution
Since –1 < a < 1  |a| < 1
To find the DTFT, x(n) should be absolutely summable
 

n 
bg
an u n = 
n 0
a
n
= 1 <
1 a
The DTFT of x(n) is given by

X() =  a n e j  n
n 0
 n
= 
n 0
ea e j  j

1
X() = |ae–j| = |a| < 1
1  a e j 
The energy density spectrum

Sxx() = X  bg 2

= X() . X*()
1 1
= =
e1  a e je1  a e j
 j j
e
1 a e  j
j
 ej   a 2

Sxx() =
1 LMcos  e j
 e j  OP
1  2a cos  a 2
MN 2 PQ
Assuming a = 0.5 the spectrum is drawn for various values of  in the Fig. 5.3.
S xx()
4

3
LM For a  0.5 ,    OP
2
MMS b g  0.8 2 PP
1 N
xx Q
- -   

Fig. 5.3 Energy density spectrum of Example 5.2


5.8 Digital Signal Processing

5.2.1 Properties of DTFT


1. Linearity
DTFT
If x(n)   X()
DTFT
and y(n)   Y()
DTFT
then ax(n) + by(n)   aX() + bY()
2. Time Shifting
DTFT
If x(n)   X()
DTFT
then x(n – k)   e–jk X()
Proof

DTFT [x(n–k)] = 
n 
b g
x n  k e j  n

Substituting m = n – k n = m + k

=  b g
x m e j  m . e j  k
m 

DTFT [x(n – k)] = e–jk X()


3. Frequency Shifting
DTFT
If x(n)   X()
then x(n) e j  0 n 
DTFT
  X(– 0)
Proof

DTFT [ x(n) e j  0 n ] =  bg
x n e j  0 n e j  n
n 



bg
xn e
b g
 j   0 n
=
n  

= X(–0)
4. Time reversal
DTFT
If x(n)   X()
DTFT
then x(–n)   X(–)
DFT and FFT Algorithms 5.9

Proof

DTFT [ x(–n) ] = 
n 
b g
x  n e j  n

Substituting m = –n n = –m

=

 b g
xm e
b g
 j  m

m  

= X(–)
5. Modulation theorem
By applying frequency shifting property, it can be proved that

 1 [ X(+ 0) + X(–0)]


DTFT
x(n) cos 0n 
2
6. Differentiation in the frequency domain
DTFT
If x(n)   X()

 j dX 
DTFT
then nx(n)  bg
d
Proof

We know that X() = 
n 
bg
x n e j  n

Differentiating with respect to 

bg
dX 
=

 xn
 j n
b g ded  = –j 

bg
nx n e j  n
d n  n  

1 bg
dX 
=

 bg
nx n e j  n
j d n  

Multiplying both sides by j in the above equation, we get

j
bg
dX 
=

 bg
nx n e j  n
d n  

DTFT[n x(n)] = j
dX  bg
d
5.10 Digital Signal Processing

7. Convolution theorem

 X1().X2()
DTFT
x1(n) S x2(n) 
Proof

 LM x bkg x bn  kgOP e

 j n

DTFT [ x1(n) S x2(n)] =
n   MN 
k  
1 2
PQ
Substituting n – k = m n = k + m

=



 bg b g
x1 k x 2 m e
b
 j  k m g
m   k  

 
= 
k  
bg
x1 k e j  k 
m  
b g
x 2 m e j  m

= X1(). X2()
8. Multiplication theorem

x1(n) . x2(n) DTFT 1 [ X () S X () ]


 1 2
2
9. Correlation theorem


k 
bg b g
x1 k . x 2 k  n   X1() . X2(–)
DTFT

Example 5.3
Find the Fourier transform of the unit sample sequence.

Solution

Given x(n) = (n) =


RS1 for n  0
T0 for n  0
The DTFT of x(n) is given by

X() = 
n  
bg
x n e j  n

= x(0) e0 = 1
DFT and FFT Algorithms 5.11

Example 5.4
Find the Fourier transform of the unit step sequence.

Solution

Given x(n) = u(n) =


RS1, for n  0
T0 , for n  0

1
X() =  1.e j  n =
n 0 1  e j 
X() is not convergent for  = 0. But for other values of , X() can be evaluated.

Example 5.5
Determine the convolution of the sequences, x1(n) = {1, 1 , 1} and
A
x2(n) = {1, 1, 1}.
A
Solution
The DTFT of x1(n) is determined by
1
X1() = 
n  1
bg
x n e j  n

= ej + 1 + e–j

X1() = 1 + 2 cos 

Similarly DTFT of x2(n) is determined as

X2() = 1 + 2 cos 

By convolution property of DTFT, we have

X() = X1() . X2()

= (1+ 2 cos )2

= 1 + 4 cos2  + 4 cos 

FG 1  cos 2 IJ + 4 cos 
= 1+4
H 2 K
= 1 + 2 + 2 cos2 + 4 cos 
5.12 Digital Signal Processing

Fe j 2
 e j 2 I + 4F e j
 e j  I
= 3+2 GH 2 JK GH 2 JK
= 3 + ej2 + e–j2 + 2ej + 2e–j
X() = ej2 + 2ej + 3 + 2e–j + e–j2
x(n) = { 1, 2, 3, 2, 1 }
A

Example 5.6
Determine the output sequence of the system with impulse response
n
j
h(n) = an u(n) when the input is the complex exponential sequence x(n) = A e 2 .

Solution
Given h(n) = an u(n)
1
H() =
1  a e j 
n
j
x(n) = Ae 2 [i.e., x(n) = A ejn, = /2]

FG  IJ 1
H
H 2K =
j

1 ae 2

1
=
F  I
1  a G cos  j si n J
H 2 2K
1
=
1  aj

F 1 IJ e
A G
j
n
2
Hence y(n) =
H 1  aj K
Example 5.7
A linear time-invariant system is characterized by its impulse response
h(n) = anu(n). Determine the output spectrum for the input signal x(n) = bnu(n) .
DFT and FFT Algorithms 5.13

Solution
The output spectrum Y() is determined by multiplying X() and H().

H() =  a n e j  n
n0

1
=
1  a e j 
For the input signal x(n)
1
X() =
1  be j 
The spectrum of the output signal
Y() = H() . X()
1
Y() =
e1  a e je1  b e j
 j  j

Example 5.8
Determine the input signal x(n) whose Fourier transform is given by

R| A ,   
X() = S|0 ,      c

T c

Solution

X()
R|S A ,   c   c
[ ||  c    c
=
|T0 ,  c   
and   –c ]

To find the time domain sequence x(n) from X(), we use inverse Fourier transform

z

x(n) =
1
2
bg
X  ej n d 


From the given equation, X() varies from –c to c


c
x(n) =
1
2 z
 c
A. ej  n d 

=
A LM e OP
j n
c

2 MN j n PQ  c
5.14 Digital Signal Processing

A LM e j  cn
 e j  cn OP
= 2 MN jn PQ
A Le j  cn
 e j  cn OP
=
n  MN
M 2j PQ
A
x(n) = si n  cn
n
A si n 0 0
For n = 0 x(0) = =
0 0
Since x(n) is indeterminate, the value of x(0) is determined by substituting n = 0
in the inverse DTFT equation, we get
c
x(0) =
1
2
z
 c
A e0 . d 

A c
=   c
2
A c
x(0) =

Hence, the original sequence

R| A , n  0
c

x(n) = S| Asi n  n
|T n  , n  0
c

5.3 Discrete Fourier Transform [DFT]


Discrete Fourier transform is used for the frequency analysis of discrete time
signals. DFT is preferred over DTFT, because of its convenient computations.
In DTFT, spectrum X() is a continuous function of frequency, it is not convenient
to calculate X() in digital signal processor (or) digital computer. For calculations, we
need discrete values of spectrum.
In discrete Fourier transform (DFT), spectrum X() is calculated only at discrete
points.
DFT and FFT Algorithms 5.15

In spectrum X(), the frequency range of  is (– to ) or (0 to 2). The discrete


spectrum is obtained by evaluating X() at a set of N equally spaced discrete frequencies.
When we sample X() at equally spaced frequencies
2 k
k = , k = 0, 1, 2, .......... N –1
N

F 2 k IJ
XG
N 1

j
2 kn
N
X(k) =
HNK =
n 0
x( n ) e k = 0, 1, 2, ..... N –1

.......(5.14)
The above equation is called discrete Fourier transform [DFT] of x(n).
To recover the sequence x(n) from the frequency samples

N 1 2 kn
x(n) =
1
N
 bg
X k e
j
N n = 0,1, 2, ...... N –1
k0
.......(5.15)
The above equation is called as inverse discrete Fourier transform [IDFT].
From the DFT and IDFT equations, we have x(n) and X(k) both contains N
samples.

Example 5.9
Determine the DFT of a sequence x(n) = an u(n) where 0 < a < 1.

Solution

N 1 2 kn N 1 j
2 kn
N 1 F j
2 k
I n

X(k) =  bg
xn e
j
N
=  a en N
=  GG a e N
JJ
n0 n0 n0 H K
F j
2 k I N

1 Ga e JJ
GH N

K LM N2
a N 1  a N 2 1 OP
=  an 
1
j
ae N
2 k
MN n  N1 1 a PQ
1 aN LM j
2kN OP
N 1
X(k) =
j
2k
, k = 0, 1, 2, .......... N–1
MN e PQ
1 ae N
5.16 Digital Signal Processing

Example 5.10
Find the DFT of a sequence x(n) = { 1 ,2, 3, 4}
A
Solution
The DFT equation is given by

N 1 2 nk
j
X(k) =  x( n ) e N
n0

Here number of samples N = 4. Hence substituting N = 4 in the DFT equation


gives

3  nk
j
X(k) =  x( n ) e 2
n0

3
X(0) =  x( n ) e0
n0

= x(0) + x(1) + x(2) + x(3)


= 1+2+3+4
X(0) = 10

3 n
j
X(1) =  x( n ) e 2
n 0

= x(0) + x(1)e–j/2 + x(2)e–j + x(3)e–j3/2


3 3
= 1 + 2[cos  – j sin  ] + 3[cos– jsin] + 4[cos – j sin ]
2 2 2 2
X(1) = 1 – 2j – 3 + 4j = –2 + 2j
3
X(2) =  x( n ) e j  n
n0

= x(0) + x(1)e–j + x(2)e–j2 + x(3)e–j3


= 1 + 2[cos – j sin] + 3[cos2– j sin2] + 4[cos3– j sin3]
= 1 – 2 + 3 – 4 = –2
X(2) = –2
DFT and FFT Algorithms 5.17

3 3n 
j
X(3) =  x( n ) e 2
n 0

= x(0) + x(1)e–j3/2 + x(2)e–j3 + x(3)e–j9/2


3 3 9 9
= 1 + 2[cos – j sin ] + 3[cos3– j sin3] + 4[cos – j sin ]
2 2 2 2
X(3) = 1 + 2j – 3 – 4j = –2 – 2j
DFT sequence X(k) = { 10, –2 + 2j, –2, –2 – 2j }
5.3.1 DFT by using twiddle factor WN
The direct computation of DFT requires more number of complex multiplications
and complex additions. The computational complexity can be reduced by using twiddle
factor.
2
j
Twiddle factor WN = e N

The twiddle factor WN satisfies the periodicity property.

i.e., WNk  N = WNk


It can be proved by the following steps
2
j b
k N g
WNk  N = e N

2 k 2 N
j j
= e N .e N

2k
j
= e N . cos 2  j si n 2
2k
j
= e N . 1 0
2k
j
= e N

WNk  N = WNk .......(5.16)


2
j
In DFT and IDFT equations, we can replace e N by WN
DFT equation X(k) is defined as
N 1
X(k) = 
n 0
bg
x n WNkn .......(5.17)
5.18 Digital Signal Processing

Similarly IDFT equation x(n) can be defined as


N 1
x(n) =
1
N

k0
bg
X k WN kn .......(5.18)

By using the above equations DFT and IDFT can be calculated in the matrix
form.
Let X(k) be an N x 1 matrix, WN be an N x N matrix and x(n) be an N x 1 matrix
Now the N-point DFT may be expressed as
[XN] = [WN][xN]
[XN]  X(k) values in matrix N x 1
[WN]  WN values in matrix N x N
[xN]  x(n) values in matrix N x 1
1
The sequence x(n) can be reconstructed by [xN] = WN* XN
N
WN*  complex conjugate of WN

Example 5.11
Compute the DFT of the sequence x(n) = { 1, 2 , 3 , 4 } by using ‘WN’. Also recover
A
the sequence x(n) from the DFT spectrum X(k).

Solution
Given the number of samples N = 4
X(k) can be written by using WN as
3
X(k) =  xbn gW4kn , k = 0, 1, 2, 3
n 0

N x N matrix of WN(W4) has to be determined


n 0 n1 n  2 n 3
k0 LM W 0
4 W40 W40 W40 OP
k1 MM W 0
4 W41 W42 W43 PP
[W4] =
k2 MM W0
4 W42 W44 W46 PP
k3 MN W
0
4 W43 W46 W49 PQ
DFT and FFT Algorithms 5.19

We know that WN satisfies periodicity property

W44 = W4
b0 4g  W 0
4

W46 = W4
b 2 4 g  W 2
4

W49 = W4
b 5  4g  W 5  W b1 4g  W 1
4 4 4

Substituting the above ‘W4’ values, the matrix [W4] becomes

LM W 0
4 W40 W40 W40 OP
MM W 0
4 W41 W42 W43 PP
[W4] =
MM W 0
4 W42 W40 W42 PP
MN W 0
4 W43 W42 W41 PQ
2 
j j
The value of W 4 = e 4 e 2


j 0
W40 = e 2 1

j  
W41 = e 2  cos  j si n  j
2 2

W42 = e j   cos  j si n   1

j 3 3 3
W43 = e 2  cos  j si n  j
2 2
DFT is determined in the matrix form as
[X4] = [W4][x4]
Substituting [W4] and [x4] values

LM1 1 1 1 OP LM1OP
MM1 j 1 j P M 2P
PMP
[X4] =
MM1 1 1 1 P M 3 P
PMP
MN1 j 1  j PQ MN4PQ
5.20 Digital Signal Processing

LM 10 OP
MM2  j 2PP
[X4] =
MM 2 PP
MN2  j 2PQ
Hence X(k) = {10, –2 + j2, –2, –2 – j2}
The sequence x(n) can be recovered by
1
[x4] = W4* X4
4

LM1 1 1 1 OP LM 10 OP
1 M1 j 1  j P M 2  j 2P
M
4 M1
PM P
1 1 1P M 2 P
=
MM PM P
N1 j 1 j PQ MN2  j 2PQ

LM 4 OP
1M8P
= M P
4 M12P
MM PP
N16Q
LM1OP
MM 2PP
[x4] =
MM3PP
MN4PQ
The recovered sequence
x(n) = {1, 2, 3, 4}
In this example, the number of samples N = 4 and DFT is referred as 4 - point
DFT. If the number of samples N is equal to 8 then the DFT is referred as 8 - point
DFT. However, for N = 4 , 8 - point DFT can be computed by making sequence length
N = 8.
DFT and FFT Algorithms 5.21

For example, if x(n) = {1, 2, 3, 4} then 8 point DFT is computed by making the

sequence x(n) = {1, 2, 3, 4, 0, 0, 0, 0}. The matrix [WN] will be 8 x 8 matrix.

5.3.2 Relationship between Z - transform and DFT

The Z-transform of a sequence x(n) is given by



X(z) = 
n 
bg
x n z n

2 k
j
If X(z) is sampled at the N equally spaced points then z can be replaced by e N

N 1 2kn
j
X(k) = bg
X z
z e
j
2 k
N
=  xn e bg N .......(5.20)
n0

In the above equation X(z) is sampled to obtain X(k). Consequently,


X(z) can be expressed as a function of DFT [X(k)] as follows
N 1
X(z) = 
n 0
bg
x n z n

Replacing x(n) by IDFT equation, we get

N 1 LM 1 N 1 2 kn OP
X(z) = 
n 0 MN N 
k 0
bg
X k e
j
N
PQ z
n

Interchanging the order of summation, we get

N 1 N 1 LM 2 k OP n

X(z) =
1
N

k0
bg
X k 
n 0 MN e
j
N z1
PQ

=
X k bg N 1

1  z N
N 2 k
k0 j
1 e N z 1

X(z) =
1  z N N 1

X kbg .......(5.21)
N 2 k
k 0 j
1 e N z1
5.22 Digital Signal Processing

5.3.3 Properties of DFT


1. Periodicity
If X(k) is an N-point DFT of x(n),
then X(k + N) = X(k), for all k
Proof
X(k) can be written interms of WN as
N 1
X(k) = 
n 0
bg
x n WNkn

N 1
X(k + N) = 
n 0
bg
x n WNkn .WNNn

2
j Nn
We know that WNNn = e N = cos 2n – j sin 2n = 1
N 1
Hence X(k + N) = 
n 0
bg
x n WNkn = X(k)

2. Linearity
DFT
a1x1(n) + a2x2(n)   a1X1(k) + a2X2(k)
3. Circular convolution property
The circular convolution of two sequences in time domain is equal to the
multiplication of their DFTs.
DFT
x1(n) N x2(n)   X1(k) . X2(k)

Circular convolution
The circular convolution of x1(n) and x2(n) is given by
N 1
x3(m) = 
n 0
b g cb
x1 n x 2 m  n gh N m = 0, 1, .........N–1

Example 5.12
Determine the circular convolution of two sequences x1(n) = {1, –1, 1, –1} and
x2(n) = {1 , 2, 3, 4 }.Verify the answer with matrix method and by means of DFT
and IDFT.
DFT and FFT Algorithms 5.23

Solution
The circular convolution of the sequences can be determined by circular
convolution formula (or) by matrix method
First we solve by the formula. Here x1(n) and x2(n) have a same number of
samples N = 4
The circular convolution of two sequence x1(n) and x2(n) is given by
N 1
x3(m) = 
n 0
b g cb
x1 n x 2 m  n gh N

Since N = 4, we have to find the values of x3(0), x3(1), x3(2), x3(3).

The value of x3(0) is calculated by circles x2 (3)

x 2((-n))4 4
as shown in Fig. 5.4(a)
-1 x 4 = -4

-1
3
x3(0) =  x1 bn g x 2 cbn gh 4 3
x1 (n) x1 (1)
1
n 0 x2 (2) 1x3=3 1 x (2) x1 (0) 1 1 x 1 = 1 x2 (0)
1
x 1 (3)

= 1x1–1x4+1x3–1x2 -1

x3(0) = –2 -1 x 2 = -2
2
x2 (1)

Fig. 5.4(a)

x2 (0)
The value of x3(1) is calculated by circles x2 ((1-n))4 1

as shown in Fig. 5.4(b) -1 x 1 = -1

3
 x1 bn g x 2 cb1  n gh 4
-1
x3(1) = 4 x1 (n) x1 (1) 2
n 0
x2 (3) 1x4=4 1 x (2) x1 (0) 1 1 x 2 = 2 x2 (1)
1
= 1x2–1x1+1x4–1x3 x1 (3)

-1
x3(1) = 2
-1 x 3 = -3
3
x2 (2)

Fig. 5.4(b)
5.24 Digital Signal Processing

x2 (1)
The value of x3(2) is calculated by
x 2 ((2-n))4 2
circles as shown in Fig. 5.4(c)
-1 x 2 = -2
3
x3(2) =  x1 bn g x 2 cb 2  n gh 4 -1
n 0 x1 (n) x1 (1)
1 3
= 1x3–1x2+1x1–1x4 x2 (0) 1x1=1 1 x (2) x1 (0) 1 1 x 3 = 3 x2 (2)
1
x1 (3)
x3(2) = –2
-1

-1 x 4 = -4
4
x2 (3)

Fig. 5.4(c)

x2 (2)

The value of x3(3) is calculated by x2 ((3-n))4 3

-1 x 3 = -3
circles as shown in Fig. 5.4(d)
3 -1
x3(3) = 
n 0
b g cb
x1 n x 2 3  n gh 4
2 x1 (n) x1 (1) 4

x2 (1) 1x2=2 1 x (2) x1 (0) 1 1 x 4 = 4 x2 (3)


1
= 1x4–1x3+1x2–1x1 x1 (3)

-1
x3(3) = 2
-1 x 1 = -1
2
x2 (0)
Hence x3(m) = {–2, 2, –2, 2} Fig. 5.4(d)

Verification by matrix method

The circular convolution of two sequences are represented by matrix form as

LM x b0gOP
3 LM x b0g
2 bg
x2 3 bg
x2 2 b g OP LM x b0gOP
x2 1 1

MM x b1gPP
3
MM x b1g
2 x b0g
2 x b 3g
2 x b 2gP M x b1g P
2
PM P 1
=
MMx b 2gPP
3
MM x b 2g
2 x b1g
2 x b0 g
2 x b 3gP M x b 2gP
2
PM P 1
MN x b3gPQ
3
MN x b3g
2 x b 2g
2 x b1g
2 x b0gPQ MN x b 3gPQ
2 1
DFT and FFT Algorithms 5.25

Substituting x1(n) and x2(n) values in the matrix, we get


LM1 4 3 2 OP LM 1 OP LM2OP
=
MM 2
MM3
1 4
PP MM PP = MMM 2 PPP
3P M1P

MN4
2 1 4
PP MM 1 PP MM2PP
3 2 1 Q N1Q N2Q
Hence, x3(m) = {–2, 2, –2, 2}
Verification by means of DFT and IDFT
From the circular convolution property of DFT, the circular convolution of x1(n)
and x2(n) is equivalent to the multiplication of DFTs X1(k) and X2(k) in frequency
domain. The original sequence x(n) is obtained by the IDFT of the multiplied frequency
domain sequence X1(k).X2(k).
First let us determine X1(k) by using ‘WN’ from x1(n) = {1, –1, 1,–1}
[X4] = [W4][x4]

LM1 1 1 1 OP LM 1 OP LM0OP
=
MM1 j 1 j P M1P
PP MM PP = MMM0PPP
MM1 1 1 1
PP MM 1 PP MM4PP
MN1 j 1  j Q N1Q N0 Q
X1(k) = {1, –1, 1, –1}
Next let us determine X2(k) by using WN from x2(n) = {1, 2, 3, 4}
[X4] = [W4][x4]

LM1 1 1 1 OP LM1OP LM 10 OP
=
MM1 j 1 j P M 2P
PP MM PP = MMM2  j 2PPP
MM1 1 1 1 3
PP MM PP MM 2 PP
MN1 j 1  j Q N4Q N 2  j 2 Q
X2(k) = {10, – 2 + j2, –2, – 2 – j2}
X3(k) is determined by the multiplication of X1(k) and X2(k).
X3(k) = {0, 0, – 8, 0}
5.26 Digital Signal Processing

The IDFT of X3(k) will give the circular convolution output x3(m)
1
[X4] = W4* X 4
4

LM1 1 1 1 OP LM 0 OP LM8OP LM2OP


1 M1  jP M 0 P M P
= M
4 M1
j 1
PP MM PP = 14 MMM 8 PPP = MM 2 PP
MM 1 1 1 8
PP MM PP MM8PP MM2PP
N1 j 1 j QN0Q N8Q N2Q
Hence x3(m) = {–2, 2, –2, 2}
4. Time Reversal
DFT
x((–n))4 = x(N–n)   X((–k))4 = X(N – k)
Proof

N 1 2 kn
j
DFT[x(N–n)] =  b
x N n e g N
n0

Substituting m = N – n n = N – m

N 1 j
b
2 k N  m g
=
m0
 xm eb g N

By interchanging k and m in the exponential function, we get

N 1 j
b
2 m N  k g
=
m0
 xm eb g N

DFT [x(N – n)] = X(N – k)


5. Circular Time Shifting
2 kl
j
DFT
x((n – l))N  N
 X(k) e
6. Circular Frequency Shifting
2 l n
j
x(n) e DFT
N
 X((k – l))N
7. Complex Conjugate
DFT
x*(n)   X*((–k))N = X* (N – k)
DFT and FFT Algorithms 5.27

8. Multiplication of two sequences

DFT 1
x1(n) . x2(n)   X1(k) N X2(k)
N
9. Circular correlation
N 1
bg
r xy l =  b g cb gh
x n y* n l
N
DFT bg
 Rxy k = X(k) . Y*(k)
n0

10. Parseval’s theorem


If x(n) DFT DFT
 X(k) and y(n)  Y(k)

N 1 N 1
 xbn g y * bn g  X b k gY * b k g
1
then =
n 0 N k 0

If y(n) = x(n) then


N 1 N 1
 bg
xn
2
=
1
N

k0
X kbg 2
.......(5.22)
k0

5.3.2 DFT In Linear Filtering


The output of the system in frequency domain is determined by discrete-time
Fourier transform as
Y() = X() . H() .......(5.23)
In the above equation X(), H() and Y() all are represented in the continuous
spectrum having continuous variable  and computations are not convenient. Hence
the discrete spectrum DFT is preferred over DTFT for efficient computation. Moreover,
DFT is computationally more efficient than time domain convolution.
In the properties of DFT, circular convolution has been discussed. But circular
convolution is not applicable to find the output of the system. To find the output of the
system or linear filter, linear convolution has to be used.
The frequency domain methodology equivalent to linear convolution is linear
filtering of DFT. The linear filtering is accomplished by the following steps.
Suppose that we have a finite duration sequence x(n) of length M1 which excites
an FIR filter of length M2 .
5.28 Digital Signal Processing

i.e., x(n) extends from 0  n  M1 – 1


h(n) extends from 0  n  M2 – 1
The output y(n) of the FIR filter can be expressed as
M 2 1
y(n) =
k0
 bgb
h k x nk g .......(5.24)

The length of the output sequence y(n) is M1+ M2 – 1


Therefore the DFT of size N  M1 + M2 – 1 is required to represent y(n) in
frequency domain.
The output of the system in frequency domain (DFT).
Y(k) = X(k) . H(k) .......(5.25)
In Eq.(5.25) N-point DFTs X(k) and H(k) with length N  M1 + M2 – 1 are
multiplied to obtain Y(k). The IDFT of Y(k) will be the output sequence y(n).

Example 5.13
Determine the response of FIR system with impulse response h(n) = {1, 2, 3} to
the input sequence x(n) = {1, 1} by means of DFT and IDFT. Verify the answer by
linear convolution.

Solution
The input sequence x(n) has a length of M1 = 2 and the impulse response h(n)
has a length of M2 = 3.
The DFT size required for computation is
N  M1 + M2 – 1
N  2+3–1
N  4
For convenient computation, we select N = 4.
Since N = 4, the 4-point DFT can be used. We can write x(n) = {1, 1, 0, 0} and
h(n) = {1, 2, 3, 0}. First, let us find the 4-point DFT for the input sequence x(n).
By matrix representation [X4] = [W4][x4]
DFT and FFT Algorithms 5.29

LM1 1 1 1 OP LM1OP LM 2 OP
MM1 j 1 j P M1P
PM P MM1  j PP
[X4] = 
MM1 1 1  1P M 0 P
PM P MM 0 PP
MN1 j 1  j PQ MN0PQ MN1  j PQ
Hence, the DFT of the input sequence
X(k) = { 2, 1–j, 0, 1+j }
Next, we determine the DFT of the impulse response h(n). By matrix
representation
[H4] = [W4][h4]

LM1 1 1 1 OP LM1OP LM 6 OP
MM1 j 1 j P M 2P
PM P MM2  j 2PP
[H4] = 
MM1 1 1 1P M 3P
PM P MM 2 PP
MN1 j 1  j PQ MN0 PQ MN2  j 2PQ
Hence, the DFT of the impulse response
H(k) = { 6, –2 –j2, 2, –2 + j2 }
The response of the system in DFT
Y(k) = X(k) . H(k)
Y(k) = { 12, – 4, 0, – 4 }
The IDFT of Y(k) gives the response of the system.
y(n) = IDFT [Y(k)]

LM1 1 1 1 OP LM 12 OP LM 4 OP LM1OP
1 M1 j 1  j P M 4 P
1 M12 P = M 3P
M
4 M1
PM P M P MP
1P M 0 P
[y4] = =
1 1 4 M 20P M5P
MM PM P MM PP MM PP
N1 j 1 j PQ MN 4 PQ N12Q N3Q
Hence the output sequence
y(n) = {1, 3, 5, 3 }
5.30 Digital Signal Processing

Verification of output by linear convolution


Linear convolution is performed by matrix representation (or) tabulation method.
x(n) = {1, 1} and h(n) = { 1, 2, 3 }

b g xb1g
x0
1 1

h0bg 1 1 1

hb1g 2 2 2

h b 2g 3 3 3

y(n) = { 1, 3, 5, 3 }

Example 5.14
Find the linear convolution of x(n) = {1, – 3, 5, –7, 9, –11 } with
h(n) = { – 4, 8, –16 } using circular convolution.

Solution

The linear convolution of the input sequence x(n) and impulse response h(n)

produces the output of the system. The length of the output sequence in linear

convolution

N = M1 + M2 – 1

M1 - Length of the input sequence

M2 - Length of the impulse response

Here N = 6+3–1=8

Hence both the sequences should be made to length N = 8 and the circular

convolution is found out for those sequences.

x(n) = { 1, – 3, 5, – 7, 9, –11, 0, 0 }

h(n) = { – 4, 8, –16, 0, 0, 0, 0, 0 }
DFT and FFT Algorithms 5.31

By matrix method of circular convolution

LM 4 0 0 0 0 0  16 8 OP LM 1 OP LM 4 OP
MM 8 4 0 0 0 0 0 16 P MM 3 PP MM 20 PP
0 P
MM016 8
16
4
8
0
4
0
0
0
0
0
0 0 P
P MM 57 PP MM 11660
PP
MM 0 0 16 8 4 0 0 0 P
P MM 9 PP MM172PP
MM 0 0 0 16 8 4 0 0 P MM11PP =
MM 228 PP
0 P
MM 00 0 0 0 16 8 4
4 PQ
P MM 00 PP MM176
232
P
N 0 0 0 0 16 8 N Q N PQ
The output sequence y(n) = { – 4, 20, – 60, 116, –172, 228, –232, 176 }

5.4 Fast Fourier Transform (FFT) Algorithms


We have already discussed that DFT is preferred over other mathematical tools

such as DFS and DTFT. DFT is used in many applications including linear filtering

and spectral analysis. As DFT has discrete samples in the spectrum, it is computed by

efficient algorithms.

The one way of computing DFT is divide-and-conquer approach in which DFT of

size N is reduced to smaller DFTs from which larger DFT is computed. In this approach,

we have FFT algorithms for computing DFT when the size N is a power of 2 and 4.

FFT algorithm utilises all the properties of ‘WN’ to reduce the calculations of

DFT.

1. Periodicity

WNk  N = WNk
This property is already proved in the section 5.3.1.
2. Symmetry Property
N
k
WN 2 = WNk
5.32 Digital Signal Processing

Proof
N j
2FG
k
N IJ
WN
k
2 = e N H 2 K
2k 2 N
j j .
= e N .e N 2

2 k
j
= e N . cos  j si n 

= WNk
3. W N = WN2
2

Proof
2
j
e N/ 2
WN/2 =
2
j .2
= e N

= WN2
FFT Algorithms are based on the fundamental principle of decomposing the
computation of DFT into smaller DFTs.
There are basically two types of algorithms.
1. Decimation - in - Time [DIT]
2. Decimation - in - Frequency [DIF]
In DIT, the sequence in time domain is divided into smaller sequences and the
DFT of these sequences are combined to obtain required DFT of the entire sequence.
In DIF, the frequency samples of the DFTs are decomposed into smaller.
5.4.1 Radix - 2 decimation-in-time algorithm [DIT - FFT]
The radix - 2 means the number of output points can be expressed as a power

of 2.

i.e., N = 2M Where M - integer

In this algorithm sequence x(n) is splitted. Let the N - point data sequence x(n)

be splitted into two N point data sequences f1(n) and f2(n).


2

You might also like