You are on page 1of 79

MODULE 15

COMPANDING

Prepared by: Engr. Jo-Ann C. Viñas
OBJECTIVES

1. Advantages and Disadvantages of Digital
Communications
2. Review of Pulse Code Modulation (PCM)
3. Introduce the concept of companding
2. State the importance of companding
3. Discuss the two types of companding
4. Solve problems involving companding
PCM APPLICATIONS

PCM is the most commonly used technique in digital
communications

1. Telephone System
2. Digital Audio Recording
3. CD Laser disks
4. Voice mail
5. Digital Video
ANALOG

“ANALOG means ‘similar’ or a ‘copy’.”

“An Analog audio signal is an electronic copy of an original
audio signal as sound in nature, with a continually varying
signal.”

“Analog copies of any original sound suffers some degree of
signal degradation, called generational loss, and signal strength
lessens and noise increases for each successive copy.”
DIGITAL

“A digital recording is no more than a series of numbers, and
hence can be copied through an indefinite number of
generations without degradation. This implies that the life of a
digital recording can be truly indefinite, because even if the
medium (CD, DAT, etc) begins to decay physically, the sample
values can be copied to a new medium with no loss of
information.”
NOTE:

The established sampling rates for digital audio are:

1. 32 kHz for broadcast digital audio
2. 44.1 kHz for CDs
3. 48 kHz for digital audiotape (DAT) and digital videotape
( mini-DV and DV)
4. 96 kHz or 192. 4 kHz for DVD-audio and BD-ROM (Blu
ray disc) audio
5. 2.8224 MHz for SACD (Super Audio CD) & DSD (Direct
Stream Digital)
ADVANTAGES OF DIGITAL COMMUNICATIONS

1. Digital communication is more rugged than analog
communication
2. The viability of regenerative repeaters
3. Digital hardware implementation is flexible
4. Digital signals can be coded
5. It is easier and more efficient to multiplex several
digital signals
REMOVAL OF NOISE AND DISTORTION FROM
DIGITAL SIGNAL
TYPICAL FOUR-LEVEL SIGNAL USING
1, 2, 3, & 4V
BINARY SIGNAL
REGENERATION OF DIGITAL SIGNAL
OPERATING WITH 1- AND 5V LEVELS
ANALOG SIGNAL AMPLIFIER STAGES ADD
NOISE AT EACH POINT WHILE INCREASING
SIGNAL AMPLITUDE, THUS REDUCING SNR
HARDWARE IMPLEMENTATION IS FLEXIBLE
0 TO +1V ANALOG SIGNAL
2 BITS RESOLUTION
3 BITS RESOLUTION
DISADVANTAGE OF DIGITAL COMMUNICATIONS

1. Increased bandwidth of transmission
ADVANTAGES OF DIGITAL COMMUNICATIONS

Audio compression is typically used for 3 reasons:

1. To reduce the file size so that more audio may be
stored on a given media format (digital audio players, DVD-
video disc, Minidisc. Etc)
2. To reduce the file size so that files will download from a
Web site faster.
3. To reduce the data rate so that files will stream
(broadcast) over a network such as the Internet.
CRITERIA FOR SIGNAL ENCODING

What determines how successful a receiver will be in
interpreting an incoming signal?

1. Signal-to-Noise Ratio
2. Data Rate
3. Bandwidth
An increase in data rate increases bit error rate
An increase in SNR decreases bit error rate
An increase in bandwidth allows an increase in data rate
PULSE CODE MODULATION

- is a method of modulating in which a continuous
analog wave is transmitted in an equivalent digital mode.
NOTE:

“If a band-limited signal is sampled at regular intervals of
time and a a rate equal to or higher than twice the highest
significant signal frequency, then the sample contains all
the information of the original signal. The original signal
may then be reconstructed by use of a low-pass filter.”
PCM TRANSMIT BLOCKS

SAMPLING
SAMPLING QUANTIZING
QUANTIZING ENCODING
ENCODING
QUANTIZATION

Changing from CONTINUOUS IN VALUE to DISCRETE IN
VALUE.
SAMPLING

Changing from CONTINUOUS IN TIME to DISCRETE IN
TIME.
CODING

Code value of sample into 1s and 0s.
PCM PARAMETERS

