Lecture 4 DPCM
Lecture 4 DPCM
Lecture 4 DPCM
The Pulse-code modulation (PCM) is the process that include the analog digital conversion + the representation of the digital code by an electrical signal (pulses) The pulse code modulation is divided into two categories 1- The Pulse Amplitude modulation (PAM) combine 2 or more bits into one symbol Example: A two-bit modulator (PAM-4) will take two bits at a time and will map the signal amplitude to one of four possible levels, for example 3 volts, 1 volt, 1 volt, and 3 volts. The resulting symbol duration Ts = 2 * bit duration (Tb) 2- Pulse Time modulation : PWM: A pulse with different width is assigned to each digital code. PPM: The pulse position changes with respect to the digital code. The transformation of digital signal into electrical signal will be covered in lecture 6 ( Line codes ). Differential Pulse Code Modulation According to the Nyquist sampling criterion, a signal must be sampled at a sampling rate that is at least twice the highest frequency in the signal to be able to reconstruct it without aliasing. However, when a signal is highly over sampled (sampled at several times the Nyquist rate, the signal does not change a lot between from one sample to another. This fact can be used to improve the performance of quantizers significantly by quantizing a signal that is the difference between consecutive samples instead of quantizing the original signal. Smaller signal + same number of bits noise better SNR. smaller quantization step smaller quantization
This will result in either requiring a quantizer with much less number of bits (less information to transmit) or a quantizer with the same number of bits but much smaller quantization intervals (less quantization noise and much higher SNR).
Let the difference between to consecutive samples: As mentioned above, for signals x(t) that are sampled at a rate much higher than the Nyquist rate, the range of values of d[k] will be less than the range of values of x[k].
After the transmission of the quantized signal dq [k], theoretically we can reconstruct the original signal by doing an operation that is the inverse of the above operation. So, we can obtain an approximation of x[k] using
The receiver that will attempt to reconstruct the original signal after transmitting it through the channel can be represented by the following block diagram.
. x[n] =
dq[k ] .
k =0
Because we are quantizing a difference signal and transmitting that difference over the channel, the reconstructed signal may suffer from one or two possible problems. Accumulation of quantization noise: The above system suffer from the possible accumulation of the quantization noise. Unlike the quantization of a signal where quantization error in each sample of that signal is completely independent from the quantization error in other samples, the quantization error in this system may accumulate to the point that it will result in a reconstructed signal that is very different from the original signal. Example: Consider the samples of the input signal x[k] given in the table.
The reconstructed signal is given by x^[k] shown in table. Assume the quantizer used to quantize d[k] is an 8 levels quantizer with quantization intervals [4,3), [3,2), [2,1), , [3,4) and the output quantization levels are the center points in each interval (3.5, 2.5, 1.5, , 3.5).
Table 1 So, it is clear from this table that if the quantization error for a series of samples is going in one direction, the error adds up to produce a output signal that deviates from the original signal. Note that the error between the original and reconstructed samples always increased except when the quantization error switched direction at k = 7 (the shaded box). Remark: quantification intervals width= 1 but for the 7th column the error between the resconstructed sample and the real value= 2 = 4 times bigger than a non-differential encoder ( ADC). 2. Effect of transmission errors: in a regular PCM system, The effect of an error that happens in the transmitted signal is only limited to the sample in which the error occurs. In DPCM, an error that occurs in the transmitted signal will cause all the reconstructed samples at the receiver after that error occurs to have errors. Therefore, even if quantization error did not accumulate, an error caused by the channel will cause all successive samples to be wrong.. Try this as an exercise by constructing g a table similar to the one above. Intentionally introduce an error in the reconstructed signal at a point and see what happens to the remainder of the reconstructed signal.. Eliminating the problem of accumulation of quantization noise: This problem can be solved by avoiding the quantization of the difference signal d[k] between x[k] and its previous sample x[k1] and quantizing instead a difference signal (we will call it g[k]) that is the difference between x[k] and the previous sample of its quantized form xq [k1]. Therefore, g[k] is given by (1) = x[k] - xq[k - 1] + q[k] = xq[k] - xq[k - 1] (2)
Remark q[k] is the quantization error of g[k] not of x[k]. So xq [k] is not the output of the Quantizer when the input is x[k] . We can rewrite (1) as g[k]= x[k] - x[k-1] q[k-1] = x[k] - x[k-1] (gq[k-1]- g[k-1] ) (3) This equation will be used for coding or modulation process. Block diagram of the modulator: The block diagram of the Differential pulse code modulator is obtained from the following equations:
(1)
(2)
(2) gq[k ] + xq[k 1] = x[k ] + q[k ] = xq[k ] ( if we add the delayed version of xq[k] to gq[k] we obtain xq[k])
At the receiver side of the DPCM system, we can use the gray block in the transmitter labeled Predictor since its input is the DPCM output gq [k] and its output is the desired signal xq [k]. Therefore the block diagram would be as follows.
Now, assume the quantizer used to quantize g[k] is again an 8level quantizer with quantization intervals [4,3), [3,2), [2,1), , [3,4) and the output quantization levels are the center points in each interval (3.5, 2.5, 1.5, , 3.5).
Table 2
We will use this equation for the coding process: g[k]= x[k] - x[k-1] (gq[k-1]- g[k-1] ) (3) Coding: The purpose is to determine gq[k] First we calculate g[k] from : g[k]= x[k] - x[k-1] (gq[k-1]- g[k-1] ) (3) And we deduce gq[k] for k=0 x[0] is given g[0] = x[0] x[-1] - (gq[-1]-g[-1])=0,3- 0 (0,5 0 ) = -0,2 gq[0] = - 0,5 for k=1: x[1] is given g[1] = x[1] x[0] - (gq[0]-g[0]) = 1,5 - 0,3 (-0,5 +0,2)= 1,5
Decoding: ( Remark ( ^ ) estimated value , in our case xq^[k] is the same as xq[k] because gq[k] received is considered the same as the one transmitted. we have : xq^[k]=gq[k]+xq^[k-1] So for k=0 x^[0]=gq[0]+x^[-1]=gq[0] x^[1]=gq[1]+x^[0]=gq[1]+gq[0] x^[2]=gq[2]+x^[1]=gq[2]+gq[1]+gq[0] n x^[n]= 0 gq[n] ( with this form it s not necessary to calculate x^[k-1]) . We have directly the relation between the received and the decoded value. OR we can use the equation xq^[k]=gq[k]+xq^[k-1]
Table 3
Remark : we can observe (from table 2) that the difference between the real value x[k] and the estimated value which is xq^[k] does not exceed 0,5 so we have suppressed the accumulation of errors due to the quantification.
Exercise : For a DPCM the SNR(dB) = a+6n dB where (-3<a<15 dB) For a PCM coding we have SNR dB= 4,77 + 6n 20.log10(ln(1+)) Where n is the number of bits, is the -LAW compression parameter
a- What is the amount of SNR improvement due to DPCM for n=8. b- How many bits in less the DPCM can use to achieve the same SNR as (PCM, 8 bits) first case a=-3 a= 15 dB Solution: