0% found this document useful (0 votes)
17 views1 page

Phase

This document contains MATLAB code to simulate phase modulation and demodulation. It defines signals, performs phase modulation and adds noise, then demodulates and plots the original, modulated, noisy, and demodulated signals.

Uploaded by

Koushik Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Phase

This document contains MATLAB code to simulate phase modulation and demodulation. It defines signals, performs phase modulation and adds noise, then demodulates and plots the original, modulated, noisy, and demodulated signals.

Uploaded by

Koushik Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

clc;

clear all;
close all;
fs = 50;
fc = 10;
t = (0: 2*fs+1)'/fs;
phasedev = pi/2; % deviation
c = sin(2*pi*fc*t); % carrier
x = sin(2*pi*t)+ sin(4*pi*t);
tx = pmmod(x, fc, fs, phasedev);
rx = awgn(tx, 10, 'measured');
y = pmdemod(rx, fc, fs, phasedev);
subplot(511);
plot(x);
xlabel('Time');
ylabel('Amplitude');
title('Message Signal');
subplot(512);
plot(c);
xlabel('Time');
ylabel('Amplitude');
title('Carrier Signal');
subplot(513);
plot(tx);
xlabel('Time');
ylabel('Amplitude');
title('Phase Modulated Signal');
subplot(514);
plot(rx);
xlabel('Time');
ylabel('Amplitude');
title('Additive White Gaussian Noise');
subplot(515);
plot(y);
xlabel('Time');
ylabel('Amplitude');
title('Demodulated PM Signal');

You might also like