LTE-TDD measurement gaps位置计算--Python代码实现

1.measurement gaps 规范的定义如下:

If the UE requires measurement gaps to identify and measure inter-frequency and/or inter-RAT cells and the UE does not support perServingCellMeasurementGap-r14 or is not configured with per serving cell measurement gaps, in order for the requirements in the following subsections to apply the E-UTRAN must provide a single measurement gap pattern with constant gap duration for concurrent monitoring of all frequency layers and RATs. If the UE requires measurement gaps to identify and measure inter-frequency and/or inter-RAT cells and the UE supports perServingCellMeasurementGap-r14 and is configured with per serving cell measurement gaps, in order for the requirements in the following subsections to apply the E-UTRAN must provide gap pattern(s) on at least each serving component carrier (per-CC) where the UE has indicated in the perCC-ListGapIndication IE that gaps are required. No gap pattern is required to be provided on the serving component carrier where UE has indicated in the the perCC-ListGapIndication IE that gaps are not required. The requirements apply if the gap on each serving cell is at least that which the UE has indicated with gapIndication in the perCC-ListGapIndication IE, and if the gapOffset, MGRP and MGL are the same for each serving component carrier.During the measurement gaps the UE:
During the measurement gaps the UE:
- shall not transmit any data
- is not expected to tune its receiver on any of the E-UTRAN carrier frequencies of PCell and any SCell.
- is not expected to tune its receiver on any of the E-UTRAN carrier frequencies of PCell, PSCell, and SCell.
If the UE supporting dual connectivity is configured with PSCell, during the total interruption time as shown in Figure 8.1.2.1-1, the UE shall not transmit and receive any data in SCG.
In the uplink subframe occurring immediately after the measurement gap,
- if the following conditions are met then it is up to UE implementation whether or not the UE can transmit data:
- all the serving cells belong to E-UTRAN TDD;
- if the subframe occurring immediately before the measurement gap is an uplink subframe.
- Otherwise the UE shall not transmit any data.
In determining the above UE behaviour in the uplink subframe occurring immediately after the measurement gap the UE shall treat a special subframe as an uplink subframe if the special subframe occurs immediately before the measurement gap, Inter-frequency and inter-RAT measurement requirements within this clause rely on the UE being configured with one measurement gap pattern unless the UE has signaled that it is capable according to the capability interFreqNeedForGaps or interRATNeedForGaps of conducting such measurements without gaps and without interruption. UEs shall only support those measurement gap patterns listed in Table 8.1.2.1-1 and table 8.1.2.1.-2 that are relevant to its measurement capabilities. UEs supporting network controlled small gap and which have signaled that they are capable of measurements without gap but requiring NCSG, can be configured with a network controlled small gap pattern in table 8.1.2.1.3-1 on all component carrier(s) to perform inter-frequency and inter-RAT measurement.
这里写图片描述

2.我们从协议中可以知道3件事情

  1. 在measurement gaps的时间内,FDD/TDD均不能接收和传输任何数据
  2. 在measurement gap之后的上行子帧,FDD中是不能用于数据传输的。TDD中,如果GAP之前的子帧是下行子帧,那么measurement gap之后的上行子帧,也是不能用于数据传输的;
  3. 有2种GAP PATTERN;

3.关于measurement gaps中的参数解释(Table 8.1.2.1-1)

  • MGL : measurement gaps的长度。两种模式下都是6ms;
  • MGRP : measurement gaps的重复周期,分别是40ms和80ms;
  • Tinter1 : 在Table 8.1.2.1-1中,指的是在两种gap模式下,每480ms中至少要能用于异频/异RAT的测量时间分别为60ms,以及30ms;
  • 关于6ms协议的定义的理解:2种测量GAP都定义为6ms,原因是必须和测量的目标小区同步上才能进行有效的测量,而这测量需要的时间,大约为6ms;

4.测量GAP周期的配置和计算

  • 当UE需要进行异频测量时,eNB的RRC层需要给UE配置GAP参数:gap模式和gapOffset。这两个参数包含在RRCConnectionReconfiguration消息的MeasConfig字段的measGapConfig信元中,如下图所示:

    引用块内容

  • gap模式分为gp0和gp1两种,gp0模式的GAP周期是40ms,gp1模式的GAP周期是80ms。无论是哪种模式,每次GAP的持续时间都是6ms。gapOffset参数会影响GAP的起始时刻,gp0模式下gapOffset的范围是0-39,gp1模式下gapOffset的范围是0-79。有了GAP周期和gapOffset两个值,就可以计算出具体的GAP时刻,如下图所示:

引用块内容

  • 例如:RRC配置的GAP模式是gp0,gapOffset=1。实现代码如下:
#coding:utf-8
#author:luohao

import math
from operator import mod

import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.path import Path
"""
ceil():向上取整
floor():向下取整
"""

fig = plt.figure(figsize=(16, 9))
axes = fig.add_subplot(1, 1, 1, frameon=False)

# fig = plt.figure(figsize=(15, 15))
# axes.set_xlim(0,10)
# axes.set_ylim(0,10)

plt.title("GAP 0, gapoffset=1")
plt.xlabel("subframe")
plt.ylabel("SFN")

axes.set_xticks([x for x in range(10)])
axes.set_yticks([x for x in range(10)])
axes.grid(True)

SFN = math.floor(1/10)
subframe = mod(1, 10)

verts = [
    (SFN + 1, subframe),
    (1., 2.),
    (7., 2.),
    (7., 1.),
    (1., 1.),
    ]

codes = [Path.MOVETO,
         Path.LINETO,
         Path.LINETO,
         Path.LINETO,
         Path.CLOSEPOLY,
         ]

path = Path(verts, codes)

verts1 = [
    (1., 5.),
    (1., 6.),
    (7., 6.),
    (7., 5.),
    (1., 5.),
    ]

codes1 = [Path.MOVETO,
         Path.LINETO,
         Path.LINETO,
         Path.LINETO,
         Path.CLOSEPOLY,
         ]

path1 = Path(verts1, codes1)
patch1 = patches.PathPatch(path1, facecolor='coral')
axes.add_patch(patch1)

patch = patches.PathPatch(path, facecolor='coral')
axes.add_patch(patch)
for i in range(6):
    plt.text(1.5 + i, 1.5, "GAP")

for i in range(6):
    plt.text(1.5 + i, 5.5, "GAP")

plt.show()
  • 输出结果,如下图所示:

引用块内容

5.参考文献

  1. 3GPP TS 36.133 9/29/2017 UE Measurements Procedures in RRC_CONNECTED State
  2. 3GPP TS 36.331 9/29/2017 Measurements
  3. http://blog.csdn.net/m_052148/article/details/51254599
  4. http://www.360doc.com/content/17/0116/19/1014159_622890672.shtml
  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值