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.

Interpolation by a Factor I 489<br />

Ideal Interpolator<br />

x(n)<br />

↑I<br />

v(m)<br />

IDEAL<br />

LPF<br />

y(m)<br />

Rate: F x IF x IF x<br />

FIGURE 9.11<br />

Ideal interpolation by a factor I<br />

Finally, we indicate that the output sequence y(m) can be expressed<br />

as a convolution of the sequence v(n) with the unit sample response h(n)<br />

of the lowpass filter. Thus<br />

y(m) =<br />

∞∑<br />

k=−∞<br />

h(m − k)v(k) (9.34)<br />

Since v(k) = 0 except at multiples of I, where v(kI) = x(k), (9.34)<br />

becomes<br />

∞∑<br />

y(m) = h(m − kI)x(k) (9.35)<br />

k=−∞<br />

The ideal interpolator is shown in Figure 9.11.<br />

MATLAB Implementation MATLAB provides the function [y,h] =<br />

interp(x,I) that resamples the signal in array x at I times the original<br />

sampling rate. The resulting resampled array y is I times longer—i.e.,<br />

length(y) = I*length(x). The ideal lowpass filter given in (9.30) is<br />

approximated by a symmetric filter impulse response, h, which is designed<br />

internally. It allows the original samples to pass through unchanged and<br />

interpolates between so that the mean square error between them and<br />

their ideal values is minimized. The third optional parameter L specifies<br />

the length of the symmetric filter as 2*L*I+1, and the fourth optional<br />

parameter cutoff specifies the cutoff frequency of the input signal in π<br />

units. The default values are L = 5 and cutoff = 0.5. Thus, if I = 2,<br />

then the length of the symmetric filter is 21 for the default L = 5.<br />

□ EXAMPLE 9.4 Let x(n) =cos(πn). Generate samples of x(n) and interpolate them using I =2,<br />

4, and 8 to show the results of interpolation.<br />

Solution<br />

We will plot the middle segments of the signals to avoid end-effects due to<br />

the default lowpass filter in the interp function. The following MATLAB<br />

script shows details of these operations, and Figure 9.12 shows the plots of the<br />

sequences.<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!