You are on page 1of 72

Pulse Code Modulation

4.# Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

PULSE MODULATION
The process of transmitting signals in the form of pulses (discontinuous signals) by using special techniques.

The Chapter includes: Pulse Amplitude Modulation

Pulse Width Modulation


Pulse Position Modulation

Pulse Code Modulation

Created by C. Mani, Principal, K V No.1, AFS, Jalahalli West, Bangalore

Pulse Modulation

Analog Pulse Modulation

Digital Pulse Modulation

Pulse Amplitude (PAM) Pulse Width (PWM)

Pulse Code (PCM) Delta (DM)

Pulse Position (PPM)


Pulse Amplitude Modulation (PAM): * The signal is sampled at regular intervals such that each sample is proportional to the amplitude of the signal at that sampling instant. This technique is called sampling. * For minimum distortion, the sampling rate should be more than twice the signal frequency.

Pulse Amplitude Modulator

Analog Signal

AND Gate

PAM

Pulse Shaping Network

FM Modulator

PAM - FM

Pulses at sampling frequency

HF Carrier Oscillator

Analog Signal

Amplitude Modulated Pulses

Pulse Width Modulation (PWM or PLM or PDM):


* In this type, the amplitude is maintained constant but the duration or length or width of each pulse is varied in accordance with instantaneous value of the analog signal.

* The negative side of the signal is brought to the positive side by adding a fixed d.c. voltage.

Analog Signal

Width Modulated Pulses

Pulse Position Modulation (PPM):


* In this type, the sampled waveform has fixed amplitude and width whereas the position of each pulse is varied as per instantaneous value of the analog signal. * PPM signal is further modification of a PWM signal. It has positive thin pulses (zero time or width) corresponding to the starting edge of a PWM pulse and negative thin pulses corresponding to the ending edge of a pulse.
* This wave can be further amended by eliminating the whole positive narrow pulses. The remaining pulse is called clipped PPM.

PWM

PPM

PAM, PWM and PPM at a glance:

Analog Signal

Amplitude Modulated Pulses

Width Modulated Pulses

Position Modulated Pulses

Pulse Code Modulation (PCM):


* Analog signal is converted into digital signal by using a digital code. * Analog to digital converter employs two techniques: 1. Sampling: The process of generating pulses of zero width and of amplitude equal to the instantaneous amplitude of the analog signal. The no. of pulses per second is called sampling rate.
2. Quantization: The process of dividing the maximum value of the analog signal into a fixed no. of levels in order to convert the PAM into a Binary Code. The levels obtained are called quanization levels. * A digital signal is described by its bit rate whereas analog signal is described by its frequency range.

Bit rate = sampling rate x no. of bits / sample

V o l t a g e

Sampling, Quantization and Coding

Time
L e v e l s
7 6 5 4 3 2 1 0 111 110 101 100 011 010 001 000

B i n a r y

C o d e s

Time V o l t a g e

010101110111110101010

Time

ANALOG-TO-DIGITAL CONVERSION
A digital signal is superior to an analog signal because it is more robust to noise and can easily be recovered, corrected and amplified. For this reason, the tendency today is to change an analog signal to digital data. In this section we describe two techniques, pulse code modulation and delta modulation. Topics discussed in this section: Pulse Code Modulation (PCM) Delta Modulation (DM)
4.#
10

PCM

PCM consists of three steps to digitize an analog signal:


1. 2. 3. Sampling Quantization Binary encoding

Before we sample, we have to filter the signal to limit the maximum frequency of the signal as it affects the sampling rate. Filtering should ensure that we do not distort the signal, ie remove high frequency components that affect the signal shape.

4.#

11

Figure 4.21 Components of PCM encoder

4.#

12

Sampling

Analog signal is sampled every TS secs. Ts is referred to as the sampling interval. fs = 1/Ts is called the sampling rate or sampling frequency. There are 3 sampling methods:

Ideal - an impulse at each sampling instant Natural - a pulse of short width with varying amplitude Flattop - sample and hold, like natural but with single amplitude value

The process is referred to as pulse amplitude modulation PAM and the outcome is a signal with analog (non integer) values
4.#
13

Figure 4.22 Three different sampling methods for PCM

4.#

14

Quantization

Sampling results in a series of pulses of varying amplitude values ranging between two limits: a min and a max. The amplitude values are infinite between the two limits. We need to map the infinite amplitude values onto a finite set of known values. This is achieved by dividing the distance between min and max into L zones, each of height = (max - min)/L

4.#

15

Quantization Levels

The midpoint of each zone is assigned a value from 0 to L-1 (resulting in L values) Each sample falling in a zone is then approximated to the value of the midpoint.

4.#

16

Quantization Zones

