Node localization is a key technology of wireless sensor networks. Although radio-ranging is accuracy, using least squares algorithm for node localization may lead to big error. To increase the node localization accuracy of range_ based wireless sensor network, in this paper, the node localization problem was transformed into a constrained optimization problem,and then the problem was solved by using particle swarm optimization algorithm. In the solution process, by setting the constraint fitness function and the distance fitness function,the search computation was reduced,the convergence rate was speeded up,and a better solution was achieved faster. The result from simulation experiments show that compared with least squares algorithm, under the circumstances of different ranging error,different distance radius, different number of anchors and different number of nodes,applying this algorithm can achieve a solution with more accuracy. This shows that the algorithm has stronger anti-error,better astringency and less investment in hardware,etc. In addition, it performs better in the sparse network node localization.%节点定位是无线传感网络的关键技术.无线电测距虽然精度高,但用最小二乘算法进行节点定位的误差较大.为了提高基于测距的无线传感器网络节点定位的精度,把节点定位问题转换成约束优化问题,再运用粒子群优化算法进行求解.求解过程中,通过设定约束适应度函数和距离适应度函数,降低了搜索的计算量,加快了收敛速度,最终较快地得到较优解.仿真实验表明,约束粒子群优化定位算法与最小二乘法相比,在不同测距误差、不同测距半径、不同锚节点数和不同节点数的情况下,都能得到更高精度的解.这说明此算法具有更强的抗误差性、更好的收敛性和更少的硬件设备投入等优点,另外在节点稀疏的网络中定位效果也更优越.
展开▼