1. Number of Levels or Codewords (M)
2. Bandwidth (Data Rate) (BW)
3. Dynamic Range (DR)
4. Resolution (Res)
5. Coding Efficiency (η )
6. Quantization Error (Qe)
7. Signal-to-Quantization Noise Ratio (SQR)
PCM PARAMETERS

1. Number of Levels or Codewords (M)

M = 2n

where:
M = # of levels, symbols or codewords
n = # of PCM bits used (sign bit excluded)
= # of bits per sample
PCM PARAMETERS

2. Bandwidth (Data Rate)

BW = nfs = fb

where:
fs = sampling rate in Hz
fb = bit rate in bps
PCM PARAMETERS

3. Dynamic Range

Vmax
DR = 2n - 1 DR =
Vmin

where:
Vmax = maximum input voltage
Vmin = minimum input voltage
DYNAMIC RANGE OF ANALOG
SIGNAL
EXAMPLE

What is the dynamic range of an 8-bit linear sign magnitude
PCM spectrum whose maximum decode voltage at the
receiver is 1.27 Vp? (ECE BOARD EXAM NOV 2002)
PCM PARAMETERS

4. Resolution

Resolution = VLSB

where:
VLSB = voltage of the least significant bit
EXAMPLE

Determine the resolution for an 8-bit linear sign-magnitude
PCM for a maximum decode voltage of 2.55Vp.
(ECE BOARD EXAM NOV 2002)
PCM PARAMETERS

5. Coding Efficiency (η )

β min
η = X 100
β max

where:
β min = Min # of bits (including the sign bit)
β max= Actual # of bits (including the sign bit)
PCM PARAMETERS

6. Quantization Error

VMIN Resolution
Qe = Qe =
2 2
PCM PARAMETERS

7. Signal-to-Quantization Noise Ratio

V
SQR = 10.79 dB + 20 logS
q
PCM PARAMETERS

A. Ideal Signal-to-Quantization Noise Ratio
a. In unitless

S = 3M2 S 3 2n
= (2 )
N N 2
b. In dB

S MOST
= 6.02n + 1.76 USED...
N dB
EXAMPLE

Determine the signal-to-quantization noise ratio in dB, if an
audio signal with a bandwidth of 3.2 kHz is converted to
PCM signal by sampling at 8 kilo samples/sec and with a
data rate of 64 kbps.
CODING

-Practical PCM systems use 7- and 8-level binary code, or

27 = 128 quantum steps
28 = 256 quantum steps
LINEAR QUANTIZATION - SIGNAL AMPLITUDE
VERSUS QUANTIZATION VALUE
NOTE:

-Two methods are used to reduce the quantum steps to
128 or 256 without sacrificing fidelity.

1. Use nonuniform quantizing performed in the coding
process.
2. Use companding prior to quantizing
LINEAR VERSUS NON LINEAR PCM
CODES
NON-LINEAR STEP QUANTIZING
COMPANDING

- the process of compressing and then expanding

- with companded system, the higher amplitude analog
signals are compressed (amplified less than the lower-
amplitude signals) prior to transmission and then
expanded) amplified more than the lower amplitude
signals in the receiver).
BASIC COMPANDING PROCESS
2 TYPES OF COMPANDING

1. Analog Companding
a. µ - Law
b. A - Law

2. Digital Companding
PCM SYSTEM WITH ANALOG
COMPANDING
2 TYPES OF COMPANDING

A - Law µ - Law

iginally defined by the Comite -European
defined by the T1 Standards Committee
e Postes et Telecommunicationsthe (CEPT)
USA

are recognized by the telephony section of the International Telecommu
(ITU-T), the supreme international standards organization for telephony

- is probably the most wide spread
- is dominant in the world’s largest syste
internationally in North America

acteristics allow small signals to be processed as accurately as large si
produce much improved signal to noise ratio SNR.”

A-law produces slightly better SNR
- while
for the µ-law has less noise on an id
small signals channel
µ-LAW COMPANDING

Vmax ln(1 + µ{Vin /Vmax })
Vout =
ln(1 + µ)

Where:
Vmax = maximum uncompressed analog input amplitude (volts)
Vin = amplitude of the input signal at particular instant of time (volts)
µ = parameter used to define the amount of compression(unitless)
Vout = compressed output amplitude (volts)
µ-LAW CHARACTERISTIC
EXAMPLE

