## 3 Multi-Source Fusion Structure of Wi-Fi/Acoustic/MEMS Sensors
### Enhanced Acoustic Ranging and Accuracy Indicator  
This work proposes the acoustic drift estimator (ADE) to compensate for the acoustic drift error caused by user motion. The frequency shift \(f_{s}\) of acoustic ranging is presented as [19]:  
\[f_{s}=f_{t}-f_{r}=\frac{v_{p}}{\varpi}f_{r} \tag{17}\]  
where \(f_{t}\) is the measured signal frequency, \(f_{r}\) is the original signal frequency, \(v_{p}\) is the projected velocity facing the acoustic station, and \(\varpi\) is the transmission speed of the sound. For the time-of-arrival (TOA)-based distance measurement, the calculated drift error is modeled as:  
\[\zeta_{s}=\varpi\cdot\left(\frac{f_{s}^{i}}{F_{a}^{i}}\times T_{a}^{i}\right)= \frac{f_{t}^{i}}{F_{a}^{i}}\times(v_{p}\cdot T_{a}^{i}) \tag{18}\]  
where \(F_{a}^{i}\) is the frequency range of transmitted acoustic signal and \(T_{a}^{i}\) is the duration of signal transmission. Thus, the final observed acoustic distance is presented as:  
\[L_{\text{observed}}=L_{\text{Acoustic}}+\zeta_{s}+d_{N}+d_{\text{random}} \tag{19}\]  
where \(L_{\text{observed}}\) represents the measured result, which includes the drift error \(\zeta_{s}\), NLOS deviation \(d_{N}\), and measurement error \(d_{\text{random}}\) with the Gaussian distribution; \(L_{\text{Acoustic}}\) is the ground-truth acoustic distance measurement. To further decrease the NLOS effect of acoustic ranging in real-world scenes, in this work, an acoustic NLOS error evaluation algorithm is proposed based on the detection of loop closure and scene recognition. During the first step, the Wi-Fi fingerprinting result is applied to provide the scene detection result to preliminarily find the NLOS affected stations, and the loop relationship between the current location and two received acoustic stations are described in Figure 3:  
\[\left|\overset{\rightarrow}{OB}-\overset{\rightarrow}{OC}-\overset{ \rightarrow}{BC}\right|=\Delta_{s}^{\text{${\mathcal{E}}$}{\mathcal{C}$}}+d_{ N}+d_{\text{random}}+d_{p} \tag{20}\]  
where \(d_{p}\) indicates the approximate error of the current location, and can be estimated according to the loop closure relationship with no NLOS effect:  
\[\left|\overset{\rightarrow}{OC}-\overset{\rightarrow}{OD}-\overset{ \rightarrow}{CD}\right|=\Delta_{s}^{\text{${\mathcal{C}}$}{\mathcal{C}$}}+d_ {\text{random}}+d_{p} \tag{21}\]  
Under the specific 2D scenario, the misclosure vector can be divided into X and Y coordinates:  
\[\left\{ \begin{array}{l}X_{BC}=\widetilde{X}_{OB}\pm\widetilde{X}_{OC}\\ Y_{BC}=\widetilde{Y}_{OB}\pm\widetilde{Y}_{OC}\end{array} \right. \tag{22}\]  
Figure 3: Schematic diagram of NLOS evaluation. where \(\widetilde{X}_{OB}\) and \(\widetilde{Y}_{OB}\) are the divided coordinate values, and are further applied to calculate the modeled vector \(\left(\overline{X}_{OB},\overline{Y}_{OB}\right)\):  
\[\left\{ \begin{array}{l}\overline{X}_{OB}=\frac{\widetilde{X}_{OB}L_{OB}}{E_ {OB}}\\ \overline{Y}_{OB}=\frac{\widetilde{Y}_{OB}L_{OB}}{E_{OB}}\end{array} \right. \tag{23}\]  
where \(L_{OB}\) is the acquired RTT distance between points \(O\) and \(B\) at the current position A. \(\widetilde{E}_{OB}\) is the Euclidean distance among location B and current location A. Then, reconstruction of the misclosure vector under the coordinate forms:  
\[\left\{ \begin{array}{l}V_{x}=\overline{X}_{AB}\pm\overline{X}_{AC}-X_{BC}\\ V_{y}=\overline{Y}_{AB}\pm\overline{Y}_{AC}-Y_{BC}\end{array} \right. \tag{24}\]  
where \(\overrightarrow{V}=[V_{x},V_{y}]^{T}\) is the reconstructed misclosure coordinate, and the variance of \(\overrightarrow{V}\) is described as:  
\[D(\overrightarrow{V})=\left( \begin{array}{cc}\left(\frac{\widetilde{X}_{ AB}}{R_{AB}}+\frac{\widetilde{X}_{AC}}{R_{AC}}\right)^{2}&0\\ 0&\left(\frac{\widetilde{Y}_{AB}}{R_{AB}}+\frac{\widetilde{Y}_{AC}}{R_{AC}} \right)^{2}\end{array} \right) \begin{pmatrix}D_{r}&0\\ 0&D_{r}\end{pmatrix}