Algorithm 1 Improved recursive DV-Hop algorithm. |
Input: WSN; Anchor nodes with their positions (, ) where , n is the total number of anchors; Output: Estimated position X of unknown node 1: Begin 2: ; /* initialization 3: ; /* initialize the covariance matrix P 4: S= set of reachable anchor nodes, where unknown node can communicate with them 5: For ( to ) Do 5.1: Selection of randomly three different anchors from S 5.2: Computation of RSSI values between unknown node and its neighbors 5.3: Estimation of distance between anchors and unknown node using the polynomial approximation and the RSSI technique Equation (8) 5.4: Computation of and based on estimated distance using Trilateration, and the covariance matrix Equation (11) 5.5: Estimation of unknown node position using Recursive Least Square method Equation (12) 6: end For; 7: /* Final estimated position of unknown node 8: end; |