You are on page 1of 3

COLLEGE OF ELECTRICAL AND MECHANICAL

ENGINEERING

Digital Communication:

LAB REPORT 10:

SUBMITTED BY:
MUHAMMAD FARAN KHURSHID

DEPARTMENT AND SYNDICATE:


CE-41-B

SUBMITTED TO:

LE Hamza Shami
DATE:

25-05-2023
Plotting the Constellation Diagram for 8-PSK using Natural
Mapping and Gray Mapping:
Tasks:
Hardware/Software Required:
Hardware: DELL Inspiron 15 3000(Laptop)
Software Tool: MATLAB R2022b
Code:
clear all;
close all;
clc;
disp('DC LAB 10:')
%--------------------------------------------------------------------
A = rand(1, 100000);
I = round(2 * A - 1);
Q = round(2 * sqrt(3) * A - 1);
pulse_length = 10;
I_pulse = ones(1, pulse_length);
Q_pulse = ones(1, pulse_length);
figure('Name', 'Natural mapping')
scatter(I, Q, [], 'filled')
axis([-1 1 -1 1])
title('Natural mapping')

figure('Name', 'Gray mapping')


scatter(I, Q, [], 'filled')
axis([-1 1 -1 1])
title('Gray mapping')

constellationPoints = [-1 -1; -1 0; -1 1; 0 -1; 0 1; 1 -1; 1 0; 1 1];


figure('Name', '8PSK Natural Mapping')
scatter(constellationPoints(:, 1), constellationPoints(:, 2), [], 'filled')
axis([-1 1 -1 1])
title('8PSK Natural Mapping')
figure('Name', '8PSK Gray Mapping')
scatter(constellationPoints(:, 1), constellationPoints(:, 2), [], 'filled')
axis([-1 1 -1 1])
title('8PSK Gray Mapping')
Output:

You might also like