資源簡介
Polar碼序列譯碼算法詳細實現過程,速度快性能好,經過實踐檢驗的
代碼片段和文件信息
function?[decOutPathMetric]??=?SCLDecoding(recvLLRA_aMMGL)
Level=MM;
Glen=2^(MM-1);
FrozenMat?=?ones(12^MM);
FrozenMat(A_a)=0;
LLRMat?=?zeros(L2^MM-1);
ChanLLR?=?recvLLR;
Dec??=zeros(L2^MM);
PartialMat?=zeros(L2^(MM-1));
P0=1:L;
P?=?repmat(P0‘1MM+1);
PathMetric?=?127*50*ones(1L);
PathMetric(1)=0;
RouteBit?=?zeros(12*L);
TempMetric?=?zeros(12*L);
cnt=0;
for?cIndx=1:2^MM
????bin=de2bi(cIndx-1MM);
????if?cIndx>Glen
????????tLen?=?cIndx-Glen;
????else
????????tLen=cIndx;
????end
????
????while?Level~=0
????????indicateSignal?=?bin(Level);
????????if?Level==MM
????????????for?ii=1:2^(Level-1)
????????????????LLtoSort1?=?ChanLLR(ii)*ones(L1);
????????????????LLtoSort2?=?ChanLLR(ii+2^(Level-1))*ones(L1);
????????????????if?indicateSignal==0
????????????????????LLRMat(:2^(Level-1)+ii-1)=sign(LLtoSort1.*LLtoSort2).*min(abs(LLtoSort1)abs(LLtoSort2));
????????????????else
????????????????????bas?=?basedBit(:ii);
????????????????????LLRMat(:2^(Level-1)+ii-1)=LLtoSort1.*(-1).^bas+LLtoSort2;
????????????????end
????????????end
????????else
????????????for?ii=1:2^(Level-1)
????????????????LLtoSort1?=?LLRMat(P(:Level+1)2^Level-1+ii);
????????????????LLtoSort2?=?LLRMat(P(:Level+1)2^Level-1+ii+2^(Level-1));
??????????
評論
共有 條評論