You are on page 1of 54

Pulse-code modulation

Analog Signals
• Analog (continuous-time, continuous-amplitude) signals (like
speech) have a certain bandwidth. Their power spectrum (power
spectral density) describes how their average power is distributed
with respect to frequency.

Power
spectral
density “High-fidelity speech
(watts/Hz)

Bandwidth Telephone speech


(limited by filtering)
0 1 2 3 4 5 6 7....
Digital and Analog Signals
• Some signals (like speech and video) are inherently analog; some
(like computer data) are inherently digital.
• However both analog and digital signals can be represented and
transmitted digitally.
• Advantages of digital:
– Reduced sensitivity to line noise, temp. drift, etc.
– Lower maintenance costs than analog.
– Low cost digital VLSI for switching and transmission.
– Uniformity in carrying voice, data, video, fax, etc.
– Better encryption.
Nomenclature

• The word pulse in the term Pulse-Code Modulation refers to the


"pulses" to be found in the transmission line. This perhaps is a
natural consequence of this technique having evolved alongside two
analog methods, pulse width modulation and pulse position
modulation, in which the information to be encoded is in fact
represented by discrete signal pulses of varying width or position,
respectively.

• In this respect, PCM bears little resemblance to these other forms of


signal encoding, except that all can be used in time division
multiplexing, and the binary numbers of the PCM codes are
represented as electrical pulses. The device that performs the
coding and decoding function in a telephone circuit is called a
codec.
Pulse-code modulation (PCM)

• Pulse-code modulation (PCM) is a method used


to digitally represent sampled analog signals, which was invented
by Alec Reeves in 1937. It is the standard form for digital audio in
computers and various Blu-ray, Compact Disc and DVD formats, as
well as other uses such as digital telephone systems.

• A PCM stream is a digital representation of an analog signal, in


which the magnitude of the analogue signal is sampled regularly at
uniform intervals, with each sample being quantized to the nearest
value within a range of digital steps.
Pulse-code modulation (PCM)

• PCM streams have two basic properties that determine their fidelity
to the original analog signal: the sampling rate, which is the number
of times per second that samples are taken; and the bit depth, which
determines the number of possible digital values that each sample
can take.
Pulse Code Modulation (PCM)
• Key points
– PCM signal is developed by three steps: sampling, quantizing
and encoding.
– Quantizing noise is reduced by using variable sized steps. It is
independent of line length.

s(t) s(n) 011010001...


Filter

Sample at t=n Quantize Encode


Pulse Code Modulation (PCM)
x(t)

0
t

Consider the analog Signal x(t).


Pulse Code Modulation (PCM)
x[n]

0
n

The signal is first sampled


Pulse Code Modulation (PCM)

0
n
Pulse Code Modulation (PCM)

0
n
Pulse Code Modulation (PCM)

Sample n
Pulse Code Modulation (PCM)

And Hold n
Pulse Code Modulation (PCM)

0
n
Pulse Code Modulation (PCM)
Assign Closest
Level
3

0
n
Pulse Code Modulation (PCM)

0
n
Pulse Code Modulation (PCM)

0
n
Pulse Code Modulation (PCM)

0
n
Pulse Code Modulation (PCM)

0
n
Each quantization level corresponds to a unique combination
of bits. The analog signal is transmitted/ stored as a stream of
bits and reconstructed when required.

0
n
Each quantization level corresponds to a unique combination
of bits. The analog signal is transmitted/ stored as a stream of
bits and reconstructed when required.

0
n
00 01 10 11 10 01 00
Pulse Code Modulation (PCM)
x(t) Original Signal

0
t
Pulse Code Modulation (PCM)
x~(t)
Quantized Signal

0
t

It is quite apparent that the quantized signal is not exactly the


same as the original analog signal. There is a fair degree of
quantization error here. However; as the number of quantization
levels is increased the quantization error is reduced and the
quantized signal gets closer and closer to the original signal
Pulse Code Modulation (PCM)
x~(t)
Quantized Signal

0
t

It is quite apparent that the quantized signal is not exactly the


same as the original analog signal. There is a fair degree of
quantization error here. However; as the number of quantization
levels is increased the quantization error is reduced and the
quantized signal gets closer and closer to the original signal
PCM System Block Diagram

