Presentation is loading. Please wait.

Presentation is loading. Please wait.

ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 4: Frequency domain representation, DTFT, IDTFT, DFT, IDFT Instructor: Dr. Gleb V. Tcheslavski.

Similar presentations


Presentation on theme: "ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 4: Frequency domain representation, DTFT, IDTFT, DFT, IDFT Instructor: Dr. Gleb V. Tcheslavski."— Presentation transcript:

1 ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 4: Frequency domain representation, DTFT, IDTFT, DFT, IDFT Instructor: Dr. Gleb V. Tcheslavski Contact: gleb@ee.lamar.edugleb@ee.lamar.edu Office Hours: Room 2030 Class web site: http://ee.lamar.edu/gleb/dsp/ind ex.htm http://ee.lamar.edu/gleb/dsp/ind ex.htm

2 ELEN 5346/4304 DSP and Filter Design Fall 2008 2 Some history Jean Baptiste Joseph Fourier was born in France in 1768. He attended the Ecole Royale Militaire and in 1790 became a teacher there. Fourier continued his studies at the Ecole Normale in Paris, having as his teachers Lagrange, Laplace, and Monge. Later on, he, together with Monge and Malus, joined Napoleon as scientific advisors to his expedition to Egypt where Fourier established the Cairo Institute. In 1822 Fourier has published his most famous work: The Analytical Theory of Heat. Fourier showed how the conduction of heat in solid bodies may be analyzed in terms of infinite mathematical series now called by his name, the Fourier series.

3 ELEN 5346/4304 DSP and Filter Design Fall 2008 3 Frequency domain representation frequency complex exponent of  0 complex exponent of -  0 A sinusoidal signal is represented by TWO complex exponents of opposite frequencies in the frequency domain. (4.3.1) (4.3.2)

4 ELEN 5346/4304 DSP and Filter Design Fall 2008 4 Frequency domain representation (cont) Iff it exists! has a period of 2  (4.4.1) (4.4.2) (4.4.3) (4.4.4)

5 ELEN 5346/4304 DSP and Filter Design Fall 2008 5 Frequency domain representation (cont 2) For an arbitrary real LTI system: Symmetric with respect to  Anti-symmetric with respect to 

6 ELEN 5346/4304 DSP and Filter Design Fall 2008 6 Frequency domain representation (cont 3) Combining (4.3.2) and (4.4.4) – back to our sinusoid! LTI filtering: due to the input change due to the system same as the input from the input phase change due to the system Via design, we manipulate H(e j  ), therefore, h n, and, finally, manipulate the coefficients in the Linear Constant Coefficient Difference Equation (LCCDE) (4.6.1) (4.6.2) (4.6.3) (4.6.4)

7 ELEN 5346/4304 DSP and Filter Design Fall 2008 7 Frequency domain representation (cont 4) LCCDE: for large enough n: (4.7.1) (4.7.4) (4.7.2) (4.7.3)

8 ELEN 5346/4304 DSP and Filter Design Fall 2008 8 Frequency domain representation (cont 5) for an LTI: We don’t need systems of order higher than 2: can always make cascades. for a real, LTI, BIBO system: effects of filtering We cannot observe ANY frequency components in the output that are not present in the input (in steady state). We may see less when (4.8.1) (4.8.2)

9 ELEN 5346/4304 DSP and Filter Design Fall 2008 9 Frequency domain representation (cont 6) In continuous time: signalnoiseconstdelay We need a constant magnitude and linear phase for the frequencies of interest. Ideal filters:     LPF   HPF   BPF   BSF Ideal filters are non-realizable! (4.9.1) (4.9.2)

10 ELEN 5346/4304 DSP and Filter Design Fall 2008 10 CTFT and ICTFT (4.10.1) (4.10.2) CTFT: ICTFT: Examples:

11 ELEN 5346/4304 DSP and Filter Design Fall 2008 11 DTFT if exists (4.11.1) What’s about convergence??? 1. Absolute convergence: (4.11.4) (4.11.5) (4.11.2) (4.11.3)

12 ELEN 5346/4304 DSP and Filter Design Fall 2008 12 DTFT (cont) must be 2. Mean-square convergence: The total energy of the error must approach zero, not an error itself! (4.12.1) Absolutely summable sequences always have finite energy. However, finite energy sequences are not necessary absolutely summable.

