kirancshet
Newbie level 4
Hello, I am implementing the DQPSK modulator and Demodulator. I was successful in implementing the DQPSK modulator. But, unfortunately, I could recover the samples from the modulated signal.
As the help indicates and I quote, "If the Output type parameter is set to Integer, then the block maps a phase difference of
Theta + pi*m/2
to m, where Theta is the Phase rotation parameter and m is 0, 1, 2, or 3."
Can you please suggest me the steps to recover the samples.
Here is what I am doing,
Code
Data =[2 0 0 1 2 3 2 3 2 0 3 1 1 1 ];
Theta=pi/4;
for i=1:length(Data)
if(i==1)
DQPSK_Sig(i)=exp(1j*Theta+1j*pi*Data(i)/2);
else
DQPSK_Sig(i)=DQPSK_Sig(i-1)*exp(1j*Theta+1j*pi*Data(i)/2);
end
end
Demodulation
for i=1:length(DQPSK_Sig)
if(i==1)
theta(i)=angle(DQPSK_Sig(i));
else
theta(i)=angle(DQPSK_Sig(i))-theta(i-1);
end
end
*****
Regards
Kiran
---------- Post added at 11:07 ---------- Previous post was at 10:35 ----------
Sorry, I will have to answer my own question,just in case if someone might find it useful.
Here is the change in the code for demodulation :
for i=1:length(DQPSK_Sig)
if(i==1)
theta(i)=angle(DQPSK_Sig(i));
else
theta(i)=angle(DQPSK_Sig(i))-angle(DQPSK_Sig(i-1));%-theta(i-1);
end
% demod_dqpsk(i)=exp(1j*theta(i));
end
Regards
Kiran
As the help indicates and I quote, "If the Output type parameter is set to Integer, then the block maps a phase difference of
Theta + pi*m/2
to m, where Theta is the Phase rotation parameter and m is 0, 1, 2, or 3."
Can you please suggest me the steps to recover the samples.
Here is what I am doing,
Code
Data =[2 0 0 1 2 3 2 3 2 0 3 1 1 1 ];
Theta=pi/4;
for i=1:length(Data)
if(i==1)
DQPSK_Sig(i)=exp(1j*Theta+1j*pi*Data(i)/2);
else
DQPSK_Sig(i)=DQPSK_Sig(i-1)*exp(1j*Theta+1j*pi*Data(i)/2);
end
end
Demodulation
for i=1:length(DQPSK_Sig)
if(i==1)
theta(i)=angle(DQPSK_Sig(i));
else
theta(i)=angle(DQPSK_Sig(i))-theta(i-1);
end
end
*****
Regards
Kiran
---------- Post added at 11:07 ---------- Previous post was at 10:35 ----------
Sorry, I will have to answer my own question,just in case if someone might find it useful.
Here is the change in the code for demodulation :
for i=1:length(DQPSK_Sig)
if(i==1)
theta(i)=angle(DQPSK_Sig(i));
else
theta(i)=angle(DQPSK_Sig(i))-angle(DQPSK_Sig(i-1));%-theta(i-1);
end
% demod_dqpsk(i)=exp(1j*theta(i));
end
Regards
Kiran