Sei sulla pagina 1di 323

Discrete Fourier

Transform

Let x(t) be a periodic function of time having a time period T0, then
the fundamental frequency of x(t) is

2
0

= T0

Let x(t) be a periodic function of time having a time period T0, then
the fundamental frequency of x(t) is

2
0

= T0

Let x(t) be a periodic function of time having a time period T0, then
the fundamental frequency of x(t) is

0 =
2T0

The signal x(t) may be expressed in terms of the Fourier series as

0
x(t) = a0 +nn= (0 a n cosn
t + b sin

n t)

x(t) = a +
0

n t)

(
a

n
n=
1

cosn t + b sin
0

x(t) = a +
0

(
a

n
n=
1

cosn t + b sin
0

n t) 1 2
T0

1
a0 =
x(t)d(
0t) = 0x(t)dt
0
0
2
T

where

the average value

x(t) = a +
0

(
a

n
n=
1

cosn t + b sin
0

n t) 1 2
T0

1
a0 =
x(t)d(
0t) = 0x(t)dt
0
0
2
T

T0
2
1
an = 2 0 x(t)cosn0td(0 t) =0 0
T

cosn0tdt

where

the average value

x(t)

for n = 1, 2, 3,

x(t) = a +
0

(
a

n
n=
1

cosn t + b sin
0

n t) 1 2
T0

1
the average value
a0 =
x(t)d(
0t) = 0x(t)dt
0
0
2
T

T0
2
1
an = 2 0 x(t)cosn0td(0 t) =0 0 x(t)
T for n = 1, 2, 3,

cosn0tdt
T0
2
1
bn = 2 0 x(t)sinn0td(0 t) =
x(t)
0
0
T for n = 1, 2, 3,

sinn0tdt

where

x(t) = a +
0

(
a

n
n=
1

cosn t + b sin
0

n t) 1 2
T0

1
the average value
a0 =
x(t)d(
0t) = 0x(t)dt
0
0
2
T

T0
2
1
an = 2 0 x(t)cosn0td(0 t) =0 0 x(t)
T for n = 1, 2, 3,

cosn0tdt
T0
2
1
bn = 2 0 0 x(t)sinn0td(0 t) =
x(t)
0
T for n = 1, 2, 3,

sinn0tdt
a s are known as
cosine coefficients and b s are known as sine coefficients.
where

Relation (2) may be rewritten as

an

x(t) = a0 a +b ( 2
n
n
an
n=1
+
+b
2

cosn0 t
2
n

(b
)a

+b

sinn0
t)

Relation (2) may be rewritten as

an

x(t) = a0 a +b ( 2
n
n
an
n=1
+
+b

cosn0 t
2
n

(b
)a

+b

sinn0
t)

or

x(t) = C0 + n=1 Cn cos(n0t +n


)

[cos(A+ B) = cosAcosB sin


AsinB]

n
an

-bn

Relation (2) may be rewritten as

an

x(t) = a0 a +b ( 2
n
n
an
n=1
+
+b

(b
)a

cosn0 t
2
n

+b

sinn0
t)

or

x(t) = C0 + n=1 Cn cos(n0t +n


)

[cos(A+ B) = cosAcosB sin


AsinB]
where C =
C= a
n =
2

tan

+b

0 0

n n

n
an

-bn

Relation (2) may be rewritten as

an

x(t) = a0 a +b ( 2
n
n
an
n=1
+
+b

(b
)a

cosn0 t
2
n

+b

sinn0
t)

or

x(t) = C0 + n=1 Cn cos(n0t +n


)

[cos(A+ B) = cosAcosB sin


AsinB]
where C =
C= a
n =
2

0 0

+b

tan

n n

n
an

-bn

Cn, n = 1, 2, 3, is the amplitude and n, n = 1, 2, 3, is the phase


of the nth harmonic. C0 is the average value.

Expressing cosine and sine terms of relation (2) in terms of their complex
exponential values as

e
x(t) = a0 + [an
(

n=1

jn0t

jn0t

jn0t

+e
) +ebn
2 2j (

jn0t

)]

Expressing cosine and sine terms of relation (2) in terms of their complex
exponential values as

jn0t

x(t) = a0 + n= [an
1
(

or

x(t) = a + n=1 [e
)]

jn0t

jn0t

jn0t

+e
) +ebn
2 2j (

jn0t

)]

