Professional Documents
Culture Documents
EXPERIMENT:1 9/11/2023
• To stimulate M-PSK and M-QAM modulation technique in MATLAB where in the
AIM: order of modulation [ 4 8 16 32 64 ] considering binary data and image as an input. Also
plot constellation diagram.
APPARATUS: MATLAB software
THEORY: • M-PSK
Multi-level modulation techniques permit high data rates within fixed bandwidth
constraints. A convenient set of signals for M-ary PSK is
φi(t) = A cos(ωct + θi), 0 < t ≤ Ts,
The symbols in this case are of duration Ts , so the information (or bit) rate Tb
satisfies
Ts = Tb log2 M
A phase diagram and signal constellation diagram for the case of M = 8 are
shown below:
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 1
EC 302: WMC U20EC035
Transmitter Side:
Receiver Side:
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 2
EC 302: WMC U20EC035
• M-QAM
Quadrature Amplitude Modulation or QAM is a digital modulation scheme where
data is transmitted over the channel by varying both the amplitude and phase of
the high-frequency carrier signal. The transmitted signal is represented in a
constellation plot that contains two axes namely the in-phase and Quadrature. The
in-phase and Quadrature axis are separated from each other by a phase of 90˚.
Therefore, these two axes are orthogonal to each other.
In the QAM scheme, two or more bits are grouped together to form a symbol that
lies in the constellation plot. Each symbol, also called state, has a unique
amplitude and phase level that provides distinction across different points in the
constellation. Since, the modulation scheme uses binary data, the number of
possible bits that can be transmitted can be given by the following equation:
Constellation Diagrams:
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 3
EC 302: WMC U20EC035
Transmitter Side:
Receiver Side:
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 4
EC 302: WMC U20EC035
%MODULATION
%Generating bits
x=randi([0,1],1,n);
%Zero Padding
remain=rem(n,sym);
if(remain~=0)
num=sym-rem(n,sym);
z=zeros(1,num);
x=[z x];
end
%Reshaping
x1=reshape(x,sym,length(x)/sym);
y=transpose(x1);
%Converting to decimal
y=bi2de(y,'left-msb');
%PSK Modulation
y=pskmod(y,M);
scatterplot(y);
%DEMODULATION
z=pskdemod(y,M);
z=de2bi(z,'left-msb');
z=transpose(z);
z=reshape(z,[1,length(x)]);
if(remain~=0)
z=z(sym-number+1:length(x));
end
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 5
EC 302: WMC U20EC035
Scatter Plot
2) Image as Input
clc;
clear all;
close all;
%MODULATION
%Generating bits
x=imread('cameraman.tif');
[r, c]=size(x);
x=de2bi(x);%r*c * 8 size
x=reshape(x,[1 r*c*8]);
n=length(x);
%Zero Padding
remain=rem(n,sym);
if(remain~=0)
num=sym-rem(n,sym);
z=zeros(1,num);
x=[z x];
end
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 6
EC 302: WMC U20EC035
%Reshaping
x1=reshape(x,[sym,length(x)/sym] );
y=transpose(x1);
%Converting to decimal
y=bi2de(y,'left-msb');
%PSK Modulation
y=double(y);
y=pskmod(y,M);%y=qammod(y,M);
scatterplot(y);
%DEMODULATION
z=pskdemod(y,M); %y=qamdemod(y,M);
z=de2bi(z,'left-msb');
z=transpose(z);
z=reshape(z,[1,length(x)]);
if(remain~=0)
z=z(sym-number+1:length(x));
end
z=reshape(x,[r*c 8]);
z=bi2de(z);
z=reshape(z,[r c]);
imshow(z);
Scatter Plot
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 7
EC 302: WMC U20EC035
Input Image
Output Image
• M-QAM (M=256)
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 8
EC 302: WMC U20EC035
CONCLUSION:
EC 302: Wireless and Mobile Communication Laboratory, Electronics Engineering Department, SVNIT,
Surat-07 9