⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbpa mspc.asv

📁 在cdma系統中在下行做功率控制的性能分析
💻 ASV
字号:
%%  DBPA - Distance Based Power Alocation Algorithm%%%%%%%%%%%%%%%%%%%%%%
%   in this progarm mobiles are uniformally distributed within%%%%%%%%%%%
%   the cell to allow varing power for the Downlink, each mobile%%%%%%%%%
%   then transmitte according to the recevied power from base station.%%%

clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  in this cell we define the system constant envolved in calculations%%
iterations = 1;
mobiles = 10;
dmin = 200;
R = 1000;
k = 3;
n = 4;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%here the DBPA code start to measure SIR of each mobile and calculate the%
%outage persentage depending on that SIR_threshold= -14 dB%%%%%%%%%%%%%%%%

counterinit('outage_counter');
counterset('outage_counter', 0);

for i = 1:iterations;
    distance  = unidrnd (R,1,mobiles);
    
    power_initial = -73 ;  % initial power for all mobiles near to BS
    
    for j = 1:mobiles;
        
        if distance <= dmin;
            
            power (j) = k* (dmin/R)^n;
        else 
            power (j) = k* (distance (j)/R)^n ;
        end
       
        SIR_observed (j) = (10*log10 (power (j)));
        SIR_threshold= -14;
        
      
    end
    if SIR_observed < SIR_threshold
        counterinc('outage_counter');
    end
        
end

 outage_percentage = ((outage_counter (i)/mobiles)*100);
 
 plot(outage_percentage,mobiles)
 title('Outage Probability vs Number of Mobiles - Distance Based Power
 Control Algorithm')
 xlabel('Number of mobiles in cell')
 ylabel('Percentage of mobiles in outage')

%%  MSPC - Multi-Step SIR Power Control Method, Algorithm%%%%%%%%%%%%%%%%
%   in this progarm let mobiles compare SIR from base station with%%%%%%%
%   SIR threshold in order to give feedback to base station on the %%%%%%
%   state of the Downlink.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   mobiles are uniformaly distributed within the cell, and link gain%%%%
%   lognormaly distributed for each mobile,when the SIR observed is%%%%%%
%   below SIR threshold, then mobile sends an increament command to%%%%%%
%   base station and when SIR observed is above SIR threshold%%%%%%%%%%%%
%   decreament command is sent.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%using the same system parameter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
delta_P = 3;
gain = lognpdf(distance,0,6);

for i = 1:iterations;
    
    for j = 1:mobiles;
        
        SIR_observed_1 (j) = (10*log10 (power (j)));
        
        if (SIR_observed_1 < SIR_threshold);
            
             outage_1 (i) = (mean(SIR_observed_1 < SIR_threshold))*(j);
             outage_counter_1(i) = outage_counter_1(i-1) + outage_1 (i);
             SIR_increament (j) = SIR_observed_1 (j).+ delta_P;
        else 
            
            SIR_decreament (j) = SIR_observed_1 (j) .- delta_P;
        end
        
    end
    
end
outage_percentage_1 = ((outage_counter_1 (i)/mobiles)*100);

plot(outage_percentage_1,mobiles)
 title('Fixed Step Power Control Algorithm')
 xlabel('Number of Iterations')
 ylabel('Percentage of nodes in outage')        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -