Digital Signal Processing Reference
In-Depth Information
Notice that xðnÞ and x q ðnÞ are the speech data to be quantized and the quantized speech data, respectively.
Equation (11.2) gives the absolute SNR, and Equation (11.3) produces the SNR in terms of decibels (dB).
Quantization error is the difference between the quantized speech data (or quantized voltage level)
and speech data (or analog voltage), that is, x q ðnÞxðnÞ . Also note that from Equation (11.1) , adding 1
bit to the linear quantizer would improve SNR by approximately 6 dB. Let us examine performance of
the 5-bit linear midtread quantizer.
In the following simulation, we use a 5-bit midtread quantizer to quantize the speech data. After
quantization, the original speech, quantized speech, and quantized error after quantization are plotted in
Figure 11.2 . Since the program calculates x rms =x max ¼ 0 : 203, we yield x rms as x rms ¼ 0 : 203 x max ¼
0 : 0203 5 ¼ 1 : 015 and D ¼ 10 2 5
1 Þ¼ 0 : 3226. Applying Equation (11.1) gives SNR ¼ 21 : 02
dB. The SNR using Equations (11.2) and (11.3) is approximately 21.6 dB.
The first plot in Figure 11.2 is the original speech, and the second plot shows the quantized speech.
Quantization error is displayed in the third plot, where the error amplitude interval is uniformly
distributed between -0.1613 and 0.1613, indicating the bounds of the quantized error ( D = 2). The
details of the MATLAB implementation are given in Program 11.1 in Section 11.7.
To improve the SNR, the number of bits must be increased. However, increasing the number of
encoding bits will cost an expansive ADC device, larger storage media for storing the speech data, and
more bandwidth for transmitting the digital data. To gain a more efficient quantization approach, we
will study m -law companding in the next section.
5
0
-5
0
200
400
600
800
1000
1200
1400
1600
1800
2000
5
0
-5
0
200
400
600
800
1000
1200
1400
1600
1800
2000
0.5
0
-0.5
0
200
400
600
800
1000
1200
1400
1600
1800
2000
Sample number
FIGURE 11.2
Plots of original speech, quantized speech, and quantization error.
 
Search WWH ::




Custom Search