Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Objective:: Analyze Pulse Code Modulation System

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

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
Input
signal Sample Parallel
BPF and Hold ADC to Serial
Converter

Regenerative Regenerative
Repeater Repeater

Serial to
Hold
Parallel DAC LPF
Ckt
Converter

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
o PAM pulses generated from natural sampling are not frequently used.
o Instead, 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

Sampling pulse

Analog Z2 PAM output


Z1 Q1
input
C1

Sample-and-Hold circuit
Figure 5b shows the input analog signal, the sampling pulse,
and the waveform developed across C1. It is important that
the output impedance of voltage follower Z1 and the on
resistance of Q1 be as small as possible. This ensures
that the RC charging time constant of the capacitor is kept
very short, allowing the capacitor to charge or discharge
rapidly during the short acquisition time. The rapid drop in the
capacitor voltage immediately following each sample pulse is
due to the redistribution of the charge across C1. The
interelectrode capacitance between the gate and drain of the
FET is placed in series with C1 when the FET is off, thus acting
as a capacitive voltage-divider network. Also, note the gradual
discharge across the capacitor during the conversion time. This
is called droop and is caused by the capacitor discharging
through its own leakage resistance and the input impedance
of voltage follower Z2. Therefore, it is important that the input
impedance of Z2 and the leakage resistance of C1 be as high
as possible. Essentially, voltage followers Z1 and Z2 isolate
the sample-and-hold circuit (Q1 and C1) from the input and
output circuitry.
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 Z1 plus „ON‟ resistance of Q1


C – capacitance value
Accuracy (%) Charge Time
10 2.3RC
1 4.6RC
0.1 6.9RC
0.01 9.2RC
to satisfy the output current limitations

cdv idt
i  c 
dt dv
Where:
C – max capacitance
i – max current
dv – maximum change in voltage across C1
dt – charge time on aperture time
Example

For the sample and hold circuit, determine


the largest-value capacitor that can be used
if the output impedance of Z1 = 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 Z1 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.

fs  2 fa
o If fs is less than two times fa, distortion will
result. This distortion is called aliasing or
foldover distortion.
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.
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
Examples
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.

Telephone companies digitize voice by assuming a


maximum frequency of 4000 Hz.
The sampling rate therefore is 8000 samples per second.
Example
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.
fs - fa 2fs - fa
3fs - fa
3fs + fa

Audio
0 fa 2fs

No aliasing

2fs - fa Shaded areas indicate


fs - fa
spectral foldover
3fs - fa
3fs + fa

Audio
0 fa fs 2fs 3fs
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

Three-bit PCM Code


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
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

1
Qe max  Vlsb
2
Qe – maximum Quantization error
Vlsb – magnitude of the least significant bit or the step size
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)
Vmax V max V max
DR  DR  DR  20 log
resolution V min V min
o The number of bits used for a PCM code is
n
2  DR  1
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

minimum no. of bits


Coding efficiency  x100%
actual number of bits
Including the sign bit
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

v
SQR (dB)  10 .8  20 log
q
◦ 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


Vmax x ln 1 
Vin 

Vout   V max 
ln 1   
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
slightly flatter SQR than μ-law but μ-law is
better in terms of small signal quality (idle
channel noise)

AVin Vmax Vin 1


Vout  Vmax 0 
1  ln A Vmax A

1  ln( AVin Vmax ) 1 Vin


Vout  Vmax  1
1  ln A A Vmax
Example

For a compressor with µ= 255, determine


(a) The voltage gain for the following relative values of
Vin: Vmax, 0.75Vmax, 0.5Vmax, 0.25Vmax
(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, Vmax = 8 V and Vin = 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 4-bit quantization interval


3-bit Segment identifier
1=(+) 000-111
0000-1111
0=(-) ABCD

8-bit 255 compressed code format


8-bit compressed 8-bit compressed 12-bit recovered
Segment 12-bit linear code Segment
code code code
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

255 encoding/decoding table


Tx(voltage)  Rx(voltage)
% error  x100
Rx(voltage)

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
Tx(voltage)  Rx(voltage)
% error  x100
Rx(voltage)

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. Dudley‟s 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

samples bits
line speed  x
second sample
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 fs= 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
DAC
 Slope overload noise
Analog output
input
occurs when the step size
∆ is too small for the
accumulator output to
follow quick changes in
Slope overload the input waveform.
distortion  Granular noise occurs for any step size,
Original Signal Reconstructed
but is smaller for a small step size.
Signal
 If ∆ is decreased, the granular noise will
decrease, however the slope overload noise
will increase.
Granular Noise  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 1‟s or 0‟s, the step size
is increased (for string of 1‟s) or decreased
(for string of 0‟s).

You might also like