动态TDD技术

动态TDD

function  [] = TDD_reconfig(TTI_index,Macro_eff_RE_per_subband_D, Macro_eff_RE_per_subband_S,...
TDD_reconfig_period,Macro_eff_RE_per_subband_U, total_Macro_num, total_Pico_num, enable_Macro_flag, ...
enable_dynamic_TDD, pico_group_index);

global total_Macro;
global total_Pico;
global total_UE;
global term_DL_throughput; 
global term_UL_throughput; 

DL_transported = 0; 
UL_transported = 0;
% 1: DL;    0: Speical subframe;    -1: UL
TDD_mode = [
1 0 -1 -1 -1  1 0 -1 -1 -1;
1 0 -1 -1  1  1 0 -1 -1  1;
1 0 -1  1  1  1 0 -1  1  1;
1 0 -1 -1 -1  1 1  1  1  1;
1 0 -1 -1  1  1 1  1  1  1;
1 0 -1  1  1  1 1  1  1  1;
1 0 -1 -1 -1  1 0 -1 -1  1];%7??10????....??????

DL_UL_ratio = [
(Macro_eff_RE_per_subband_D.*2+Macro_eff_RE_per_subband_S.*2)./(Macro_eff_RE_per_subband_U.*6);
(Macro_eff_RE_per_subband_D.*4+Macro_eff_RE_per_subband_S.*2)./(Macro_eff_RE_per_subband_U.*4);
(Macro_eff_RE_per_subband_D.*6+Macro_eff_RE_per_subband_S.*2)./(Macro_eff_RE_per_subband_U.*2);
(Macro_eff_RE_per_subband_D.*6+Macro_eff_RE_per_subband_S.*1)./(Macro_eff_RE_per_subband_U.*3);
(Macro_eff_RE_per_subband_D.*7+Macro_eff_RE_per_subband_S.*1)./(Macro_eff_RE_per_subband_U.*2);
(Macro_eff_RE_per_subband_D.*8+Macro_eff_RE_per_subband_S.*1)./(Macro_eff_RE_per_subband_U.*1);
(Macro_eff_RE_per_subband_D.*3+Macro_eff_RE_per_subband_S.*2)./(Macro_eff_RE_per_subband_U.*5)];%??????????

if enable_Macro_flag==1
	for Macro_index=1:total_Macro_num
		total_Macro.Macro(Macro_index).TDD_mode = TDD_mode(2,:);%Macro????????????
	end
end

if total_Pico_num>0
     %----------------fixed TDD ,algorithm 0---------------
	if enable_dynamic_TDD==0
		for Pico_index=1:total_Pico_num
			total_Pico.Pico(Pico_index).TDD_mode = TDD_mode(2,:);
        end
     %----------------dynamic TDD ,algorithm 1 ,without pico grouping---------------
	elseif enable_dynamic_TDD==1
		for Pico_index=1:total_Pico_num
			DL_traffic = 0;			
			buf_pkt_num = total_Pico.Pico(Pico_index).DL_buffer.pkt_num;%??????  ????????
			if buf_pkt_num>0
				for n=1:buf_pkt_num
					finished_flag = total_Pico.Pico(Pico_index).DL_buffer.pkt_info(n).finished_flag;
					buf_pkt_size  = total_Pico.Pico(Pico_index).DL_buffer.pkt_info(n).buf_pkt_size;
					if (finished_flag==1) && (buf_pkt_size>0)
						error('wrong DL buffer packet size');
					end
					DL_traffic = DL_traffic + buf_pkt_size;
				end
			end
			DL_HARQ_num = total_Pico.Pico(Pico_index).DL_HARQ_num;
			if DL_HARQ_num>0
				for n=1:DL_HARQ_num
					HARQ_thr = total_Pico.Pico(Pico_index).DL_HARQ_info(n).HARQ_thr;
					if HARQ_thr<1e-6
						error('wrong DL HARQ packet size');
					end
					DL_traffic = DL_traffic + HARQ_thr;
				end
			end
			
			UL_traffic = 0;			
			buf_pkt_num = total_Pico.Pico(Pico_index).UL_buffer.pkt_num;
			if buf_pkt_num>0
				for n=1:buf_pkt_num
					finished_flag = total_Pico.Pico(Pico_index).UL_buffer.pkt_info(n).finished_flag;
					buf_pkt_size  = total_Pico.Pico(Pico_index).UL_buffer.pkt_info(n).buf_pkt_size;
					if (finished_flag==1) && (buf_pkt_size>0)
						error('wrong UL buffer packet size');
					end
					UL_traffic = UL_traffic + buf_pkt_size;
				end
			end
			UL_HARQ_num = total_Pico.Pico(Pico_index).UL_HARQ_num;
			if UL_HARQ_num>0
				for n=1:UL_HARQ_num
					HARQ_thr = total_Pico.Pico(Pico_index).UL_HARQ_info(n).HARQ_thr;
					if HARQ_thr<1e-6
						error('wrong UL HARQ packet size');
					end
					UL_traffic = UL_traffic + HARQ_thr;
				end
            end
			
            if DL_traffic==0
                TDD_mode_index = 1;
            elseif UL_traffic==0
                TDD_mode_index = 6;
            else
                traffic_DL_UL_ratio = DL_traffic./UL_traffic;
                diff = abs(DL_UL_ratio - traffic_DL_UL_ratio);
                [t1, TDD_mode_index] = min(diff);
            end
			
			total_Pico.Pico(Pico_index).TDD_mode = TDD_mode(TDD_mode_index, :);
        end
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值