f(t)
Sample & Hold Comparator Binary Counter

Parallel to Serial
Ramp Generator Converter

All pulses have same height


and width.
PCM of Speech Signals (very-
important)
• Most of the significant spectral components of speech signals are
contained in the range 300-3400 Hz

• Nyquist Rate = 2x3400 = 6.8 kHz

• Practical Sampling Rate fs= 8 kHz (WHY..???)

• Number of quantization levels = 256

Number of Bits/Sample n = 8 (log2256 )

Data Rate = nfs = 8x8000 = 64 kbps


PCM of Speech Signals (very-
important)
• Bandwidth Requirement

Communication theory tells us that we can transmit errorfree at most two pieces
of information per second per hertz bandwidth (lathi pg. 260)

Therefore the minimum required bandwidth for transmission of a PCM speech


signal BWmin = 64/2 = 32 kHz

Recall that for analog techniques such as AM, FM etc the bandwidth of the order
of 4 kHz, 8 kHz etc.

We may require more bandwidth but the signal is now digital and we now have
the ability to manipulate, store, regenerate the data. (see advantages of Digital
Communication pg 263 of lathi)
PCM Based TDM Systems
• PCM is widely used in transmission of speech signals in fixed line
telephone system.

• In this lecture we shall briefly explore an example PCM, the T1 carrier


system which was developed at Bell labs in the US. And is still in use
today in the US and Japan.

• A similar scheme called the E1 is used in Europe and Pakistan.

• These schemes are used to multiplex the speech from multiple


subscribers and transmit them to their destinations over a common
“Time Shared” channel. Hence the name time division multiplexing
(TDM).
PCM Based TDM Systems
• The sampling rate used for voice = 8000 samples/sec

Therefore, Sampling Interval = 1/8000 = 125µs

– This means that the time between two consecutive samples (from the
same source) is 125µs. TDM systems exploit this fact and utilize this
interval to sample signals from other subscribers. In T1 systems the
signals from 24 subscribers is sampled in 125µs.

– The samples are quantized and then converted into a bitstream for
transmission over the channel.
PCM Based TDM Systems

125µs
PCM Based TDM Systems

Sampl 1
e
Chann 1
el
PCM Based TDM Systems

Sampl 1 1
e
Chann 1 2
el
PCM Based TDM Systems

Sampl 1 1 1
e
Chann 1 2 3
el
PCM Based TDM Systems

Sampl 1 1 1 1
e
Chann 1 2 3 4
el
PCM Based TDM Systems

Time for
sample 2

Sampl 1 1 1 1 --- --- --- --- --- --- --- --- 1


e
Chann 1 2 3 4 --- --- --- --- --- --- --- --- 24
el
PCM Based TDM Systems

Time for
sample 2

Sampl 1 1 1 1 --- --- --- --- --- --- --- --- 1 2


e
Chann 1 2 3 4 --- --- --- --- --- --- --- --- 24 1
el
125µs
PCM Based TDM Systems
Every sample is represented by one of the 256
quantization levels that is closest to it. This
corresponds to 8 bits (log2256) bits to transmit one
sample.

Sampl 1 1 1 1 --- --- --- --- --- --- --- --- 1 2


e
Chann 1 2 3 4 --- --- --- --- --- --- --- --- 24 1
el
125µs

1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1
PCM Based TDM Systems
• As mentioned previously, sampling rate used for voice = 8000 samples/sec
• Every sample is represented by 8 bits
• Therefore,

Data rate of 1 voice channel = 8x8000 = 64kbps

• In the T1 system 24 voice channels are multiplexed in time


therefore,

Data rate of a T1 stream should be = 24x64kbps = 1.536 Mbps


However, the actual data rate = 1.544Mbps
The extra 8000 bps (1.544-1.536=.008Mbps) result from the overhead bits
which are inserted alongside the data (details ahead).
PCM Based TDM Systems

• The T1 carrier system multiplexes binary codewords corresponding to


samples of each of the 24 channels in a sequence. A segment containing one
codeword (corresponding to one sample) from each of the 24 channels is
called a FRAME.

• Each frame has 24x8 = 192 data bits and takes 125µs.

• At the receiver it is also necessary to know where a frame starts in order to


separate information bits correctly. For this purpose, a Framing bit is added
at the beginning of each frame.
Therefore,
Total number of bits/ frame = 193
PCM Based TDM Systems
T1 Frame Format
• Along with voice data, frames should also contain: Framing bits and Signaling
bits.

• Framing Bits: Indicate start of frames.

• Signaling Bits: Contain control information such as Routing Information, On-


Hook/ off-Hook signals, Alarm signals etc.

• Lets see how the T1 frame caters for these needs. We’ll have a look at the
frame structure of older T1 schemes first.
PCM Based TDM Systems
T1 Frame Format

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format

1 Framing Bit at start of


each frame

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format
7 bits to represent each sample. Note this is the old T1
scheme and is now obsolete.

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format
1 bit in each channel reserved for signalling. This
means a total of 24 bits/ frame for signalling.

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format
• T1 newer version:

24 signalling bits/ frame is just too much and that many bits are not
required for voice data signalling.

This why a modification was introduced.

The newer version uses 8 bits to represent every sample. However, the
total number of bits in each frame remains the same i.e, 193 bits/frame.

• Does this mean that the signalling bits are eliminated..????

• If so then how is the signalling information conveyed..????


PCM Based TDM Systems
T1 Frame Format
• T1 newer version:

Actually the signalling bits are not eliminated altogether. Instead the
number of signalling bits in a ‘collection of frames’ is reduced.

In the newer version, signalling bits are included in every 6th frame.

This is done by replacing the Least Significant Bit (LSB) of every


sample by a signalling bit. Therefore, some amount of information in every 6th
sample is sacrificed for signalling. However, since only the LSB is removed
there is no noticeable loss in voice quality.
PCM Based TDM Systems
T1 Frame Format

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 8
S 1 2 3 4 5 6 7 8
S ... 1 2 3 4 5 6 7 8
S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 8
S 1 2 3 4 5 6 7 8
S ... 1 2 3 4 5 6 7 8
S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format
The LSB of all the samples in frames 1, 7, 13, etc is
replaced by signalling bits.

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S
.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)
PCM Based TDM Systems
T1 Frame Format
All other frames use 8 bits/sample. This technique in which signalling information is
sent in every 6th frame is called Robbed-Bit- Signalling.

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 S 1 2 3 4 5 6 7 S ... 1 2 3 4 5 6 7 S Frames 1, 7, 13......


.

Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame- Frame-


1 2 3 4 5 6 7 8 9
(125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs) (125µs)

Channel-1 Channel-2 Channel-24

F 1 2 3 4 5 6 7 8
S 1 2 3 4 5 6 7 8
S ... 1 2 3 4 5 6 7 8
S All Frames except
1, 7, 13......
.
PCM Based TDM Systems
T1 Frame Format
• Frame Synchronization in T1:

– It was mentioned in the previous slides that 1 Framing bit indicates the start of
each frame. How is this framing bit different from any of the other bits that arrive
before or after it..?????
– One framing bit alone doesn't signify much. However, a collection of framing bits
can be used to check the beginning of a collection of frames.
– The receiver accumulates the framing bits of a collection of 12 frames and checks
whether these 12 framing bits are the same as a pre-decided pattern
(100011011100).
– If the framing bits are exactly the same as this pattern then the transmitter and
receiver are in frame Synchronization and the samples can be easily extracted
from the frames.

– What happens when the framing bits do not match the pre-decided pattern….???
PCM Based TDM Systems
T1 Frame Format
• Loss of Frame Synchronization in T1:

– When frame synchronization is lost in T1, the receiver immediately send an LFA
alarm, indicating loss of frame synchronization, to the transmitter.

– Without disconnecting the calls the transmitter redirects the data and sends it via
an alternate route, and also tries to regain frame synchronization with the
receiving party by send some fixed pattern.

– Since it takes 12 frames to realize that frame synchronization is lost, it means that
at-least 12 voice samples from all the effected 24 channels will be lost. However,
this is not noticed by the subscribers because this is still a very small time frame

12 x 125µs = 1.5ms of conversation is lost.

You might also like