热度 19
2013-4-24 22:26
2657 次阅读|
3 个评论
我们如何学习通信协议,对于很多刚入行的同学来说,可能会比较迷惑。这是我在2009年1月写的一篇学习笔记,记录关于GSM跳频问题相关SPEC的学习轨迹,分享分享。 结论: 每个时隙在某一帧跳到哪个频率上,是动态地,在终端与基站建立一次通信的过程中通过专用的消息来确定的,不能由广播信道得到。 终端可以从BCCH或者DCCH中获得CA,即所有可能的跳频频点表。然后在每次建链的channel assignment消息中,终端确知MA,即从CA中选择出参与跳频的频点号,并获得HSN和MAIO,然后根据帧号计算得到当前帧应该跳频的频点号。 TS 45.002 描述: 6.2 Mapping in frequency of logical channels onto physical channels 6.2.1 General The parameters used in the function which maps TDMA frame number onto radio frequency channel are defined in subclause 6.2.2. The definition of the actual mapping function, or as it is termed, hopping sequence generation is given in subclause 6.2.3. In CTS, the specific mapping in frequency depends on the start condition defined by the parameters given in subclause 6.2.2. The hopping sequence generation for CTS is given in subclause 6.2.3. 6.2.2 Parameters The following parameters are required in the mapping from TDMA frame number to radio frequency channel for a given assigned channel. General parameters of the BTS, specific to one BTS, and broadcast in the BCCH and SCH: i) CA: Cell allocation of radio frequency channels. ii) FN: TDMA frame number, broadcast in the SCH, in form T1, T2, T3' (see subclause 3.3.2). For COMPACT, FN is broadcast in the CSCH, in form R1, R2 (see subclause 3.2.2). Specific parameters of the channel, defined in the channel assignment message: i) MA: Mobile allocation of radio frequency channels, defines the set of radio frequency channels to be used in the mobiles hopping sequence. The MA contains N radio frequency channels, where 1 £ N £ 64. For COMPACT, the reduced MA (see 3GPP TS 44.060) shall be used for a fixed amount of data blocks, see section 6.2.4. ii) MAIO: Mobile allocation index offset.(0 to N‑1, 6 bits). For COMPACT, MAIO_2 shall be used for the data blocks using the reduced MA. iii) HSN: Hopping sequence (generator) number (0 to 63, 6 bits). 可见,MA,MAIO和HSN是与具体每个用户相关的参数。 具体的跳频方案,在 TS 45.002 中有描述如下: 6.2.3 Hopping sequence generation For a given set of parameters, the index to an absolute radio frequency channel number (ARFCN) within the mobile allocation (MAI from 0 to N‑1, where MAI=0 represents the lowest ARFCN in the mobile allocation, ARFCN is in the range 0 to 1023 and the frequency value can be determined according to 3GPP TS 45.005 ), is obtained with the following algorithm: if HSN = 0 (cyclic hopping) then : MAI, integer (0 .. N‑1) : MAI = (FN + MAIO) modulo N else : M, integer (0 .. 152) : M = T2 + RNTABLE((HSN xor T1R) + T3) S, integer (0 .. N‑1) : M' = M modulo (2 ^ NBIN) T' = T3 modulo (2 ^ NBIN) if M' N then : S = M' else : S = (M'+T') modulo N MAI, integer (0 .. N‑1) : MAI = (S + MAIO) modulo N MA参数表,以及是MAIO和HSN参数网络通过“Messages for Radio Resources management”中某条消息传给终端的,详细内容在TS 44.018中有描述。这些消息是在某次通信过程中,网络与终端之间的三层消息,不属于某个广播信道。 44.018 中3.4.3.1描述: Channel assignment initiation: If frequency hopping is applied, the cell allocation if present in the message is used to decode the mobile al********* If the cell allocation is not included, the mobile station uses its current cell allocation, the current CA is the last CA received on the BCCH. Afterward, the current CA may be changed by some messages sent on the main signalling link containing a CA (the possible messages are: ASSIGNMENT COMMAND, HANDOVER COMMAND and FREQUENCY REDEFINITION). Note that there are cases in which the current CA is undefined, see sub-clause 3.4.3.3. CA 是用来解码MA的。CA是从BCCH获得,MA是从Channel assignment 消息中获得。 在 10.5.2 .1b Cell Channel Description 对CA的格式进行详细描述: 在 10.5.2 .13 Frequency list 对CA的格式中具体频率的计算有详细的描述。通过确定的算法获得所有的16,或17,或21,或29个频点。 在 10.5.2 .21 Mobile Allocation 对MA信息字段有详细解释。 MA C i, Mobile allocation RF channel i (octet 3 etc.), i = 1, 2,..., NF The MA C i bit indicates whether or not the Mobile allocation frequency list includes the i'th frequency in the cell allocation frequency list. The cell allocation frequency list is derived from the set of frequencies defined by the reference cell channel description information element. NF denotes the number of frequencies in the cell allocation frequency list. In the cell allocation frequency list the absolute RF channel numbers are placed in increasing order of ARFCN, except that ARFCN 0, if included in the set, is put in the last position in the list, For a RF channel belonging to the mobile allocation the MA C i bit is coded with a "1"; i = 1, 2,..., NF. For a RF channel not belonging to the mobile allocation the MA C i bit is coded with a "0"; i = 1, 2,..., NF. If NF mod 8 0 then bits NF to 8n in octet 3 must be coded with a "0" in each. 10.5.2 .5 Channel Description 对MAIO和HSN参数有详细解释,并H值表示是否跳频。 ARFCN, (octet 3, bits 2 and 1, and octet 4, bits 8 to 1) The ARFCN is coded as the binary representation of the absolute RF channel number Range: 0 to 1023 H = "1": The channel selector field consists of the mobile allocation index offset, MAIO, and the hopping sequence number, HSN. MAIO, (octet 3 bit 4 to 1 high part and octet 4 bit 8 to 7 low part) The MAIO field is coded as the binary representation of the mobile allocation index offset as defined in 3GPP TS 45.002. Range: 0 to 63. HSN, (octet 4 bit 6 to 1) The HSN field is coded as the binary representation of the hopping sequence numberas defined in 3GPP TS 45.002 Range 0 to 63.