In the previous article, we mentioned that there are mainly two methods for distance measurement in CS: RTT (Round-Trip Time) and PBR (Phase-Based Ranging).Overview of BLE Channel SoundingThis article will briefly analyze distance measurement based on RTT. As shown in the previous figure, the steps for a single RTT measurement are as follows:
RTT=2*TOF=(ToAr-ToDi)+(ToAi-ToDr)distance = c * RTT/2, where c is the speed of light.From this, we can see that to calculate RTT, the most important thing is to determine the times of ToA and ToD.ToD (Transmission Time) is relatively certain.The ToD at the antenna port = the time the baseband records the access address + internal chip delay.By estimating the baseband processing delay and calibrating the RFA, a relatively stable and accurate value can usually be obtained.On the other hand, ToA (Arrival Time) is not only related to the receiver chain delay of the chip itself but also to frequency offset, multipath effects, interference, and other factors in the air transmission environment, making accurate estimation quite complex.The protocol mentions three types of ToA estimation methods:
- ToA estimation based on local oscillator clock (native clock timestamping)
This is the most basic method for obtaining ToA and is also the traditional method for obtaining timestamps in BLE. When the access address in CS_SYNC is received, the receiver uses its own sampling clock to timestamp the AA.The accuracy depends on the sample rate of the receiver; for example, if the sample rate is 16MHz, the time resolution is greater than 62.5ns, corresponding to a distance error of 18 meters.The native clock mainly provides a rough time window for channel sounding.
- ToA estimation using PN sequences
Compared to the native clock, ToA estimation based on PN sequences does not completely rely on the sample rate but determines the timing offset through correlation peaks. The method is as follows:
To overcome the limitations of the sample rate, interpolation algorithms are usually performed near the correlation peaks to calculate sub-sample precision ToA.
- ToA estimation based on sounding sequence
The sounding sequence is a repeating [0 1] sequence, which, after modulation, produces two frequency tones, one with frequency f and the other with frequency -f. The receiver uses these two tones to recover the timing offset. Although the sounding sequence is mainly used for PBR, it can also be viewed as a frequency domain ToA estimation method.The method is as follows:
Typically, BLE CS will send the sounding sequence on multiple frequency points, and the receiver measures the phase at each frequency point to calculate the time delay Δt.Finally,ToA=tsync+ΔtIn fact, CS combines these three methods: using the native clock to determine a rough range, using the PN sequence to calculate a more accurate distance, and finally using the sounding sequence to refine the precision.Done!