Wireless sensor networks are composed of a large number of nodes self-organizing network,nodes randomly scattered in the monitoring area,its own location unknown.However,in the practical application of most wireless sensor networks,the location information of the nodes determines that the information collected is valuable.Therefore,the technology of node location is very important.Node positioning research is mainly on the positioning algorithm,the commonly used positioning algorithms include the centroid algorithm,APIT algorithm,DV-Hop algorithm.Positioning accuracy is affected by ranging error between nodes.In order to reduce ranging error,many researches,such as particle swarm optimization,genetic algorithm and ant colony optimization,are introduced into these algorithms to improve the positioning accuracy of nodes.BP neural network algorithm is a multi-layer feedforward network that is reversely propagated by error and has a high degree of non-linear mapping capability,and has generalization and fault tolerance.However,BP neural network algorithm is a local search optimization method,easy to fall into the local minimization,slow convergence.Aiming at the inherent flaws of BP algorithm,this paper proposes an improved algorithm based on particle swarm optimization(PSO)and genetic algorithm(GA)that names PGA-BP node localization algorithm.It's main about using PSO and GA to improve the BP neural network algorithm.The main idea is to construct a fitness function by using the particle swarm algorithm to optimize the population and combine the modified DV-Hop algorithm,and suppress the influence of the distance estimation error accumulation on the positioning accuracy.Then use the genetic algorithm in the selection,crossover,mutation operation BP network to get the optimal weights and thresholds.Finally,the optimal particles into the neural network for network training,improve the positioning accuracy.Carry on the simulation experiment on MATLAB 2014 a platform.When the ratio of anchor nodes increases,the radius of anchor nodes increases and the number of nodes increases,the positioning error of this algorithm is compared with the average positioning error of DV-Hop algorithm and BP-DV-Hop algorithm.Experimental results show that the average positioning error of the proposed algorithm is lower than the average positioning errors of the other two algorithms.Compared with the BP-DV-Hop algorithm,the average location error of the proposed algorithm decreased by 3.3%-6.9% when the proportion of anchor nodes increased from 10% to 35%;Compared with BP-DV-Hop algorithm,the average location error of the proposed algorithm decreased by 2.3%-7.8% when the number of unknown nodes increased from 200 to 450,and compared with DV-Hop improved algorithm,the average error of the proposed algorithm decreased by 7.8%-9.2%;Compared with BP-DV-Hop algorithm,the average location error of the proposed algorithm decreased by 3.4%-5.1% when the anchor node radius increased from 15 m to 40 m. |