Digital Signal Processing Reference
In-Depth Information
alty3pt2 = sin(2*pi*2.2 / 511)
which yield y3pt2 = 0.02699 and alty3pt2 = 0.02704, which differ by about 5.3 parts in one hundred
thousand. The error varies according to where in the cycle of the sinusoid you are interpolating.
The script (see exercises below)
LV xSineROMNonIntDecInterp(N,F _ ROM, D)
affords experimentation with nonintegral decimation of a sinusoid. For this script, D may have a nonin-
tegral value. A typical call, which results in Fig. 3.39, would be
LVxSineROMNonIntDecInterp(32,1,2.5)
In plot (a) of Fig. 3.39, the known (ROM) sample values are plotted as stems with small circles,
and the values computed by linear interpolation for a decimation factor of 2.5 (sample index numbers 1,
3.5, 6, 8.5, etc.) are plotted as stems with diamond heads. In the lower plot, the computed values marked
with diamonds in the upper plot are extracted and plotted to show the decimated output sequence (the
computation shown in the figure was stopped before the computed value of the address exceeded the
ROM length in order to keep the displayed mixture of existing ROM samples and interpolated samples
from becoming confusing).
The decimation factor may also be less than 1.0, which leads to a frequency reduction rather than
a frequency increase. Figure 3.40 shows the first 32 samples of the decimated output sequence when the
decimation factor is set at 0.5.
3.18 COMPRESSION
An interesting and useful way to reduce the apparent quantization noise when using a small number of
bits (such as eight or fewer) is to use A-Law or μ -Law compression. These two schemes, which are very
similar, compress an audio signal in analog form prior to digitization.
In an analog system, where μ -Law compression began, small signal amplitudes are boosted ac-
cording to a logarithmic formula. The signal is then transmitted through a noisy channel. Since the
(originally) lower level audio signals, during transmission, have a relatively high level, their signal to
noise ratio emerging from the channel at the receiving end is much better than without compression.
The expansion process adjusts the gain of the signal inversely to the compression characteristic, but the
improved signal-to-noise ratio remains after expansion.
Using a sampled signal sequence, the signal samples have their amplitudes adjusted (prior to being
quantized) according to the following formula:
]
S MAX
s
[
n
F(s
[
n
]
)
=
S MAX ( log ( 1
+
μ
)/ log ( 1
+
μ))sgn(s
[
n
]
)
(3.6)
where S MAX is the largest magnitude in the input signal sequence s
[
n
]
, sgn is the sign function, F(s
[
n
]
)
is the compressed output sequence, and μ is a parameter which is typically chosen as 255.
In compression, smaller signal values are boosted significantly so that there are far fewer small
values hovering near zero amplitude. This is because with a small number of bits, small amplitudes suffer
considerably more than larger amplitudes. Pyschoacoustically speaking, larger amplitude sounds mask
noise better than smaller amplitude sounds. A large step-size (and the attendant quantization noise)
at low signal levels is much more audible than the same step-size employed at high amplitude levels.
Search WWH ::




Custom Search