digital signal processing - wordpress.com...digital signal processing chapter 5 1. frequency...
TRANSCRIPT
Digital Signal Processing
Chapter 5: The Analysis of Signals and Systems in Frequency Domain
Vinh Pham-Xuan
Ho Chi Minh city University of Technology
Department of Telecommunications
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
- If not overlapping:
๐ ๐ ๐ = ๐ ๐ where โ๐๐
2โค ๐ โค
๐๐
2.
- If overlapping:
๐ ๐ ๐ = ๐ ๐ + ๐ ๐ + ๐๐ + ๐ ๐ โ ๐๐ + โฏ where โ๐๐
2โค ๐ โค
๐๐
2.
In terms of the time samples ๐ฅ ๐๐ , the original sampled spectrum ๐ ๐are given by:
๐ ๐ =
๐=โโ
โ
๐ฅ ๐๐ ๐โ2๐๐๐๐๐
2
sampler and quantizer
analog lowpass filter
๐ฅ๐๐ ๐กanalog signal
๐ฅ ๐กbandlimited
signal
๐ฅ ๐๐sampled
signal
๐ ๐ ๐ ๐
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
However, in practice only a finite number of samples are retained, say๐ฅ ๐๐ , 0 โค ๐ โค ๐ฟ โ 1.
The duration of the data record to be:๐๐ฟ = ๐ฟ๐
What is the difference between the frequency spectrum of the infinitesignal and the truncated signal?
3
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
The spectrum of time-windowed signal ๐๐ฟ ๐ are given by:
๐๐ฟ ๐ =
๐=0
๐ฟ
๐ฅ ๐๐ ๐โ2๐๐๐๐๐
๐ ๐ =
๐=โโ
โ
๐ฅ ๐๐ ๐โ2๐๐๐๐๐
๐๐ฟ ๐ =
๐=0
๐ฟ
๐ฅ ๐๐ ๐โ2๐๐๐๐๐
๐๐ฟ ๐ is an approximation of ๐ ๐ . The accuracy increases with thenumber of samples retained.
4
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
We can express ๐๐ฟ ๐ as follows:
๐๐ฟ ๐ =
๐=โโ
โ
๐ฅ๐ฟ ๐ ๐โ2๐๐๐๐๐
where๐ฅ๐ฟ ๐ = ๐ฅ ๐ ๐ค ๐
where
๐ค ๐ = 1, if 0 โค ๐ โค ๐ฟ โ 10, otherwise
Therefore, the discrete-time Fourier transform of the windowed signal is:
๐๐ฟ ๐ =
๐=โโ
โ
๐ฅ๐ฟ ๐ ๐โ๐๐๐
5
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
Using the property that the Fourier transform of the product of two timefunctions is the convolution of their Fourier transforms, we obtain thefrequency-domain version of ๐ฅ๐ฟ ๐ = ๐ฅ ๐ ๐ค ๐ .
๐๐ฟ ๐ =
โ๐
๐
๐ ๐โฒ ๐ ๐ โ ๐โฒ ๐๐2๐
where ๐ ๐ is the DTFT of the rectangular window ๐ค ๐ , that is
๐ ๐ =
๐=0
๐ฟโ1
๐ค ๐ ๐โ๐๐๐
6
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
It can be thought of as the evaluation of the z-transform on the unit circleat ๐ง = ๐๐๐. Setting ๐ค ๐ = 1 in the sum, we find:
๐ ๐ง =
๐=0
๐ฟโ1
๐ค ๐ ๐งโ๐ =1 โ ๐งโ๐ฟ
1 โ ๐งโ1
Setting ๐ง = ๐๐๐, we find for ๐ ๐ :
๐ ๐ =1 โ ๐โ๐๐ฟ๐
1 โ ๐โ๐๐=
sin ๐๐ฟ/2
sin ๐/2๐โ๐๐ ๐ฟโ1 /2
7
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
The magnitude spectrum ๐ ๐ is
It consists of a mainlobe of height ๐ฟ and base width 4๐/๐ฟ centered at ๐ =0, and several smaller sidelobes.
8
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
Consider the case of a single analog complex sinusoid of frequency ๐1 andits sample version:
๐ฅ ๐ก = ๐2๐๐๐1๐ก, โโ โค ๐ก โค โ
๐ฅ ๐ = ๐2๐๐๐1๐๐ = ๐๐๐1๐, โโ โค ๐ โค โ
๐ฅ๐ฟ ๐ = ๐2๐๐๐1๐๐ = ๐๐๐1๐, 0 โค ๐ โค ๐ฟ โ 1
Fourier transform of the cosine (continuous function):๐ฅ ๐ก = ๐2๐๐๐1๐ก โ ๐ฟ ๐ โ ๐1
Assuming that ๐1 lies within the Nyquist interval:
๐ ๐ = ๐ ๐ =1
๐๐ ๐ =
1
๐๐ฟ ๐ โ ๐1
We can express the spectrum in terms of the digital frequency as follows:
๐ ๐ = 2๐๐ฟ ๐ โ ๐1 =1
๐2๐๐๐ฟ 2๐๐๐ โ 2๐๐๐1 =
1
๐๐ฟ ๐ โ ๐1
9
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
The spectrum of the truncated signal:
๐๐ฟ ๐ =
โ๐
๐
๐ ๐โฒ ๐ ๐ โ ๐โฒ๐๐
2๐=
โ๐
๐
2๐๐ฟ ๐ โ ๐1 ๐ ๐ โ ๐โฒ๐๐
2๐
๐๐ฟ ๐ = ๐ ๐ โ ๐1
10
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
When ๐ฅ ๐ก is a linear combination of two complex sinusoids, withfrequency ๐1 and ๐2 and amplitudes ๐ด1 and ๐ด2
11
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
Two sharp spectral lines are replaced by their smeared versions.
The frequency separation โ๐ = ๐1 โ ๐2 of the two sinusoids to be largeenough so the main lobes are distinct and do not overlap.
12
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
However, if โ๐ is decreased, the main lobes will begin merging with eachother and will not appear as distinct. This will start to happen when โ๐ isapproximately equal to the mainlobe width โ๐๐ค
13
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
The resolvability condition that the two sinusoids appear as two distinctones is that their frequency separation โ๐ be greater than the mainlobewidth: โ๐ โฅ โ๐๐ค = ๐๐
๐ฟ
14
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
a. Mathematical approach
The windowing process has two major effects:
- Reducing the frequency resolution of the computed spectrum, in thesense that the smallest resolvable frequency difference is limited by thelength of the data record, that is, โ๐ = 1 ๐๐ฟ .
- Introducing spurious high-frequency components into the spectrum,which are caused by the sharp clipping of the signal ๐ฅ ๐ at the left andright ends of the rectangular window. This effect is referred to asโfrequency leakageโ.
15
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
b. Windowing
Requirement: suppressing the sidelobes as much as possible becausethey may be confused with the main lobes of weaker sinusoids that mightbe present.
16
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
b. Windowing
The standard technique for suppressing the sidelobes is to use a non-rectangular window โ a window that cuts off to zero less sharply andmore gradually than the rectangular one.
โข Hamming window:
๐ค ๐ = 0.54 โ 0.46 cos 2๐๐
๐ฟโ1, if 0 โค ๐ โค ๐ฟ โ 1
0, otherwise
Because of the gradual transition to zero, the high frequencies that areintroduced by the windowing process are deemphasized. (The sidelobes are stillpresent, but are barely visible because they are suppressed relative to the mainlobeby 40dB).
The main tradeoff in using any type of non-rectangular window is that its mainlobebecomes wider and shorter, thus reducing the frequency resolution capability ofthe windowed spectrum.
17
Digital signal processing Chapter 5
1. Frequency Resolution and Windowing
b. Windowing
โข Hamming window:
๐ค ๐ = 0.54 โ 0.46 cos 2๐๐
๐ฟโ1, if 0 โค ๐ โค ๐ฟ โ 1
0, otherwise
For any type of window, the effective width of the mainlobe is still inverselyproportional to the window length:
โ๐๐ค = ๐๐๐ ๐ฟ
= ๐1
๐๐ฟ
where the constant c depends on the window used and is always ๐ โฅ 1.
18
Digital signal processing Chapter 5
2. DTFT Computation
a. Discrete-time Fourier Transform (DTFT)
The Fourier transform of the finite-energy discrete-time signal ๐ฅ ๐ isdefined as:
๐ ๐ =
๐=โโ
โ
๐ฅ ๐ ๐โ๐๐๐
where ๐ = 2๐๐ ๐๐
The spectrum ๐ ๐ is in general a complex-valued function of frequency:
๐ ๐ = ๐ ๐ ๐๐๐ ๐
where ๐ ๐ = arg ๐ ๐ with โ๐ โค ๐ ๐ โค ๐
๐ ๐ : is the magnitude spectrum
๐ ๐ : is the phase spectrum
19
Digital signal processing Chapter 5
2. DTFT Computation
a. Discrete-time Fourier Transform (DTFT)
๐ ๐ is periodic with a period of 2๐
๐ ๐ + 2๐๐ =
๐=โโ
โ
๐ฅ ๐ ๐โ๐ ๐+2๐๐ ๐ =
๐=โโ
โ
๐ฅ ๐ ๐โ๐๐๐ = ๐ ๐
The frequency range for discrete-time signal is unique over the frequencyinterval โ๐, ๐ or equivalently 0,2๐ .
Remarks: Spectrum of discrete-time signals is continuous and periodic.
20
Digital signal processing Chapter 5
2. DTFT Computation
b. Inverse discrete-time Fourier transform (IDTFT)
Given the frequency spectrum ๐ ๐ , we can find the ๐ฅ ๐ in time-domainas:
๐ฅ ๐ =1
2๐ โ๐
๐
๐ ๐ ๐๐๐๐๐๐
which is known as inverse discrete-time Fourier transform (IDFT).
21
Digital signal processing Chapter 5
2. DTFT Computation
c. Properties of DTFT
Symmetry: if the signal ๐ฅ ๐ is real, it easily follows that: ๐ ๐ = ๐ โ๐
or equivalently: ๐ โ๐ = ๐ ๐ (even symmetry)
arg ๐ โ๐ = โarg ๐ ๐ (odd symmetry)
We conclude that the frequency range of real discrete-time signalscan be limited further to the range 0 โค ๐ โค ๐ or 0 โค ๐ โค ๐๐ 2.
Energy density of spectrum: the energy relation between ๐ฅ ๐ and ๐ ๐is given by Parsevalโs relation
๐ธ๐ฅ =
๐=โโ
โ
๐ฅ ๐ 2 =1
2๐ โ๐
๐
๐ ๐ 2๐๐
๐๐ฅ๐ฅ ๐ = ๐ ๐ 2 is called the energy density spectrum of ๐ฅ ๐ .
22
Digital signal processing Chapter 5
2. DTFT Computation
c. Properties of DTFT
The relationship of DTFT and z-transform: if ๐ ๐ง converges for ๐ง = 1,then
๐ ๐ง๐ง=๐๐๐
=
๐=โโ
โ
๐ฅ ๐ ๐โ๐๐๐ = ๐ ๐
Linearity:
if ๐ฅ1 ๐ ๐น
๐1 ๐
๐ฅ2 ๐ ๐น
๐2 ๐
then ๐ฅ1 ๐ + ๐ฅ2 ๐ ๐น
๐1 ๐ + ๐2 ๐
Time-shifting:
if ๐ฅ ๐ ๐น
๐ ๐
then ๐ฅ ๐ โ ๐ ๐น
๐ ๐ ๐โ๐๐๐
23
Digital signal processing Chapter 5
2. DTFT Computation
c. Properties of DTFT
Time reversal:
if ๐ฅ ๐ ๐น
๐ ๐
then ๐ฅ โ๐ ๐น
๐ โ๐
Convolution theory:
if ๐ฅ1 ๐ ๐น
๐1 ๐
๐ฅ2 ๐ ๐น
๐2 ๐
then ๐ฅ1 ๐ โ ๐ฅ2 ๐ ๐น
๐1 ๐ ๐2 ๐
24
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
โข ๐ ๐ is a continuous function of frequency and therefore, it is not acomputationally convenient representation of the sequence ๐ฅ ๐ .
โข DFT will present ๐ฅ ๐ in a frequency-domain by samples of its spectrum๐ ๐ .
โข A finite-duration sequence ๐ฅ ๐ of length ๐ฟ has a Fourier transform:
๐ ๐ =
๐=0
๐ฟโ1
๐ฅ ๐ ๐โ๐๐๐
where 0 โค ๐ โค 2๐.
Sampling ๐ ๐ at equally spaced frequency ๐๐ = 2๐๐๐, ๐ = 0,1, โฆ , ๐ โ
1 where ๐ โฅ ๐ฟ, we obtain N-point DFT of length L-signal:
๐ ๐ = ๐2๐๐
๐=
๐=0
๐ฟโ1
๐ฅ ๐ ๐โ๐2๐๐๐
๐
โข DFT presents the discrete-frequency samples of spectra of discrete-timesignals.
25
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
In principles, the two lengths L and N can be specified independently ofeach other:
โข ๐ฟ is the number of time samples in the data record and can even beinfinite.
โข ๐ is the number of frequencies at which we choose to evaluate the DFT.
Most discussions of the DFT assume that ๐ณ = ๐ต.
โข If ๐ฟ < ๐, we can pad ๐ โ ๐ฟ zeros at the end of the data record the makeit of length ๐.
โข If ๐ฟ > ๐, we may reduce the data record to length ๐ by wrapping itmodulo-N.
26
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
a. Zero padding
Padding any number of zeros at the end of a signal has no effect on it DFT.For example, padding ๐ท zeros will result into a length of (๐ฟ + ๐ท) signal:
๐ฅ = ๐ฅ0, ๐ฅ1, ๐ฅ2, โฆ , ๐ฅ๐ฟโ1
๐ฅ๐ท = ๐ฅ0, ๐ฅ1, ๐ฅ2, โฆ , ๐ฅ๐ฟโ1, 0,0, โฆ , 0
Because ๐ฅ๐ท ๐ = ๐ฅ ๐ for 0 โค ๐ โค ๐ฟ โ 1 and ๐ฅ๐ท ๐ = 0 for ๐ฟ โค ๐ โค ๐ฟ +๐ท โ 1, the corresponding DTFTs will remain the same:
๐๐ท ๐ =
๐=0
๐ฟ+๐ทโ1
๐ฅ๐ท ๐ ๐โ๐๐๐ =
๐=0
๐ฟโ1
๐ฅ๐ท ๐ ๐โ๐๐๐ +
๐=๐ฟ
๐ฟ+๐ทโ1
๐ฅ๐ท ๐ ๐โ๐๐๐
=
๐=0
๐ฟโ1
๐ฅ ๐ ๐โ๐๐๐ = ๐ ๐
27
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
a. Zero padding
โข With the assumption ๐ฅ ๐ = 0 for ๐ โฅ ๐ฟ, we can write the DFT asfollows:
๐ ๐ =
๐=0
๐โ1
๐ฅ ๐ ๐โ๐2๐๐๐/๐ ; ๐ = 0,1, โฆ , ๐ โ 1
โข The sequence ๐ฅ ๐ can recover from the frequency samples by inverseDFT (IDFT)
๐ฅ ๐ =1
๐
๐=0
๐โ1
๐ ๐ ๐๐2๐๐๐/๐ ; ๐ = 0,1, โฆ , ๐ โ 1
28
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
b. Matrix form of DFT
โข By defining an ๐๐กโ root of unity ๐๐ = ๐โ๐2๐/๐, we can write DFT andIDFT as follows:
๐ ๐ =
๐=0
๐โ1
๐ฅ ๐ ๐๐๐๐ ; ๐ = 0,1, โฆ , ๐ โ 1
๐ฅ ๐ =1
๐
๐=0
๐โ1
๐ ๐ ๐๐โ๐๐ ; ๐ = 0,1, โฆ , ๐ โ 1
29
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
b. Matrix form of DFT
โข Let us define:
๐ฑ๐ =
๐ฅ 0๐ฅ 1
โฎ๐ฅ ๐ โ 1
and ๐๐ =
๐ 0๐ 1
โฎ๐ ๐ โ 1
The N-point DFT can be expressed in matrix form as: ๐๐ = ๐พ๐๐ฑ๐ where
๐๐ =
1 1 1 โฏ 11 ๐๐ ๐๐
2 โฏ ๐๐๐โ1
1 ๐๐2 ๐๐
4 โฏ ๐๐2 ๐โ1
โฎ โฎ โฎ โฑ โฎ
1 ๐๐๐โ1 ๐๐
2 ๐โ1โฏ ๐๐
๐โ1 ๐โ1
30
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
c. Modulo-N reduction
The modulo-N reduction or wrapping of a signal is defined by
โข dividing the signal ๐ฑ into contiguous non-overlapping blocks of length ๐
โข wrapping the blocks around to be time-aligned with the first block
โข adding them up
31
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
c. Modulo-N reduction
Ex: Determine the mod-4 and mod-3 reductions of the length-8 signalvector
๐ฑ = [1,2, โ2,3,4, โ2, โ1,1]
32
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
c. Modulo-N reduction
We may express the sub-block components in terms of the time samples ofthe signal ๐ฅ ๐ as follows:
๐ฅ๐ ๐ = ๐ฅ ๐๐ + ๐ , ๐ = 0,1, โฆ , ๐ โ 1
The wrapped vector ๐ฑ will be in this notation: ๐ฅ ๐ = ๐ฅ0 ๐ + ๐ฅ1 ๐ + ๐ฅ2 ๐ + ๐ฅ3 ๐ + โฏ
= ๐ฅ ๐ + ๐ฅ ๐ + ๐ + ๐ฅ 2๐ + ๐ + ๐ฅ 3๐ + ๐ + โฏ
or, more compactly,
๐ฅ ๐ =
๐=0
โ
๐ฅ ๐๐ + ๐
๐ = 0,1, โฆ , ๐ โ 1
33
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
c. Modulo-N reduction
The connection of the mod-N reduction to the DFT is the theorem that thelength-N wrapped signal ๐ฑ has the same N-point DFT as the originalunwrapped signal ๐ฑ.
We define the DFT matrices ๐ and ๐ as follows: ๐ = ๐ ๐ฑ๐ = ๐๐ฑ
The size of ๐จ is ๐ ร ๐.
The size of ๐ is ๐ ร ๐ฟ.
In matrix form, it follows from the property that the ๐ ร ๐ submatrices ofthe full ๐ ร ๐ฟ DFT matrix ๐ are all equal to the DFT matrix ๐.
34
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
c. Modulo-N reduction
These submatrices are formed by grouping the first N columns of A into thefirst submatrix, the next N columns into the second submatrix, and so on.The matrix elements of the mth submatrix will be:
๐ด๐,๐๐+๐ = ๐๐๐(๐๐+๐)
= ๐๐๐๐๐๐๐
๐๐
Using the property ๐๐๐ = 1, it follows that ๐๐
๐๐๐ = 1, and therefore:
๐ด๐,๐๐+๐ = ๐๐๐๐ = ๐ด๐๐ = ๐ด๐๐
Thus, in general, ๐ is partitioned in the form:
๐ = ๐, ๐, ๐, โฆ
35
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
c. Modulo-N reduction
36
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
d. Properties of DFT
37
Properties Time-domain Frequency domain
Notation ๐ฅ ๐ ๐ ๐
Periodicity ๐ฅ ๐ + ๐ = ๐ฅ ๐ ๐ ๐ = ๐ ๐ + ๐
Linearity ๐1๐ฅ1 ๐ + ๐2๐ฅ2 ๐ ๐1๐1 ๐ + ๐2๐2 ๐
Circular time-shift ๐ฅ ๐ โ ๐๐
๐โ๐2๐๐๐/๐๐ ๐
Circular convolution ๐ฅ1 ๐ โ ๐ฅ2 ๐ ๐1 ๐ ๐2 ๐
Multiplication of two sequences
๐ฅ1 ๐ ๐ฅ2 ๐1
๐๐1 ๐ โ ๐2 ๐
Parvesalโs theorem ๐ธ๐ฅ =
๐=0
๐
๐ฅ ๐ 2 =1
๐
๐=0
๐โ1
๐ ๐ 2
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
e. Circular shift
The circular shift of the sequence can be represented as the index moduloN:
๐ฅโฒ ๐ = ๐ฅ ๐ โ ๐, modulo N โก ๐ฅ ๐ โ ๐๐
38
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
e. Circular convolution
The circular convolution of two sequences of length N is defined as:๐ฅ3 ๐ = ๐ฅ1 ๐ โ ๐ฅ2 ๐
๐ฅ3 ๐ =
๐=0
๐โ1
๐ฅ1 ๐ ๐ฅ2 ๐ โ ๐๐
๐ = 0,1, โฆ , ๐ โ 1
Ex: perform the circular convolution of the following two sequences๐ฅ1 ๐ = 2,1,2,1๐ฅ2 ๐ = 1,2,3,4
It can be shown from the below figure:
39
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
e. Circular convolution
40
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
e. Circular convolution
41
Digital signal processing Chapter 5
3. Discrete Fourier transform (DFT)
f. Use of the DFT in linear filtering
Suppose that we have a finite duration sequence ๐ฅ = ๐ฅ0, ๐ฅ1, ๐ฅ2, โฆ , ๐ฅ๐ฟโ1
which excites the FIR filter of order M.
The sequence output is of length ๐ฟ๐ฆ = ๐ฟ + ๐ samples.
If ๐ โฅ ๐ฟ + ๐, N-point DFT is sufficient to present ๐ฆ ๐ in the frequencydomain, i.e,
Computation of the N-point IDFT must yield ๐ฆ ๐ .
Thus, with zero padding, the DFT can be used to perform linear filtering.
42
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
โข N-point DFT of the sequence of data ๐ฅ ๐ of length N is given byfollowing formula:
๐ ๐ =
๐=0
๐โ1
๐ฅ ๐ ๐๐๐๐ , ๐ = 0,1,2, โฆ , ๐ โ 1
where ๐๐ = ๐โ๐2๐/๐
โข In general, the data sequence ๐ฅ ๐ is also assumed to be complexvalued. The calculation of all N values of DFT requires ๐2 complexmultiplication and ๐ ๐ โ 1 complex additions.
โข FFT exploits to symmetry and periodicity properties of the phase factor๐๐ to reduce to computational complexity:
- Symmetry: ๐๐๐+๐/2
= โ๐๐๐
- Periodicity: ๐๐๐+๐ = ๐๐
๐
43
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
โข Based on decimation, leads to a factorization of computations.
โข Let us first look at the classical radix 2 decimation in time.
โข First we split the computation between old and even samples:
๐ ๐ =
๐=0
๐2
โ1
๐ฅ 2๐ ๐๐๐2๐ +
๐=0
๐2
โ1
๐ฅ 2๐ + 1 ๐๐๐ 2๐+1
โข Using the following property: ๐๐2 = ๐๐/2
โข The N-point DFT can be rewritten:
๐ ๐ =
๐=0
๐2โ1
๐ฅ 2๐ ๐๐/2๐๐ + ๐๐
๐
๐=0
๐2โ1
๐ฅ 2๐ + 1 ๐๐/2๐๐
for ๐ = 0,1, โฆ , ๐ โ 1
44
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
โข Using the property that:
๐๐๐+๐/2
= โ๐๐๐
โข The entire DFT can be computed with only ๐ = 0,1, โฆ ,๐
2โ 1.
๐ ๐ =
๐=0
๐2
โ1
๐ฅ 2๐ ๐๐/2๐๐ + ๐๐
๐
๐=0
๐2
โ1
๐ฅ 2๐ + 1 ๐๐/2๐๐
๐ ๐ +๐
2=
๐=0
๐2โ1
๐ฅ 2๐ ๐๐/2๐๐ โ ๐๐
๐
๐=0
๐2โ1
๐ฅ 2๐ + 1 ๐๐/2๐๐
45
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
a. Butterfly
โข This leads to basic building block of the FFT, the butterfly:
46
DFT N/2
DFT N/2
x(0)
x(2)
x(N-2)
x(1)
x(3)
x(N-1)
X(0)
X(1)
X(N/2-1)
X(N/2)
X(N/2+1)
X(N-1)
WN0
WN1
WNN/2-1
-
-
-
We need:โขN/2(N/2-1) complex โ+โ for each N/2 DFT.โข(N/2)2 complex โรโ for each DFT.โขN/2 complex โรโ at the input of the butterflies.โขN complex โ+โ for the butter-flies.โขGrand total:N2/2 complex โ+โN/2(N/2+1) complex โรโ
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
b. Recursion
โข If ๐/2 is even, we can further split the computation of each DFT of size๐/2 into two computations of half size DFT. When ๐ = 2๐ this can bedone until DFT of size 2 (i.e. butterfly with two elements).
47
x(0)
x(4)
x(2)
x(6)
x(1)
x(5)
x(3)
x(7)
X(0)
X(1)
X(2)
X(3)
X(4)
X(5)
X(6)
X(7)
W80
W81
W82
W83
-
-
-
--
-
-
-
-
-
-
-
W80
W80
W82
W82
W80
W80
W80
W80
W80=1
1st stage2nd stage3rd stage
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
c. Shuffling the data, bit reverse ordering
โข At each step of the algorithm, data are split between even and oddvalues. This results in scrambling the order.
48
Digital signal processing Chapter 5
4. Fast Fourier Transform (FFT)
c. Number of operations
โข If ๐ = 2๐ , we have ๐ = log2 ๐ stages. For each one we have:
- ๐2 complex โxโ (some of them are by โ1โ).
- N complex โ+โ.
โข Thus the grand total of operations is:
- ๐2 log2 ๐ complex โxโ.
- ๐ log2 ๐ complex โ+โ.
โข Ex: Calculate 4-point DFT of ๐ฅ = 1,3,2,3 ?
49