cwliu@twins.ee.nctu.edu.tw
Sampled frequency
cwliu@twins.ee.nctu.edu.tw
Continuous Aperiodic
Continuous Aperiodic
cwliu@twins.ee.nctu.edu.tw
Periodic Continuous
cwliu@twins.ee.nctu.edu.tw
Discrete Aperiodic
4
Discrete Aperiodic
cwliu@twins.ee.nctu.edu.tw
Continuous Periodic
5
DFT is identical to samples of Fourier transforms In DSP applications, we are able to store only a finite number of samples we are able to compute the spectrum only at specific discrete values of
cwliu@twins.ee.nctu.edu.tw 6
1 x[n] = N
kn X [ k ] W n = 0,1, K , N 1, N , k =0 j 2 kn N
N 1
kn where WN =e
DFT/IDFT can be implemented by using the same hardware It requires N2 complex multiplications and N(N-1) complex additions
cwliu@twins.ee.nctu.edu.tw 7
cwliu@twins.ee.nctu.edu.tw
Periodic Sequence
Consider a periodic sequence x [n] of period N The sequence can be represented by Fourier series 1 ~ ~ x [n] = X [k ]e j (2 / N )kn N k The Fourier series for any discrete-time signal with period N requires only N harmonically related complex exponentials.
N 1
cwliu@twins.ee.nctu.edu.tw
10
Synthesis equation
Analysis equation
Physical Significance
Let One period
Then
cwliu@twins.ee.nctu.edu.tw 12
~ j X[k] vs X (e )
Example
cwliu@twins.ee.nctu.edu.tw
13
unit circle
cwliu@twins.ee.nctu.edu.tw
14
~ x [n] vs x[n]
Aliasing Problem 1
x[n] is infinite-length sequence
~ x [ n]
cwliu@twins.ee.nctu.edu.tw
16
Aliasing Problem 2
If x[n] is finite-length sequence, 0nM-1 Consider the case N<M
~ x [ n]
~ x [n] x[n]
cwliu@twins.ee.nctu.edu.tw 17
Concluding Remarks
The case NM
~ x [ n]
or
cwliu@twins.ee.nctu.edu.tw 18
Property of DFT
Linearity
if of length N1 of length N2 then of length N3=max[N1 , N2]
cwliu@twins.ee.nctu.edu.tw
19
x[n]
~ x [ n]
~ x [ n 2]
~ x [ n 2] R N [ n ]
cwliu@twins.ee.nctu.edu.tw
x[n]
~ x [ n]
~ x [n + 13]
~ x [n + 13]R15 [n]
cwliu@twins.ee.nctu.edu.tw
Property of DFT
Circular Shift
if then of length N
m
that is On the other hand
0 n N-1 0 l N-1
cwliu@twins.ee.nctu.edu.tw 22
Symmetry
8.6.4
cwliu@twins.ee.nctu.edu.tw
23
cwliu@twins.ee.nctu.edu.tw
24
Review of Convolution
x L-point sequence h N-point sequence s (L+N-1)-point sequence
Linear convolution
yi = xi hi = hi xi , i = 0,1, K, L + N 2
s0 h0 0 s = h h x0 0 1 1 x 1 s 0 h cwliu@twins.ee.nctu.edu.tw 1 2
NL multiplications
Linear Convolution
Linear Shift
cwliu@twins.ee.nctu.edu.tw
26
cwliu@twins.ee.nctu.edu.tw
28
Periodic/Circular Convolution
Circular Shift
cwliu@twins.ee.nctu.edu.tw
29
cwliu@twins.ee.nctu.edu.tw
30
cwliu@twins.ee.nctu.edu.tw
31
Example
Step 2
Step 1
Step 3
cwliu@twins.ee.nctu.edu.tw
32
cwliu@twins.ee.nctu.edu.tw
33
cwliu@twins.ee.nctu.edu.tw
35
Linear Convolution
cwliu@twins.ee.nctu.edu.tw
36
Time aliasing in the circular convolution of two finite-length sequence can be avoided if N L+P-1
cwliu@twins.ee.nctu.edu.tw 37
Concluding Remarks
The convolution of two finite-length sequences can be interpreted by circular convolution with large enough length Circular convolution can be implemented by DFT/FFT
For an FIR system, the input sequence is of indefinite duration To store the entire input signal requires ? Block convolution
cwliu@twins.ee.nctu.edu.tw 38
Block Convolution
Step1: To segment a sequence into sections of length L Step2: Each section is convolved with the finite-length impulse response of length P by using DFT/FFT of length N=L+P-1 Step3: The filtered sections are fitted together in an appropriate way Overlap-add method Overlap-save method
cwliu@twins.ee.nctu.edu.tw 39
Overlap-Add Method
h[n] x h y x[n]
Step1
Zero padding
Time shift
cwliu@twins.ee.nctu.edu.tw
41
Overlap-Save Method
Suppose L > P. Consider an L-point circular convolution of a P-point impulse response h[n] with an L-point input sequence xr[n]
Due to aliasing problem, the first (P-1)-point of the result is incorrect the remaining points [P, L-1] are identical to those that would be obtained by linear convolution
Step1: To segment a sequence into sections of length L such that each section overlaps the preceding section by (P-1) points Step2: Each section is convolved with the finite-length impulse response of length P by using DFT/FFT of length L Step3: The first (P-1)-point of each filtered sequence must be discarded. The remaining samples from successive sections are then abutted to construct the final output.
cwliu@twins.ee.nctu.edu.tw
42
Step1
cwliu@twins.ee.nctu.edu.tw
43
cwliu@twins.ee.nctu.edu.tw
44
Pick N, a power of 2, such that NN1+N2-1 Zero-pad x1 and x2 to length N Compute N-point FFTs of zero-padded x1 and x2, one obtains X1 and X2 Multiply X1 and X2 Apply the IFFT to obtain the convolution sum of x1 and x2 Computation complexity: 2(N/2) log2N + N + (N/2)log2N
cwliu@twins.ee.nctu.edu.tw 45
Example
A sequence x[n] of length 1024 FIR filter h[n] of length 34 Direct computation: 341024=34816 Using radix-2 FFT: 35840 (N=2048) Using overlap-add radix-2 FFT:
x[n] is segmented into a set of contiguous blocks of equal length 95 Apply radix-2 FFT of length 128 Each segment requires 1472 multiplications This algorithm requires total 16192 multiplications
cwliu@twins.ee.nctu.edu.tw
46