Module 4 IDC Anupam Samui

57
PCM & Delta Modulation

description

Introduction to Digital Communication

Transcript of Module 4 IDC Anupam Samui

Page 1: Module 4 IDC Anupam Samui

PCM & Delta Modulation

Page 2: Module 4 IDC Anupam Samui

To be discussed….

Quantization of signalPCM Encoder and PCM Decoder (Block

Diagram & response)Noise in PCM(Quantization noise), SNR

Calculation.Delta & Adaptive Modulation (Block

Diagram & response)

Page 3: Module 4 IDC Anupam Samui

3

Basic digital communications system

Modulator

Demodulator

Transmission Channel

Input transducer

Transmitter

Receiver

Output transducer

Carrier

EM waves (modulated signal)

EM waves (modulated signal)

Analog signal

analog signal

A/D

co

nver

ter

Digital signal

Err

or

corr

ecti

on

codi

ng

Err

or

dete

ctio

n/

corr

ecti

on

D/A

co

nver

ter

digital signal

Page 4: Module 4 IDC Anupam Samui

Digital Transmission of Analog Data

So we convert analog data to digital form for transmission.

How ….◦Digitize analog signal at the sending terminal◦Transmit Digital Signal◦Convert digital signal back to analog signal at receiver.

Digitization Procedure:◦Sampling (obtain signal values at equal intervals (T))◦Quantization (approximate samples to certain values)

Page 5: Module 4 IDC Anupam Samui

Digitization Procedure

Page 6: Module 4 IDC Anupam Samui

System…

Page 7: Module 4 IDC Anupam Samui

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

Page 8: Module 4 IDC Anupam Samui

Quantization…

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.

The magnitude difference between adjacent steps is called the quantization interval or quantum.

So, Quantization is the process of converting an infinite no of possibilities to a finite set of values.

Page 9: Module 4 IDC Anupam Samui

Resolution…

The magnitude of a quantum is also called the resolution.

The resolution is equal to the voltage of the minimum step size, which is equal to the voltage of the least significant bit (Vlsb) of the PCM code.

The smaller the magnitude of a quantum, the better (smaller) the resolution and the more accurately the quantized signal will resemble the original analog sample.

Page 10: Module 4 IDC Anupam Samui

Quantization Zone

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

Page 11: Module 4 IDC Anupam Samui

Coding...

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.

Important to note:-

Page 12: Module 4 IDC Anupam Samui

Quantization and coding…

Page 13: Module 4 IDC Anupam Samui

Type of Quantization

Page 14: Module 4 IDC Anupam Samui

PCM Encoder

Page 15: Module 4 IDC Anupam Samui

PCM Decoder

Page 16: Module 4 IDC Anupam Samui

Coding…

To protect the signal from noise, interference and other forms of channel impairments we use encoding process.

The maximum advantage over the effect of noise in a transmission medium is obtained by using a binary code, because a binary symbol withstands a relatively high level of noise and easy to regenerate.

If in a binary system, each code word consists of ‘R’ bits, i.e., R no of bits per sample. Then using such a code, we may represent a total of distinct nos. so, a sample quantized into 256 levels may be represented by a 8 bit code word.

R2

Page 17: Module 4 IDC Anupam Samui

Line Codes…

Types of Coding:◦Uni polar NRZ (fig a)◦Polar NRZ (fig b)◦Uni polar RZ (fig c)◦Bipolar RZ (fig d)◦Manchester Code

(fig e)

Page 18: Module 4 IDC Anupam Samui

Decoder…

To recover an analog signal from a digitized signal we follow the following steps:◦We use a hold circuit that holds the amplitude

value of a pulse till the next pulse arrives.◦We pass this signal through a low pass filter with

a cutoff frequency that is equal to the highest frequency in the pre-sampled signal.

The higher the value of L, the less distorted a signal is recovered

Page 19: Module 4 IDC Anupam Samui

PCM Transmitter & Receiver

Page 20: Module 4 IDC Anupam Samui

