4.2 Weighted centroid Scheme:


In the weighted centroid based
localization algorithm 7 the distance between anchor nodes
and the unknown nodes are calculated same as centroid localization method but
weight of each nearby anchor node is multiplied.  Using weighted centroid formula.In Fig. 7. A(x1,y1), A(x2,y2)
and A(x3,y3) represents anchor
nodes.w1,w2 and w3 represents weight of anchor
node and location of  the blind node b (x,y)
can be calculated using eqution(2).

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now


 ; y=



7. Weighted Centroid  Localization Scheme

4.3 Proposed Localization Algorithm:

proposed localization algorithm determines the location of unknown node using
the line of intersection method. In Fig.8. Four anchor nodes are present, they
are a (x1, y1), a (x2,y2), a(x3,y3)
and a(x3,y3) and unknown node p(x,y). In this method the first
nearest anchor node from unknown node p(x,y) is named as a (x1,y1),
second nearest node from unknown node p(x,y) is named as a (x2,y2),
third nearest node from unknown node p(x,y) is given as a  (x3,y3) and fourth
nearest node from unknown node p (x,y) is named as a (x4,y4).
The nearest  node is calculated using the
distance formula between two point.steps to calculate the unknown node location
as follows:

the sensor nodes randomly in the given sensor fields.

Field consits of anchor nodes and unkown nodes.

an anchor nodes location with the known location closer to the unknown node.

the co-ordinate of the first nearest anchor node to the unknown node is taken
as A(x1,y1) ,second nearest node is A(x2,y2),third
and fourth nearest node is A(x3,y3) and A(x4,y4).

the intersection of line passing through the midpoint of  first nearest and second nearest anchor node
using the formula


the mid point of first nearest and third nearest anchor node using the


Find  the mid point of  second nearest and third nearest anchor node
using the formula


it produces the required location of the unknown node. The emperical formula
for co-ordinates x &  y of unknown
node is given by :




11)  Find the average error of all the




8. Proposed Localization Scheme


6 Implementation

is done using Matlab. The performance
of proposed localization algorithm
is evaluated based on the localization error. In this work line of
intersection of mid point of nearest anchor nodes are computed.


6.1 Centroid Localization Simulation


                 In Centroid localization the
unknown nodes receive the beacon messages within the range of their
communication.  The nodes then estimate
their position by taking the average of all the beacon positions using eqn
(1)  and take the resulting centroid as
their estimated position.  The simulation
is done within an area of 100

with 40 unknown nodes and 40 beacons as shown in Fig. 9.  The beacon nodes and unknown nodes are
randomly distributed inside the area.

                 The simulation is done for
different number of beacons varying from 20 to 80 in increments of 10 and the
localisation error is calculated for each node. 
The localisation error is average over 50 iterations. 


9.  Beacon nodes and
Unknown Nodes Distribution

               Fig. 9  shows the localization results when centroid
localization is used.  The average error
is in the range of 8m when there is 50 beacons with 40 unknown nodes are


Fig. 10. Centroid Localization

6.2 Weighted Localization Simulation

            In  weighted localization the weights are
multiplied to the corresponding beacon position and average is taken.  Usually distance between the beacon and
unknown node is taken as weights . Fig. 11 shows the localisation error between
the estimated and actual positions of the unknown nodes.  The average localization error was found to
be in order of 6.5m which is better than the centroid localization.


Fig. 11.  Weighted Localization Simulaltion

Proposed Localization Simulation


Fig. 12. Proposed Localization algorithm   

proposed localization the beacons first communicate with each other nodes and
the mid points of each nearby anchor node and unkown node is calculated.The
line of intersection point is measured with the help of equations (3,4,5,6 and
7). The resulting localization error simulation is given in Fig. 12.  The number of beacon nodes is 50 and 40
unknown nodes. The average localization error is around 5.5m which is better
than both weighted and centroid localization algorithms.


6.4 Comparison of Various Algorithms

Fig. 13. No of Beacons vs
Position Errors

               Fig. 13 is
position error comparison of three algorithms, centroid algorithm,  weighted centroid algorithm and improved
algorithm with beacon node numbers being ten, twenty, thirty, forty, fifty,
seventy and eighty respectively. From Fig. 13 we can intuitively discover that the
positioning error of three algorithms are gradually reduced along with the
increase of the number of beacon nodes. The simulation results show that the
positioning accuracy have been improved. 
Improved algorithm thus reduces the environment factors and improves
positioning accuracy effectively by using line of intersection of mid point of
nearest anchor


this paperwe  proposed new localiztioan algorithm
which estimates the locality information of a sensor node using the line of
intersection of midpoints of the nearest anchor of unknown node which is more
accurate and it does not require any extra hardware as like range-based
localization scheme.Proposed algorithm is easy to implement because computation
complexity and average location estimation error is low when compared with
traditional centroid and weighted centroid localization scheme.In the
simulation results the proposed algorithm gives location accuracy and less
average location estimation error than the centroid and weighted centroid
localization method. In future proposed localization algorithm can be applied
for Three dimensional space. In summary we say that the identification of exact
location of sensor node plays major role in many real-time research areas.