Вы находитесь на странице: 1из 67

PULSE CODE MODULATION FUNDAMENTALS

Introduction

Many signals in modern communication systems are digital Additionally, analog signals are transmitted digitally Digitizing a signal results in reduced distortion and improvement in signal-to-noise ratios

WHY PCM?

Transmission of signals in the digital format has distinct advantages over analog Transmission. Basic information signals like speech, music, video originate in analog form and the sensory systems at the receiving end namely ear and eye respond to analog signals.
info source A to D dig tmn D to A info sink

A TO D CONVERSION OF ANALOG SIGNALS

Two basic methods: - Pulse Code Modulation PCM - Delta Modulation DM


PCM more popular because of superior performance. DM used for low cost, low quality applications

Delta Modulation (DM)


An analog input is approximated by a staircase function that moves up or down by one quantization level () at each sampling interval (Ts). A 1 is generated if the staircase function is to go up during the next interval; a 0 is generated otherwise. The staircase function tracks the original waveform

9/45

Delta Modulation Operation


For transmission:
the analog input is compared to the most recent value of the approximating staircase function. If the value of the analog input exceeds that of the staircase function, a 1 is generated; otherwise, a 0 is generated. Thus, the staircase is always changed in the direction of the input signal.

Staircase

For reception:
The output of the DM process is therefore a binary sequence that can be used at the receiver to reconstruct the staircase function.
10/21

Pulse Code Modulation (PCM) Versus Delta Modulation (DM)


DM has simplicity compared to PCM DM has worse SNR compared to PCM PCM requires more bandwidth PCM is more preferred than DM for analog signals

11/21

Delta PCM (DPCM)

Instead of using one bit to indicate positive and negative differences, we can use more bits -> quantization of the difference. Each bit code is used to represent the value of the difference. The more bits the more levels -> the higher the accuracy.

4.9

PAM

Conversion of analog signal into digital form is done using sampling. Ex. Voice storage Pulse amplitude modulation has some applications, but it is not used by itself in data communication. However, it is the first step in another very popular conversion method called pulse code modulation Sampling means measuring the amplitude of the signal at equal intervals.

Quantized PAM signal

Quantization is a method of assigning integral values in a specific range to sampled instances. The binary digits are then transformed to a digital signal by using one of the line coding techniques.

WHAT IS PCM ?
PCM is a method of converting Analog signals into Digital format and vice versa. The term modulation is a misnomer it is basically a method of coding.

STAGES OF PCM

Filtering Sampling Quantizing Encoding/Decoding


Sampling - Time discrete Quantizing - Amplitude discrete

BASIC BLOCK SCHEMATIC OF PCM


Speech Signal Filter Voice Band Sampler PAM Signal Binary Coded
Quantizer Encoder

Line Coded Digital stream

Line Coder Transmission Medium

Recovered PAM Speech Signal Signal Low Pass Filter

Line Decoded Binary Decoder Line Decoder

Received Digital stream

FILTERING

Filters are used to Limit the incoming Speech Signal to the Frequency Band of 300 Hz to 3400 Hz, known as the voice band

Sampling
T1 T2 T3 T4 T5 T6 T7

Audio Signal
time

Sampler Output

T1

T2

T3
ts

time

T6

T7

ts sampling interval

fs = 1/ ts sampling frequency

SAMPLING THEOREM
If a band limited signal with highest frequency fH is sampled at regular intervals of time at a rate fs equal to or greater than 2fH , then the samples contain all the information of the original signal.

fs 2fH
If the samples are passed through a suitably designed low pass filter it is possible to recover the original signal. ITU-T has recommended 8000Hz (8 KHz) as the sampling frequency for telephony. fs = 8000 Hz ; ts = 1/8000 = 125 microseconds

QUANTISING
A process of breaking down a continuous amplitude range into a finite number of Amplitude values or Steps The discrete value of a Sample is measured by comparing it with a scale having a finite number of intervals called the Quantising Intervals and identified the interval in which the Sample lies

Thus allotting a numerical value to the samples is known as Quantising

QUANTISING
The process of approximating the sampled signal amplitudes into allowable voltage levels is known as QUANTISING.
7 6 5 4 3 2 1

t1 t2 t3 t4 t5 t6

2 5 6 6 4 1

010 101 110 110 100 001

0
t1 t2 t3 t4 t5 t6 t7 t8 t9

