PCM
PCM
1. Introduction
2. Working Principle of PCM
o Sampling
o Quantization
o Encoding
3. MATLAB Code
4. Advantages of PCM
5. Disadvantage of PCM
6. Applications of PCM
7. Conclusion
8. Reference
Pulse Code Modulation
When a digital signal undergoes Pulse Code Modulation, it converts the analog
information into a binary sequence (1 and 0). Through the demodulation process, we can
obtain the original analog signal.
Pulse Code Modulation techniques are used to produce a series of numbers or digits in
binary form. The amplitude at that particular time of the signal sample is indicated by the
binary codes.
2.3 Quantization
After sampling, each sampled value is approximated to the nearest value from a fixed set
of levels. This process is known as quantization. Since digital systems can’t represent
every possible analog value, quantization helps to assign each sample a discrete level.
This step introduces a small error called quantization noise.
2.4 Encoding
Each quantized level is then converted into a binary code. This is called encoding. The
binary digits (0s and 1s) represent the amplitude of the analog signal at each sampled
instant. This digital output can now be transmitted or stored.
2.6 Decoder
The decoder helps to form the original signal by decoding the pulse coded waveform.
Decoder acts as the demodulator.
% n = 8; % 8-bit PCM
% samples = 30; % number of samples in a period
n = input('Enter n value for n-bit PCM system : ');
samples = input('Enter number of samples in a period :
');
%================Sampling Operation====================%
Am = 8; % message amplitude
x = 0:(2*pi/samples):4*pi;
s = Am * sin(x);
subplot(3,1,1);
plot(s); grid on;
title('Analog Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
subplot(3,1,2);
stem(s); grid on;
title('Sampled Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
%================Quantization Process==================%
L = 2^n; % no. of levels
vmax = Am;
vmin = -vmax;
del = (vmax - vmin) / L;
part = vmin + del : del : vmax - del; % defining the
levels
code = vmin + (del/2) : del : vmax - (del/2); % defining
Quantized values in respective levels
subplot(3,1,3);
stem(q, '.'); grid on; % Display the
Quantized values
title('Quantized Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
%-------------Encoding Process-------------------------%
figure
code1 = de2bi(ind, 'left-msb'); % Convert the
decimal to binary
k = 1;
l1 = length(ind);
for i = 1:l1
for j = 1:n
coded(k) = code1(i, j); % convert code
matrix to a coded row vector
k = k + 1;
end
end
subplot(2,1,1);
stairs(coded); grid on; % Display the
encoded signal
axis([0 100 -0.5 1.5]);
title('Encoded Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
Result:
Enter n value for n-bit PCM system : 8
(Figure 2)
4. Advantages of PCM
Very High Noise Immunity : Since PCM signals are digital, they are less affected by
noise and distortion during transmission, unlike analog signals.
Ideal for Long Distance Communication : PCM works efficiently over long distances
due to the use of regenerative repeaters, which restore the signal quality without
amplifying noise.
Good Signal-to-Noise Ratio (SNR) : The SNR in PCM systems remains high, ensuring
that the quality of transmission is preserved even in noisy environments.
5. Disadvantages of PCM
Requires high bandwidth
Complex encoding and decoding
Quantization error
6. Applications of PCM
1. Audio Recording (CDs & DVDs)
Compact Discs (CDs) and Digital Versatile Discs (DVDs) use PCM to store high-
quality audio signals in digital form.
2. Satellite Communication
PCM is ideal for satellite links where signal distortion and long-distance
transmission are common. Its noise immunity makes it suitable for space
communication.
3. Computer Systems
In digital computers, PCM is used to convert analog inputs (like microphone
signals) into digital data for processing and storage.
4. Broadcasting (Digital TV & Radio)
Modern digital TV and radio broadcasting systems use PCM to deliver clearer and
more consistent audio and video signals.
5. Medical Instruments
Devices such as digital ECG and EEG machines use PCM to convert bio-signals
into digital form for better diagnosis and analysis.
7. Conclusion
PCM is a widely used technique in digital communication systems. It provides reliable
and efficient transmission of analog signals in digital form. Despite requiring more
bandwidth, its advantages in clarity and noise resistance make it ideal for many
applications.
8. References
a) https://www.slideshare.net/slideshow/pulse-modulation-
24348570/24348570
b) https://electronicspost.com/pulse-code-modulation-pcm-system/
c) https://www.youtube.com/watch?v=o0njX9U2LWY&list=WL&index
=6
d) Chat GPT