# 1D-CLANet: A Novel Network for NLoS Classification in UWB Indoor Positioning System
## 3 Theoretical Analysis
\begin{bmatrix}d_{n}^{2}-d_{1}^{2}+x_{1}^{2}-x_{n}^{2}+y_{1}^{2}-y_{n}^ {2}\\ d_{n}^{2}-d_{2}^{2}+x_{2}^{2}-x_{n}^{2}+y_{2}^{2}-y_{n}^{2}\\ \ldots\\ d_{n}^{2}-d_{n-1}^{2}+x_{n-1}^{2}-x_{n}^{2}+y_{n-1}^{2}-y_{n}^{2}\end{bmatrix}  \tag{4}\]  
After converting to a system of linear equations, we can solve the above equation using the least squares method. \[X=\left(A_{ls}^{T}A_{ls}\right)^{-1}A_{ls}^{T}B_{ls} \tag{5}\]  
where \(X=[x\;y]^{T}\); this allows us to obtain the calculated position of the UWB tag within the multi-anchor positioning network. There are many other methods for calculating positions in UWB positioning networks, such as gradient descent and robust regression. However, as discussed in the introduction, nearly all positioning methods are inevitably affected by UWB ranging errors, especially under NLoS conditions. As shown in Equation (6), NLoS can significantly increase the gross error \(\Delta d(t)\) in the measured distance. As shown in Figure 2b, NLoS intuitively causes  
Figure 2: Example of a trilateration-based 3-anchor positioning model: (**a**) positioning under LoS conditions, (**b**) positioning under NLoS conditions. a positive error in the measurement \(d_{2}\) from AP2 to the tag, resulting in a positioning error that shifts the result from the blue point to the red point. \[\left\{ \begin{array}{l}d_{\text{LoS}}=d^{*}+\eta(t)\\ d_{\text{NLoS}}=d^{*}+\Delta d(t)+\eta(t)\end{array} \right. \tag{6}\]  
where \(d_{\text{LoS}}\) and \(d_{\text{NLoS}}\) are the UWB measurements under LoS and NLoS conditions, respectively. \(d^{*}\) is the true distance between tag and anchor, \(\eta(t)\) is the UWB measurement noise. Therefore, mitigating UWB ranging errors under NLoS conditions or selecting the ranging results from anchors under LoS conditions for position calculations is crucial for reducing positioning errors in UWB IPS. To achieve these technical effects, identifying LoS/NLoS propagation conditions is an essential prerequisite for both error mitigation methods. Currently, the most common approach is to use UWB CIR features to identify the channel's LoS/NLoS propagation conditions. The CIR describes the characteristics of a channel by detailing its response to a brief impulse signal, thereby outlining the communication channel's properties. In a UWB localization system, the transmitted symbol \(s(t)\) from each anchor or tag can be represented as [36]  
\[s(t)=\sqrt{A}\sum_{m=0}^{M-1}p(t-mT_{p}) \tag{7}\]  
where \(A\) denotes the amplitude of the transmitted pulse, \(p(t)\) represents the single Gaussian pulse waveform, and \(M\) pulses, each with a period of \(T_{p}\), form specific frames. The impulse response of the transmission channel can be expressed as  
\[h(t)=\sum_{c=1}^{\text{C}}\eta_{c}\delta(t-\alpha_{c}) \tag{8}\]  
where \(\eta_{c}\) and \(\alpha_{c}\) denote the fading coefficient and the time delay of the \(c\)-th path, respectively. Consequently, the received signal is the sum of transmitted signals, each experiencing attenuation and delay through multiple paths, represented as  
\[r(t)=\sum_{c=1}^{\text{C}}\eta_{c}s(t-\alpha_{c})+n(t) \tag{9}\]  
where \(n(t)\) is the additive white Gaussian noise (AWGN) with variance \(\sigma_{r}^{2}\). Figure 3 illustrates the CIR curves under both LoS and NLoS conditions. The primary distinction lies in the first path (FPH); LoS curves feature a consistent FPH peak, while NLoS curves exhibit a clipped FPH without a peak. Additionally, the maximum value of LoS CIR curves surpasses that of NLoS curves. Multipath effects influence NLoS CIR curves, creating multiple local peaks, with more severe obstructions causing an increase in these peaks. These varying characteristics enable the differentiation between LoS and NLoS conditions using ML methods.