an jbn
jn0t an + jbn
( 2 2 )+e
(

Expressing cosine and sine terms of relation (2) in terms of their complex
exponential values as

jn0t

x(t) = a0 + n= [an
1
(

or

or

+ [F
e

x(t) = a + n=1 [e
)]
x(t) = F0

jn0t

n=1

jn0t

+e
) +ebn
2 2j (

jn0t

)]

an jbn
jn0t an + jbn
( 2 2 )+e
(

jn0t

jn0t

+ Fn
e

jn0t

Expressing cosine and sine terms of relation (2) in terms of their complex
exponential values as

jn0t

x(t) = a0 + n= [an
1
(

or

or

+ [F
e

x(t) = a + n=1 [e
)]
x(t) = F0

jn0t

F0 = a0
,

jn0t

+e
) +ebn
2 2j (

jn0t

)]

an jbn
jn0t an + jbn
( 2 2 )+e
(

jn0t

n=1

where

jn0t

an
Fn =
jbn 2
(

+ Fn
e

jn0t

an +
) and Fn = (
jbn 2

Now

x(t) = F0 + [Fn
n=1 e

where

F0 = a0
,

Here F

an
Fn =
jbn 2
(

= F n , conjugate of Fn.

jn0t

+ Fjnn0t
e

an +
) and Fn = (
jbn 2

Now

x(t) = F0 + [Fn e jn+0tFnejn0t

n=1

F0 = a0

where

,
Here F

an
Fn =
jbn 2
(

an +
) and Fn = (
jbn 2

= F n , conjugate of Fn.

Relation (4) may be expressed as

x(t) = F0 + n=1 Fn

jn0
t

+e F

n=1

jn0
t

Now

x(t) = F 0 +

Fe
n

n=1
t
0

jn

n=1

et
0

jn

Now

x(t) = F 0 +

Fe
n

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn

jn
t
0

F
+ F
e
n=1

n=
1

et

jn

jn
t
0

Now

x(t) = F 0 +

Fe
n

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn

jn
t
0

F
+ F
e
n=1

n=
1

et

jn

jn
t
0

Now

x(t) = F 0 +

Fe
n

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn

jn
t
0

F
+ F
e
n=1

n=
1

et

jn

jn
t
0

Now

x(t) = F 0 +

Fe
n

jn

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn
t
0

F
+ F
e
n=1

n=
1

jn 0
t

Hence, we can write,

x(t ) =

F e

n = n

et

jn

jn
t
0

Now

x(t) = F 0 +

Fe
n

jn

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn
t
0

F
+ F
e
n=1

n=
1

jn 0
t

Hence, we can write,

x(t ) =

et

jn

jn
t
0

F e

n = n

Thus x(t) may be expressed in terms of Complex Fourier Series in relation


(5). Here Fn is known as the Complex Fourier coefficient.

Now

x(t) = F 0 +

Fe
n

jn

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn
t
0

F
+ F
e
n=1

n=
1

jn 0
t

Hence, we can write,

x(t ) =

et

jn

F e

n = n

Variation of Fn coefficients with n

jn
t
0

Now

x(t) = F 0 +

Fe
n

jn

n=1
t
0

x(t ) = F0 + n F n

=1
e

jn
t
0

F
+ F
e
n=1

n=
1

jn 0
t

Hence, we can write,

x(t ) =

et

jn

jn
t
0

F e

n = n

Variation of Fn coefficients with n

= Fn

The amplitudes Cns of relation (3) may be related to Fns as

C=F
00

, the average value

The amplitudes Cns of relation (3) may be related to Fns as

C=F
00

and

, the average value

C =2F

, for n = 1, 2, 3,

n n

the amplitude of the nth harmonic.

The amplitudes Cns of relation (3) may be related to Fns as

C=F
00

and

, the average value

C =2F

, for n = 1, 2, 3,

n n

the amplitude of the nth harmonic.

and

j(F n nF
n = tan Fn +n
) ( )
the phase ofF
the nth harmonic.
1

From relation (4), Fn may be expressed as

an jbn
F =( 2
)
n

From relation (4), Fn may be expressed as

an jbn
F =( 2
)
Substituting
expressions of an and bn from relation (2)
n

1
Fn =
T0

T0

jn
x(t)e
dt
t

From relation (4), Fn may be expressed as

an jbn
F =( 2
)
Substituting
expressions of an and bn from relation (2)
n

1
Fn =
T0

T0

jn
x(t)e
dt
t

For aperiodic signals, the time period T0 becomes infinite, and the Fourier
transform of an aperiodic signal x(t) is defined as

X ( ) =
dt

x(t )e jt

From relation (4), Fn may be expressed as

an jbn
F =( 2
)
Substituting
expressions of an and bn from relation (2)
n

1
Fn =
T0

T0

jn
x(t)e
dt
t

For aperiodic signals, the time period T0 becomes infinite, and the Fourier
transform of an aperiodic signal x(t) is defined as

X ( ) = x(t )e jt
dt

Reference: Network Analysis by


Valkenburg

Let xk be a periodic discrete sequence obtained from a periodic signal x(t)


with a time period T0.

Let xk be a periodic discrete sequence obtained from a periodic signal x(t)


with a time period T0.
Let N number of samples be available in the time period T0 with a sampling
interval .
T 0 = N

Let xk be a periodic discrete sequence obtained from a periodic signal x(t)


with a time period T0.
Let N number of samples be available in the time period T0 with a sampling
interval .
T 0 = N

Using rectangular rule for integration, the Fourier coefficients may be obtained as

Using rectangular rule for integration, the Fourier coefficients may be obtained as

From relation (2)

1
a0 =

T0

0 0

)dt T

x(t

Using rectangular rule for integration, the Fourier coefficients may be obtained as

From relation (2)

1
a0 =
1
a0 =

N 1

0 k =0 k

T0

0 0

)dt T

x(t

Using rectangular rule for integration, the Fourier coefficients may be obtained as

From relation (2)

a0 =

1
T0

1
a0 =
or

a
0

N 1

0 k =0 k

N 1

Nk =0 k

T0

dt
0

x(t )

Using rectangular rule for integration, the Fourier coefficients may be obtained as

From relation (2)

a0 =

1
T0

1
a0 =

or

0 k =0 k

N 1

k =0

x
k

dt
0

N 1

T0

1
x =
k

N
1
k
=0

x(t )

Using rectangular rule for integration, the Fourier coefficients may be obtained as

Similarly,

From relation (2)

2
an =

T0

x(t ) cos
n0tdt T
0 0

Using rectangular rule for integration, the Fourier coefficients may be obtained as

Similarly,

From relation (2)

2
an =

an
=

N
1

2
N

x
k =0

T0

x(t ) cos
n0tdt T
0 0

cos n
(k )
N

(using the substitutions: 0 =

2 2
=
T0 N

and T0 =

and

t = k

in relation (2))

Using rectangular rule for integration, the Fourier coefficients may be obtained as

Similarly,

From relation (2)

2
an =

an
=

N
1

2
N

x
k =0

T0

x(t ) cos
n0tdt T
0 0

cos n
(k )
N

a n = 2 N 1 kx cos

N k=
N
2kn0

0 = 2 =2
(using the substitutions:

or

T0 N

and T0 =

and

t = k

in relation (2))

Using rectangular rule for integration, the Fourier coefficients may be obtained as

and

From relation (2)

2
bn =

T0

x(t ) sin
n0tdt T
0 0

Using rectangular rule for integration, the Fourier coefficients may be obtained as

and

From relation (2)

2
bn =
N 1

bn
=

2
N

x
k =0

T0

x(t ) sin
n0tdt T
0 0

2
sin n
(k )
N

(using the substitutions: 0 =

2 2
=
T0 N

and T0 =

and

t = k

in relation (2))

Using rectangular rule for integration, the Fourier coefficients may be obtained as

and

From relation (2)

2
bn =
N 1

bn
=

2
N

x
k =0

T0

x(t ) sin
n0tdt T
0 0

2
sin n
(k )
N

bn = 2 N 1k x sin
N k =0
N
2kn
2 2

0 =
=
(using the substitutions:

or

T0 N

and T0 =

and

t = k

in relation (2))

Now from relations (11) and


(12),

an
jbn 2

2kn
2kn
=
N k = 0 xk cos N j sin N

N 1

Now from relations (11) and


(12),

an
jbn 2

2kn
2kn
=
N k = 0 xk cos N j sin N

N jn 2k
1 1
= xk e N
N

N 1

k =0

Now from relations (11) and


(12),

an
jbn 2

2kn
2kn
=
N k = 0 xk cos N j sin N

N jn 2k
1 1
= xk e N
N

N 1

k =0

N
or

2
(a

jb

x e

jn 2k
N

N
1

)k k=
=0

Now from relations (11) and


(12),

an
jbn 2

2kn
2kn
=
N k = 0 xk cos N j sin N

N jn 2k
1 1
= xk e N
N

N 1

k =0

N
or

2
(a

Substituting

jb

)k k=

x e
Na0 = X

N1 0

jn N

Xn = k=0 xk e

2k

jn 2k
N

N
1

=0

and

N
(a jb ) = X , for n = 1, 2, 3,
n
n
2 n

for n = 0, 1, 2,

N1

From relation (13)

jn N

Xn = k=0 xk e

2k

for n = 0, 1, 2,

N1

From relation (13)

jn N

Xn = k=0 xk e

2k

for n = 0, 1, 2,

Now, for n N, let n = N + m, for m = 0, 1, 2,

N 1
j (N +m ) 2k
N

Xn =
xk
e
k
=0

jn N

2k

N1

From relation (13)

Xn = k=0 xk e

for n = 0, 1, 2,

Now, for n N, let n = N + m, for m = 0, 1, 2,

N 1
j (N +m ) 2k
N

Xn =
xk
e
k
=0
N1

or

m+N

j(2k

= xk e .e
)
k=0

jm N

2k

jn N

2k

N1

From relation (13)

Xn = k=0 xk e

for n = 0, 1, 2,

Now, for n N, let n = N + m, for m = 0, 1, 2,

N 1
j (N +m ) 2k
N

Xn =
xk
e
k
=0
N1

or

m+N

jm N

2k

j(2k

= xk e .e
)

k=0

or

2
jm k
N

N
1
m+N

e
=

k=0

xk

= Xm

jn N

2k

N1

From relation (13)

Xn = k=0 xk e

for n = 0, 1, 2,

Now, for n N, let n = N + m, for m = 0, 1, 2,

N 1
j (N +m ) 2k
N

Xn =
xk
e
k
=0
N1

or

m+N

jm N

2k

j(2k

= xk e .e
)

k=0

or

N
1

2
jm k
N

= Xm

e is periodic with a period N.


Therefore X
m+N

= k=0 xk
n

Then, within one period (i.e. for n = 0, 1, 2, , N-1),


N 1

X n = xk
e
k
=0

jn

2k

N

, for n = 0, 1, 2, ., N-1

Then, within one period (i.e. for n = 0, 1, 2, , N-1),


N 1

X n = k =0 xk
e

jn

2k

N

, for n = 0, 1, 2, ., N-1

Relation (15) is known as the Discrete Fourier Transform (DFT) of a finite


sequence xk, k = 0, 1, 2, , N-1.

Then, within one period (i.e. for n = 0, 1, 2, , N-1),


N 1

X n = k =0 xk
e

jn

2k

N

, for n = 0, 1, 2, ., N-1

Relation (15) is known as the Discrete Fourier Transform (DFT) of a finite


sequence xk, k = 0, 1, 2, , N-1.
Xn is the discrete Fourier coefficient.

Then, within one period (i.e. for n = 0, 1, 2, , N-1),


N 1

X n = k =0 xk
e

jn

2k

N

, for n = 0, 1, 2, ., N-1

Relation (15) is known as the Discrete Fourier Transform (DFT) of a finite


sequence xk, k = 0, 1, 2, , N-1.
Xn is the discrete Fourier coefficient.
Relation (14) represents the periodicity property of DFT. Xn repeats at the Nth
harmonic.

Then, within one period (i.e. for n = 0, 1, 2, , N-1),


N 1

X n = k =0 xk
e

jn

2k

N

, for n = 0, 1, 2, ., N-1

Relation (15) is known as the Discrete Fourier Transform (DFT) of a finite


sequence xk, k = 0, 1, 2, , N-1.
Xn is the discrete Fourier coefficient.
Relation (14) represents the periodicity property of DFT. Xn repeats at the Nth
harmonic.
The frequency corresponding to the Nth harmonic

N
1
=
= =f
T0 N
N

, the sampling
frequency.

Then, within one period (i.e. for n = 0, 1, 2, , N-1),


N 1

X n = k =0 xk
e

jn

2k

N

, for n = 0, 1, 2, ., N-1

Relation (15) is known as the Discrete Fourier Transform (DFT) of a finite


sequence xk, k = 0, 1, 2, , N-1.
Xn is the discrete Fourier coefficient.
Relation (14) represents the periodicity property of DFT. Xn repeats at the Nth
harmonic.
The frequency corresponding to the Nth harmonic

N
1
=
=
=
T0 N
N
f

, the sampling
frequency.

Thus Xn repeats at the sampling frequency fs.

The Discrete Fourier Transform (DFT) of a finite sequence xk, k = 0, 1, 2, , N1 is defined as


N 1

X n = xk
e
k
=0

jn

2k

N

, for n = 0, 1, 2, ., N-1

The Discrete Fourier Transform (DFT) of a finite sequence xk, k = 0, 1, 2, , N1 is defined as


N 1

X n = xk
e
k
=0

jn

2k

N

, for n = 0, 1, 2, ., N-1

Amplitude Cn (c.f. relation (3)) is related to Xn as

1
C =N
0

, the average value

The Discrete Fourier Transform (DFT) of a finite sequence xk, k = 0, 1, 2, , N1 is defined as


N 1

jn

X n = xk
e
k
=0

2k

N

, for n = 0, 1, 2, ., N-1

Amplitude Cn (c.f. relation (3)) is related to Xn as

1
C =N
0

and

X2
Cn
Xn
N
=

, the average value

, for n = 1, 2, 3,

Relation (15):

By multiplying

1
e
N

N
1
k
k
=0

jn 2l
N

Xn = x

2k

jn

, for n = 0, 1, 2, ., N-1

on both sides of relation (15) and summing up from n = 0 to N-1 with 0 l N


N 1

1
Xn
=
N n0
e

2l
jn N

N 1 N
1

jn 2Nk

1
= N n = 0 k xk
=0
e
1 N11 N
= N n =0 kx=0 e k

.e

2l
jn N

jn (l k )
2
N

By multiplying

1
e
N

N
1
Relation
(15):
n
k
k
=0

jn 2l
N

X
e

2k

jn

, for n = 0, 1, 2, ., N-1

on both sides of relation (15) and summing up from n = 0 to N-1 with 0 l N


N 1

1
Xn
=
N n0
e

2l
jn N

N 1 N
1

jn 2Nk

1
= N n = 0 k xk
=0
e
1 N11 N
= N n =0 kx=0 e k

Now, changing the order of


summation,

1
N

N 1

n=0

X
n
e

2l
jn N

N
1

k =0

k 1
N

N
1

n=0

jn

.e

2l
jn N

jn (l k )
2
N

2 (l k )
N

By multiplying

1
e
N

N
1
Relation
(15):
n
k
k
=0

jn 2l
N

X
e

2k

jn

, for n = 0, 1, 2, ., N-1

on both sides of relation (15) and summing up from n = 0 to N-1 with 0 l N


N 1

1
Xn
=
N n0
e

2l
jn N

N 1 N
1

jn 2Nk

1
= N n = 0 k xk
=0
e
1 N11 N
= N n =0 kx=0 e k

Now, changing the order of


summation,

1
N

N 1

n=0

X
n
e

2l
jn N

N
1

k =0

k 1
N

N
1

n=0

jn

.e

2l
jn N

jn (l k )
2
N

2 (l k )
N

N 1

jn
)

2 (l k

, when
N

(l k) =

Now, in n=0
pN
e
where p is a positive integer, the expression
becomes

N 1

e
n=0

jn 2 p

N 1

jn
)

2 (l k

, when
N

(l k) =

N 1

Now, in n=0
pN
e
where p is a positive integer, the expression
becomes
N 1 N 1

As np is another integer, it
becomes

n=0 en=0

j 2 (np )

e
pn =
0

jn 2

= 1 =

N 1

jn
)

2 (l k

, when
N

(l k) =

N 1

Now, in n=0
pN
e
where p is a positive integer, the expression
becomes
N 1 N 1

As np is another integer, it
becomes

n=0 e

j 2 (np )
n=0

e
pn =
0

jn 2

= 1 =

In the present case, as l and k are limited


N within 0 and (N 1), the possible
value of p is zero, i.e. when (l - k) = 0 or l = k, the summation becomes N.

N 1

Now, in n=0

jn
)

2 (l k

, let
N

2 (l k
=
) N

N 1

Now, in n=0

jn
)

2 (l k

, let
N

2 (l k
=
) N
N 1

jn

2 (l k

Then the summation becomes

n=0 e

N 1

=
N

e
jn

n=0

N 1

jn
)

2 (l k

Now, in n=0

, let
N

2 (l k
=
) N
N 1

jn

2 (l k

Then the summation becomes

n=0 e

It may be expressed as
N1 N

jn
n=0 m=1
(m1)

=e

, where m = n + 1

N 1

=
N

e
jn

n=0

N 1

jn
)

2 (l k

, let
N

Now, in n=0

2 (l k
=
) N
N 1

jn

2 (l k

Then the summation becomes

n=0 e

It may be expressed as
N1 N

e =e

( )
jn

n=0
m1

, where m = n + 1

m=1

= em=1 .e
j

jm

N 1

=
N

e
jn

n=0

N1 N

or

jn
n=0 m=1
j

= e

jm

.e

= e (cosm + j sinm

j m=1

N1 N

or

jn
n=0 m=1
j

= e

jm

.e

= e (cosm + j sinm

j m=1

N
N

sin
) sin
2

2
N
+1
N +1

j
cos 2 +
sin 2
=e

sin
j

2
sin2

N1 N

or

jn
n=0 m=1
j

= e

jm

.e

= e (cosm + j sinm

j m=1

N
N

sin
) sin
2

2
N
+1
N +1

j
cos 2 +
sin 2
=e

sin
j

2
sin2

sin
N +1
j 2

2
e
j

=e

sin2

or

N
1

e
n=
0

jn

sin 2 j N2+1

= e

sine2

N
sin
N 1
j
2
e 2
=

sin 2

or

N
1

e
n=
0

jn

sin 2 j N2+1

= e

sine2

N
sin
N 1
j
2
e 2
=

sin 2

jN
2
e e

jN
2

j
j
2 e 2

jN

2j

e
2j

2
j
2

or

N
1

e
n=
0

jn

sin 2 j N2+1

= e

sine2

N
sin
N 1
j
2
e 2
=

sin 2

jN
2
e e

jN
2

j
2 e 2

jN

2j
e

2
j

e
2j

jN

ej

1
1

N
1

or

1
= e j 1
jN

jn

n=
0

Putting the value of


,
N1

jn2

n=0

(lk
N

j 2 (lk )

= e (lk
j 2
e ) 1N
1

N
1

or

1
= e j 1
jN

jn

n=
0

Putting the value of


,
N1

jn2

n=0

(lk
N

j 2 (lk )

= e (lk
j 2
e ) 1N
1

Now for l k, the summation is zero.

N
1

or

1
= e j 1
jN

jn

n=
0

Putting the value of


,
N1

jn2

n=0

(lk
N

j 2 (lk )

= e (lk
j 2
e ) 1N
1

Now for l k, the summation is zero.

0
form.
0

And for l = k, it becomes indeterminate

N1

jn2
k )

Thus,

n=0 e

considering

(l
N

= N, forl =
k

0 l, k N

N1

jn2
k )

Thus,

n=0 e

considering

(l
N

= N, forl =
k
= 0,forl
k

0 l, k N

N1

jn2
k )

Thus,

n=0 e

(l
N

= N, forl =
k
= 0,forl
k

0 l, k N

considering
Thus all terms on the right hand side of relation (17) vanishes except
when l = k.

1
N

N
1

Xn
e
n=0

jn 2l
N

N 1

1
= k =0 xk N

N
1

n=0

jn

2 (l k )
N

N1

jn2
k )

Thus,

(l

n=0 e

= N, forl =
k
= 0,forl
k

0 l, k N

considering
Thus all terms on the right hand side of relation (17) vanishes except
when l = k.
1
N

Therefore,

1
N

N 1

2l
jn N

Xn

e n=0

N 1

n =0 Xe

jn 2l

N 1

k =0

N 1

N e
n =0

N

for l = 0,1,2,,N= xl N = xl ,

1

jn

2 (l k )
N

1
N

N 1

n=0

2l
jn N

Xn

N

for l = 0,1,2,,N= xl N = xl ,

1

1
N

N 1

2l
jn N

Xn

n=0

N

for l = 0,1,2,,N= xl N = xl ,

1

Now, changing the suffix l to


k,
N
2 k

1 1
xk =
X
N n=0 e

jn N

, for k = 0,1,2,,N1

1
N

N 1

2l
jn N

Xn

N

for l = 0,1,2,,N-1
= xl N = xl ,

n=0

Now, changing the suffix l to


k,
N
2 k

1 1
xk =
X
N n=0 e

jn N

, for k = 0,1,2,,N1

Relation (18) is known as the Inverse Discrete Fourier Transform


(IDFT).

1
N

N 1

2l
jn N

Xn

n=0

N

for l = 0,1,2,,N= xl N = xl ,

1

Now, changing the suffix l to


k,
N
2 k

1 1
xk =
X
N n=0 e

jn N

, for k = 0,1,2,,N1

Relation (18) is known as the Inverse Discrete Fourier Transform


(IDFT).

Relations (15) and (18) are called N-point DFT pair.

N-point DFT:
N 1

jn 2Nk

X n=

k = 0xk e

for n = 0,1,2,, N-1

N-point IDFT:

1 N 1
xk =
Xn
N n=0 e

2k
jn N

, for k = 0,1,2,,N-1

N-point DFT:
N 1

jn 2Nk

X n=

k = 0xk e

for n = 0,1,2,, N-1

N-point IDFT:

1 N 1
xk =
Xn
N n=0 e

2k
jn N

, for k = 0,1,2,,N-1

j 2

N

Replacing the expression


e takes the form
by the term WN, the DFT pair
N 1

xW
x
1 X
=N
W
X n = k =0
k
k

nk

N
1

n=0 n

for n = 0,1,2,, N-1

nk

for k = 0,1,2,,N-1

N
1

xW
x
1 X
=N
W
X n = k =0
k
k

nk

N
1

n=0 n

for n = 0,1,2,, N-1

nk

for k = 0,1,2,,N-1

j 2
N

WN =
e
a complex operator (twiddle factor), which rotates any vector through
where

(2

Radians.
)
N

N
1
k
N
k =0

1 X
=N
W

X =

nk

x W , for n = 0,1,2,, N-

N
1

1
xk

n=0 n

nk

for k = 0,1,2,,N-1

j 2
N

WN =
e
a complex operator (twiddle factor), which rotates any vector through
where

Radians.
)
N

2 n =
Here,
number.

harmonic number and k = sample

Periodicity

Periodicity
From relation (19),
N 1

=
X n = k =0 xkWN , for n = 0,1,2,, N-1, where WN
e

nk

2
j

Periodicity
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

N 1

n + pN

(n +

= x
W
=
N

k=0

=
n

x kW

N 1

k=0

pN )k

k
N

=
WN e

j 2

N

for p = 0 , 1, 2 ,
.

nk

, as
W

pNk
N

= W NN ( pk )

Periodicity
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

N 1

n + pN

= x
W
=
N

k=0

n + pN

pN )k

x kW

N 1

k=0

i.e.

(n +

k
N

=
WN e

j 2

N

for p = 0 , 1, 2 ,
.

nk

, as
W

pNk
N

= Xn n for p = 0, 1, 2, .

= W NN ( pk )

Periodicity
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

N 1

n + pN

= x
W
=
N

k=0

n + pN

pN )k

x kW

N 1

k=0

i.e.

(n +

k
N

=
WN e

j 2

N

for p = 0 , 1, 2 ,
.

nk

, as
W

pNk
N

= Xn n for p = 0, 1, 2, .

= W NN ( pk )

Thus Xn is periodic with a period N, i.e. the pNth harmonic or at the p times
sampling frequency, the DFT repeats.

Symmetry

Symmetry
From relation (19),
N 1

=
X n = k =0 xkWN , for n = 0,1,2,, N-1, where WN
e

nk

2
j

Symmetry
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

X pN n
=

=
WN e

N 1

k
k= k
N01

xW

( pN n )

= xk W nk , as W
k=0
N

= Xn

for p = 0,1,2, .
NpNk N

=W

N ( pk )

j 2

N

Symmetry
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

X pN n
=

=
WN e

j 2

N

N 1

k
k= k
N01

xW

( pN n )

= xk W nk , as W
k=
N
0

for p = 0,1,2, .
NpNk N

=W

N ( pk )

= X n , conjugate of Xn, if xk is a real sequence.

Symmetry
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

X pN n
=

=
WN e

j 2

N

N 1

k
k= k
N01

xW

for p = 0,1,2, .

( pN n )

= xk W nk , as W
k=
N
0

NpNk N

=W

N ( pk )

= X n , conjugate of Xn, if xk is a real sequence.


Thus,

pN n

=
X
, for
.
n

p = 0,1,2,

Symmetry
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

X pN n
=

=
WN e

j 2

N

N 1

k
k= k
N01

xW

for p = 0,1,2, .

( pN n )

= xk W nk , as W
k=
N
0

NpNk N

=W

N ( pk )

= X n , conjugate of Xn, if xk is a real sequence.


Thus,

pN n

For p = 0, X
n

=
X
, for
.
n

=Xn

p = 0,1,2,

Symmetry
From relation (19),
N 1

nk

X n = k =0 xkWN , for n = 0,1,2,, N-1, where


Then,

X pN n
=

=
WN e

j 2

N

N 1

k
k= k
N01

xW

for p = 0,1,2, .

( pN n )

= xk W nk , as W

NpNk N

=W

k=
N
0

N ( pk )

= X n , conjugate of Xn, if xk is a real sequence.


Thus,

pN n

For p = 0, X
n

=
X
, for
.

p = 0,1,2,

= X n and for p = 1, X N = X n
n

From relation (19),


N 1

for n = 0,1,2,, N-1, where WN =


X n = k =0 xkWN ,
e

nk

2
j

From relation (19),


N 1

for n = 0,1,2,, N-1, where WN =


X n = k =0 xkWN ,
e

nk

2
j

It may be represented in matrix form as

[X ] = [W nk ][Xk
]
nN
where
nk [Xn] and [Xk
are
column matrices
N1
and matrix.
[W is an NN] square
N

[X ] = [W nk ][Xk
]
nN

[X ] = [W nk ][Xk
]
X
nN

Here,

0

[Xn ]= X1


XN1

x0


[Xkx]1=

x
N1

[X ] = [W nk ][Xk
]
X
nN

Here,

and

X1
[Xn ]=

XN1

N0
W
0

[W ]
nk
N

x0


[Xkx]1=

x
N1
0N
1

N2

W
WN

WN

W
W
W

N2 (N

(N 1)

N0
(N 1)
N

1)

W0 N
=
N
W

W 0
N

(N 1)(N 1)

WN

[X ] = [W nk ][Xk
]
nN

[X ] = [W nk ][X
For N] = 4, relation (23) becomes
nN

W0 4 W0 4

0
W0
1
2
W
W
4
4
X
1 4
2 =
40
4 2 4
W
W
W
W
X 4 4 0
3
6
W
W
X3
4
4

(Frequency)W
4

x
W4 0

3
W4 x1

46 2
W x
W 9 x3

4
(Time)
0

[X ] = [W nk ][X
For N] = 4, relation (23) becomes
nN

W0 4 W0 4

0
W0
1
2
W
W
4
4
X
1 4
2 =
40
4 2 4
W
W
W
W
X 4 4 0
3
6
W
W
X3
4
4

(Frequency)W
(Time)
4

x
W4 0

3
W4 x1

46 2
W x
W 9 x3

Hence, computation of X0 requires 4 complex multiplications and 4 complex


additions.

[X ] = [W nk ][X
For N] = 4, relation (23) becomes
nN

W0 4 W0 4

0
W0
1
2
W
W
4
4
X
1 4
2 =
40
4 2 4
W
W
W
W
X 4 4 0
3
6
W
W
X3
4
4

(Frequency)W
(Time)
4

x
W4 0

3
W4 x1

46 2
W x
W 9 x3

Hence, computation of X0 requires 4 complex multiplications and 4 complex


additions.
In general, execution of relation (23) requires N2 complex multiplications
and N2 complex additions.

[X ] = [W nk ][X
For N] = 4, relation (23) becomes
nN

W0 4 W0 4

0
W0
1
2
W
W
4
4
X
1 4
2 =
40
4 2 4
W
W
W
W
X 4 4 0
3
6
W
W
X3
4
4

(Frequency)W
(Time)
4

x
W4 0

3
W4 x1

46 2
W x
W 9 x3

Hence, computation of X0 requires 4 complex multiplications and 4 complex


additions.
In general, execution of relation (23) requires N2 complex multiplications
and N2 complex additions. Thus computational load increases rapidly with
increasing N.

[X ] = [W nk ][X
For N] = 4, relation (23) becomes
nN

W0 4 W0 4

0
W0
1
2
W
W
4
4
X
1 4
2 =
40
4 2 4
W
W
W
W
X 4 4 0
3
6
W
W
X3
4
4

(Frequency)W
(Time)
4

x
W4 0

3
W4 x1

46 2
W x
W 9 x3

Hence, computation of X0 requires 4 complex multiplications and 4 complex


additions.
In general, execution of relation (23) requires N2 complex multiplications
and N2 complex additions. Thus computational load increases rapidly with
increasing N. Fast Fourier Transform (FFT) algorithms allow computation
of DFT with reduced computational burden.

From relation (19),


N 1

X n =k

=0
x k WN

nk

, for n = 0,1,2,, N-1

From relation (19),


N 1
nk

, for n = 0,1,2,, N-1

X n = k =0

Assuming
xkWN N to be a power of 2, N-point data sequence xk in relation (19)
may be split into two N/2 point data sequences as follows:

From relation (19),


N 1
nk

, for n = 0,1,2,, N-1

X n = k =0

Assuming
xkWN N to be a power of 2, N-point data sequence xk in relation (19)
may be split into two N/2 point data sequences as follows:
N

X = k =0 x W
n

nk

k
N

N
1

xW

N
knk=
2

k
N

nk

From relation (19),

0,1,2,, N-1
, for n =
N 1

X n = k =0

Assuming
xkWN N to be a power of 2, N-point data sequence xk in relation (19)
may be split into two N/2 point data sequences as follows:
N

X = k =0 x W
n

nk

k
N

N
1

xW

N
knk=
2

21

21

= k=0 xkNWnk +

k=0

k
N

N
x k+W
N
2

N
n k+

nk

From relation (19),

0,1,2,, N-1
, for n =
N 1

X n = k =0

Assuming
xkWN N to be a power of 2, N-point data sequence xk in relation (19)
may be split into two N/2 point data sequences as follows:
N

X = k =0 x W
n

nk

k
N

N
1

xW

N
knk=
2

21

21

= k=0 xkNWnk +
N
2
1

k=0

N
x k+W
N

k
N
nk
= k=0 xk=0
W
+
W
N

k
N

N
n k+

2
N

nN
2 1

N
nk
x k+W

or

N
1
2

nk

nN
2 1
2

k
N
N
=
x
W
+
W
k=0
k=0
n

nk
N
x k+W
N
2

or

N
1
2

nk

k
=
x
W +
k=0
N
n

W nN jn 2

Now,

N
W
=e
2
N
2 1

Then,

N 2

nN
2 1
N2
k=0

nk
N
x k+W
N
2

=
=
e
jn
(1)n

Xn =
x kW nkN + N(1N) xk + W nk

k =0
2

or

N
1
2

nk

k
=
x
W +
k=0
N
n

W nN jn 2

Now,

N
W
=e
2
N
2 1

Then,

or

N 2

nN
2 1
N2
k=0

nk
N
x k+W
N
2

=
=
e
jn
(1)n

Xn =
x kW nkN + N(1N) xk + W nk

k =0
2

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
2
n

or

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
2
n

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
and odd harmonics,
Now, splitting (or decimating) Xn into2 even
or

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
and odd harmonics,
Now, splitting (or decimating) Xn into2 even
or

for even harmonics, n = 2p, for p = 0,1,2,,(N/2-1) and

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
and odd harmonics,
Now, splitting (or decimating) Xn into2 even
or

for even harmonics, n = 2p, for p = 0,1,2,,(N/2-1) and

for odd harmonics, n = 2p+1, for p = 0,1,2,,(N/2-1).

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
and odd harmonics,
Now, splitting (or decimating) Xn into2 even
or

for even harmonics, n = 2p, for p = 0,1,2,,(N/2-1) and


for odd harmonics, n = 2p+1, for p = 0,1,2,,(N/2-1). For
even harmonics,

N
2
1

X = x
k =0
pk
2p

+ xk

+N

N
2
W

N
2 1

k
N
n +N
X =
x + (1) k x

k =0

nk
W
and odd harmonics,
Now, splitting (or decimating) Xn into2 even
or

for even harmonics, n = 2p, for p = 0,1,2,,(N/2-1) and


for odd harmonics, n = 2p+1, for p = 0,1,2,,(N/2-1). For even
harmonics,

N
2
1

2p
X = x
k =0
pk

N
2
+ xk + N W

N
2 1

= x + k+
x N
k =0

2 2

pk
N
2 pk

as WN
pk

= WN2


X = k =0 xk +
2p

x
N
2 1

Now

k
+

pk
W
N
N
2 2


pk
W
X = k =0 xk + k N N
2p
+

2 2
x
gk =k x+ x, for k = 0,1,2,(N/2-1)
N
2 1

Now

Let,

k+

N
2


pk
W
Now, X
N

=
x
+
k
k
=0
2p
k + 2 N2
x
g
=
x+ x, for k = 0,1,2,(N/2-1)
Let,
k
k
N
2 1

N
k+ 2

N
2 1

Then,

X 2 p=

pk

g WN 2

k =0 k


pk
W
Now, X
N

=
x
+
k
k
=0
2p
k + 2 N2
x
g
=
x+ x, for k = 0,1,2,(N/2-1)
Let,
k
k
N
2 1

N
k+ 2

N
2 1

Then,

X 2 p=

pk

g WN 2

k =0 k

This is an N/2 point DFT sequence gk, k = 0,1,2,.(N/2 - 1)

Now, for odd harmonics [c.f. relation


(24)],

X 2 p+1= x k
(2
k +N
x
NW

p+1
)
k
2
k =0

N
2 1

Now, for odd harmonics [c.f. relation


(24)],

X 2 p+1= x k
(2
k +N
x
NW

p+1
)
k
2
k =0

N
2 1

N
2
1

= xk
k =0
2 pk

k +xN

WNkW

Now, for odd harmonics [c.f. relation


(24)],

X 2 p+1= x k
(2
k +N
x
NW

p+1
)
k
2
k =0

N
2 1

N
2
1

= xk
k =0
2 pk
N
2
1
k
k
= =0 x

k +xN

+N

WNkW
k

pk

2
WW

as

W 2 pk= W
N N

pk
2

Now, for odd harmonics [c.f. relation


(24)],

X 2 p+1= x k
(2
k +N
x
NW

p+1
)
k
2
k =0

N
2 1

N
2
1

Let,

= xk k +xN N WNkW
k =0
2 pk

N
2

2
1
2 pk
as
k
pk
W
=W
k
N
N
+N
k
N N
2
= k=0 x x W W

/
k
N
2 for k = 0,1,2,,(N/2-1)
gk =k x x k +W

pk
2

N
2 1

Then,

X 2 p=+1

k =gN W

pk
2

N
2 1

Then,

X 2 p=+1

k =gN W

pk

This is an N/2 point DFT sequence

N
2 1

Then,

X 2 p=+1

k =gN W

pk

This is an N/2 point DFT sequence

Thus an N-point DFT may be split into two N/2-point


DFTs.

N
2 1

Then,

X 2 p=+1

k =gN W

pk

This is an N/2 point DFT sequence

Thus an N-point DFT may be split into two N/2-point DFTs.


This process of splitting may be continued up to 2-point transforms as N is
a power of 2.

Let N = 4. Then from relation (25),


N
1
2

X 2 p=

k
k =0g W

N
2 1

X2p =
pk
gWk
k =0

pk
N
2

, for p = 0,1,2,,(N/2-1)

N
2

Let N = 4. Then from relation (25),


N
1
2

X 2 p=
Where,

k
k =0g W

N
2 1

X2p =
pk
gWk
k =0

pk

, for p = 0,1,2,,(N/2-1)

N
2

gk =k x+
x

,
N
k+
2

for k = 0,1,2,,(N/2-1)

N
2

Let N = 4. Then from relation (25),

pk

k
k =0g W

Where,

or,

X =

, for p = 0,1,2,,(N/2-1)

N
2

gk =k x+
x
1

2p

X2p =
pk
gWk
k =0

N
1
2

X 2 p=

N
2 1

,
N
k+
2

pk

gW

k =0

, for

0,1

for k = 0,1,2,,(N/2-1)

p=

N
2

Let N = 4. Then from relation (25),

pk

k
k =0g W

Where,

or,

X =

gk =k x+
x

and,

, for p = 0,1,2,,(N/2-1)

N
2

1
2p

X2p =
pk
gWk
k =0

N
1
2

X 2 p=

N
2 1

,
N
k+
2

pk

gW

k =0

, for

x
g k = x+
k

k+
2

for k = 0,1,2,,(N/2-1)

p=

0,1
k=
for 0,1

N
2

Now,

and,

X 2 p=

pk

k
k =0g W

x
g k = x+
k

, for

k+
2

,
for

k=
0,1

p=
0,1

Now,

and,

X 2 p=

k
k =0g W

x
g k = x+
k

Then for
1

pk

p = 0,

, for

k+
2

,
for

p=
0,1

k=
0,1

X 0 =k =0 gkk =0W2 0 =k g0 =1 g+

Now,

and,

X 2 p=

k
k =0g W

x
g k = x+
k

Then for

p = 0,

pk

, for

k+
2

,
for

p=
0,1

k=
0,1

X 0 =k =0 gkk =0W2 0 =k g0 =1 g+

g
and for p =

1,

2 1
X 2 = k =0 g kW k2 = g0 W2 0 +1 g W

= g0 +
( 1)g =0 g 1
1
g

X 2 p+1

Now from relation (26),

N
1
2

=
gW
k
pk
/

=0

X 2 p+1

1 2

=
g WN
k
pk
k /

=0

, for p = 0,1,2,,(N/2-1)

N
2

X 2 p+1

Now from relation (26),

N
1
2

=
gW
k
pk
/

=0

X 2 p+1

1 2

=
g WN
k
pk
k /

=0

where

, for p = 0,1,2,,(N/2-1)

k
k
= x x k+
g
/

N
2

WNk , for k = 0,1,2,,(N/2-1)

N
2

X 2 p+1

Now from relation (26),

N
1
2

=
gW
k
pk
/

=0

X 2 p+1

1 2

=
g WN
k
pk
=0

where

, for p = 0,1,2,,(N/2-1)

k /

k
k
= x x k+
g
/

N
2

WNk , for k = 0,1,2,,(N/2-1)

or,

X =
2 p+1

k =0

gpk W
k

, for

p = 0,1

N
2

X 2 p+1

Now from relation (26),

N
1
2

=
gW
k
pk
/

=0

X 2 p+1

1 2

=
g WN
k
pk

, for p = 0,1,2,,(N/2-1)

k /

=0

k
k
= x x k+
g
/

N
2

where

WNk , for k = 0,1,2,,(N/2-1)

or,

and,

X =

gpk W

, for

= (x x )W
g
,
2 p+1

k
=0

p = 0,1

k+
2

for

k=
0,1

N
2

Now,

and,

X =

gpk W

, for

= (x x )W
g
,
2 p+1

k
=0

p = 0,1

k+
2

for

k=
0,1

Now,

and,

X =

gpk W

, for

= (x x )W
g
,
2 p+1

k
=0

Then for
1

k+
2

p = 0,1

for

k=
0,1

p=
0,

X 1 = kk =0 g2 /W0 0

/
g

=g/+

Now,

and,

X =

gpk W

, for

= (x x )W
g
,
2 p+1

k
=0

k+
2

for

k=
0,1

p=
0,

Then for
1

X 1 = kk =0 g2 /W 0

/
g for p =
and
1

p = 0,1

=0 g / 1+

1,

X 3 = kk g2 /W k = g0 / +1
/ /
=0
/
1
g W= g g
0

Now from relations (27) and (30),


for

k =
0,1

Now from relations (27) and (30),


for

g = x+ x
0

k =
0,1

Now from relations (27) and (30),


for

g = x+ x
0

g = x+ x
1

k =
0,1

Now from relations (27) and (30),


for

k =
0,1

g = x+ x
0

g = x+ x
1

0
0 = (x

x
)
W
= x x= x+ x
g
/
2
W 00
2
4
0
2
2
4

Now from relations (27) and (30),


for

k =
0,1

g = x+ x
0

g = x+ x
1

0
0 = (x

x
)
W
= x x= x+ x
g
/
2
W 00
2
4
0
2
2
4
1
1
1
1
1 = (x

x
)
W
=
x
W

x
W
=
x
W
+
g
/
x W3 3 1 4 3 4 1 4 3 4 1 4

Now from relations (27) and (30),


for

k =
0,1

g = x+ x
0

g = x+ x
1

= (x x ) = x x = x + x W 2 0
g
2
0
/
2
4
0
W
= (x0 2 x 4) = x W 1 x W 1 = x W 1 + x
1
g
/
3
W
1
4
3
4
1
4
W1
3
4
Then in matrix
1
3 form,
4
g0
0
x
0
1
0
1

1 0 2
1 1x
g 1 0
0 2x
=
4
0/
g 1 0 W

1
3
0 W x
g / 0 W
4
1

4
3
0

From relations (28), (29), (31) and (32),

From relations (28), (29), (31) and (32),

X = g+ g
0 0

From relations (28), (29), (31) and (32),

X = g+ g
0 0

X = g g
2 0

From relations (28), (29), (31) and (32),

X = g+ g
0 0

X = g g
2 0

= g / + g /1

From relations (28), (29), (31) and (32),

X = g+ g
0 0

X = g g
2 0

= g / + g /1

= g / g /3

From relations (28), (29), (31) and (32),

X = g+ g
0

X = g g
X

= g / + g /1

= g / g /3

Then in matrix form,

0
g
0 1 1 0

X 2 1

1 0
g1
00

X 1 =
0
/
0 0 1 1 g

X
1 g/
3
1
00 1

From relations (33) and (34),

From relations (33) and (34),

0
0

1 0 2
1
1x
g 1 0
0 2x
=
4
0/
g 1 0 W

1
3
0 W x
g / 0 W
4
1

4
3
1 0 1

Time
history

Natural order

From relations (33) and (34),

0
0

1 0 2
1
1x
g 1 0
0 2x
=
4
0/
g 1 0 W

1
3
0 W x
g / 0 W
4
1

4
3
X
0
g
Frequency
0 1 1 0
0

0 g1
X2

1
0
1

X 1 =
0
/
0
0
1
1

/
X
1 g

3
1
0
0
1
Bit reversed order

1 0 1

Time
history

X
0

X2

0
0 g1
1 0

=
1
0


/
X
0 0 1 1 g /
X
1 g
3
1
Bit reversed order

0 0 1

Frequency

1 0

X
0

X2

0
0 g1
1 0

=
1
0


/
X
0 0 1 1 g /
X
1 g
3
1
Bit reversed order

0 0 1

Frequency

since,

1 0

X 0 = X00

X =X

X2 10= X

X =X

3 11
1

01

in terms of binary bits

From relations (33) and (34),


g
1
0 1 0
1
g 0
1 0
0/
4
g
0 1 W
2
= 1

g / 0 W 0
1

x
0

1 x1
0 x 2

3
W x
4 3
0

X
0
0 1 1

10
X 2 1
=
X 1 0
0
1

X
3 0 0
1

g
0

0 g1

1 g / 0
1 g /
1

From relations (33) and (34),


g
1
0 1 0
1
g 0
1 0
0/
4
g
0 1 W
2
= 1

g / 0 W 0
1

x
0

1 x1
0 x 2

3
W x
4 3
0

X
0
0 1 1

10
X 2 1
=
X 1 0
0
1

X
3 0 0
1

g
0

0 g1

1 g / 0
1 g /
1

From relations (33) and (34),


g
1
0 1 0
1
g 0
1 0
0/
4
g
0 1 W
2
= 1

g / 0 W 0
1

x
0

1 x1
0 x 2

3
W x
4 3
0

X
0
0 1 1

10
X 2 1
=
X 1 0
0
1

X
3 0 0
1

Here, number of iterations = 2

g
0

0 g1

1 g / 0
1 g /
1

From relations (33) and (34),


g
1
0 1 0
1
g 0
1 0
0/
4
g
0 1 W
2
= 1

g / 0 W 0
1

x
0

1 x1
0 x 2

3
W x
4 3
0

X
0
0 1 1

10
X 2 1
=
X 1 0
0
1

X
3 0 0
1

g
0

0 g1

1 g / 0
1 g /
1

Number of iterations = M, where M = log2N [as N = 2M], here N = 4 and M = 2

Each iteration involves N/2 number of butterfly computations.

Each iteration involves N/2 number of butterfly computations.


Computation of g1 and g1 / may be represented as:
x1

g1

w4
1

x3

w4
w43 = - w41

-1
/

g1

w4

w4

w4
1

-j

Each iteration involves N/2 number of butterfly computations.


Computation of g1 and g1 / may be represented as:
x1

g1
1

x3

w4
w43 = - w41

/
g1

x1

computation
butterfly

x3

g1

g1

w4
-1

w4

w4
1

-j
w4

Each iteration involves N/2 number of butterfly computations.


Computation of g1 and g1 / may be represented as:
x1

g1

x1

g1

w4
1

x3

w4
w43 = - w41

/
g1

x3

w4
-1

w4

w4

w4
1

-1

1/

-j

Each iteration involves N/2 number of butterfly computations.


Computation of g1 and g1 / may be represented as:
x1

x1

g1

g1

w4
1

x3

w4
w43 = - w41

/
1
g

w4

-1

w4

w4
1

-1

w4

-j

This involves two complex additions and one complex multiplication.

Each iteration involves N/2 number of butterfly computations.


Computation of g1 and g1 / may be represented as:
x1

x1

g1

g1

w4
1

x3

w4
w43 = - w41

/
1
g

w4

-1

w4

w4
1

-1

w4

-j

This involves two complex additions and one complex multiplication.


This is true for all butterflies.

The procedure can be summarized as,

The procedure can be summarized as,


No. of iterations = M = log 2 N

The procedure can be summarized as,


No. of iterations = M = log 2 N

NM N
Total no. of butterflies = 2= 2log N 2

The procedure can be summarized as,


No. of iterations = M = log 2 N

NM N
Total no. of butterflies = 2= 2log N 2
No. of complex multiplications per butterfly = 1

The procedure can be summarized as,


No. of iterations = M = log 2 N

NM N
Total no. of butterflies = 2= 2log N 2
No. of complex multiplications per butterfly = 1
No. of complex additions per butterfly = 2

The procedure can be summarized as,


No. of iterations = M = log 2 N

NM N
Total no. of butterflies = 2= 2log N 2
No. of complex multiplications per butterfly = 1
No. of complex additions per butterfly = 2

NM N
Total no. of complex multiplications = 2= 2log N2

The procedure can be summarized as,


No. of iterations = M = log 2 N

NM N
Total no. of butterflies = 2= 2log N 2
No. of complex multiplications per butterfly = 1
No. of complex additions per butterfly = 2

NM N
Total no. of complex multiplications = 2= 2log N2
Total no. of complex additions = NM = N log 2
N

Computation of each butterfly may be carried out in-place to reduce memory


requirement as follows:
A

Butterfly

A
B

Computation of each butterfly may be carried out in-place to reduce memory


requirement as follows:
A

Butterfly

A
B

B
-1

Computation of each butterfly may be carried out in-place to reduce memory


requirement as follows:
A

Butterfly

A
B

B
-1

T=AB
A = A +
B B = T
W

Computation of each butterfly may be carried out in-place to reduce memory


requirement as follows:
A

Butterfly

A
B

T=AB
A = A +
B B = T
T
-1 W
W

Here T is a scratch-pad variable and W is the twiddle


factor.

The above algorithm for the computation of FFT of sequence xk, k = 0,1,2,.,(N-1)
may be called radix-2 decimation-in-frequency in-place FFT algorithm.

The above algorithm for the computation of FFT of sequence xk, k = 0,1,2,.,(N-1)
may be called radix-2 decimation-in-frequency in-place FFT algorithm.
Here, N should be a power of 2.

The above algorithm for the computation of FFT of sequence xk, k = 0,1,2,.,(N-1)
may be called radix-2 decimation-in-frequency in-place FFT algorithm.
Here, N should be a power of 2.
Similarly, radix-2 decimation-in-time in-place FFT algorithm may be derived with
same computation load.

DFT

FFT

complex

complex

complex

complex

additions

multiplications

additions

multiplications

16

16

64

64

24

12

16

256

256

64

32

32

1024

1024

160

80

DFT

FFT

complex

complex

complex

complex

additions

multiplications

additions

multiplications

16

16

64

64

24

12

16

256

256

64

32

32

1024

1024

160

80

DFT

FFT

complex

complex

complex

complex

additions

multiplications

additions

multiplications

16

16

64

64

24

12

16

256

256

64

32

32

1024

1024

160

80

Reference:
Proakis and Manolakis, Introduction to Digital Signal processing.

Relations (25) and (26) may be split further (i.e. decimated) into N/2-point
DFTs as follows:

2p

g W pk

k=0

N
2

N
2
1

2 p+1

W
= gk/pk
N
k
=0

Relations (25) and (26) may be split further (i.e. decimated) into N/2-point
DFTs as follows:
In relation (25), splitting N/2-point sequence

gk

into two N/4-point


sequences,

2p

N
2
1

g W

k=0

pk
N
2

Relations (25) and (26) may be split further (i.e. decimated) into N/2-point
DFTs as follows:
In relation (25), splitting N/2-point sequence

gk

into two N/4-point


sequences,
N
4

X 2p=

k=
0

k
gW

pk

2p

g W

k=0
N
1
2

+ g W

pk

N
2

N
2
1

k=

N
4

N
2

pk
N
2

Relations (25) and (26) may be split further (i.e. decimated) into N/2-point
DFTs as follows:
In relation (25), splitting N/2-point sequence

gk

into two N/4-point


sequences,
N
4

X 2p=

k
gW

k=
0
N
1
4

k=
0

pk

N
1
2

+ g W

pk

g kW N +
2

2p

g W

k=0

pk

N
2

N
2
1

N
k=
N 4
1
4

N
g kW
+
N

k=0

N
2

p k+
N
4
2

pk
N
2

Relations (25) and (26) may be split further (i.e. decimated) into N/2-point
DFTs as follows:
In relation (25), splitting N/2-point sequence

gk

into two N/4-point


sequences,
N
4

X 2p=

=
=

pk

k
gW

k=
0
N
1
4

k=
0
N
1
4

k=
0

N
k=
N 4
1
4

g kW N +
2
pk
k
gW

N
1
2

+ g W

pk

N
2

2p

g W

k=0

pk

N
2

N
2
1

N
g kW
+
N

k=0
N
1
4

+ g
k=0

N
2

p k+
N
4
2
pk

N
W

k+

N
2

pN
4
N
2

pk
N
2

Now,

X2
p

N
4 1 4

pk

gW +

k =0 k k=0 N2

g k + N4
2

pN
4
N
2

pk
W W
N

Now,

X2
p

Here,

pN
4
N
2

N
4 1 4

N
pk

gW +

k =0 k k=0 N2

=
(1)p

g k + N4
2

pN
4
N
2

pk
W W
N

Now,

X2
p

Here,

pN
4
N
2

N
4 1

pk

gkWN2 +

k =0

=
(1)p

X2 p =
k
=0

N
4 1

Therefore,

N
1
4

k =0

g k + N4

pN
4
N
2

pk
W W
N

+ ( 1)p g N N pk
k+
W

Now,

X2
p

Here,

pN
4
N
2

Therefore,

N
4 1

N
1
4

pk

gkWN2 +

k =0

=
(1)p

X2 p =
k
=0

N
4 1

k =0

g k + N4

pN
4
N
2

pk
W W
N

+ ( 1)p g N N pk
k+
W

Nowgsplitting X2p into even and odd harmonics,

Now,

X2
p

Here,

pN
4
N
2

Therefore,

N
4 1

N
1
4

pk

gkWN2 +

k =0

=
(1)p

X2 p =
k
=0

N
4 1

k =0

g k + N4

pN
4
N
2

pk
W W
N

+ ( 1)p g N N pk
k+
W

Nowgsplitting X2p into even and odd harmonics,


for even harmonics,

p = 2r

, for r = 0,1,2,,(N/4-1)

Now,

X2
p

Here,

pN
4
N
2

Therefore,

N
4 1

N
1
4

pk

gkWN2 +

k =0

=
(1)p

X2 p =
k
=0

k =0

g k + N4

pN
4
N
2

pk
W W
N

+ ( 1)p g N N pk
k+
W

N
4 1

Nowgsplitting X2p into even and odd harmonics,


for even harmonics,

p = 2r

and for odd harmonics,


(N/4-1)

, for r = 0,1,2,,(N/4-1)

p = (2r +1) , for r = 0,1,2,,

Now, for even harmonics,

X 4r=
k = 0
g
N
4 1

+g
k

k+

2 rk
W
N

Now, for even harmonics,

X 4r=
k = 0
N
g
4 1
=
k=0

g
N
4 1

+g
k

2 rk
W
N
N
k+

4
2
rk
+ g N W N
k+
4
4

Now, for even harmonics,


2 rk
+
g
W
N
N
X 4r= k
k+
k = 0

N
g
4
2
4 1
rk
+ g N W N
= k
k+
4
4
k
=
0

g

Let hk =k g +
,
for
k = 0,1,2,,(N/4-1)
k+
N
g
4
N
4 1

Now, for even harmonics,


2 rk
+
g
W
N
N
X 4r= k
k+
k = 0

N
g
4
2
4 1
rk
+ g N W N
= k
k+
4
4
k
=
0

g

Let hk =k g +
,
for
k = 0,1,2,,(N/4-1)
k+
N 4
g
N
N
4 1

4 1

Then,

X 4r=

k=
0

k
hW

rk

, for r = 0,1,2,,(N/4-1)
N
4

Now, for even harmonics,


2 rk
+
g
W
N
N
X 4r= k
k+
k = 0

N
g
4
2
4 1
rk
+ g N W N
= k
k+
4
4
k
=
0

g

Let hk =k g +
,
for
k = 0,1,2,,(N/4-1)
k+
N 4
g
N
N
4 1

4 1

Then,

X 4r=

k=
0

k
hW

rk

, for r = 0,1,2,,(N/4-1)
N
4

This is an N/4-point DFT of sequence h , k = 0,1,2,,(N/4k


1)

Now, for odd harmonics,

X 4 r +=
2

N
4 1

gk
k=
g
0

( 2 r +1 )
k +N W
k N2
4

Now, for odd harmonics,

X 4 r +=
2

( 2 r +1 )
k
k
+
W
k=
N k N2
4
g
0
N

4 1

g
W N2 k Nrk
k
N
+
=
k
W4
k=0

N
4 1

Now, for odd harmonics,

X 4 r +=
2

Let

( 2 r +1 )
k
k
+
W
k=
N k N2
4
g
0
N

4 1

g
W N2 k Nrk
k
N
+
=
k
W4
k=0

/
2k
N
4 1

hk = gk g Nk + W4N

for k = 0,1,2,,(N/4-1)

Now, for odd harmonics,

( 2 r +1 )
k
k
+
W
k=
N k N2
4
g
0
N

4 1

g
W N2 k Nrk
k
N
+
=
k
W4
k=0

/
2k
h
N
4 1

X 4 r +=
2

Let

gk g N W4 N
k + 4
=

for k = 0,1,2,,(N/4-1)

N
4 1

Then,

X =
4r+
2

hW

k =0

rk k
N
4

, for r = 0,1,2,,(N/4-1)

Now, for odd harmonics,

( 2 r +1 )
k
k
+
W
k=
N k N2
4
g
0
N

4 1

g
W N2 k Nrk
k
N
+
=
k
W4
k=0

/
2k
h
N
4 1

X 4 r +=
2

Let

gk g N W4 N
k + 4
=

for k = 0,1,2,,(N/4-1)

N
4 1

Then,

X =
4r+
2

hW

k =0

rk k

, for r = 0,1,2,,(N/4-1)

N
4

This is an N/4-point DFT of sequence


(N/4-1)

k/

, k = 0,1,2,,

Now, for odd harmonics,

( 2 r +1 )
k
k
+
W
k=
N k N2
4
g
0
N

4 1

g
W N2 k Nrk
k
N
+
=
k
W4
k=0

/
2k
h
N
4 1

X 4 r +=
2

Let

gk g N W4 N
k + 4
=

for k = 0,1,2,,(N/4-1)

N
4 1

Then,

X =
4r+
2

hW

k =0

rk k

, for r = 0,1,2,,(N/4-1)

N
4

This is an N/4-point DFT of sequence k/


, k = 0,1,2,,
h
(N/4-1)
Thus the N/2-point DFT as represented in relation (25), may be split into
two N/4-point DFTs, as represented in relations (36) and (37).

Similarly, the N/2-point DFT in relation (26)


may be split into two even and odd harmonic
N/4- point DFTs as follows:

2 p+1

gW
k

N
2
1

k
=0
N

/
pk

Similarly, the N/2-point DFT in relation (26)


may be split into two even and odd harmonic
N/4- point DFTs as follows:
For even harmonics,
N

X 4r+1=

1 4

l W rkk
k=0

N
4

, for r = 0,1,2,,(N/4-1)

2 p+1

gW
k

N
2
1

k
=0

/
pk

Similarly, the N/2-point DFT in relation (26)


may be split into two even and odd harmonic
N/4- point DFTs as follows:

gW

For even harmonics,


N

X 4r+1=

1 4

l W rkk
k=0

2 p+1

N
2
1

k
=0

/
pk

, for r = 0,1,2,,(N/4-1)

N
4

This is an N/4-point DFT where

l = g/
k
+g
k

/
N
k+
4

, for k = 0,1,2,,(N/4-1)

X
Similarly for odd harmonics,

gW
k

X 4r
+3

N
1
4

=
k =0 l WN
rk
k/

, for r = 0,1,2,,(N/4-1)

2 p+1

N
2
1

k
=0

/
pk

X
Similarly for odd harmonics,

gW
k

X 4r
+3

N
1
4

=
k =0 l WN
rk
k/

, for r = 0,1,2,,(N/4-1)

This is another N/4-point DFT where

l/ k = / gk

k+
g
/
N

WN2k , for k = 0,1,2,,(N/4


1)

2 p+1

N
2
1

k
=0

/
pk

Let N = 8 (= 23) for 8-point


FFT.

Let N = 8 (= 23) for 8-point


FFT.

2p

N
2
1

g W

k=0

In relation (25),

pk
N
2

Let N = 8 (= 23) for 8-point


FFT.

, for k = 0,1,2,,(N/2-1)
k+
N
2

2p

g W

k=0

In relation (25),

g k =k x+ x

N
2
1

pk
N
2

Let N = 8 (= 23) for 8-point


FFT.

2p

g W

k=0

In relation (25),

g k =k x+ x

N
2
1

, for k = 0,1,2,,(N/2-1)
k+
N
2

Possible values of k are k = 0,1,2,3.

pk
N
2

Let N = 8 (= 23) for 8-point


FFT.

2p

g W

k=0

In relation (25),

g k =k x+ x

N
2
1

pk
N
2

, for k = 0,1,2,,(N/2-1)
k+
N
2

Possible values of k are k = 0,1,2,3.


Then,

g 0 = x0 + x4

g = x + x
1

g 2 = 2x + 6x
g3 =
x+
x
3
7

X
Now in relation (26),

2 p+1

gW
k

N
2
1

k
=0
N

/
pk

X
Now in relation (26),

2 p+1

gW


gk = kx

x
/

N k
k+ 2

, for k = 0,1,2,,(N/2-1)

N
2
1

k
=0
N

/
pk

X
Now in relation (26),

2 p+1

gW


gk = kx

x
/

, for k = 0,1,2,,(N/2-1)

N k
k+ 2

Possible values of k are k = 0,1,2,3.

N
2
1

k
=0
N

/
pk

X
Now in relation (26),

2 p+1

gW


gk = kx

x
/

N
2
1

k
=0

/
pk

, for k = 0,1,2,,(N/2-1)

N k
k+ 2

Possible values of k are k = 0,1,2,3.


Then,

= (x0 4 x )8W 0
g
/
g / = (x x ) 1
W2 = (x2 6 x )8W 2
1
1
5
8
g
/
3
=
(
x

x
)
W
3
3
7
8
g
/

g
0

x0
4

= x
+
x

g
g

=
x3

x
x2

x7

g0

g
x
g

/
3

(x
)W
(x
0

x
=

)W
=
x

3
1

(x
)W
(x
)

=
x

8
4

8 2

W 83

5
0

g
0

g
1

x0
4

= x
+
x

g0

g
x

/
3

(x
)W
(x
0

x
=

)W

8
4

8 2

W 83

5
0

1
1
g
= x
+
g
=
(x
From2 relations
x2
6 (40) and (41), signal flow graph for computations of

x
)W

gg03 =x03 gx / may


2
2
6
be represented as:
+
3 and
3
7
g
=
(x

)
7

g
0

g
1

x0
4

= x
+
x

g0

g
x

/
3

(x
)W
(x
0

x
=

)W

8
4

8 2

W 83

5
0

1
1
g
= x
+
g
=
(x
From2 relations
x2
6 (40) and (41), signal flow graph for computations of

x
)W

gg0 =x gx0/ may


2
2
6
be represented as:
+
3
7 3
g
=
(x
3 3 and

)
7

Now from relation (36),

hk = gk +
N
k+
4
g

, for k = 0,1,2,,(N/4-1)

Now from relation (36),

hk = gk +
N
k+
4
g

, for k = 0,1,2,,(N/4-1)

Possible values of K are K = 0,1.

Now from relation (36),

hk = gk +
N
k+
4
g

, for k = 0,1,2,,(N/4-1)

Possible values of K are K = 0,1.


Then,

h0 =
0 g+
2 g

h = g+ g
1
1
3

And from relation (37),


h = gk
g
/
k

k+
N

W
k

2
N

, for k = 0,1,2,,(N/4-1)

And from relation (37),


h = gk
4
g
/
k

k+
N

WN2 k , for k = 0,1,2,,(N/4-

1)
Possible values of K are K = 0,1.

And from relation (37),


h = gk
4
g
/
k

k+
N

WN2 k , for k = 0,1,2,,(N/4-

1)
Possible values of K are K = 0,1.
Then,

= (g0 2 g )8W 0
h
2
3 g )8W
/ = (g
1
1
h

/
0

Now from relation (38),

lk =k g/ +
g/

, for k = 0,1,2,,(N/4-1)
k+
N
4

Now from relation (38),

lk =k g/ +
g/

, for k = 0,1,2,,(N/4-1)
k+
N
4

Possible values of K are K = 0,1.

Now from relation (38),

lk =k g/ +
g/

, for k = 0,1,2,,(N/4-1)
k+
N
4

Possible values of K are K = 0,1.


Then,

l0 =0 g/ 2+

/
gl1/ =1 g 3+

g/

And from relation (39),

/
/ /
2k
k
k
N
l = g gk+N 4W

, for k = 0,1,2,,(N/4-1)

And from relation (39),

/
/ /
2k
k
k
l = g 4 gk+N W N

, for k = 0,1,2,,(N/4-1)

Possible values of K are K = 0,1.

And from relation (39),

/
/ /
2k
k
k
l = g 4 gk+N W N

, for k = 0,1,2,,(N/4-1)

Possible values of K are K = 0,1.


Then,

= (g 0/ 2g / )
l/
W
= (g 1/ 3g / )
1
l/
W
0

2
8

=g +g

0
0
2

h =g
+g
1
1
3

h0/
h/

)W
1

=00 (g 2g )W

= (g 8 g 2

l0 =0/ g +2/

lg = g /
+/
g
1
1
3

l 0/
W
l1/
=

=/ (0 g / g2 ) 0
(g1/ 38/ )W 28
g

l 0/ =/ (0 g / g2 ) 0
h0/ =00 (g 2g )W
=g +g
l0 =0/ g +2/


/
/
2
8
W
0
0
2
l / =/ (g / g8 ) 2
h
=
(
g

g
+/
gl = g

g
h =g
+g
W
)W
1
1
3
1
1
3
1
1
3
8
1
1
3
8
From relations (42), (43), (44) and (45), signal flow graph for computation of
h

h01, h01, l

0 1

and l

/
0 1

may be represented as:

l 0/ =/ (0 g / g2 ) 0
h0/ =00 (g 2g )W
=g +g
l0 =0/ g +2/


/
/
2
8
W
0
0
2
l / =/ (g / g8 ) 2
h
=
(
g

g
+/
gl = g

g
h =g
+g
W
)W
1
1
3
1
1
3
1
1
3
8
1
1
3
8
From relations (42), (43), (44) and (45), signal flow graph for computation of
h

h01, h01, l

0 1

and l

/
0 1

may be represented as:

Now, from relation (36),


possible values of r are r = 0,1.

X 4r
=

N
1
4

k=0

hW

rkk
N
4

, for r = 0,1,2,,(N/4-1)

Now, from relation (36),


possible values of r are r = 0,1.
Then,
0 0
2
X 0 = 0h W2 0 +1 h W
= h1 + h

X = h W 0+ h W =1 h h

4 0

X 4r
=

N
1
4

k=0

hW

rkk

, for r = 0,1,2,,(N/4-1)

N
4

Now, from relation (36),


possible values of r are r = 0,1.

X 4r
=

N
1
4

k=0

hW

Then,

rkk

, for r = 0,1,2,,(N/4-1)

N
4

X 0 = 0h W2 0 + h1 W 2 = h+
0 h1
0

0
1
X = h W + h W = h h

4 0from2relation
1
2
0
And,
(37),

possible values of r are r = 0,1.

N
1
4

X 4 r + 2 = h /W
k=0

rk
,
k
N
4

for r = 0,1,2,,(N/4-1)

Now, from relation (36),


possible values of r are r = 0,1.

X 4r
=

N
1
4

k=0

hW

Then,

rkk

, for r = 0,1,2,,(N/4-1)

N
4

X 0 = 0h W2 0 + h1 W2 = 0h+ h 1
0

0
1
X = h W + h W = h h

4 0from2 relation
1
2
0
And,
(37),

possible values of r are r = 0,1.

N
1
4

X 4 r + 2 = h /W
k=0

Then,

X
= h /W 0 + h /W 0 + h1 /

=2 h / 20 / 00 2 / 1 1
X
= h W + h W h1 /

=2 h / 60
0
2
1

rk
,
k

for r = 0,1,2,,(N/4-1)

N
4

From relation (38),


possible values of r are r = 0,1.

N
4 1

X 4r =
rk
k
l
W
k
=0
+1
N
4

, for r = 0,1,2,,(N/4-1)

From relation (38),

N
4 1

possible values of r are r = 0,1.

X 1 = 0l W2 0 +1 l W2 0 =0 l
1

0
1
X
=
l
W
+
l
W
=
l

l
+l

, for r = 0,1,2,,(N/4-1)

N
4

Then,

X 4r =
rk
k
l
W
k
=0
+1

From relation (38),

N
4 1

possible values of r are r = 0,1.

X 4r =
rk
k
l
W
k
=0
+1

, for r = 0,1,2,,(N/4-1)

N
4

Then,

X 1 = 0l W2 0 +1 l W2 0 =0 l
1

0
1
X
=
l
W
+
l
W
=
l

l
+l

5 0from2 relation
1
2(39),0
And,

possible values of r are r = 0,1.

N
4 1

X 4 r +3=

rk

l W N4

k =0
k

, for r = 0,1,2,,(N/4-1)

From relation (38),

N
4 1

possible values of r are r = 0,1.

X 4r =
rk
k
l
W
k
=0
+1

, for r = 0,1,2,,(N/4-1)

N
4

Then,

X 1 = 0l W2 0 +1 l W2 0 =0 l
1

0
1
X
=
l
W
+
l
W
=
l

l
+l

5 0from2 relation
1
2(39),0
And,

possible values of r are r = 0,1.


Then,

X 3 = 0l /W2 0 +1 l /W2 0 =0 l /
1

/= l /W 0 + l /W1 = l /
X
+ 7l 0 2 1 2 0

1
l/

N
4 1

X 4 r +3=

rk

l W N4

, for r = 0,1,2,,(N/4-1)

k =0
k

0
X 0 = 0h W 02 + hW
=2 h +
1
0
1
0
1
+ hW
=
hX = h W
h 4 h0
2
1
2
0
0
0
X 1 = 1l W
+2 l W 1 = l 2 + l
0
0

X = l W0
l 5
l 2
0
1

+lW

0
X 2 = 0h/W 02 + h/W
= 2h/ + h/
1
0
1
X = /h W 0/ + / h W 1 =/ h
6h 0
2
1
2
0
/
0
/
0
/
1 l W
X3 =
+l W
=2 l + l
0
2
1
0

X = /l W
7
l 2
0
1

1
0
/

+ /l W
1

=/ l
0

0
X 0 = 0h W 02 + hW
=2 h +
1
0
1
0
1
+ hW
=
hX = h W
h 4 h0
2
1
2
0
0
0
X 1 = 1l W
+2 l W 1 = l 2 + l
0
0

0
X 2 = 0h/W 02 + h/W
= 2h/ + h/
1
0
1
X = /h W 0/ + / h W 1 =/ h
6h 0
2
1
2
0
/
0
/
0
/
1 l W
X3 =
+l W
=2 l + l
0
2
1
0

1
/X
X = l W0
+lW
=
= /l W 0/ + / l W 1 =/ l
7
l 5
l 2
l 2
0
1
2
0
0
1
2
0
From relations
(46), (47), (48) and (49), signal1 flow
graph for computation of
1

X 07 may be represented as:

0
X 0 = 0h W 02 + hW
=2 h +
1
0
1
0
1
+ hW
=
hX = h W
h 4 h0
2
1
2
0
0
0
X 1 = 1l W
+2 l W 1 = l 2 + l
0
0

0
X 2 = 0h/W 02 + h/W
= 2h/ + h/
1
0
1
X = /h W 0/ + / h W 1 =/ h
6h 0
2
1
2
0
/
0
/
0
/
1 l W
X3 =
+l W
=2 l + l
0
2
1
0

1
/X
X = l W0
+lW
=
= /l W 0/ + / l W 1 =/ l
7
l 5
l 2
l 2
0
1
2
0
0
1
2
0
From relations
(46), (47), (48) and (49), signal1 flow
graph for computation of
1

X 07 may be represented as:

0
X 0 = 0h W 02 + hW
=2 h +
1
0
1
0
1
+ hW
=
hX = h W
h 4 h0
2
1
2
0
0
0
X 1 = 1l W
+2 l W 1 = l 2 + l
0
0

0
X 2 = 0h/W 02 + h/W
= 2h/ + h/
1
0
1
X = /h W 0/ + / h W 1 =/ h
6h 0
2
1
2
0
/
0
/
0
/
1 l W
X3 =
+l W
=2 l + l
0
2
1
0

1
/X
X = l W0
+lW
=
= /l W 0/ + / l W 1 =/ l
7
l 5
l 2
l 2
0
1
2
0
0
1
2
0
From relations
(46), (47), (48) and (49), signal1 flow
graph for computation of
1

X 07 may be represented as:

not in natural order, hence bit-reversal


should be carried out to bring it in
natural order

Bit Reversal procedure

Bit Reversal procedure

Complete Signal Flow Graph

Complete Signal Flow Graph

Time
history

Frequency

C ***Subroutine to compute radix-2 FFT***


C Decimation-in-frequency in-place algorithm
SUBROUTINE FFT(A,N,INV)
C N: Dimension of Array (must be a power of
2) C A: Complex array containing data
sequence C DFT coefficients are returned in
the array
C INV = 0 for forward FFT C INV = 1 for
inverse FFT

C ***Subroutine to compute radix-2 FFT***


C Decimation-in-frequency in-place algorithm
SUBROUTINE FFT(A,N,INV)
C N: Dimension of Array (must be a power of
2) C A: Complex array containing data
sequence C DFT coefficients are returned in
the array
C INV = 0 for forward FFT C INV = 1 for
inverse FFT
DIMENSION A(N) COMPLEX T,W,A
IF (INV.EQ.0) GO TO 8
C Divide sequence by N for inverse FFT DO 7
I=1,N
7
A(I)=A(I)/CMPLX(FLOAT(N),
8
0.0) S=-1.0
IF (INV.EQ.1) S=1.0

C Calculate number of iterations


C M: Number of iterations (log(N) to the base 2)
M=1
K=N
2
K=K/2
IF (K.EQ.1) GO TO 1
M=M+1
GO TO 2

C Calculate number of iterations


C M: Number of iterations (log(N) to the base 2)
M=1
K=N
2
K=K/2
IF (K.EQ.1) GO TO 1
M=M+1
GO TO 2
C Compute for each iteration
C NP: Number of points in each partition
1
NB=N
DO 3 I=1,M NP=NB
NB=NP/2
PHI=3.14159265/FLOAT
(NB)

C Compute for each iteration


C NP: Number of points in each partition
1
NB=N
DO 3 I=1,M NP=NB
NB=NP/2
PHI=3.14159265/FLOAT
(NB)
C Calculate the twiddle factor W for each butterfly
C NB: Number of butterflies for each partition
DO 3 J=1,NB ARG=FLOAT(J-1)*PHI
W=CMPLX(COS(ARG),S*SIN(ARG))

C Compute for each iteration


C NP: Number of points in each partition
1
NB=N
DO 3 I=1,M NP=NB
NB=NP/2
PHI=3.14159265/FLOAT
(NB)
C Calculate the twiddle factor W for each butterfly
C NB: Number of butterflies for each partition
DO 3 J=1,NB ARG=FLOAT(J-1)*PHI
W=CMPLX(COS(ARG),S*SIN(ARG))
C Compute butterfly for each partition DO 3
K=NP,N,NP
J1=K-NP+J J2=J1+NB T=A(J1)-A(J2)
A(J1)=A(J1)+A(J2) A(J2)=T*W
3 CONTINUE

C Compute for each iteration


C NP: Number of points in each partition
1
NB=N
DO 3 I=1,M NP=NB
NB=NP/2
PHI=3.14159265/FLOAT
(NB)
C Calculate the twiddle factor W for each butterfly
C NB: Number of butterflies for each partition
DO 3 J=1,NB ARG=FLOAT(J-1)*PHI
W=CMPLX(COS(ARG),S*SIN(ARG))
C Compute butterfly for each partition DO 3
K=NP,N,NP
J1=K-NP+J J2=J1+NB T=A(J1)-A(J2)
A(J1)=A(J1)+A(J2) A(J2)=T*W
3 CONTINUE

C Compute for each iteration


C NP: Number of points in each partition
1
NB=N
DO 3 I=1,M NP=NB
NB=NP/2
PHI=3.14159265/FLOAT
(NB)
C Calculate the twiddle factor W for each butterfly
C NB: Number of butterflies for each partition
DO 3 J=1,NB ARG=FLOAT(J-1)*PHI
W=CMPLX(COS(ARG),S*SIN(ARG))
C Compute butterfly for each partition DO 3
K=NP,N,NP
J1=K-NP+J J2=J1+NB T=A(J1)-A(J2)
A(J1)=A(J1)+A(J2) A(J2)=T*W
3 CONTINUE

Nested DO loop

C Bit reversal operation


N2=N/2
N1=N-1
J=1
DO 4 I=1,N1
IF (I.GE.J) GO TO 5
T=A(J)
A(J)=A(I) A(I)=T

5
6

K=N2
IF (K.GE.J) GO TO 4
J=J-K
K=K/2 GO TO 6
J=J+K RETURN
END

C Bit reversal operation


N2=N/2
N1=N-1
J=1
DO 4 I=1,N1
IF (I.GE.J) GO TO 5
T=A(J)
A(J)=A(I) A(I)=T

5
6

K=N2
IF (K.GE.J) GO TO 4
J=J-K
K=K/2 GO TO 6
J=J+K RETURN
END

During the bit-reversal operation, N/2 DFT coefficients remain unchanged and
the remaining N/2 coefficients are exchanged in place as required.

Computation of amplitude spectrum of a finite real data sequence

Computation of amplitude spectrum of a finite real data sequence

data
sequence xk,
k=0, 1, ,
(N-1)
(N must be a
power of 2)

complex
array
of
length N
from xk, k=0,
1, , (N-1)

Compute
N- point
FFT

Compute
amplitudes
Cn, n=0, 1,
, ((N/2)-1)

Computation of amplitude spectrum of a finite real data sequence

data
sequence xk,
k=0, 1, ,
(N-1)

complex
array
of
length N
from xk, k=0,
1, , (N-1)

(N must be a
power of 2)

1
C =N X
0

, the average value

Compute
N- point
FFT

Compute
amplitudes
Cn, n=0, 1,
, ((N/2)-1)

Computation of amplitude spectrum of a finite real data sequence

data
sequence xk,
k=0, 1, ,
(N-1)

complex
array
of
length N
from xk, k=0,
1, , (N-1)

Compute
N- point
FFT

Compute
amplitudes
Cn, n=0, 1,
, ((N/2)-1)

(N must be a
power of 2)

1
C =N X

, the average value

2
C =N X

, for n = 1,2,,(N/2-1), the nth harmonic amplitude.

and

Computation of amplitude spectrum of a finite real data sequence

Computation of amplitude spectrum of a finite real data sequence

The range of frequency may be expressed as fs/2 where fs is the


sampling
frequency 1 .
=

Computation of amplitude spectrum of a finite real data sequence

The range of frequency may be expressed as fs/2 where fs is the


sampling
frequency 1 .
=

The frequency resolution may be estimated as f0 where f0 is the fundamental


frequency (=1/T0 ), where T0 is the time period of fundamental frequency and also
the width of the analysis window.

FORTRAN program for computation of amplitude spectrum

FORTRAN program for computation of amplitude spectrum


C ***Amplitude spectrum analysis program using FFT***
DIMENSION A(1024),B(1024),C(512),PHASE(512)
COMPLEX A
CHARACTER*64 FNAME WRITE(*,10)
10
20

200

FORMAT(1X,'Enter file name - '\)


READ(*,20)FNAME
FORMAT(A) OPEN(2,
FILE=FNAME) READ(2,*,
END=100)(B(I),I=1,1024) 100 N=I1
CLOSE(2) WRITE(*,200)N
FORMAT(1X,'Data points = ',I4)

FORTRAN program for computation of amplitude spectrum

15
24
5
25
30
300

DO 15 I=1,10
IF(N-2**I)24,25,15 CONTINUE WRITE(*,5)
FORMAT(1X,'Incorrect size - it must be a power of 2')
STOP
DO 30 I=1,N A(I)=CMPLX(B(I),0.0)/CMPLX(FLOAT(N),
0.0) WRITE(*,300)
FORMAT(1X,'FFT analysis in progress') CALL FFT(A,N,
0)

FORTRAN program for computation of amplitude spectrum

40

80

NA=N/2 C(1)=CABS
(A(1)) DO 40 I=2,NA
C(I)=CABS(A(I))*2.0
D=180.0/3.141592654
DO 80 I=2,NA
R=REAL(A(I))
X=AIMAG(A(I))
ALPHA=ATAN2(X,R)
PHASE(I)=D*ALPHA

FORTRAN program for computation of amplitude spectrum

60
70

75

85
90

WRITE(*,60)
FORMAT('0','Harmonic no.',7X,'Amplitude',12X,'Phase (deg)')
WRITE(*,70)
FORMAT(1X,'------------',7X,'---------',12X,'-----------'//) NB=0
WRITE(*,75)NB,C(1) FORMAT(5X,I3,9X,1P,E13.6) DO 85
I=2,NA
NB=I-1 WRITE(*,90)NB,C(I),PHASE(I)
FORMAT(5X,I3,9X,1P,E13.6,9X,E13.6) END

FFT-based digital filtering of a finite real data sequence

FFT-based digital filtering of a finite real data sequence

convolution

xk
input
sequence

Digital
Filter

yk
output
sequence

FFT-based digital filtering of a finite real data sequence

convolution

xk
input
sequence

Digital
Filter

yk
output
sequence

yk = hk * xk, hk is the impulse sequence of the digital filter

FFT-based digital filtering of a finite real data sequence

convolution

Digital

xk

yk

Filter

input
sequence

output
sequence

multiplication

xk

FFT

Xn

Hn

Yn

IFFT

yk

FFT-based digital filtering of a finite real data sequence

convolution

Digital

xk

yk

Filter

input
sequence

output
sequence

multiplication

xk

FFT

Xn

Hn

Yn

IFFT

yk

Yn = Hn . Xn, Hn is the complex gain of the digital filter

FFT-based digital filtering of a finite real data sequence


m u lt ip l i c a t i o n

xk

FFT

Xn

Hn

Yn

IF F T

yk

Yn = H n . X n

FFT-based digital filtering of a finite real data sequence


m u lt ip l i c a t i o n

xk

FFT

Xn

N -point R eal
data sequence
xk, k=0, 1, ,
(N -1)

Yn

Hn

Form N-point
array

input
sequence
((N/2)+1)-point

Com pute

Filter specification
(upto folding frequency)

yk

Yn = H n . X n

Xn

FFT

m ultiplier

Yn

Form com plex


length N using
com plex
conjugates

Frequency
response

Com pute
N- point
IFFT

gain and phase


characteristic

IF F T

H
n

output
sequence
yk,
k=0, 1, ,
(N -1)

FFT-based digital filtering of a finite real data sequence


N -p o in t R ea
da
l ta sequence
x k, k = 0 , 1 ,
,
(N -1 )
in p u t
seq u en ce

Fo rm N-po in t
arra y

Com
pute

Xn

FFT

m u ltip lier

Yn

IFFT

((N /2 )+ 1 )-p o in

F o rm co m p
lex
len g th N usin
g co m p lex
co n ju g a tes

t g a in a nd p h
a se ch
aracteristic

F ilter sp ecifica tio n (u


p to fo ld in g freq u en cy)

Hn

N/2

F req u en cy
resp o n se

Co m p u
te
N- po in t

Hn

seq u en ce
yk ,
k = 0 , 1 ,
, (N -1
)

FFT-based digital filtering of a finite real data sequence


N -p o in t R ea
da
l ta sequence
x k, k = 0 , 1 ,
,
(N -1 )
in p u t
seq u en ce

Fo rm N-po in t
arra y

Com
pute

Xn

FFT

Yn

m u ltip lier

IFFT

((N /2 )+ 1 )-p o in

F o rm co m p
lex
len g th N usin
g co m p lex
co n ju g a tes

t g a in a nd p h
a se ch
aracteristic

F ilter sp ecifica tio n (u


p to fo ld in g freq u en cy)

Hn

Co m p u
te
N- po in t

Hn

F req u en cy
resp o n se

Hn

N/2

N/2

N-1 n

seq u en ce
yk ,
k = 0 , 1 ,
, (N -1
)

FORTRAN program for FFT-based digital filtering

FORTRAN program for FFT-based digital filtering


C ***FFT based digital filter program*** DIMENSION X(1024),
A(513),PH(513) COMPLEX H(1024),CX(1024)
CHARACTER*64 FNAME1,FNAME2 WRITE(*,20)

20
30
40

FORMAT(1X,'Enter input file name - '\)


READ(*,30)FNAME1
FORMAT(A) WRITE(*,40)
FORMAT(1X,'Enter output file name - '\)
READ(*,30)FNAME2

FORTRAN program for FFT-based digital filtering

50
60
70

375
380
400

OPEN(1,FILE=FNAME1) READ(1,*,END=50)(X(I),
I=1,1024) GOTO 60
I=I-1 N=I
WRITE(*,70)N
FORMAT(1X,'Data points = ',I4) DO 375 I=1,10
IF(N-2**I)380,390,375 CONTINUE WRITE(*,400)
FORMAT(1X,'Incorrect size of data') STOP

FORTRAN program for FFT-based digital filtering


390
100

11
0

WRITE(*,100)N/2+1
FORMAT(1X,'Enter filter gain (',I3,' points)') READ(*,*)(A(I),I=1,
N/2+1)
PH(1)=0.0 WRITE(*,110)N/2
FORMAT(1X,'Enter filter phase (',I3,' points)') READ(*,*)(PH(I),
I=2,N/2+1)

FORTRAN program for FFT-based digital filtering


390
100

WRITE(*,100)N/2+1
FORMAT(1X,'Enter filter gain (',I3,' points)') READ(*,*)(A(I),I=1,
N/2+1)
PH(1)=0.0 WRITE(*,110)N/2
FORMAT(1X,'Enter filter phase (',I3,' points)') READ(*,*)(PH(I),
I=2,N/2+1)

11
0
C Form complex filter gain array H
(1)=CMPLX(A(1)*N,0.0)
DO 200 I=2,N/2+1
200
H(I)=CMPLX(A(I)*N*COS(PH(I))/2.0,A(I)*N*SIN(PH(I))/2.0)

N /2

FORTRAN program for FFT-based digital filtering


390
100

WRITE(*,100)N/2+1
FORMAT(1X,'Enter filter gain (',I3,' points)') READ(*,*)(A(I),I=1,
N/2+1)
PH(1)=0.0 WRITE(*,110)N/2
FORMAT(1X,'Enter filter phase (',I3,' points)') READ(*,*)(PH(I),
I=2,N/2+1)

11
0
C Form complex filter gain array H
(1)=CMPLX(A(1)*N,0.0)
DO 200 I=2,N/2+1
200
H(I)=CMPLX(A(I)*N*COS(PH(I))/2.0,A(I)*N*SIN(PH(I))/2.0)
C Form rest of the gain array by complex conjugate
DO 340 I=2,N/2
J=N+2-I
340
H(J)=CONJG(H(I))
H

N /2

N -1

FORTRAN program for FFT-based digital filtering


C Form complex input data array DO 350 I=1,N
350 CX(I)=CMPLX(X(I),0.0)

xk

FORTRAN program for FFT-based digital filtering


C Form complex input data array DO 350 I=1,N
350 CX(I)=CMPLX(X(I),0.0) C Compute FFT
CALL FFT(CX,N,0)

xk

FFT

Xn

FORTRAN program for FFT-based digital filtering


C Form complex input data array DO 350 I=1,N
350 CX(I)=CMPLX(X(I),0.0) C Compute FFT
CALL FFT(CX,N,0)
C Perform filtering in frequency domain DO 360 I=1,N
360 CX(I)=CX(I)*H(I)

Multiplication

xk

FFT

Xn

Hn

Yn

FORTRAN program for FFT-based digital filtering


C Form complex input data array DO 350 I=1,N
350 CX(I)=CMPLX(X(I),0.0) C Compute FFT
CALL FFT(CX,N,0)
C Perform filtering in frequency domain DO 360 I=1,N
360 CX(I)=CX(I)*H(I) C Back to time
CALL FFT(CX,N,1) DO 370 I=1,N
370 X(I)=REAL(CX(I))

Multiplication

xk

FFT

Xn

Hn

Yn

IFFT

yk

FORTRAN program for FFT-based digital filtering


C Save output
IF(FNAME1.EQ.FNAME2)CLOSE(1) OPEN(2,FILE=FNAME2,
STATUS='NEW') WRITE(2,*)(X(I),I=1,N)
END

J
J
a

Potrebbero piacerti anche