1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/ZZmalpZp
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
基于Q-Learning强化学习的异构网络小区范围扩展(Cell Range Extension, CRE)技术是一种旨在优化异构无线网络性能的方法。异构网络是由不同类型的基站(如宏基站、微基站、皮基站等)组成的网络,这些基站具有不同的发射功率、覆盖范围和容量。小区范围扩展技术通过调整基站的发射功率或偏置参数,使得用户能够更均匀地分布在网络中,从而提高网络的整体性能和用户体验。
4.部分源码
.................................................................
if V_ < 0.1*diff
%Step (4) Among those sets whose received powers are equal to the pilot signal powers, UEs usually choose one set that has
%the lowest Q -value or rarely choose one set randomly to avoid local minima as ε-greedy policy [11].
user_q = [user_q,ju];
if Idiff<=length(diff1)
RSRPp_max_quantized(ju)=Qtmp(I_);
else
RSRPm_max_quantized(ju)=Qtmp(I_-length(diff1));
end
else
%Step (3) If there are no equal received powers on each UE’s Q -table, they add new received powers to their own Q -tables.
user_q = [user_q,0]; %没找到,更新q表
if Idiff<=length(diff1)
Qtmp(I_)=RSRPp_max_quantized(ju);
else
Qtmp(I_)=RSRPm_max_quantized(ju);
end
end
Qtable(:,ju)=Qtmp;
end
%Step (5) Each UE uses chosen set’s bias value as an action.
for jm=1:Macro_cell
for js=1:Small_cell
for ju=1:Users
for jsj = 1:Les
[tes,Ies] = min([abs(bias1(jsj,ju)),abs(bias2(jsj,ju))]);
if lp==1 %动作更新
action(jsj,jm,js,ju) = actions(Ies);
else
action(jsj,jm,js,ju) = action(jsj,jm,js,ju)+actions(Ies)/(1+CRE); %调整学习更新速率
end
end
end
end
end
%Step (6) Each UE compares “macro received power”with “pico received power” added by bias value,
%they try to connect to the larger one.
%Step (7) BSs allocate each UE to each RB randomly.In this article, each UE can use only one RB. strongly interfered by the MBS’s signals.
for ju=1:Users
dats = [RSRPp_max(ju)+min(bias1(:,ju)),RSRPm_max(ju)+min(bias2(:,ju))];
[Vsel,Isel] = max(dats);
RSRPsel(ju) = Vsel;
end
%Step (8) BSs calculate the number of outage UEs and pass it to UEs as a cost.
Ns = 0;
for jm=1:Macro_cell
for js=1:Small_cell
for ju=1:Users
RSRPm_ = RSRPm(ju,jm);
RSRPs_ = RSRPp(ju,js,jm);
if RSRPm_<RSRPs_%the number of outage UEs
Ns = Ns+1;
end
end
end
end
cost = Ns/(Macro_cell*Small_cell*Users);
%Step (9) Each UE reevaluates the chosen set’s Q -value at Step 4 as update based on Equation (6).
alp = 0.5;
gam = 0.9;
for ju=1:Users
idxx = randperm(Les);
k = state(idxx(1));
v = max(Qtable(k,:));
D = cost*Rew(k)+gam*v-Qtable(:,ju)-0.2;
Qtable(:,ju) = Qtable(:,ju) + alp*D;
end
%根据最后的动作action,调整CRE
for jm=1:Macro_cell
for js=1:Small_cell
for ju=1:Users
tmpss = (mean(action(:,jm,js,ju)));
CRE2(jm,js,ju) = CRE + tmpss;
end
end
end
end
...................................................................
12_052m