<< Chapter < Page | Chapter >> Page > |
Down load the audio files
speech.au and
music.au .
Use your
Uquant
function to quantize each of these signals to
7, 4, 2 and 1 bits/sample.Listen to the original and quantized signals and answer the following
questions:
Use
subplot
to plot in the same figure,
the four quantized speech signals over theindex range 7201:7400.
Generate a similar figure for the music signal, using the same indices.Make sure to use
orient tall
before printing these out.
As we have clearly observed, quantization produces errors in a signal. The most effective methods for analysis of the error turn outto be probabilistic. In order to apply these methods, however, one needs to have a clear understanding of the error signal'sstatistical properties. For example, can we assume that the error signal is white noise? Can we assume that it is uncorrelatedwith the quantized signal? As you will see in this exercise, both of these are good assumptions if the quantization intervalsare small compared with sample-to-sample variations in the signal.
If the original signal is , and the quantized signal is , 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
to
.
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.
Next we will examine correlation properties of the error signal. First compute and plot an estimate of the autocorrelation functionfor 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)
One way to measure the quality of a quantized signal is by the Power Signal-to-Noise Ratio (PSNR).This is defined by the ratio of the power in the quantized speech to power in the noise.
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?