## 3 DI-distributed Localization (DIL) Algorithm
### Localization Error Reduction  
In this section, probabilistic methods for improving the localization accuracy of the normal nodes with respect to the locations of at most three beacon nodes are designed. Let \(f_{A}\), \(f_{B}\) and \(f_{C}\) be the  
Figure 4: Probability density functions of RSSI received from beacon node \(A\). probability density functions of the RSSI \(S_{A}\), \(S_{B}\) and \(S_{C}\), received from the beacon nodes \(A\), \(B\) and \(C\), respectively. Suppose \(\mu_{A}\), \(\mu_{B}\) and \(\mu_{C}\) are the mean and \(\sigma_{A}\), \(\sigma_{B}\) and \(\sigma_{C}\) are the standard deviations of \(f_{A}\), \(f_{B}\) and \(f_{C}\), respectively. Let \(\mu_{A}<\mu_{B}\) and \(\mu_{A}<\mu_{C}\). Let us define \(S(f_{A}=f_{B})\) be the RSSI value when \(f_{A}(S)=f_{B}(S)\) and \(S(f_{A}=f_{C})\) be the RSSI value when \(f_{A}(S)=f_{C}(S)\). As shown in Figure 5, for a given range of \(S_{A}\), \(f_{A}(S_{A})<f_{B}(S_{A})\) and \(f_{A}(S_{A})<f_{C}(S_{A})\), which implies that \(S(f_{A}=f_{B})<S_{A}<\infty\) and \(S(f_{A}=f_{C})<S_{A}<\infty\). Hence, the probability of getting an RSSI value in this range at the normal node from beacon node \(B\) is given by the following equation. \[P_{A\to B}=P(f_{A}(S_{A})<f_{B}(S_{A}))=\int_{S(f_{A}=f_{B})}^{ \infty}f_{A}(S)\cdot dS \tag{14}\]  
Similarly, probability of getting an RSSI value in this range at the normal node from beacon node \(C\) is given by the following equation. \[P_{A\to C}=P(f_{A}(S_{A})<f_{C}(S_{A}))=\int_{S(f_{A}=f_{C})}^{ \infty}f_{A}(S)\cdot dS \tag{15}\]  
Here, \(P_{A\to B}\) represents the probability of identification of a beacon located at \(A\) as if it is the beacon \(B\) and \(P_{A\to C}\) represents the probability of identification of a beacon located at \(A\) as if it is the beacon \(C\). \(S(f_{A}=f_{B})\) represents the RSSI value at the normal node, where the PDFs from beacons \(A\) and \(B\) are equal to each other and \(S(f_{A}=f_{C})\) represents the RSSI value at the normal node, where the PDFs from beacons \(A\) and \(C\) are equal to each other. By considering a suitable method proposed in [22], the variance of the signal strength distribution at the normal node from the beacon node \(B\) is reduced to \(\sigma_{B}^{{}^{\prime}}\), where \(\sigma_{B}^{{}^{\prime}}<\sigma_{B}\). Here, we define a new RSSI value for which \(S(f_{A}=f_{B}^{{}^{\prime}})\) such that \(S(f_{A}=f_{B})<S(f_{A}=f_{B}^{{}^{\prime}})\). Hence, the probability of identification of beacon \(A\) as location \(B\) based on the new signal strength distribution from a transmitter located at \(B\) with reduced variance can be expressed in the following equation. \[P_{A\to B}^{{}^{\prime}}=\int_{S(f_{A}=f_{B}^{{}^{\prime}})}^{ \infty}f_{A}(S)\cdot dS \tag{16}\]  
Similarly, by reducing the variance of the signal strength distribution to \(\sigma_{C}^{{}^{\prime}}\) at the normal node from beacon \(C\), where \(\sigma_{C}^{{}^{\prime}}<\sigma_{C}\), a new RSSI value could be defined so that \(S(f_{A}=f_{C}^{{}^{\prime}})\), where \(S(f_{A}=f_{C})\)  
Figure 5: Probability density functions of signal strength received from three beacon nodes. \(<S(f_{A}=f_{C}^{{}^{\prime}})\). Then the probability of identifying location of beacon \(A\) as location \(C\) based on the new signal strength distribution from a transmitter located at \(C\) with reduced variance can be expressed in the following equation. \[P_{A\to C}^{{}^{\prime}}=\int_{S(f_{A}=f_{C}^{{}^{\prime}})}^{\infty}f_{A}(S)\cdot dS \tag{17}\]  
Similarly, the probability of identification of location of beacon \(B\) as location \(C\) based on the new signal strength distribution from a transmitter located at \(C\) with reduced variance can be expressed in the following equation.