PCM Delta Modulation Module 4 Quantization of signal

  • Slides: 58
Download presentation
PCM & Delta Modulation Module 4

PCM & Delta Modulation Module 4

�Quantization of signal �PCM Encoder and PCM Decoder (Block Diagram & response) �Noise in

�Quantization of signal �PCM Encoder and PCM Decoder (Block Diagram & response) �Noise in PCM(Quantization noise), SNR Calculation. �Delta & Adaptive Modulation (Block Diagram & response) To be discussed….

Basic digital communications system Transmitter Input transducer Error correction coding Digital signal A/D converter

Basic digital communications system Transmitter Input transducer Error correction coding Digital signal A/D converter Analog signal EM waves (modulated signal) Transmission Channel Modulator Carrier EM waves (modulated signal) Receiver Error detection/ correction Output transducer digital signal D/A converter analog signal Demodulator 3

�So we convert analog data to digital form for transmission. �How …. ◦ Digitize

�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) Digital Transmission of Analog Data

Digitization Procedure

Digitization Procedure

System…

System…

�Sampling results in a series of pulses of varying amplitude values ranging between two

�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 Quantization…

�The midpoint of each zone is assigned a value from 0 to L-1 (resulting

�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. Quantization…

�The magnitude of a quantum is also called the resolution. �The resolution is equal

�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. Resolution…

�Assume we have a voltage signal with amplitudes Vmin=-20 V and Vmax=+20 V. �We

�Assume we have a voltage signal with amplitudes Vmin=-20 V and Vmax=+20 V. �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, 7. 5, 12. 5, 17. 5 Quantization Zone

� Each zone is then assigned a binary code. � The number of bits

� 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 = log 2 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: - Coding. . .

Quantization and coding…

Quantization and coding…

Type of Quantization

Type of Quantization

PCM Encoder

PCM Encoder

PCM Decoder

PCM Decoder

� To protect the signal from noise, interference and other forms of channel impairments

� 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. Coding…

�Types of Coding: ◦ Uni polar NRZ (fig a) ◦ Polar NRZ (fig b)

�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) Line Codes…

�To recover an analog signal from a digitized signal we follow the following steps:

�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 Decoder…

PCM Transmitter & Receiver

PCM Transmitter & Receiver

� The function of a sampling circuit in a PCM transmitter is to periodically

� 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. PCM Transceiver…

� These repeaters are used along with the transmission routes and plays a very

� 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. Regenerative Repeater

Decision Making Device PCM Wave Regenerated. Amplifier (Distorted) Equalizer Timing Circuit Regenerative Repeater… PCM

Decision Making Device PCM Wave Regenerated. Amplifier (Distorted) Equalizer Timing Circuit Regenerative Repeater… PCM

�In practice, the repeaters are not able to produce the desired output for the

�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. Drawback of Regenerative repeater…

Transmission(Parallel/ Serial)

Transmission(Parallel/ Serial)

� The bit rate of a PCM signal can be calculated form the number

� 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 2 B samples/sec “ ” B Hz “ “ 2 bps ………… 1 Hz ……… Bandwidth & Bit rate for PCM

�The human voice normally contains frequencies from 0 to 4000 Hz. So the sampling

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

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

�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. Noise in PCM

�The main effect of channel noise is to introduce bit errors. ◦ Notably, the

�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. Channel Noise…

�When a signal is quantized, we introduce an error the coded signal is an

�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. more zones, the smaller which results in smaller errors. �The �BUT, the more zones the more bits required to encode the samples -> higher bit rate Quantization Noise…

Noise for Mid tread Quantizer

Noise for Mid tread Quantizer

� Signals with lower amplitude values will suffer more from quantization error as the

� 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. Quantization Noise…

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

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 Noise Calculation in PCM

for a uniform quantizer, the quantization error Q will have its sample values bounded

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 Noise Calculation in PCM

substituting in the previous expression we have Noise Calculation in PCM

substituting in the previous expression we have Noise Calculation in PCM

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

SNR Calculation: if R denotes the no of bits per sample then we can write L= or R = log 2 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 SNR in PCM

�The SNR expression shows that the output SNR of the quantizer increases exponentially with

�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. Implication of SNR in PCM

�Calculate the SNR for a sinusoidal modulating signal of amplitude Am ◦ Sol: -

�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 2 Am. So we set m =Am. So the variance is calculated as – Problem

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

�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. Companding…

� In this method, a nearly uniform percentage precision is achieved throughout the greater

� 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. Companding…

�With conventional PCM, each code is a binary representation of both the sign and

�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. Delta Modulation

� This scheme sends only the difference between pulses, if the pulse at time

� 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. DM…

Wave form Presentation

Wave form Presentation

�Important to note: �Delta-modulation larger δ⇒larger T DM… rule: smaller δ⇒smaller T,

�Important to note: �Delta-modulation larger δ⇒larger T DM… rule: smaller δ⇒smaller T,

Delta Modulation Components

Delta Modulation Components

�The input analog is sampled and converted to a PAM signal, which is compared

�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. Delta Modulation Transmitter

�The up-down counter is clocked at a rate equal to the sample rate. Therefore,

�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. Delta Modulation Transmitter

Delta Demodulation Receiver

Delta Demodulation Receiver

�Slope overload - when the analog input signal changes at a faster rate than

�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. Problems with DM : Slope Overload

Slope Overload

Slope Overload

�Granular noise. It can be seen that when the original analog input signal has

�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. Problems With DM : Granular Noise

�Granular noise can be reduced by decreasing the step size. Therefore, to reduce the

�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. Problems With DM : Granular Noise

Problems With DM : Granular Noise

Problems With DM : Granular Noise

�Adaptive delta modulation is a delta modulation system where the step size of the

�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. Adaptive DM (ADM)

Waveform for ADM

Waveform for ADM

� When the output of the transmitter is a string of consecutive 1 s

� When the output of the transmitter is a string of consecutive 1 s or 0 s, 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 1 s or 0 s, 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. ADM…

�When an alternating sequence of 1 s and 0 s is occurring, this indicates

�When an alternating sequence of 1 s and 0 s 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 1 s or 0 s 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 ADM…

�Line coding was introduced for the transmission of baseband signals over a communication channel.

�Line coding was introduced for the transmission of baseband signals over a communication channel. �The PCM signal cannot be directly transmitted because of disadvantages like Inter Symbol Interference (ISI), synchronization between transmitter and receiver and a undesired DC level if a long string of ‘ 1‘ or ‘ 0‘ occurs. To take care of synchronization and DC level, line coding is done before the signal is transmitted. Line coding