13 ELEN 5346/4304 DSP and Filter Design Fall 2008 13 IDTFT IDTFT: (4.13.1) (4.13.2) Combining (4.11.1) and (4.12.2) (4.13.3) (4.13.4) shows where x n “lives” in the frequency domain.

14 ELEN 5346/4304 DSP and Filter Design Fall 2008 14 Back to ideal filters Ideal LPF:   22 0 1 cc Using IDTFT: 1.The response in (4.14.2) is not absolutely summable, therefore, the filter is not BIBO stable! 2.The response in (4.14.2) is not causal and is of an infinite length. (4.14.1) (4.14.2) As a result, the filter in (4.14.1) is not realizable. Similar derivations show that none of the ideal filters in slide 9 is realizable.

15 ELEN 5346/4304 DSP and Filter Design Fall 2008 15 DTFT properties (4.15.1) (4.15.2) (4.15.3) (4.15.4) (4.15.5) (4.15.6) continuous, periodic functions (4.15.6)

16 ELEN 5346/4304 DSP and Filter Design Fall 2008 16 DTFTs of commonly used sequences

17 ELEN 5346/4304 DSP and Filter Design Fall 2008 17 DTFT examples ½ of DC value of u n (4.17.1) (4.17.2) (4.17.3) (4.17.4) (4.17.5) (4.17.6)

18 ELEN 5346/4304 DSP and Filter Design Fall 2008 18 DTFT examples (cont) We can re-work the Parseval’s theorem (4.15.6) as follows: energy density (spectrum) Autocorrelation function: (4.18.1) (4.18.2)

19 ELEN 5346/4304 DSP and Filter Design Fall 2008 19 DTFT examples (cont 2) One obvious problem with DTFT is that we can never compute it since x n needs to be known everywhere! which is impossible! Therefore, DTFT is not practical to compute. Often, a finite dimension LTI system is described by LCCDE: (4.19.2) practical (finite dimensions) Prediction of steady-state behavior of LCCDE (4.19.1)

20 ELEN 5346/4304 DSP and Filter Design Fall 2008 20 How to measure frequency response of an actual (unknown) filter? 1. Perform two I/O experiments: 2. Analyze these measurements and form: That’s a good way to measure/estimate a frequency response for every . (4.20.1) (4.20.2) (4.20.3) (4.20.4) (4.20.5)

21 ELEN 5346/4304 DSP and Filter Design Fall 2008 21 DFT and IDFT Consider an N-sequence x n (at most N non-zero values for 0  n  N-1) uniformly spaced frequency samples (4.21.1) (4.21.2) DFT: Finite sum! Therefore, it’s computable. (4.21.1) can be rewritten as: (4.21.3) (4.21.4) (4.21.5) Btw, DFT is a sampled version of DTFT.

22 ELEN 5346/4304 DSP and Filter Design Fall 2008 22 DFT and IDFT (cont) Let us verify (4.21.5). We multiply both sides by (4.22.1) (4.22.2) (4.22.3) (4.22.4)

23 ELEN 5346/4304 DSP and Filter Design Fall 2008 23 FFT In the matrix form: where: (4.23.1) (4.23.2) (4.23.3) (4.23.4) (4.23.5) (4.23.6) (4.23.7) This is actually FFT…

24 ELEN 5346/4304 DSP and Filter Design Fall 2008 24 Relation between DTFT and DFT 1. Sampling of DTFT (4.24.1) (4.24.2) (4.24.3) y n is an infinite sum of shifted replicas of x n. Iff x n is a length M sequence (M  N) than y n = x n. Otherwise, time-domain aliasing  x n cannot be recovered!

25 ELEN 5346/4304 DSP and Filter Design Fall 2008 25 Relation between DTFT and DFT (cont) 2. DTFT from DFT by Interpolation Let x n be a length N sequence: It’s possible to determine DTFT X(e j  ) from its uniformly sampled version uniquely! Let us try to recover DTFT from DFT (its sampled version). (4.25.1) (4.25.2) (4.25.3)

