AoA estimator for passive UHF RFID based on Bayesian regression and classical antenna array signal processing. Combines physics-informed priors with Pyro-based uncertainty quantification.
- Bayesian-Enhanced-AoA-Estimator
The Bayesian-Enhanced-AoA-Estimator provides a comprehensive framework for estimating the Angle of Arrival (AoA) in passive UHF RFID systems. This project combines:
-
Classical Antenna Array Processing: Implements traditional techniques like Phase-difference estimation, Delay-and-Sum beamforming, and MUSIC algorithm.
-
Bayesian Regression Approach: Leverages probabilistic programming with Pyro to incorporate physics-informed priors and estimate uncertainty.
-
Multi-frequency Fusion: Combines data from multiple frequencies to improve estimation accuracy and robustness.
-
Uncertainty Quantification: Provides confidence metrics for all estimates, essential for real-world deployment.
This approach significantly improves AoA estimation accuracy compared to classical methods alone, particularly in challenging low-SNR environments and multi-path scenarios typical in indoor RFID deployments.
Our Bayesian approach offers several key advantages over traditional methods:
-
Physics-Informed Priors: Incorporates domain knowledge from classical antenna array theory as priors, making the model robust even with limited data.
-
Hierarchical Modeling: Employs a hierarchical Bayesian structure to model relationships between physical parameters and observations at multiple levels.
-
Uncertainty Quantification: Provides full posterior distributions rather than point estimates, enabling confidence-aware decision making.
-
Model Comparison: Systematically evaluates different prior structures (DS, Weighted, MUSIC, Phase) and feature configurations for optimal performance.
-
Robustness to Noise: Handles measurement noise and environmental uncertainties through explicit probabilistic modeling.
The Bayesian model is implemented using Pyro, a flexible probabilistic programming framework built on PyTorch.
-
Clone the repository:
git clone https://github.com/yourusername/Bayesian-Enhanced-AoA-Estimator.git cd Bayesian-Enhanced-AoA-Estimator -
Run the main script:
python main.py
All measurement files follow this standardized naming pattern:
File Naming Convention:
YYYYMMDD_FFF.F_D.DDD_L.LLL_W.WWW.csv
Explanation of Components:
YYYYMMDDโ Date of the experiment (for tracking only; does not affect the measurement).FFF.Fโ Operating frequency in MHz (e.g., 865.7 for 865.7 MHz). Used to compute ฮป.D.DDDโ Vertical distanceDin meters (e.g., 0.700 for 0.700 m).L.LLLโ Inter-antenna spacingLin meters (e.g., 0.287 for 0.287 m).W.WWWโ Horizontal offsetWin meters (can be negative, zero, or positive).
The dataset is organized into a hierarchical directory structure as follows:
Distance 1/
โโโ Replica 1/
โ โโโ Frequency 1/
โ โโโ Frequency 2/
โ โโโ Frequency 3/
โ โโโ Frequency 4/
โโโ Replica 2/
โ โโโ Frequency 1/
โ โโโ Frequency 2/
โ โโโ Frequency 3/
โ โโโ Frequency 4/
โโโ Replica 3/
โโโ Frequency 1/
โโโ Frequency 2/
โโโ Frequency 3/
โโโ Frequency 4/
Distance 2/
โโโ Replica 1/
โ โโโ Frequency 1/
โ โโโ Frequency 2/
โ โโโ Frequency 3/
โ โโโ Frequency 4/
โโโ Replica 2/
โ โโโ Frequency 1/
โ โโโ Frequency 2/
โ โโโ Frequency 3/
โ โโโ Frequency 4/
โโโ Replica 3/
โโโ Frequency 1/
โโโ Frequency 2/
โโโ Frequency 3/
โโโ Frequency 4/
Distance 3/
โโโ Replica 1/
โ โโโ Frequency 1/
โ โโโ Frequency 2/
โ โโโ Frequency 3/
โ โโโ Frequency 4/
โโโ Replica 2/
โ โโโ Frequency 1/
โ โโโ Frequency 2/
โ โโโ Frequency 3/
โ โโโ Frequency 4/
โโโ Replica 3/
โโโ Frequency 1/
โโโ Frequency 2/
โโโ Frequency 3/
โโโ Frequency 4/
Explanation:
- Distance X/: Represents different vertical distances
D. - Replica X/: Represents repeated measurements for the same distance.
- Frequency X/: Represents measurements taken at different operating frequencies.
The repository contains MATLAB scripts for processing RFID data and implementing various AoA estimation algorithms:
A preprocessing script that:
- Batch processes RFID experiment CSV files from a COTS RFID system (Zebra FX7500, AN480 WB Antenna, Belt tag)
- Parses filenames to extract experimental parameters (frequency, distance, antenna spacing, etc.)
- Unwraps phase measurements and converts to radians
- Transforms RSSI values to linear power scale
- Creates complex phasors for antenna signals
- Organizes data into a structured MATLAB dataset (
rfid_array_data.mat)
A comprehensive end-to-end RFID AoA estimation pipeline that:
- Implements multiple estimation methods:
- Phase-difference estimation
- Classical Delay-and-Sum beamforming (unweighted & RSSI-weighted)
- MUSIC algorithm for high-resolution AoA
- Multi-frequency fusion with confidence metrics
- Provides extensive visualization:
- AoA vs. tag position plots
- Spectral analysis and comparison
- 3D beam pattern visualization
- Heatmap representations
- Performs error analysis and method comparison
- Outputs organized figures and complete analysis reports
The repository includes Python implementations that use Bayesian methods through Pyro:
Core implementation of the Bayesian AoA estimator:
- Defines physics-informed observations based on antenna array geometry
- Implements probabilistic model for phase and RSSI observations
- Performs Bayesian inference using Pyro's SVI engine
- Provides posterior distributions for AoA estimates with uncertainty quantification
- Handles multi-frequency data fusion through hierarchical modeling
Provides functions to conduct classic antenna-array analysis of DS Beamforming and Weigthed DS Beamforming.
Utility module for preprocessing and managing the dataset:
- Reads and parses CSV files from RFID experiments
- Converts raw measurements to complex phasors
- Handles data cleaning and outlier removal
- Provides data loaders compatible with PyTorch/Pyro
Provides functions to conduct classic antenna-array analysis of the MUSIC algorithm.
Provides functions to conduct classic antenna-array analysis of the phase difference analysis.
Comprehensive visualization tools.
The repository is organized with the following key directories:
Raw and processed datasets:
/2025-07-09: Original CSV files from RFID experiments/testing: Data collected during environment and set up testing
Stores generated visualization outputs from the analysis:
- AoA estimation plots
- Spectral analysis visualizations
- 3D beam pattern representations
- Method comparison charts
- Error analysis visualizations
Example figures are included to demonstrate the expected output format.
Contains all MATLAB implementation scripts:
process_experimental_data.m: Preprocessing script for raw CSV dataantenna_array_processing.m: Complete end-to-end AoA analysis pipeline
Contains processed data and analysis results:
rfid_array_data.mat: Preprocessed dataset ready for analysiscomplete_analysis.mat: Comprehensive results from all estimation methodsZIP files: Contains ZIP files of the full analysis pipeline.
Example result files are provided to illustrate the data structure.
Contains all Python implementations:
bayesian_regression.py: Core Bayesian estimation implementationbeamforming.py: DS and Weighted DS Beamformingdata_management.py: Dataset processing and managementmusic.py: MUSIC algorithmphase_difference.py: Phase-difference methodsvisualization.py: Visualization tools
This section will include detailed performance metrics, comparisons, and visualizations of the Bayesian AoA estimator against classical methods.
This project is licensed under the MIT License - see the LICENSE file for details.