QUANTISING LEVELS
Since binary code is used, the number of levels is always 2n. (In the example n=3;total levels 8 including 0; Highest level 7= 23-1 Telephony dynamic range is about 50 dB.

ITU-T has standardised 256 levels to cover the dynamic range. 256=28. Total number of bits to encode PCM is 8. ( Also known as 8bit PCM)

ENCODING
Converting the quantised value levels
into digital binary codes containing 1 s and 0 s is known as Encoding Practically a single circuit will do the function of both Quantising and Encoding For the sake of theoretical explanation these stages are treated separately

QUANTISING ERROR
During Quantising, the lower value of the Quantising interval is assigned to a sample falling in that particular interval. At the receiving end, the mid-value of the Quantising interval is assigned while decoding Thus the process of Quantising leads to an approximation of the input Signal with some deviations in Amplitude values These Deviations between the Amplitudes of Samples at the Transmitting and the Receiving end that is the difference between the actual value and the reconstructed value gives rise to quantising error.

LINEAR QUANTISING
Maximum Quantising error = (quantising interval)/2.

example quantising error = = 0.5 If the quantising interval is uniform throughout the dynamic range of speech (Linear quantising), the output S/Nq will be poor for low amplitude speech signal as against the high amplitude signal.

It is necessary to provide almost uniform S/Nq for all signal amplitudes

NON LINEAR QUANTISING


In order to achieve uniform S/Nq for all signal amplitudes, the quantising intervals are made smaller for small signal amplitudes and larger for large signal amplitudes. This process is called Non Linear Quantising which can be achieved in two ways. a) Companding the analog signal + linear encoding b) Non linear encoding Modern PCM systems use Non Linear encoding

ENCODING LAW
With an approximate Logarithmic law governing the increase in quantising interval, it is possible to obtain uniform S/Nq over the dynamic range of speech. For PCM in telephony, ITU-T has recommended two encoding laws : A-law and the - law. India and the European countries adopt A-law. US and Japan have adopted the - law. Y = 1+ ln (AX) for 1/A X 1 A=87.6 1+ ln A Y= AX for 0 X 1/A 1+lnA

These two are standard companding methods. u-Law is used in North America and Japan A-Law is used elsewhere to compress digital telephone signals

A-law and m-law Companding

SNR of Compander
The output SNR is a function of input signal level for uniform quantizing.
But it is relatively insensitive for input level for a compander

Figure shows one cycle of the PAM wave, where we use a 4bit code. In the figure a 4-bit code is used that allows 16 different binary-coded possibilities or levels between +1 V and -1 V. Thus we can assign eight possibilities above the origin and eight possibilities below the origin. These 16 quantum steps are coded as follows

Figure shows that step 12 is used twice. Neither time it is used is it the true value of the impinging sinusoid voltage. It is a rounded-off value. These rounded-off values are shown with the dashed lines in Figure, which follows the general outline of the sinusoid. The horizontal dashed lines show the point where the quantum changes to the next higher or lower level if the sinusoid curve is above or below that value. Take step 14 in the curve, for example. The curve, dropping from its maximum, is given two values of 14 consecutively. For the first, the curve resides above 14, and for the second, below. That error, in the case of 14, from the quantum value to the true value is called quantizing distortion. This distortion is a major source of imperfection in PCM systems.

In Figure maintaining the -1, 0, +1 V relationship, let us double the number of quantum steps from 16 to 32. What improvement would we achieve in quantization distortion? First determine the step increment in millivolts in each case. In the first case the total range of 2000 mV would be divided into 16 steps, or 125 mV/step. The second case would have 2000/32 or 62.5 mV/step. For the 16-step case, the worst quantizing error (distortion) would occur when an input to be quantized was at the half-step level . In this case, 125/2 or 62.5 mV above or below the nearest quantizing step. For the 32-step case, the worst quantizing error (distortion) would again be at the half-step level, or 62.5/2 or 31.25 mV. Thus the improvement in decibels for doubling the number of quantizing steps is

This is valid for linear quantization only. Thus increasing the number of quantizing steps for a fixed range of input values reduces quantizing distortion accordingly.

Voice transmission presents a problem. It has a wide dynamic range, on the order of 50 dB. That is the level range from the loudest syllable of the loudest talker to lowest- level syllable of the quietest talker. Using linear quantization, we find it would require 2048 discrete steps to provide any fidelity at all. Since 2048 is 211, this means we would need an 11bit code. Such a code sampled 8000 times per second leads to 88,000-bps or 88 Kbps. equivalent voice channel and an 88-kHz bandwidth, assuming 1 bit per Hz. Designers felt this was too great a bit rate/bandwidth.

A-Law & -Law


PCM

