Digital Signal Processing Reference
In-Depth Information
1
0
−1
0
5
10
15
20
25
30
(a) Sample
1
0
−1
0
10
20
30
40
50
60
(b) Sample
1
0
−1
0
10
20
30
40
50
60
(c) Sample
Figure 3.25: (a) Original sequence; (b) Sequence at (a) with one zero-valued sample inserted between
each original sample; (c) Sequence at (b) after being lowpass-filtered.
Figure 3.26 shows what happens from the frequency-domain point of view: at (a), where we see
that the spectrum shows only a single frequency (4 Hz), corresponding to the four cycle sine wave shown
in plot (a) of Fig. 3.25. After zero-stuffing, another frequency component appears at 28 Hz (plot (b) of
Fig. 3.26). Thinking logically, we want only the 4 Hz component in the final sequence, so lowpass filtering
to get rid of the 28 Hz should restore the signal to something that looks like a pure sine wave, which in fact
it does. Plot (c) of Fig. 3.26 shows the resultant spectrum, which shows a few small amplitude components
at frequencies other than four. These components correspond to the distortion which may be seen on the
leading edge of the signal shown in plot (c) of Fig. 3.25. This distortion is merely the transient, nonvalid
output of the lowpass filter used to eliminate the high frequency (28 Hz in this example) component.
Example 3.26. Demonstrate interpolation of a multi-frequency audio signal. Play the interpolated
sequence at the original sample rate to show the frequency decrease, and play it at the new sample rate
necessary to maintain the original output frequencies.
The script
LV _ I nterpAudio(I nterpF ac)
allows you to interpolate an audio signal which is a mixture of frequencies 400, 800, and 1200 Hz, sampled
at 11025 Hz, and play the results. The value of input argument InterpFac is limited to 2 and 4.
Search WWH ::




Custom Search