Support us and view this ad

可选:点击以支持我们的网站

免费文章

Introduction: The Challenge of Sub-Meter Indoor Positioning Global Navigation Satellite Systems (GNSS) fail indoors due to signal attenuation and multipath. For decades, Received Signal Strength Indication (RSSI) fingerprinting dominated indoor positioning, but its accuracy is fundamentally limited to 2-5 meters due to environmental variance. The Bluetooth 5.1 specification introduced a physical layer (PHY) feature called Constant Tone Extension (CTE), enabling Angle of Arrival (AoA) and Angle of Departure (AoD) positioning. This article dissects a practical implementation of AoA using the Nordic Semiconductor nRF52840 SoC, focusing on the raw signal processing chain, antenna array design, and real-time constraints. We will not discuss cloud-based trilateration; instead, we focus on the embedded, real-time angle computation on the receiver. Core Technical Principle: CTE, IQ Sampling, and Phase Difference The fundamental formula for AoA estimation relies on the phase difference of a received signal across multiple antennas. For a linear array with two antennas separated by distance d, the angle of arrival θ (relative to the array boresight) is given by: θ = arcsin( (λ * Δφ) / (2π * d) ) Where λ is the wavelength (approx. 12.5 cm for 2.4 GHz), and Δφ is the phase difference between the two antennas. The nRF52840 implements CTE as a series of unmodulated GFSK symbols appended to a standard Bluetooth packet. The receiver's radio, in IQ sampling mode, captures In-phase (I) and Quadrature (Q) samples during this CTE period. The key is that the CTE is transmitted from a single antenna on the transmitter, but the receiver switches its antenna array according to a predefined pattern defined in the AoA antenna pattern register. The packet format for AoA is a standard Bluetooth LE Advertising or Connection packet, followed by a CTE. The CTE length is defined in the CTEInfo field (1 byte) of the packet header. The CTE itself is a sequence of 1 µs symbols (1 Msym/s). The radio must be configured to sample the I/Q data at a rate of 4 MHz (4 samples per symbol). The switching pattern is critical: the receiver's antenna switch is controlled by the radio's internal state machine, which toggles between antennas every 1 µs (one symbol period). A guard period of 4 µs (4 symbols) is inserted at the start of the CTE to allow the PLL to stabilize. The timing diagram is as follows: | Access Address | PDU | CRC | CTEInfo | Guard (4µs) | Switch Slot 0 (1µs) | ... | Switch Slot N (1µs) | During each switch slot, the radio samples the I/Q data for that antenna. The phase difference Δφ between two consecutive slots (different antennas) is extracted from the complex I/Q data: phase = atan2(Q, I). The actual angle is then computed by averaging multiple such phase differences to mitigate noise. Implementation Walkthrough: nRF52840 SDK and Code The implementation requires careful configuration of the nRF52840's radio peripheral. We use the SoftDevice S140 (which supports AoA) or the OpenThread stack. The key registers are the SWITCHPATTERN and CTEINLINECONF. Below is a C code snippet demonstrating the configuration of the radio for AoA reception and the extraction of I/Q samples. This code is a simplified excerpt from a real-time AoA application. #include "nrf_radio.h" #include "nrf_802154....

继续阅读完整内容

支持我们的网站,请点击查看下方广告

正在加载广告...

Login