Вы находитесь на странице: 1из 3

Experiment No.

3
OBJECTIVE: To generate Pulse position modulation (PPM) wave on MATLAB.

THEORY: In Pulse Position Modulation the amplitude of the pulse is kept constant as in the case
of the FM and PWM to avoid noise interference. Unlike the PWM the pulse width is kept constant
to achieve constant transmitter power. The modulation is done by varying the position of the
pulse from the mean position according to the variations in the amplitude of the modulating
signal.

The Pulse Position Modulation (PPM) can be actually easily generated from a PWM waveform
which has been modulated according to the input signal waveform. The technique is to generate
a very small pulse of constant width at the end of the duty time of each and every PWM pulses.

Figure: Pulse Position Modulation

MATLAB CODE:
close all
clear all

t = 0:0.0001:1 ;
fm = 3 ;
fc = 15 ;
Ac = 5 ;
Am = 4 ;

5|Page
carrier = Ac.*sawtooth( 2*pi*fc*t ) ;

message = Am.*sin( 2*pi*fm*t ) ;

n = length( carrier ) ;

for i = 1:n
if ( message(i)>=carrier(i) )
pwm(i)=1;
else
pwm(i)=0;
end
end

subplot(4,1,1)

plot(t, carrier), title('Sawtooth Wave'), ylabel('Amplitude->'),


xlabel('t->');

subplot(4,1,2)

plot(t, message), title('Message Signal'),ylabel('Amplitude->'),


xlabel('t->');

subplot(4,1,3)

plot(t, pwm, 'b'), title('PWM Signal'), ylabel('Amplitude->'),


xlabel('t->');

pwm = (-1)*pwm ;
ppm = diff( pwm ) ;

for i = 1:(n-1)
if ( ppm(i)<0 )
ppm(i) = 0 ;
end
end

t = 0:0.0001:0.9999

subplot(4,1,4)

plot(t, ppm, 'r'), title('PPM Signal'), ylabel('Amplitude->'),


xlabel('t->');

6|Page
OUTPUT:

RESULT: The pulse width modulated (PWM) wave is generated in MATLAB.

7|Page

Вам также может понравиться