Presentation is loading. Please wait.

Presentation is loading. Please wait.

2003-09-16Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 3: Fourier domain 1.The Fourier domain 2.Discrete-Time Fourier Transform (DTFT) 3.Discrete.

Similar presentations


Presentation on theme: "2003-09-16Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 3: Fourier domain 1.The Fourier domain 2.Discrete-Time Fourier Transform (DTFT) 3.Discrete."— Presentation transcript:

1 2003-09-16Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 3: Fourier domain 1.The Fourier domain 2.Discrete-Time Fourier Transform (DTFT) 3.Discrete Fourier Transform (DFT) 4.Convolution with the DFT

2 2003-09-16Dan Ellis 2 1. The Fourier Transform Basic observation (continuous time): A periodic signal can be decomposed into sinusoids at integer multiples of the fundamental frequency i.e. if we can approach with Harmonics of the fundamental

3 2003-09-16Dan Ellis 3 Fourier Series For a square wave, i.e.

4 2003-09-16Dan Ellis 4 Fourier domain x is equivalently described by its Fourier Series parameters: Complex form: k 1235674 akak 1.0 Negative a k is equivalent to phase of  k 1235674 kk π

5 2003-09-16Dan Ellis 5 Fourier analysis How to find {|c k |}, {arg[c k ]} ? Inner product with complex sinusoids:

6 2003-09-16Dan Ellis 6 Fourier analysis Works if k 1, k 2 are positive integers, 

7 2003-09-16Dan Ellis 7 sinc = 1 when x = 0 = 0 when x = r· , r ≠ 0, r = ±1, ±2, ±3,... ∆

8 2003-09-16Dan Ellis 8 Fourier Analysis Thus, because real & imag sinusoids in pick out corresponding sinusoidal components linearly combined in

9 2003-09-16Dan Ellis 9 Fourier Transform Fourier series for periodic signals extends naturally to Fourier Transform for any (CT) signal (not just periodic): Discrete index k  continuous freq.  Inverse Fourier Transform (IFT) Fourier Transform (FT)

10 2003-09-16Dan Ellis 10 Fourier Transform Mapping between two continuous functions: 2π ambiguity

11 2003-09-16Dan Ellis 11 Fourier Transform of a sine Assume Now, since...we know...where  (x) is the Dirac delta function (continuous time) i.e.   f(x)f(x) x x0x0 (x-x0)(x-x0)

12 2003-09-16Dan Ellis 12 Fourier Transforms TimeFrequency Fourier Series (FS) Continuous periodic x(t) Discrete infinite c k Fourier Transform (FT) Continuous infinite x(t) Continuous infinite X(  ) Discrete-Time FT (DTFT) Discrete infinite x[n] Continuous periodic X(e j  ) Discrete FT (DFT) Discrete finite/pdc x[n] Discrete finite/pdc X[k] ~ ~

13 2003-09-16Dan Ellis 13 2. Discrete Time FT (DTFT) FT defined for discrete sequences: Summation (not integral) Discrete (normalized) frequency variable  Argument is e j , not plain  DTFT

14 2003-09-16Dan Ellis 14 DTFT example e.g. x[n] =  n ·  [n], |  | < 1  n 1234567

15 2003-09-16Dan Ellis 15 Periodicity of X(e j  ) X(e j  ) has periodicity 2  in  Phase ambiguity of e j  makes it implicit

16 2003-09-16Dan Ellis 16 Inverse DTFT (IDTFT) Same basic form as other IFTs: Note: continuous, periodic X(e j  ) discrete, infinite x[n]... IDTFT is actually forward Fourier Series (except for sign of  ) IDTFT

17 2003-09-16Dan Ellis 17 IDTFT Verify by substituting in DTFT: = 0 unless n = l

18 2003-09-16Dan Ellis 18 sinc again Same as  cos imag jsin part cancels 

19 2003-09-16Dan Ellis 19 x[n] =  [n]  i.e. x[n]X(e j  )  [n]  1 DTFTs of simple sequences (for all  ) n -2231-3  -- x[n]x[n] X(ej)X(ej)

20 2003-09-16Dan Ellis 20 DTFTs of simple sequences :  over -  <  <  but X(e j  ) must be periodic in   If  0 = 0 then x[n] = 1  n so IDTFT  

21 2003-09-16Dan Ellis 21  DTFTs of simple sequences From before:  [n] tricky - not finite ( |  | < 1) DTFT of 1/2 

22 2003-09-16Dan Ellis 22 DTFT properties Linear: Time shift: Frequency shift: ‘delay’ in frequency

23 2003-09-16Dan Ellis 23 DTFT example x[n] =  [n] +  n  [n-1]  ? =  [n] +  n-1  [n-1])   x[n] =  n  [n]

24 2003-09-16Dan Ellis 24 DTFT symmetry If x[n]  X(e j  ) then... x[-n]  X(e -j  ) x * [n]  X * (e -j  ) Re{x[n]}  X CS (e j  ) jIm{x[n]}  X CA (e j  ) x cs [n]  Re{X(e j  )} x ca [n]  jIm{X(e j  )} conjugate symmetry cancels Im parts on IDTFT from summation (e -j  ) * = e j 

25 2003-09-16Dan Ellis 25 DTFT of real x[n] When x[n] is pure real,  X(e j  ) = X * (e -j  ) x cs [n]  x ev [n] = x ev [-n]  X R (e j  ) = X R (e -j  ) x ca [n]  x od [n] = -x od [-n]  X I (e j  ) = -X I (e -j  ) x[n] real, even  X(e j  ) even, real

26 2003-09-16Dan Ellis 26 DTFT and convolution Convolution:  Convolution becomes multiplication

27 2003-09-16Dan Ellis 27 DTFT modulation Modulation: Could solve if g[n] was just sinusoids...  Dual of convolution in time

28 2003-09-16Dan Ellis 28 Parseval’s relation “Energy” in time and frequency domains are equal: If g = h, then g·g * = |g| 2 = energy...

29 2003-09-16Dan Ellis 29 Energy density spectrum Energy of sequence By Parseval Define Energy Density Spectrum (EDS)

30 2003-09-16Dan Ellis 30 EDS and autocorrelation Autocorrelation of g[n]:  If g[n] is real, G(e -j  ) = G * (e j  ), so Mag-sq of spectrum is DTFT of autoco no phase info.

31 2003-09-16Dan Ellis 31 Convolution with DTFT Since we can calculate a convolution by: finding DTFTs of g, h  G, H multiply them: G · H IDTFT of product is result, g[n]g[n] h[n]h[n] y[n]y[n] DTFT IDTFT

32 2003-09-16Dan Ellis 32 x[n] =  n ·  [n]  h[n] =  [n] -  [n-1]  y[n] = x[n]  h[n]   y[n] =  [n] i.e.... DTFT convolution example

33 2003-09-16Dan Ellis 33 3. Discrete FT (DFT) A finite or periodic sequence has only N unique values, x[n] for 0 ≤ n < N Spectrum is completely defined by N distinct frequency samples Divide 0..2  into N equal steps, {  k } = 2  k/N Discrete FT (DFT) Discrete finite/pdc x[n] Discrete finite/pdc X[k]

34 2003-09-16Dan Ellis 34 Uniform sampling of DTFT spectrum: DFT: where i.e. 1/ N th of a revolution DFT and IDFT

35 2003-09-16Dan Ellis 35 IDFT Inverse DFT IDFT Check: Sum of complete set of rotated vectors = 0 if l ≠ n ; = N if l = n re im WNWN WN2WN2

36 2003-09-16Dan Ellis 36 DFT examples Finite impulse  Periodic sinusoid: (r  I) 

37 2003-09-16Dan Ellis 37 DFT: Matrix form as a matrix multiply: i.e.

38 2003-09-16Dan Ellis 38 Matrix IDFT If then i.e. inverse DFT is also just a matrix, =1/NDN*=1/NDN*

39 2003-09-16Dan Ellis 39 DFT and DTFT DFT ‘samples’ DTFT at discrete freqs: DTFT DFT continuous freq  infinite x[n], -  <n<  discrete freq k=N  finite x[n], 0≤n<N  X(ej)X(ej) X[k]X[k] k=1...

40 2003-09-16Dan Ellis 40 DFT and MATLAB MATLAB is concerned with sequences not continuous functions like X(e j  ) Instead, we use the DFT to sample X(e j  ) on an (arbitrarily-fine) grid: X = freqz(x,1,w); samples the DTFT of sequence x at angular frequencies in w X = fft(x); calculates the N -point DFT of an N -point sequence x M

41 2003-09-16Dan Ellis 41 DTFT from DFT N -point DFT completely specifies the continuous DTFT of the finite sequence “periodic sinc” interpolation

42 2003-09-16Dan Ellis 42 Periodic sinc = N when  k = 0; = (-)N when  k /2 =  = 0 when  k /2 = r·  /N, r = ±1, ± 2,... other values in-between...

43 2003-09-16Dan Ellis 43 Periodic sinc Periodic sinc interpolation X[k]  X(e j  )

44 2003-09-16Dan Ellis 44 DFT from overlength DTFT If x[n] has more than N points, can still form IDFT of X[k] will give N point How does relate to x[n] ?

