Let us also assume that we have chosen a block size of N for the DFTs and the

# Let us also assume that we have chosen a block size

This preview shows page 85 - 92 out of 193 pages.

Let us also assume that we have chosen a block size of N for the DFTs and the inverse DFTs. Normally, we would choose N = 2 k for some integer k to facilitate the use of an FFT algorithm. The blocks of input data are then chosen as follows. 1 The first M - 1 samples of the first data block will be zeros. The next L = N - M + 1 samples will be the first L samples of the input data. 2 The first M - 1 samples of the subsequent data blocks will come from the last M - 1 data samples of the last data block. The next L samples will be the next L new samples of the data sequence. C. Williams & W. Alexander (NCSU) THE DISCRETE FOURIER TRANSFORM ECE 513, Fall 2019 85 / 193 Overlap–Save Method In this way, each block will involve L new samples of the input sequence. The output corresponding to each input block will be the last L samples of each output block. The first M - 1 samples are discarded. C. Williams & W. Alexander (NCSU) THE DISCRETE FOURIER TRANSFORM ECE 513, Fall 2019 86 / 193 Overlap–Save Example Example (7.4) Consider the use of the overlap–save procedure for filtering long sequences when the input sequence is a speech sample with a duration of 4 seconds and a sampling rate of 8000 samples per second. The FIR filter to be used has 100 filter coefficients. In this example, we will consider the total number of complex multiplication required to filter the sequence using the direct method and compare it with the number required for the overlap–save method. C. Williams & W. Alexander (NCSU) THE DISCRETE FOURIER TRANSFORM ECE 513, Fall 2019 87 / 193 Overlap–Save Example Example (7.4) The number of complex multiplications required to compute a N point FFT is given by K = N log 2 ( N ) (64) The total number of samples in the sequence is L 1 = 4 ( 8000 ) = 32000 (65) The minimum number of samples to use for the FFT in order to obtain a linear convolution result is N 1 = 32000 + 100 - 1 = 32099 (66) The next number that is a power of 2 is N 1 = 2 15 = 32768 (67) C. Williams & W. Alexander (NCSU) THE DISCRETE FOURIER TRANSFORM ECE 513, Fall 2019 88 / 193 Overlap–Save Example Example (7.4) We need to add 32768 - 32000 = 768 zeros to the end of the sample sequence and 32768 - 100 = 32668 zeros to the end of the FIR filter. We then compute the FFT of both sequences and multiply them point by point to obtain the DFT of the output. We then use the inverse FFT (IFFT) algorithm to obtain the output. This means that we need to compute the FFT twice and the IFFT once. The point by point multiplication of the two DFTs requires 32768 complex multiplications. The total number of complex multiplications is K 1 = 3 ( 32768 )( 15 ) + 32768 = 1507328 (68) C. Williams & W. Alexander (NCSU) THE DISCRETE FOURIER TRANSFORM ECE 513, Fall 2019 89 / 193 Overlap–Save Example Example (7.4) If we use a block size of N 2 = 256 ( 2 8 ) samples for the overlap–save method, then each time we use L 2 = 256 - 100 + 1 = 157 (69) new samples in each input block of data. We would have to use B 2 = 32000 157 = d 203 . 82 e = 204 (70) blocks. C. Williams & W. Alexander (NCSU) THE DISCRETE FOURIER TRANSFORM ECE 513, Fall 2019 90 / 193 Overlap–Save Example Example (7.4) The total number of complex multiplications required is K 2 = 204 [ 2 ( 256 )( 8 ) + 256 ] + 256 ( 8 ) K 2 = 889856 (71) It helps that we only need to compute the DFT of the filter once.  #### You've reached the end of your free preview.

Want to read all 193 pages?

• • • 