📄 res_bs_powerad.m
字号:
% the power utilization figure% generates two figures% figure 1: distance vs. utilized power (per block)% figure 2: CDF of utilized power (for each OFDM frame)function [result,fileidx] = res_bs_powerad(test_resource_allocation_idx,UE,MIMO,loaddir,result,fileidx,av_factor,Comm_conf)filename = ['RA',num2str(test_resource_allocation_idx),'_UE',num2str(UE),'_FLA',num2str(Comm_conf.F_LA),'_FPA',num2str(Comm_conf.F_PA),MIMO,'_trms',num2str(Comm_conf.t_rms),'f',num2str(Comm_conf.fd),'_s',num2str(Comm_conf.state),'N',num2str(Comm_conf.N),'subN',num2str(Comm_conf.subN),'_E',num2str(Comm_conf.flg_csi_err),'c',num2str(Comm_conf.flg_offset),'D',num2str(Comm_conf.DELAY),'BO',num2str(Comm_conf.BO_dB),'HPA',num2str(Comm_conf.use_HPA_flg),'_BLER',num2str(Comm_conf.targetFER),'.mat'];load([loaddir,'/',filename],'save_bs_poweradjust','save_bs_dist');colors = {[0.5 0.5 0.5],[0 0 0],[0 0.5 1],[0 0 1],[1 0 0.5],[1 0 0]};lst = {'-','-.','-','-.','-','-.'};RAs = {'RR','PF','MX','PF2'};para.RA = RAs{test_resource_allocation_idx};UEs = [4 10];para.UE = UE;para.ra_ix = test_resource_allocation_idx;if Comm_conf.F_LA == 2 && Comm_conf.F_PA == 2, para.ra_ix = 4;endif MIMO == 2, para.ra_ix = 5;endpara.ue_ix = find(UEs == para.UE);para.nuSymbol = 6;para.subN = Comm_conf.subN;para.Tfrm = 5e-4;fileidx = fileidx + 1;%%result.ra_idx(fileidx) = test_resource_allocation_idx;%%fig_ix = 0;dist = reshape(save_bs_dist,[],1);[dist_sort,idx] = sort(dist);tmpV = save_bs_poweradjust;yy=reshape(tmpV,[],1);yy_sort = yy(idx);fig_ix = fig_ix + 1;cfigure(fig_ix);plot(average2(double(dist_sort),av_factor),10*log10(average2(double(yy_sort),av_factor)),'color',colors{fileidx},'linestyle',lst{fileidx},'linewidth',2);hold on;result.LGD{fileidx} = [para.RA,',UE',num2str(para.UE),',F',num2str(Comm_conf.F_LA),'P',num2str(Comm_conf.F_PA),',',MIMO];result.figname{fig_ix}='bs_powerad_vs_dist';xlabel('Distance in meter','FontSize',14,'fontname','times','FontWeight','b');ylabel('Utilized Power per Block in dB','FontSize',14,'fontname','times','FontWeight','b');fig_ix = fig_ix + 1;cfigure(fig_ix);yy=mean(tmpV,1);mns = sprintf('%3.2f',10*log10(mean(yy)));result.LGDmn{fileidx} = [para.RA,',UE',num2str(para.UE),',F',num2str(Comm_conf.F_LA),'P',num2str(Comm_conf.F_PA),',',MIMO,',M:',mns];handCDF = cdfplot(10*log10(double(yy)));hold on;set(handCDF,'color',colors{fileidx},'linestyle',lst{fileidx},'linewidth',2);result.figname{fig_ix}='CDF_of_bs_powerad';xlabel('Averaged Utilized Power at NB in dB','FontSize',14,'fontname','times','FontWeight','b');ylabel('CDF of Utilized Power','FontSize',14,'fontname','times','FontWeight','b');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -