delta modulation using matlab

Upload: jjackal

Post on 02-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Delta Modulation Using MATLAB

    1/3

    11/02/13 Delta modulation Using MATLAB

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

    15th March 2012DeltaModulation :

    We all know that every digital technique requires the process known as sampling. Deltamodulation is also no exception from this. But in delta modulation we use the sampling rates very muchgreater than the Nyquist rate. This is called as oversampling. Over sampling provides the highcorrelation between the adjacent samples of the sampled signal. This provides the chance for us toimplement 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 staircaseapproximation of the over sampled version of the incoming signal. The process of DM includes thefinding of the difference between the incoming signal and the approximated signal. Then the differenceis quantized into the two levels only they are corresponding to the positive and negative differencesbetween the incoming and approximated signal. At any instance if the approximated signal lies belowthe actual value of the incoming signal then the approximation value is raised by . In case theapproximation 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 incomingsignal and the latest approximation to it, eq(n) is the quantized version of e(n). And we all know sgn(x) isthe signum function of x. at last the output of the quantizer is encoded to produce the DM signal. Herethe notations fallowed are discrete time notations because we applying the operations on the sampledversion 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 zero0 if the corresponding element of X equals zero-1 if the corresponding element of X is less than zero

    Sta irs(x)This command plots the stair case approximated signal of x similar to plot command in matlab but plotgives smooth curve. stairs(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 inmatlab.

    Hleg=legend(string1,string2)This command places a text in abox at the top r ight corner of the grph. legend places a legend onvarious types of graphs (line plots, bar graphs, pie charts, etc.). For each line plotted, the legend showsa sample of the line type, marker symbol, and color beside the text label you specify. When plotting

    Delta modulation Using MATLAB

    http://kemppro.blogspot.com/2012/03/delta-modulation-using-matlab.htmlhttp://kemppro.blogspot.com/2012/03/delta-modulation-using-matlab.htmlhttp://kemppro.blogspot.com/2012/03/delta-modulation-using-matlab.html
  • 7/27/2019 Delta Modulation Using MATLAB

    2/3

    11/02/13 Delta modulation Using MATLAB

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

    filled areas (patch or surface objects), the legend contains a sample of the face color next to the textlabel.

    Algorithm :The program is simple so no need to explain the algorithm. As you go through the program you canunderstand the logic and flow of steps.

    Program :

    clcclear allclose allt=[0:0.01:1]m=sinc(2*pi*t)subplot(211)hold onplot(m,'*black')title('sinc pulse')

    xlabel('time')ylabel('amplitude')d=2*pi/100for n=1:1:100if n==1e(n)=m(n)eq(n)=d*sign(e(n))mq(n)=eq(n)elsee(n)=m(n)-mq(n-1)

    eq(n)=d*sign(e(n))mq(n)=mq(n-1)+eq(n)endendstairs(mq,'black')hleg=legend('original signal','stair case approximated signal')hold off subplot(212)hold onm1=sin(2*pi*t)plot(m1,'black')title('sin wave')xlabel('time')ylabel('amplitude')d=2*pi/100for n=1:1:100if n==1e1(n)=m1(n)eq1(n)=d*sign(e1(n))mq1(n)=eq1(n)elsee1(n)=m1(n)-mq1(n-1)eq1(n)=d*sign(e1(n))mq1(n)=mq1(n-1)+eq1(n)

  • 7/27/2019 Delta Modulation Using MATLAB

    3/3

    11/02/13 Delta modulation Using MATLAB

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

    endendstairs(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-using-

    matlabpcm.html]

    Posted 15th March 2012 by Balaramakrishna rachumallu

    https://plus.google.com/104253578179042045283http://kemppro.blogspot.com/2012/03/pulsecode-modulation-using-matlabpcm.htmlhttp://4.bp.blogspot.com/-B7_r9eg9UKs/T2ICMB5T49I/AAAAAAAAA7A/_lweKTre3Fo/s1600/delta1.JPG