Wednesday 9 November 2022

Communication System - QPSK

 clear ;

clc ;
close ;
M =4;
i = 1:M;
t = 0:0.001:1;
for i = 1:M
s1(i ,:) = cos (2* %pi *2* t)*cos ((2*i -1) *%pi /4) ;
s2(i ,:) = -sin (2* %pi *2* t)*sin ((2*i -1) *%pi /4) ;
end
S1 =[];
S2 = [];
S = [];
Input_Sequence=[0 ,1 ,1 ,0 ,1 ,0 ,0 ,0];
m = [3 ,1 ,1 ,2];
for i =1: length (m)
S1 = [S1 s1(m(i) ,:) ];
S2 = [S2 s2(m(i) ,:) ];
end
S = S1+S2;
figure
subplot (3 ,1 ,1)
a = gca ();
a.x_location = "origin";
plot (S1)
title ('Binary PSK wave o f Odd-numbered bits of input sequence')
subplot (3 ,1 ,2)
a = gca ();
a.x_location = "origin";
plot (S2)
title ('Binary PSK wave o f Even-numbered bits of input sequence')
subplot (3 ,1 ,3)
a = gca ();
a.x_location = "origin";
plot (S)
title ('QPSK waveform ')

No comments:

Post a Comment

Verilog Code for Universal Shift Register

  Universal Shift Register module universalshift (clr,clk,sel,in,out); input clr,clk; input [1:0]sel; input [3:0]parin; output reg[3:0]out; ...