# PEiD: Precise and Real-Time LOS/NLOS Path Identification Based on Peak Energy Index Distribution
## 1 Introduction  
Over the past decade, artificial intelligence (AI) has experienced remarkable growth across numerous research fields, including medical research [1] and the economy [2]. This technology endows machines with the ability to learn complex features from vast amounts of data and perform intricate tasks with greater intelligence. The recent emergence of the Internet of Things (IoT) has enabled the fusion of AI techniques with wireless devices, leading to the development of the AI of Things (AIoT) [3; 4; 5; 6; 7]. Wireless sensing, with its unique ability to monitor human behavior and positions using omnipresent electromagnetic waves, is gaining attention [8]. This contactless and non-intrusive sensing technique is believed to offer superior privacy protection compared to traditional camera or wearable-device-based methods. The advent of AI techniques, specifically machine learning (ML) and deep learning (DL), has enabled the exploration of intelligent applications, such as indoor positioning [9], target tracking [10], gesture recognition [11; 12], and respiration monitoring [13; 14]. However, a considerable number of existing studies are confined by the necessity of a line-of-sight (LOS) path. First, the existence of a LOS path is essential for device-based localization applications. This is because accurate localization is achieved by measuring the distance and angle of direct path between transceivers [15; 16]. The NLOS blocking can lead to wrong parameter estimation, thus causing performance degradation. Second, a LOS path can provide a stable and noiseless channel environment so that fine-grained activity recognition can be achieved. According to previous research on WiFi sensing models [7],the received signal can be split into two parts: the static and the dynamic component. Only when the environmental reflections and LOS signals remain constant are we able to extract the features related to activity. A similar assumption exists in many works of gesture recognition based on Doppler Frequency Shift (DFS) [11; 17] and Fresnel zones [12; 18]. A multitude of strategies have been suggested to tackle the issue of LOS/NLOS identification. Early studies in the field focus on exploring statistical characteristics such as the mean and standard deviation of measured channel properties [19; 20; 21; 22; 23]. The rational is that the channel properties of NLOS paths exhibit more randomness than that of LOS ones, resulting in notable differences in the distribution. This type of solution is simple and effective but requires reliable measurement of range, Time of Arrival (ToA), and Angle of Arrival (AoA). Another group of works exploits the high-precision Channel Impulse Response (CIR) provided by Ultra-Wideband (UWB) technology [24; 25; 26; 27; 28; 29]. It offers a feature map of superior time resolution that contains rich Multi-Path Components (MPCs) of received signals. Although UWB-based solutions can achieve excellent and stable identification performance, the high cost of UWB hardware hinders its development and application. An alternate strategy leverages the Channel State Information (CSI) provided by commodity WiFi devices [30; 31; 32; 33; 34; 35; 36; 37]. Due to the widespread infrastructure of IoT, WiFi has attracted wide attention for its advantage in deployment. However, it still faces constraints due to bandwidth limitations and inadequate resolution. Furthermore, existing works demand a larger sample size, thereby precluding real-time LOS/NLOS identification. In this paper, we introduce a WiFi-based LOS/NLOS identification approach called PEiD. Instead of extracting features from CSI, we investigate the CIR obtained through inverse Fast Fourier Transform (iFFT). Despite the limited bandwidth of commodity WiFi, we have found that the time index of CIR reflects the randomness of NLOS paths. To leverage this insight, we propose a novel feature called the peak energy index distribution, which has proven to be a promising indicator for identifying LOS and NLOS signals.