Code covered by the BSD License  

Highlights from
EXIT chart computation

  • EXITComputes the A priori Mutual Information assuming a Gaussian distribution
  • View all files
image thumbnail

EXIT chart computation

by

 

26 Aug 2009 (Updated )

Matlab class implementing several methods for the computation of EXIT charts.

EXIT
% Computes the A priori Mutual Information assuming a Gaussian distribution
%of the a priori information and the Extrinsic Mutual Information between 
%the emitted bits and their extrinsic information
%
% Description:
% - the a priori mutual information is computed using relation (14)
% - the extrinsic mutual information is computed by estimating first the 
%conditional Probability Density Functions (PDF), given the emitted bits, 
%and then numerically integrating according to relation (19)
%
% Reference: 
% Stephan ten Brink, ''Convergence behavior of iteratively decoded parallel
% concatenated codes,`` IEEE Transactions on Communications, oct. 2001 
%
% Usage example:
% exit = EXIT;%EXIT chart object
% set ( exit, 'sigma2A', sigma2A(en) );%set the variance of the a priori mutual information (sigma2A)
% apriori_mutual_info = exit.apriori_mutual_info ();%generate a priori mutual info
% [extrinsic_coded extrinsic_data] = C_SISOrsc ( Li, exit.generate_apriori_info ( bits ), bin_gen, 0, map_metric );%MAP algorithm implementation (the EXIT object is used to generate a priori info)
% extrinsic_mutual_info = exit.extrinsic_mutual_info ( extrinsic_data, bits );%compute extrinsic mutual information
% plot ( apriori_mutual_info, extrinsic_mutual_info )%plot transfer characteristic (a second extrinsic mutual info is needed in order to obtain the EXIT chart)

classdef EXIT < hgsetget
    properties
        sigma2A = 0;
        integration_interval_limit = 100;
        subinterval_nb = 100;
    end
    methods
        %Sets the variance of the a priori information
        %Call syntax: set ( exit, 'sigma2A', sigma2A(en) );
        function obj = set.sigma2A ( obj, in_sigma2A )
            obj.sigma2A = in_sigma2A;
        end
        %Sets the integration interval limit for mutual a apriori info
        function obj = set.integration_interval_limit ( obj, in_lim )
            obj.integration_interval_limit = in_lim;
        end
        %Sets the number of subintervals used for pdf estimation
        function obj = set.subinterval_nb ( obj, in_subint )
            obj.subinterval_nb = in_subint;
        end
        % Computes a priori information using the Gaussian approximation
        function IA = apriori_mutual_info ( obj )            
            IA = 1 - quad ( @obj.gaussian_fct, ...
                -obj.integration_interval_limit, ...
                obj.integration_interval_limit );
        end
        % Generates a priori information assuming a Gaussian distribution
        %of the a priori information. The BPSK mapping is done as follows:
        %0 -> +1 and 1 -> -1
        % The input is bits - a vector of zeros and ones
        function out = generate_apriori_info ( obj, bits )
            out = (obj.sigma2A/2)*(2*bits-1)+...
                sqrt(obj.sigma2A)*randn(1, length(bits));
        end
        % Computes the extrinsic mutual information
        % The inputs are: obs - extrinsic information obtained from the
        %SISO module output
        %                 cond - emitted bits corresponding to the
        %extrinsic information
        function IE = extrinsic_mutual_info ( obj, obs, cond )
            %compute endges for histogram computation
            min_obs = min ( obs );
            max_obs = max ( obs );
            edges = min_obs:((max_obs-min_obs)/obj.subinterval_nb):max_obs;
            
            %conditional PDF knowing that a bit of 0 was emitted
            cond_obs = obs(cond == 0);
            nb_values_subinterval = histc ( cond_obs, edges );%count values
            left_pdf = nb_values_subinterval(1:(end-1))./ ...
                length(cond_obs);%the pdf is computed without taking into
            %account the subinterval length (step)
            left_int = find ( left_pdf ~= 0 );%integration interval for the left PDF          
            
            %conditional PDF knowing that a bit of 1 was emitted
            cond_obs = obs(cond == 1);
            nb_values_subinterval = histc ( cond_obs, edges );%count values
            right_pdf = nb_values_subinterval(1:(end-1))./ ...
                length(cond_obs);
            right_int = find ( right_pdf ~= 0 );%integration interval for the right PDF          
            
            %mutual extrinsic information
            left_half = left_pdf(left_int).*log2(2.0*left_pdf(left_int)./ ...
                (left_pdf(left_int)+right_pdf(left_int)));
            right_half = right_pdf(right_int).*log2(2.0*right_pdf(right_int)./ ...
                (left_pdf(right_int)+right_pdf(right_int)));
            %numerical integration without taking into account the interval
            %length (see conditional PDF computation)
            IE = 0;
            if ~isempty ( left_half )
                IE = IE + 0.5*(sum(left_half)-0.5*(left_half(1)+left_half(end)));
            end
            if ~isempty ( right_half )
                IE = IE + 0.5*(sum(right_half)-0.5*(right_half(1)+right_half(end)));
            end
        end
        %Gaussian function used to generate the a priori information
        function y = gaussian_fct ( obj, x )
            y = (1/sqrt(obj.sigma2A*2*pi))* ...
                exp(-((x-(obj.sigma2A/2.0)).^2)/(2.0*obj.sigma2A)).* ...
                log2(1+exp(-x));
        end
    end
end

Contact us