Sunteți pe pagina 1din 53

Objective:

o Analyze Pulse Code Modulation system



Pulse Code Modulation

Brief History

PCM was developed by AT&T
in 1937 in Paris Laboratories. Alex H.
Reeves is credited with its invention.
Although PCM were recognized in its early
development, it was not until 1960 with
the advent of solid state electronics that
the PCM became prevalent.

Pulse Code Modulation

o pulses are of fixed length and fixed
amplitude
o form of digitally coding analog signals
o a binary system where a pulse or lack of
pulse within a prescribed time slot
represents either a logic 1 or a logic 0
condition
o the analog signal is sampled and then
converted to a serial n-bit binary code for
transmission. Each code has the same
number of bits and requires the same
length of time for transmission

BPF

Sample
and Hold


ADC
Parallel
to Serial
Converter
Regenerative
Repeater
Regenerative
Repeater
Serial to
Parallel
Converter
DAC
Hold
Ckt
LPF
Input
signal
Simplified block diagram of a single-channel, simplex PCM transmission system
BPF limits the frequency of the analog input signal to
standard voice band frequency
Sample & Hold Circuit periodically samples the analog
input signal and converts those samples to a multilevel
PAM codes
Analog-to-Digital Converter converts the PAM samples
to parallel PCM codes
Parallel-to-Serial Converter converts the parallel PCM
codes to serial digital pulses
Regenerative Repeaters regenerate the digital pulse
Serial-to-parallel Converter converts the serial pulses
received from the transmission line the parallel PCM
codes
Digital-to-Analog Converter converts the parallel PCM
codes to multi-level PAM signals
Hold and LPF converts the PAM signals back to its
original form


o Sampling
o Quantizing
o Coding

PCM Sampling

o the function of a sampling circuit in a PCM
transmitter is to periodically sample the continually
changing analog input voltage and convert those
samples to a series of constant amplitude pulses that
can more easily be converted to binary PCM code

o for the ADC to accurately convert a voltage to a
binary code, the voltage must be relatively constant so
that the ADC can complete the conversion before the
voltage level changes
o Flat-top sampling the sample voltage is
held at a constant amplitude during the
A/D conversion time; this is done by
sampling the analog signal for a short
period of time
o Natural sampling the sample time is
made longer and the analog-to-digital
conversion takes place with changing
analog signal. This introduces more
aperture distortion and requires a faster
A/D converter
oPAM pulses generated from natural sampling are not frequently used.
oInstead, flat-topped pulses are customarily used because flat-top
sampling facilitates the design of the electronic circuitry to perform
sampling.
o Its purpose is to sample periodically the
continually changing analog input signal and
convert the samples to a series of constant
amplitude PAM levels
Analog
input
Sampling pulse
PAM output
Sample-and-Hold circuit
C1
Q1
Z2
Z1
aperture time the time that Q1 (FET) is ON and the capacitor charges
(or discharges)

conversion time the storage time of the capacitor during which the
ADC converts the sampling voltage to a PCM code

aperture distortion the distortion that results if the input to the ADC is
changing while it is performing the conversion

droop the gradual discharge of the capacitor during the conversion
time

Charge Time, = RC (to satisfy accuracy requirements)

R output impedance of Z
1
plus ON resistance of Q
1

C capacitance value
dt
cdv
i =
dv
idt
c =
Where:
C max capacitance
i max current
dv maximum change in voltage across C
1

dt charge time on aperture time
to satisfy the output current limitations
Accuracy (%) Charge Time
10 2.3RC
1 4.6RC
0.1 6.9RC
0.01 9.2RC
Example

For the sample and hold circuit, determine
the largest-value capacitor that can be used
if the output impedance of Z
1
= 10, ON
state resistance of the FET is 10 and an
acquisition time of 10microseconds. The
maximum p-p voltage is 10V and the
maximum current from Z
1
is 10mA and an
accuracy of 1%.

o For a sample to be reproduced accurately at
the receiver, each cycle of the analog signal
(fa) must be sampled at least twice.


