Pages

Friday 9 November 2012

Phase Modulation (Matlab 2012a)

Program:

clc;

clear all;
t = 0:0.001:1;
vm = input('Enter the amplitude of message signal = ');
vc = input('Enter the amplitude of carrier signal = ');
fm = input('Enter the message frequency = ');
fc = input('Enter the carrier frequency = ');
m = input('Enter modulation index = ');
sm = vm*sin(2*pi*fm*t);
subplot(3,1,1);
plot(t,sm);
xlabel('Time ---->');
ylabel('Amplitude ---->');
title('Message Signal');
grid on;
sc = vc*sin(2*pi*fc*t);
subplot(3,1,2);
plot(t,sc);
xlabel('Time ---->');
ylabel('Amplitude ---->');
title('Carrier Signal');
grid on;
y = vc*sin(2*pi*fc*t+m.*sin(2*pi*fm*t));
subplot(3,1,3);
plot(t,y);
xlabel('Time ---->');
ylabel('Amplitude ---->');
title('PM Wave');
grid on;

Output:


Enter the amplitude of message signal = 5

Enter the amplitude of carrier signal = 5
Enter the message frequency = 10
Enter the carrier frequency = 100
Enter modulation index = 4

Output Waveforms:



6 comments:

  1. Thank you so much.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. phase demodulation code please?

    ReplyDelete
  4. This looks like frequency modulation, not phase modulation. There is no phase change in the resulting signal

    ReplyDelete