Contents
Mutual information and outage probability for Media-Based constellation
calculates mutual information and probability of outage for Media-Based constellation in Rayleigh fading channel + AWGN for a single recieve antenna
clc
clear all
Set input parameters
nPoints = 64; % Number of points in the constellation R = [3]; % Outage probabilities are calculated at rates specified by array R SNRdB = (4.5:0.25:6) + 4.77; % Signal to Noise Ratio(dB) at which the mutual information is calculated SNR = 10 .^ (SNRdB/10); % Signal to Noise Ratio at which the mutual information is calculated Es = 1; % Transmit power equal to unity N0 = Es ./ SNR; % White Gaussian noise spectral density nSim = 1e3; % number of realization of constellations to average mutual information
% generates N i.i.d complex Gaussian r.v. with mean 0 and unit variance
generate_constellation = @(N) sqrt(0.5) * (randn(N, 1) + 1i* randn(N, 1));
Generate different realization of constellations and calculate MI for each realization
nSNR = numel(SNR); I = zeros(nSNR, nSim); for iSNR = 1 : nSNR parfor iSim = 1 : nSim if(~mod(iSim, 1e3)) iSim iSNR end % Generate a realization of a Media-Based constellation with N points C = generate_constellation(nPoints); %%Computing mutual information I(iSNR, iSim) = compute_mutual_info(C, N0(iSNR)); end end
Calculate probability of outage
nR = numel(R); pOutage = zeros(nSNR, nR); for ir = 1 : nR % measure percentage of constellations falling below required rate pOutage(:, ir) = sum((I < R(ir)), 2); end pOutage = pOutage / nSim;
Save ouput avriables
%save('.\mat\mbm_MI_pOutage_siso_256points', 'I', 'SNRdB', 'pOutage')