  Internet of Things (IoT) device localization is fundamental to smart home
functionalities, including indoor navigation and tracking of individuals.
Traditional localization relies on relative methods utilizing the positions of
anchors within a home environment, yet struggles with precision due to inherent
inaccuracies in these anchor positions. In response, we introduce a
cutting-edge smartphone-based localization system for IoT devices, leveraging
the precise positioning capabilities of smartphones equipped with motion
sensors. Our system employs artificial intelligence (AI) to merge channel state
information from proximal trajectory points of a single smartphone,
significantly enhancing line of sight (LoS) angle of arrival (AoA) estimation
accuracy, particularly under severe multipath conditions. Additionally, we have
developed an AI-based anomaly detection algorithm to further increase the
reliability of LoSAoA estimation. This algorithm improves measurement
reliability by analyzing the correlation between the accuracy of reversed
feature reconstruction and the LoS-AoA estimation. Utilizing a straightforward
least squares algorithm in conjunction with accurate LoS-AoA estimation and
smartphone positional data, our system efficiently identifies IoT device
locations. Validated through extensive simulations and experimental tests with
a receiving antenna array comprising just two patch antenna elements in the
horizontal direction, our methodology has been shown to attain decimeter-level
localization accuracy in nearly 90% of cases, demonstrating robust performance
even in challenging real-world scenarios. Additionally, our proposed anomaly
detection algorithm trained on Wi-Fi data can be directly applied to
ultra-wideband, also outperforming the most advanced techniques.
