DSP Dr. Dung Trung Vo 1 DSPChapter 8Dr. Dung Trung Vo Digital Signal Processing DFTFFT Algorithms Dr. Dung Trung Vo Telecommunication Divisions Department of Electrical and Electronics November, 2013 DSPChapter 8Dr. Dung Trung Vo DFTFFT Algorithms Applications: The discrete Fourier transform (DFT) and its fast implementation, the fast Fourier transform (FFT), have three major uses in DSP: (a) the numerical computation of the frequency spectrum of a signal; (b) the efficient implementation of convolution by the FFT; and (c) the coding of waveforms, such as speech or pictures, for efficient transmission and storage. The discrete cosine transform, which is a variant of the DFT, is especially useful for coding applications. CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 2 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Spectrum computation of an analog signal digitally: a finiteduration record of the signal is sampled and the resulting samples are transformed to the frequency domain by a DFT or FFT algorithm. Sampling rate fs: must be fast enough to minimize aliasing effects. If necessary, an analog antialiasing prefilter may precede the sampling operation. Spectrum of the sampled signal: is the replication of the desired analog spectrum at multiples of the sampling rate fs, as given by the Poisson summation formula. Without aliasing: nonoverlapping of the spectral replicas With aliasing: replicas overlap DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Digital spectrum approximation: estimate X(f) from Approximation requirement: satisfy one of following conditions With aliasing: extra terms remain small over the Nyquist interval. Without aliasing. Approximation limitation: cant have infinitive samples. Even though is the closest approximation to X(f) that we can achieve by DSP, it is still not computable because generally it requires an infinite number of samples x(nT), −∞ < n < ∞. Second approximation: to make it computable, we must make a second approximation to X(f), keeping only a finite number of samples, say, x(nT), 0 ≤ n ≤ L − 1: timewindowing process. CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 3 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Time windowing: DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Spectrum calculation: original sampled spectrum and its timewindowed version are given by Duration of the data record: Windowing technique: The windowed signal may be thought of as an infinite signal which is zero outside the range of the window and agrees with the original one within the window. To express this mathematically CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 4 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Windowed signal: Spectrum calculation on windowed signal: where DTFT of the windowed signal xL(n): XL(ω) is the DTFT of the windowed signal x L(n) and is computable for any desired value of ω As the length L of the data window increases, the windowed signal xL(n) becomes a better approximation of x(n), and thus, XL(ω) a better approximation of X(ω). DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Two major effects of windowing process: Frequency resolution reduction: the smallest resolvable frequency difference is limited by the length of the data record, that is, Δf = 1TL. This is the wellknown “uncertainty principle.” Spurious high frequency introduction: components into the spectrum, which are caused by the sharp clipping of the signal x(n) at the left and right ends of the rectangular window. This effect is referred to as “frequency leakage.” Both effects can be understood by deriving the precise connection of the windowed spectrum XL(ω) to the unwindowed one X(ω) CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 5 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Product of two time functions: Convolution of their Fourier transforms: DTFT W(ω) of the rectangular window w(n) DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing ztransform of the window: use Frequency response and z transform relation Spectrum of the window: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 6 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Magnitude spectrum: consists of a mainlobe of height L and base width 4πL centered at ω = 0, and several smaller sidelobes As L increases, the height of the mainlobe increases and its width becomes narrower, getting more concentrated around DC. However, the height of the sidelobes also increases, but relative to the mainlobe height, it remains approximately the same and about 13 dB down. DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing First sidelobe: occurs approximately halfway between the two zeros 2πL and 4πL, that is, at ω = 3πL Relative heights: between mainlobe and first sidelope. Relative sidelobe level in decibels: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 7 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Sidelobes: are between the zeros ofW(ω), which are the zeros of the numerator sin(ωL2)= 0, that is, ω = 2πkL, for k = ±1,±2, . . . (with k = 0 excluded). Mainlobe: peak at DC dominates the spectrum, because w(n) is essentially a DC signal. The higher frequency components that have “leaked” away from DC and lie under the sidelobes represent the sharp transitions of w(n) at the endpoints Width of the mainlobe: can be defined in different ways. Simple definition: half the base width In units of radians per sample: In units of Hz: DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Single analog complex sinusoid of frequency f1: Its sampled version: Spectrum of the analog signal x(t): Spectrum of the signal x(n): Assuming that f1 lies within the Nyquist interval, that is, |f1| ≤ fs2 Spectrum in terms of the digital frequency Spectrum of sampled signal CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 8 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Spectrum of sampled signal: is the translation of W(ω) centered about ω1 The windowing process has the effect of smearing the sharp spectral line δ(ω−ω1) at ω1 and replacing it by W(ω−ω1) DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Spectrum of two complex sinusoids: x(t) is a linear combination of two complex sinusoids with frequencies f1 and f2 and (complex) amplitudes A1 and A2 CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 9 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Spectrum of two complex sinusoids: two sharp spectral lines are replaced by their smeared versions DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Resolvability condition: two sinusoids appear as two distinct ones is that their frequency separation Δf be greater than the mainlobe width where in radians per sample Minimum number of samples: required to achieve a desired frequency resolution Δf CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 10 DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Example: A signal consisting of four sinusoids of frequencies of 1, 1.5, 2.5, and 2.75 kHz is sampled at a rate of 10 kHz. What is the minimum number of samples that should be collected for the frequency spectrum to exhibit four distinct peaks at these frequencies? Solution: DSPChapter 8Dr. Dung Trung Vo Frequency Resolution and Windowing Example: A 10millisecond portion of a signal is sampled at a rate of 10 kHz. It is known that the signal consists of two sinusoids of frequencies f1 = 1 kHz and f2 = 2 kHz. It is also known that the signal contains a third component of frequency f3 that lies somewhere between f1 and f2. How close to f1 could f3 be in order for the spectrum of the collected samples to exhibit three distinct peaks? How close to f2 could f3 be? Solution: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 11 DSPChapter 8Dr. Dung Trung Vo DTFT Computation DTFT at a Single Frequency: this section’s attention is to the computational aspects of the DTFT. This expression may be computed at any desired value of ω in the Nyquist interval −π ≤ ω ≤ π Advantage of the periodicity: map the conventional symmetric Nyquist interval −π ≤ ω ≤ π onto the rightsided one 0 ≤ ω ≤ 2π (DFT Nyquist interval) DSPChapter 8Dr. Dung Trung Vo DTFT Computation DTFT at a Single Frequency: can be thought of as the evaluation of the ztransform of the sequence x(n) on the unit circle X(ω) can be computed by evaluating the polynomial X(z) at z = ejω Horner’s rule of synthetic division: to evaluate the ztransform X(z) CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 12 DSPChapter 8Dr. Dung Trung Vo DTFT Computation Example with L = 4: Starting with X = 0 at n = L − 1 = 3, DSPChapter 8Dr. Dung Trung Vo DTFT Computation DTFT routine implementation: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 13 DSPChapter 8Dr. Dung Trung Vo DTFT Computation DTFT over Frequency Range: compute the DTFT over a frequency range, ωa ≤ω N, the data record may be reduced to length N by wrapping it moduloN DSPChapter 8Dr. Dung Trung Vo Physical versus Computational Resolution Physical versus Computational Resolution: if the length L of the signal is not large enough to provide sufficient physical resolution, then there is no point increasing the length N of the DFT Example: The following analog signal consisting of three equalstrength sinusoids of frequencies f1 = 2 kHz, f2 = 2.5 kHz, and f3 = 3 kHz CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 17 DSPChapter 8Dr. Dung Trung Vo Matrix Form of DFT Linear matrix transformation: transform the L dimensional vector of time data into an Ndimensional vector of frequency data where Xk = X(ωk), k = 0, 1, . . . , N − 1. N×L matrix A: Componentwise: DSPChapter 8Dr. Dung Trung Vo Matrix Form of DFT Matrix elements Akn Twiddle factor WN: Notes: First row (k = 0) and first column (n = 0) of A are always unity The matrix A can be built from its second row (k = 1), consisting of the successive powers of WN Exponents in Wkn N can be reduced moduloN CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 18 DSPChapter 8Dr. Dung Trung Vo Matrix Form of DFT Some examples of twiddle factors: 2point DFT matrices: 4point DFT matrices: DSPChapter 8Dr. Dung Trung Vo Matrix Form of DFT 2point DFTs of a length2 signal: 4point DFTs of a length4 signal: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 19 DSPChapter 8Dr. Dung Trung Vo ModuloN Reduction ModuloN reduction or wrapping: is defined by dividing the signal x into contiguous nonoverlapping blocks of length N, wrapping the blocks around to be timealigned with the first block, and adding them up Zero padding: If L is not an integral multiple of N, then the last subblock will have length less than N; in this case, we may pad enough zeros at the end of the last block to increase its length to N DSPChapter 8Dr. Dung Trung Vo ModuloN Reduction Example: determine the mod4 and mod3 reductions of the length8 signal vector: For the N = 4 case: For the N = 3 case: where we padded a zero at the end of the third subblock CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 20 DSPChapter 8Dr. Dung Trung Vo ModuloN Reduction Periodic extension: of the signal x(n) with period N is defined: Connection of the modN reduction to the DFT: the lengthN wrapped signal has the same Npoint DFT as the original unwrapped signal x DSPChapter 8Dr. Dung Trung Vo ModuloN Reduction Example: Compute the 4point DFT of the length8 signal of Example 9.5.1 in two ways: (a) working with the full unwrapped vector x and (b) computing the DFT of its mod4 reduction. Solution: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 21 DSPChapter 8Dr. Dung Trung Vo Inverse DFT Task: recovering the original lengthL signal x from its Npoint DFT X, that is, inverting the relationship Issue: When L > N, the matrix A is not invertible. As we saw, there are in this case several possible solutions x and having the same modN reduction . Among these solutions, the only one that is uniquely obtainable from the knowledge of the DFT vector X is . inverse DFT: corresponding DFT matrix is an N×N square invertible matrix Or componentwise The same DFT can be computed by the DFT matrix acting on the wrapped signal, DSPChapter 8Dr. Dung Trung Vo Inverse DFT Unitarity property of the DFT matrix: Matrix inverse: Inverse DFT: IDFT as a DFT: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 22 DSPChapter 8Dr. Dung Trung Vo Discrete Fourier series (DFS) Discrete Fourier series (DFS): periodic signal x(n) may be represented by the discrete Fourier series (DFS) Fourier series coefficients: DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Complexity: if we compute the two (N2)DFTs directly, at a cost of (N2)2 multiplications each, the total cost of rebuilding the full NDFT will be: This amounts to 50 percent savings over computing the Npoint DFT directly at a cost of N2 if the two (N2)DFTs were computed indirectly by rebuilding each of them from two (N4)DFTs, the total cost for rebuilding an NDFT would be CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 23 DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Complexity (cont.): if we start with (N2m)point DFTs and perform m successive merging steps, the total cost to rebuild the final NDFT will be: The first term, N22m, corresponds to performing the initial (N2m)point DFTs directly. Because there are 2m of them, they will require a total cost of 2m(N2m)2=N22m. If the subdivision process is continued for m = B stages, the final dimension will be N2m = N2B = 1, which requires no computation at all because the 1point DFT of a 1point signal is itself. In this case, the first term will be absent DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Decimationintime radix2 FFT algorithm: By grouping the evenindexed and oddindexed terms Npoint DFT Two length(N2) subsequences: Their (N2)point DFTs: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 24 DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Relation between twiddle factors WN and WN2: Basic merging result: DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Two groups of N2 equations: Twiddle factor property: Butterfly merging equations: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 25 DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Typical FFT algorithm: 1. Shuffling the Ndimensional input into N onedimensional signals. 2. Performing N onepoint DFTs. 3. Merging the N onepoint DFTs into one Npoint DFT. Shuffling process: generates the smaller and smaller signals Merging process: rebuilds the corresponding DFTs CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 26 DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Shuffling process: DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) DFT merging: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 27 DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Bitreversal process: shuffling process may also be understood as a bitreversal process. If n is represented by three bits {b0, b1, b2}, its bitreversed version is obtained by reversing the order of the bits DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Example: Using the FFT algorithm, compute the 8point DFT of the following 8 point signal: Then, compute the inverse FFT of the result to recover the original time sequence Solution: CuuDuongThanCong.com https:fb.comtailieudientucnttDSP Dr. Dung Trung Vo 28 DSPChapter 8Dr. Dung Trung Vo Fast Fourier transform (FFT) Homework: provided in class CuuDuongThanCong.com https:fb.comtailieudientucntt
Trang 1DSP-Chapter 8-Dr Dung Trung Vo
Digital Signal Processing
DFT/FFT Algorithms
Dr Dung Trung Vo Telecommunication Divisions Department of Electrical and Electronics
(a) the numerical computation of the frequency spectrum of a signal;
(b) the efficient implementation of convolution by the FFT; and (c) the coding of waveforms, such as speech or pictures, for efficient transmission and storage
The discrete cosine transform, which is a variant of the DFT, is especially useful for coding applications
Trang 2DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Spectrum computation of an analog signal digitally: a finite-duration record
of the signal is sampled and the resulting samples are transformed to the frequency domain by a DFT or FFT algorithm
Sampling rate f s : must be fast enough to minimize aliasing effects If necessary,
an analog antialiasing prefilter may precede the sampling operation
Spectrum of the sampled signal: is the replication of the desired analog spectrum at multiples of the sampling rate fs, as given by the Poisson summation formula
Without aliasing: non-overlapping of the spectral replicas
With aliasing: replicas overlap
Frequency Resolution and Windowing
Digital spectrum approximation: estimate X(f) from
Approximation requirement: satisfy one of following conditions
With aliasing: extra terms remain small over the Nyquist interval
Without aliasing
Approximation limitation: cant have infinitive samples Even though is the closest approximation to X(f) that we can achieve by DSP, it is still not computable because generally it requires an infinite number of samples x(nT), −∞
< n < ∞
Second approximation: to make it computable, we must make a second approximation to X(f), keeping only a finite number of samples, say, x(nT),
0 ≤ n ≤ L − 1: time-windowing process
Trang 3DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Time windowing:
DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Spectrum calculation: original sampled spectrum and its time-windowed version are given by
Duration of the data record:
Windowing technique: The windowed signal may be thought of as an infinite signal which is zero outside the range of the window and agrees with the original one within the window To express this mathematically
Trang 4DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Windowed signal:
Spectrum calculation on windowed signal:
where
DTFT of the windowed signal x L (n): XL(ω) is the DTFT of the windowed signal
xL(n) and is computable for any desired value of ω
As the length L of the data window increases, the windowed signal xL(n) becomes a better approximation of x(n), and thus, XL(ω) a better approximation of X(ω)
Frequency Resolution and Windowing
Two major effects of windowing process:
Frequency resolution reduction: the smallest resolvable frequency difference is limited by the length of the data record, that is, Δf = 1/TL This is the well-known “uncertainty principle.”
Spurious high frequency introduction: components into the spectrum, which are caused by the sharp clipping of the signal x(n) at the left and right ends of the rectangular window This effect is referred to as “frequency leakage.”
Both effects can be understood by deriving the precise connection of the windowed spectrum XL(ω) to the unwindowed one X(ω)
Trang 5DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Product of two time functions:
Convolution of their Fourier transforms:
DTFT W(ω) of the rectangular window w(n)
DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
z-transform of the window: use
Frequency response and z transform relation
Spectrum of the window:
Trang 6DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Magnitude spectrum: consists of a mainlobe of height L and base width 4π/L centered at ω = 0, and several smaller sidelobes
As L increases, the height of the mainlobe increases and its width becomes narrower, getting more concentrated around DC However, the height of the sidelobes also increases, but relative to the mainlobe height, it remains approximately the same and about 13 dB down
Frequency Resolution and Windowing
First sidelobe: occurs approximately halfway between the two zeros 2π/L and 4π/L, that is, at ω = 3π/L
Relative heights: between mainlobe and first sidelope
Relative sidelobe level in decibels:
Trang 7DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Sidelobes: are between the zeros ofW(ω), which are the zeros of the numerator sin(ωL/2)= 0, that is, ω = 2πk/L, for k = ±1,±2, (with k = 0 excluded)
Mainlobe: peak at DC dominates the spectrum, because w(n) is essentially a DC signal
The higher frequency components that have “leaked” away from DC and lie under the sidelobes represent the sharp transitions of w(n) at the endpoints
Width of the mainlobe: can be defined in different ways Simple definition: half the base width
In units of radians per sample:
In units of Hz:
DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Single analog complex sinusoid of frequency f 1 :
Its sampled version:
Spectrum of the analog signal x(t):
Spectrum of the signal x(n): Assuming that f1 lies within the Nyquist interval, that is, |f1| ≤ fs/2
Spectrum in terms of the digital frequency
Spectrum of sampled signal
Trang 8DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Spectrum of sampled signal: is the translation of W(ω) centered about ω1
The windowing process has the effect of smearing the sharp spectral line δ(ω−ω1)
at ω1 and replacing it by W(ω−ω1)
Frequency Resolution and Windowing
Spectrum of two complex sinusoids: x(t) is a linear combination of two complex sinusoids with frequencies f1 and f2 and (complex) amplitudes A1 and A2
Trang 9DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Spectrum of two complex sinusoids: two sharp spectral lines are replaced by their smeared versions
DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Resolvability condition: two sinusoids appear as two distinct ones is that their frequency separation Δf be greater than the mainlobe width
where
in radians per sample
Minimum number of samples: required to achieve a desired frequency resolution Δf
Trang 10DSP-Chapter 8-Dr Dung Trung Vo
Frequency Resolution and Windowing
Example: A signal consisting of four sinusoids of frequencies of 1, 1.5, 2.5, and 2.75 kHz is sampled at a rate of 10 kHz What is the minimum number of samples that should be collected for the frequency spectrum to exhibit four distinct peaks at these frequencies?
Solution:
Frequency Resolution and Windowing
Example: A 10-millisecond portion of a signal is sampled at a rate of 10 kHz It is known that the signal consists of two sinusoids of frequencies f1 = 1 kHz and f2 = 2 kHz It is also known that the signal contains a third component of frequency f3 that lies somewhere between f1 and f2 How close to f1 could f3 be in order for the spectrum of the collected samples to exhibit three distinct peaks? How close to f2 could f3 be?
Solution:
Trang 11DSP-Chapter 8-Dr Dung Trung Vo
z-X(ω) can be computed by evaluating the polynomial X(z) at z = ejω
Horner’s rule of synthetic division: to evaluate the z-transform X(z)
Trang 12DSP-Chapter 8-Dr Dung Trung Vo
DTFT Computation
Example with L = 4: Starting with X = 0 at n = L − 1 = 3,
DTFT Computation
DTFT routine implementation:
Trang 13DSP-Chapter 8-Dr Dung Trung Vo
DTFT Computation
DTFT over Frequency Range: compute the DTFT over a frequency range, ωa
≤ω<ωb, at N frequencies that are equally spaced over this interval
Bin width:
Routine: returns the N-dimensional complex-valued array X[k]= X(ωk)
DSP-Chapter 8-Dr Dung Trung Vo
DTFT Computation
DTFT Function:
Trang 14DSP-Chapter 8-Dr Dung Trung Vo
Routine: The N-dimensional complex DFT array X[k]= X(ωk), k = 0, 1, , N −
1 can be computed by calling the routine dtft over the frequency range [ωa, ωb)=
[0, 2π)
Trang 15DSP-Chapter 8-Dr Dung Trung Vo
Trang 16DSP-Chapter 8-Dr Dung Trung Vo
DTFT Computation
Sample length: two lengths L and N can be specified independently of each other
L is the number of time samples in the data record and can even be infinite;
N is the number of frequencies at which we choose to evaluate the DTFT Most discussions of the DFT assume that L = N
Zero Padding:If L < N, we can pad N−L zeros at the end of the data record to make it of length N Padding any number of zeros at the end of a signal has no effect on its DTFT
Wrapping:If L > N, the data record may be reduced to length N by wrapping it modulo-N
Physical versus Computational Resolution
Physical versus Computational Resolution: if the length L of the signal is not large enough to provide sufficient physical resolution, then there is no point increasing the length N of the DFT
Example:The following analog signal consisting of three equal-strength sinusoids
of frequencies f1 = 2 kHz, f2 = 2.5 kHz, and f3 = 3 kHz
Trang 17DSP-Chapter 8-Dr Dung Trung Vo
First row (k = 0) and first column (n = 0) of A are always unity
The matrix A can be built from its second row (k = 1), consisting of the successive powers of WN
Exponents in Wkn N can be reduced modulo-N
Trang 18DSP-Chapter 8-Dr Dung Trung Vo
2-point DFTs of a length-2 signal:
4-point DFTs of a length-4 signal:
Trang 19DSP-Chapter 8-Dr Dung Trung Vo
Modulo-N Reduction
Modulo-N reduction or wrapping: is defined by dividing the signal x into contiguous non-overlapping blocks of length N, wrapping the blocks around to be time-aligned with the first block, and adding them up
Zero padding: If L is not an integral multiple of N, then the last sub-block will have length less than N; in this case, we may pad enough zeros at the end of the last block to increase its length to N
DSP-Chapter 8-Dr Dung Trung Vo
Modulo-N Reduction
Example: determine the mod-4 and mod-3 reductions of the length-8 signal vector:
For the N = 4 case:
For the N = 3 case:
where we padded a zero at the end of the third sub-block
Trang 20DSP-Chapter 8-Dr Dung Trung Vo
Modulo-N Reduction
Periodic extension: of the signal x(n) with period N is defined:
Connection of the mod-N reduction to the DFT: the length-N wrapped signal has the same N-point DFT as the original unwrapped signal x
Trang 21DSP-Chapter 8-Dr Dung Trung Vo
inverse DFT: corresponding DFT matrix is an N×N square invertible matrix
Or component-wise
The same DFT can be computed by the DFT matrix acting on the wrapped signal,
DSP-Chapter 8-Dr Dung Trung Vo
Trang 22DSP-Chapter 8-Dr Dung Trung Vo
Discrete Fourier series (DFS)
Discrete Fourier series (DFS): periodic signal x(n) may be represented by the discrete Fourier series (DFS)
Fourier series coefficients:
Fast Fourier transform (FFT)
Complexity: if we compute the two (N/2)-DFTs directly, at a cost of (N/2)2 multiplications each, the total cost of rebuilding the full N-DFT will be:
This amounts to 50 percent savings over computing the N-point DFT directly at a cost of N2
if the two (N/2)-DFTs were computed indirectly by rebuilding each of them from two (N/4)-DFTs, the total cost for rebuilding an N-DFT would be
Trang 23DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Complexity (cont.): if we start with (N/2m)-point DFTs and perform m successive merging steps, the total cost to rebuild the final N-DFT will be:
The first term, N2/2m, corresponds to performing the initial (N/2m)-point DFTs directly Because there are 2m of them, they will require a total cost of
2m(N/2m)2=N2/2m
If the subdivision process is continued for m = B stages, the final dimension will be N/2m = N/2B = 1, which requires no computation at all because the 1-point DFT of a 1-point signal is itself In this case, the first term will be absent
DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Decimation-in-time radix-2 FFT algorithm: By grouping the even-indexed and odd-indexed terms N-point DFT
Two length-(N/2) subsequences:
Their (N/2)-point DFTs:
Trang 24DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Relation between twiddle factors W N and W N/2 :
Basic merging result:
Fast Fourier transform (FFT)
Two groups of N/2 equations:
Twiddle factor property:
Butterfly merging equations:
Trang 25DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Typical FFT algorithm:
1 Shuffling the N-dimensional input into N one-dimensional signals
2 Performing N one-point DFTs
3 Merging the N one-point DFTs into one N-point DFT
Shuffling process: generates the smaller and smaller signals
Merging process: rebuilds the corresponding DFTs
Trang 26DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Shuffling process:
Fast Fourier transform (FFT)
DFT merging:
Trang 27DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Bit-reversal process: shuffling process may also be understood as a bit-reversal process If n is represented by three bits {b0, b1, b2},
its bit-reversed version is obtained by reversing the order of the bits
DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Example: Using the FFT algorithm, compute the point DFT of the following point signal:
8-Then, compute the inverse FFT of the result to recover the original time sequence
Solution:
Trang 28DSP-Chapter 8-Dr Dung Trung Vo
Fast Fourier transform (FFT)
Homework: provided in class