Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to realize a pi/4 DQPSK?

Status
Not open for further replies.

derPate

Electrical
Sep 30, 2005
1
Hi I want to do a Pi/4 DQPSK with an Binary Code.
Gray Coding:
00 -> +1/4*pi phase shift
01 -> +3/4*pi phase shift
11 -> -3/4*pi phase shift
10 -> -1/4*pi phase shift

The modulation shall employ square-root raised cosine pulse shaping(roll off factor = 0.4) to generate the equivalent lowpass information-bearing signal. The output of the transmitter shall be a bandpass signal.

I have done allready following:

clc;
clear;
% binary Payload in a one line vector
Payload =[1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1];
iFigure=0;
TI=25*10^(-8); % Time Interval in s of the IQ data
fc= 2402000000; % carrier frequency (2.402 GHz)
Ts=10^(-6); % symbol duration (1 µs)
Sref=[0 0]; % Reference Symbol
Degref=1/4*pi; % Reference Phase
sz=0.4; %Roll off factor for the Pulse shaping
Anomaly=pi/4 ; % max. Anomaly of the Phase for gray coding
unmodulated_part =[ 0 0 0 0 0 0 0 0 0 0];
Syncsequence = [0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1]; % Synchronisation Sequence

Bin=[Sref Syncsequence Payload];

k=length(Bin)/2;

t=0:TI:((length(Bin)/2)*Ts-TI); %Time in 0.25µs

% --- Phase shift
Phi=zeros(1,length(Bin)/2);
y=1;
for (x=2:2:length(Bin))
if Bin(x)==1
if Bin(x-1)==1
Phi(y)=-3/4*pi;
y=y+1;
else
Phi(y)=3/4*pi;
y=y+1;
end
else
if Bin(x-1)==1
Phi(y)=-1/4*pi;
y=y+1;
else
Phi(y)=1/4*pi;
y=y+1;
end
end
end
clear x y;

% iFigure = iFigure + 1;
% figure( iFigure )
% plot (Phi)
% title( 'Phi-Data' )

% --- Differential Phase Encoding
S=zeros(1,length(Bin)/2);
S(1)= exp(i*Degref);
for (x=2:length(S))
S(x)=S(x-1)*exp(i*Phi(x));
end
clear x;

% iFigure = iFigure + 1;
% figure( iFigure )
% plot (S)
% title( 'S-Data' )

% --- Pulse Shaping
for (x=1:length(t))
if t(x)==0
f(x)=1/t(x+1)*1.2;
else
f(x)=1/t(x);
end
end



% iFigure = iFigure + 1;
% figure( iFigure )
% plot (f)
% title( 'f-Data' )

% --- square- root raised cosine pulse sharping filter----
for x=1:length(f)
for y=1:k
if (t(x)-y*Ts)==0
ff(y,x)=1/(t(x+1)-y*Ts)*1.2;
else
ff(y,x)=1/(t(x)-y*Ts);
end
if ff(y,x)>=(-(1-sz)/(2*Ts)) && ff(y,x)<=((1-sz)/(2*Ts))
P(y,x)=1;
%P(y,x)=P(y,x)*exp(-i*2*pi*f(x)*y*Ts);
elseif (ff(y,x)<=(-(1-sz)/(2*Ts)) && ff(y,x)>=((1-sz)/(2*Ts))) || (ff(y,x)>=(-(1+sz)/(2*Ts)) && ff(y,x)<=((1+sz)/(2*Ts)))
P(y,x)=sqrt(1/2*(1-sin((pi*(2*ff(y,x)*Ts-1))/2*sz)));
%P(y,x)=P(y,x)*exp(-i*2*pi*f(x)*y*Ts);
else
P(y,x)=0;
%P(y,x)=P(y,x)*exp(-i*2*pi*f(x)*y*Ts);
end
end
end
clear x y;
p=ifft(P);

iFigure = iFigure + 1;
figure( iFigure )
subplot (2,1,1)
plot (p)
title( 'p-Data' )
subplot (2,1,2)
plot (P)
title( 'P-Data' )

for x=1:length(t)
v(x)=0;
for y=1:k
v(x)=v(x)+S(y)*p(y,x);
end
end
clear x y;

iFigure = iFigure + 1;
figure( iFigure )
plot (v)
title( 'v-Data' )

for x=1:length(t)
s(x)=real(v(x)*exp(i*2*pi*fc*t(x)));
end
clear x;

iFigure = iFigure + 1;
figure( iFigure )
plot (s)
title( 's-Data' )


for x=1:length(s)
rad(x)=angle(s(x));
I(x)=s(x)/(cos(2+pi*fc*t(x)+rad(x)))*cos(rad(x));
Q(x)=s(x)/(cos(2+pi*fc*t(x)+rad(x)))*sin(rad(x));
end
clear x rad;



But starting with the pulse shaping, something must be wrong!

Would be nice when somebody can help me...
Thks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor