0% found this document useful (0 votes)
104 views

Modulation in Matlab

Delta modulation is a digital modulation technique where the input signal is approximated as a step signal. It uses a 1-bit quantizer to compare the present sample to the previous one, transmitting a 1 or 0 to increase or decrease the step size by a small fixed amount Δ. This results in a simple modulation/demodulation design but can cause slope overload distortion from large input variations or granular noise from small variations compared to the fixed step size. Adaptive delta modulation aims to overcome these issues by varying the step size according to the input signal.

Uploaded by

Nitin Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Modulation in Matlab

Delta modulation is a digital modulation technique where the input signal is approximated as a step signal. It uses a 1-bit quantizer to compare the present sample to the previous one, transmitting a 1 or 0 to increase or decrease the step size by a small fixed amount Δ. This results in a simple modulation/demodulation design but can cause slope overload distortion from large input variations or granular noise from small variations compared to the fixed step size. Adaptive delta modulation aims to overcome these issues by varying the step size according to the input signal.

Uploaded by

Nitin Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Modulation is the process of varying one or more parameters of a carrier signal in accordance

with the instantaneous values of the message signal.


The message signal is the signal which is being transmitted for communication and the carrier
signal is a high frequency signal which has no data, but is used for long distance transmission.
There are many modulation techniques, which are classified according to the type of modulation
employed. Of them all, the digital modulation technique used is DELTA MODULATION (DM).

Delta Modulation
The type of modulation, where the sampling rate is much higher and in which the stepsize after
quantization is of a smaller value Δ, such a modulation is termed as delta modulation.
Features of Delta Modulation:
1. An over-sampled input is taken to make full use of the signal correlation.
2. The quantization design is simple.
3. The input sequence is much higher than the Nyquist rate.
4. The quality is moderate.
5. The design of the modulator and the demodulator is simple.
6. The stair-case approximation of output waveform.
7. The step-size is very small, i.e., Δ (delta).
8. The bit rate can be decided by the user.
9. 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.

Working Principle
Delta modulation transmits only one bit per sample. Here, the present sample value is compared
with the previous sample value and this result whether the amplitude is increased or decreased is
transmitted.
Input signal x(t) is approximated to step signal by the delta modulator.This step size is kept fixed.
The difference between the input signal x(t) and staircase approximated signal is confined to two
levels, i.e., +Δ and -Δ.
Now, if the difference is positive, then approximated signal is increased by one step, i.e., ‘Δ’. If
the difference is negative, then approximated signal is reduced by ‘Δ’ .
When the step is reduced, ‘0’ is transmitted and if the step is increased, ‘1’ is transmitted.
Hence, for each sample, only one binary bit is transmitted.
Fig shows the analog signal x(t) and its staircase approximated signal by the delta modulator.
Delta Modulation Waveform

Mathematical Expressions:
The error between the sampled value of x(t) and last approximated sample is given as:

Where e( nTs) = error at present sample


x(nTs) = sampled signal of x(t)

If we assume u(nTs) as the present sample approximation of staircase output, then

Let us define a quantity b( nTs) in such a way that,

This means that depending on the sign of error e( nTs) , the sign of step size Δ is decided. In other
words we can write
Also if b (nTs) =+Δ then a binary ‘1’ is transmitted
and if b (nTs) =-Δ then a binary ‘0’ is transmitted
Here Ts = sampling interval.

Transmitter
It is also known as Delta modulator.

It consists of a 1-bit quantizer and a delay circuit along with two summer circuits.
The summer in the accumulator adds quantizer output (±Δ) with the previous sample
approximation . This gives present sample approximation. i.e.,

The previous sample approximation u[(n-1)Ts ] is restored by delaying one sample period Ts .
The samples input signal x(nTs ) and staircase approximated signal xˆ(nTs ) are subtracted to get
error signal e(nTs ).
Thus, depending on the sign of e(nTs ), one bit quantizer generates an output of +Δ or -Δ .
If the step size is +Δ, then binary ‘1’ is transmitted and if it is -Δ, then binary ‘0’ is transmitted .
Receiver
At the receiver end also known as delta demodulator, it comprises of a low pass filter(LPF), a
summer, and a delay circuit. The predictor circuit is eliminated here and hence no assumed input
is given to the demodulator.

