Support us and view this ad

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

免费文章

Introduction: The Precision Ceiling of Bluetooth AoA Bluetooth Angle of Arrival (AoA) has emerged as a cornerstone for high-accuracy indoor positioning, promising sub-meter localization without the infrastructure cost of UWB. The core principle is deceptively simple: a receiver with a switched antenna array measures the phase difference of an incoming constant tone extension (CTE) from a transmitter. However, the real world introduces multipath, antenna pattern distortion, and IQ imbalance, which can degrade raw angle estimates from a theoretical 1-2 degrees to 10-20 degrees in practice. This article details a production-grade implementation that fuses a real-time AoA estimator with a lightweight neural network (NN) for angle correction, achieving a 5x improvement in angular accuracy in a typical office environment. Core Technical Principle: From IQ Samples to Corrected Angle The AoA estimation chain can be broken into three distinct stages: IQ sampling, phase extraction, and NN-based correction. The transmitter (e.g., a BLE beacon) emits a standard AoA packet. After the access address and PDU, a 16 μs guard period precedes a 160 μs CTE. The receiver's antenna array (typically a 1x3 or 1x4 linear array) switches between elements at 1 μs intervals, capturing IQ samples at 1 Msps. The raw phase difference between two antennas, Δφ, is given by: Δφ = 2π * (d * sin(θ)) / λ where d is the antenna spacing (typically λ/2 = 6.25 cm at 2.4 GHz), θ is the angle of arrival, and λ is the wavelength. The phase is extracted by computing the arctangent of the IQ pair for each antenna sample. A simple MUSIC or ESPRIT algorithm can then estimate the angle, but these are sensitive to phase noise. Our approach uses a correction neural network that takes the raw phase vector (e.g., 8 phase differences from a 4-antenna array over 2 CTE slots) and outputs a corrected angle. The NN is a small fully-connected network (3 hidden layers, 32 neurons each) trained on a dataset of known transmitter positions. The key insight is that the network learns to map systematic errors—caused by antenna coupling, cable delays, and static multipath—to a correction offset. Implementation Walkthrough: State Machine and C Code The firmware on the receiver (e.g., an nRF52833 or similar) runs a state machine to coordinate the CTE sampling and angle calculation. The high-level states are: IDLE: Waiting for a valid AoA packet. SYNC: Detecting the access address and PDU end. GUARD: Waiting 4 μs (internal settling) then 16 μs guard period. SAMPLE: Switching antennas and storing IQ data for the 160 μs CTE. PROCESS: Running phase extraction and NN inference. OUTPUT: Transmitting the corrected angle over UART or BLE. The following C code snippet demonstrates the critical phase extraction and NN inference routine....

继续阅读完整内容

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

正在加载广告...

Login