Code covered by the BSD License  

Highlights from
Capacity Maximization in Multiuser OFDMA system

image thumbnail

Capacity Maximization in Multiuser OFDMA system

by

 

The complete project of OFDMA system. It tries to maximize the network capacity.

Paper_Graph.m
% People can use the results and the codes freely if they refer to this job.
% To download the report of this job please check the following link:
% http://ens.ewi.tudelft.nl/~ramezani/Errata01.pdf
% These Matlab codes are provided by Hamid Ramezani. 
% Ver01 - 08-Dec-2011
%% Graph in each run 
if ifDo.ShowGraphInEachRun
    switch graph.OneRun.Stt
        case 0
            % do nothing
        case 1
            figure(1);
            subplot(2,1,1)
            % Iteration
            plot(capacityIteration(1:cnt),'b--')            
            hold on
            plot([1 cnt],[analyze.ECSIEqPowCapacityWithPdataMMSE analyze.ECSIEqPowCapacityWithPdataMMSE],'r')
            hold off
            xlabel('Iteration number')
            ylabel('Capacity b/s/Hz')
            title('a) Iterative algorithm for ASNR=6dB')
            legend('ECSI Opt','ECSI Eq Pow')
            xlim([1,10])
            
            subplot(2,1,2)
            plot(g)
            hold on
            plot([1 length(g)],0.99999*mean(g)*[1 1],'r')
            plot([1 length(g)],1.00001*mean(g)*[1 1],'r')
            title('b) lamba for each data subchannel')
            hold off
            
            figure(2)
            subplot(2,1,1)
            bar(1:ofdm.Ns,Pdata)
            hold on
            bar(1:ofdm.Ns,Pdata*chan.Est.SigmaMMSE,'r');
            hold off
            title('a) Amount of allocated power')
            ylabel('')
            legend('Power Allocated','Estimation Noise')
            
            subplot(2,1,2)
            bar(1:ofdm.Ns,noise.sigma./abs(chan.SelSubchan).^2,'g')
            hold on
            plot(noise.sigma./abs(max(chan.Hdata.')).^2,'m');
            hold off
            title('b) 1/CNR defiened as sigma^2/|H|^2')
            title(' 1/ Channel to noise ration')
            legend('ECSI','FCSI')
    end
end
%% Graph for loop
switch graph.Loop.Stt
    case 0
        % do nothing
    case 1
        switch simulate.Stt
            case 0 % 0 : just run the simulation for a single time
                % do nothing
            case 1 % 1 : sweep over percentage of power between data and pilots
                figure(5)
                plot(loop.Vector,mean(loop.Out1),'-.b');
                hold on
                plot(loop.Vector,mean(loop.Out2),'.r');
                plot(loop.Vector,mean(loop.Out3),'-k');
                %hold off
                grid on            
                xlabel('Percentage of allocated power to data')
                ylabel('Capacity b/s/Hz')
                legend('FCSI','ECSI Eq','ECSI Opt')
            case 2 % 2 : sweep over Average SNR , defined as Ptotal/(N0*B)
                figure(5)
                plot(loop.Vector,mean(loop.Out1),'>-b');
                hold on
                plot(loop.Vector,mean(loop.Out2),'o-r');
                plot(loop.Vector,mean(loop.Out3),'s-k');
                hold off
                grid on            
                xlabel('Average Signal to Noise Ration Pt/(N0*B)')
                ylabel('Capacity b/s/Hz')
                legend('FCSI','ECSI Eq','ECSI Opt')                
        end
end

Contact us