26 ELEN 5346/4304 DSP and Filter Design Fall 2008 26 Relation between DTFT and DFT (cont 2) 3. Numerical computation of DTFT from DFT Let x n is a length N sequence: defined by N uniformly spaced samples We wish to evaluate at more dense frequency scale. No change in information, no change in DTFT… just a better “plot resolution”. (4.26.1) Define:zero-padding (4.26.2) (4.26.3)

27 ELEN 5346/4304 DSP and Filter Design Fall 2008 27 A note on W N W N is also called an N th root of unity, since Re Im Re Im (4.27.1) (4.27.2)

28 ELEN 5346/4304 DSP and Filter Design Fall 2008 28 DFT properties 1. Circular shift x n is a length N sequence defined for n = 0,1,…N-1. An arbitrary shift applied to x n will knock it out of the 0…N-1 range. Therefore, a circular shift that always keeps the shifted sequence in the range 0…N-1 is defined using a modulo operation: (4.28.1) (4.28.2)

29 ELEN 5346/4304 DSP and Filter Design Fall 2008 29 DFT properties (cont) 2. Circular convolution A linear convolution for two length N sequences x n and g n has a length 2N-1: A circular convolution is a length-N sequence defined as: N N (4.29.1) (4.29.2) (4.29.3) Procedure: take two sequences of the same length (zero-pad if needed), DFT of them, multiply, IDFT: a circular convolution.

30 ELEN 5346/4304 DSP and Filter Design Fall 2008 30 DFT properties (cont 2) Example: Take N frequency samples of (4.30.1) and then IDFT: aliased version of x n (4.30.1) (4.30.2) The results of circular convolution differ from the linear convolution “on the edges” – caused by aliasing. To avoid aliasing, we need to use zero-padding…

31 ELEN 5346/4304 DSP and Filter Design Fall 2008 31 Linear filtering via DFT Often, we need to process long data sequences; therefore, the input must be segmented to fixed-size blocks prior LTI filtering. Successive blocks are processed one at a time and the output blocks are fitted together… Assuming that h n is an M-sequence, we form an N-sequence (L - block length): (4.31.1) We can do it by FFT: IFFT{FFT{x}FFT{h}}… N >> M; L >> M; N = L + M - 1 and is a power of 2 Problem: DFT implies circular convolution – aliasing! (4.31.2)

32 ELEN 5346/4304 DSP and Filter Design Fall 2008 32 Linear filtering via DFT (cont) Next, we compute N-point DFTs of x m,n and h n, and form (4.32.1) - no aliasing! Since each data block was terminated with M -1 zeros, the last M -1 samples from each block must be overlapped and added to first M – 1 samples of the succeeded block. An Overlap-Add method.

33 ELEN 5346/4304 DSP and Filter Design Fall 2008 33 Linear filtering via DFT (cont 2) Alternatively: Each input data block contains M -1 samples from the previous block followed by L new data samples; multiply the N- DFT of the filter’s impulse response and the N-DFT of the input block, take IDFT. Keep only the last L data samples from each output block. An Overlap-Save method. The first block is padded by M-1 zeros.

34 ELEN 5346/4304 DSP and Filter Design Fall 2008 34 DFT properties: General from Mitra’s book Btw, g[n] = g n

35 ELEN 5346/4304 DSP and Filter Design Fall 2008 35 DFT properties: Symmetry from Mitra’s book x n is a real sequence

36 ELEN 5346/4304 DSP and Filter Design Fall 2008 36 DFT properties: Symmetry (cont) from Mitra’s book x n is a complex sequence

37 ELEN 5346/4304 DSP and Filter Design Fall 2008 37 N-point DFTs of 2 real sequences via a single N-point DFT Let g n and h n are two length N real sequences. Form x n = g n + jh n  X k (4.37.1) (4.37.2) (4.37.3) (4.37.4)

38 ELEN 5346/4304 DSP and Filter Design Fall 2008 38 Summary AlgorithmTimeFrequency CTFTContinuous DTFTDiscreteContinuous DFTDiscrete


Download ppt "ELEN 5346/4304 DSP and Filter Design Fall 2008 1 Lecture 4: Frequency domain representation, DTFT, IDTFT, DFT, IDFT Instructor: Dr. Gleb V. Tcheslavski."

Similar presentations


Ads by Google