For a compressor with a µ = 255, determine:

a) The voltage gain for the following relative values of
Vin shown in the table below:
EXAMPLE

b) The compressed output voltage for a maximum
input voltage of 4V.

c) Input and output dynamic ranges and compression
in dB.
µ-LAW CHARACTERISTIC

Where:
V = Output Voltage
Vr = Reference Voltage
c = Chord Number
s = Step Number
A-LAW COMPANDING

In Europe, the ITU-T has established A-law companding to
be used to approximate true logarithmic companding

AVin /Vmax Vin 1
Vout = Vmax 0≤ ≤
1 + lnA Vmax A

1 + ln(AVin /Vmax ) 1 Vin
Vout = Vmax ≤ ≤ 1
1 + lnA A Vmax
DIGITALLY COMPOUNDED PCM
SYSTEM
µ-255 COMPRESSION CHARACTERISTIC

- µ-law companding is a system that divides the analog
signal range into fifteen segments each eventually encoded into
eight-bit digital value.
13 SEGMENT SCALE
µ-255 COMPRESSION CHARACTERISTIC
PCM QUANTIZATION LEVELS - CHORDS &
STEPS
QUANTIZATION ERROR - RECOVERED STEP LEVELS DO
NOT MATCH PAM LEVELS
LINEAR QUANTIZATION - ANOTHER VIEW
LOGARITHMIC QUANTIZATION - ANOTHER
VIEW
8-BIT COMPRESSED CODE FORMAT
µ-255 ENCODING TABLE
µ-255 DECODING TABLE
PROCESS OF DIGITAL COMPRESSION

Digitally, the 12-bit values are encoded into 8-bit
compressed code as follows:

1. Retain the sign bit as the first bit of the 8-bit code.
2. Count the number of zeros until the occurrence of the first 1 bit.
Subtract the zero count from 7. This is the segment number.
3. The first occurrence of 1 is assumed during the expanding
process, so it is set aside during compression.
4. Copy the next four bits (ABCD) into the 8-bit compressed code.
EXAMPLE

Code the 12-bit code 100001011010 into an 8-bit
compressed µ-law code.
EXAMPLE

Determine the 12-bit linear code, the eight-bit compressed
code, the decoded 12-bit code, the quantization error, and
the compression error for a resolution of 0.01 V and analog
sample voltages of

(a) + 0.053 V
(b) -0.318 V
(c) +10.234 V
PROCESS OF DIGITAL EXPANSION

Expanding back digitally, reverses the process:

1. Retain the sign bit.
2. Take the segment number, subtract from 7 and add
that many 0s.
3. Make the next bit a 1.
4. The next bits are ABCD values.
5. Add a 1 and sufficient 0s to complete the 12-bit value.
QUANTIZATION ERROR

-error is error due to rounding off the sample voltage in
the encoder to the closest PCM.
COMPRESSION ERROR

-error caused by forcing the truncated bit to a 1 in the
receiver.
DIGITAL COMPRESSION ERROR

The magnitude of the compression error is not the same for all samples.
However, the maximum percentage is the same in each segment (other than
segments 0 and 1, where there is no compression error)

12-bit encoded voltage - 12-bit decoded voltage
% error = X 100
12-bit decoded voltage
CODEC

A single integrated chip that performs the encoding and
decoding process of PCM.
EXAMPLE

Expand the compressed code of the above example.
SEATWORK

For the following values of μ, Vmax, and Vin, determine the
compressor gain:
SEATWORK

For the following 12-bit linear PCM codes, determine the
eight-bit compressed code to which they would be
converted:

a. 100011110010
b. 000001000000
c. 000111111000
d. 111111110010
e. 000000100000
SEATWORK

For the following 8-bit compressed codes,determine the
expanded 12-bit code.

a. 11001010
b. 00010010
c. 10101010
d. 01010101
e. 11110000
f. 11011011
SEATWORK

A 12-bit linear sign-magnitude PCM code is digitally
compressed into 8 bits. For a resolution of 0.016 V,
determine the following quantities for the indicated input
voltages:
a. 12-bit linear PCM code
b. eight-bit compressed code
c. decoded 12-bit code
d. decoded voltage

For Vin = -6.592 V, +12.992 V, -3.36 V