systems use an 8-bit code with its improved quantizing distortion performance. The companding and coding are carried out together, simultaneously. The compression and later expansion functions are logarithmic. A pseudologarithmic curve made up of linear segments imparts finer granularity to low- level signals and less granularity to the higher-level signals. The logarithmic curve follows one of two laws, the A-law

The

curve for the A-law may be plotted from the formula where A = 87.6. (The notation ln indicates a logarithm to the natural base called e. Its value is 2.7182818340.)
The

A-law is used with the E1 system.

They turned to a technique of companding. Companding derives from two words: compression and expansion. Compression takes place on the transmit side of the circuit, while expansion occurs on the receive side. Compression reduces the dynamic range with little loss of fidelity, and expansion returns the signal to its normal condition. This is done by favoring low-level speech over higher-level speech. In other words, more code segments are assigned to speech bursts at low levels than at the higher levels, progressively more as the level reduces. This is shown graphically in Figure 6.4, where eight coded sequences are assigned to each level grouping. The smallest range rises only 0.0666 V from the origin (assigned to 0-V level). The largest extends over 0.5 V, and it is assigned only eight coded sequences.

-law is plotted from the formula

-law

where x is the signal input amplitude and = 100 for the original North American T1system and 255 for later North American (DS1) systems and the CCITT 24-channel system A common expression used in dealing with the "quality" of a PCM signal is signal- to-distortion ratio (S/D, expressed in dB). Parameters A and , for the respective companding laws, determine the range over which the signal-to-distortion ratio is comparatively constant, about 26 dB. A-law companding, S/D = 37.5 dB can be expected (A = 87.6). -law companding, we can expect S/D = 37 dB( = 255).

Figure shows the companding curve and resulting coding for the European E1 system. Note that the curve consists of linear piecewise segments, seven above and seven below the origin. The segment just above and the segment just below the origin consist of two linear elements. Counting the collinear elements by the origin, there are 16 segments. Each segment has 16 8-bit PCM code words assigned. These are the code words that identify the voltage level of a sample at some moment in time. Each codeword, often called a PCM "word," consists of 8 bits. The first bit (most significant bit) tells the distant-end receiver if the sample is a positive or negative voltage. Observe that all PCM words above the origin start with a binary 1, and those below the origin start with a binary 0. The next 3 bits in sequence identify the segment. There are eight segments (or collinear equivalents) above the origin and eight below (23 = 8). The last 4 bits, shown in the figure as XXXX, indicate exactly where in a particular segment that voltage line is located.

Suppose the distant end received the binary sequence 11010100 in an E1 system. The first bit indicates that the voltage is positive (i.e., above the origin in Figure 6.5). The next three bits, 101, indicate that the sample is in segment 4 (positive). The last 4 bits, 0100, tell the distant end where it is in that segment as illustrated in Figure 6.6. Note that the 16 steps inside the segment are linear.

Figure 6.7 shows an equivalent logarithmic curve for the North American DS1 system.2 It uses a 15-segment approximation of the logarithmic -law curve ( = 255). The segments cutting the origin are collinear and are counted as one. So, again, we have a total of 16 segments. The coding process in PCM utilizes straightforward binary codes. Examples of such codes are illustrated in Figure 6.5 and are expanded in Figure 6.6 and Figure 6.7. The North American DS1 (T1) PCM system uses a 15-segment approximation of the logarithmic -law ( = 255), shown in Figure 6.7. The segments cutting the origin are collinear and are counted as one. As can be seen in Figure 6.7, similar to Figure 6.5,the first code element (bit), whether a 1 or a 0, indicates to the distant end whether the sample voltage is positive or negative, above or below the horizontal axis. The next three elements (bits) identify the segment, and the last four elements (bits) identify the actual quantum level inside the segment.

ENCODING
Process of converting Quantised Analog Samples to Binary Signals (in terms of 0 s and 1 s) is called Encoding To Represent 256 steps, an 8 Bit Code called a WORD is used

The standard form of the 8 bit word is P ABC WXYZ

P Polarity Bit 1 for +ve 0 for -ve

ABC Segment Code ( 000 to 111)

WXYZ Q Interval within the Segment ( 0000 TO 1111 )

ENCODING

The MSB ( P ) indicates the polarity of the Sample. Next 3 Bits ( ABC ) indicate one out of 8 Segment Numbers Last 4 Bits ( WXYZ ) indicate one out of the 16 Positions with in the Segment The Quantising and Encoding are done by a Circuit called ENCODER The encoder converts PAM Signals into an 8 Bit Binary Code

BIT RATE PER SAMPLE

A PAM sample is represented by an 8 bit PCM word P ABC WXYZ

