Fiite-legth Discrete Trasforms Chapter 5, Sectios 5.2-50 5.0 Dr. Iyad djafar
Outlie The Discrete Fourier Trasform (DFT) Matrix Represetatio of DFT Fiite-legth Sequeces Circular Covolutio DFT Symmetry Properties DFT Theorems 2
The Discrete Fourier Trasform (DFT) I practice, we usually deal with fiite-legth sequeces, x[], 0 - j j I this case, the DTFT is X(e ) x[] e X(e jω ) 0.. 3-2π 0 2π However, X(e jω ) is a periodic ad cotiuous fuctio of ω!! How about processig of digital sigals i frequecy domai? ω
The Discrete Fourier Trasform (DFT) X(e jω ).. 4 0 2π -2π Δω Alteratively, cosider workig with oe period of X(e jω )! Still, we have ifiite poits? Take equally-spaced samples from X(e jω ) over the rage [0, 2π] Accordigly, gy, the spacig betwee the samples is Δω = 2π / Ad the ormalized agular frequecy for each sample is ω = 2π k /, 0 k - ω
The Discrete Fourier Trasform (DFT) Mathematically, j X[k] X(e ) 2 k 2 k j x[] e, 0 k - 0 This is called the -poit Discrete Fourier Trasform (DFT) ote that the DFT Always exists sice it is a fiite sum! Whe computig the DFT, all samples i x[] are used to compute oe sample i X[k] 5
The Discrete Fourier Trasform (DFT) Example 5.: compute the 4-poit DFT for x[] = {2, 0, -2, } 6
The Discrete Fourier Trasform (DFT) Example 5.2: compute the -poit DFT for, = 0 x[] 0, - 7
The Discrete Fourier Trasform (DFT) The iverse -poit Discrete Fourier Trasform (IDFT) is give by 2 k Verificatio! i x[] X[k] e, 0 - j k 0 k 0 2 k j x[] X[k] e, 0-2 km 2 k j j x[] x[m] e e, 0 - k 0 m 0 2 k(m ) j x[] x[m] e, 0 - m 0 k 0 8 x[] x[] Equals 0 whe m ad whe m =
Matrix Represetatio of DFT The DFT is give by 9 2 k j X[k] x[] e, 0 k - 0 Let W -j2π/ = e, so the DFT becomes I matrix form k 0 X[k] x[] W, 0 k - x[0] x[] k 2k 3k ( )k X[k] W W W... W x[2]... x[ ]
k = 0 Matrix Represetatio of DFT I geeral, the DFT ca be writte as = 0 = -... x[0] 2 3 ( ) W W W... W x[] 2 4 6 2( ) X[k] W W W... W x[2]...... 2( ) 3( ) ( )( ) W x[ ] W W... W k = - X[k] = D x where D is called the DFT matrix 0
Matrix Represetatio of DFT For the iverse DFT X[k] = D x D X[k] = D D x where theiverseof D is x[] = D X[k]... W W W... W 2 4 6 D W W W... W... W W W... W 2 3 ( ) 2( ) ( ) 2( ) 3( ) ( )( )
The Discrete Fourier Trasform (DFT) Example 5.3: compute the -poit DFT for x[] = {-2,, 7, 3} usig matrix otatio. 2
The Discrete Fourier Trasform (DFT) ote. The -poit DFT is computed from the DTFT through samplig j X[k] X(e ) 2 k ote 2. The DTFT for a legth- sequece ca be computed from the DFT by takig ifiite samples. This implies that we ca take as may as M samples for the DFT give that M > 3
The Discrete Fourier Trasform (DFT) 4 ote 3. For a fiite legth sequece x[], 0 -, the IDFT is periodic with period. I other words, if y[] = IDFT(X[k]),the y[] x[ m], 0 - m Proof: let x[] be a legth- sequece, 0 -, ady[k] be the -poit DFT of x[], i.e., Y[k] x[l] W l ow, the -poit IDFT of Y[k] M k q[] Y[k] W, 0 k k 0 kl
The Discrete Fourier Trasform (DFT) Proof - cotiued However, M kl k q[] x[l] W W, 0 k k 0 l M k( l) q[] x[l] W, 0 k l k 0 5 So, M k 0 ~ W k( l), l = + m 0, otherwise q[]= y[] x[ m], 0 m
The Discrete Fourier Trasform (DFT) ote 4. To compute the M-poit DFT for a legth- sequece, it is required that M to avoid time-domai aliasig betwee the traslated copies of the origial time-domai sequece. Example 5.4: cosider x[] = {, -,, }, =4.If we compute the 4-poit DFT X[k], the the IDFT, x[] X[k] y[] 6 y[] x[ m], 0 m y[] + x[+8] + x[+4] + x[] + x[-4] + x[-8]
The Discrete Fourier Trasform (DFT).5 Example 5.4: Cotiued. x[+4] 0.5 0-0.5.5 y[] - -.5.5-4 -2 0 2 4 6 8 0.5 x[] 0.5 0 + 0-0.5 - -0.5 -.5.5-4 -2 0 2 4 6 8 - x[-4] 0.5 0 -.5 5-4 -2 0 2 4 6 8-0.5 7 - -.5-4 -2 0 2 4 6 8
The Discrete Fourier Trasform (DFT) Example 5.5: cosider x[] = {, -,, }, = 4. If we compute the 2-poit DFT X[k], [], the the IDFT, x[] X[k] [] y[] y[] x[ m], 0 m y[] + x[+4] + x[+2] + x[] + x[-2] + x[-4] 8
The Discrete Fourier Trasform (DFT).5 Example 5.5: Cotiued. 0.5 x[+2] y[] 0-0.5 - -.5.5-4 -2 0 2 4 6 8 2.5 2.5 0.5 x[] + 0-0.5-0.5 -.5.5-4 -2 0 2 4 6 8 0 x[-2] 0.5 0-0.5 05-2 0 2 4 6-0.5 9 - -.5-4 -2 0 2 4 6 8
20 Operatios o Fiite-Legth Sequeces Give a fiite-legth sequece x[], 0 -,weca defie the circular time-reversal of x[] as y[] x[ ] where <> = r is the modulus operator, i.e. r = modulo How to compute <>? For positive, straight forward! For egative umbers, let r = + k, where k is a iteger, the compute the smallest k such that 0 r - Example 5.6 <-5> 7 =?? r=-5 + k * 7 for k = 3 r=6 <-5> 7 =6
Operatios o Fiite-Legth Sequeces Example 5.7: Determie y[] = x[<-> 5 ]for x[] = [ 2 3 4 5] 5 y[0] =x[<-0> 5 = 3 5] 2 y[] = x[<-> 5 ]=5 y[2] = x[<-2> 5 ] = 4 0 y[3] = x[<-3> 5 ]=3 y[4] =x[<-4> 5 ] = 2 x [ ] 4 5 4 0 2 4 2 x[ ] = x[ - ], - x[], = 0 y [] 3 2 0 0 2 4
22 Operatios o Fiite-Legth Sequeces
Operatios o Fiite-Legth Sequeces Give a fiite-legth sequece x[], 0 -,weca defie the circular time-shift of x[] as For o > 0 x[ - o ] For o <0 y[] x[ - ] o x[ - ], - o o x[ + - ], 0 < o o 23 x[ - o ] x[ + - ], - o x[+ ], 0 o o o
Operatios o Fiite-Legth Sequeces Example 5.8: let x[] = {-, 0,, 2}, determie y[] x[ - 2 ] y[0] = x[<0-2> 4 ] = x[<-2> 4 ] = x[2] = y[] = x[< - 2> 4 ] = x[<-> 4 ] = x[3] = 2 y[2] = x[<2-2> 4 4] = x[<0> 4 4] = x[0] = y[3] = x[<3-2> 4 ] = x[<> 4 ] = x[] = 0 4 2 2 x [ ] 0 y [ ] 0-24 - 0 2 3 4 - - 0 2 3 4
Symmetry of Fiite-Legth Sequeces A complex fiite-legth sequece x[], 0 -,is called circular cojugate-symmetric sequece if * * x[] x[ ] x[ ] Acomplex fiite-legth sequece x[], 0 -,is called circular cojugate-atisymmetric sequece if * * x[] -x [ ] -x [ ] A complex fiite-legth sequece ca be decomposed ito its circular cojugate-symmetric ad circular cojugate- atisymmetric parts x[] x [] x [] cs * x cs[] = x[] x [ ] 2 * x ca[] = x[] x [ ] 2 25 ca
Symmetry of Fiite-Legth Sequeces A real fiite-legth sequece x[], 0 -, is called circular eve sequece if x[] x[ ] x[ ] A real fiite-legth sequece x[], 0 -, is called circular odd sequece if x[] -x[ ] -x[ ] A real fiite-legth sequece ca be decomposed ito its cojugate eve symmetric ad cojugate odd parts x[] x [] x [] ev odd x ev[] = x[] x[ ] 2 x odd[] = x[] x[ ] 2 26
Symmetry of Fiite-Legth Sequeces Example 5.9: determie the circular cojugatesymmetric ad circular cojugate-atisymmetric for x[] = {+j4, -2+j3, 4-j2, -5-j6} 27
Circular Covolutio Give a fiite-legth sequece x[], 0 -,withits X(e jω ) beig its DTFT ad X[k] beig its -poit DFT Similarly, let h[], 0 -, be the impulse respose of LTI system with its H(e jω ) beig its DTFT ad H[k] beig its -poit DFT We kow from the covolutio theorem that the output of the system y[] due to the iput x[] y[] = x[] * h[] Y(e jω ) = X(e jω ) H(e jω ) However, is it true that y[] = x[] * h[]?????? Y[k] = X[k] H[k] 28
Circular Covolutio x[] h[] 0-0 - -poit DFT -poit DFT X[k] H[k] IDFT IDFT x[] h[] This implies that x[] * h[] X[k] H[k] 0-29 Wrap aroud error
Circular Covolutio This is called -poit circular covolutio, y[] [] x[] []h[] h[] m 0 =x[]* h[]= x[m]h[<m> h[<-m> ] where the sequece y[] is of legth ad is computed over 0 -. 30 Circular covolutio of legth- fiite sequeces requires Circular time-reversal Circular time-shift Multiplicatio Additio
Circular Covolutio Example 5.0: letx[]={,2,0,}adh[]={2, 2,,}for0 -. Determie the circular covolutio betwee x[] ad h[]. 3 m 0 y[] x[] h[] = x[m] h[<-m> ] c 4 3
Circular Covolutio Ca we implemet liear covolutio betwee two fiite legth sequeces usig circular covolutio? Simply,we eedtoprevetthewraparoud errors!thisca be simply doe by paddig the two sequeces with M zeros where M. This implies that whe the IDFT is computed from the DFT of the padded sequeces, the two sequeces are periodic with the padded zeros. Accordigly, wraparoud errors are caceled whe oe sequece is shifted i covolutio. 32
Circular Covolutio x[] h[] 0-2(-) 0 - -poit DFT -poit DFT X[k] H[k] IDFT IDFT x[] h[] This implies that x[] * h[] X[k] H[k] 0-33
Circular Covolutio So why do we care about circular covolutio? To perform liear covolutio betwee two fiite legth sequeces usig their DFT, the sequeces have to be padded with at least - zeros. Example 5.: x[]={20} h[]={22}. The liear covolutio result The circular covolutio result The circular covolutio result of the padded sequeces 34
DFT Symmetry Properties x is a complex sequece 35
DFT Symmetry Properties x is a real sequece 36
37 DFT Theorems
38 Examples Example 5.2: Compute G[k] ad H[k] of the followig two sequeces usig a sigle 4-poit DFT. x[] = {, 2, 0, } h[] = {2, 2,, }
Examples Example 5.3: X[k] = {4, -+j7.33, --j3.36, -+j3.36, --j7.33}. What is G[k] if g[] = x[<-2> 5 ]? 39
Examples Example 5.4: The 34-poit DFT for a real sequece x[] is kow to be zero except at the followig values of k. Determie k, k 2, k 3, k 4 A, B, C, D, E The DC value The eergy of x[] k X[k] 0 3.42 - ja 7 4.52 + j7.9 k -3.6 + j5.46 k 2 j3.78 47 -j3.78 67 45 + jb k 3 E j7.9 79-3.6+jD 08 C + j7.56 k 4-3.7 j7.56 4 j 40
Related fuctios freqz fft dftmtx t fftshift agle abs mod cov ccov Matlab 4