45 2003-09-16Dan Ellis 45 DFT from overlength DTFT =1 for n-l = rN, r  I = 0 otherwise all values shifted by exact multiples of N pts to lie in 0 ≤ n < N DTFT x[n]x[n] sample X(ej)X(ej) IDFT X[k]X[k] 0 ≤ n < N-A ≤ n < B

46 2003-09-16Dan Ellis 46 DFT from DTFT example If x[n] = { 8, 5, 4, 3, 2, 2, 1, 1} (8 point) We form X[k] for k = 0, 1, 2, 3 by sampling X(e j  ) at  = 0,  /2, , 3  /2 IDFT of X[k] gives 4 pt Overlap only for r = -1 : (N = 4)

47 2003-09-16Dan Ellis 47 DFT from DTFT example x[n] x[n+N] (r = -1) is the time aliased or ‘folded down’ version of x[n]. n 12345678 n 12345 -2-3-4-5 n 123

48 2003-09-16Dan Ellis 48 Properties: Circular time shift DFT properties mirror DTFT, with twists: Time shift must stay within N -pt ‘window’ Modulo- N indexing keeps index between 0 and N-1: 0 ≤ n 0 < N

49 2003-09-16Dan Ellis 49 Circular time shift Points shifted out to the right don’t disappear – they come in from the left Like a ‘barrel shifter’: 5-pt sequence ‘delay’ by 2 g[n]g[n] 1234 n g[ 5 ] 1234 n

50 2003-09-16Dan Ellis 50 Circular time reversal Time reversal is tricky in ‘modulo- N ’ indexing - not reversing the sequence: Zero point stays fixed; remainder flips 1234 n 567891011-7-6-5-4-3-2 5-pt sequence made periodic Time-reversed periodic sequence 1234 n 567891011-7-6-5-4-3-2

51 2003-09-16Dan Ellis 51 4. Convolution with the DFT IDTFT of product of DTFTs of two N -pt sequences is their 2N-1 pt convolution IDFT of the product of two N -pt DFTs can only give N points! Equivalent of 2N-1 pt result time aliased: i.e. must be, because G[k]H[k] are exact samples of G(e j  )H(e j  ) This is known as circular convolution

52 2003-09-16Dan Ellis 52 Circular convolution Can also do entire convolution with modulo- N indexing Hence, Circular Convolution: Written as N

53 2003-09-16Dan Ellis 53 Circular convolution example 4 pt sequences: g[n]={1 2 0 1} n 123 h[n]={2 2 1 0} n 123  1  2  0  1 n h[ 4 ] 123 n 123 n 123 n 123 n g[n] h[n]={4 7 5 4} 123 4 check: g[n] h[n] ={2 6 5 4 2 1 0} *

54 2003-09-16Dan Ellis 54 Duality DFT and IDFT are very similar both map an N -pt vector to an N -pt vector Duality: if then i.e. if you treat DFT sequence as a time sequence, result is almost symmetric Circular time reversal

55 2003-09-16Dan Ellis 55 DFT properties summary Circular convolution Modulation Duality Parseval

56 2003-09-16Dan Ellis 56 Linear convolution w/ the DFT DFT  fast circular convolution.. but we need linear convolution Circular conv. is time-aliased linear conv.; can aliasing be avoided? e.g. convolving L -pt g[n] with M -pt h[n] : y[n] = g[n] h[n] has L+M-1 nonzero pts Set DFT size N ≥ L+M-1  no aliasing *

57 2003-09-16Dan Ellis 57 Linear convolution w/ the DFT Procedure ( N = L + M - 1 ): pad L -pt g[n] with (at least) M-1 zeros  N -pt DFT G[k], k = 0..N-1 pad M -pt h[n] with (at least) L-1 zeros  N -pt DFT H[k], k = 0..N-1 Y[k] = G[k]·H[k], k = 0..N-1 IDFT{ Y[k] } n g[n]g[n] L n h[n]h[n] M n yc[n]yc[n] N

58 2003-09-16Dan Ellis 58 Overlap-Add convolution Very long g[n]  break up into segments, convolve piecewise, overlap  bound size of DFT, processing delay Make Called Overlap-Add (OLA) convolution... **

59 2003-09-16Dan Ellis 59 Overlap-Add convolution n g[n]g[n] n g0[n]g0[n] n g1[n]g1[n] n g2[n]g2[n] N2N3N n h[n] g 0 [n] n n h[n]h[n] n  h[n] g 1 [n]  h[n] g 2 [n]  n N2N3N h[n] g[n]  valid OLA sum


Download ppt "2003-09-16Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 3: Fourier domain 1.The Fourier domain 2.Discrete-Time Fourier Transform (DTFT) 3.Discrete."

Similar presentations


Ads by Google