Pulse code modulation

Pulse code modulation


Pulse code modulation is the most common digitization technique (output is digital in nature). In this analog signal is modulated through three stages viz. Sampling, Quantization and Encoding to get digital signal.

Sampling


In sampling the input analog signal is sampled i.e. samples of the continuous wave is made. Now top of those samples are made flat using flat-top sampling. Sampling can be either one of the three kinds: Ideal sampling, Natural sampling, and Flat-top sampling as shown in the diagram. A very important point here is that the number of samples (sampling rate) must be at least 2 times of the highest frequency contained in the signal.

Quantization


After sampling some values of the flat-top samples are non-integral. These values are changed to their nearest normalized quantized values with minimum normalized error. Suppose we have sampled values like -1.25, 1.50, 2.20 etc. and normalized values like -1.5, -0.5, 0.5, 1.5, 2.5 etc. -1.25 is nearest to -1.5 with normalized error = (-1.5)-(-1.25) = -0.25, 1.50 is nearest to 1.5 with normalized error 0, 2.20 is nearest to 2.5 with normalized error 0.3 .
Now we have all sampled values changed to normalized values. These values have their corresponding quantization codes. As shown in the following diagram, eight quantization levels are considered. We may consider levels in the power of 2 like 2, 4, 8, 16 levels etc. as per convenience of the problem. If there are 8 quantization levels according to the problem they are numbered as 0, 1, 2, 3, 4, 5, 6, 7. The last step in quantization is to obtain values of quantization codes.

Encoding



In encoding these quantization codes are converted to their corresponding binary values and thus digital data is obtained.