필터 지우기
필터 지우기

log likelihood ratio to probability measure

조회 수: 7 (최근 30일)
xplore29
xplore29 2013년 5월 19일
For BPSK, one can theoretically move back and forth between log-likelihood ratio and probabilities by using following expressions
P(0) = 1/(1+exp(L)),P(1)=exp(L)/(1+exp(L)).
But in simulations if 'L' gets really large the above expression for P(1) returns NaN. Theory suggests that if L>>1, then P(1)-->1. I tried different values of L for which P(1) changes and found out that any value of L<-10 gives P(0)=1 and L>10 gives P(1)=1. I wrote the following two codes to compute P(0) and P(1)
%-----------------------Code-A--------------------------------- [row col] = size(LLR) for i=1:row for j=1:col
if LLR(i,j)==+inf
Probability(i,j) = 1;
else
Probability(i,j) = exp(LLR(i,j))/(1+exp(LLR(i,j)));
end
end
end
%-----------------------Code-B---------------------------------
for i=1:row
for j=1:col
if LLR(i,j)>10
Probability(i,j) = 1;
end
if LLR(i,j)<-10
Probability(i,j) = -1;
end
if (LLR(i,j)<10)&&(LLR(i,j)>-10)
Probability(i,j) = exp(LLR(i,j))/(1+exp(LLR(i,j)));
end
end
end
%--------------------------------------------------------------
for the same LLR matrix, with Code-A I get all real values in Probability matrix while with Code-B results in complex values.
I ll appreciate any suggestions in this regard.

답변 (1개)

Tom Lane
Tom Lane 2013년 5월 20일
For large L, you might consider changing
P(1)=exp(L)/(1+exp(L))
to
P(1)=1/(1+exp(-L))

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by