Sie sind auf Seite 1von 12

EXPERIMENT- 7

DELTA MODULATION USING MATLAB


AIM
To Generate Modulated and demodulated wave using delta modulation
technique.

APPARATUS REQUIRED
 MATLAB software

THEORY
The sampling rate of a signal should be higher than the Nyquist rate, to achieve
better sampling. If this sampling interval in Differential PCM is reduced
considerably, the sample-to-sample amplitude difference is very small, as if the
difference is 1-bit quantization, then the step-size will be very small i.e., Δ
(delta).

Delta Modulation
The type of modulation, where the sampling rate is much higher and in which
the step size after quantization is of a smaller value Δ, such a modulation is
termed as delta modulation.

Features of Delta Modulation


Following are some of the features of delta modulation.

 An over-sampled input is taken to make full use of the signal correlation.


 The quantization design is simple.
 The input sequence is much higher than the Nyquist rate.
 The quality is moderate.
 The design of the modulator and the demodulator is simple.
 The stair-case approximation of output waveform.
 The step-size is very small, i.e., Δ (delta).
 The bit rate can be decided by the user.
 This involves simpler implementation.
Delta Modulation is a simplified form of DPCM technique, also viewed as 1-bit
DPCM scheme. As the sampling interval is reduced, the signal correlation will
be higher.

Delta Modulator
The Delta Modulator comprises of a 1-bit quantizer and a delay circuit along
with two summer circuits. Following is the block diagram of a delta modulator.

The predictor circuit in DPCM is replaced by a simple delay circuit in DM.

From the above diagram, we have the notations as −

 $x(nT_{s})$ = over sampled input


 $e_{p}(nT_{s})$ = summer output and quantizer input
 $e_{q}(nT_{s})$ = quantizer output = $v(nT_s)$
 $\widehat{x}(nT_{s})$ = output of delay circuit
 $u(nT_{s})$ = input of delay circuit

Using these notations, now we shall try to figure out the process of delta
modulation.

$e_{p}(nT_{s}) = x(nT_{s}) - \widehat{x}(nT_{s})$

---------equation 1

$= x(nT_{s}) - u([n - 1]T_{s})$


$= x(nT_{s}) - [\widehat{x} [[n - 1]T_{s}] + v[[n-1]T_{s}]]$

---------equation 2

Further,

$v(nT_{s}) = e_{q}(nT_{s}) = S.sig.[e_{p}(nT_{s})]$

---------equation 3

$u(nT_{s}) = \widehat{x}(nT_{s})+e_{q}(nT_{s})$

Where,

 $\widehat{x}(nT_{s})$ = the previous value of the delay circuit


 $e_{q}(nT_{s})$ = quantizer output = $v(nT_s)$

Hence,

$u(nT_{s}) = u([n-1]T_{s}) + v(nT_{s})$

---------equation 4

Which means,

The present input of the delay unit

= (The previous output of the delay unit) + (the present quantizer output)

Assuming zero condition of Accumulation,

$u(nT_{s}) = S \displaystyle\sum\limits_{j=1}^n sig[e_{p}(jT_{s})]$

Accumulated version of DM output = $\displaystyle\sum\limits_{j = 1}^n


v(jT_{s})$

---------equation 5

Now, note that

$\widehat{x}(nT_{s}) = u([n-1]T_{s})$

$= \displaystyle\sum\limits_{j = 1}^{n - 1} v(jT_{s})$

---------equation 6
Delay unit output is an Accumulator output lagging by one sample.

From equations 5 & 6, we get a possible structure for the demodulator.

A Stair-case approximated waveform will be the output of the delta modulator


with the step-size as delta (Δ). The output quality of the waveform is moderate.

Delta Demodulator
The delta demodulator comprises of a low pass filter, a summer, and a delay
circuit. The predictor circuit is eliminated here and hence no assumed input is
given to the demodulator.

Following is the diagram for delta demodulator.

From the above diagram, we have the notations as −

 $\widehat{v}(nT_{s})$ is the input sample


 $\widehat{u}(nT_{s})$ is the summer output
 $\bar{x}(nT_{s})$ is the delayed output

A binary sequence will be given as an input to the demodulator. The stair-case


approximated output is given to the LPF.

Low pass filter is used for many reasons, but the prominent reason is noise
elimination for out-of-band signals. The step-size error that may occur at the
transmitter is called granular noise, which is eliminated here. If there is no
noise present, then the modulator output equals the demodulator input.
Advantages of DM Over DPCM
 1-bit quantizer
 Very easy design of the modulator and the demodulator

However, there exists some noise in DM.

 Slope Over load distortion (when Δ is small)


 Granular noise (when Δ is large)

Adaptive Delta Modulation (ADM)


In digital modulation, we have come across certain problem of determining the
step-size, which influences the quality of the output wave.

A larger step-size is needed in the steep slope of modulating signal and a


smaller step-size is needed where the message has a small slope. The minute
details get missed in the process. So, it would be better if we can control the
adjustment of step-size, according to our requirement in order to obtain the
sampling in a desired fashion. This is the concept of Adaptive Delta
Modulation.

Following is the block diagram of Adaptive delta modulator.

The gain of the voltage controlled amplifier is adjusted by the output signal
from the sampler. The amplifier gain determines the step-size and both are
proportional.

