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:
- angle - https://www.mathworks.com/help/matlab/ref/angle.html
- Phase modulation examples - https://www.mathworks.com/help/comm/ug/phase-modulation-examples.html
Hope this helps!
