改进DV-Hop定位算法
首先设置初始量,布置了一个范围为100×100m2的区域,其上随机分布100个传感器节点,其中有10个信标节点,节点的通信半径为30m。
第二步在正方形区域内产生均匀分布的随机拓扑,随机产生节点坐标并将其中十个选定为信标节点,其余九十个设为未知节点,然后画出节点分布图。
第三步通过最短路径法计算未知节点与每个信标节点的最小跳数。
第四步根据前面记录的其他信标节点的位置信息和相距跳数估算平均每跳的实际距离,用跳数估计距离的方法得出未知节点到信标节点的距离。
第五步用极大似然估计法求未知节点坐标
(Improved DV-Hop localization algorithm first set the initial amount, layout 100100m2 the area of a range of 100 sensor nodes randomly distributed on the 10 beacon node, the node communication radius of 30m. The second step in the square area to generate uniformly distributed random topology, random coordinates of the nodes and ten of the selected beacon node, the remaining 90 is set to unknown node, and then draw the node distribution diagram. The third step is to calculate the minimum number of hops of the unknown node and each beacon node through the shortest path method. The fourth step according to the location information of the other beacon nodes in the previous record and away from hops to estimate the average hop distance and hop count to estimate the distance to come to the distance of the unknown node to beacon nodes. The fifth step maximum likelihood estimation method and the unknown coordinates of the nodes)