数字信号处理第5章
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Chapter 5 The Fast Fourier Transform
Understanding DSP, Second Edition
1
Outline
5.1 Relationship of the FFT to the DFT 5.2 Derivation of the Radix-2 FFT Algorithm 5.3 FFT Input/Output Data Index Bit Reversal 5.4 Radix-2 FFT Butterfly Structures
kn , 0 k N 1 X (k ) x(n)WN n 0 N 1
(2) Computation Amount
Complex multiplications:
Complex additions:
N N N2
( N 1) N
Understanding DSP, Second Edition
Eq 5-16
N m 0, 1, ... 1 4
B(m N / 4) or
B(m N / 4)
ቤተ መጻሕፍቲ ባይዱ
( N / 4 ) 1 n 0
nm ( m N / 4) x ( 4 n 1 ) W W N /4 N /2
m 0, 1, ... N 1
Eq 5-3
Understanding DSP, Second Edition
9
A straightforward derivation of the FFT proceeds with the separation of the input data sequence x(n) into two parts. When x(n) is segmented into its even and odd indexed elements, we can, then, break Eq. (5-3) into two parts as
Eq 5-7
Understanding DSP, Second Edition
12
It looks like we’re complicating things, right? Well, just hang in there for a moment. We can now simplify the phase angle terms inside the summations because
This capability to subdivide an N/2-point DFT into two N/4-point DFTs gives the FFT its capacity to greatly reduce the number of necessary multiplications to implement DFTs. Following the same steps we used to obtained A(m), we can show that Eq.(5-13)’s B(m) is
Understanding DSP, Second Edition
7
Figure 5-1-1 Number of complex multiplications in the DFT and the radix-2 FFT as a function of N.
Understanding DSP, Second Edition
5.5 Discrete Convolution using FFT
Understanding DSP, Second Edition
2
5.1 Relationship of the FFT to the DFT
Understanding DSP, Second Edition
3
The radix-2 FFT eliminates the redundancies and greatly reduces the number of necessary arithmetic operations. To appreciate the FFT’s efficiency, let’s consider the number of complex multiplications necessary for our old friend, the expression for an N-point DFT
A( m)
N m 0, 1, ... 1 2
B ( m)
Understanding DSP, Second Edition
We can go further and think about breaking the two 4-point DFTs into four 2-point DFTs. Let’s see how we can subdivide the upper 4-point DFT in Figure 4–2 whose four outputs are A(m) in Eqs. (5-12) and (5-13). We segment the inputs to the upper 4-point DFT into their odd and even component
17
If we simplify Eqs. (5-10) and (5-11) to the form
N m 0, 1, ... 1 2
and
Eq 5-12
Eq 5-13
Understanding DSP, Second Edition
18
•
The basic butterfly unit is shown in the following Figure
13
Now, let’s repeat Eqs. (5-6) and (5-9) to see the similarity;
N m 0, 1, ... 1 2
and
Eq 5-10
Eq 5-11
or X (m N / 2)
( N / 2 ) 1 n 0
x(2n)W
nm N /2
Eq 5-1
For an 8-point DFT, Eq. (5–1) tells us that we’d have to perform N2 or 64 complex multiplications.
Understanding DSP, Second Edition
4
Direct Computations (1) The N - point DFT
As we'll verify in later sections of this chapter, the number of complex multiplications, for an N-point FFT, is approximately:
Eq 5-2
Understanding DSP, Second Edition
Eq 5-14 Eq 5-15
Because , we can express A(m) in the form of two N/4-point DFTs, as
N m 0, 1, ... 1 4
Understanding DSP, Second Edition
20
A(m)
( N / 4 ) 1 n 0
W
( m N / 2) N
( N / 2 ) 1 n 0
nm x ( 2 n 1 ) W N /2
14
Understanding DSP, Second Edition
So here we are. We need not perform any sine or cosine multiplications to get X(m+N/2). We just change the sign of the twiddle factor WmN and use the results of the two summations from X(m) to get X(m+N/2). Of course, m goes from 0 to (N/2)–1 in Eq. (5-10) which means, for an N-point DFT, we perform an N/2-point DFT to get the first N/2 outputs and use those to get the last N/2 outputs. For N = 8, Eqs. (5-10) and (5-11) are implemented as shown in Figure 5-2-1.
nm m x ( 4 n ) W W N /4 N /2
( N / 4 ) 1 n 0
nm x ( 4 n 2 ) W N /4
x(4n)W
nm N /4
W
( m N / 4) N /2
( N / 4 ) 1 n 0
nm x ( 4 n 2 ) W N /4
Understanding DSP, Second Edition
nm m x ( 4 n ) W W N /4 N /2
( N / 4 ) 1 n 0
nm x ( 4 n 2 ) W N /4
N m 0,..., 1 4 A(m N / 4)
or A(m N / 4)
( N / 4 ) 1 n 0
( N / 4 ) 1 n 0
8
5.2 Derivation of the Radix-2 FFT Algorithm
(decimation-in-time)
To see just exactly how the FFT evolved from the DFT, we return to the equation for an N-point DFT:
Eq 5-4
Understanding DSP, Second Edition
10
Pulling the constant phase angle outside the second summation:
Eq 5-4
Eq 5-5
Understanding DSP, Second Edition
11
N m 0, 1, ... 1 2
Eq 5-6
There's a further benefit in breaking the N-point DFT into two parts because the upper half of the DFT output is easy to calculate. Consider the X(m+N/2).
Eq 5-8
for any integer n. Looking at the so-called twiddle factor in front of the second summation in Eq. (5-7), we can simplify it as
Eq 5-9
Understanding DSP, Second Edition
Understanding DSP, Second Edition
15
Understanding DSP, Second Edition
Figure 5-2-1 FFT implementation of an 8-point DFT using two 4-point DFTs.
Understanding DSP, Second Edition
6
For example:
When N = 512, the DFT requires 200 times more complex multiplications than those needed by the FFT. When N = 8192, the DFT must calculate 1000 complex multiplications for each complex multiplication in the FFT!
Understanding DSP, Second Edition
1
Outline
5.1 Relationship of the FFT to the DFT 5.2 Derivation of the Radix-2 FFT Algorithm 5.3 FFT Input/Output Data Index Bit Reversal 5.4 Radix-2 FFT Butterfly Structures
kn , 0 k N 1 X (k ) x(n)WN n 0 N 1
(2) Computation Amount
Complex multiplications:
Complex additions:
N N N2
( N 1) N
Understanding DSP, Second Edition
Eq 5-16
N m 0, 1, ... 1 4
B(m N / 4) or
B(m N / 4)
ቤተ መጻሕፍቲ ባይዱ
( N / 4 ) 1 n 0
nm ( m N / 4) x ( 4 n 1 ) W W N /4 N /2
m 0, 1, ... N 1
Eq 5-3
Understanding DSP, Second Edition
9
A straightforward derivation of the FFT proceeds with the separation of the input data sequence x(n) into two parts. When x(n) is segmented into its even and odd indexed elements, we can, then, break Eq. (5-3) into two parts as
Eq 5-7
Understanding DSP, Second Edition
12
It looks like we’re complicating things, right? Well, just hang in there for a moment. We can now simplify the phase angle terms inside the summations because
This capability to subdivide an N/2-point DFT into two N/4-point DFTs gives the FFT its capacity to greatly reduce the number of necessary multiplications to implement DFTs. Following the same steps we used to obtained A(m), we can show that Eq.(5-13)’s B(m) is
Understanding DSP, Second Edition
7
Figure 5-1-1 Number of complex multiplications in the DFT and the radix-2 FFT as a function of N.
Understanding DSP, Second Edition
5.5 Discrete Convolution using FFT
Understanding DSP, Second Edition
2
5.1 Relationship of the FFT to the DFT
Understanding DSP, Second Edition
3
The radix-2 FFT eliminates the redundancies and greatly reduces the number of necessary arithmetic operations. To appreciate the FFT’s efficiency, let’s consider the number of complex multiplications necessary for our old friend, the expression for an N-point DFT
A( m)
N m 0, 1, ... 1 2
B ( m)
Understanding DSP, Second Edition
We can go further and think about breaking the two 4-point DFTs into four 2-point DFTs. Let’s see how we can subdivide the upper 4-point DFT in Figure 4–2 whose four outputs are A(m) in Eqs. (5-12) and (5-13). We segment the inputs to the upper 4-point DFT into their odd and even component
17
If we simplify Eqs. (5-10) and (5-11) to the form
N m 0, 1, ... 1 2
and
Eq 5-12
Eq 5-13
Understanding DSP, Second Edition
18
•
The basic butterfly unit is shown in the following Figure
13
Now, let’s repeat Eqs. (5-6) and (5-9) to see the similarity;
N m 0, 1, ... 1 2
and
Eq 5-10
Eq 5-11
or X (m N / 2)
( N / 2 ) 1 n 0
x(2n)W
nm N /2
Eq 5-1
For an 8-point DFT, Eq. (5–1) tells us that we’d have to perform N2 or 64 complex multiplications.
Understanding DSP, Second Edition
4
Direct Computations (1) The N - point DFT
As we'll verify in later sections of this chapter, the number of complex multiplications, for an N-point FFT, is approximately:
Eq 5-2
Understanding DSP, Second Edition
Eq 5-14 Eq 5-15
Because , we can express A(m) in the form of two N/4-point DFTs, as
N m 0, 1, ... 1 4
Understanding DSP, Second Edition
20
A(m)
( N / 4 ) 1 n 0
W
( m N / 2) N
( N / 2 ) 1 n 0
nm x ( 2 n 1 ) W N /2
14
Understanding DSP, Second Edition
So here we are. We need not perform any sine or cosine multiplications to get X(m+N/2). We just change the sign of the twiddle factor WmN and use the results of the two summations from X(m) to get X(m+N/2). Of course, m goes from 0 to (N/2)–1 in Eq. (5-10) which means, for an N-point DFT, we perform an N/2-point DFT to get the first N/2 outputs and use those to get the last N/2 outputs. For N = 8, Eqs. (5-10) and (5-11) are implemented as shown in Figure 5-2-1.
nm m x ( 4 n ) W W N /4 N /2
( N / 4 ) 1 n 0
nm x ( 4 n 2 ) W N /4
x(4n)W
nm N /4
W
( m N / 4) N /2
( N / 4 ) 1 n 0
nm x ( 4 n 2 ) W N /4
Understanding DSP, Second Edition
nm m x ( 4 n ) W W N /4 N /2
( N / 4 ) 1 n 0
nm x ( 4 n 2 ) W N /4
N m 0,..., 1 4 A(m N / 4)
or A(m N / 4)
( N / 4 ) 1 n 0
( N / 4 ) 1 n 0
8
5.2 Derivation of the Radix-2 FFT Algorithm
(decimation-in-time)
To see just exactly how the FFT evolved from the DFT, we return to the equation for an N-point DFT:
Eq 5-4
Understanding DSP, Second Edition
10
Pulling the constant phase angle outside the second summation:
Eq 5-4
Eq 5-5
Understanding DSP, Second Edition
11
N m 0, 1, ... 1 2
Eq 5-6
There's a further benefit in breaking the N-point DFT into two parts because the upper half of the DFT output is easy to calculate. Consider the X(m+N/2).
Eq 5-8
for any integer n. Looking at the so-called twiddle factor in front of the second summation in Eq. (5-7), we can simplify it as
Eq 5-9
Understanding DSP, Second Edition
Understanding DSP, Second Edition
15
Understanding DSP, Second Edition
Figure 5-2-1 FFT implementation of an 8-point DFT using two 4-point DFTs.
Understanding DSP, Second Edition
6
For example:
When N = 512, the DFT requires 200 times more complex multiplications than those needed by the FFT. When N = 8192, the DFT must calculate 1000 complex multiplications for each complex multiplication in the FFT!