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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章