Simulation Exercise 2 - Delta Modulation
Simulation Exercise 2 - Delta Modulation
Kouji Tomas
Electrical and Electronics Engineering Institute
University of the Philippines Diliman
Quezon City, Philippines
Abstract—Delta modulation of a sampled signal was simulated II. DOCUMENTATION AND DISCUSSION
in MATLAB . The sampled signal was encoded into a delta
modulated output, and a delta accumulated output staircase Going through each block of code, the first block
approximation of the sampled signal. The signal was recovered performs error checking on the inputs to ensure they can be
using the accumulator output and a low pass filter. properly processed by the code. The inputs must be scalar
I. INTRODUCTION [1] values such that it is clear which value will be used for the
delta modulation. This block is shown below on figure 2.
In this simulation exercise, delta modulation was
performed. Delta modulation is a form of differential pulse
code modulation which encodes the difference between signal
samples. Delta modulation works by checking if the previous
sample is greater or less than the current sample and the
quantizer outputs a 1 or a 0 for greater than or less than
respectively. This exercise focuses on the method of delta Figure 2: Error Checker Block
modulation by means of a staircase approximation.
The next block sets up all the necessary time and
The staircase delta modulator mainly consists of a signal vectors to be used in the delta modulation. The
comparator and an accumulator. The comparator takes in variables necessary are the following
samples of the message as an input and compares the currently
● fs - Message signal analog “sampling” frequency
obtained sample with a previously obtained accumulator
● ta - analog time values
value, which starts at 0. The result of the comparator goes to
● ts - sampled signal time values
the quantizer and assigns a value of 0 or 1, which corresponds
● acc - accumulator vector setup
to a ± ΔV value which is sent to the accumulator and the
● enc - encoder vector setup
encoder. The accumulator is the feedback mechanism and is
● tscc - accumulator time values
the input to the comparator, as mentioned previously. The
● mt - “analog” message signal
accumulator uses the obtained quantized value of the
● mnTs - sampled message signal
comparator and adds it to the previous accumulator value by
using a delay block, essentially, “accumulating.” The encoder, The vectors acc and enc were preallocated as
on the other hand, converts the quantized data to a stream of recommended in MATLAB and acc has length equal to the
bits, each bit representing the sign of the current quantizer message signal +1 and enc has length equal to the message
output. The staircase approximation is the input to the signal. acc has a size length(ts)+1 because it requires an initial
comparator for all relevant time, and the delta modulated value to compare the message signal with. This is initially
output is the encoder output for all relevant time. The system zero as preallocated. The different size of acc is also the
block diagram is shown below on figure 1. reason for tscc. The setup block is shown below on figure 3.
The resulting distortion causes a decrease or increase To resolve granular noise, DELV must be made as
in the integrated area at the output, depending on whether or low as possible, but this in turn causes slope overload. But,
not it is a positive or negative slope overload, resulting in a since slope overload is dependent on both FSAMP and
slower increase to the peak or trough than normal. This is DELV, FSAMP can be increased to compensate for the
shown below on figure, which contain the recovered message decrease in DELV. Therefore, in the ideal case, DELV is
signals for and DELV = 0.4 and FSAMP = 70000, the normal infinitesimally small and FSAMP is infinitely large, which
delta modulation, and DELV = 0.25 and a FSAMP = 70000 is, essentially, an analog signal. Delta modulation then
and the original message signal. The slower integration effect becomes more effective with an increased sampling
is shown below on figure 12. frequency and a lower incremental value, but this requires
. faster and faster sampler which is more costly. There are
two trade offs to be considered when using delta
modulation. The first is the trade off of granular noise and
slope overload when changing only DELV, and the next is
the trade off of increased cost and power for increased
FSAMP, and these must be considered accordingly, when
performing delta modulation.
REFERENCES
1. EEE 107 Simulation Exercise 2: Delta Modulation