Beruflich Dokumente
Kultur Dokumente
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.
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.
Using these notations, now we shall try to figure out the process of delta
modulation.
---------equation 1
---------equation 2
Further,
---------equation 3
$u(nT_{s}) = \widehat{x}(nT_{s})+e_{q}(nT_{s})$
Where,
Hence,
---------equation 4
Which means,
= (The previous output of the delay unit) + (the present quantizer output)
---------equation 5
$\widehat{x}(nT_{s}) = u([n-1]T_{s})$
---------equation 6
Delay unit output is an Accumulator output lagging by one sample.
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.
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
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 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.
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
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.