0% found this document useful (0 votes)
8 views3 pages

Exp-7 PCM

The document illustrates Pulse Code Modulation (PCM) through sampling, quantization, and encoding of analog signals into digital form. It explains the processes of sampling at a defined frequency, quantizing to discrete levels, and encoding into binary representation, while also detailing the algorithm and providing a program for PCM transmission and reception. The result includes a plot comparing the original and reconstructed signals.

Uploaded by

yadhavharish6055
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Exp-7 PCM

The document illustrates Pulse Code Modulation (PCM) through sampling, quantization, and encoding of analog signals into digital form. It explains the processes of sampling at a defined frequency, quantizing to discrete levels, and encoding into binary representation, while also detailing the algorithm and providing a program for PCM transmission and reception. The result includes a plot comparing the original and reconstructed signals.

Uploaded by

yadhavharish6055
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EXP-7 PCM illustration: Sampling, Quantization and Encoding

Aim:

To illustrate pulse code modulation by sampling, quantizing and encoding techniques.

Theory:
Pulse Code Modulation (PCM) is a widely used technique for sampling, quantization, and
encoding analog signals into digital form.

Sampling: In PCM, the analog signal is first sampled at regular intervals to obtain discrete-
samples. The sampling rate must be chosen carefully according to the Nyquist theorem to
avoid aliasing, which states that the sampling frequency must be at least twice the maximum
frequency component of the analog signal.

Quantization:Is the process of approximating the continuous amplitude values of a signal


with a finite set of discrete values.

In other words, it involves mapping the continuous range of amplitudes to a finite number of
levels. Each level represents a specific digital code. The number of levels determines the
resolution of quantization and is often expressed in bits (e.g., 8-bit quantization, 16-bit
quantization).

Quantization introduces quantization error, which can affect the fidelity of the reconstructed
signal.

Encoding: Encoding involves representing the quantized samples using digital codes,
typically in binary format. The most common encoding technique is pulse code modulation
(PCM), where each quantized sample is represented by a binary number.

In PCM, the amplitude of each sample determines the digital code assigned to it.

Algorithm:

1. Input: Analog signal.


2. Sampling:
 Define the sampling frequency ( fs).
 Sample the analog signal at the specified sampling frequency.
3. Quantization:
 Define the number of quantization bits ( bits).
 Normalize the sampled signal.
 Quantize the normalized signal into discrete levels based on the number of
bits.
4. Encoding:
 Convert the quantized levels into binary representation.
5. Output: The encoded PCM signal.

Program:
% pulse code modulation
%PCM Transmitter
% Analog signal generation (sinusoidal signal)
f = 2;
fs = 20*f;
t = 0:1/fs:1;
a=2;
x=a*sin(2*pi*f*t);
%level shifting
x1 =x+a

%Quantization
q_op = round(x1)

%Decimal to binary value conversion


enco = de2bi (q_op, 'left-msb')

%PCM receiver
deco= bi2de (enco, 'left-msb')

%shifting the amplitude level to the original value


xr = deco-a

%plotting
plot(t, x, 'r-' , t, xr, 'k+-');
xlabel('time');
ylabel('amplitude');
legend('original signal', 'Reconstructed signal');
Output:

Result:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy