%%
% 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
disp(counterval('outage_counter'));
end
outage_percentage = ((counterval('outage_counter')/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')
CDMA-powercontrol.rar_power allocation_power allocation_功率分配MAT
版权申诉
21 浏览量
2022-07-15
03:31:13
上传
评论
收藏 7KB RAR 举报
御道御小黑
- 粉丝: 61
- 资源: 1万+
最新资源
- 电力场景设备漏油检测数据集VOC+YOLO格式338张1类别.7z
- 基于yolov8+pyqt5实现精美界面支持图片视频和摄像检测源码.zip
- 用C语言为母亲节献上一份特别的祝福.zip
- LCD1602液晶显示屏的深入探索与实用指南.zip
- 基于Matlab人脸肤色定理的教师人数统计+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab霍夫曼变换的表盘读数识别+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab火灾烟雾检测源码带GUI界面+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的恶劣天气交通标志识别系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB的霍夫曼变换的表盘示数识别+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的车道线识别系统 +源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