# An Efficient Indoor Positioning Method with the External Distance Variation for Wireless Networks
## 2 System Models
When the signal reaches the receiving point, the original signal will become multiple incident signals with different paths. Since each incident signal arrives at a different time, intensity, angle, etc., it causes signal interference and confusion at the receiving point, as shown in Figure 2. The \(\tau_{0}\), \(\tau_{1}\),..., \(\tau_{n-1}\) in Figure 2 are the delays caused by various propagation paths to the receiving point, which are caused by different paths arriving at the receiving point at different times. The received signal strength method demonstrates that, after the receiving signal point receives the signal strength of the transmitting signal point, it is substituted into the attenuation model to find the distance. In the free-space propagation model, the signal strength received at the receiving point is inversely proportional to the distance. The Foles free-space model calculates the distance between the transmitter and the receiver. Figure 1: The relationship between electromagnetic wave propagation distance and signal strength. Figure 2: Schematic diagram of receiving point affected by multipath effects. In addition, a model is used to add a masking decay mechanism and a logarithmic normal distribution (\(\sigma\) = 3-8 dB). After the transmitter transmits the signal, there will be obstacles in the propagation path. The greater the difference, the more barriers there are. When the distance between the transmitter and the receiver is \(d\), the average power of the received signal is expressed as shown below [22; 23]:  
\[P_{r}(d)=\frac{P_{t}G_{t}G_{r}\lambda^{2}}{(4\pi^{2})d^{2}L} \tag{4}\]  
where \(G_{t}\) = 1 is the antenna gain of the transmitting point, \(G_{r}\) = 1 is the antenna gain of the receiving point, \(\beta\) = 2 is the path attenuation index, and \(L\) is log-normal shadowing fading [24]. In the range-based positioning method, RSS is used to estimate the distance between the unknown location and the reference point, the coordinated the value of the unknown node located by the MMSE algorithm. The positioning performance of MSE and Monte Carlo is used to simulate the average error under different masking and decay environments to obtain the error of different environments. When the three reference nodes used in this paper estimate a known distance, the distance will be obtained separately, and then the known coordinates of the three reference nodes and the three estimated distances are substituted into the MMSE to estimate the position of the unknown node [25; 26] as expressed by  
\[e_{n}(x_{0},y_{0})=\hat{d}_{n}-\sqrt{\left(x_{n}-x_{0}\right)^{2}+\left(y_{n }-y_{0}\right)^{2}} \tag{5}\]  
where \(x_{0}\) and \(y_{0}\) are the coordinate of the node to be estimated, \(x_{n}\) and \(y_{n}\) are the coordinate of the known reference node, \(\hat{d}_{n}\) is the distance between the \(n\)-th reference node coordinate and the node to be estimated, \(n\) = 1, 2, 3,..., \(N\). Triangulation uses the hyperbolic method to calculate the intersection of three circles. The reference node is set to the known reference node coordinates, \(A\), \(B\) and \(C\), and the unknown node coordinates are \((x,y)\), assuming that \(d_{A}\), \(d_{B}\), and \(d_{C}\) are the distance from the known node to the unknown node as expressed by [27]:  
\[\sqrt{\left(x-x_{A}\right)^{2}+\left(y-y_{A}\right)^{2}}=d_{A} \tag{6}\]  
\[\sqrt{\left(x-x_{B}\right)^{2}+\left(y-y_{B}\right)^{2}}=d_{B} \tag{7}\]  
\[\sqrt{\left(x-x_{C}\right)^{2}+\left(y-y_{C}\right)^{2}}=d_{C} \tag{8}\]  
By Equations (6)-(8), the positioning unknown nodes can be derived by  
\[\left[ \begin{array}{c}x\\ y\end{array} \right]=\left[ \begin{array}{cc}2(x_{A}-x_{C})&2(y_{A}-y_{C})\\ 2(x_{B}-x_{C})&2(y_{B}-y_{C})\end{array} \right]^{-1}\left[ \begin{array}{cc} x_{A}^{2}-&x_{C}^{2}-&y_{A}^{2}-&y_{C}^{2}-&d_{C}^{2}-&d_{A}^{2}\\ x_{B}^{2}-&x_{C}^{2}-&y_{B}^{2}-&y_{C}^{2}-&d_{C}^{2}-&d_{B}^{2}\end{array} \right] \tag{9}\]  
Because this positioning method can provide better accurate positioning when there is no error in the three distances.