Professional Documents
Culture Documents
Laboratory Record: Experiment No: 08
Laboratory Record: Experiment No: 08
Experiment No: 08
THEORY:
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.
a=20;
x = a*sin(t);
subplot(3,1,1);
plot(t,x,'black');
xlabel('Time(s) ---->')
ylabel('Amplitude(V) ---->')
legend('Message Signal ---->');
grid on
x1 = x+a
subplot(3,1,2);
plot(t,x1);
xlabel('Samples ---->')
ylabel('Amplitude(V) ---->')
legend('Amplitude Shifted Signal ---->');
grid on
q_op = round(x1)
subplot(3,1,3);
plot(t,q_op);
xlabel('Samples ---->')
ylabel('Amplitude(V) ---->')
legend('Quantized Signal ---->');
grid on
encode = de2bi(q_op,'left-msb')
decode = bi2de(encode,'left-msb')
xr = decode-a
figure
plot(t,x,'r',t,xr,'b')
xlabel('Samples ---->');
ylabel('Amplitude(V) ---->')
legend('PCM Signal at 20V ---->');
grid on
Figure 1
Figure 2
Figure 3
Figure 4
Figure 6