image thumbnail

Channel Noise Estimation Using Particle based Belief Propagation for LDPC decoding in AWGN and BSC

by

 

Channel Noise Estimation Using Particle based Belief Propagation for LDPC decoding in AWGN and BSC

getPriorDistributionParams(inputChannelNoise, channelType_java)
% Authors:
% 
% Shuang Wang, Lijuan Cui and Samuel Cheng
% 
% Copyright:
% 
% Copyright ? 2007-2011 Shuang Wang
% 
% Questions:
% 
% For any questions, please contact me by shuangwang AT ou dot edu
%
% reference
%  L. Cui, S. Wang, S. Cheng, M. Yeary, "Adaptive Binary Slepian-Wolf Decoding using Particle Based Belief Propagation", Communications, IEEE Transactions on, to appear.
%  S. Wang, L. Cui, S. Cheng, Y. Zhai, M. Yeary, Q. Wu, "Noise Adaptive LDPC Decoding Using Particle Filtering," Communications, IEEE Transactions on, Vol 59. pp. 913 - 916, April 2011.
%
function [priorDistributionParams_java, messageFromPrior_java] = getPriorDistributionParams(inputChannelNoise, channelType_java)
    epLength = numel(inputChannelNoise);
    if(channelType_java == javabpformatlab.ChannelType.AWGN)
        priorDistributionType = javapbpformatlab.PriorDistributionType.invGammaDistribution;           
        a_0 = ones(epLength, 1);
        b_0 = (a_0 + 1) .* inputChannelNoise; % match mode;
        messageFromPrior_java = invgampdf(inputChannelNoise, a_0, b_0);
    elseif(channelType_java == javabpformatlab.ChannelType.BSC)
        priorDistributionType = javapbpformatlab.PriorDistributionType.betaDistribution;        
        a_0 = ones(epLength, 1)*2; % for time-varying use small e.g 2; for constant use large e.g. 10.
%         obj.b_0 = (obj.a_0 - 1) ./ obj.initialCrossOverProbabilityArray + 2 - obj.a_0; % match mode
        b_0 = (a_0) ./ inputChannelNoise - a_0; % match mean
        messageFromPrior_java = betapdf(inputChannelNoise, a_0, b_0);
    end
    
    priorDistributionParams_java = javapbpformatlab.PriorDistributionParams(a_0, b_0, priorDistributionType);
end

Contact us