Assume we have a voltage signal with amplitutes Vmin=-20V and Vmax=+20V. We want to use L=8 quantization levels. Zone width = (20 - -20)/8 = 5 The 8 zones are: -20 to -15, -15 to -10, -10 to -5, -5 to 0, 0 to +5, +5 to +10, +10 to +15, +15 to +20 The midpoints are: -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5, 17.5
4.#
17

Assigning Codes to Zones


Each zone is then assigned a binary code. The number of bits required to encode the zones, or the number of bits per sample as it is commonly referred to, is obtained as follows: nb = log2 L Given our example, nb = 3 The 8 zone (or level) codes are therefore: 000, 001, 010, 011, 100, 101, 110, and 111 Assigning codes to zones:

000 will refer to zone -20 to -15 001 to zone -15 to -10, etc.

4.#

18

Figure 4.26 Quantization and encoding of a sampled signal

4.#

19

Quantization Error

When a signal is quantized, we introduce an error - the coded signal is an approximation of the actual amplitude value. The difference between actual and coded value (midpoint) is referred to as the quantization error. The more zones, the smaller which results in smaller errors. BUT, the more zones the more bits required to encode the samples -> higher bit rate

4.#

20

Bit rate and bandwidth requirements of PCM

The bit rate of a PCM signal can be calculated form the number of bits per sample x the sampling rate Bit rate = nb x fs The bandwidth required to transmit this signal depends on the type of line encoding used. Refer to previous section for discussion and formulas. A digitized signal will always need more bandwidth than the original analog signal. Price we pay for robustness and other features of digital transmission.

4.#

21

4.#

22

4.#

23

4.#

24

4.#

25

4.#

26

4.#

27

4.#

28

4.#

29

4.#

30

4.#

31

,
For a given input x, the equation for -law encoding is as follows

where = 255 (8 bits) in the North American and Japanese standards. It is important to note that the range of this function is 1 to 1. -law expansion is then given by the inverse equation:

4.#

32

4.#

33

For a given input x, the equation for A-law encoding is as follows

where A is the compression parameter. In Europe, 87.6 is also used.


A-law expansion is given by the inverse function,

the value

4.#

34

4.#

35

Delta modulation - PCM sends 8 bits for each sample regardless of whether the sampled value changes. Delta modulation sends only one bit, indicating whether current sample is above or below the previous. While compact, as Figure 11 illustrates, when large changes occur in the sample delta modulation cannot keep up.

4.#

36

A staircase function approximation is derived, going up when the approximation is below the signal and going down otherwise The output modulation signal represents upward stair by 1 and downward stair by 0. The receiver may use smoothing algorithm when reconstructing the input signal. Finer division on time slot provides better approximation with the cost of extra data. Finer amplitude division reduces the quantizing noise for small slops. Coarser amplitude division reduces the slope-overload noise for high slops DM is easier than PCM to implement, but it exhibits worse signal to noise ratio for the same data rate.
4.#
37

4.#

38

4.#

39

4.#

40

4.#

41

4.#

42

4.#

43

4.#

44

4.#

45

DPCM - practical uses


In practice, DPCM is usually used with lossy compression techniques, like coarser quantization of differences can be used, which leads to shorter code words. This is used in JPEG and in adaptive DPCM (ADPCM), a common audio compression method. ADPCM can be watched as a superset of DPCM. In ADPCM quantization step size adapts to the current rate of change in the waveform which is being compressed.

Different ADPCM implementations have been studied. The more popular is IMA ADPCM, this ADPCM implementation is based on the algorithm proposed by Interactive Multimedia Association. IMA ADPCM standard specifies compression of PCM from 16 down to 4 bits per sample.

The good side of the ADPCM method is minimal CPU load, but it has significant quantization noise and only mediocore compression rates can be achieved(4:1). 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.#

46

More efficient than PCM by removing the redundancies in the speech signal. Adjacent samples of a speech waveform are highly correlated. This means that the variance of the difference between adjacent speech amplitudes is much smaller than the variance of the speech signal itself. Allows speech to be encoded at a bit rate of 32 kbps, while retaining the same voice quality. CCITT G.721 ADPCM is used in CT2 and DECT. In practice, ADPCM encoders are implemented using signal prediction techniques. Instead of encoding the difference between adjacent samples, a linear predictor is used to predict the current sample.

The difference between the predicted and actual sample called the prediction error is then encoded for transmission.
Prediction is based on the knowledge of the autocorrelation properties of speech.
4.#
47

Multiplexing

Multiplexing is a technique in which one cable is used to carry two or more channels simultaneously. There are two methods of multiplexing: Frequency Division Multiplexing and Time Division Multiplexing.

Frequency Division Multiplexing (FDM)

A fast transmission line can carry a number of slower transmissions simultaneously. This is done by dividing the frequency range (bandwidth) of the transmission into a number of narrower frequency bands. Each frequency band is then used to carry a separate channel.

