Professional Documents
Culture Documents
Laboratory Record: Experiment No: 08
Laboratory Record: Experiment No: 08
Experiment No: 08
THEORY:
To get a pulse code modulated waveform from an analog waveform at the transmitter end
(source) of a communications circuit, the amplitude of the analog signal samples at regular
time intervals. The sampling rate or a number of samples per second is several times the
maximum frequency. The message signal converted into the binary form will be usually in the
number of levels which is always to a power of 2. This process is called quantization.
This above block diagram describes the whole process of PCM. The source of the continuous-
time message signal is passed through a low pass filter and then sampling, Quantization,
Encoding will be done.
clc;
clear all;
close all;
f=2;
fs=20*f;
t=0:1/fs:1;
a=2;
x=a*sin(2*pi*f*t);
x1=x+a;
q_op=round(x1)
encode=de2bi(q_op,'left-msb')
decode=bi2de(encode,'left-msb')
xr=decode-a
plot(t,x,'r',t,xr,'b')
xlabel('time')
ylabel('amplitude')
title('original message signal','recover message signal')
CONCLUSION:
In this experiment we perform Pulse code modulation in which, we observe that the
Quantization level of input signal can be change by changing the value of sampling frequency,
while there is another method too i.e., we have to take some loop (if else case) instead of
rounding the quantizing value.
To keep the quantization error small relative to the message signal level, use smaller
quantization steps.