You are on page 1of 3

11/02/13

Delta modulation Using MATLAB

15th March 2012

Delta modulation Using MATLAB

DeltaModulation: We all know that every digital technique requires the process known as sampling. Delta modulation is also no exception from this. But in delta modulation we use the sampling rates very much greater than the Nyquist rate. This is called as oversampling. Over sampling provides the high correlation between the adjacent samples of the sampled signal. This provides the chance for us to implement the simple quantization technique to construct the encoded signal for the incoming signal. We can describe the DM as the process of approximating the incoming signal as the staircase approximation of the over sampled version of the incoming signal. The process of DM includes the finding of the difference between the incoming signal and the approximated signal. Then the difference is quantized into the two levels only they are corresponding to the positive and negative differences between the incoming and approximated signal. At any instance if the approximated signal lies below the actual value of the incoming signal then the approximation value is raised by . In case the approximation lies above the actual value of the incoming signal then its value will be diminished by . The condition posed here is the values of the samples present side by side do not change too rapidly, and the stair case approximation lies within the of the input signal. Mathematical representation: Take the variables as the m(n), mq(n), e(n), eq(n). the conventions fallows as m(n) represents the sampled incoming signal, mq(n) denotes the stair case approximated incoming signal, e(n) stands for error signal representing the difference between the present sample of the incoming signal and the latest approximation to it, eq(n) is the quantized version of e(n). And we all know sgn(x) is the signum function of x. at last the output of the quantizer is encoded to produce the DM signal. Here the notations fallowed are discrete time notations because we applying the operations on the sampled version of the incoming signal which is in discrete nature. e(n)=m(n)-mq(n-1) eq=.sgn(e(n)) mq(n)=mq(n-1)+eq(n) =(2*pi*am)/(fm*fs) Fm is the message signal frequency and fs is the sampling frequency, and is the step size. Matlab commands: Sign(x) This is the matlab command for the signum function of x but on the paper we represent it as sgn(x)
Y = sign(X) returns

an array Y the same size as X, where each element of Y is:

1 if the corresponding element of X is greater than zero 0 if the corresponding element of X equals zero -1 if the corresponding element of X is less than zero Stairs(x) This command plots the stair case approximated signal of x similar to plot command in matlab but plot gives smooth curve. s t a i r s ( Y ) draws a stairstep graph of the elements of Y . stairs(mq,'red'): this command plot the graph with the color indicated we can use any color built in matlab. Hleg=legend(string1,string2) This command places a text in abox at the top right corner of the grph. l e g e n dplaces a legend on various types of graphs (line plots, bar graphs, pie charts, etc.). For each line plotted, the legend shows a sample of the line type, marker symbol, and color beside the text label you specify. When plotting
kemppro.blogspot.mx/2012/03/delta-modulation-using-matlab.html 1/3

11/02/13

Delta modulation Using MATLAB

filled areas (patch or surface objects), the legend contains a sample of the face color next to the text label. Algorithm: The program is simple so no need to explain the algorithm. As you go through the program you can understand the logic and flow of steps. Program: clc clear all close all t=[0:0.01:1] m=sinc(2*pi*t) subplot(211) hold on plot(m,'*black') title('sinc pulse') xlabel('time') ylabel('amplitude') d=2*pi/100 for n=1:1:100 if n==1 e(n)=m(n) eq(n)=d*sign(e(n)) mq(n)=eq(n) else e(n)=m(n)-mq(n-1) eq(n)=d*sign(e(n)) mq(n)=mq(n-1)+eq(n) end end stairs(mq,'black') hleg=legend('original signal','stair case approximated signal') hold off subplot(212) hold on m1=sin(2*pi*t) plot(m1,'black') title('sin wave') xlabel('time') ylabel('amplitude') d=2*pi/100 for n=1:1:100 if n==1 e1(n)=m1(n) eq1(n)=d*sign(e1(n)) mq1(n)=eq1(n) else e1(n)=m1(n)-mq1(n-1) eq1(n)=d*sign(e1(n)) mq1(n)=mq1(n-1)+eq1(n)
kemppro.blogspot.mx/2012/03/delta-modulation-using-matlab.html 2/3

11/02/13

Delta modulation Using MATLAB

end end stairs(mq1,'black') hleg=legend('original signal','stair case approximated signal') hold off

[http://4.bp.blogspot.com/B7_r9eg9UKs/T2ICMB5T49I/AAAAAAAAA7A/_lweKTre3Fo/s1600/delta1.JPG]

Other Analog to Digital Modulation Techniques 1.


Pulse Code Modulation [http://kemppro.blogspot.com/2012/03/pulsecode-modulation-usingmatlabpcm.html]

Posted 15th March 2012 by Balaramakrishna rachumallu

kemppro.blogspot.mx/2012/03/delta-modulation-using-matlab.html

3/3

You might also like