DQPSK Softdecision

26 views (last 30 days)
reto
reto on 11 Oct 2011
Answered: Prasanna on 11 Sep 2024
Hi,
I am looking for matlab-code for demodulating a DQPSK-Signal (shifted by pi/4). The output of the demapper should not only provide hard-decision symbols (2 bits each) but soft-decision values for each of the two bits of one symbol. How can I achieve this? How can I calculate the LLRs (log likelihood ratio) for each bit? I saw some theoretical stuff about LLR generation out of a QPSK-signal where they take the logarithm of the calculated probabilities for each of the 4 possible constellations. Since I need to perform differential QPSK I need to take the difference into consideration and until now I haven't found any solution for that.
Thanks a lot in advance! Greetings, Reto

Answers (1)

Prasanna
Prasanna on 11 Sep 2024
Hi Reto,
To demodulate a DQPSK signal that is shifted by (\pi/4) and obtain soft-decision values in the form of Log-Likelihood Ratios (LLRs), you need to consider the differential nature of the modulation and calculate the probabilities for each bit based on the received symbols. A sample MATLAB code for the same is as below:
function llr = dqpsk_llr(receivedSymbols, noiseVariance)
% Define DQPSK constellation points (pi/4 shifted)
refConstellation = exp(1i * (pi/4 + (0:3) * pi/2)); % pi/4 shifted QPSK
% Preallocate LLR output
numSymbols = length(receivedSymbols);
llr = zeros(numSymbols, 2); % 2 bits per symbol
% Differential demodulation
phaseDiff = angle(receivedSymbols(2:end) .* conj(receivedSymbols(1:end-1)));
% Loop over each phase difference
for k = 1:length(phaseDiff)
% Calculate Euclidean distances to each reference constellation point
distances = abs(phaseDiff(k) - angle(refConstellation)).^2;
% LLR calculation for each bit
llr(k, 1) = log((exp(-distances(1)/(2*noiseVariance)) + exp(-distances(3)/(2*noiseVariance))) / ...
(exp(-distances(2)/(2*noiseVariance)) + exp(-distances(4)/(2*noiseVariance))));
llr(k, 2) = log((exp(-distances(1)/(2*noiseVariance)) + exp(-distances(2)/(2*noiseVariance))) / ...
(exp(-distances(3)/(2*noiseVariance)) + exp(-distances(4)/(2*noiseVariance))));
end
end
The above function first performs differential demodulation, soft demapping and then calculates the LLR for the DQPSK signal. For more information on the functions used in the script, refer the following documentation links:
Hope this helps!

Community Treasure Hunt

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

Start Hunting!