Department of Computer Eng Sharif University of Technology

  • Slides: 45
Download presentation
Department of Computer Eng. Sharif University of Technology Discrete-time signal processing Chapter 8: THE

Department of Computer Eng. Sharif University of Technology Discrete-time signal processing Chapter 8: THE DESCRETE FOURIER TRANSFORM Content and Figures are from Discrete-Time Signal Processing, 2 e by Oppenheim, Shafer and Buck, © 1999 -2000 Prentice Hall Inc.

8. 0 Introduction DSP • For finite-duration sequences, it is possible to develop an

8. 0 Introduction DSP • For finite-duration sequences, it is possible to develop an alternative Fourier representation referred to as the discrete Fourier transform(DFT). • It is a sequence rather than a continuous variable. • It corresponds to samples, equally spaced in frequency, of the Fourier transform of the signal. • The importance of DFT is because efficient algorithms exists for the computation of the DFT (FFT). Chapter 8: The Discrete Fourier Transform 1

8. 1 Discrete Fourier Series • Given a periodic sequence DSP with period N

8. 1 Discrete Fourier Series • Given a periodic sequence DSP with period N so that • The Fourier series representation of continuous-time periodic signals require infinite complex exponentials. • But for discrete-time periodic signals we have • Due to the periodicity of the complex exponential we only need N exponentials for discrete time Fourier series Chapter 8: The Discrete Fourier Transform 2

Discrete Fourier Series Pair DSP • A periodic sequence in terms of Fourier series

Discrete Fourier Series Pair DSP • A periodic sequence in terms of Fourier series coefficients • The Fourier series coefficients can be obtained via • For convenience we sometimes use • Analysis equation • Synthesis equation Chapter 8: The Discrete Fourier Transform 3

DSP Example 1 1 • DFS of a periodic impulse train • Since the

DSP Example 1 1 • DFS of a periodic impulse train • Since the period of the signal is N • We can represent the signal with the DFS coefficients as Chapter 8: The Discrete Fourier Transform 4

Example 2: Duality in the DFT DSP • Here let the Fourier series coefficients

Example 2: Duality in the DFT DSP • Here let the Fourier series coefficients be the periodic impulse train Y[k] , and given by this equation: • Substituting Y[k] in to DFS equation gives • Comparing this result with the results for example 1 we see that Y[k]=Nx[k] and y[n]=X[n]. Chapter 8: The Discrete Fourier Transform 5

DSP Example 3 • DFS of an periodic rectangular pulse train • The DFS

DSP Example 3 • DFS of an periodic rectangular pulse train • The DFS coefficients Chapter 8: The Discrete Fourier Transform 6

8. 2 Properties of DFS DSP • Linearity (all signals have the same period)

8. 2 Properties of DFS DSP • Linearity (all signals have the same period) • Shift of a Sequence • Duality Chapter 8: The Discrete Fourier Transform 7

Periodic Convolution DSP • Take two periodic sequences • Let’s form the product •

Periodic Convolution DSP • Take two periodic sequences • Let’s form the product • The periodic sequence with given DFS can be written as • Periodic convolution is commutative Chapter 8: The Discrete Fourier Transform 8

Periodic Convolution Cont’d DSP • Substitute periodic convolution into the DFS equation • Interchange

Periodic Convolution Cont’d DSP • Substitute periodic convolution into the DFS equation • Interchange summations • The inner sum is the DFS of shifted sequence • Substituting Chapter 8: The Discrete Fourier Transform 9

Graphical Periodic Convolution Chapter 8: The Discrete Fourier Transform DSP 10

Graphical Periodic Convolution Chapter 8: The Discrete Fourier Transform DSP 10

Symmetry Properties Chapter 8: The Discrete Fourier Transform DSP 11

Symmetry Properties Chapter 8: The Discrete Fourier Transform DSP 11

Symmetry Properties Cont’d Chapter 8: The Discrete Fourier Transform DSP 12

Symmetry Properties Cont’d Chapter 8: The Discrete Fourier Transform DSP 12

8. 3 The Fourier Transform of Periodic Signals DSP • Periodic sequences are not

8. 3 The Fourier Transform of Periodic Signals DSP • Periodic sequences are not absolute or square summable – Hence they don’t have a Fourier Transform • We can represent them as sums of complex exponentials: DFS • We can combine DFS and Fourier transform • Fourier transform of periodic sequences – Periodic impulse train with values proportional to DFS coefficients – This is periodic with 2 since DFS is periodic • The inverse transform can be written as Chapter 8: The Discrete Fourier Transform 13

DSP Example • Consider the periodic impulse train • The DFS was calculated previously

DSP Example • Consider the periodic impulse train • The DFS was calculated previously to be • Therefore the Fourier transform is Chapter 8: The Discrete Fourier Transform 14

Relation between Finite-length and Periodic Signals DSP • Consider finite length signal x[n] spanning

Relation between Finite-length and Periodic Signals DSP • Consider finite length signal x[n] spanning from 0 to N-1 • Convolve with periodic impulse train • The Fourier transform of the periodic sequence is • This implies that • DFS coefficients of a periodic signal can be thought as equally spaced samples of the Fourier transform of one period 15

DSP Example • Consider the following sequence • The Fourier transform • The DFS

DSP Example • Consider the following sequence • The Fourier transform • The DFS coefficients Chapter 8: The Discrete Fourier Transform 16

8. 4 Sampling the Fourier Transform DSP • Consider an aperiodic sequence with a

8. 4 Sampling the Fourier Transform DSP • Consider an aperiodic sequence with a Fourier transform • Assume that a sequence is obtained by sampling the DTFT • Since the DTFT is periodic resulting sequence is also periodic • We can also write it in terms of the z-transform • The sampling points are shown in figure • could be the DFS of a sequence • Write the corresponding sequence Chapter 8: The Discrete Fourier Transform 17

Sampling the Fourier Transform Cont’d DSP • The only assumption made on the sequence

Sampling the Fourier Transform Cont’d DSP • The only assumption made on the sequence is that DTFT exist • Combine equation to get • Term in the parenthesis is • So we get Chapter 8: The Discrete Fourier Transform 18

Sampling the Fourier Transform Cont’d Chapter 8: The Discrete Fourier Transform DSP 19

Sampling the Fourier Transform Cont’d Chapter 8: The Discrete Fourier Transform DSP 19

Sampling the Fourier Transform Cont’d DSP • Samples of the DTFT of an aperiodic

Sampling the Fourier Transform Cont’d DSP • Samples of the DTFT of an aperiodic sequence can be thought of as DFS coefficients of a periodic sequence obtained through summing periodic replicas of original sequence. • If the original sequence is of finite length and we take sufficient number of samples of its DTFT the original sequence can be recovered by • It is not necessary to know the DTFT at all frequencies To recover the discrete-time sequence in time domain • Discrete Fourier Transform representing a finite length sequence by samples of DTFT Chapter 8: The Discrete Fourier Transform 20

8. 5 The Discrete Fourier Transform DSP • Consider a finite length sequence x[n]

8. 5 The Discrete Fourier Transform DSP • Consider a finite length sequence x[n] of length N • For given length-N sequence associate a periodic sequence • The DFS coefficients of the periodic sequence are samples of the DTFT of x[n] • Since x[n] is of length N there is no overlap between terms of x[n-r. N] and we can write the periodic sequence as • To maintain duality between time and frequency – We choose one period of as the Fourier transform of x[n] Chapter 8: The Discrete Fourier Transform 21

The Discrete Fourier Transform Cont’d DSP • The DFS pair • The equations involve

The Discrete Fourier Transform Cont’d DSP • The DFS pair • The equations involve only on period so we can write Chapter 8: The Discrete Fourier Transform 22

The Discrete Fourier Transform Cont’d DSP • The DFT pair can also be written

The Discrete Fourier Transform Cont’d DSP • The DFT pair can also be written as • The Discrete Fourier Transform Chapter 8: The Discrete Fourier Transform 23

DSP Example • The DFT of a rectangular pulse • x[n] is of length

DSP Example • The DFT of a rectangular pulse • x[n] is of length 5 • We can consider x[n] of any length greater than 5 • Let’s pick N=5 • Calculate the DFS of the periodic form of x[n] Chapter 8: The Discrete Fourier Transform 24

Example Cont’d DSP • If we consider x[n] of length 10 • We get

Example Cont’d DSP • If we consider x[n] of length 10 • We get a different set of DFT coefficients • Still samples of the DTFT but in different places Chapter 8: The Discrete Fourier Transform 25

8. 6 Properties of DFT DSP • Linearity • Duality • Circular Shift of

8. 6 Properties of DFT DSP • Linearity • Duality • Circular Shift of a Sequence Chapter 8: The Discrete Fourier Transform 26

Example: Duality Chapter 8: The Discrete Fourier Transform DSP 27

Example: Duality Chapter 8: The Discrete Fourier Transform DSP 27

Symmetry Properties Chapter 8: The Discrete Fourier Transform DSP 28

Symmetry Properties Chapter 8: The Discrete Fourier Transform DSP 28

Circular Convolution DSP • Circular convolution of two finite length sequences Chapter 8: The

Circular Convolution DSP • Circular convolution of two finite length sequences Chapter 8: The Discrete Fourier Transform 29

DSP Example • Circular convolution of two rectangular pulses L=N=6 • DFT of each

DSP Example • Circular convolution of two rectangular pulses L=N=6 • DFT of each sequence • Multiplication of DFTs • And the inverse DFT Chapter 8: The Discrete Fourier Transform 30

DSP Example • We can augment zeros to each sequence L=2 N=12 • The

DSP Example • We can augment zeros to each sequence L=2 N=12 • The DFT of each sequence • Multiplication of DFTs Chapter 8: The Discrete Fourier Transform 31

8. 7 Linier convolution using the DFT DSP • Efficient algorithms are available for

8. 7 Linier convolution using the DFT DSP • Efficient algorithms are available for computing the DFT of finite-duration sequence, therefore it is computationally efficient to implement a convolution of two sequences by the following procedure: – Compute the N point discrete Fourier transforms X 1[k] and X 2[k] for the two sequences given. – Compute the product X 3[k]=X 1[k]X 2[k]. – Compute the inverse DFT of X 3[k]. • The multiplication of discrete Fourier transforms corresponds to a circular convolution. To obtain a linear convolution, we must ensure that circular convolution has the effect of linear convolution. Chapter 8: The Discrete Fourier Transform 32

Linear convolution of two finite-length sequences Chapter 8: The Discrete Fourier Transform DSP 33

Linear convolution of two finite-length sequences Chapter 8: The Discrete Fourier Transform DSP 33

Circular convolution as linear convolution DSP With aliasing Without aliasing Chapter 8: The Discrete

Circular convolution as linear convolution DSP With aliasing Without aliasing Chapter 8: The Discrete Fourier Transform 34

DSP

DSP

DSP

DSP

DSP

DSP

Implementing LTI systems using the DFT DSP • Let us consider an L point

Implementing LTI systems using the DFT DSP • Let us consider an L point input sequence x[n] and a p point impulse response h[n]. • The linear convolution has finite-duration with length L+P-1. • consequently for linear convolution and circular convolution to be identical, the circular convolution must have the length of at least L+p-1 points. • i. e. both x[n] and h[n] must be augmented with sequence amplitude with zero amplitude. • This process is often referred to as zero-padding. Chapter 8: The Discrete Fourier Transform 38

Implementing LTI systems using the DFT cont’d DSP • In many applications the input

Implementing LTI systems using the DFT cont’d DSP • In many applications the input signal is an indefinite duration. – We have to store all the input data. – No filtered samples calculated until all the input samples have been collected. – Implementing FFT for such large number of points is impractical. • The solution is to use block convolution. • In this method signal is segmented into sections and each section can then be convolved with the finite length impulse response and the filtered sections fitted together in an appropriate way. Chapter 8: The Discrete Fourier Transform 39

Implementing LTI systems using the DFT cont’d Chapter 8: The Discrete Fourier Transform DSP

Implementing LTI systems using the DFT cont’d Chapter 8: The Discrete Fourier Transform DSP 40

Overlap-add method Chapter 8: The Discrete Fourier Transform DSP 41

Overlap-add method Chapter 8: The Discrete Fourier Transform DSP 41

Overlap-add method DSP • xr[n] has L nonzero points and h[n] is of length

Overlap-add method DSP • xr[n] has L nonzero points and h[n] is of length P, each of yr[n] has length L+P-1. • A method to implement linear convolution is the nonzero points in the filtered sections will overlap by P-1 points and these overlap samples must be added to compute linear convolution. • This method is called overlapadd method. Chapter 8: The Discrete Fourier Transform 42

Overlap-Save Method DSP

Overlap-Save Method DSP

Overlap-save method DSP • It corresponds to implementing an L-point circular convolution of a

Overlap-save method DSP • It corresponds to implementing an L-point circular convolution of a Ppoint impulse response h[n] with an L-point segment xr[n] and identifying the part of singular convolution that corresponds to linear convolution. • We showed that if an L-point sequence is circularly convolved with a P-point sequence (P<L) then the first P-1 point of result are incorrect. • This method is called overlap-save method. Chapter 8: The Discrete Fourier Transform 44