| Agricultural monitoring network is self-organized by a large number of sensor nodes,this flexible and easy-to-use network is called Wireless Sensor Networks(WSN).WSN is the basis for realizing the informatization and intelligence of agricultural production.People use sensors to measure the key factors in the growth of crops and make fine adjustments to agricultural production,thereby reducing labor and material costs and improving the efficiency of agricultural production.Random deployment is a common method for arranging sensor nodes,but it will lead to confusion of WSN topology,low coverage and low accuracy of node location.In order to improve the work quality and data accuracy of the agricultural monitoring network,this thesis intends to start with WSN coverage and node self-positioning,and then use the sparrow search algorithm to improve the node coverage,and then perform the node positioning function according to the error of the positioning algorithm.Improvements to improve the accuracy of node positioning.The main work of this thesis has the following three points:(1)The WSN coverage problem can be reduced to an optimization problem,that is,to find the layout with the largest coverage.This thesis first analyzes the coverage model of WSN,and selects the Sparrow Swarm Algorithm(SSA)to solve this problem.In order to improve the optimization ability of SSA,this thesis optimizes from three aspects: optimizing the initial population,improving the global search ability of the algorithm,and improving the ability of the algorithm to jump out of the local optimum.Using the reverse strategy to improve the fitness of the initial population;Use the nonlinear convergence factor to dynamically adjust the number of discoverers,and use more discoverers in the early stage to improve the global search ability of the algorithm;Add random walk mechanism to change the optimal value in each iteration.In order to reduce the local density between nodes,this thesis introduces a virtual force mechanism,which uses the interaction force between nodes to control the local density.The simulation results show that the distribution of nodes is relatively uniform and the coverage has been significantly improved.(2)For the positioning function of the node,this thesis selects the DV-HOP algorithm with lower energy consumption.This thesis analyzes the reasons for the error of the DVHOP positioning algorithm,and optimizes the DV-HOP algorithm from four aspects.WSN network topology is an important factor affecting node positioning.Relatively regular network topology can improve the accuracy of node positioning.Therefore,the optimized coverage algorithm is used to generate node layout first,and then locate the generated node positions.For the DV-HOP algorithm itself,this thesis uses RSSI technology to make the discrete hop count continuous to obtain a more accurate hop count;Using the minimum mean square error criterion to correct the average distance per hop;Finally,the improved sparrow search algorithm is used to calculate the coordinates of the nodes.After reducing the errors of the three stages of DV-HOP,the simulation results show that the positioning error has been greatly reduced compared with the basic DV-HOP algorithm.(3)Finally,this thesis designs an agricultural monitoring system based on the Zigbee communication standard.The system takes the CC2530 chip as the core and realizes the monitoring functions of temperature,humidity,light and soil temperature and humidity.The host computer integrates functions such as node layout scheme and viewing sensor node positions. |