This document discusses uniform and non-uniform quantization as it relates to PCM systems. It begins with a review of uniform quantization, quantization noise, and signal-to-noise ratio calculations. It then discusses how uniform quantization negatively impacts low amplitude signals like voice. Non-uniform quantization through companding is introduced to increase quantization levels for low amplitudes. The document provides examples of compressors, quantizers, and expanders used in non-uniform quantization systems and examines their effects on voice signals. It concludes with discussions of quantizing noise and designing PCM systems for telephone networks.
2. PCM Noise and Companding
2
Review of uniform quantization
Quantization Noise
Signal to Noise Ratio
PCM Telephone System
Nonuniform Quantization
Companding
3. Quantization
● Quantization is done to make the signal amplitude
discrete
Analog
Signal
Sampling
Discrete
Time
Cont.
Ampl.
Signal Quantization
Discrete
Time &
Discrete
Ampl
Signal
Mapping
Binary
Sequence
4. Review of uniform quantization
A/D D/Ax y
Digital representations of analog signals are in the
form of bits. These bits are taken from an analog-to-
digital converter, processed and then put to a digital-
to-analog converter.
bits
Filtering
bits
5. What is the number of bits needed per sample to
accurately represent the analog signal?
6. With B bits, we can represent 2B different values.
For example, if B=3, we can have eight different
values corresponding to 000, 001, 010, 011, 100,
101, 110, 111.
The 2B values can correspond to volts, millivolts,
multiplies of 0.25 volts, etc.
7. Example: Suppose we had B=3 bits corresponding
to a number which is equal to the voltage of a signal
(at some point in time). The 23=8 different voltage
levels are 0V, 1V, 2V, 3V, 4V, 5V, 6V and 7V.
A digital-to-analog converter would convert 000 to
0V, 001 to 1V, etc.
An analog-to-digital converter would convert an input
signal at 0V to 000. An input of 1V would be
converted to 001; an input of 2V would be converted
to 010, etc.
8. Suppose the input signal to an analog-to-digital
converter were 1.5V. Would this voltage be
converted to 001 or 010? The answer depends
upon the type of quantization used by the analog-
to-digital converter.
If the type of quantization is truncation, then all
values from 1.0V up to but not including 2.0V are
converted to 001.
If the type of quantization is rounding, then all
values from 0.5V up to but not including 1.5V are
converted to 001. Values of from 1.5V up to but not
including 2.5V are converted to 010.
9. Let ^xbe the quantized version of x. While x can
take on any value, x^can only take on discrete
values corresponding to the output of a digital-to-
analog converter such as 1.0, 2.0, 3.0 (volts).
If we cascade an analog-to-digital converter with a
digital-to-analog converter we will get a quantizer
that converts x to x^.
A/D D/Ax x^000, 001, …
13. Negative values can also be represented digitally.
There are two common formats: sign magnitude
and two’s complement.
In sign magnitude format, the most significant bit is
a sign bit:1 is negative, 0 is positive.
In two’s complement format, positive numbers are
like normal positive numbers. Negative numbers are
wrapped backwards: -1 is 111, -2 is 110, etc.
14. Shown on the following graphs are signed
quantization levels and values for truncation and
rounding quantization, and sign magnitude and two’s
complement formats.
19. In all of the previous quantization examples, the step
size was one (1). The step size could be 0.5, 0.25,
etc. Let be the step size, also known as the
quantization interval.
For truncation quantization, the quantization
error is between 0 and
For rounding quantization, the quantization error
is between - and +
20. The ratio of the maximum signal magnitude to the
quantization interval is a measure of the fidelity of
the digitized sample. Let us see if we can relate this
ratio to a more common ratio called the signal-to-
noise ratio (SNR).
Let A be the maximum magnitude of a signal. The
ratio of the maximum magnitude to the quantization
interval is A/.
The signal-to-noise ratio is a ratio of powers. The
power in a signal is related to its distribution.
21. If the signal is uniformly distributed between –A
and A, the distribution looks like this:
px(x)
x
A-A
22. In many cases, we can assume that the distribution
of the quantization error, e, is uniform:
pe(e)
Truncation
e
23. In many cases, we can assume that the distribution
of the quantization error, e, is uniform:
pe(e)
Rounding
e
/2-/2
24. The power may be obtained from a distribution by
integrating the product of the distribution with x2 or
e2.
x2
p (x)dxxxP
.
3(2A) 3
2A
x2 1
dx
A
2A3
A2
A
25. 12
e2
p (e)deP ee
For truncation quantization we have
.
0
2
3() 3
()3
dee
26. 12
/2
e2
p (e)deP ee
For rounding quantization we have
.
2
3() 12
2( /2)3
/2
dee
27. We can now calculate the signal-to-noise ratio for a
uniformly distributed signal with truncation and
rounding quantization:
SNR
Px
Pe
Truncation
3
2
3
A
2
SNR
A2
29. Exercise: If we use B-bit quantization (with 2B
quantization levels), express the signal-to-noise ratio
in dB [=10 log (power ratio)] in terms of B for both
truncation and rounding quantization. (In both
cases, 2A/ = 2B.)
30. Uniform Quantization
It
disadvantage of using uniform quantization is
was discussed in the previous lecture that the
that low
30
amplitude signals are drastically effected.
This fact can be observed by considering the simulation
results in the next four slides.
In both cases two signals with a similar shape, but different
amplitudes, are applied to the same quantizer with a
spacing of 0.0625 between two quantization levels.
The effects of quantization on the low amplitude signal are
obviously more significant than on the high amplitude signal.
36. Uniform Quantization
Recall that the Signal to Quantization Noise Ratio of a
uniform quantizer is given by:
pmˆ2
2 m2
(t)
SNq R 3L
36
This equation verifies the discussion that SNqR for a low
amplitude signal is quite low. Therefore, the effect of
quantization noise on such audio signals should be
noticeable. Lets consider the case of voice signals.
37. Uniform Quantization
37
Click on the following links to listen to a sample voice signal. First play “voice file-1”;
then play “voice file-1 Quantized”. Do you notice the degradation in voice quality?
This degradation can be attributed to uniformly spaced quantization levels.
Voice file-1 Voice file-1. Quantized (uniform)
Note: You may not notice the difference between the two clips if you are using
small laptop speakers. You should use either headphones or larger speakers.
38. Uniform Quantization
38
More insight into signal degradation can be gained by looking at the voice signal’s
Histogram. A histogram shows the distribution of values of data. Figure-2 below shows
the histogram of the voice signal-1. Most of the values have low amplitude and occur
around zero. Therefore, for voice signals uniform quantization will result in signal
degradation.
Figure-2 Histogram of voice signal-1
39. Non-Uniform Quantization
39
The effect of quantization noise can be reduced by increasing the number of
quantization intervals in the low amplitude regions. This means that spacing between
the quantization levels should not be uniform.
This type of quantization is called “Non-Uniform Quantization”. Input-Output
Characteristics shown below.
40. Non-Uniform Quantization
● In speech signals, very low speech volumes
predominates
Only 15% of the time, the voltage exceeds the RMS value
● These low level signals are under represented with
uniform quantization
Same noise power (q2/12) but low signal power
● The answer is non uniform quantization
41. Non-uniform Quantization
41
1. Non-uniform quantization is achieved by, first passing
the input signal through a “compressor”. The output
of the compressor is then passed through a uniform
quantizer.
2. The combined effect of the compressor and the
uniform quantizer is that of a non-uniform quantizer.
(see figure 3.)
3. At the receiver the voice signal is restored to its
original form by using an expander.
43. mp
ln(1 m(t)
)
1
ln(1)
y
A-Law (USA)
Non-uniform Quantization (Companding)
43
0
m (t )
1
m p
Where,
The value of ‘µ’ used with 8-bit quantizers for voice signals is 255
47. Non-uniform Quantization (Companding)
m(t) mˆ(t)
Uniform Quantizer
47
Click on symbols to listen to
voice signal at each stage
A uniform quantizer with input and output voice files is presented
here for comparison with non-uniform quantizer.
48. Non-Uniform Quantization
48
Lets have a look at the histogram of the compressed voice signal. In contrast to the
histogram of the uncompressed signal (figure-2) you can see that the values are now
more distributed. Therefore, it can be said that the compressor changes the histogram/
pdf of the voice signal from gaussian (bell shape) to a uniform distribution (shown
below).
Figure-3 Histogram of compressed voice signal
49. Non-Uniform Quantization
Where is the Compression..??? 49
The compression process in Non-uniform quantization demands some elaboration for
clarity of concepts. It should be noted that the compression mentioned in previous slides
is not the time or frequency domain compression which students are familiar with. This
can be verified by looking at the time domain waveforms at the input and output of the
compressor. Note that both the signals last for 3.75 seconds. Therefore, there is no
compression in time or frequency.
Fig-4-a Signal at Compressor Input Fig-4-b Signal at Compressor Output
50. Non-Uniform Quantization
Where is the Compression..??? 50
The compression here occurs in the amplitude values. An intuitive way of explaining this
compression in amplitudes is to say that the amplitudes of the compressed signal are
more closely spaced (compressed) in comparison to the original signal. This can also be
observed by looking at the waveform of the compressed signal (fig-4-b). The
compressor boosts the small amplitudes by a large amount. However, the large
amplitude values receive very small gain and the maximum value remains the same.
Therefore, the small values are multiplied by a large gain and are spaced relatively
closer to the large amplitude values.
A parameter which can be used to measure the degree of compression here is the
Dynamic range. “The Dynamic Range is the ratio of maximum and minimum value of a
variable quantity such as sound or light”.
In the simulations the Dynamic Range (DR) of the compressor input = 41.45 dB
Whereas Dynamic Range (DR) of compressor output = 13.95 dB
51. Quantization Noise
The process of quantization can be interpreted as an additive
noise process.
Signal
X
Quantized
Signal
XQ
●The signal to quantization noise ratio (SNR)Q=S/N is
given as:
Quantization
Noise
nQ
Q
Average Power{X}
(SNR)Q
Average Power{n }
52. Effects of Noise on PCM
Eeng
360
Two main effects produce the noise or
52
stortion in the PCM output:
Q u a n t i z i n g noise that is caused by the
di
ep quantizer at the PCM
transmitter. , caus B i t errors in the recovered PCM signal
M-st
ed by channel noise and improper filtering.
● If the input analog signal is band limited and sampled fast enough so that the
aliasing noise on the recovered signal is negligible, the ratio of the recovered
analog peak signal power to the total average noise power is:
● The ratio of the average signal power to the average noise power is
M is the number of quantized levels used in the PCM
system. Pe is the probability of bit error in the recovered binary PCM signal at the receiver
DAC
before it is converted back into an analog signal.
53. Effects of Quantizing Noise
360
53
● If Pe is negligible, there are no bit errors resulting from channel noise and no ISI,
the Peak SNR resulting from only quaEenngtizingerror is:
● The Average SNR due to quantizing errors is:
● Above equations can be expresses in decibels as,
Where, M = 2n
α = 4.77 for peak SNR
α = 0 for average SNR
54. 360
54
DESIGN OF A PCM SIGNAL FOR TELEPHONE SYSTEMS
● Assume that an analog audio voice-frequency(VF) telephone signal occupies a band
from 300 to 3,400Hz. The signal is to be converted to a PCM signal for transmission
over a digital telephone system. The minEimengumsampling frequency is 2x3.4 = 6.8
ksample/sec.
● To be able to use of a low-cost low-pass antialiasing filter, the VF signal is
oversampled with a sampling frequency of 8ksamples/sec.
● This is the standard adopted by the Unites States telephone industry.
● Assume that each sample values is represented by 8 bits; then the bit rate of the
binary PCM signal is
8
• This 64-kbit/s signal is called a DS-0 signal (digital signal, type zero).
• The minimum absolute bandwidth of the binary PCM signal is
This B is for a sinx/x type pulse sampling
PCMB
R
nfs
2 2
55. DESIGN OF A PCM SIGNAL FOR TELEPHONE SYSTEMS
Eeng
360
55
● We require a bandwidth of 64kHz to transmit this digital voice PCM signal, whereas
the bandwidth of the original analog voice signal was, at most, 4kHz.
● We observe that the peak signal-to-quantizing noise power ratio is:
• If we use a rectangular pulse for sampling the first null bandwidth is
given by
Note:
1. Coding with parity bits does NOT affect the quantizing noise,
2. However coding with parity bits will improve errors caused by
channel or ISI, which will be included in Pe ( assumed to be 0).
56. Nonuniform Quantization
Eeng
360
56
Many signals such as speech have a nonuniform distribution.
T h e amplitude is more likely to be close to zero than to be at
higher levels.
6
Nonuniform quantizers have unequally spaced levels
T h e spacing can be chosen to optimize the SNR for a particular type of
signal.
Output sample
XQ
2 4
2
4
-2
-4
-6
6 8
Input sample
X
-2-4-6-8
Example: Nonuniform 3 bit quantizer
58. Companding
360
58
● Nonuniform quantizers are difficult to make and expensive.
Eeng
● An alternative is to first pass the speech signal through a nonlinearity before
quantizing with a uniform quantizer.
● The nonlinearity causes the signal amplitude to be Compressed.
The input to the quantizer will have a more uniform distribution.
● At the receiver, the signal is Expanded by an inverse to the nonlinearity.
● The process of compressing and expanding is called Companding.
59. -Law Companding
Eeng
360
59
● Telephones in the U.S., Canada
and Japan use -law
companding:
| y ( t ) |
1
Where = 255 and |x(t)| <
1
ln (1 | x ( t )|)
ln (1 )
0 1
Input |x(t)|
Output|x(t)|
60. Non Uniform quantizing
Eeng
360
60
● Voice signals are more likely to have amplitudes near zero than at extreme
peaks.
● For such signals with non-uniform amplitude distribution quantizing noise
will be higher for amplitude values near zero.
● A technique to increase amplitudes near zero is called Companding.
Effect of non linear quantizing can
be can be obtained by first passing
the analog signal through a
compressor and then through a
uniform quantizer.
x’
Q(.)
y
Uniform Quantizer
C(.)
Compressor
x x’
63. A-law and law Companding
Eeng
360
63
●These two are standard companding methods.
●u-Law is used in North America and Japan
●A-Law is used elsewhere to compress digital telephone signals
64. 360
64
SNR of Compander
• The output SNR is a function of input signal level for uniform quantizing.
Eeng
• But it is relatively insensitive for input level for a compander
65. SNR Performance of Compander
Eeng
360
65
• The output SNR is a function of input signal level for uniform quantizing.
• But it is relatively insensitive for input level for a compander.
• α = 4.77 - 20 Log ( V/xrms) for Uniform Quantizer
V is the peak signal level and xrms is the rmsvalue
• α = 4.77 - 20 log[Ln(1 + µ)]
• α = 4.77 - 20 log[1 + LnA]
for µ-law companding
for A-law companding
66. V.90 56-Kbps PCM Computer modem
Eeng
360
66
● The V.90 PC Modem transmits data at 56kb/s from a PC via an
analog signal on a dial-up telephone line.
● A µ law compander is used in quantization with a value for µ of
255.
● The modem clock is synchronized to the 8-ksample/ sec clock of
the telephone company.
● 7 bits of the 8 bit PCM are used to get a data rate of 56kb/s (
Frequencies below 300Hz are omitted to get rid of the power line
noise in harmonics of 60Hz).
● SNR of the line should be at least 52dB to operate on 56kbps.
● If SNR is below 52dB the modem will fallback to lower speeds (
33.3 kbps, 28.8kbps or 24kbps).
70. Eye Diagram
● Run the oscilloscope in
the storage mode for
overlapping pulses
● X-scale = pulse width
● Y-Scale = Amplitude
● Close Eye bad ISI
● Open Eye good ISI
71. Time Division Multiplexing (TDM)
● TDM is widely used in digital communication
systems to maximum use the channel capacity
Digit Interleaving
73. TDM
● When each channel has Rb bits/sec bit rate and N
such channels are multiplexed, total bit rate = NRb
(assuming no added bits)
● Before Multiplexing the bit period = Tb
● After Multiplexing the bit period = Tb/N
● Timing and bit rate would change if you have any
added bits
74. North American PCM Telephony
● Twenty four T1 carriers (64kb/s) are multiplexed
to generate one DS1 carrier (1.544 Mb/s)
75. Each channel has 8 bits – 24 Channels
● Each frame has 24 X 8 = 192 information bits
● Frame time = 1/8000 = 125 µs.
76. T1 System Signalling Format
193 framing bits plus more signalling
b i t s final bit rate = 1.544 Mb/s