The accumulator generates the staircase approximated signal output and is delayed by one
sampling period Ts.
It is then added to the input signal.
If the input is binary ‘1’ then it adds +Δ step to the previous output (which is delayed).
If the input is binary ‘0’ then one step ‘Δ’ is subtracted from the delayed signal.
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
Disadvantages:
 Slope Over load distortion (when Δ is small)
 Granular noise (when Δ is large)
1.Slope Overload Distortion
This distortion arises because of large dynamic range of the input signal.

The rate of rise of input signal x(t) is so high that the staircase signal can not approximate it, the
step size ‘Δ’ becomes too small for staircase signal u(t) to follow the step segment of x(t).
Hence, there is a large error between the staircase approximated signal and the original input
signal x(t).
This error or noise is known as slope overload distortion .
To reduce this error, the step size must be increased when slope of signal x(t) is high.

2. Granular or Idle Noise


Granular or Idle noise occurs when the step size is too large compared to small variation in the
input signal.
This means that for very small variations in the input signal, the staircase signal is changed by
large amount (Δ) because of large step size.
Fig.1 shows that when the input signal is almost flat , the staircase signal u(t) keeps on
oscillating by ±Δ around the signal.
The error between the input and approximated signal is called granular noise.
The solution to this problem is to make the step size small .

Solution:
In order to overcome the quantization errors due to slope overload and granular noise, the step
size (Δ) is made adaptive to variations in the input signal x(t).
Particularly in the steep segment of the signal x(t), the step size is increased. And the step is
decreased when the input is varying slowly.
This method is known as Adaptive Delta Modulation (ADM).
The adaptive delta modulators can take continuous changes in step size or discrete changes in
step size.
Program Code:
%This shows coding of a sinusoidal signal by delta modulation
%It also shows slope overload cases

%ORIGINAL SIGNAL
step = 0.1; %step size
fs = 1000; %dT=0.001, slope=step/dT=100
fm = 10;
A = 1; %maximum slope= 2*pi*fm*A=62.8 means case of no slope overloading
t=0:1/fs:((2/fm)-(1/fs)); %Two Cycles
x=A*sin(2*pi*fm*t);

subplot(2,3,1);
plot(x);
title('Original Signal');

% DELTA MODULATION
xq(1)=0; %modulation
d(1)=0;
for n=2:length(x)
d(n)=sign(x(n)-xq(n-1));
xq(n)=xq(n-1)+d(n)*step;
end
subplot(2,3,2);
plot(d(1:100));
axis([0 100 -1.2 1.2]);
title('First 100 Output of Delta Modulation');

y=0; %demodulation
for n=2:length(d)
y(n)=y(n-1)+d(n);
end;
subplot(2,3,3);
plot(y);
title('Demodulation by Summing');

%filtering to smoothen edge


xr=filter([0.125*ones(1,8)],1,y); %8th order moving average filter
subplot(2,3,4);
plot(xr);
title('Filtering to Smoothen Edge')

%SLOPE OVERLOAD CASE

A=2.5;
x=A*x; %maximum slope= 2.5*62.8=157 means case of slope overloading
xq(1)=0; %modulation in slope overload case
d(1)=0;
for n=2:length(x)
d(n)=sign(x(n)-xq(n-1));
xq(n)=xq(n-1)+d(n)*step;
end
y=0; %demodulation in slope overload case
for n=2:length(d)
y(n)=y(n-1)+d(n);
end;
subplot(2,3,5);
plot(y);
title('Demodulation by Summing in Slope Overload case')
xr=filter([0.125*ones(1,8)],1,y);
subplot(2,3,6);
plot(xr);
title('Filtered Slope Overload Case');

Output:

You might also like