ADM quantizes the difference between the value of the current sample and the
predicted value of the next sample. It uses a variable step height to predict the
next values, for the faithful reproduction of the fast varying values.
The sawtooth waveform is subtracted from the message, also connected to the
summer, and the difference - an error signal - is the signal appearing at the
summeroutput.An amplifier is shown in the feedback loop.. This controls the
loop gain. Inpractice it may be a separate amplifier, part of the integrator, or
within thesummer. It is used to control the size of the ‘teeth’ of the sawtooth
waveform, inconjunction with the integrator time constant.When analysing the
block diagram of Figure 1 it is convenient to think of thesummer having unity
gain between both inputs and the output. The messagecomes in at a fixed
amplitude. The signal from the integrator, which is a sawtoothapproximation to
the message, is adjusted with the amplifier to match it as closely.

SLOPE OVERLOAD AND GRANULARITY

The binary waveform illustrated in Figure 2 is the signal transmitted. This is


thedelta modulated signal.The integral of the binary waveform is the sawtooth
approximation to the message.In the experiment entitled Delta demodulation (in
this Volume) you will see thatthis sawtooth wave is the primary output from the
demodulator at the receiver.Lowpass filtering of the sawtooth (from the
demodulator) gives a betterapproximation to the message. But there will be
accompanying noise anddistortion, products of the approximation process at the
modulator.The unwanted products of the modulation process, observed at the
receiver, are oftwo kinds. These are due to ‘slope overload’, and ‘granularity’.

SLOPE OVERLOADSLOPE

This occurs when the sawtooth approximation cannot keep up with the rate-of-
change of the input signal in the regions of greatest slope.The step size is
reasonable for those sections of the sampled waveform of smallslope, but the
approximation is poor elsewhere. This is ‘slope overload’, due totoo small a
step.Slope overload is illustrated in Figure 3.
SLOPE OVERLOAD
To reduce the possibility of slope overload the step size can be increased (for
the same sampling rate). This is illustrated in Figure 4. The sawtooth is better
able to match the message in the regions of steep slope.

An alternative method of slope overload reduction is to increase the sampling


rate. This is illustrated in Figure 5, where the rate has been increased by a factor
of 2.4 times, but the step is the same size as in Figure 3.
GRANULAR NOISE
Refer back to Figure 3. The sawtooth follows the message being sampled quite well in the
regions of small slope. To reduce the slope overload the step size is increased, and now
(Figure 4) the match over the regions of small slope has been degraded.
The degradation shows up, at the demodulator, as increased quantizing noise,
or‘granularity’.

NOISE AND DISTORTION MINIMIZATION


There is a conflict between the requirements for minimization of slope overload and the
granular noise. The one requires an increased step size, the other a reduced step size. You
should refer to your text book for more discussion of ways and means of reaching a
compromise. You will meet an example in the experiment entitled Adaptive delta
modulation (in this Volume).An optimum step can be determined by minimizing the
quantizing error at thesummer output, or the distortion at the demodulator output.

MATLAB CODE
clear all
clc
fm=100;
Am=10;
fs=10000;
t=0:1/fs:1/fm;
msg=Am*cos(2*pi*fm*t);
delta=1.5*(1/fs)*2*pi*fm*max(Am*sin(2*pi*fm*t))
e(1)=msg(1);
eq(1)=delta*sign(e(1));
msgq(1)=delta;
encode(1)=1;
for i=2:length(msg)
e(i)=msg(i)-msgq(i-1);
eq(i)=delta*sign(e(i));
msgq(i)=eq(i)+msgq(i-1);
if eq(i)==delta
encode(i)=1;
else
enocde(i)=0;
end
end
subplot(2,2,1)
plot(t,msg)
title('m(t) and quantized m(t)')
xlabel('time')
ylabel('amplitude')
hold on
plot(t,msgq)
hold off
subplot(2,2,2)
stem(t,encode)
title('encoded signal')
xlabel('time')
ylabel('amplitude')
axis([0 0.01 -0.5 1.5])
%decode
for i=1:length(encode)
if eq(i)==1
eq_dec(i)=delta;
else
eq_dec(i)=-1*delta;
end
end
mq_dec(1)=eq_dec(1);
for k=2:length(eq_dec)
mq_dec(k)=eq(k)+mq_dec(k-1);
end
subplot(2,2,3)
plot(t,mq_dec)
title('m(t) quantized after decoding')
xlabel('time')
ylabel('amplitude')
%filter
wc=2*pi*fm/fs;
n=-10:10;
num=(wc/pi)*sinc(wc*n);
dec=filter(num,1,mq_dec);
subplot(2,2,4)
plot(t,dec)
title('decoded signal')
xlabel('time')
ylabel('amplitude')
DELTA MODULATION:

GRANULAR NOISE:
SLOPE OVER LODED:

 INFERENCE:
 IN THIS WE USED TO CONVERT THE SAMPLED ANALOG SIGNAL TO THE
DIGITAL SIGNAL
 INCREASING THE DEL VALUE WE GET GRANULAR NOISE
 DECREASING THE VALUE OF DEL IT GETS SLOP OVER LODED
 This distortion arises because of large dynamic range of the input signal.

 We can observe from the rate of rise of input signal is so high that
the staircase signal cannot approximate it, the step size del becomes
too small for staircase signal to follow the step segment of input signal

 Hence, there is a large error between the staircase approximated signal


and the original input signal.

 Granular or Idle noise occurs when the step size is too large compared to small
variation in the input signal.
 In order to overcome the quantization errors due to slope overload and granular
noise, the step size (del) is made adaptive to variations in the input signal .

RESULT:
We have learnt how to do the delta modulation using matlab
software and resolved the difference btwn the slope over
loded and granular noise.

Das könnte Ihnen auch gefallen