Lab 3-C

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Experiment 3

To ESTABLISH the concept of Differential Pulse Code Modulation (DPCM) and


implement and analyze it using MATLAB and communication module MCM 30/EV.

Objective:
The purpose of this lab is to introduce to differential Pulse Code Modulation and Demodulation.
 the digitization of an analog signal,
 the reconstruction of the original analog signal,
 the measurement of quantizing noise,
 the causes and prevention of aliasing, andthe causes and effects of channel errors
 To study Differential Pulse Code Modulation and Demodulation be sending variable
frequency sine wave and variable DC signal inputs.

Apparatus:
 DPCM Trainer Kit.
 Cathode Ray Oscilloscope.
 Connecting wires.
 CRO Probes

Differential Pulse Code Modulation Working:


Differential pulse code modulation is a technique of analog to digital signal conversion. This
technique samples the analog signal and then quantizes the difference between the sampled value
and its predicted value, then encodes the signal to form a digital value. The samples of a signal
are highly correlated with each other. The signal’s value from the present sample to the next
sample does not differ by a large amount. The adjacent samples of the signal carry the same
information with a small difference. When these samples are encoded by the standard PCM
system, the resulting encoded signal contains some redundant information bits.
Redundant Information Bits in PCM
The above figure shows a continuing time signal x(t) denoted by a dotted line. This signal is
sampled by flat-top sampling at intervals Ts, 2Ts, 3Ts…nTs. The sampling frequency is selected
to be higher than the Nyquist rate. These samples are encoded by using 3-bit (7 levels) PCM.
The samples are quantized to the nearest digital level as shown by small circles in the above
figure. The encoded binary value of each sample is written on the top of the samples. Just
observe the above figure at samples taken at 4Ts, 5Ts, and 6Ts are encoded to the same value of
(110). This information can be carried only by one sample value. But three samples are carrying
the same information means redundant.
Now let consider the samples at 9Ts and 10Ts, the difference between these samples only due to
the last bit and first two bits are redundant since they do not change. So in order to make the
process this redundant information and to have a better output. It is an intelligent decision to take
a predicted sampled value, assumed from its previous output and summarise them with the
quantized values. Such a process is called a Differential PCM (DPCM) technique.

Principle of Differential Pulse Code Modulation


If the redundancy is reduced, then the overall bitrate will decrease and the number of bits
required to transmit one sample will also reduce. This type of digital pulse modulation technique
is called differential pulse code modulation. The DPCM works on the principle of prediction.
The value of the present sample is predicted from the previous samples. The prediction may not
be exact, but it is very close to the actual sample value.

Differential Pulse Code Modulation Transmitter


The below figure shows the DPCM transmitter. The transmitter consists of a comparator,
quantizer, prediction filter, and an encoder.

Differential Pulse Code Modulator


Differential Pulse Code Modulation Receiver
In order to reconstruct the received digital signal, the DPCM receiver (shown in the below
figure) consists of a decoder and prediction filter. In the absenteeism of noise, the encoded
receiver input will be the same as the encoded transmitter output.

Differential Pulse Code Modulation Receiver


As we discussed above, the predictor undertakes a value, based on the previous outputs. The
input given to the decoder is processed and that output is summed up with the output of the
predictor, to obtain better output. That means here first of all the decoder will reconstruct the
quantized form of the original signal. Therefore the signal at the receiver differs from the actual
signal by quantization error q(nTs), which is introduced permanently in the reconstructed signal.
Block diagram of DPCM:

PROCEDURE:
 Switch on differential code modulation & demodulation trainer.
 Apply the variable DC signal to the input terminal (sixth pin of 741) of DPC Modulation.
 Observe the sampling signal output on Channel-1 CRO.
 Observe the DPCM output on channel-2 of CRO, from 00000000 to 11111111 by adjusting
DC voltage potentiometer.
 Disconnect the DC voltage and apply AF oscillator output to the AF input of DPC
Modulation.
 Observe the DPCM output in synchronization with the sampling signal.
 During demodulation, connect DPCM output to the data input of DPC demodulation.
 Connect Clock Pulse output of DPC modulation to the CLK pulse input of DPC
demodulation.
 Observe the demodulated output.

DPCM on MATLAB:

A simple special case of DPCM quantizes the difference between the signal's current value and
its value at the previous step. Thus the predictor is just y(k) = x (k - 1). The code below
implements this scheme. It encodes a sawtooth signal, decodes it, and plots both the original and
decoded signals. The solid line is the original signal, while the dashed line is the recovered
signals. The example also computes the mean square error between the original and decoded
signals.

predictor = [0 1]; % y(k)=x(k-1)


partition = [-1:.1:.9];
codebook = [-1:.1:1];
t = [0:pi/50:2*pi];
x = sawtooth(3*t); % Original signal
% Quantize x using DPCM.
encodedx = dpcmenco(x,codebook,partition,predictor);
% Try to recover x from the modulated signal.
decodedx = dpcmdeco(encodedx,codebook,predictor);
plot(t,x,t,decodedx,'--')
legend('Original signal','Decoded signal','Location','NorthOutside');
distor = sum((x-decodedx).^2)/length(x) % Mean square error

The output is
distor =
0.0327
Hardware simulation:

Precautions:
 Avoid loose connections.
 Observe wave forms carefully.
Conclusion
In this experiment, we acquired a better understanding of Pulse Code Modulation by further
probing into sampling and quantization. we verified the introduction of aliasing by sampling a
signal at a rate lower than that dictated by the sampling theorem. we also verified the
consequence
Result:
Differential Pulse Code Modulation and Demodulation is studied and corresponding
waveforms are observed

ofComments:
reducing the quantization levels by limiting the number of bits utilized to represent a signal.
Theconcepts of sampling and quantization are fundamental to a multitude of areas in
engineering.
_______________________________________________________________________________

_______________________________________________________________________________

_______________________________________________________________________________

You might also like