8 8000 64000 kbps)

BITS PER SAMPLE SAMPLES PER SECOND BITS PER SECOND PER SAMPLE (64

The bit rate for a single channel PCM is 64 kbps

MULTICHANNEL PCM
Time interval between two consecutive samples is 125 microseconds. This interval is large enough to accommodate samples of other speech channels. If each channel occupies x microseconds for the 8 bit PCM word, then (125/x) speech channels could be accommodated in this sampling interval. This is the principle of TDM.

Time-Division Multiplexing

There are two basic types of multiplexing: Frequency-division multiplexing (FDM Time-division multiplexing In TDM, each information signal is allowed to use all available bandwidth In theory, it is possible to divide the bandwidth or the time among the users of a channel Continuously variable signals, such as analog, are not well adapted to TDM because the signal is present all the time

TIME DIVISION MULTIPLEXING


TDM involves sharing of the transmission medium by a
number of channels in the TIME DOMAIN. This can be achieved by establishing a sequence of Time Slots during which individual channels are Transmitted. Thus the entire bandwidth is sequentially available to each channel.

ITU-T STANDARDS
ITU-T has recommended two practical systems for time division multiplexing of PCM signals. (a) 24 voice channels in 125 microseconds (adopted in US & Japan) T1 (b) 30 voice channels in 125 microseconds (adopted in Europe & India) E1
In both the systems the sampling interval is 125 S which is called the Frame interval.

PRACTICAL PCM SYSTEM


In practical PCM systems, analog signals of individual channels are separately filtered and sampled. The samples are time division multiplexed and sequentially encoded by a common encoder.

1 2 3

LPF LPF LPF

S&H S&H S&H ENC

LPF

1 2

PCM

DEC

LPF LPF

Framing and basic timing should be distinguished.


"Framing" ensures that the PCM receiver is aligned regarding the beginning (and end) of a bit sequence or frame; "timing" refers to the synchronization of the receiver clock, specifically, that it is in step with its companion far-end transmit clock. Timing at the receiver is corrected via the incoming "1"-to-"0" and "0"-to-"1" transitions. It is mandatory that long periods of no transitions do not occur.

FRAME ALIGNMENT
For the TDM system to work properly, it is necessary (a) to have the same clock frequency for the transmitter and the receiver; (b) to align the starting point of the frame at the transmitter with the starting point of the frame in the receiver. (a) is achieved by recovering clock frequency from the incoming bit stream. (b) is met by providing for a frame alignment word which is transmitted in a separate time slot within the frame. The receiver looks for this FAW and recognizes the start of the frame.

SIGNALING

Signaling refers to the control and supervision of speech paths like setting up the connection, dialing, metering, call release, etc. It is necessary to provide a time slot within the frame to carry the signaling information of speech channels.

FRAME FORMAT
Practical PCM system requires

30 time slots for the speech channels 1 time slot for the FAW 1 time slot for the signaling information 32 time slots to be accommodated in a frame of 125 microseconds.
ITU-T Rec.G.732 gives the Frame format

30 CHANNEL PCM FRAME STRUCTURE


32 TIME SLOTS IN 125 MICROSECONDS

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Ch 1

Ch 2 Ch 3 Ch 15

Ch Ch 18 Ch 17 16

Ch 29 Ch 30

FAW X0011011 even fr X1AAA111 odd fr Signaling or other services


P A B C W X Y Z

TIME SLOT DURATION & BIT RATE


The duration of one frame is 125 s. 32 Time Slots (TS) in 125 s duration. Duration of each time slot = 125 s / 32 = 3.9 s Each TS has 8 bits from encoded samples. 8 bits are accommodated in 3.9 s. Therefore the duration of each Bit is = (3.9 s) / 8 = 0.488 s or 488 ns No. of bits per second = 109 = 2048000 488 = 2048 kilobits2Mbits 30 chl PCM is also known as a 2Mbps system

FRAME ALIGNMENT WORD


Frame Alignment is needed in order to ensure that the receiver correctly recognizes the start of the frame. ITU-T has recommended the adoption of x0011011 as the FAW in TS0. The FAW is transmitted in TS0 of every alternate frame. In frames which do not carry FAW, the bits of TS0 are used for transmitting distant alarm signals.

Frame no. F0 F1 F2 F3

B1 x x x x

B2 0 1 0 1

B3 0 A 0 A

B4 1 A 1 A

B5 1 A 1 A

B6 0 1 0 1

B7 1 1 1 1

B8 1 1 1 1

Remarks FAW ALARM FAW ALARM

TS 0
In ODD frames (F1,F3,F5,.) B2 bit is always 1 to indicate that it is an alarm frame B3 is 1 for Frame Alignment failure B4 is 1 for High Bit Error rate B5 is 1 for CODEC malfunctioning. B3,B4,B5 will be 0 for normal functioning. Urgent alarm indicated by x 1 1 1 1 1 1 1 Loss of Frame alignment only if FAW is incorrect for three consecutive EVEN frames

TS 16
In the 30 channel PCM system, TS16 in each frame is used for carrying signaling information. Each frame carries the signaling data corresponding to two voice channels. To carry the signaling data of all the 30 channels, 15 consecutive frames are required. This is called a multiframe. Further, there is need for Multi Frame Alignment signal. This requires an additional frame. Therefore, 16 frames (F0 to F15) are there in a Multiframe. Duration of multiframe=16x125s=2 msec. TS16 of F0 contains MFA word which is 0000 and the remaining 4 bits are used for MFA alarm.(1A11)

MULTIFRAME STRUCTURE
MULTIFRAME 2 milliseconds F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15

FRAME 125 MICROSECONDS TIME SLOTS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 chls 1 to 15 speech X 0 011011 FAW even frames X1AAA111 alarm odd frames 3.9s
F0 F1 F2 F3 F4 0000 1A11 CH1 CH2 CH3 CH4 . . F15 CH16 CH17 CH18 CH19 . . P A B C W X Y Z

chls 16 to 30 speech

CH15 CH30

Multi Frame Structure


TS0 F0 FAW TS1 Ch 1 TS2 Ch 2 TS15 Ch 15 TS16 B1-B4 MFAW B5-B8 MFAW ALM S Ch 16 TS17 Ch 16 TS31 Ch 30

F1

ALM & Supy


FAW ALM & Supy

Ch 1

Ch 2

Ch 15

S Ch 1

Ch 16

Ch 30

F2

Ch 1

Ch 2

Ch 15

S Ch 2

S Ch 17

Ch 16

Ch 30

F3

Ch 1

Ch 2

Ch 15

S Ch 3

S Ch 18

Ch 16

Ch 30

F14

FAW ALM & Supy

Ch 1

Ch 2

Ch 15

S Ch 14

S Ch 29

Ch 16

Ch 30

F15

Ch 1

Ch 2

Ch 15

S Ch 15

S Ch 30

Ch 16

Ch 30

30 chl PCM overall combining

TS 4 W Tx HYB 2W ENCODER 4 W Rx LINE CODER LPF CH 1 TS TS 0 31 FAW 0

TS 16 TS 0 TS 31

TS

HDB3 CODED PCM TS 0

MFA + SIG
FAW

16

DECODER

LINE DECODER

TS 16

MFA+SIG

TS16 61

MULTIPLEXING OF ASYNCHRONOUS SIGNAL

in order to move multiple ASYNCHRONOUS 2 mbps data streams from one place to another, they are combined together or multiplexed in groups of four. this is done by taking 1 bit/word from stream #1, followed by 1 bit/word from #2, then #3, then #4. the transmitting multiplexer also adds additional bits in order to EQUAL or synchronise the bits in the multiplexer and the process adopted for such synchronization is called justification bits or pulse stuffing

JUSTIFICATION TYPES
Positive justification: Common synchronization bit rate offered at each tributary is higher than the bit rate of individual tributary. Positive-negative justification Negative justification

DIGITAL MUX CONCEPTS


BYTE INTERLEAVING WORD / BYTE / BLOCK INTERLEAVING: IF THE CHANNEL TIME SLOT IS LONG ENOUGH TO ACCOMMODATE A GROUP OF BITS THEN THE MULTIPLEXED SIGNAL IS CALLED A BYTE INTERLEAVED OR WORD INTERLEAVED SIGNAL.

A1

A2

A3 A4

B1

B2

B3

B4

C1

C2

C3

C4

D1

D2

D3

D4

DIGITAL MUX CONCEPTS


BIT INTERLEAVING: ALTERNATELY EACH CHANNEL CODE CAN BE SCANNED ONE DIGIT AT A TIME. THE MULTIPLEXED SIGNAL IS CALLED A BIT INTERLEAVED SIGNAL. BIT INTERLEAVING IS USED IN HIGHER ORDER MULTIPLEXING.

A1 B1 C1 D1 A2 B2 C2 D2 A3 B3 C3 D3 A4 B4 C4 D4

Digital Hierarchy based on 30chl PCMEncoded TDM European

Вам также может понравиться