Frequency Division Multiplexing (FDM)

Using a multiplexer, signals from different sources are modulated using carrier waves within different frequency bands.
Multiplexer Terminal#1 Terminal#2 Terminal#3 300-1013 Hz 1493-2206 Hz 2686-3400 Hz Demultiplexer 300-1013 Hz 1493-2206 Hz 2686-3400 Hz Device#1 Device#2 Device#3

After transmission over the cable, the different carrier waves are separated using a demultiplexer (frequency filters).

Limitations of FDM

Although Frequency Division Multiplexing allows a high bandwidth cable to be shared, it does not utilize the full capacity of the line.
It is important that the frequency bands are not allowed to overlap. In fact, there must be a considerable safety margin between them.

Time Division Multiplexing (TDM)

Instead of sharing the bandwidth of a cable, use of the cable can be time shared. Each incoming signal is given use of the line for a brief time period.
Multiplexer Terminal#1 Terminal#2 Terminal#3 #3 #2 #1 #3 #2 #1 Demultiplexer Device#1 Device#2 Device#3

The demultiplexer extracts the signals at the other end of the line.

Pros and Cons of TDM

The advantage of Time Division Multiplexing is that better use is made of the bandwidth of the line. In a simple system, if one of the signals is not being transmitted then its time slots will go unused. Statistical TDM systems will allocate empty time slots to other signals. However, this requires extra bits to identify the channel that the data belongs to.

Time Division Multiplexing (TDM)

Time division multiplexing shares a circuit among two or more terminals by having them take turns, dividing the circuit vertically. Time on the circuit is allocated even when data are not transmitted, so that some capacity is wasted when a terminal is idle. Time division multiplexing is generally more efficient and less expensive to maintain than frequency division multiplexing, because it does not need guardbands.

Time Division Multiplexing (TDM)

Statistical Time Division Multiplexing (STDM)

STDM is designed to make use of the idle time created when terminals are not using the multiplexed circuit. Like regular TDM, STDM uses time slots, but the time slots are not fixed. Instead, they are used as needed by the different terminals on the multiplexed circuit. Since the source of a data sample is not identified by the time slot it occupies, additional addressing information must be added to each sample. If all terminals try to use the multiplexed circuit intensively, response time delays can occur. The multiplexer also needs to contain memory to store data in case more data samples come in than its outgoing circuit capacity can handle.

4.#

56

PCM in TDM

Once digitised, it is relatively easy to send the data using Time Division Multiplexing. One widely format is called T1 carrier.

In this system, 8000 193 bit frames are transmitted every second (24 Channels).

The T1 Carrier Frame

7 bits are used to carry data from each channel. An extra bit is used for signalling associated with each channel. An extra bit is used to signal the beginning of each frame. It alternates between 0 and 1 for each successive frame (for synchronisation purposes). The gross data rate of the T1 carrier is 1.544 Mbps.

E1 Carrier

Outside the North America and Japan, E1 Carrier is widely used. E1 Carrier has a gross data rate of 2.048 Mbps. This system has 32 8-bit channels sent in a 256 bit frame. Two channels are used for signalling and the other 30 are used for data.

Frequency Shift Keying (FSK) Frequency is varied to represent binary 1 or 0. Noise interference not a problem because it's looking for frequency changes and doesn't care about voltage spikes.

Phase Shift Keying (PSK)


Phase is varied to represent binary 1 or 0. Limited by the ability of the equipment to detect small differences in phase. This limits its potential bit rate.

PSK Example
1 1 0 1 0 1

Data

Carrier

Carrier+ p

BPSK waveform

CS 515

62

Amplitude Shift Keying (ASK)

To represent binary signals, the amplitude is varied - 1 or 0.


Keying means turning a transmitter on and off. Highly susceptible to noise interference. Noise -- random electrical signals (voltages) that tend to generate

errors in transmission; introduced into a line by heat from circuit components, or natural disturbances .

Quadrature Amplitude Modulation (QAM)

Means combining ASK and PSK in such a way that we have a maximum contrast between each bit, dibit (one-pair), quadbit (two-pair), and so on. Theoretically, any measurable number of changes in amplitude can be combined with any measurable number of changes in phase. Uses more phase shifts than amplitude shifts to reduce noise susceptibility.

Figure 5-32

4-PSK Characteristics

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Bit and baud

Time domain for an 8-QAM signal

Figure 5-33

8-PSK Characteristics

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Figure 5-35

4-QAM and 8-QAM Constellations

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Figure 5-36

8-QAM Signal

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

Figure 5-37

16-QAM Constellation

WCB/McGraw-Hill

The McGraw-Hill Companies, Inc., 1998

You might also like