PCM
Definition
Pulse Code Modulation (PCM) is a digital representation method in which an analog signal is sampled at uniform intervals, quantized into discrete amplitude levels, and then encoded into binary digits (0s and 1s) for transmission or storage.
In simple terms, PCM changes a continuously varying analog signal into a sequence of digital codes.
Main Content
1. Sampling
Sampling is the process of measuring the amplitude of an analog signal at equal time intervals.
Instead of trying to represent every instant of the continuous waveform, PCM takes “snapshots” of the signal at regular moments. Each snapshot is called a sample.
The sampling rate determines how accurately the original signal is represented.
A higher sampling rate captures more details of the waveform, while a lower sampling rate may miss important changes and cause distortion. According to the Nyquist criterion, the sampling frequency must be at least twice the highest frequency present in the signal to reconstruct it properly.
Example: For audio with a maximum frequency of 20 kHz, the sampling rate should be at least 40 kHz. That is why standard audio CDs use 44.1 kHz sampling.
Why sampling is important:
The original analog signal is continuous in time, but digital systems need discrete-time data. Sampling is the first step that converts a continuous-time signal into a sequence of discrete-time samples.
Basic idea of sampling:
Analog signal: ~~~~~~~~^^^^^^^^~~~~~~~^^^^^^~~~~~~~
Sampling instants: | | | | | |
Sample values: * * * * * *
Each * represents a measured value at a specific instant.
2. Quantization
Quantization is the process of assigning each sampled value to the nearest value from a finite set of allowed amplitude levels.
Since computers cannot represent infinitely many values, the amplitude of each sample is rounded to a nearby discrete level.
Quantization introduces a small error known as quantization error or quantization noise.
This error is the difference between the actual sample value and the quantized value. The more quantization levels available, the smaller the error.
Example: If a sample value is 3.7 volts and the nearest quantization level is 4 volts, the error is 0.3 volts.
Key aspects of quantization:
- The number of levels depends on the number of bits used per sample.
- If n bits are used, the number of quantization levels is 2ⁿ.
- More bits per sample improve accuracy but increase data size.
Example:
If 3 bits are used for quantization:
- Number of levels = 2³ = 8
- Possible codes: 000, 001, 010, 011, 100, 101, 110, 111
Effect of quantization:
- Improves digital representation by making amplitudes discrete.
- May slightly distort the signal due to rounding.
- Higher resolution reduces distortion.
Quantization concept in simple form:
Sample value -> nearest level -> binary code
3.7 V -> 4 V -> 100
2.2 V -> 2 V -> 010
3. Encoding
Encoding is the process of converting each quantized level into a binary number.
Once the sample has been assigned to a discrete amplitude level, that level is represented in binary form so it can be handled by digital devices.
The number of bits per sample affects data rate and quality.
More bits provide better representation of signal amplitude, but they also increase the amount of data that must be transmitted or stored.
Example: An 8-bit PCM system can represent 256 levels, while a 16-bit PCM system can represent 65,536 levels.
Why encoding is necessary:
Digital communication systems transmit data as binary pulses. Encoding converts the physical sample levels into a form suitable for transmission over a digital channel.
Example of PCM encoding:
- Sampled and quantized level 1 →
0001 - Sampled and quantized level 2 →
0010 - Sampled and quantized level 3 →
0011 - Sampled and quantized level 4 →
0100
Overall role of encoding:
It is the final step that turns the analog sample into a digital message.
Working / Process
1. The analog input signal is applied to the PCM system.
This could be speech, music, temperature, video brightness, or any other continuously varying physical quantity converted into an electrical signal.
2. The signal is sampled and quantized.
The system takes regular samples of the input waveform and rounds each sample to the nearest allowed amplitude level. This creates discrete amplitude values.
3. The quantized values are encoded into binary and transmitted or stored.
Each discrete level is converted into a binary code. The resulting bit stream can be sent through a communication channel, saved in memory, or processed by digital circuits. At the receiver, the bit stream can be decoded and reconstructed into an approximate analog signal.
PCM system flow:
Analog Signal
|
v
Sampling
|
v
Quantization
|
v
Binary Encoding
|
v
Digital Bit Stream
|
v
Transmission / Storage
At the receiver:
The binary data is decoded, converted back to quantized levels, and passed through a reconstruction filter to approximate the original analog signal. The output is not perfectly identical to the original due to sampling and quantization effects, but it is usually very close.
Important note:
The quality of reconstruction depends on:
- sampling frequency
- number of bits per sample
- noise in the communication channel
- correctness of synchronization at the receiver
Advantages / Applications
High noise immunity and reliable transmission.
Digital pulses are less affected by noise than analog signals. Even if some distortion occurs during transmission, digital signals can often be regenerated accurately at repeaters, making PCM highly reliable for long-distance communication.
Easy storage, processing, and encryption.
Once a signal is in digital form, it can be stored on memory devices, processed by computers, compressed for efficient use, and encrypted for secure communication. This is one reason PCM is widely used in modern multimedia and telecommunication systems.
Wide range of practical applications.
PCM is used in telephone networks, digital audio systems, CD recording, mobile communication, satellite communication, speech transmission, and computer-based signal processing. It is also fundamental in systems where analog information must be integrated with digital technology.
Examples of PCM applications:
- Landline and mobile telephony
- Audio CDs and voice recorders
- Internet voice calls and VoIP systems
- Digital television and multimedia systems
- Medical instrumentation and sensor data acquisition
Summary
- PCM converts an analog signal into binary form by sampling, quantizing, and encoding.
- It is a core technique in digital communication because it improves reliability and compatibility with digital systems.
- Terms to remember: sampling, quantization, encoding, quantization error, sampling rate, bit rate