o If fs is less than two times fa, distortion will
result. This distortion is called aliasing or
foldover distortion.
a s
f f 2 >
Nyquist sampling rate for low-pass and bandpass signals
According to the Nyquist theorem,
the sampling rate must be at least 2 times the highest
frequency contained in the signal.
18
Recovery of a sampled sine wave for different sampling rates
Sampling at the
Nyquist rate can create
a good approximation
of the original sine
wave.
Oversampling can also
create the same
approximation, but is
redundant and
unnecessary.
Sampling below the
Nyquist rate does not
produce a signal that
looks like the original
sine wave.
19
Sampling of a clock with only one hand
The second hand of a clock has a period of 60 s.
According to the Nyquist theorem, we need to sample hand every 30 s
20
An example of under-sampling is the seemingly
backward rotation of the wheels of a forward-moving car
in a movie.
A movie is filmed at 24 frames per second.
If a wheel is rotating more than 12 times per second, the
under-sampling creates the impression of a backward
rotation.
Examples
Telephone companies digitize voice by assuming a
maximum frequency of 4000 Hz.
The sampling rate therefore is 8000 samples per second.
21
A complex low-pass signal has a bandwidth of 200 kHz.
What is the minimum sampling rate for this signal?
Solution
The bandwidth of a low-pass signal is between 0 and f,
where f is the maximum frequency in the signal.
Therefore, we can sample this signal at 2 times the
highest frequency (200 kHz).
The sampling rate is therefore 400,000 samples per
second.
Example
22
Audio
0 f
a
2f
s

f
s
- f
a
2f
s
- f
a

3f
s
- f
a

3f
s
+ f
a

Audio
0 f
a
2f
s
3f
s
f
s

f
s
- f
a
2f
s
- f
a

3f
s
- f
a

3f
s
+ f
a

Shaded areas indicate
spectral foldover
No aliasing
Aliasing distortion
Quantization

o process of converting an infinite
number of facilities to a finite number
of conditions
o process of rounding off the amplitudes
of flat-top samples to a manageable
number of levels
Folded Binary Code
o because the codes on the bottom half of the table are a mirror
image of the codes on the top half
Sign Magnitude Decimal Value Quantization
Interval
1 11 +3 +2.5 V to + 3.5 V
1 10 +2 +1.5 V to + 2.5 V
1 01 +1 +0.5 V to + 1.5 V
1 00 +0 0 V to + 0.5 V
0 00 -0 0 V to - 0.5 V
0 01 -1 -0.5 V to - 1.5 V
0 10 -2 -1.5 V to - 2.5 V
0 11 -3 -2.5 V to - 3.5 V
Three-bit PCM Code
Quantization Interval or Quantum
o magnitude difference between adjacent steps

Overload Distortion
o occurs if the magnitude of the sample exceeds the
highest quantization interval

Quantizing
o assigning PCM codes to absolute magnitudes

Resolution
o also called the step size, is the minimum voltage other
than zero volt that can be decoded by the DAC in the
receiver
o equal to the voltage of the least significant bit of the PCM
code
o indicates how many divisions the ADC conversion process
uses
o The smaller the magnitude of the minimum step size the
better the resolution and the more accurately the
quantization interval will resemble the actual analog
sample.

Quantization Error(Qe) or Quantization Noise(Qn)

o any round off errors in the transmitted signal that
are reproduced when the code is converted back to
analog in the receiver
o the maximum amplitude is one-half the resolution





Qe maximum Quantization error
Vlsb magnitude of the least significant bit or the step size

Vlsb Qe
2
1
max =
Coding
o Dynamic Range (DR) is the ratio of the largest
possible magnitude to the smallest possible
magnitude that can be decoded by the DAC
(Digital-to-Analog Converter)


o The number of bits used for a PCM code is

resolution
V
DR
max
=
1 2 + = DR
n
min
max
V
V
DR =
min
max
log 20
V
V
DR =
Coding Efficiency

