You are on page 1of 5

Name: Dev Mehta Date: August 10, 2021

Reg. no.: 19BEC1300


Experiment-2
Delta Modulation

Aim: Illustrate delta modulated signal


 Without slope overload distortion
 With slope over distortion

Theory: With Delta Modulation a train of fixed width pulses is transmitted, whose polarity indicates
whether the demodulator output should rise or fall at each pulse. The output is caused to rise or fall
by a fixed step height at each pulse

MATLAB Code:
clc
close all;
clear all;
fm=10;
%Without slope overload distortion
%message freq
fs=10*fm;
%sampling freq
A=20;
t=0:1/fs:1/fm;
x=A*sin(2*pi*fm*t);
ts=1/fs;
del=2*pi*fm*A*ts;
xr=0;
y=[0];
%o/p matrix
for i=1:length(x)
if(xr(i)<=x(i))
xr(i+1)=xr(i)+del
b=1
else
xr(i+1)=xr(i)-del
b=0
end
y=[y,b]
end
%plotting x xr y
figure(1)
subplot(2,1,1)
plot(x)
title('Without slope overload distortion');
xlabel('time');
ylabel('amplitude');
hold on
stairs(xr,'r','LineWidth',3);
xlabel('time');
ylabel('amplitude');
hold off
subplot(2,1,2)
stairs(y,'g','LineWidth',5)
xlabel('time');
ylabel('amplitude');
clc
close all;
clear all;
fm=10;
%slope overload distortion at different %
%message freq
fs=10*fm;
%sampling freq
A=20;
t=0:1/fs:1/fm;
x=A*sin(2*pi*fm*t);
ts=1/fs;
del=(10/100)*2*pi*fm*A*ts;
xr=0;
y=[0];
%o/p matrix
for i=1:length(x)
if(xr(i)<=x(i))
xr(i+1)=xr(i)+del
b=1
else
xr(i+1)=xr(i)-del
b=0
end
y=[y,b]
end
%plotting x xr y
figure(1)
subplot(2,1,1)
plot(x)
title('slope overload distortion at 10%');
xlabel('time');
ylabel('amplitude');
hold on
stairs(xr,'r','LineWidth',3);
xlabel('time');
ylabel('amplitude');
hold off
subplot(2,1,2)
stairs(y,'g','LineWidth',5)
xlabel('time');
ylabel('amplitude');
Inference: Delta module signal illustrated without slope overload distortion and with slope overload
distortion at various percentages.

You might also like