Digital Communications: Analog Vs Digital Communication Pulse Code Modulation (PCM) Quantization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Digital Communications

◮ Analog vs Digital Communication


◮ Pulse Code Modulation (PCM)
◮ Quantization
◮ Uniform Quantization
◮ Non-Uniform Quantization
◮ Quantization Error
◮ PCM Bandwidth
◮ PCM SNR
Analog vs. Digital Communication
◮ Analog communication (baseband and modulated) is subject to noise.
◮ Pulse modulations (PAM, PWM, PPM) represent analog signals by
analog variations in pulses and are also sunbject to noise.
◮ Long distance communication requires repeaters, which amplify signal
and noise. Each link adds noise.
◮ Digital communication suppresses noise by regenerating signal.
Pulse Code Modulation (PCM)
In PCM, a signal value is represented by a sequence of pulses (digits).
Width and spacing of pulses is constant. Value of pulse is chosen from a
small number of values.
Usually PCM uses only two pulse values, which represent 0 and 1.

If m bits are used, then 2m signal values can be represented.


◮ unsigned linear: 0, ν, . . . , ∆ν(2m − 1)
◮ two’s complement: −∆ν2m−1 , . . . , ∆ν(2m−1 − 1)
◮ A-law and µ-law: approximately logarithmic (more dynamic range)
PCM and Quantization
Quantization of a signal produces the closest representable value.
For fixed number of values, spacing between values increases with range.
PCM Tradeoffs
◮ Signal bandwidth determines minimum sample rate
◮ Desired signal fidelity determines precision of reproduced signal
◮ Signals can be quantized using digital-to-analog converter (DAC)
2

−1

−2
0 0.5 1 1.5 2 2.5 3 3.5 4

−1

−2
0 0.5 1 1.5 2 2.5 3 3.5 4

−1

−2
0 0.5 1 1.5 2 2.5 3 3.5 4
Uniform Quantization
An ideal uniform quantizer is a nonlinear time invariant system:


−Nl ∆ν g(t) < −Nl ∆ν

ge(t) = n∆ν (n − 21 )∆ν < g(t) < (n + 12 )∆ν, −Nl < n < Nh


N ∆ν g(t) > N ∆ν
h h
∆ν is quantization interval. Nl + Nh is number of levels.
Nonuniform Quantization
Nonuniform quantizers increase quantization intervals as magnitude of
value. Interval proportional to value implies logarithmic curve.

An analog compressor (semiconductor diode) can be used.


Nonuniform Quantization (cont.)
Logarithmic compression can be approximated by floating point, A-law, and
µ-law representations.
◮ Binary floating point corresponds to scientific notation:
±f × 2e
where f is significand or fraction and e is exponent. Both f and e are
represented in unsigned binary.
Example: 8-bit code with one bit for sign, 4 bits for f , 3 bits for e,
f = 0, 1, . . . , 15 , e = 0, 1, . . . , 7
The representable values range from −15 · 27 = −1920 to 1920.
Quantization spacing range from 1 for |y| < 16 to 128 for |y| > 960.
Disadvantage of floating point is that many values have multiple
representations. E.g., this scheme represents only 72 values.

Some writers use mantissa instead of significand.


Nonuniform Quantization (cont.)
Telephone systems use ITU standardized compression formula.
◮ µ-law: North America and Japan. For µ = 255 (for 8-bit codes),
1
y = sgn(x) ln (1 + µ|x|) , (0 < x < 1)
ln(1 + µ)
◮ A-law: Europe, rest of world.

 A|x| 1

sgn(x) 1 + ln(A) |x| <
A
y=

 1 + ln(A|x|) 1
sgn(x) < |x| < 1
1 + ln(A) A
The standard value is A = 87.7.

For both laws, the input to the compressor is


m(t)
x=
mp
where −mp ≤ m(t) ≤ mp .
Comparison of µ-Law and A-Law

◮ µ-law provides slightly larger dynamic range than A-law.


◮ A-law has smaller proportional distortion for small signals.
◮ A-law is used for international connections if at least one country uses it.
µ-Law Implementation
Both µ-law and A-law expanders are piecewise linear.
This table shows how 7 bits are expanded.

In practice this table is used by the µ-law encoder.


µ-Law Signal-to-Noise Ratio
The average power of a compressed signal is closer to the peak power.
Quantization Error
Uniform quantization with L levels of a signal with peak amplitude mp has
maximum quantization error
mp
max error = ,
L
and mean square error
m2p
average square error =
3L2
Example: signal quantized to 4 and 16 levels.
2

−1

−2
0 0.5 1 1.5 2 2.5 3 3.5 4

