Download presentation
Presentation is loading. Please wait.
1
UNIT-I DISCRETE FOURIER TRANSFORM
2
Syllabus Discrete Signals and Systems- A Review Introduction to DFT
Properties of DFT Circular Convolution Filtering methods based on DFT FFT Algorithms Decimation in time Algorithms, Decimation in frequency Algorithms Use of FFT in Linear Filtering.
3
Signal Processing Humans are the most advanced signal processors
speech and pattern recognition, speech synthesis,… We encounter many types of signals in various applications Electrical signals: voltage, current, magnetic and electric fields,… Mechanical signals: velocity, force, displacement,… Acoustic signals: sound, vibration,… Other signals: pressure, temperature,… Most real-world signals are analog They are continuous in time and amplitude Convert to voltage or currents using sensors and transducers Analog circuits process these signals using Resistors, Capacitors, Inductors, Amplifiers,… Analog signal processing examples Audio processing in FM radios Video processing in traditional TV sets
4
Limitations of Analog Signal Processing
Accuracy limitations due to Component tolerances Undesired nonlinearities Limited repeatability due to Tolerances Changes in environmental conditions Temperature Vibration Sensitivity to electrical noise Limited dynamic range for voltage and currents Inflexibility to changes Difficulty of implementing certain operations Nonlinear operations Time-varying operations Difficulty of storing information
5
Digital Signal Processing
Represent signals by a sequence of numbers Sampling or analog-to-digital conversions Perform processing on these numbers with a digital processor Digital signal processing Reconstruct analog signal from processed numbers Reconstruction or digital-to-analog conversion digital signal digital signal A/D DSP D/A analog signal analog signal Analog input – analog output Digital recording of music Analog input – digital output Touch tone phone dialing Digital input – analog output Text to speech Digital input – digital output Compression of a file on computer
7
Pros and Cons of Digital Signal Processing
Accuracy can be controlled by choosing word length Repeatable Sensitivity to electrical noise is minimal Dynamic range can be controlled using floating point numbers Flexibility can be achieved with software implementations Non-linear and time-varying operations are easier to implement Digital storage is cheap Digital information can be encrypted for security Price/performance and reduced time-to-market Cons Sampling causes loss of information A/D and D/A requires mixed-signal hardware Limited speed of processors Quantization and round-off errors
8
Discrete Signals and Systems
12
Discrete-Time Signals: Sequences
Discrete-time signals are represented by sequence of numbers The nth number in the sequence is represented with x[n] Often times sequences are obtained by sampling of continuous-time signals In this case x[n] is value of the analog signal at xc(nT) Where T is the sampling period 10 -10 20 40 60 80 100 t (ms) 10 -10 10 20 30 40 50 n (samples)
13
Basic Sequences and Operations
Delaying (Shifting) a sequence y[n] x[n no] Unit sample (impulse) sequence 1.5 1 n 0 1 n 0 0 [n] 0.5 -10 -5 5 10 Unit step sequence 1.5 n 1 u[n] 0 0.5 -10 -5 5 10 Exponential sequences x[n] An 1 0.5 -10 -5 5 10
14
Sinusoidal Sequences A nejon n j A
Important class of sequences xn coson An exponential sequence with complex ejo and A A ej xn An A ej nejon A nejon xn A cos n n j A n sin n o o x[n] is a sum of weighted sinusoids Different from continuous-time, discrete-time sinusoids – Have ambiguity of 2k in frequency coso 2kn coson – Are not necessary periodic with 2/o coson coson oN only if N 2k is an integer o
16
Discrete-Time Systems
Discrete-Time Sequence is a mathematical operation that maps a given input sequence x[n] into an output sequence y[n] T{.} y[n] T{x[n]} x[n] y[n] Example Discrete-Time Systems – Moving (Running) Average y[n] x[n] x[n 1] x[n 2] x[n 3] Maximum y[n] maxx[n], x[n 1], x[n 2] Ideal Delay System y[n] x[n no]
17
Memoryless System y[n] x[n]2 y[n] signx[n] y[n] x[n no]
A system is memoryless if the output y[n] at every value of n depends only on the input x[n] at the same value of n Example Memoryless Systems Square y[n] x[n]2 Sign y[n] signx[n] Counter Example Ideal Delay System y[n] x[n no]
18
Linear Systems T{x1[n] x2[n]} Tx1[n] Tx2[n] and (add
Linear System: A system is linear if and only if T{x1[n] x2[n]} Tx1[n] Tx2[n] and Tax[n] (add Examples – Ideal Delay System y[n] x[n no] x1[n no] x2[n no] ax1[n no] T{x1[n] x2[n]} T{x2[n]} Tx1[n] Tax[n] aTx[n]
19
Time-Invariant Systems
Time-Invariant (shift-invariant) Systems A time shift at the input causes corresponding time-shift at output y[n] T{x[n]} y[n no] Tx[n no ] Example Square Delay the input the output is y Delay the output gives n x[n n ] 2 y[n] x[n]2 1 o x[n no] y n - no 2 Counter Example – Compressor System Delay the input the output is y1n x[Mn no] yn - no xMn no y[n] x[Mn] Delay the output gives
20
Causal System Causality Examples Counter Example
– A system is causal it’s output is a function of only the current and previous samples Examples y[n] x[n] – Backward Difference y[n] x[n 1] x[n] Counter Example – Forward Difference
21
Stable System x[n] x[n] Bx y[n] By y[n] x[n]2
Stability (in the sense of bounded-input bounded-output BIBO) – A system is stable if and only if every bounded input produces a bounded output x[n] Bx y[n] By Example – Square y[n] x[n]2 if input is bounded by x[n] B output is b Counter Example – Log x[n] y[n] log 10 even if input is bounded by x[n] Bx output not bounded for xn 0 y0 log10 xn
22
DFS,DTFT & DFT
23
X ( f ) FTx(t) x(t)e j 2 ftdt
Fourier Transform of continuous time signals X ( f ) FTx(t) x(t)e j 2 ftdt x(t) IFTX ( f ) X ( f )e j 2 ftdf
24
y[n] h[0]x[n] h[1]x[n 1] ... h[N ]x[n N ]
Linear Time Invariant (LTI) Systems and z-Transform x[n] y[n h[n] If the system is LTI we compute the output with the convolution: y[n] h[n]* x[n] h[m]x[n m] m If the impulse response has a finite duration, the system is called FIR (Finite Impulse Response): y[n] h[0]x[n] h[1]x[n 1] ... h[N ]x[n N ]
25
X (z) Zx[n] x[n]zn
Z-Transform X (z) Zx[n] x[n]zn n Facts: X (z) Y (z) Y (z) H ( H (z) Frequency Response of a filter: H ( f ) H (z) j 2f ze
26
Frequency-Domain Properties
Periodicity Periodic Aperiodic Continuous Time Discrete Discrete & Aperiodic Continuous & Aperiodic Continuous-Time Fourier Transform Fourier Series Discrete & Periodic Continuous & Periodic (2) Discrete-Time Fourier Transform and z-Transform DFT Finite Duration Infinite
27
Signal Processing Methods
Periodicity Periodic Aperiodic Continuous Time Discrete Continuous-Time Fourier Transform Fourier Series Discrete-Time Fourier Transform and z-Transform DFS Finite Duration Infinite
28
The Four Fourier Methods
28
29
Relations Among Fourier Methods
29
30
X ( j) x(t)e dt 1 2 x(t) X ( j)e d
The Family of Fourier Transform Aperiodic-Continuous-Fourier Transform X ( j) x(t)e dt jt 1 2 x(t) X ( j)e d jt
31
X ( jk ) 1 x(t)e j T x(t) 2F 2 T
The Family of Fourier Transform Periodic-Continuous-Fourier Series T0 2 X ( jk ) 1 x(t)e j T T 2 x(t) 2F 2 T
32
The Family of Fourier Transform
Periodic-Discrete-DFS (DFT) X (k ) x(n)e N 1 j 2 nk N n0 1 X (k )e k 0 N 1 j 2 nk N x(n) N
33
The Discrete Fourier Transform (DFT)
The DFS provided us a mechanism for numerically computing the discrete-time Fourier transform. But most of the signals in practice are not periodic. They are likely to be of finite length. Theoretically, we can take care of this problem by defining a periodic signal whose primary shape is that of the finite length signal and then using the DFS on this periodic signal. Practically, we define a new transform called the Discrete Fourier Transform, which is the primary period of the DFS. This DFT is the ultimate numerically computable Fourier transform for arbitrary finite length sequences. Introduction
34
The Discrete Fourier Transform (DFT)
Finite-length sequence & periodic sequence x(n) Finite-length sequence that has N samples x~ (n ) periodic sequence with the period of N ~x (n), 0 n N 1 Window operation x(n) 0, elsewhere x(n) ~x (n)R (n) N ~x (n) x(n rN) r Periodic extension ~x (n) x((n)) N
35
X (e j ) x(n)e jn 1 2 X (e j )e jn d x(n)
The Family of Fourier Transform Aperiodic-Discrete-DTFT X (e j ) x(n)e jn n 1 2 x(n) X (e j )e jn d
36
DFT and IDFT
37
IDFT
38
The Discrete Fourier Transform (DFT)
The definition of DFT N 1 X (k ) DFT[x(n)] x(n)W nk N , 0 k N 1 n0 1 N 1 n0 x(n) IDFT[ X (k )] X (k )W nk N , 0 n N 1 N
39
Twiddle factor
40
Relationship of DFT to other transforms
42
Problems on DFT
44
Example of DFT Find X[k] – We know k=1,.., 7; N=8
45
Example of DFT
46
Example of DFT Polar plot for Time shift Property of DFT
47
Example of DFT
48
Example of DFT Summation for X[k] Using the shift property!
49
Example of DFT Summation for X[k] Using the shift property!
50
Example of IDFT Remember:
51
Example of IDFT Remember:
52
Problems on DFT
53
Problems on DFT
56
Properties of DFT
57
Circular shift of a sequence
61
DFT[x((n m)) R DFT[W x(n)] X ((k l)) R (k) The Properties of DFT
Linearity DFT[ax1 (n) bx (n)] N3-point DFT, N3=max(N1,N2) Circular shift of a sequence DFT[x((n m)) R Circular shift in the frequency domain DFT[W nl N x(n)] X ((k l)) R (k) N N
62
N k 0 x(n) X (k) x(n)W x(0) 1 N 1 X (k)
The Properties of DFT The sum of a sequence N 1 x(n) N 1 X (k) x(n)W nk N k 0 n0 n0 k 0 The first sample of sequence x(0) 1 N 1 X (k) N k 0 DFT [x(n)] X (k) DFT [ X (n)] Nx((N k))N RN (k)
63
1 DFT[x1 (n) x2 (n)] X (k) X (k) N N 1 N 1 DFT[x1 (n) N x (n)]
The Properties of DFT Circular convolution N 1 x2 (n) x1 (m)x2 ((n m)) N RN (n) x1 (n)N m0 N 1 x2 (m)x1 ((n m)) N RN (n) x2 (n) N x1 (n) m0 DFT[x1 (n) N x (n)] Multiplication 1 DFT[x1 (n) x2 (n)] X (k) X (k) N N 1 2
64
DFT[x1 (n) x2 (n)] X1 (k) X 2 (k) DFT[x1 (n) x2 (n)] 1
The Properties of DFT Circular convolution N 1 x (n) x (n) x1 (m)x2 ((n m)) R (n) N N N 1 2 m0 N 1 x2 (m)x1 ((n m)) R (n) x (n) x (n) N N N m0 2 1 DFT[x1 (n) x2 (n)] X1 (k) X 2 (k) N Multiplication DFT[x1 (n) x2 (n)] 1 X1 (k)N X 2 (k) N
65
The Properties of DFT rxy (m) x(n) y *((n m))N RN (m)
Circular correlation Linear correlation rxy (m) x(n) y *(n m) x(n m) y *(n) n n Circular correlation rxy (m) x(n) y *((n m))N RN (m) n0 N 1 N 1 x((n m))N y *(n)RN (m) n0
66
then rxy (m) IDFT[Rxy (k )]
The Properties of DFT if Rxy (k ) X (k ) Y (k ) * then rxy (m) IDFT[Rxy (k )] x(n) y *((n m))N RN (m) n0 N 1 x((n m))N y *(n)RN (m) n0 N 1
67
x(n)x* (n) 1 The Properties of DFT Parseval’s theorem 1
k 0 x(n) y (n) * X (k)Y (k) * N n0 x(n) y(n) N 1 x(n)x* (n) 1 n0 let N 1 then
68
The Properties of DFT xep (n) and xo ( ~ ~ x (n) x (n) ~ ~ x
Conjugate symmetry properties of DFT xep (n) and xo ( x~ ( n ) x (( n )) N Let x(n be a N-point sequence 1 2 1 ~ ~ ~ x (n) [x (n) x (n)] [x((n)) x ((N n)) ] e 2 N N 1 ~ ~ ~ x (n) [x (n) x (n)] [x((n)) x ((N n)) ] o 2 N N ~ ~ x (n) x * (n) It can be proved that e e ~ ~ x (n) x * o (n) o
69
R (n) R (n) The Properties of DFT x (n) ~x (n)R (n) 1 x((n))
ep e N Circular conjugate symmetric component 1 x((n)) R (n) x ((N n)) 2 N N N x (n) ~x (n)R (n) op o N 1 Circular conjugate antisymmetric component R (n) x((n)) x ((N n)) 2 N N N
70
The Properties of DFT x (n) x* ((N n)) R xop (n) x(n) x (n)
ep ep xop (n)
71
The Properties of DFT X (k) X * ((N k)) R (k)
X ( and X op (k ) X (k) X (k) X (k) X * ((N k)) R (k) ep ep N N X (k) X * ((N k)) R (k) op op N N
72
The Properties of DFT Re[Xep (k)] Re[Xep ((N k))N RN (k)]
Im[Xep (k)] Im[Xep ((N k))N RN (k)] Re[Xop (k)] Re[Xop ((N k))N RN (k)] Im[Xop (k)] Im[Xop ((N k))N RN (k)]
73
if x(n) x((N n))N RN (n) then X (k) X ((N k))N RN (k)
The Properties of DFT Circular even sequences if x(n) x((N n)) R then X Circular odd sequences if x(n) x((N n))N RN (n) then X (k) X ((N k))N RN (k)
74
Circular convolution in Time domain
77
Circular convolution
83
Circular convolution- Example
84
x1(n)=(1,2,3) and x2(n)=(4,5,6). One sequence is distributed clockwise and the other counterclockwise and the shift of the inner circle is clockwise. 1 1 * * 6 4 + + + + = =28 = =31 * 4 5 * * 5 6 * 3 1st term 2 3 2st term 2 84 + +
85
y(n) x ( ˜ ˜ y(n) ˜ ˜ ˜ x2(k)x (n k) * 6 x1(n)*
We have the same symmetry as before 3rd term 1 * 5 y(n) x ( N 1 ˜ ˜ + + =5+8+18=31 N 1 k 0 y(n) ˜ ˜ ˜ x2(k)x (n k) 1 * 6 4 * 3 2 + 85
86
Cirular convolution-Matrix method
87
Circular convolution property
92
Use of DFT in linear filtering DFT- based filtering always performs circular convolution. But by zero padding adequetly,Circular convoltion can yield the same result. y[n] x[ L1 where n=0.....(L+M-1)-1
93
Linear convolution using DFT
( a ) z e r o p a d d in g x [ n ] a n d h [ n ] to le n g th of N L1 L 2 1
94
LINEAR & CIRCULAR CONVOLUTION
calculate N point circular convolution by linear convolution ( a ) y [ n ] x [ n ] * h [ n ] (b) x[n]( N )h[n] y[n rN ]RN [n] calculate linear convolution by circular convolution r ( a ) z e r o p a d d in g x [ n ] a n d h [ n ] ( b ) x [ n ] h [ n ] (3) calculate linear convolution by DFT ( a ) z e r o p a d d in g x [ n ] a n d h [ n ] ( b ) N po in t s D F T of x [ n ] and h [ n ] (c ) x[n ]( N )h[n ] ID FT { X [k ]H [k ]} x[n ] * h[n ] x[n ]( N )h[n ]
95
Example:Cir.conv
96
Circular conv
97
FAST FOURIER TRANSFORM
98
Xk x[n]e j2 / Nkn
Discrete Fourier Transform The DFT pair was given as N1 Xk x[n]e j2 / Nkn n0 Baseline for computational complexity: x[n] 1 N1 Xkej2 / Nkn N k 0 Each DFT coefficient requires N complex multiplications N-1 complex additions All N DFT coefficients require N2 complex multiplications N(N-1) complex additions Complexity in terms of real operations 4N2 real multiplications 2N(N-1) real additions Most fast methods are based on symmetry properties Conjugate symmetry Periodicity in n and k e j 2 / N k N n e j 2 / N kNe j 2 / N k n e j 2 / N kn e j 2 / N kn e j 2 / N k n N e j 2 / N k N n
99
Properties- Example
100
Decimation-In-Time FFT Algorithms
Makes use of both symmetry and periodicity Consider special case of N an integer power of 2 Separate x[n] into two sequence of length N/2 Even indexed samples in the first sequence Odd indexed samples in the other sequence N 1 N 1 N 1 X k x[n]e j 2 / N kn x[n]e j 2 / N kn x[n]e j 2 / N kn n0 n even n odd Substitute variables n=2r for n even and n=2r+1 for odd 2rk N X k N / 21 N / 21 2r 1k N x[2r]W x[2r 1]W r0 r0 N / 21 N / 21 N / 2 N rk r0 x[2r]W W k x[2r 1]W rk N / 2 r0 Gk W H k k N G[k] and H[k] are the N/2-point DFT’s of each subsequence
101
Decimation In Time 8-point DFT example using decimation-in-time
Two N/2-point DFTs 2(N/2)2 complex multiplications 2(N/2)2 complex additions Combining the DFT outputs N complex multiplications N complex additions Total complexity N2/2+N complex multiplications N2/2+N complex additions More efficient than direct DFT Repeat same process Divide N/2-point DFTs into Two N/4-point DFTs Combine outputs
103
DIT- FFT
106
Decimation In Time Cont’d
After two steps of decimation in time Repeat until we’re left with two-point DFT’s
107
Decimation-In-Time FFT Algorithm
Final flow graph for 8-point decimation in time Complexity: – Nlog2N complex multiplications and additions
108
Butterfly Computation
Flow graph constitutes of butterflies We can implement each butterfly with one multiplication Final complexity for decimation-in-time FFT – (N/2)log2N complex multiplications and additions
109
Decimation-in-time flow graphs require two sets of registers
In-Place Computation Decimation-in-time flow graphs require two sets of registers Input and output for each stage Note the arrangement of the input indices Bit reversed indexing X0 0 x0 X0 000 x000 X0 1 x4 X0 001 x100 X0 2 x2 X0 010 x010 X0 3 x6 X0 011 x110 X0 4 x1 X0 100 x001 X0 5 x5 X0 101 x101 X0 6 x3 X0 110 x011 X0 7 x7 X0 111 x111
110
FFT Implementation Stage 1 Stage 2 Stage 3
Example: 8 point FFT (1)Number of stages: W0 -1 – N = 3 stages W0 -1 (2)Blocks/stage: W0 -1 W2 -1 – Stage 1: Nblocks = 4 W0 -1 – Stage 2: N = 2 blocks W -1 W1 -1 W0 – Stage 3: Nblocks = 1 W0 -1 W2 -1 B’flies/block: Stage 1: Nbtf = 1 Stage 2: Nbtf = 2 Stage 3: Nbtf = 2 W -1 W -1 W -1 2 3 Decimation in time FFT: – Number of stages = log2N Number of blocks/stage = N/2stage Number of butterflies/block = 2stage-1
111
FFT Implementation Start Index Input Index 1 2 4 Twiddle Factor Index
Stage 1 Stage 2 Stage 3 W0 -1 W0 W2 -1 W0 -1 W0 W1 W2 W3 -1 W0 -1 W0 W0 W2 -1 -1 W0 -1 Start Index Input Index 1 2 4 Twiddle Factor Index N/2 = 4 4/2 = 2 2/2 = 1 Indicies Used W0 W2 W1 W3
112
X [k] x[n]W x[n]W X [k] x[2r]W x[2r 1]W
Decimation-in-time FFT algorithm Most conveniently illustrated by considering the special case of N an integer power of 2, i.e, N=2v. Since N is an even integer, we can consider computing X[k] by separating x[n] into two (N/2)-point sequence consisting of the even numbered point in x[n] and the odd-numbered points in x[n]. X [k] x[n]W nk nk x[n]W N N n even n odd or, with the substitution of variable n=2r for n even and n=2r+1 for n odd ( N / 2)1 ( N / 2)1 X [k] x[2r]W 2rk x[2r 1]W (2r 1)k N N r 0 r 0 ( N / 2)1 ( N / 2)1 r 0 N N r 0 x[2r](W ) W k 2 rk x[2r 1](W ) 2 rk N
113
N N W 2 e2 j (2 / N ) e j 2 /( N / 2 X [k] x[2r](W ) W k
Since N That is, WN is the root of the equation W =1 2 N/2 Consequently, ( N / 2)1 ( N / 2)1 N N X [k] x[2r](W ) W k 2 rk x[2r 1](W ) 2 rk N r 0 k 0,1,..., N 1 r 0 G[k ] W k H[k ], N Both G[k] and H[k] can be computed by (N/2)-point DFT, where G[k] is the (N/2)-point DFT of the even numbered points of the original sequence and the second being the (N/2)-point DFT of the odd-numbered point of the original sequence. Although the index ranges over N values, k = 0, 1, …, N-1, each of the sums must be computed only for k between 0 and (N/2)-1, since G[k] and H[k] are each periodic in k with period N/2.
118
Decomposing N-point DFT into two (N/2)-point DFT for the case of N=8
119
We can further decompose the (N/2)-point DFT into two (N/4)-point DFTs
We can further decompose the (N/2)-point DFT into two (N/4)-point DFTs. For example, the upper half of the previous diagram can be decomposed as
120
Hence, the 8-point DFT can be obtained by the following diagram with four 2-point DFTs.
121
Finally, each 2-point DFT can be implemented by the following signal-flow graph, where no multiplications are needed. Flow graph of a 2-point DFT
122
Flow graph of complete decimation-in-time decomposition of an 8-point DFT.
123
The butterfly computation can be simplified as follows:
In each stage of the decimation-in-time FFT algorithm, there are a basic structure called the butterfly computation: X [ p] X [ p] W r X [q] m m1 N m1 X [q] X [ p] W r X [q] m m1 N m1 Flow graph of a basic butterfly computation in FFT. The butterfly computation can be simplified as follows: Simplified butterfly computation.
124
Flow graph of 8-point FFT using the simplified butterfly computation
125
In the above, we have introduced the decimation-in-time
algorithm of FFT. Here, we assume that N is the power of 2. For N=2v, it requires v=log2N stages of computation. The number of complex multiplications and additions required was N+N+…N = Nv = N log2N. When N is not the power of 2, we can apply the same principle that were applied in the power-of-2 case when N is a composite integer. For example, if N=RQ, it is possible to express an N- point DFT as either the sum of R Q-point DFTs or as the sum of Q R-point DFTs. In practice, by zero-padding a sequence into an N-point sequence with N=2v, we can choose the nearest power-of-two FFT algorithm for implementing a DFT. The FFT algorithm of power-of-two is also called the Cooley- Tukey algorithm since it was first proposed by them. For short-length sequence, Goertzel algorithm might be more efficient.
127
Decimation-In-Frequency FFT Algorithm
Final flow graph for 8-point decimation in frequency
128
Split the DFT equation into even and odd frequency indexes
Decimation-In-Frequency FFT Algorithm The DFT equation Xk N1 x[n]W nk N n0 Split the DFT equation into even and odd frequency indexes N 1 N / 21 N 1 X 2r x[n]W n2r x[n]W n2r x[n]W n2r N N N n0 n0 n N / 2 Substitute variables to get N / 21 N / 21 N / 21 X 2r n N / 22r x[n] x[n N / 2]W x[n]W n2r x[n N / 2]W nr N N N / 2 Similarly for odd-numbered frequencies n0 n0 n0 N / 21 X n0 x[n] x[n N / 2]W 2r 1 n2r 1 N / 2
130
Decimation in Frequency algorithm
131
Decimation in Frequency
133
DIF-FFT ALGORITHM
134
DIF-FFT ALGORITHM
137
Example Using decimation-in-time FFT algorithm compute DFT of the sequence {-1 –1 –1 – } Solution: Twiddle factors are
138
Solution and signal flow graph of the example
142
IDFT Using DIF-FFT
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.