Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in ECT 305 ADC Module 3 Source Coding Source coding theorems I and II (Statements only). Waveform coding. Sampling and Quantization. Pulse code modulation, Transmitter and receiver. Companding. Practical 15 level A and mu-law companders. DPCM transmitter and receiver. Design of linear predictor. Wiener-Hopf equation. Delta modulation. Slope overload. Downloaded from Ktunotes.in Source coding theorems ● ● Source coding: the representation of data generated by a discrete source of information Source coding theorem : Given a discrete memoryless source whose output is denoted by the random variable S, the entropy H(S) imposes the following bound on the average codeword length for any source encoding scheme: where the parameter represents the average number of bits per source symbol used in the source encoding process. ● According to this theorem, the entropy H(S) represents a fundamental limit on the average number of bits per source symbol necessary to represent a discrete memoryless source, in that it can be made as small as but no smaller than the entropy H(S). Downloaded from Ktunotes.in Pulse modulation/ Waveform Coding Transition from Analog to Digital Communications ● ● ● ● ● In continuous-wave (CW) modulation (analog modulation), some parameter of a sinusoidal carrier wave is varied continuously in accordance with the message signal Ex: AM, PM, FM. In pulse modulation, some parameter of a pulse train is varied in accordance with the message signal. There are two families of pulse modulation, analog pulse modulation and digital pulse modulation, depending on how the modulation is performed. In analog pulse modulation, information is transmitted basically in analog form, but the transmission takes place at discrete times. Ex: PAM,PWM,PPM In digital pulse modulation, on the other hand, the message signal is represented in a form that is discrete in both time and amplitude, thereby permitting its transmission in digital form as a sequence of coded pulses. Ex: PCM,DPCM,DM Downloaded from Ktunotes.in ● ● ● 1. 2. 3. ANALOG SIGNAL: continuous in both time and amplitude DIGITAL SIGNAL: discrete in both time and amplitude To convert an analog signal into a digital signal there are three steps: Sampling Quantization Encoding Downloaded from Ktunotes.in Sampling ● ● Sampling process: an analog signal is converted into a corresponding sequence of samples that are usually spaced uniformly in time. Analog signal is sampled every TS sec. Ts is referred to as the sampling interval. ● fs = 1/Ts is called the sampling rate or sampling frequency. ● There are 3 sampling methods: 1. Ideal - an impulse at each sampling instant 2. Natural - a pulse of short width with varying amplitude 3. Flattop - sample and hold, like natural but with single amplitude value Downloaded from Ktunotes.in Different types of sampling methods Downloaded from Ktunotes.in Sampling theorem ● The sampling theorem for strictly band-limited signals of finite energy can be defined in two equivalent parts: 1. A band-limited signal of finite energy that has no frequency components higher than W hertz is completely described by specifying the values of the signal at instants of time separated by 1/2W seconds. 2. A band-limited signal of finite energy that has no frequency components higher than W hertz is completely recovered from knowledge of its samples taken at the rate of 2W samples per second. ● ● The sampling rate of 2W samples per second for a signal bandwidth of W hertz is called the Nyquist rate; its reciprocal 1/2W (measured in seconds) is called the Nyquist interval. The Nyquist rate is the minimum sampling rate permissible. In simple words, the sampling theorem can be stated as the sampling rate must be at least 2 times the highest frequency (Nyquist rate) contained in the signal. Downloaded from Ktunotes.in Downloaded from Ktunotes.in Examples : 1. Telephone companies digitize voice by assuming a maximum frequency of 4000 Hz. The sampling rate therefore is 8000 samples per second. (In telephony, the usable voice frequency band ranges from approximately 300 to 3400 Hz. The bandwidth allocated for a single voice-frequency transmission channel is usually 4 kHz, including guard bands, allowing a sampling rate of 8 kHz to be used) 2. A complex low-pass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal? Soln: The bandwidth of a low-pass signal is between 0 and f, where f is the maximum frequency in the signal. Therefore, we can sample this signal at 2 times the highest frequency (200 kHz). The sampling rate is therefore 400,000 samples per second. Downloaded from Ktunotes.in Examples: 3. A complex bandpass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal? Soln. We cannot find the minimum sampling rate in this case because we do not know where the bandwidth starts or ends. We do not know the maximum frequency in the signal. Downloaded from Ktunotes.in Examples 4. Specify the Nqyusit rate and Nyquist interval for each of the following signals. Note that Downloaded from Ktunotes.in Downloaded from Ktunotes.in ALIASING PHENOMENON ● ● ● If the information signal is not strictly band-limited, aliasing occurs. Aliasing is an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. It also often refers to the distortion or artifact that results when a signal reconstructed from samples is different from the original continuous signal. To combat the effects of aliasing in practice, we may use two corrective measures: 1. Prior to sampling, a low-pass anti-alias filter is used to attenuate those high-frequency components of a message signal that are not essential to the information being conveyed by the signal. 2. The filtered signal is sampled at a rate slightly higher than the Nyquist rate Downloaded from Ktunotes.in Quantization Process ● ● Quantization process: converts the continuous amplitude values of the signal into a discrete set of predefined values. In other words, it converts the continuous signal into discrete-in-amplitude signal. Amplitude quantization is defined as the process of transforming the sample amplitude m(nTs) of a baseband signal m(t) at time t=nTs into a discrete amplitude v(nTs) taken from a finite set of possible levels. Downloaded from Ktunotes.in ● ● ● We confine attention to a quantization process that is memoryless and instantaneous, which means that the transformation at time is not affected by earlier or later samples of the message signal. This form of quantization, though not optimal, is commonly used in practice because of its simplicity. When dealing with a memoryless quantizer, we use the symbol m in place of the sample m(nTs), for simplicity. The signal amplitude m is specified by the index k if it lies inside the interval where L is the total number of amplitude levels used in the quantizer Downloaded from Ktunotes.in ● ● ● ● ● ● The amplitudes, are called decision levels or decision thresholds The amplitudes are called quantized levels In the diagram, the dash lines represent the quantization levels. The spacing between two adjacent quantized levels is called the step-size ∆. Thus, the quantizer output v equals vk if the input signal sample m belongs to the interval Ik A device or algorithmic function that performs quantization is called a quantizer. Downloaded from Ktunotes.in ∆ ● The Step size, ∆ = (Xmax - Xmin) / L where Xmax is the maximum value of the signal, Xmin is the minimum value of the signal, L is the number of levels that divide the signal. ● Ex: assume a voltage signal of Vmax=20V& Vmin=-20V if we need L=8 uniform quantisation levels. Then, stepsize ∆ = (20 - -20) / 8 = 5. The 8 zones are then -20 to -15, -15 to -10,-10 to -5, -5 to 0, 0 to +5, +5 to +10, +10 to +15, +15 to +20. Then, the midpoints are: -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5, 17.5 Downloaded from Ktunotes.in Types of quantisation ● ● ● Quantizers can be of a uniform (linear) or nonuniform type depending on the step size. In a uniform quantizer, the quantized levels are uniformly spaced, i.e. , the step size is equal; otherwise, the quantizer is nonuniform. The quantizer characteristic is described by a staircase function. Downloaded from Ktunotes.in Types of uniform quantisation ● ● ● ● The uniform quantizer characteristic can be of a midtread or midrise type. Midtread type: the origin lies in the middle of a tread of the staircase like graph Midrise type: the origin lies in the middle of a rising part of the staircase like graph. Both are symmetric about the origin. Downloaded from Ktunotes.in Quantisation error ● ● ● ● ● The difference between an input value and its quantized value is referred to as quantization error / quantisation noise/ quantisation distortion. Let the quantisation error be denoted by the random variable Q, of sample value q. Hence, correspondingly For a uniform quantiser, Q will have its sample values bounded by To reduce the quantisation error, we need small value of ∆, and high value of L. However, in case of nonuniform quantization, the step size changes so it will have a minimum amount of error. Downloaded from Ktunotes.in Downloaded from Ktunotes.in Pulse-Code Modulation ● ● ● ● Pulse -code modulation (PCM), is the most basic form of digital pulse modulation. In PCM, a message signal is represented by a sequence of coded pulses, which is accomplished by representing the signal in discrete form in both time and amplitude. The basic operations performed in the transmitter of a PCM system are sampling, quantization, and encoding; the low-pass filter prior to sampling is included merely to prevent aliasing of the message signal. The quantizing and encoding operations are usually performed in the same circuit, which is called an analog-to-digital converter. PCM Transmitter Downloaded from Ktunotes.in Downloaded from Ktunotes.in ● The basic operations in the receiver are regeneration of impaired signals, decoding, and reconstruction of the train of quantized samples ● Regeneration also occurs at intermediate points along the transmission path as necessary Downloaded from Ktunotes.in OPERATIONS IN THE TRANSMITTER (i) Sampling ● ● ● The incoming message (baseband) signal is sampled with a train of rectangular pulses. To ensure perfect reconstruction of the message signal at the receiver, the sampling rate must be greater than twice the highest frequency component W of the message signal in accordance with the sampling theorem. In practice, an anti-alias (low-pass) filter is used at the front end of the sampler in order to exclude frequencies greater than W before sampling. Thus the application of sampling permits the reduction of the continuously varying message signal (of some finite duration) to a limited number of discrete values per second. Downloaded from Ktunotes.in (ii) Nonuniform Quantization ● ● ● ● ● The sampled version of the message signal is then quantized, thereby providing a new representation of the signal that is discrete in both time and amplitude. The quantization process may follow a uniform law. In certain applications, however, it is preferable to use a variable separation between the quantized levels. Hence, we use nonuniform quantization. For example, the range of voltages covered by voice signals, from the peaks of loud talk to the weak passages of weak talk. the weak passages that need more protection are assigned with smaller step size and the loud passages with higher step size. In this way, a fewer steps are needed than would be the case if a uniform quantizer were used. The step size distribution in nonuniform quantization is decided by the so called companding method which are actually compression laws Downloaded from Ktunotes.in aw ● ● companding The use of a nonuniform quantizer is equivalent to passing the message signal through a compressor and then applying the compressed signal to a uniform quantizer. A particular form of compression law that is used in practice is the so called defined by where the logarithm is the natural logarithm; m and v are respectively the normalized input and output voltages, and is a positive constant. ● The case of uniform quantization corresponds to Downloaded from Ktunotes.in ● ● ● The is neither strictly linear nor strictly logarithmic. It is approximately linear at low input levels corresponding to And approximately logarithmic at high input levels corresponding to Downloaded from Ktunotes.in A-law companding: ● Another compression law that is used in practice is the so-called A-law, defined by ● The case of uniform quantization corresponds to A = 1; Downloaded from Ktunotes.in (iii) Encoding ● ● The process to translate the discrete set of sample values to a more appropriate form of signal best suited to transmission over a wire line or radio path. Representing this discrete set of values as a particular arrangement of discrete binary code events called as a code. Downloaded from Ktunotes.in In practice, a binary code is preferred over other codes (e.g., ternary code) for two reasons: 1. The maximum advantage over the effects of noise in a transmission medium is obtained by using a binary code, because a binary symbol withstands a relatively high level of noise. 2. The binary code is easy to generate and regenerate. ● ● In a binary code, each code word consists of R bits: the bit is an acronym for binary digit. i.e. R denotes the number of bits per sample. By using a code with R bits per sample, we can represent a total of 2 R distinct numbers. For example, a sample quantized into one of 256 levels may be represented by an 8-bit code word. Downloaded from Ktunotes.in REGENERATION ALONG THE TRANSMISSION PATH ● ● The most important feature of a PCM system lies in the ability to control the effects of distortion and noise produced by transmitting a PCM signal over a channel. This capability is accomplished by reconstructing the PCM signal by means of a chain of regenerative repeaters located at sufficiently close spacing along the transmission route. Three basic functions are performed by a regenerative repeater: equalization, timing, and decision making. The equalizer shapes the received pulses so as to compensate for the effects of amplitude and phase distortions produced by the transmission characteristics of the channel. The timing circuitry provides a periodic pulse train, derived from the received pulses; this is done for renewed sampling of the equalized pulses. Downloaded from Ktunotes.in OPERATIONS IN THE RECEIVER (i) Decoding and Expanding ● ● ● The first operation in the receiver is to regenerate (i.e., reshape and clean up) the received pulses one last time. The decoding process involves generating a pulse whose amplitude is the weights linear sum of all the pulses in the code word. In the final step the message signal is estimated by a low-pass reconstruction filter whose cutoff frequency is equal to the message bandwidth. (The term “modulation” in pulse-code modulation is a misnomer. In reality, pulse-code modulation is a source-encoding strategy, by means of which an analog signal emitted by a source is converted into digital form.) Downloaded from Ktunotes.in Advantages and Disadvantages of PCM • Robustness to channel noise and interference; • Efficient regeneration of the coded signal along the transmission path; • Efficient exchange of increased channel bandwidth for improved signal-to-quantization noise ratio, obeying an exponential law; • A uniform format for the transmission of different kinds of baseband signals, hence their integration with other forms of digital data in a common network; • Comparative ease with which message sources may be dropped or reinserted in a multiplex system; • Secure communication through the use of special modulation schemes or encryption. These advantages, however, are attained at the cost of increased system complexity and increased transmission bandwidth. Downloaded from Ktunotes.in Hence, we have two other digital pulse modulation schemes which alleviate the drawbacks of PCM. 1. 2. Differential pulse-code modulation (DPCM): reduces the bandwidth requirement of PCM Delta modulation (DM): reduces the system complexity When a voice or video signal is sampled at a rate slightly higher than the Nyquist rate, as usually done in PCM, the resulting sampled signal is found to exhibit a high degree of correlation between adjacent samples. The meaning of this high correlation is that, the signal does not change rapidly from one sample to the next. When these highly correlated samples are encoded, the resulting encoded signal contains redundant information. By reducing this redundancy before encoding, we obtain a more efficient coded signal, which is the basic idea behind DPCM. Before discussing DPCM, letDownloaded us discuss a method for reduction of redundancy from Ktunotes.in Linear prediction-error filter The prediction error filter includes: • a direct forward path from the input to the output; • a predictor in the forward direction as well; and • a comparator for computing the difference between the input signal and the predictor output. The difference signal, so computed, is called the prediction error. Downloaded from Ktunotes.in ● ● To simplify the presentation, let denote a sample of the message signal m(t) taken at time t = nTs. Then, with denoting the corresponding predictor output, the prediction error is defined by where en is the amount by which the predictor fails to predict the input sample mn exactly. ● ● The objective is to design the predictor so as to minimize the variance of the prediction error en. Hence, we need only a smaller number of bits to represent en than the original message sample mn; hence, the need for a smaller transmission bandwidth. Downloaded from Ktunotes.in How do we recover the original message signal from the prediction error at the receiver? ● ● Let the operator L denote the action of the predictor, as Accordingly, Therefore, We may recognise this equation as the equation of a feedback system, and may be viewed as the inverse of prediction-error filtering. Downloaded from Ktunotes.in Discrete-Time Structure for Prediction ● ● Assume that the message signal m(t) is drawn from a stationary stochastic process M(t) with zero mean. Hence its sampled version Mn is also assumed to have zero mean. The overall linearly predicted output is defined by the convolution sum where p is called the prediction order, wk are the filter coefficients. ● ● ● The objective is to design the predictor so as to minimize the variance of the prediction error en Minimization of the prediction-error variance is achieved by a proper choice of the FIR filter-coefficients wk. With the random variable Mn assumed to have zero mean, it follows that the variance of the prediction error en is the same as its mean-square value. Downloaded from Ktunotes.in (Handwritten derivation follows) ● To design a prediction-error filter the output of which has a smaller variance than the variance of the message sample applied to its input, we need to follow the optimum formula. Downloaded from Ktunotes.in Differential Pulse-Code Modulation (DPCM) ● ● ● ● When a voice or video signal is sampled at a rate slightly higher than the Nyquist rate, as usually done in PCM, the resulting sampled signal is found to exhibit a high degree of correlation between adjacent samples. The meaning of this high correlation is that, the signal does not change rapidly from one sample to the next. When these highly correlated samples are encoded, the resulting encoded signal contains redundant information. Redundancy means that symbols that are not absolutely essential to the transmission of information. By removing this redundancy before encoding, we obtain a more efficient encoded signal, compared to PCM. If we know a sufficient part of a redundant signal, we may make the most probable estimate. In particular, if we know the past behavior of a signal up to a certain point in time, it is possible to make some inference about its future values; such a process is commonly called prediction. Downloaded from Ktunotes.in ● ● ● ● Suppose then a message signal m(t) is sampled at the rate fs=1/Ts giving the sampled signal m(nTs). A prediction of it is denote by which is modeled as a linear combination of p past sample values of the quantized version of m(nTs) where p is the prediction order. The input signal to the quantizer is then The difference signal e(nTs) is called the prediction error, since it is the amount by which the prediction filter fails to predict the incoming message signal exactly. By encoding the quantizer output, we obtain DPCM. DPCM Transmitter Downloaded from Ktunotes.in Substituting for eq(nTs), we get, We observe that the sum term is equal to the sampled message signal m(nTs). Therefore, we may rewrite the above equation as which represents a quantized version of the message sample m(nTs). Accordingly, if the prediction is good, the average power of the prediction error e(nTs) will be smaller than the average power of m(nTs) so that a quantizer with a given number of levels can be adjusted to produce a quantization error with a smaller average power than would be possible if m(nTs) were quantized directly using PCM. Downloaded from Ktunotes.in DPCM Receiver: ● ● ● ● In the absence of channel noise, we find that the encoded signal at the receiver input is identical to the encoded signal at the transmitter output. The decoder reconstructs the quantized error signal eq(nTs) . The input to prediction filter is mq(nTs) and the output is . Finally, an estimate of the original message signal m(t) is obtained by passing the sequence mq(nTs) through a low-pass reconstruction filter. Downloaded from Ktunotes.in Delta Modulation ● ● ● ● ● Another digital pulse modulation technique, a simpler one compared to PCM Unlike PCM, the difference between the input signal and its approximation is quantized into only two levels—namely, corresponding to positive and negative differences. Hence, DM transmits only 1 bit per sample. Thus, if the approximation falls below the input signal at any sampling epoch, it is increased by ∆, on the other hand, the approximation lies above the signal, it is diminished by ∆. Provided the input signal does not change too rapidly from sample to sample, the staircase approximation remains within of the input signal. We denote the input signal by m(t) and its staircase approximation by mq(t). Downloaded from Ktunotes.in Downloaded from Ktunotes.in Downloaded from Ktunotes.in DM Transmitter Downloaded from Ktunotes.in DM Receiver ● ● In the receiver, the staircase approximation is reconstructed by passing the sequence of positive and negative pulses, produced at the decoder output, through an accumulator in a manner similar to that used in the transmitter. The out-of-band quantization noise present in the high-frequency staircase waveform is rejected by passing through a filter. The filter is of a low-pass kind, with a bandwidth equal to the original message bandwidth. Downloaded from Ktunotes.in Quantization errors in DM ● ● ● DM is subject to two types of quantization error: (1) slope overload distortion and (2) granular noise. If the rate of rise of input signal m(t) is so high that the staircase signal can not approximate it, in other words the step size ∆ is too small for staircase signal to approximate m(t), then there is a large error between the staircase approximated signal and the original signal m(t). This error or noise is known as slope overload distortion. Downloaded from Ktunotes.in ● ● ● ● ● ● ● To reduce the slope overload distortion, the step size must be increased when slope of signal m(t) is high. However, a linear delta modulator has a fixed step size. If we fix a larger step size, it will create another problem called Granular noise. In contrast to slope-overload distortion, granular noise occurs when the step size is too large relative to the local slope characteristic of the original message signal. This second situation causes the staircase approximation to hunt around a relatively flat segment of m(t). Hence, there is a need to have a large step size to accommodate a wide dynamic range, whereas a small step size is required for the accurate representation of relatively low-level signals. It is therefore clear that if we are to choose an optimum step size that minimizes the average power of the quantization error in a delta modulator, we need to make the DM system adaptive. This requirement, in turn, means that the step size has to vary in accordance with the incoming message signal. Downloaded from Ktunotes.in DPCM Vs DM ● ● 1. 2. ● ● Differential pulse-code modulation includes delta modulation as a special case. They are basically similar, except for two important differences: The use of a one-bit (two-level) quantizer in the DM system. Replacement of the prediction filter in the DPCM by a single delay element (i.e., zero prediction order). In other words, DM is the 1-bit version of DPCM. Note, however, that unlike a PCM system, the transmitters of both the DPCM and DM involve the use of feedback. Insofar as noise is concerned, we may finally make the following two statements: 1. DPCM, like DM, is subject to slope-overload distortion whenever the input signal changes too rapidly for the prediction filter to track it. 2. Like PCM, DPCM suffers from quantization noise. Downloaded from Ktunotes.in Downloaded from Ktunotes.in