o numerical indication of how efficiently a PCM code is utilized
o ratio of the minimum bits required to achieve a certain
dynamic range to the actual number of bits used
Including the sign bit
x100%
bits of number actual
bits of no. minimum
efficiency Coding =
Signal to Quantization Noise Ratio (SQR)

o the ratio of signal voltage to quantization noise
voltage or the ratio of signal power-to-noise
power ratio
o sometimes called signal-to-distortion ratio or
signal to noise ratio
q
v
dB SQR log 20 8 . 10 ) ( + =
v = rms signal voltage
q = quantization interval
Example

For a PCM system with the following parameters,
determine (a) minimum sample rate (b) minimum
number of bits used in the PCM code (c) actual
dynamic range (d) resolution (e) quantization error (f)
coding efficiency
Maximum analog input frequency = 4kHz
Maximum decoded voltage at the receiver = 2.55V
Minimum DR = 46 dB

Determine the SQR for the following input signal and
quantization noise magnitude.

Vs Vn
1 Vrms 0.01
2 Vrms 0.02
3 Vrms 0.01
4 Vrms 0.2
Linear codes the magnitude change between any two
successive steps is uniform
The accuracy for the higher-amplitude analog
signals is the same as for the lower-amplitude
signals
The SQR for the lower-amplitude signals is less
than for the higher-amplitude signals

Nonlinear codes the step size increases with the
amplitude of the input signal
There are more codes for the lower-amplitudes
than for higher-amplitudes (for voice
transmission)
During times when there is no analog input signal,
the only input to the PAM sampler is random, thermal
noise. This noise is called idle channel noise and is
converted to a PAM sample just as if it were a signal.
Midtread quantization the first quantization
interval is made larger in amplitude than the rest
of the steps
It is a method to reduce idle channel noise
Midrise quantization the lowest-magnitude
positive and negative codes have the same
voltage range as all the other codes
1. Level-at-a-time coding
This type of coding compares the PAM signal to a ramp
waveform while a binary counter is being advanced at a
uniform rate
Generally limited to low-speed applications
2. Digit-at-a-time coding
This type of coding determines each digit of the PCM
code sequentially, it uses a reference weight or code to
determine the PCM code
3. Word-at-a-time coding
Word-at-a-time coders are flash encoders and more
complex; they are more suitable for high-speed
applications
o Is the process of compressing, then expanding
o The higher amplitude analog signals are
compressed prior to transmission, then
expanded at the receiver
o means of improving the dynamic range of a
system
Analog
-Law companding (US and Japan)
A-law companding (Europe)
Digital
involves compressing first the signal before
converting it to PCM
o Vmax = max. uncompressed analog input amplitude
o Vin = amplitude of the input signal at a particular instant
of time
o = parameter used to defined the amount of
compression
o Vout = compressed output amplitude
( )

+
|
.
|

\
|
+
=
1 ln
1 ln
max
max
V
V
x V
V
in
out
A V
V
A
V V A
V V
in in
out
1
0
ln 1
max
max
max
s s
+
=
1
1
ln 1
) ln( 1
max
max
max
s s
+
+
=
V
V
A A
V V A
V V
in in
out
slightly flatter SQR than -law but -law is
better in terms of small signal quality (idle
channel noise)
Example

For a compressor with = 255, determine
(a) The voltage gain for the following relative values of
V
in
: V
max
, 0.75V
max
, 0.5V
max
, 0.25V
max

(b) The compressed output voltage for a maximum input
voltage of 4V
(c) Input and output dynamic ranges and compression

Calculate the output voltage of an A-law compressor
given A = 125, V
max
= 8 V and V
in
= 25 mV.

o Involves compression at the transmit end
after the input sample has been converted to
a linear PCM code and expansion at the
receive end prior to PCM decoding
Sign bit
1=(+)
0=(-)
3-bit Segment identifier
000-111
4-bit quantization interval
0000-1111
ABCD
8-bit 255 compressed code format
255 encoding/decoding table
Segment 12-bit linear code
8-bit compressed
code
8-bit compressed
code
12-bit recovered
code
Segment
0 S0000000ABCD S000ABCD S000ABCD S0000000ABCD 0
1 S0000001ABCD S001ABCD S001ABCD S0000001ABCD 1
2 S000001ABCDx S010ABCD S010ABCD S000001ABCD1 2
3 S00001ABCDxx S011ABCD S011ABCD S00001ABCD10 3
4 S0001ABCDxxx S100ABCD S100ABCD S0001ABCD100 4
5 S001ABCDxxxx S101ABCD S101ABCD S001ABCD1000 5
6 S01ABCDxxxxx S110ABCD S110ABCD S01ABCD10000 6
7 S1ABCDxxxxxx S111ABCD S111ABCD S1ABCD100000 7
100
) (
) ( ) (
% x
voltage Rx
voltage Rx voltage Tx
error

=
Example

Determine the 12-bit linear code, the eight bit
compressed code, the decoded 12-bit code, the
quantization error, (c) the compression error and (d)
percent error for a resolution of 0.01V and analog
sample voltages of (a) +0.053V (b) -0.318 V, and (c)
+10.234V
100
) (
) ( ) (
% x
voltage Rx
voltage Rx voltage Tx
error

=
Example

Determine the 12-bit linear code, the eight bit
compressed code, the decoded 12-bit code, the
quantization error, (c) the compression error and (d)
percent error for a resolution of 0.01V and analog
sample voltages of (a) +0.053V (b) -0.318 V, and (c)
+10.234V
o Used when digitizing speech signals only
o Used primarily in limited bandwidth
applications
o Generally used for recorded information
such as wrong number messages,
encrypted voice for transmission over
analog telephone circuits, computer output
signals and educational games
o Channel vocoders
o The first channel vocoder was developed by Homer
Dudley in 1928. Dudleys vocoder compressed
conventional speech waveforms into an analog
signal with a total bandwidth of approximately 300
Hz.
o Used bandpass filters to separate the speech
waveform into narrower subbands. Each sub-band is
full-wave rectified, filtered, then digitally encoded.
o Operate at 2400 bps
o Formant vocoders
o Simply determines the location of the formants
and encodes and transmit only the information
with the most significant short-term components.
o Formants three or more peak frequencies at
which the spectral power of most speech energy
concentrate
o Operate at less than 100 bps
o Linear predictive vocoders
o Extracts the most significant portions of speech
information directly from the time waveform
rather than from the frequency spectrum as with
the channel and formant vocoders
o Typically transmit and encode speech at between
1.2 and 2.4 kbps
PCM Line Speed

o simply the data rate at which serial PCM bits are clocked out of the
PCM encoder into the Transmission line
o dependent on the sample rate and the number of bits in the
compressed PCM coded


sample
bits
x
second
samples
speed line =
Where:
o line speed transmission rate in bps
o samples/second sample rate (fs)
o bits/sample number of bits in the compressed PCM code
Example
For a single-channel PCM system with a sample rate f
s
= 6000 samples
per second and a seven-bit compressed PCM code, determine the line
speed.
o Uses a single-bit PCM code to achieve
digital transmission of analog signals
o If the current sample is smaller than the
previous sample, a logic 0 is transmitted
o If the current sample is larger than the
previous sample, a logic 1 is transmitted
Slope overload noise
occurs when the step size
is too small for the
accumulator output to
follow quick changes in
the input waveform.


Original Signal
Reconstructed
Signal
Granular Noise
Analog
input
DAC
output
Slope overload
distortion
Granular noise occurs for any step size,
but is smaller for a small step size.
If is decreased, the granular noise will
decrease, however the slope overload noise
will increase.
Thus there should be an optimum value
for the step size .
o Adaptive delta modulation is a delta
modulation system where the step size of the
DAC is automatically varied, depending on
the amplitude characteristics of the analog
input signal.
o A simple algorithm when the output is a
string of consecutive 1s or 0s, the step size
is increased (for string of 1s) or decreased
(for string of 0s).

S-ar putea să vă placă și