PCM Transceiver…

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. Here, we use sample and hold circuits and that generates Flat Top Sampling.◦ Sampling Rate : Nyquist Rate is used for standard sampling (as

explained before).

For the Analog to Digital Converter (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. If not, the ADC would be continually attempting to follow the changes and may never stabilize on any PCM code.

Page 21: Module 4 IDC Anupam Samui

Regenerative Repeater

These repeaters are used along with the transmission routes and plays a very important part in PCM systems.

Three basic functions are performed by this – equalizing, timing and decision making.◦ The Equalizer – shapes the received pulses so as to

compensate for the effects of amplitude and phase distortion produced by the channel.

◦ Timing circuitry – produces a periodic pulse train derived from the received pulses for sampling the equalized pulses.

◦ Decision Making - Each sample so extracted is then compared to a predetermined threshold in the decision making device. At each bit interval , a decision is then made whether a received

symbol is a 1 or 0 on the basis if the threshold is exceeded or not. If the threshold is exceeded a new pulse representing symbol 1 is

transmitted to the next repeater. Else a 0 is transmitted.

Page 22: Module 4 IDC Anupam Samui

Regenerative Repeater…

PCM Wave Regenerated

(Distorted) PCM

Amplifier -

Equalizer

Decision Making Device

Timing Circuit

Page 23: Module 4 IDC Anupam Samui

Drawback of Regenerative repeater…

In practice, the repeaters are not able to produce the desired output for the following reasons – ◦The unavoidable of presence of channel noise

and interference causes the repeater to make wrong decisions occasionally, thereby introducing bit errors in the system.

◦If the spacing between received pulses deviates from its assigned value, a jitter is introduced to the regenerated pulse position thus causing distortion.

Page 24: Module 4 IDC Anupam Samui

Transmission(Parallel/ Serial)

Page 25: Module 4 IDC Anupam Samui

Bandwidth & Bit rate for 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.

A digitized signal will always need more bandwidth than the original analog signal. Price we pay for robustness and other features of digital transmission.

For B Hz signal we need B Hz channel BW 2B samples/sec “ ” B Hz “ “ 2 bps ………… 1 Hz ………

Page 26: Module 4 IDC Anupam Samui

Example of Bit rate…

The human voice normally contains frequencies from 0 to 4000 Hz. So the sampling rate and bit rate are calculated as follows:

Page 27: Module 4 IDC Anupam Samui

Noise in PCM

Two major noise sources in PCM systems◦(Message-independent) Channel noise◦(Message-dependent) Quantization noise

The quantization noise is often under designer’s control, and can be made negligible as by taking adequate number of quantization levels.

Page 28: Module 4 IDC Anupam Samui

Channel Noise…

The main effect of channel noise is to introduce bit errors.◦ Notably, the symbol error rate is quite different from the

bit error rate.

◦A symbol error may be caused by one-bit error, or two bit error, or three-bit error, or …; so in general, one cannot derive the symbol error rate from the bit error rate (or vice versa) unless some special assumption is made.

◦Considering the reconstruction of original analog signal, a bit error in the most significant bit is more harmful than a bit error in the least significant bit.

Page 29: Module 4 IDC Anupam Samui

Quantization Noise…

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

Page 30: Module 4 IDC Anupam Samui

Noise for Mid tread Quantizer

Page 31: Module 4 IDC Anupam Samui

Quantization Noise…

Signals with lower amplitude values will suffer more from quantization error as the error range: /2, is fixed for all signal levels.

Non linear quantization is used to alleviate this problem. Goal is to keep SNQR fixed for all sample values.

Two approaches:◦ The quantization levels follow a logarithmic curve. Smaller ’s

at lower amplitudes and larger’s at higher amplitudes.

◦ Companding: The sample values are compressed at the sender into logarithmic zones, and then expanded at the receiver. The zones are fixed in height.

Page 32: Module 4 IDC Anupam Samui

Noise Calculation in PCM

Quantization Noise Calculation :Consider, m be the input to the quantizer from a

variable set M and after quantization it produces a discrete random variable v and the quantization error is given by q. i.e.,

q = m-v. if we consider, m is a sample value of zero mean

random variable M of continuous amplitude and v is a sample from a set of random variables V and also the quantizer is assumed to be symmetric, the it follows that the quantization error variable Q will have zero mean.

if , m is having a value in the range and the no of levels is L . Then step size of quantizer is given by

),( maxmax mm

L

mmax2

Page 33: Module 4 IDC Anupam Samui

Noise Calculation in PCM

for a uniform quantizer, the quantization error Q will have its sample values bounded by . If the step size is sufficiently small (L is having large value) , then its reasonable to assume that the quantization error Q is a uniformly distributed random variable. So we may express the probability density function of Q as

otherwise

now having the mean of the quantization error being zero, its variance is the same as the mean square value

2/2/ q

,022

,1

)(

qqfQ

2

2

2

22

)(

][

dqqfq

QE

Q

Q

Page 34: Module 4 IDC Anupam Samui

Noise Calculation in PCM

substituting in the previous expression we have )(qfQ

12

1

2

2/

2/

22

qQ

Page 35: Module 4 IDC Anupam Samui

SNR in PCM

SNR Calculation:if R denotes the no of bits per sample then we can

writeL = or R = log2 L

so we have which in turn produces

Let, P denote the average power of the message signal m(t).Then we can express SNR as

R

m

2

2 max

RQ m 22

max2 2

3

1

R

Qo

m

P

PSNR

22max

2

2)3

