# 5G NR Timing Advance Distance calculator

Timing advance (Tta) is an offset between the start of a received downlink frame and a transmitted uplink frame. Our calculator help you to get Tta value, time offset and distance between eNodeB and Ue.

In accordance with 3GPP 38.211 Rel. 17 Tta can be calculated using the formula:

where Nta and Nta_offset given by clause 4.2 of [5, TS 38.213] and mean “Classic TA”.

Nta adj_common and Nta adj_Ue are optional and used at Satellate network and given by clause 4.2 of [5, TS 38.213].

Tc – constant and Basic time unit for NR, Tc =1/(480*10^3*4096) = 0,50862 ns.

То calculate Nta for a timing advance command [11, TS 38.321] in case of random access response, or in an absolute timing advance command MAC CE, we should to use this formula:

where Ta = 0, 1, 2, …, 3846.

In cases, where the timing advance command [11, TS 38.321], Ta, for a TAG indicates adjustment of a current Nta value, Nta_new should be calculated using the formula:

where Ta = 0, 1, 2, …, 63, Nta_old  – old Nta value.

in other cases NTa =0.

Nta_offset is defined in 3GPP 38.133 Table 7.1.2-2.

Table 7.1.2-2: The Value of Nta_offset

Note 1: The UE identifies based on the information n-TimingAdvanceOffset as specified in TS 38.331 [2]. If UE is not provided with the information n-TimingAdvanceOffset, the default value of is set as 25600 for FR1 band. In case of multiple UL carriers in the same TAG, UE expects that the same value of n-TimingAdvanceOffset is provided for all the UL carriers according to clause 4.2 in TS 38.213 [3] and the value 39936 of can also be provided for a FDD serving cell.

To pre-compensate the two-way transmission delay between the uplink time synchronization reference point and the serving satellite, the UE determines  Nta adj_common   [4, TS 38.211] based on one-way propagation delay Delay_common (t) that the UE determines as:

where TA_Common, TA_CommonDrift, and TA_CommonDriftVariant are respectively provided by ta-Common, ta-CommonDrift, and ta-CommonDriftVariant and t_epoch is the epoch time of TA_Common, TA_CommonDrift, and TA_CommonDriftVariant [12, TS 38.331]. Delay_common (t) provides a distance at time t between the serving satellite and the uplink time synchronization reference point divided by the speed of light.

Using higher-layer ephemeris parameters for a serving satellite, if provided, a UE pre-compensates the two-way transmission delay on the service link based on Nta adj_Ue that the UE determines using the serving satellite position and its own position.

If we know Tta offset we can calculate distance between gNodeb and Ue, we should to use this formula:

Example 1 (Classic TA)

We use FR1: 3500Mhz TDD with numerology µ(j)= 30kHz, and we got a timing advance command [11, TS 38.321], Ta, for a TAG indicates adjustment of a current Nta value: Nta_old=1024,Ta (0…63) =32,

Nta-ofsset =25600 (FR1 FDD or TDD band with neither E-UTRA–NR nor NB-IoT–NR coexistence case).

Result will be: 5G NR Timing Advance Tta =0.0000138 sec, Distance = 2070.31 meters

Example 2 (Satellite network) TA

We use FR1: 2100Mhz FDD with numerology µ(j)= 15kHz, and we got a timing advance command [11, TS 38.321] in case of random access response: Ta (0…3846)=1,

Nta-ofsset=0 (FR1 FDD band with E-UTRA–NR and/or NB-IoT–NR coexistence case).

Satellite: ta-Common = 16621440, ta-CommonDrift=3, ta-CommonDriftVariant=5, t= 2, t epoch =1,

Result will be: 5G NR Timing Advance Tta =0.0042280 sec, Distance = 634214.17 meters

5G Time advance (Tta) is important for downlink and uplink subframe synchronization. If you know Tta, it will help you to easily get distance between gNodeB and Ue. If the UE uses the wrong TA offset, it will cause desynchronization and UE connection network loss.