As we have clearly observed, quantization produces errors in a signal.
The most effective methods for analysis of the error turn out
to be probabilistic. In order to apply these methods, however,
one needs to have a clear understanding of the error signal's
statistical properties. For example, can we assume that the
error signal is white noise? Can we assume that it is uncorrelated
with the quantized signal? As you will see in this exercise,
both of these are good assumptions if the quantization intervals
are small compared with sample-to-sample variations in the signal.
If the original signal is XX, and the quantized signal is YY, the error signal
is defined by the following:
Compute the error signal for the quantized speech for 7, 4,
2 and 1 b/sample.
When the spacing, ΔΔ,
between quantization levels is sufficiently small,
a common statistical model for the error is a uniform
distribution from -Δ2-Δ2 to Δ2Δ2.
Use the command hist(E,20)
to generate 20-bin histograms
for each of the four error signals.
Use subplot to place the four histograms in the same figure.
-
Hand in the histogram figure.
- How does the number of quantization levels
seem to affect the shape of the distribution?
- Explain why the error histograms you obtain might not be uniform?
Next we will examine correlation properties of the error signal.
First compute and plot an estimate of the autocorrelation function
for each of the four error signals using the following commands:
[r,lags] = xcorr(E,200,'unbiased');
plot(lags,r)
Now compute and plot an estimate of the cross-correlation function
between the quantized speech Y and each error signal E using
[c,lags] = xcorr(E,Y,200,'unbiased');
plot(lags,c)
-
Hand in the autocorrelation and cross-correlation estimates.
- Is the autocorrelation influenced by the number of quantization levels?
Do samples in the error signal appear to be correlated with each other?
- Does the number of quantization levels influence the cross-correlation?