1.SSB学习
NR将PSS,SSS和PBCH组合起来定义为一个同步块(Synchronization Signal/PBCH Block,SSB),波束扫描以SSB为单位进行.
1.1.SSB相对时频位置
摘自协议TS38.211-7.4.3.1
Table 7.4.3.1-1: Resources within an SS/PBCH block for PSS, SSS, PBCH, and DM-RS for PBCH.
Channel or signal OFDM symbol number
relative to the start of an SS/PBCH block Subcarrier number
relative to the start of an SS/PBCH block
PSS 0 56, 57, …, 182
SSS 2 56, 57, …, 182
Set to 0 0 0, 1, …, 55, 183, 184, …, 239
2 48, 49, …, 55, 183, 184, …, 191
PBCH 1, 3 0, 1, …, 239
2 0, 1, …, 47,
192, 193, …, 239
DM-RS for PBCH 1, 3
2
若想计算整个NR载波的起点和带宽,可以按照该步骤:
a),首先要确定Point A的位置 (Point A其实是一个参考点的位置,NR里面很多位置信息的计算是以到Point A的距离来定义的)。Point A= SSB中心频点 - 10RB - Kssb – OffsetToPointA
(SIB1中参数:offsetToPointA 28,)
b),根据Point A, 再确定整个载波的带宽和起点(会用到参数OffsetToCarrier = 0以及carrierBandwidth = 273RB)
c),以上用到的参数通过读取MIB和SIB1获得,这样就可以知道SSB相对整个载波带宽放到什么位置了
1.3.时间同步
以下内容摘自《5G移动通信系统设计与标准详解》5.2.2~5.2.3节 ,page 75~76.
初始接入时,UE不知道载波的具体带宽,频段内的载波带宽组合以及SSB在载波带宽中的位置.为了实现下行同步,UE需要通过搜索检测SSB获得接入载波的频点.为降低搜索的复杂度,UE按照协议规定的一定频率间隔进行SSB搜索,这个频率间隔称为同步栅格(Synchronization Raster).
当UE检测到某个SSB时,将从该SSB中获取定时信息,以达到下行时间同步的目的.获取的定时信息包括SFN,半无线帧索引,半无线帧中的时隙索引和时隙中的OFDM符号索引.
具体细节,需要了解小区搜索过程.本次不做继续讨论.
2.随机接入过程
随机接入过程涉及物理层,MAC层,RRC层等协议层.物理层定义了随机接入过程所需的前导序列(Preamble)码,PRACH资源,随机接入过程的定时关系等;MAC层定义了随机接入过程的总体流程;RRC层除了进行随机接入参数的配置之外,还直接参与一些特定用途的随机接入过程(如切换).
2.1.随机接入过程目的
以下内容摘自《5G移动通信系统设计与标准详解》5.5节 ,page 96~97.
随机接入设计的主要目的是使UE获取上行时间同步,并在UE上建立初始无线链路时候(RRC_IDLE状态转换到RRC_CONNECTED状态)时,可以通过随机接入过程获取用户标识一小区无线网络临时标识(C-RNTI)信息。
2.2.随机接入过程触发的原因
摘自协议TS38.300-9.2.6
随机接入过程应用于以下场景:
1)Initial access from RRC_IDLE;---RRC建立
2)RRC Connection Re-establishment procedure;---RRC重建
3)DL or UL data arrival during RRC_CONNECTED when UL synchronisation status is "non-synchronised";
4)UL data arrival during RRC_CONNECTED when there are no PUCCH resources for SR available;
5)SR failure;
6)Request by RRC upon synchronous reconfiguration (e.g. handover);---切换
7)Transition from RRC_INACTIVE;
8)To establish time alignment for a secondary TAG;
9)Request for Other SI (see clause 7.3);
10)Beam failure recovery;
11)Consistent UL LBT failure on SpCell.
Note:摘取自协议TS-38321-5.1.1
prach-ConfigurationIndex: the available set of PRACH occasions for the transmission of the Random Access Preamble for Msg1。
rach-ConfigCommon setup :
{
rach-ConfigGeneric ---RACH通用配置
{
prach-ConfigurationIndex 148,--发送Msg1可用的RO
msg1-FDM one,
msg1-FrequencyStart 0,
zeroCorrelationZoneConfig 10,
preambleReceivedTargetPower -80,--初始随机接入前导功率
preambleTransMax n10,
powerRampingStep dB6,---功率斜坡因子
ra-ResponseWindow sl80—RAR窗口长度,单位为slot个数
},
totalNumberOfRA-Preambles 63,--RA前导码总数
ssb-perRACH-OccasionAndCB-PreamblesPerSSB one : n64,--每个RO(可用于发送preamble的时频域资源)映射的SSB以及基于竞争的每个SSB对应的前导码个数
defines the number of SSBs mapped to each PRACH occasion for 4-step RA type and the number of contention-based Random Access Preambles mapped to each SSB
ra-ContentionResolutionTimer sf64,--RA竞争解决定时器,64个子帧
rsrp-ThresholdSSB 16,--用于选择SSB和相应的随机接入前导码和/或PRACH时机的RSR P阈值
prach-RootSequenceIndex l139 : 0,---prach 根序列索引
msg1-SubcarrierSpacing kHz30,--msg1子载波间隔
restrictedSetConfig unrestrictedSet--受限集配置
},
pusch-ConfigCommon setup :
{
msg3-DeltaPreamble 6,
p0-NominalWithGrant -80
},
3.竞争随机接入过程重点关注的内容
3.1.Msg1/随机接入Preamble
前导码Preamble是UE在物理随机接入信道中发送的实际内容.
PRACH Preamble 格式由一个循环前缀和一个或者多个Preamble序列组成,其中,每个Preamble序列占用一个PRACH OFDM符号.保护时间间隔GT在协议中没有显示定义,而是通过PRACH Preamble 所在的时隙和其它时隙对齐,隐含地包含在PRACH Preamble格式中.
CP Preamble 序列 Preamble 序列 ------ Preamble 序列 GT
NR支撑两种长度的PRACH Preamble格式:序列长度为839(长Preamble格式)和139(短Preamble格式).
不同的PRACH preamble格式在时域上的差异包括:子载波间隔,CP长度,序列长度,Preamble序列的重复次数,不同的持续时间和应用场景。
摘自协议TS38211-6.3.3.1
Table 6.3.3.1-1: PRACH preamble formats for and kHz.
Format Support for restricted sets
0 839 1.25 kHz Type A, Type B LTE频谱重用场景
1 839 1.25 kHz Type A, Type B 远距覆盖,最大100km
2 839 1.25 kHz Type A, Type B 增强覆盖场景
3 839 5 kHz Type A, Type B 高速运动场景
Note: 本节下面描述中所用的SIB1中携带的参数值为:
a) prach-ConfigurationIndex 148,
b) prach-RootSequenceIndex l139 : 0,
c) restrictedSetConfig unrestrictedSet
d) zeroCorrelationZoneConfig 10,
本节内容参考协议TS38.211-6.3.3.1。
The set of random-access preambles shall be generated according to
from which the frequency-domain representation shall be generated according to
where , , , or depending on the PRACH preamble format as given by Tables 6.3.3.1-1 and 6.3.3.1-2.
前导码序列集合包括根序列和由该根序列生成的循环移位序列,计算过程分为两个大的步骤:
(1)生成一个ZC(Zadoff-Chu)根序列Xu(n),作为一个基准序列
(2)将基准序列Xu(n)进行循环移位,生成63个不同的循环序列Xuv(n)
如果在(2)中根据基准序列得到的移位序列不足63个,则重新进入(1),生成下一个基准序列,以及新的基准序列相应的移位序列,直至满足64个前导码序列为止。
a.选择基准序列Xu(n)
基准序列Xu(n)(既然是序列则n/i为变量,u为常量)也就是物理根序列号为u的ZC序列,长度为LRA(839或139)按照下面公式,其中sequence number u 是根据logical root sequence index i 查下表6.3.3.1-4得到, 其中logical root sequence index i 是根据参数prach-RootSequenceIndex l139 : 0得到的,物理根序列号计算得到u=1。
Table 6.3.3.2-3: Random access configurations for FR1 and unpaired spectrum.
PRACH
Configuration
Index Preamble format Subframe number Starting symbol Number of PRACH slots within a subframe ,
number of time-domain PRACH occasions within a PRACH slot ,
PRACH duration
从表6.3.3.2-3可知,preamble format =B4,进而可以通过表6.3.3.1-2确定preamble的长度:
Table 6.3.3.1-2: Preamble formats for and kHz where .
Format Support for restricted sets
摘取协议TS-38.211-4.1
Throughout this specification, unless otherwise noted, the size of various fields in the time domain is expressed in time units where Hz and . The constant where , and .
从协议中可得:
基本时间单位Ts和Tc之间的比值是固定的,=Ts/Tc=64
Ts =1/(15000*2048)s=32.552 ns;
Tc = 1/(480000*4096)s=0.509 ns。
u=1进一步得到:
Preamble序列的持续时间=12.2048*1/2,单位是Tc;
Preamble序列循环前缀的持续时间=936*1/2,单位是Tc
还需要确定u=1,1个symbol长度,摘取协议TS-38.211-4.3.2,从表4.3.2.1可得:
子帧=1ms=2个slot=28个symbol,进而u=1一个symbol长度=1/28ms =35714.29ns
=1097.14Ts
Table 4.3.2-1: Number of OFDM symbols per slot, slots per frame, and slots per subframe for normal cyclic prefix.
摘自协议TS-38211.5.3.2
The starting position of the PRACH preamble in a subframe (for ) or in a 60 kHz slot (for ) is given by
where
- the subframe or 60 kHz slot is assumed to start at ;
- a timing advance value shall be assumed;
- and are given by clause 5.3.1;
- shall be assumed for kHz, otherwise it is given by kHz and the symbol position is given by
where
- is given by the parameter "starting symbol" in Tables 6.3.3.2-2 to 6.3.3.2-4; = 0
- is the PRACH transmission occasion within the PRACH slot, numbered in increasing order from 0 to within a RACH slot where is given Tables 6.3.3.2-2 to 6.3.3.2-4 for and fixed to 1 for ; = 取值范围为0 to ,所以取值为[0]
- is given by Tables 6.3.3.2-2 to 6.3.3.2-4; =12
- is given by
- if kHz, then
- if kHz and either of "Number of PRACH slots within a subframe" in Tables 6.3.3.2-2 to 6.3.3.2-3 or "Number of PRACH slots within a 60 kHz slot" in Table 6.3.3.2-4 is equal to 1, then =1
- otherwise,
由前面查找结果可知:
Preamble format Nu Ncp symbol 长度 preamble持续时长
B4 12288Ts 468Ts 1097.14Ts 0.415ms
3.1.3.PRACH频域资源配置
Note: 本节下面描述中所用的SIB1中携带的参数值为:
a) msg1-FDM one,
b) msg1-FrequencyStart 0,
c) ssb-perRACH-OccasionAndCB-PreamblesPerSSB one : n64,
摘取协议TS38.211-6.3.3.2。
Random access preambles can only be transmitted in the frequency resources given by either the higher-layer parameter msg1-FrequencyStart or msgA-RO-FrequencyStart if configured as described in clause 8.1 of [5 TS 38.213]. The PRACH frequency resources , where equals the higher-layer parameter msg1-FDM or msgA-RO-FDM if configured, are numbered in increasing order within the initial uplink bandwidth part during initial access, starting from the lowest frequency. Otherwise, are numbered in increasing order within the active uplink bandwidth part, starting from the lowest frequency.
5)POWER_OFFSET_2STEP_RA:初始值为0,只有在下面情况才有值,初始值为0db--该值参考协议TS38.321-5.1.1a
2> if RA_TYPE is switched from 2-stepRA to 4-stepRA during this Random Access procedure:
3> set POWER_OFFSET_2STEP_RA to (PREAMBLE_POWER_RAMPING_COUNTER – 1) × (MSGA_PREAMBLE_POWER_RAMPING_STEP – PREAMBLE_POWER_RAMPING_STEP).
Table 7.1-2: RNTI usage.
RNTI Usage Transport Channel Logical Channel
P-RNTI Paging and System Information change notification PCH PCCH
SI-RNTI Broadcast of System Information DL-SCH BCCH
RA-RNTI Random Access Response DL-SCH N/A
MSGB-RNTI Random Access Response for 2-step RA type DL-SCH CCCH, DCCH
Temporary C-RNTI Contention Resolution
(when no valid C-RNTI is available) DL-SCH CCCH, DCCH
Temporary C-RNTI Msg3 transmission UL-SCH CCCH, DCCH, DTCH
参考协议TS38.321-5.1.3
The RA-RNTI associated with the PRACH occasion in which the Random Access Preamble is transmitted, is computed as:
RA-RNTI = 1 + s_id + 14 × t_id + 14 × 80 × f_id + 14 × 80 × 8 × ul_carrier_id
where s_id is the index of the first OFDM symbol of the PRACH occasion (0 ≤ s_id < 14), t_id is the index of the first slot of the PRACH occasion in a system frame (0 ≤ t_id < 80), where the subcarrier spacing to determine t_id is based on the value of μ specified in clause 5.3.2 in TS 38.211 [8], f_id is the index of the PRACH occasion in the frequency domain (0 ≤ f_id < 8), and ul_carrier_id is the UL carrier used for Random Access Preamble transmission (0 for NUL carrier, and 1 for SUL carrier).
摘自协议 TS38321-6.1.5
从图6.1.5-3得到 MAC PDU可能包含BI,RAPID和MAC RAR三部分。
Figure 6.1.5-3: Example of MAC PDU consisting of MAC RARs
该MAC头可由两种类型的子头构成(注意:这两类子头在同一个时间里是互斥的),类型的区别由类型字段“T”来决定,T=0即指示接下来呈现的是随机接入回退指示---”BI”,T=1期指示接下来呈现的是随机接入前导码标识---RAPID。
TA的作用:主要是为了保证不同UE的Msg3能同一时刻到达gNB.
UL GRANT:用于Msg3的调度
Figure 6.2.3-1: MAC RAR
Table 8.2-1: Random Access Response Grant Content field size
RAR grant field Number of bits
Frequency hopping flag 1
PUSCH frequency resource allocation 14, for operation without shared spectrum channel access
12, for operation with shared spectrum channel access
PUSCH time resource allocation 4
MCS 4
TPC command for PUSCH 3
CSI request 1
ChannelAccess-CPext 0, for operation without shared spectrum channel access
2, for operation with shared spectrum channel access