Research Article

A Combined Localization Algorithm for Wireless Sensor Networks

Algorithm 1

The MA-MDS algorithm.
Inputs
(i) A: the set of anchor nodes locations.
(ii) k: threshold.
(iii) : the estimated coordinates of i-level nodes.
Outputs
(i) : the estimated coordinates of all nodes in the entire WSNs.
tep 1: Low-level nodes positioning
For i=1 to k do
(i) Find the set of i-level nodes.
(ii) Running the multilateral algorithm to obtain the estimated coordinates of the i-level nodes, ;
(iii) Refresh the set of anchor nodes coordinates, ;
End for.
tep 2: High-level nodes positioning
(i) Get the weighted shortest path distance matrix by using Floyd algorithm, ;
(ii) Running MDS algorithm, get relative coordinates for all nodes in WSNs, ;
the relative coordinates of anchor nodes are ;
(iii) Transform relative coordinates to absolute coordinates by PA algorithm,
get finally estimated coordinates of all nodes, ;
tep 3: Calculation error
(i) Calculate average localization error by Eq. (1);