3th class /Communication system Dr. Samir J.
Mohammed
Dr. Ghadeer H. Eskander
Pulse Code Modulation
Pulse Code Modulation (PCM) is the standard method for converting an analog
signal (like a voice or music) into a digital format. It is a fundamental concept in
telecommunications and Digital Signal Processing (DSP).
The process of PCM consists of three main steps: Sampling, Quantization, and
Encoding.
Block diagram of pulse code modulation (PCM).
The Three Stages of PCM:
1. Sampling:
In this stage, the continuous analog signal is measured at discrete time
intervals. To ensure the original signal can be reconstructed without
distortion (aliasing), the Nyquist Sampling Theorem must be followed.
Nyquist Rate (𝑓𝑠 ): The sampling frequency must be at least twice the
highest frequency (𝑓𝑚 ) present in the signal (𝑓𝑠 ≥ 2𝑓𝑚 ).
2. Quantization:
Since the sampled values (amplitudes) can be any number, they must be
rounded to the nearest pre-defined discrete level. This process introduces
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
a small amount of error known as Quantization Noise or Quantization
Error. The more "levels" (L) you have, the lower the noise and the higher
the quality of the digital signal.
3. Encoding:
Each quantized level is assigned a unique binary code (a string of 0s and
1s). If we use n bits, the number of available quantization levels is 𝐿 =
2𝑛 .For example, 8-bit PCM provides 28 = 256 levels.
Bit Rate and Bit Duration:
In digital communications like PCM, the Bit Rate (𝑹𝒃 ) is one of the most important
parameters. It defines the speed of data transmission or how many bits are sent
through the channel every second.
Bit Rate: is the number of bits (0s and 1s) processed or transmitted per unit of time.
In PCM systems, it represents the total speed of the digital stream generated after
encoding all samples.
Unit: Bits per second (bps), or kbps (kilobits per second).
To calculate the Bit Rate in a PCM system, we use the following equation:
𝑅𝑏 = 𝑛 × 𝑓𝑠
Where:
𝑅𝑏 : Bit Rate (bps).
𝑛: Number of bits per sample (e.g., 𝑛 = 3).
𝑓𝑠 : Sampling frequency (number of samples per second).
Bit Duration:
This is the time taken to send a single bit. It is the reciprocal of the bit rate:
1
𝑇𝑏 =
𝑅𝑏
Example: Find the 3-bits PCM signal for the message wave with 𝑓𝑚 = 15𝐾𝐻𝑧 and
sampling signal shown below. Then calculate Bit Rate and Bit Duration.
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
Sol:
Quantization level Code number Digital number
7 7 111
6 6 110
5 5 101
4 4 100
3 3 011
2 2 010
1 1 001
0 0 000
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
Quantization level: 𝐿 = 23 = 8
𝑉𝑚𝑎𝑥 −𝑉𝑚𝑖𝑛 16−0
Step size: ∆= = =2
𝐿 8
No. of sample 1 2 3 4 5
Sample value 8 14.8 14 8 4
Quantization level 3 6 6 3 1
Encoded output 011 110 110 011 001
Transmitted output: (011110110011001).
𝑓𝑠 ≥ 2𝑓𝑚
𝑓𝑠 = 2 × 15𝐾 = 30𝐾𝐻𝑧
𝑅𝑏 = 𝑛 × 𝑓𝑠
𝑅𝑏 = 3 × 30 × 103 = 9 × 104 𝑏𝑝𝑠.
1 1
𝑇𝑏 = = = 0.111 × 10−4 𝑠𝑒𝑐.
𝑅𝑏 9 × 104
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
In Pulse Code Modulation (PCM), quantization is the process of mapping a large set
of input voltages to a smaller set of discrete levels. Depending on how the steps are
distributed and how they handle the input, we categorize quantization into several
types.
1. Uniform PCM:
In Uniform PCM, the quantization levels are spaced equally. Every "step" in
the staircase represents the same voltage change, regardless of whether the
signal is weak or strong.
Step Size (∆): Remains constant throughout the entire dynamic range.
Quantization Noise: The noise power is the same for all signal levels.
The Issue: While simple, it is inefficient for signals like human
speech. In speech, low-amplitude (quiet) sounds occur much more
frequently than high-amplitude (loud) sounds. In Uniform PCM, quiet
sounds suffer from a very low Signal-to-Quantization Noise Ratio
(SQNR) because the noise is disproportionately large compared to the
weak signal.
There are two types of Uniform PCM:
a. Mid-tread Quantizer.
In this type, the origin (zero) lies in the middle of a tread (the horizontal part of
the step).
Zero Representation: A zero or near-zero input is mapped directly to a
quantization level of zero.
Number of Levels: It typically has an odd number of quantization levels (𝐿 =
2𝑛 − 1).
Behavior: It creates a "dead zone" around zero. This is very useful because it
suppresses low-level noise during periods of silence.
Symmetry: It is symmetric about the vertical axis.
b. Mid-rise Quantizer.
In this type, the origin (zero) lies in the middle of a rise (the vertical part of the
step).
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
Zero Representation: There is no quantization level at zero. Instead, a zero
∆
input is mapped to either the first positive level (+ ) or the first negative level
2
∆
(− ).
2
Number of Levels: It typically has an even number of quantization levels
(𝐿 = 2𝑛 ).
Behavior: It is more sensitive to small signals, but it can produce "idle noise"
because even a true zero input will be encoded as a non-zero value.
Symmetry: It is symmetric about the origin.
2. Non-Uniform PCM:
Non-Uniform PCM uses a varying step size. It provides smaller steps for low-
amplitude signals and larger steps for high-amplitude signals.
Logic: By using smaller steps for weak signals, we reduce the quantization
error where it matters most, significantly improving the SQNR for quiet
sounds.
The Trade-off: We accept larger quantization errors for loud signals, but
because the signal itself is so strong, the noise remains relatively unnoticeable.
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
Implementation (Companding): Realizing non-uniform steps in hardware is
difficult, so it is typically achieved through a process called Companding
(Compressing + Expanding):
1. Compression: The analog signal is passed through a non-linear
amplifier that boosts weak signals and attenuates strong ones.
2. Uniform Quantization: The compressed signal is then quantized using
standard uniform steps.
3. Expansion: At the receiver, the process is reversed to restore the
original dynamic range.
Advantages of PCM:
1. High Immunity to Noise and Interference:
In analog transmission, noise adds directly to the signal and is almost impossible to
remove. In PCM, we only care whether a pulse is "High" (1) or "Low" (0). As long
as the noise isn't strong enough to turn a 0 into a 1, the signal can be perfectly
recovered.
2. Regenerative Repeaters:
Unlike analog amplifiers that boost both the signal and the noise, PCM uses
regenerative repeaters. These devices "clean up" the pulses, creating a brand-new,
sharp digital signal before sending it to the next station. This allows for long-distance
transmission with zero accumulated noise.
3. Ease of Multiplexing:
PCM signals are digital bit streams, making it very simple to combine multiple voice
or data channels into a single high-speed link using Time Division Multiplexing
(TDM). This is how thousands of phone calls can travel over a single fiber optic
cable.
4. Security and Encryption:
Since the signal is already in a binary format (0s and 1s), it is very easy to encrypt
using digital algorithms. This makes PCM ideal for secure military, government, and
private communications.
5. Uniform Transmission Quality:
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
Because of the regeneration process, the quality of a PCM signal is the same whether
the receiver is 10 miles or 1,000 miles away. As long as the pulses are detectable,
the output remains constant.
6. Storage and Integration:
Digital data is easy to store on hard drives, CDs, or flash memory.
Additionally, PCM integrates perfectly with modern computer networks and
digital switching systems, allowing for seamless data processing.
Drawbacks of PCM:
1. High Bandwidth Requirement:
This is the biggest disadvantage of PCM. Because you are converting a single analog
value into a multi-bit binary code (e.g., 8 bits per sample), the resulting digital signal
requires much more bandwidth than the original analog signal.
Example: A standard voice signal (3.4 kHz) that would take up very little
space in analog requires 64 kbps in standard PCM.
2. Quantization Error (Noise):
No matter how many levels you use, the digital representation is still an
approximation of the analog signal. This difference between the actual signal and
the quantized value is called Quantization Noise.
To reduce this noise, you must increase the number of bits, which further
increases the bandwidth.
3. System Complexity:
PCM systems are significantly more complex than analog systems. They require:
Precision filters to prevent aliasing.
Sample-and-hold circuits.
3th class /Communication system Dr. Samir J. Mohammed
Dr. Ghadeer H. Eskander
High-speed Analog-to-Digital Converters (ADC).
Synchronization logic between the transmitter and receiver to ensure bits are
read at the correct time.
4. Overload and Distortion:
Aperture Effect: If the sampling pulse has a finite width, it can cause
distortion in the reconstructed signal.
Slope Overload: In some variants of PCM (like Delta Modulation), if the
signal changes too fast for the "staircase" to follow, the signal is distorted.
5. Power Consumption:
Due to the high-speed processing and the need for complex digital circuitry at both
ends, PCM systems generally consume more power than simple analog modulation
techniques.