✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
为了满足未来网络中超高速率,大吞吐量,超高可靠性,超低延时等指标,新兴通信网络将越来越向着异构化,超密集化,多元化方向发展,这也导致这网络系统内部的干扰也会变得多层次,复杂化,强烈的内部干扰与资源的碰撞等问题将极大的限制着系统的容量以及服务质量,所以对于这些新兴的通信网络急需合理的资源调度策略,有效而且完善的资源调度策略.可以减少任务的执行时间和费用,改善服务质量,增加整个网络系统的吞吐量,提高整体资源利用率.
⛄ 部分代码
end
for i=1:num_ue
[angle_min(i),sector]=min(angle(:,i));
end
distance.sector_antenna_gain=antenna.gain(angle_min);
%% 计算路径损耗
UE.distance=sqrt((LTEconfig.UE.Position_X-LTEconfig.BS.Position_X).^2+(LTEconfig.UE.Position_Y-LTEconfig.BS.Position_Y).^2);
UE.pathloss= LTE_pathloss_enb_to_ue(UE.distance);%num_ue*1
%% 计算信号和噪声
LTEconfig.UE.receiver_noise_figure = 9; % Receiver noise figure in dB
thermal_noise_W=10^(LTEconfig.UE.thermal_noise_density/10) / 1000 * LTEconfig.System.Bandwidth* 10^(LTEconfig.UE.receiver_noise_figure/10);%系统中的热噪声
UE.signal=10.^((distance.sector_antenna_gain'-UE.pathloss)/10);
UE.noise=thermal_noise_W+ LTEconfig.ue_interference_enbs;
UE.signal_db=10*log10(UE.signal);
UE.noise_db=10*log10(UE.noise);
%% 产生随时间变化的小尺度衰落信道
SimType=8; % 设置仿真类型
ltepar=lteparset(SimType,num_ue); % 配置仿真参数
ltepar.nUE=num_ue; %用户数目
ltepar.Ntot=4; %占有子载波数
ltepar.Bandwidth=625e3; %系统带宽
ltepar.Nfft=512; %FFT点数
ltepar.Fs=7.68e6; %采样频率
h=cell(1,ltepar.nUE,num_subframe);
sc_signal=cell(1,ltepar.nUE);%%元细胞数组
sc_noise=cell(1,ltepar.nUE);%%元细胞数组
sc_snr_TTI_dB=zeros(ltepar.Ntot,ltepar.nUE,num_subframe);
subframe_i=1;
while subframe_i<=num_subframe
chan=cell(1,ltepar.nUE);
for k=1:ltepar.nUE
[chan{k}, h{1,k,subframe_i}]=channelmodel(ltepar.ChanModPar.PDP_dB,ltepar.Fs,ltepar.CarrierFrequency,...
ltepar.UEpar.speed,ltepar.ChanModPar.FadeType,ltepar.ChanModPar.CorrType,ltepar.ChanModPar.M,ltepar.psi(:,:,:,:,k),ltepar.theta(:,:,:,:,k),...
ltepar.phi(:,:,:,:,k),subframe_i*1e-3,ltepar.UEpar.nTX,ltepar.BSpar.nRX,ltepar.ChanModPar.TxCorrMatrix,ltepar.ChanModPar.RxCorrMatrix);
sc_signal{1,k}=calculate_SC_REC(h{1,k,subframe_i},UE.signal_db(k));
sc_noise{1,k}=calculate_SC_REC(h{1,k,subframe_i},UE.noise_db(k));
sc_signal_TTI(:,k,subframe_i)=sc_signal{1,k};
sc_noise_TTI(:,k,subframe_i)=sc_noise{1,k};
end
subframe_i=subframe_i+1;
end
%% 初始化部分参数
flag=0;
for ss=1:1:300
p_max(ss)=0.05*ss+0;%组内分配功率
EE=3000*ones(1,5);%能效初始化
m1=0.003;%迭代步长
m2=0.05;%迭代步长
p=zeros(1,J);%组内用户功率
r=zeros(1,J);%组内用户容量
num_iter=3500;%%迭代次数
% num_iter=7500;%%迭代次数
p_ue=zeros(num_iter,J);
p_signal=zeros(1,J);%信号功率
p_noise=zeros(1,J);%噪声功率
%% 单用户载波间功率分配因子计算
for jj=1:1:J
a11=sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(1,jj,:))/(sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(2,jj,:))+sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(1,jj,:)));
a12=sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(2,jj,:))/(sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(2,jj,:))+sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(1,jj,:)));
a21=sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(1,jj,:))/(sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(3,jj,:))+sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(1,jj,:)));
a22=sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(3,jj,:))/(sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(3,jj,:))+sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(1,jj,:)));
a31=sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(1,jj,:))/(sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(4,jj,:))+sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(1,jj,:)));
a32=sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(4,jj,:))/(sum(sc_signal_TTI(1,jj,:))*sum(sc_noise_TTI(4,jj,:))+sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(1,jj,:)));
a41=sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(2,jj,:))/(sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(3,jj,:))+sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(2,jj,:)));
a42=sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(3,jj,:))/(sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(3,jj,:))+sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(2,jj,:)));
a51=sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(2,jj,:))/(sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(4,jj,:))+sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(2,jj,:)));
a52=sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(4,jj,:))/(sum(sc_signal_TTI(2,jj,:))*sum(sc_noise_TTI(4,jj,:))+sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(2,jj,:)));
a61=sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(3,jj,:))/(sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(4,jj,:))+sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(3,jj,:)));
a62=sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(4,jj,:))/(sum(sc_signal_TTI(3,jj,:))*sum(sc_noise_TTI(4,jj,:))+sum(sc_signal_TTI(4,jj,:))*sum(sc_noise_TTI(3,jj,:)));
%% 4个载波6个用户按照预先的准则进行映射
switch jj
case 1
p_signal(jj)=a11*sum(sc_signal_TTI(1,jj,:))+a12*sum(sc_signal_TTI(2,jj,:));%%载波1和2 这个算的是增益,sc_signal_TTI就是指载波传输中的增益,因为算容量所以不需要真值2
p_noise(jj)=sum(sc_noise_TTI(1,jj,:))+sum(sc_noise_TTI(2,jj,:));%%载波1和2
case 2
p_signal(jj)=a21*sum(sc_signal_TTI(1,jj,:))+a22*sum(sc_signal_TTI(3,jj,:));%%载波1和3
p_noise(jj)=sum(sc_noise_TTI(1,jj,:))+sum(sc_noise_TTI(3,jj,:));%%载波1和3
case 3
p_signal(jj)=a31*sum(sc_signal_TTI(1,jj,:))+a32*sum(sc_signal_TTI(4,jj,:));%%载波1和4
p_noise(jj)=sum(sc_noise_TTI(1,jj,:))+sum(sc_noise_TTI(4,jj,:));%%载波1和4
case 4
p_signal(jj)=a41*sum(sc_signal_TTI(2,jj,:))+a42*sum(sc_signal_TTI(3,jj,:));%%载波2和3
p_noise(jj)=sum(sc_noise_TTI(2,jj,:))+sum(sc_noise_TTI(3,jj,:));%%载波2和3
case 5
p_signal(jj)=a51*sum(sc_signal_TTI(2,jj,:))+a52*sum(sc_signal_TTI(4,jj,:));%%载波2和4
p_noise(jj)=sum(sc_noise_TTI(2,jj,:))+sum(sc_noise_TTI(4,jj,:));%%载波2和4
otherwise
p_signal(j
⛄ 运行结果
⛄ 参考文献
[1] 陈明. 未来通信网络中基于机器学习的自适应资源调度算法设计与实现[D]. 北京邮电大学, 2018.
[2] 叶青. 非正交多址无线资源分配研究[D]. 重庆邮电大学, 2018.
[3] 郑重, 何锋, 李浩若,等. 基于贪婪随机自适应搜索法的TTE通信调度算法[J]. 北京航空航天大学学报, 2021.
[4] 杨洁琛. LTE系统的资源调度算法仿真与软件无线电平台实现[D]. 西南交通大学, 2014.
[5] 廖逍, 李宽荣, 白景坡,等. 5G无人机异构网络应急通信全覆盖算法设计与系统开发[J]. 微型电脑应用, 2023, 39(1):3.