02.10.2019 Views

UploadFile_6417

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Linear Convolution Using the DFT 185<br />

Noting that the first two samples in each section are to be discarded, we assemble<br />

the output y(n) as<br />

The linear convolution is given by<br />

y(n) ={1, 2, 2, 2, 2, 2, 2, 2, 2, 2, −9, −10}<br />

↑<br />

x(n) ∗ h(n) ={1, 2, 2, 2, 2, 2, 2, 2, 2, 2, −9, −10}<br />

↑<br />

which agrees with the overlap-save method.<br />

□<br />

5.5.3 MATLAB IMPLEMENTATION<br />

Using this example as a guide, we can develop a MATLAB function to<br />

implement the overlap-save method for a very long input sequence x(n).<br />

The key step in this function is to obtain a proper indexing for the<br />

segmentation. Given x(n) for n ≥ 0, we have to set the first (M − 1)<br />

samples to zero to begin the block processing. Let this augmented sequence<br />

be<br />

ˆx(n) = △ {0, 0,...,0 ,x(n)}, n ≥ 0<br />

} {{ }<br />

(M−1) zeros<br />

and let L = N − M +1, then the kth block x k (n),<br />

given by<br />

0 ≤ n ≤ N − 1, is<br />

x k (n) =ˆx(m); kL ≤ m ≤ kL + N − 1, k≥ 0, 0 ≤ n ≤ N − 1<br />

The total number of blocks is given by<br />

⌊ ⌋<br />

Nx + M − 2<br />

K =<br />

+1<br />

L<br />

where N x is the length of x(n) and ⌊·⌋ is the truncation operation. Now<br />

each block can be circularly convolved with h(n) using the circonvt<br />

function developed earlier to obtain<br />

y k (n) =x k (n) N○ h(n)<br />

Finally, discarding the first (M − 1) samples from each y k (n) and concatenating<br />

the remaining samples, we obtain the linear convolution y(n).<br />

This procedure is incorporated in the following ovrlpsav function.<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!