フィルターのクリア

DQPSK Demodulation

9 ビュー (過去 30 日間)
Kiran Chandrashekhar
Kiran Chandrashekhar 2011 年 4 月 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
? + ?m/2
to m, where ? 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
*****
Please let me know, if am missing something obvious.
Regards Kiran
  1 件のコメント
Kiran Chandrashekhar
Kiran Chandrashekhar 2011 年 4 月 5 日
I just found the answer for my own question.
Here is the change in the code:
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

サインインしてコメントする。

回答 (2 件)

Doug Hull
Doug Hull 2011 年 4 月 11 日
Here is the change in the code:
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
Posted from comments. It is better if these have an answer.

Max Div
Max Div 2012 年 5 月 13 日
%Imho it more helpful.
%Compare my and matlab demodulation
hMod = comm.DQPSKModulator(pi/4, 'SymbolMapping', 'Binary');
hAWGN = comm.AWGNChannel('NoiseMethod', 'Signal to noise ratio (SNR)','SNR', 50);
hDemod = comm.DQPSKDemodulator(pi/4, 'SymbolMapping', 'Binary');
% Create an error rate calculator, account for the one symbol transient caused by the differential modulation
hError = comm.ErrorRate('ComputationDelay',1);
data = randi( [0 3], 10000, 1);
%%Modulation
modSignal = step(hMod, data);
modSignal_my = zeros(length(data), 1);
Theta=pi/4;
for i=1:length(data)
if (i==1)
modSignal_my(i) = exp(1i * Theta + 1i * pi * data(i) / 2);
else
modSignal_my(i) = modSignal_my(i-1) * exp(1i * Theta + 1i * pi * data(i) / 2);
end
end
%%AWGN
noisySignal = step(hAWGN, modSignal);
%%Demodulation
receivedData = step(hDemod, noisySignal);
receivedData_my = zeros( length(noisySignal), 1 );
for i=1:length(noisySignal)
if(i==1)
receivedData_my(i) = angle( noisySignal(i) ) - Theta;
else
receivedData_my(i) = angle( noisySignal(i) )-angle( noisySignal(i-1) );
end
end
receivedData_my = receivedData_my + 8 * pi;
receivedData_my = mod(receivedData_my, 2 * pi);
receivedData_my = floor( receivedData_my / (pi / 2) );

カテゴリ

Help Center および File ExchangePHY Components についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by