DSP Chapter-6
DSP Chapter-6
FFT-Efficient Computation of OFT, Goertzel Algorithm, radix2 and radix Decimation-in-Time and Decimation-in-
frequency FFT Algorithms.
6.1 FFT-Efficient Computation of OFT ....................................................... ..... ...... ....................... ......................................... 6-2
✓ Syllabus Topic : Radix-2 Decimation In Time FFT Algorithm ......................................................................................... 6-3
6.2 Radix-2 Decimation In Time (DIT) Algorithm (DIT FFT) ................................................................................................. 6-3
UQ. Explain the Decimation in Time FFT algorithm. ............................................ 6-3
UQ. Explain how the decimation in time technique works with necessary equations and diagrams.
GTU - a. S(c), S-19, 7 Marks ··············· ··································· ·· ················································ ··················· 6-3
• Chapter End ......................... •••·····... ··· ·· ······.. ·· ····· ····· .. · ····· ·· ··· ····· ··· · ··· ·· ·· ··· ·· · ·· ··· · ·· · ··· · .. ·· · ·· · ·· · ·· · ·· · · ·•••••............ 6-24
MordenTimeTech.com
(Fast Fourier Transform) ... Page no .. . (6-
Digital Signal Processing (GTU - Sem. 7 - ECE)
2)
<a
. 2nK
k+N - J--
Syllabus Topic: FFT-Efflclent Computation of WN = e N
DFT
Wk+
N
=
(
e
-l~)k
~ 6.1 FFT-EFFICIENT COMPUTATION OF N · · .(6. 1.6)
DFT In Equation (6.1.6), the bracket term is WN
. Wk+N = WNk
.• N ... (6.1.7)
While calculating OFT, we always calculate 'N' -point
OFT. The number N can be factored as, Equation (6.1.7) indicates that twiddle factor is
N = r 1 , r 2 , r 3 ... rv . .. (6.1.1) periodic.
Here every ' r' is a prime. k+N/2 _ Wk
2. WN -- N
Now ifr 1 = r 2 = r3 = . . .. = rv = r
Using Equation (6.1.6) we can write,
then we can write,
_j ~1t] ( k +N/2)
N =/ ... (6.1.2) Wk+N/2 = [e
N
Here ' r' is called as radix (base) of FFr algorithm and j 2nk j 2n N
' v' indicates number of stages in FFr algorithm. = e N ·e- N · 2
Now radix means base and if its value is '2' then it is j 2nk .
called as radix-2 FFf algorithm. Thus when r = 2; k+N/2 - N -Jn
Equation (6.1.2) becomes,
WN =e ·e ... (6.1.8)
-jn . .
... (6.1.3) But e = cos n - J srn n = - 1 - 0 = - 1
Thus if we are computing 8 point DFf then N = 8 . 2nk
k + N/2 _ - JN
8 = 2v WN --e
V =3 ... (6.1.4)
So for 8 point DFf, there are three stages of FFf
k+N/2 _ ( _j:-\k
WN -- e ) ... (6.1.9)
algorithm. While computing FFf, divide number of input
In Equation (6.1.9), the bracket term is, WN
samples by 2, till you reach minimum two samples. Based
on this division there are two algorithms as follows : . Wk+N/2 - -Wk
.. N - N ... (6.1.10)
1. Radix-2 Decimatio n in Time (DIT) algorithm. Equation (6.1.10) indicates that twiddle factor is
2. Radix-2 Decimatio n in Frequency (DIF) algorithm. symmetric.
Before studying these algorithms we will derive some 2
3. WN= WN/2
important properties of twiddle factor WN. The twiddle
factor WN is given by, From Equation (6.1.5) we can write,
j2n j 2n j 27t
WN = e N - -2
. .. (6.1.5) WN/2 =e-N/2 =e - N .
wk-wk+ N 2
1. N- N _ j 2n]
WN/2 = [ e N
Using Equation (6.1.5) we can write,
2
j2n]k+N j2nk WN/2 =WN
~+N =[ e- N =e N . e- j 2n
N
-j21t
But e = cos 2n - j sin 2n = 1 - jO = 1
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) ~ Tech-Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
. nal processing (GTU - Sem. 7 _ ECE)
Digital 5 ,g
(Fast Fourlar Transform) ... Paga no ... (6-3)
~ a,os foplc : Radix-2 Decimation In Time FFT N
S1'i' Algorithm and r2 ( m) =x (2n+l), m - O, l , ... , 2 - l ... (6.2.3)
GTU - Q. ______________________
S(c), S-19, 7 Marks _I .:
I
I write separate summation for even and odd sequences as
follows:
-------------------
To decimate means to break into parts. Thus DIT
·
indicateS dividing (splitting) the sequence in time do mam.
The different stages of decimation are as follows :
X(k) = L
n even
x(n) w: + L
n odd
x (n ) w1;;
... (6.2.5)
!Ji' first stage of decimation
The first summation represents even sequence. So we
Let x ( n ) be the given input sequence containing 'N'
will put n = 2m in first summation. While the second
samples. Now for decimation in time we will divide x ( n)
summation represents odd sequence, so we will put
into even and odd sequences.
n = (2m + 1) in second summation. Since even and odd
:. x ( n) = f 1 ( m) + f 2 ( m) .. . (6.2.1)
sequences contain N, 2 samples each; the limits of
Here f 1 (m) is even sequence and f2 (m) is odd
summation will be from m = O to ~ - 1.
sequence
N
:. f 1( m ) = x ( 2n ), m = 0, 1, ...
2 -1 ... (6.2.2)
N N
2- l 2-1
:. X ( k ) = L x ( 2m ) w~lcm + L 2
x ( 2m + 1 ) w~ < m + l) ... (6.2.6)
m=O m=O
But x ( 2m) is even sequence, so it is f 1 ( m) and x ( 2m + I ) is odd sequence, so it is f 2 ( m ).
N N
2- l 2-1
X ( k) = L f1 ( m ) W~km + L f2 ( m ) ~km w~ :. X ( k)
m=O m=O
N
2 -l
= I: ... (6.2.7)
m=O
(GTU-New 4
Syllabus w .e.f academic year 21-22) (G7-l ) ~ Tech -Neo Publications ...A SACHIN. SHAH Venture
MordenTimeTech.com
(Fast Fourier Transform) ...Page no ... ( ~
Digital Signal Processing (GTU - Sem. 7 - ECE)
Inputs
x(2n) = f 1(m)
F1(2) = x(4) 4-point
DFT
F 1(2)
- X(2)
Adder
Block
t
Multiplication by
Wk
N
k
Fig. 6.2.1 : Graphical representation of X ( k ) = F 1 ( k ) + W N F 2 ( k )
2
Now we have WN = WN/2 Now F 1 ( k) and F 2 ( k) are 4-point (~) DFTs. They
N N
2- 1 .!:i2-l are periodic with period
2 . Using periodicity property of
:. X (k) = i.J
" f 1 { m) WN/2 2 k'°'
km + WN i.J f ( m) WN
Ian
12 DFr we can write,
m=O m=O
F 1 (k+~) =F 1 (k) , ... (6.2.10)
... (6.2.8)
Comparing each summation with the definition ofDFr, and F2 ( k + ~) = F2 ( k ) ... (6.2.11)
k
X(k)=F1(k)+WN F2(k), k=0,1, ... ,N-1
Replacing k by k + ~ in Equation (6.2.9) we get,
... (6.2.9)
We will consider an example of 8 point DFr. That
means N=8.
X (k+ 2N) =F (k+ 2N) + WN+ N/2 F ( k + 2N)
1
k
2
(6.2.12)
Here F 1 ( k) is ~ point DFr of f 1 ( m) and F2 ( k) is k+N/2 k
Now we have, WN = - WN
~ point DFr of f 2 (m). That means F 1 (k) and F2 ( k ) are
:. X ( k + ~) = F 1 ( k + ~ ) -W~ Fi( k + ~)
4-point DFrs.
Equation (6.2.9) indicates that F2 ( k ) is multiplied by ... (6.2.13)
W~ and it is added with F1 ( k ), to obtain (4 + 4) Using Equations (6.2.10) and (6.2.11) we get,
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) li1 Tech-Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
____________________________ ., _...,....---
. s·gnal Processing (GTU - Sem. 7 _ ECE) (Fast Fourier Transform) ... Page no ... (&-S)
Digit8I I
~ k N 0
X(k)== F1(k)+WN F2(k),k=0,l ... 2-l X ( 0) = P 1( 0) + WN F2 ( 0)
I ... (6.2.17)
... (6.2.15) X (I) = F 1( I ) + W ~ F2 ( I ) }
and X ( k + ~) = FI (k) - w~ F2 (k), k = 0, 1, ... ~_ l X ( 2) = F 1( 2 ) + W N P2 ( 2 )
3
... (6.2.16) X ( 3) = F 1( 3 ) + W N F2 ( 3 )
We are considering an example of 8 point DFT (N == 8). 0
So in Equations (6.2.15) and (6.2.16), k varies from o to 3 _ X(0+4) = X ( 4 ) =F 1( 0 ) - W N F2 ( 0 )
l
;,loW putting k = 0 to 3 in Equations (6.2.15) and (6.2.l6) X ( 1 + 4 ) = X ( 5 ) = F 1( 1 ) - WN F2 ( 1 ) .(6.2.18)
we get. 2
and, X ( 2 + 4 ) =X ( 6 ) = F 1( 2 ) - W N F2 ( 2 )
3
X(3+4) =X ( 7 ) =F 1( 3 ) - W N F2 ( 3 )
The graphical representation of first stage of
decimation for 8 point DFT is as shown in Fig. 6.2.2.
I
X[Oj
f1(1} = x[2]:
Even X[1] From
samples N/2 point , 1
Equation
OFT F1[2) 1 1
x (2n) = f 1(m) X(2] (6.2.17)
I I
__
I
f (3)::: x{6] I F1[3] I :
, .._
I
I .
L-------------~•
,,
I I
I I
X[3)
I
I
I
I
I WO
f 0) = x(1] 1-F...!:if::...O.:..)o-'_...,.N_-41---+--+~'<-+-~M' X[4)
F 1}
I w,
f (1) = x[3] 1 N
Odd X(S] From
samples
N/2 point
Fif2]
I
I
w2 Equation
f (2) = x[5] OFT N
x(2n + 1) = f 2 (m) X[6) (6.2.18)
F2(3J
I w3
f (3) = x[7] 1 N
X[7)
(GTU-New Syllabus w.e.f academic year 21-22) (G 7-l 4) ~ Tech-Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
Digital Signal Processing (GTU - Sem. 7 - ECE) (Fast Fourier Transform) ... Page no ... (6-6)
Now recall Equations (6.2.15) and (6.2.16). We Thus, for N = 8 we have the range of k, from k = o to
obtained sequences X (k) and X ( k + ~ ) from F 1 (k) k = 1. Here G 11 ( k) is DFT of gl 1 ( n) and G12 ( k) is
DFT of g 12 ( n ).
N
and F2 (k). The length of each sequence was
2 . Here Now putting the values of 'k' in Equation (6.2.21) we
in the second stage of decimation; we are further get,
dividing the sequences into even and odd parts. So 0
similar to Equations (6.2.15) and (6.2.16) we can write; F 1( 0) = G 11 ( 0) + WN/Z G12 ( 0)
For F 1 (k), } .. . (6.2.23)
k = 0, 1, ... 4N - 1
F 1(1 +¾) = F1(3) = Gu ( 1 )- WN~ G12 (1)
... (6.2.22)
0
x[2l= t1[1l = 9 12[01 G12[0] W N/2
F 1[2]
Odd N/4 point From
samples OFT Equation
1
of f 1[m] X[6] = f1[3) = 912[1) (2-point) G12[1) w N/2 (6.2 .24)
F 1[3]
-1
Here the values of k are 'O' and I. That means it is 2-point DFT. Thus Equations (6.2.23) and (6.2.24) shows that we
can obtain 4- point DFT by combining two 2-point DFTs. The graphical representation is shown in Fig. 6.2.3.
Note that here,
gll ( n)::;; f1 ( 2m) = x ( 4n) = {x ( 0 ), x ( 4) } }
and g 12 ( n) = f 1 ( 2m + 1) = x ( 4n + 2) = {x ( 2 ), x ( 6)) ... (6.2.25)
Now similar to Equations (6.2.21) and (6.2.22) we can write equations for F 2 ( k) as follows:
k N
F2 ( k ) = G 21 ( k) + W N/2 G 22 ( k ), k = 0, 1, . .. 4 - 1 ... (6.2.26)
... (6.2.27)
Here G 21 (k) is DFT of g 21 (n) and G2 2 (k) is DFT of g22 (n). The values of k are o and 1. Putting these values in
Equation (6.2.26),
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) li1 Tech-Neo Publications ... A SACHIN SHAH Venture
MordenTimeTech.com
(
) Page no .. • (6-7 )
. 1
~~ ~Signrn~a~I
GTU S
P~r~oc~e~ss~in~g~~~ ~~====-=
-0~e~m;_;;,~?~-~E~C~E~)~================~(~F:a:st~F~o~u~ri:e~rrT~ra:n:s:fo!:;rm~_;,;..~·
~ ' ( o) e G 21 ( 0 ) + W ~/2 G 22 ( O ) }
... (6.2.28)
f2 ( 1 ) = G21 ( 1 ) - WN/2 G22 ( 1 )
0
=F2 ( 2 ) = G21 ( 0 )
}
F2(0+¾) - W N/Z G 22 ( O )
... (6.2.29)
I
F2(1+¾) = F2 ( 3 ) = G21 ( 1) - W N/ G ( 1 )
2 22
Tbe graphical representation of Equations (6.2.28) and (6.2.29) is shown in Fig. 6.2.4.
(GTU-N .
ew Syllabus w.e.f academic year 21- 22) (G7-14)
MordenTimeTech.com
01g1tal Signal Pnx-e~ing (Gl U • Sorn, 7 • 1:CL) f Ml f ourlor Trnnsform) . Pag9 no S.8
011(0)
"[O'
N4 JX)inl
DFT
0 11 (1)
xf4]
G12(0)
l,f2]
N 4 point
OFT
G12(1)
xf6]
G21(0)
>-f1J
N,4 point
OFT
G21(1)
~51
x[3~ 0------1
Ni4 point
OFT
xf7] 0 - - - - - 1
Stage 2 Stage 1
le' Combination of first and second stage of DFf. It is separately drawn as shown in Fig. 6.2.6.
cledmadon x(O) =f 1(0) =9 11 (0) G11CO)
G11Ck)
Combming Fig. 6.2.3 and Fig. 6.2.4 in Fig. 6.2.2 we 911Cn)
where n Is
{ 2polnl where k IS
OFT
get the combination of first and second stage of 0 and 1 xj4) =f1(2) =911(1) G 11 (1)
-}
O and 1
- .
decimation. It is shown in Fig. 6.2.5.
At this stage we have ~ that means 2 point sequences. Fig. 6.2.6 : Block of 2-point DFf
So further decimation is not possible. As shown in Here input sequences are g 11 ( O) and gll (I). We can
Fig. 6.2.5; we have to compute 2-point DFf. denote it by g 11 ( n ); where n varies from Oto 1. Now
the output sequences are Gu ( O ) and G 11 ( 1 ). We
rs Computation of 2-polnt DFT
can denote it by G 11 ( k ); where 'k' varies from Oto I.
According to the basic definition of DPT, IJereG 11 (k)isDFfo fg 11 (n).
N- I kn Thus for G 11 ( k) we can write Equation (6.2.31) os.
X(k)= I x(nJWN; k=O,l, ... ,N-1 ... (6.2.31)
1
n=O
We will use Equation (6.2.31) to compute 2 point DFT.
GJ J ( k) = I gl I ( n) w;n .k =0, I ... (6.2.32)
n =O
From Fig. 6.2.6, consider the first block of 2 point 2
Nole that this is 2 point D1-<T, so we have put N = ·
(GTU-New SVflabus w.e.f academic year 21-22) (G7-14) [iJ Tech Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
. s·gnal processing (GTU - Sem. 7 - ECE) (Fast Fourier Transform) ... Page no ... (6--9 )
Digit81 I •
-
j 2rc)l
N
.
- J1t ~ Total signal flow-graph for 8-point DIT FFT
WI
2
=( e =e
The total signal flow graph is obtained by
= cos 7t - j sin 1t = - 1 - j O
interconnecting all stages of decimation. In this case, it
1 0
:. W2 = - 1 And W2 =I is obtained by interconnecting first and second stage of
Putting these values in Equation (6.2.34) we get, decimation. But the starting block is the block used to
G11 (I) = gll ( 0) - g 11 ( I ) ... (6.2.35) compute 2-point DFf (butterfly structure).
The total signal flow graph is shown in Fig. 6 .2.9.
Using Equations (6.2.33) and (6.2.35), we can represent
the computation of2-point DFf as shown in Fig. 6.2.7. This
structure looks like a butterfly. So it is called as FFf
butterfly structure.
911{0) 1
x(O) ~ - - - -.....-----c
911(1)
X{4) -----+-_1- - - - - t
Fig. 6.2.7: FFf butterfly structure
MordenTimeTech.com
.... CJ:L.cnnc:.
G) 0
4 (C.
C
z ~
t1)
~
en
(C.
Vl ::,
'S.. ~
ii, x[O)
CT
X[O) ""C
C:
V, g
(D
~ (/)
(1) (/)
:... 3·
Cl) WO <C
MordenTimeTech.com
n
Cl)
8
a. x[4) G)
t1) X[1] -I
3 C
n·
'<
t1)
en
(D
~ ~
N
I;"' x[2)
......
N X[2]
~ m
()
G)
-;J !!!
~
~ I WO
8
x[6) • . .c::::: . . _, . ~ +}-- X[3]
>(D:I 0
-1 I -1
\ X 7\. .. X
x[1] )lo ,, I
• )lo ll
I ':::::: _;A!)! I II~ Xl 4]
I
. 59 • X I\ 1\--1
~
4
t1)
n WO
::r 8
z
t1)
0
x[5)
' xtSJ
,, a>
~
C: .,,
0
"~
n·
Cl)
~
.-+ ~
cs-
::, x[3) -I
r)> X{6] in
::,
Vl a-
►
(")
I WO -3
z 8 VY 8
V'I x[7) vv 8 :
I • . ...:::::::::: . ~ l ,, / )lo I I ,, X[7]
-1 I
►
. -0
-1
I 0----
-1
<
(1)
:::, Fig. 6.2.9 : Total signal flow graph for 8-point DIT FFT
'c
~
0
I!-
. al processing (GTU - Sem. 7 - ECE)
. :.al 5,gn
(Fast Fourier Transform) ... Page no ... (6- 11 )
o,g,,
~ GTU S
~.&.2,1 .
11 te the eigbt-pomt DFf of a sequence.
colllPu{1 . I ,11
, ( )~
} . . .
11 2 2 2 • 2 • O, O, O, O USmg m-place radix-2 decimation in time FFT algorithm.
&'.1 soln, : 'Ibis flow graph is shown in Fig. Ex. 6.2.1. .
11ere s1 (n) represents output of stage - 1 and s2 (n) represents output of :,Lage - 2. The different values of twiddle factor are
w~ =eo =1
-j~
4
Wl = e
8
= 0.707 - j 0.707
'
...-4
N
a)
N
Cl) ~
~ ;,,<
~
bi>
ri:;
'i
Os:'° Os:'°
E
)(
(GTU
·NewsYilabus
w.e.f academic year 21-22) (G7-1 4) ~ Tech- Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
Digital Signal Processing (GTU - Sem. 7 - ECE) (Fast Fourier Transform) ... Page no ... (6·1 )
2
.n 3 ==--
2 -JI . x (3 ) = S2 ( 3 ) + W 8 S2 ( 7 )
W8 =e =-J
_ _2 I .I
FFT algorithms.
S2 ( 3) =s 1 ( 1 )-W8 _SJ (3)= 2 +J2 0 Soln.:
Here, N= 8 n =0 to N - 1 = 0 to 7
0
For n = 0 ⇒ x(0)=2 =1
2 1 .I t
S2 ( 5) = St ( 5) + W 8 SJ ( 7) = 2 - J2 n= 1⇒ x(1)=2=2
2
0 1 1 n=2 ⇒ x(2) =2 =4
S2 ( 6) =si (4)-W8 SJ (6)= 2 -2 =0 3
n=3 ⇒ x(3) =2 =8
2 1 .1 4
s 2 ( 7 ) = St ( 5 ) - W S Si{ 7) = 2 + J 2 n=4 ⇒ X ( 4) = 2 = 16
5
Final output
n=5 ⇒ X ( 5) = 2 =32
6
n=6 ⇒ x(6) =2 = 64
0
X(0) =s 2 (0)+W s (4)=1+1=2 7
8 2 n=7 ⇒ X( 7) = 2 = 128
1 The flow graph is shown in Fig. Ex. 6.2.2.
X ( 1) =s2( 1 )+W 8 s2(5)
= ( ½- j ½) + ( 0. 707 - j 0.707 ) ( ½- j ½)
= 0.5 - j 1.207
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) ~ Tech- Neo Publications ...A SACHIN SHAH Venture
MordenTimeTech.com
!:.~~ ~:l.i rm) ...!.~-1
ii~i! !;~! - 2.
·:n~a~Ip=roc~e;;;ss=in;aig~(G;;;;;;;;T;;;;U;;;;-;;;;S;;;;e;;;m~.~7~-E;;;C~E~)----,-----J!::!.::i:(Fast Fourier Transfo Page no.. . (6 13
.d(81
l/l!l..o1111 5,g
~ere• w~ = 1 _jtt SI ( 1) a X( 0 ) - Wo
g X( 4) s: 1 - 16 =- 15
w! : : e4 = 0.707 - j 0.707
81 ( 2) = X ( 2) + W~
0
X ( 6) = 4 + 64 = 68
s1(3) =x(2) - Wg x(6) = 4 - 64 =- 60
Vi's
2 :::e 2-
- jtt
=- j 81 ( 4) = X ( 1) + Wg
0
0
X ( 5) = 2 + 32 = 34
-j6lt St ( 5) = X ( 1 ) - Wg X ( 5 ) = 2 - 32 = - 30
3 ~ = - 0 .707-j 0.707
v-, :::e 0
8 s1(6) =x(3) +W8 x(7)= 8+128 =136
0
ut of stage 1 S1 ( 7) = X ( 3 ) - Wg X ( 7 ) = 8 - 128 = - 120
o~P o
s1(0) = x( 0 )+ W g x ( 4 ) =1+16 =17
0 ., 0.,
~ ;:
,.
§: ~ c,j' ~ ~ " '
~>< ~
-:=~==-==::--;,~~~::----1~~=-=-=-~---------
--- ->< x ><
x x
( -------
GTu-N ew SyllabLus w.e.f academic year 21-22) (G7-14) Tech-Ne o Publicat ions ... A SACHIN SHAH Venture
MordenTimeTech.com
Digital Signal Processing (GTU - Sem. 7 - ECE) (Fast Fourier Transform) ... Page no ... (6·14)
= -30+ j 120
0
UEx. 6.2.3 GTU - S-14, 3 Marks, a. 4 c OR. W-17.
S2 ( 6) = S1 ( 4 )- W 8 SJ ( 6) = 34 - 136 = - 102 7 Marks, a. 5 b. S-19. 4 Marks
2
Sz ( 7) = S1 ( 5 ) - W8 S1 ( 7) = - 30 + j ( - 120) Derive DIT FFf flow graph for N = 4 hence find DFf of
=-30-j 120 x (n) = {1, 2, 3, 4}.
Final output
0 Soln. : First stage of decimation
0
We have the equations for first stage of decimation.
X ( 0) = s2 ( o) + W8 s2 ( 4) = 85 + 170 = 255 k N
X ( k) = F 1 ( k) + WN F 2 ( k), k = 0, 1 ... -1
l
X ( 1 ) = Sz ( 1 ) + W 8 s2 ( 5 ) 2
... (1)
= (- 15 + j 60) + (0.707 - j 0.707) (- 30 + j 120)
= ( - 15 + j 60) + ( 63.68 + j 106.04) and X (k + ~) = F1 ( k )- w~ F2 ( k ), k = 0, I, ... ~ -1
.·. X ( 1) = 48.68 + j 166.04 ... (2)
2
X(2) = S2(2)+Ws s2(6) HereN=4
X[O]
Even
samples 2-polnt
of x(n) OFT
X[1]
X[2]
Odd
samples 2-polnt
of x(n) OFT
X[3]
Now we will replace each 2-point DFf by butterfly structure as shown in Fig. Ex. 6.2.3(b).
X[O]
X[1]
X[2]
X[3]
MordenTimeTech.com
Digital Signal Proces sing (GTU • Sem. 7 • ECE)
(Fast Fourie r Transf orm) ... Page no ... (6-1 S)
X (3) = s, - S3 = - 2-j2 In Equati on (6.2.40 ); four complex multiplications are
Thus, X ( k ) = { X ( 0 ), X ( I ), X ( 2 ), X ( 3 ) } require d and three compl ex additio ns are required. Here We
.·. X(k) = (10,- 2+j2 ,-2,- 2-j2} have consid ered N = 4. Thus for each value of 'k'; N
compl ex multip licatio ns are requir ed and 'N - l ' comple
x
~ 6.2. t Computson of Computadonal additio ns are require d. Now the total values of k and 'N'.
Complexity with Direct Computadon :. Comp lex Additi ons = N ( N - l) = N 2 - N
Accor ding to the definit ion of DFf we have, a --11 1::- ----....1----- -::-; 1>-- -o A= a+ w'Nb
N-1
X ( k) = L x ( n) ~ , k =0, 1, 2, .... N - 1. .. (6.2.38)
n=O
Equati on (6.2.38 ) indica tes that we have to take b
w'N
multip licatio n of x ( n ) and twiddl e factor. Then we have -1
to
add all the terms. Since twiddl e factor is compl ex; we Fig. 6.2.10 : Gener al struct ure of butterfly
need
to perfor m compl ex multip licatio ns and compl ex additions.
Here ' a' and 'b' are inputs and A and B are outputs of
~ Comp lex muldp llcatio ns
butterf ly. The output s are given by,
As given by Equat ion (6.2.38 ), for one value of 'k'
A =a+W ~ b ... (6.2.41)
multip lkatio n should be perfor med for all values of 'n'. The
range of ' n' is from O to N - 1. So for one value of 'k';
N
and B = a-W~ b ... (6.2.42)
compl ex multip licatio ns are require d. Now the range of k
is 1. To calcul ate any output (A or B), we need to multiple
also from k = 0 t.o k = N - 1. The total compl ex
multip licatio ns are, input 'b' by twiddl e factor WN .
So one complex
multip licatio n is requir ed for one butterfly.
Comp lex multip licatio ns = N x N = N2 ... (6.2.39)
q» Comp lex additi ons
2. To calcul ate output 'A', one compl ex addition is
require d, while to calcul ate output 'B' one complex
Accor ding to Equati on (6.2.38), for each value of k we subtra ction is require d as given by Equation (6.2.42).
need to add the produc t terms of x ( n ) W~ . For examp le, But the compu tationa l compl exity of addition and
let us say N = 4. subtra ction is same. So we can say that for one
3 butterf ly two compl ex additio ns are required.
For k =0 ⇒ X ( 0 ) = L x ( n ) w~ x 0 3. As shown in Fig. Ex. 6.2.1 , for 8 point DFf; 4
n=O butterf lies are there at each stage. So for 'N' point
3
DFf, at each stage, 'N' butterf lies are required.
= L x(n)W ~ 2
n=O 4. As shown in Fig. Ex. 6.2.1; three stages are required to
:. X ( 0) =x(O )W04 +x(l )W0 compu te 8-poin t DFf. In general, for 'N' point DFT,
4
log2 N stages are required.
0
+x(2 ) W 4 +x(3 )W0
4 ... (6.2.40)
MordenTimeTech.com
(6-17)
_!
. I 5,g!!,81!p:roce~~ss:m~g~(G!T!.:U~
-~s:e~m~.~7~-!E~C;!E~)----~~---- ~(F~a!!s:!.t~F~ou~n~·e~r~T~ra:;n~s~fo~rm~)~.~P,;a~g,;,e,.n.._
0
...._ _
(GT\.J_New Syllabus w .e.f academic year 21-22) (G7- 14) li1 Tech-Neo Publications ...A SACHIN SHAH Venture
MordenTimeTech.com
Digital Signal Processing (GTU - Sem. 7 - ECE) (Fast Fourier Transform ) ... Page no ... (6-18)
Using FFT N
N- 1 2- I
Complex multiplic ations=
N
2 log 2N = 2
512
log 2512 = 2304
:. L x ( n) W~ = L ~ ( n + ~) w~; ( n +~)
N n-0
Complex additions = N log 2N = 512 log25 I 2 = 4608 n =2
Putting this value in Equation (6.3.2) we get.
Syllabus Topic: Radlx-2 Decimation In Frequency
N N
FFT Algorithm -2- 1 -2- 1
n=2
N
x ( k) = L [x ( n) + ( - 1 l x ( n + ~)] W~ ... (6.3.4)
n=O
Put n = n + ~ ; the limits will change as follows : Here we have to split the sequence in terms of
N N N frequency . So we will split X ( k ) in terms of even
when n = ⇒ =n +2 :. n=0
2 2 numbered and odd numbered OFT coefficien ts. Let X ( 2r )
N represent s even numbere d OFT and X ( 2r + l ) represent
and when n = N - 1 ⇒ N - 1 = n +2 odd numbere d OFT.
N N Thus putting k = 2r in Equation (6.3.4), we will get
n =N-l-
2 =2 -1
even numbere d sequence .
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) ~ Tech-Neo Publications ... A SACHIN SHAH Venture
MordenTimeTech.com
... (6.3.5)
BY putting k = 2r + 1, in Equat ion (6.3.4), we will get
odd nUlllbered sequence. Now let, g ( n ) =x ( n ) + x ( n + ~) ... (6.3.1 5)
N _1
X (2r + l)= n
2
~ J x ( n) + ( - 1) 2r + 1 x ( n + ~)]
and h ( n ) = [ x ( n ) - x ( n + ~)] W~
w<2r+ 1) n
N ... (6.3.6) N 1
Here 'r' is an intege r simila r to k and it varies from o to 2-
N
--1.
x ( 2r ) = I g(n) w;;12 ... (6.3.1 7)
2 n=O
:. ( - 1 )2r ~ 1 ... (6.3.7) N 1
2-
and (- 1) 2r+ 1 = (- 1 )2r (- 1 )1 = - 1 ... (6.3.8)
Putting these value s in Equat ions (6.3.5) and (6.3.6) we get,
and X ( 2r + 1 ) = I h ( n ) w;;
12 ... (6.3.1 8)
n=O
N 1 Note that at this stage we have decim ated the seque nce
2-
of 'N' point DFf into two ~ point DFfs given
X(2r ) = L [x(n )+x( n+~ )]w~ m ... (6.3.9) by
n=O - Equations (6.3.17) and (6.3.18). Let us consi der an exam
ple
N 1 of 8-poin t DFf. That means N = 8. So comb
2- ining
.
Equations (6.3.17) and (6.3.18) that mean s N = 4 we
and X ( 2r + 1 ) = L [ [x ( n ) - x ( n + ~)] wir + l) n 2 can
n=O obtain N (8 point) point DFf. This is first stage
of
... (6.3.10) decimation. Note that Equat ion (6.3.17) indica tes 4 (
~)
Now consid er the term ~rn point DFf of g (n) and Equat ion (6.3.18) indica tes 4 (~)
w~m = (w~) m point DFf of h ( n ). For 8-poi nt DFT Equat ion (6.3.1
5)
becomes,
But we have
g(n) =x(n )+x( n+4 )
... (6.3.1 9)
W~ =WN /2 Here we are computing '4' point DFT. So range of 'n'
W~m = (WN12) m = w;,2 ... (6.3.11) is n = 0 ton= 3. Putting these values in Equat ion (6.3.1
9)
we get,
Now we can write,
\JI.N2r+ l) n _ W2m w..n -Wm • W" For n = 0 ⇒g ( 0 ) = x ( 0 ) + x ( 4 ) }
- N • WN -
... (6.3.12)
N/2 N For n = 1 ⇒ g ( 1 ) = x ( 1 ) + x ( 5 )
. these values
Putting . (6 3 9) and (6.3.10)
in Equations · · For n = 2 ⇒ g ( 2 ) = x ( 2 ) + x ( 6 ) ... (6.3.2 0)
We get,
Fam =3 ⇒ g ( 3 ) =x ( 3 ) + x ( 7 )
N
2- l Similarly for 8 point DFT Equat ion (6.3.1 6) becom es,
X(2r) = L [x(n )+x( n+~ )Jw ;12 ... (6.3.13)
n=O
h ( n) = [ x ( n )- x ( n + 4)] w:, ...
(6.3.2 1)
~ - - - - - - - - - - - - ) - ( G --__ _)_
_ _ _ _1'1~T~e=c~h-~N:e:o~P~u~b~lic:a:ti:on:s~..~.A~S~A~C~H=l~N~
w Syllabus w.e.f academic year 21- 22 7 14 S~H~A~H--V
_ __
entur e
MordenTimeTech.com
Digital Signal Processing (GTU - Sem. 7 - ECE) (Fast Fourier Transform) ... Page no ... (6-20)
u.,ing J~quat,on'> (6. 3.20) and (6.3.22), and
For n =0 ⇒ h(Q);.(x(O) x(4)J w08
J:.qualJon<; (6.3. 17) ond (6.3 18) we can draw the Oow graph
1 ol f m,t stage of dcc1mat1on a$ E.hown in Pig. 6.3. 1.
For n = I ⇒ h ( I ) = l x ( I ) - x ( 5 ) ] W
8
... (6.3.22)
2
For n =2 ⇒ h ( 2 ) = [ x ( 2 ) - x ( 6 ) ] W8
3
For n =3 ⇒ h ( 3 ) =[ x ( 3 ) - x ( 7 ) ] W8
x[4]
g[3]
x(2) X[2]
¾point
x{3) OFT X[6]
x{4) X[1]
~ point
x[5} OFT X[5]
x[6) X[3)
~ point
x[7] OFT X[7)
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) lil Tech-Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
m~.~ 7~-;_:E~C~E~)~======= ;;;;;;;
(Fast Fouri Trans::~~i
er ~~~~
;=~~ ... ~~e1n~o~(~6;;-2~1;J;)
form~P~a
. ~~S~ig~na:I:P;ro~c~ess~in:g:(:G:T~U=-~S;:;:e;:
Oig1tsl
fblrd siage of decimation
(I' Stage 1
x[O) X[O]
xr1 1-~ ..._ .--- -~- 1
v/'8 X[4)
X[1]
x[4] ~➔~➔E--~:...::,
vi. X[5]
x[5] ~-'7 '--7 '4~~ ....,: .,
X(3]
x(6) 6--- -;,,. .__ --~- ~ WO
x[7) <S--------....._, 8 X[7)
FFT
Fig. 6.3.3 : Total flow graph for 8-po int DIF-
ble. Now we will use a
secon d stage of decim ation we have used 2-po int DFT. So further decim ation is not possi
In the flow graph for 8 poin t
rfly is same as shown in Fig. 6.2.9. Thus the total
butterfly structure to obtai n 2-po int DFT. This butte is in the oppo site direc tion.
show n in Fig. 6.3.3 . This flow graph is similar to the flow graph of DIF- FFT but it
DlF---F Ff is N = log2 8 = 3 stage s.
t is shuffled. Similar to DIT- FFT there are log2
Note that here inpu t x ( n ) is in sequ ence but outpu
requirement is same as that of DIT- FFT.
Toe computational comp lexit y and the mem ory
I -1 ____ _ ,I
I, ____ ____ ____
X(4)
X(1)
W8 o:-t:--
h(2) : :
o--4 o:;: ---- --+l ir--- 1 X(2)
t1-1 ;:\..- -+-: :0-~ --~~ -~+> --=- I
X(2) :.,__ __;: ..,... ..--¥ ---r-
I I
I I
21
W h(3) :
-_:::;. __ _ _ _--+-f
:\..-... ....:... ..::a;_ ;+L-- -~:--- i~+-} --=8- i1r--O :____ ____ __ -1 ____ _ I
X(3) 1,-_. ;¥,-- ,¥--- r:;.- tl'1 ___ :
....L.--~-----+-l+
I
•~_..,,i.L--~---~;.:..!:..+:::o.-r---::x:::-~+-}-.::.h(7):
X(3)
I I
X(6) .,!: 21
W5
...;..'-~ ~- --- .= r.t ~~1 X(7)
X(7) ll~ ~-- ---_ ,;,~ .:JL -~~ -'-- ---= ~+ !}-. :::. 1 : -1
1:____ ____ ____ ____ _ _! I
I
-1
I
•-- -- --- -- ---- ---- --- Seco nd stage of decim ation Third stage of decim ation -
stage of decim ation
First
Fig. Ex. 6.3.1
X ( 5) = [ h ( 4 )- h ( 5 )] W~
g(5) =[x(l)-x(5) ]W8l
= [( 0.5 - j 0.5) + j 0.707] · 1
= [½-o]co.101- jo.101)
= 0.5 + j 0.207
= 0.3535 - j 0.3535 X(6) = [h(2)-h(3)]W ~ =0
g ( 6) = [x (2) - x (6)] w~ ]<- j ) = - j 0.5
= [ ½- o X(7) =[h(6)-h(7) ]W~
= ( 0.5 - 0.5 )( - j) = 0 3
n=3 ⇒ X (3) = COS ( ;) = 0
h ( 4 ) = g ( 4 ) + g ( 6 ) = 0.5 - j 0.5
X( n ) = { 1,0, - 1, 0.}
h(5) =g(5)+g(7) The flow graph of 4-point DIFFT is shown in
= 0.3535 - j 0.3535 - 0.3535 - j 0.3535 Fig. Ex. 6.3 .2
(GTU-New Syllabus w.e.f academic year 21-22) (G7-14) ~ Tech-Neo Publications...A SACHIN SHAH Venture
MordenTimeTech.com
. ;tal Signal Processing (GTU - Sern. 7 • ECE)
o,g o
(Fast Fourier Transform ) · · · Pag
e no (6-23)
W4 =1
~ere, . . .
But there are certain appllcal10ns
· which selected
in .
-j27t - J7t
number of DFf values are required; but not the entICe
\'/4-
I -e-r- = e-2-= cos (21tJ-j sin (1t)- 0 .
2 - -J=-J
.
DFf. In such cases the direct computation of DFf is
more efficient than FFT algorithms. The direct
o&Stput of First stage computation of OFT for selected values can be re a1··
ized
S0 = X<) + X (2) = 1- 1=0 using linear filtering approach.
SJ = X (1) + X (3) = Q + Q = Q This type of computation can be performed using the
Sz = X (Q) - X (2) = 1 + l =2 algorithm, called as Goertzel algorithm.
_ili)-kN
= (e N = e+ j 21tk
= cos 2nk + j sin 2nk = 1 + j O = 1
-kN
Since WN = 1 we can multiply Equation (6.4.1) by
-kN
WN
N-1
X (k) = '°'
~ x (m) W N
km
·
-kN
WN
Fig. Ex. 6.3.2 m=0
N-1
Syllabus Topic : Goertzel Algorithm :. X(k) = '°'
~ x(m)WN
-k(N- m)
... (6.4.2)
m=0
MordenTimeTech.com
Digital Signal Processing (GTU - Sem. 7 - ECE)
(Fast Fourier Transform) ... Page no {6-24)
Put this value in Equation (6.4.3). Here u (n - m) is unit Equations (6.4.2) and (6.4.7) are identical. Thus we
step. So beca use can
of mul tiplication by u (n - m) the limi ts of conclude that DFf , X (k) can be obtained as outp
summation will become m = 0 to m ut of LTI
=00 •
syst em at n = N. (yk (n)). But in this case, we will get
N-1
X (k) only at one value of K. So we need to
use parallel
:. Yk ( n ) = L x (m) WN
-k( n- m)
... (6.4.6) syst
.,...
ems to obtain X (k) at different values of K.
m= O
-~~: :·Note__: Goertzel Algorithm is efficient when X (k)
Now we will calculate Yk ( n) at n = N. ,; "''. .:~ • ".~ is to
N
,, be computed at ~?ints less than log .
N-1 2
~ -k( N- m)
· Yk ( n) I = L..J x (m) WN ... (6.4.7)
n=N m= O
Chapter Ends ...
DOD
MordenTimeTech.com