(

)(

R2

Page 36: Module 4 IDC Anupam Samui

Implication of SNR in PCM

The SNR expression shows that the output SNR of the quantizer increases exponentially with the increase in no of bits per sample. But, increase in the no of bits requires a proportionate increase in the channel bandwidth.

Page 37: Module 4 IDC Anupam Samui

Problem

Calculate the SNR for a sinusoidal modulating signal of amplitude Am

◦Sol:- the average signal power is given by

the total range of quantizer is 2Am. So we set m =Am.

So the variance is calculated as –

2

2mAP

)(68.1)(log10

.,.

)2(2

3

3/2

2/)(

,

23

1

10

222

2

222

dBRSNR

ei

A

ASNR

so

A

o

RR

m

mo

RmQ

Page 38: Module 4 IDC Anupam Samui

Companding…

Quantization process could be of two types – uniform & non- uniform.

Why non- uniform ??◦The range of voltages covered by voice signals from

the peaks of loud talks to the weak talk is on the order of 1000 to 1.

◦By using a non-uniform quantizer with the feature that the step size increases as the separation from the input-output amplitude characteristics is increased, the large end steps of the quantizer is can take care of the possible excursion of the voice signal into the large amplitude changes that occur relatively infrequently.

Page 39: Module 4 IDC Anupam Samui

Companding…

In this method, a nearly uniform percentage precision is achieved throughout the greater part of the amplitude range of the input signal, with the result that fewer steps would be needed than would be the case if a uniform quantizer were used.

The equivalent effect of the system is to pass the baseband signal through a compressor and then applying the signal to a uniform quantizer. The popular compression laws used in practice are μ law and A law.

To restore the signal samples at the receiver we need to have a system that will have a characteristics complementary to the compressor is the expander. And the combination of this Compressor and Expander is called Compander.

Page 40: Module 4 IDC Anupam Samui

Delta Modulation

With conventional PCM, each code is a binary representation of both the sign and the magnitude of a particular sample. Therefore, multiple-bit codes are required to represent the many values that the sample can be.

With delta modulation, rather than transmit a coded representation of the sample, only a single bit is transmitted, which simply indicates whether that sample is larger or smaller than the previous sample.

Page 41: Module 4 IDC Anupam Samui

DM…

This scheme sends only the difference between pulses, if the pulse at time tn+1 is higher in amplitude value than the pulse at time tn, then a single bit, say a “1”, is used to indicate the positive value.

If the pulse is lower in value, resulting in a negative value, a “0” is used.

This scheme works well for small changes in signal values between samples.

If changes in amplitude are large, this will result in large errors.

Page 42: Module 4 IDC Anupam Samui

Wave form Presentation

Page 43: Module 4 IDC Anupam Samui

DM…

Important to note:

Delta-modulation rule: smaller δ⇒smaller T, larger δ⇒larger T

Page 44: Module 4 IDC Anupam Samui

Delta Modulation Components

Page 45: Module 4 IDC Anupam Samui

Delta Modulation Transmitter

The input analog is sampled and converted to a PAM signal, which is compared with the output of the DAC.

The output of the DAC is a voltage equal to the regenerated magnitude of the previous sample, which was stored in the up-down counter as a binary number.

The up-down counter is incremented or decremented depending on whether the previous sample is larger or smaller than the current sample.

Page 46: Module 4 IDC Anupam Samui

Delta Modulation Transmitter

The up-down counter is clocked at a rate equal to the sample rate. Therefore, the up-down counter is updated after each comparison.

Initially, the up-down counter is zeroed, and the DAC is outputting 0 V. The first sample is taken, converted to a PAM signal, and compared with zero volts.

The output of the comparator is a logic 1 condition (+ V), indicating that the current sample is larger in amplitude than the previous sample. On the next clock pulse, the up--down counter is incremented to a count of 1.

Page 47: Module 4 IDC Anupam Samui

Delta Demodulation Receiver

Page 48: Module 4 IDC Anupam Samui

Problems with DM : Slope Overload

Slope overload - when the analog input signal changes at a faster rate than the DAC can maintain. The slope of the analog signal is greater than the delta modulator can maintain and is called slope overload.

Increasing the clock frequency reduces the probability of slope overload occurring. Another way to prevent slope overload is to increase the magnitude of the minimum step size.

Page 49: Module 4 IDC Anupam Samui

Slope Overload

Page 50: Module 4 IDC Anupam Samui

Problems With DM : Granular Noise

Granular noise. It can be seen that when the original analog input signal has a relatively constant amplitude, the reconstructed signal has variations that were not present in the original signal. This is called granular noise. Granular noise in delta modulation is analogous to quantization noise in conventional PCM.

Page 51: Module 4 IDC Anupam Samui

Problems With DM : Granular Noise

Granular noise can be reduced by decreasing the step size. Therefore, to reduce the granular noise, a small resolution is needed, and to reduce the possibility of slope overload occurring, a large resolution is required. Obviously, a compromise is necessary.

Granular noise is more prevalent in analog signals that have gradual slopes and whose amplitudes vary only a small amount. Slope overload is more prevalent in analog signals that have steep slopes or whose amplitudes vary rapidly.

Page 52: Module 4 IDC Anupam Samui

Problems With DM : Granular Noise

Page 53: Module 4 IDC Anupam Samui

Adaptive DM (ADM)

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.

Page 54: Module 4 IDC Anupam Samui

Waveform for ADM

Page 55: Module 4 IDC Anupam Samui

ADM…

When the output of the transmitter is a string of consecutive 1s or 0s, this indicates that the slope of the DAC output is less than the slope of the analog signal in either the positive or the negative direction. Essentially, the DAC has lost track of exactly where the analog samples are, and the possibility of slope overload occurring is high. With an adaptive delta modulator, after a predetermined number of consecutive 1s or 0s, the step size is automatically increased. After the next sample, if the DAC output amplitude is still below the sample amplitude, the next step is increased even further until eventually the DAC catches up with the analog signal.

Page 56: Module 4 IDC Anupam Samui

ADM…

When an alternating sequence of 1s and 0s is occurring, this indicates that the possibility of granular noise occurring is high. Consequently, the DAC will automatically revert to its minimum step size and, thus, reduce the magnitude of the noise error.

A common algorithm for an adaptive delta modulator is when three consecutive 1s or 0s occur, the step size of the DAC is increased or decreased by a factor of 1.5.

Various other algorithms may be used for adaptive delta modulators, depending on particular system requirements

Page 57: Module 4 IDC Anupam Samui

Task

Please also include the figures discussed for ADM and so…