−1

−2
0 0.5 1 1.5 2 2.5 3 3.5 4

−1

−2
0 0.5 1 1.5 2 2.5 3 3.5 4
Quantization Error (cont.)
Quantization error for quantizing to 4 and 16 levels.
0.3

0.2

0.1

−0.1

−0.2

−0.3

−0.4
0 0.5 1 1.5 2 2.5 3 3.5 4

0.15

0.1

0.05

−0.05

−0.1

−0.15

−0.2
0 0.5 1 1.5 2 2.5 3 3.5 4

Power of quantization error for above example is


1 1
0.0863 ≈ 3 2−2 (L = 4) and 0.0180 ≈ 3 2−4 (L = 16)

3L2
Fact: for µ-law, SNR is if µ ≫ mp /rms(m(t)).
(ln(1 + µ))2
Bandwidth vs. Quantization Error
What bandwidth is needed to transmit a PCM encoded signal?
Example: suppose that we want maximum error 0.5%mp for a 3 kHz signal.
∆ν mp 0.5
= = mp =⇒ L = 200 < 28
2 L 100
At Nyquist sample rate
RN = 2 · 3000 = 6000 Hz
we need 6000 · 8 = 48000 bits/sec.
Fact: a bandlimited signal can convey two symbols per Hz.
For binary PCM, we need 48000/2 = 24000 Hz.
For practical reasons, we sample faster than the Nyquist rate.
E.g., at rate 4000 Hz, the required bandwidth is 32 kHz.
PCM SNR
The signal-to-noise ratio is
average signal power
SN R =
average noise power
For uniform quantization noise,
average signal power ≈ am2p (a ≈ 12 )
quantization error ≈ 13 (mp /L)2
SNR ≈ cL2 = c22m
where m is the number of bits in the PCM sample, so L = 2m . c is a
constant.
SNR grows exponentially with the number of bits.
If we measure SNR in dB,
SN RdB = 10 log10 (c22m ) = 10 log 10 (c) + 2m log10 2 = (α + 6m)dB
where α = 10 log10 c.
Increasing n by one bit improves SNR by 6 dB! One bit quadruples SNR.
PCM SNR
Consider two cases for a 4 kHz bandwidth signal
◮ L = 64, m = 6 bits
SN RdB = α + 36 dB
◮ L = 256, and m = 8 bits

SN RdB = α + 48 dB

We’ve gained 12 dB in SNR. However, the PCM bandwidth has increased


only from
(2 × 4 kHz)(6 bits)/2 = 24 kbits/sec
to
(2 × 4 kHz)(8 bits)/2 = 32 kbits/sec
We only need 1/3 greater bandwidth for a 12 dB improvements in SNR.
The value of α (and c) depend on the quantization method, but are
constants given that.
Logarithmic Units
In communications we often measure ratios using logarithms.
The bel (B) is the log10 of a ratio. More useful is the decibel (dB):
a a
in dB is 10 log10
b b
Examples: 2 ⇔ 3.01 ≈ 3 dB, 5 ⇔ 4.77 ≈ 5 dB
Why measure in dB?
◮ Some sensors (human eyes, ears) respond to logarithm of signal power.

◮ Many transmission media have attenuation that is exponential in length.


Thus the signal loss in dB is proportional to length.
◮ Calculating how much power is needed in a communications system
requires a link budget, which is additive in dB.
rcv power (dBm) = xmit power (dBm) + gains (dB) − losses (dB)
◮ Since dB measures ratio, we must specify a reference value for 0 dB.
◮ dbW: 0 dB = 1 W
◮ dBm: 0 dB = 1 mW
Audio Volume (Sound Pressure)
◮ The SI unit of pressure is the pascal (Pa): 1 N/m2
◮ Atmospheric pressure at sea level is 14.7 lb/in2 or 101325 Pa
◮ Audio reference level: 20 µPa, threshold of human hearing.
Another reference level is 1 pW = 10−12 W.
◮ Example audio levels (rms of sound pressure):
◮ 20–30 dB: quiet room
◮ 60 dB: TV at normal volume
◮ 85 dB: hearing damage (long term)
◮ 100 dB: jack hammer
◮ 140 dB: aircraft carrier deck
◮ 120 dB: vuvuzuela, thunderclap, chain saw
◮ 175 dB: stun grenade
◮ 194 dB: atmospheric pressure (shock wave)
Wireless Receive Power and SNR
Data from John Gill.

Receive power ranges from −32 to −71 dB (6.3 × 10−7 to 7.9 × 10−11 W).
The most powerful transmitter was 4 feet from the receiver.

You might also like