# Node Location Method of Ecological Environment Monitoring Network Based on Zigbee

Authors: Linsen Li
Journal: Discrete Dynamics in Nature and Society
 (2022)

---

## Abstract

In view of the poor initialization performance of ecological environment monitoring network node location, a method of ecological environment monitoring network node location based on Zigbee is proposed. The node data collection model of ecological environment monitoring network is built based on Zigbee, and the performance is stable, which is more suitable for the node location of the ecological environment monitoring network; it is hoped that this study can provide reliable value reference and help for the future ecological studies. Through the installation of different types of sensors, the data of the ecological environment monitoring network nodes are automatically collected and sent to the server. The static weight coefficient of the collected data of the ecological environment monitoring network nodes is modified. According to the modified results, the ecological environment monitoring network is modified by DV-HOP positioning algorithm. The nodes of the ecological environment monitoring network are located by the three-way positioning method. The experimental results show that the initialization performance of this method is better, the accuracy is about 98%, and it is stable. It is more suitable for the node location of ecological environment monitoring network, which mainly includes ZigBee wireless sensor network module, embedded ARM, and Linux.


---

## Body

## 1. Introduction

Since the 1980 s, the global greenhouse effect has been obvious, and the climate is in the trend of drought. As a result, ecological problems such as glacial retreat, snow line decline, lake area change, water system change, land desertification, and grassland degradation are becoming increasingly serious, leading to the serious weakening of the water saving and purification ability of the ecological environment itself and the ability to resist erosion [1]. At present, the ecological environment is facing problems such as the crisis of water resources change, the intensification of land desertification, water and soil loss, wetland shrinkage, frequent geological disasters, and rapid and disorderly population growth. Under the influence of global warming and human activities, the wetland presents a shrinking trend, leading to the decline of lake water level, the reduction of river water supply, grassland degradation, and even frequent local climate change, which will lead to serious soil erosion and frequent occurrence of geological disasters such as collapse, landslide, and debris flow and pose a serious threat to agricultural production, traffic construction, and people’s life and property safety in these areas. Since the 1980s, the greenhouse effect has increased the side effects of human production activities (especially industrial activities) on the ecosystem. The contradiction between the rapid and disorderly growth of population and the carrying capacity of environment and resources has become increasingly obvious [2]. Monitoring the ecological environment through the ecological environment monitoring network can improve the precision and real-time degree of ecological environment monitoring, reduce the tedious degree of artificial participation, and form a multi-level, multi-parameter, real-time, and fine ecological environment monitoring process. Many scholars have studied the network node localization methods. Wang et al. [3] proposed a real-time positioning and monitoring method of network node data under the data standard. Wang and Dai [4] proposed a node localization algorithm based on Gauss–Newton iterative estimation for wireless sensor networks. Gaussian filtering algorithm is used to optimize the received signal strength to reduce the ranging error. The result of traditional trilateral positioning is used as the initial position of the sampling point, and the Gauss–Newton iteration is repeated to estimate the optimal position. Zhang and Zhao [5] proposed an improved weighted centroid algorithm node positioning method, which uses the reciprocal of the error obtained by substituting the normal equation into the coordinates as the weight and uses the weight difference to process different positioning results with different positioning errors. The reciprocal of the smaller error corresponds to the larger weight, and the reciprocal of the larger error corresponds to the smaller weight, so as to improve the positioning accuracy. Through MATLAB simulation of the traditional centroid algorithm and the improved weighted centroid algorithm, the position coordinates of the positioning nodes are estimated. Song and Huang [6] proposed a DV-Hop location algorithm based on wolf colony optimization. Firstly, the DV-Hop distance estimation algorithm is optimized, and then for the unknown node whose hop number is 1 from the anchor node, the RSSI method is used to directly calculate the distance between it and the anchor node, so as to reduce the error of the estimated distance. Secondly, since the wolf swarm algorithm is easy to fall into local optimization, the optimized wolf swarm algorithm (IWCA) is proposed [7, 8]. When the K iterations of wolf detection do not change the position, it is allowed to walk in the direction of poor effect with a certain probability. The walking mode is chaotic mapping. Finally, the IWCA algorithm is applied to the node location calculation stage to reduce the error caused by DV-Hop range estimation algorithm when calculating the node location [9–11].Although the above methods can achieve network node positioning, the accuracy is still low. Therefore, in order to make better use of the ecological environment monitoring network, a node location method of ecological environment monitoring network based on Zigbee is proposed.


## 2. Realization of Node Location in Ecological Environment Monitoring Network

### 2.1. Construction of Node Data Acquisition Model

Based on Zigbee, the node data collection model of ecological environment monitoring network is constructed, and the node data of ecological environment monitoring network are automatically collected by installing different types of sensors and sent to the server. The structure of Zigbee protocol is shown in Figure1.Figure 1
Structure and division of labor of Zigbee protocol.The node data collection model of the ecological environment monitoring network can be divided into four modules in terms of function, namely, Zigbee wireless sensor network module based on star topology, embedded module based on ARM and Linux, breakpoint continuous transmission processing module, and information management module based on web [12, 13]. Zigbee wireless sensor network module adopts a star topology structure, which can collect and summarize various data of ecological environment monitoring network to the main node in a wide range; embedded module based on ARM and Linux is deployed on the main node, which is mainly responsible for processing and packaging the collected data, which are sent to the server by 3G router after AD conversion; breakpoint continuous transmission processing module is enough to send the lagging data to the server to ensure the integrity of the collected data; the web-based information management module is deployed on the web server to realize the functions of receiving data, querying, and downloading data [14]. The framework of the node data collection model of the ecological environment monitoring network is shown in Figure 2.Figure 2
Framework of node data collection model of ecological environment monitoring network.


#### 2.1.1. Design of Zigbee Wireless Sensor Network Module

In Zigbee wireless sensor network module based on star topology, the slave node communicates with the master node directly. The slave node is mainly used in the network distribution scene with short distance and more monitoring positions [15]. The specific structure of Zigbee wireless sensor network is shown in Figure 3.Figure 3
Specific structure of Zigbee wireless sensor network.The master node plays the coordination function in Zigbee wireless sensor network. The main node is the convergence node of the network, and the physical device used is the full-function device FFD, which can communicate with other devices in the network through software design [16–18]. In Zigbee wireless sensor network, the slave node uses the simplified function device RFD, which can complete the communication function with the master node. JN5139 chip is used in sensor network nodes. JN5139 chip is a low-power, low-cost wireless microcontroller, which is suitable for Zigbee applications. JN5139 chip integrates 32-bit RISC reduced instruction set processor, fully compatible with 2.4 GHz IEEE802.15.4 wireless transceiver, 96 kb RAM, 192 kb ROM, and a variety of mixed analog and digital external devices. The ROM and RAM architecture of JN5139 chip supports the storage system software, including protocol stack, routing table, application code and data, and so on. On the other hand, based on the special Jennic development tools, Zigbee network platform can be built conveniently and quickly and can be easily integrated into the product, so as to help developers develop stable programs in a short time, shorten the product development cycle, and reduce the development difficulty and cost [19]. The specific block diagram of JN5139 is shown in Figure 4.Figure 4
Specific block diagram of JN5139 chip.Zigbee wireless sensor network module is equipped with RS-485 interface and RS-232 interface, which can form a system with RS485, Ethernet, RS232, and GPRS according to specific application. The communication between RFD and FFD adopts the special development tool Jennic suite, and the programming language of Zigbee wireless sensor network module is C language. In Zigbee wireless sensor network, each master device can communicate with 2–4 slave devices, and each slave device can connect up to 16 sensors, which can meet the actual application requirements of data collection of ecological environment monitoring network. The slave device first collects the data of the ecological environment monitoring network and then transmits the collected data to the master device. After receiving the data from the device, the master device first summarizes the data and then sends the summarized data to the arm board [20, 21]. After receiving the data, the arm board converts the data into binary format and sends it to the web information management module on the server [22]. The transmission data flow of the main equipment is shown in Figure 5.Figure 5
Transmission data flow of main equipment.


#### 2.1.2. Design of Embedded Module Based on Arm and Linux

The embedded module based on arm and Linux is the lower computer of the node data collection model of the ecological environment monitoring network [23, 24]. The arm data acquisition board consists of a core board and an expansion board connected by a connector. The core board is a 6-layer board, mainly including the core circuit of arm system such as the main controller, memory SDRAM, power and clock circuit, and flash of stored program. The expansion board is equipped with a memory controller and various interfaces that can communicate with external devices. Its memory controller includes 32 MB SDRAM, 64 MB NandFlash, and 4 MB NorFlash memory modules; It has two USB2.0 interfaces, a debugging port, and two data serial ports, as well as a 10/100 M adaptive Ethernet port and multiple GPIO ports. The expansion board is also equipped with RTC clock, power supply, and other auxiliary circuits. Among them, the 10/100 M self-adaptive Ethernet port is used for network transmission of data, the USB interface is used for local data storage and connecting the USB interface micro-camera, the serial port is mainly used to connect the Zigbee main node, and the multi-channel GPIO interface is mainly used to output control instructions and control the auxiliary equipment. The control panel of the arm board is shown in Figure 6.Figure 6
Control panel of arm board.The Linux operating system is a cross platform system, which can adapt to a variety of CPUs and hardware platforms, support multi-user, multi-task, multi-thread, and multi-CPU, and support 32-bit and 64-bit hardware [25].


#### 2.1.3. Design of Breakpoint Continuous Transmission Processing Module

The overall design of the breakpoint continuous transmission processing module is as follows:(1)
Start the main thread and initialize global variables.(2)
The main thread starts the data collection thread, data sending thread, receiving confirmation thread, and breakpoint renewal thread.(3)
The main thread establishes a network communication socket with the web information management module on the server.(4)
After the network communication socket is established, the web information management module on the server will send the last received collection data timestamp through the network communication socket.(5)
The receiving confirmation thread receives the time stamp sent by the web information management module and compares the time stamp with the collected data saved in the local file. If the time stamp of some collected data is greater than the time stamp sent by the web information management module, the collected data will not be sent to the server directly, but will be sent to the server by the breakpoint update thread notified by the receiving confirmation thread.(6)
The data acquisition thread collects the value of each channel sensor of each Zigbee node and forms the data message according to the format of the collected data. The header of the message includes the time stamp of month, day, hour, and minute.(7)
The data collection thread writes the data message into the memory for the data sending thread to send and also stores the data message in the local file. When the file is full of 100 pieces of collection, close the file, create a new local file, and start to save the collection data. The file name is named by the time stamp corresponding to the first record.(8)
The data sending thread obtains the data message put in by the data collection thread from the memory and then sends it to the web information management module on the server through the socket communication connection.(9)
After the web information management module receives 100 collection data messages, it sends a receiving confirmation message through the network communication socket. After receiving the confirmation message, the receiving confirmation thread informs the data collection thread to delete the local files corresponding to the 100 collection data, so as to avoid the local storage space being filled up after too many files [26].


#### 2.1.4. Design of Information Management Module Based on Web

The web-based information management module is deployed on the server, which mainly realizes the following functions: communicating with the lower computer based on arm and Linux, receiving the collected ecological environment monitoring network data, and storing the data in the database; interacting with the user, providing the functions of browsing, and downloading the collected data [27–29]. The information management module based on web is realized by ASP.NET and C# programming language [30, 31]. Microsoft SQL Server 2005 database is used to store information, and MVC mode is used to design the architecture of the whole web module. ASP.NET includes all kinds of services necessary for generating enterprise level web applications with as little code as possible. It has the characteristics of excellent upgrade, stability, faster development, easier management, brand-new language, and network services. Microsoft SQL Server 2005 is a comprehensive database platform, which uses integrated business intelligence tools to realize enterprise level data management, provides more secure and reliable storage functions for relational data and structured data, and has functions such as analysis, report, integration, and knowledge [32–34].The information management module based on web adopts the design pattern of MVC and clearly divides each level of web module. Specifically, the model layer is responsible for the realization of the business logic function of the module [35, 36]. The view layer includes an interface that provides user access. The control level is mainly responsible for the control of the process. MVC pattern has many advantages, such as low coupling, high reusability, applicability, low life cycle cost, rapid deployment, and maintainability [37, 38]. The MVC mode is shown in Figure 7.Figure 7
MVC mode.The collected ecological environment monitoring network data is converted through the ad embedded module in the arm and Linux software, and sent to the web server through the 3G router. The collected data are received and saved by the information management module deployed on the web server. The information management module deployed on the web server receives and saves the collected data.


### 2.2. Correction of Data Static Weight Correction Coefficient

#### 2.2.1. Correction under the Change of Location Area Size

The static weight correction coefficient is used to modify the collected ecological environment monitoring network node data. The optimal weight correction coefficient is generally obtained between0,4, which has an important impact on the quality of node positioning. Under the same location conditions, when the size of the location area, the number of reference nodes, the intensity of air interference and the number of obstacles change, it is necessary to modify the static weight value correction coefficient. Firstly, the change of the size of the location area is corrected. In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area [39]. For the Gaussian white noise with the mean increase of signal strength of 0 and the variance of 1, the weight correction coefficient increases in steps of 0.1 within 0,4 and gradually traverses the interval value. The size of the location area is 10 m × 10 m, 20 m × 20 m, and 30 m × 30 m, respectively, and the simulation results are shown in Figure 8.Figure 8
Impact diagram of location area size.According to the simulation results of the influence of the change of the size of the positioning area on the static weight correction coefficient, the static weight correction coefficient is corrected, and the correction results are shown in Table1.Table 1
Static weight correction coefficient correction results of positioning area size.
Location area (m2)Error rangeOptimal weight correction coefficient10 × 101.31–1.711.920 × 201.67–2.122.030 × 302.05–2.592.1It can be seen from Table1 that when the size of positioning area changes, because the number of reference nodes is determined, the larger the positioning area is, the smaller the distribution density of reference nodes is, and the less the number of reference nodes selected by unknown nodes is, the greater the positioning error is, and the larger the positioning error is, the larger the static weight correction coefficient is. On the contrary, the smaller the location area, the smaller the static weight correction coefficient, and the smaller the location error.


#### 2.2.2. Correction under the Influence of Obstacles

In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area. In the location area of 10 m × 10 m, for the Gaussian white noise with the mean value of signal strength increase of 0 and variance of 1, the weight correction coefficient increases in steps of 0.1 within0,4, and gradually values are traversed [40]. At the same time, the number of people in the location area increases from 1, 2, and 3, and the obstacles are randomly determined; the simulation results are shown in Figure 9.Figure 9
Obstacle impact diagram.As shown in Table2, when the number of obstacles changes, the wireless signal will reflect when encountering obstacles, which will result in the error of the signal strength received by the receiving node, thus affecting the positioning results. The more the number of obstacles, the larger the static weight correction coefficient, which shows that under the influence of the number of obstacles, the correction direction of the static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.Table 2
Correction results of static weight correction coefficient under the change of the number of obstacles.
Number of obstaclesError rangeOptimal weight correction coefficient11.42–1.751.921.71–2.922.032.01–2.392.1


#### 2.2.3. Correction under the Influence of Air Interference Intensity

In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area, and the size of the location area is within the range of l0 m × l0 m. For the Gaussian white noise with the mean value of signal strength increase of 0 and the variance increasing from 1, 2, 3, 4, and 5, respectively, the weight correction coefficient is 0.1 in step within0,4, and it is gradually traversed from the value within the interval. The simulation results are shown in Figure 10.Figure 10
Interference intensity influence diagram.The simulation results of the influence of the variance of Gaussian distribution on the static weight correction coefficient are sorted out, as shown in Table3.Table 3
Correction results of static weight correction coefficient under the influence of air interference intensity.
Variance (σ2)Error rangeOptimal weight correction coefficient11.36–1.741.931.59–1.922.051.83–2.122.172.10–2.282.292.21–2.492.3It can be seen from Table3 that when the variance of Gaussian white noise changes, as the interference intensity received by the sensor node increases, the interference generated by the signal intensity value received by the receiving node also increases, and the positioning accuracy of the unknown node will produce errors. When the variance of Gaussian white noise is larger, the static weight correction coefficient is larger, which shows that under the influence of air interference intensity, the correction direction of static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.


#### 2.2.4. Correction under the Influence of the Number of Reference Nodes

In the MATLAB simulation environment, the size of the positioning area is within the range of 10 m × 10 m. For the Gaussian white noise with the mean value of signal strength increase of 0 and the variance of 1, the number of reference nodes increases gradually from 10, 15, 20, 25, and 30, and the weight correction coefficient traverses in steps of 0.1 within0,4. The simulation results are shown in Figure 11.Figure 11
Reference node number influence chart.The simulation results of the influence of the number of different reference nodes on the static weight correction coefficient are sorted out, as shown in Table4.Table 4
Correction results of static weight correction coefficient under the influence of number of reference nodes.
Number of reference nodesError rangeOptimal weight correction coefficient101.36–1.692.1151.23–1.502.1201.08–1.232.0250.91–1.152.0300.77–0.961.9It can be seen from Table4 that when the number of reference nodes changes, the number of reference nodes increases due to the constant location area, that is, the density of reference nodes in unit area increases, and the number of unknown reference nodes increases, so the more accurate the signal strength value received by the unknown nodes, the more accurate the positioning accuracy. When the signal strength value received by the unknown node is more accurate, the static weight correction coefficient is smaller, which shows that under the influence of the number of reference nodes, the correction direction of the static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.


### 2.3. Realizing Node Positioning

#### 2.3.1. Node Linear Distance Ranging

According to the results of the static weight correction coefficient, the distance between the nodes of the ecological environment monitoring network is measured by DV-HOP algorithm, which includes two stages [41–43].In the first stage, using the wireless sensor network architecture, through the typical distance vector exchange protocol, each reference node in the ecological environment monitoring network broadcasts its own location information group to the neighbor node, so that other reference nodes in the ecological environment monitoring network can obtain the minimum hop information of the reference node [44–47]. The architecture of wireless sensor network is shown in Figure 12.Figure 12
Wireless sensor network architecture.L1, L2, and L3 represent three reference nodes with known positions, the rest are unknown nodes, and unknown node A is located by three reference nodes.In the second stage, each reference node uses the location information of other reference nodes and the minimum number of route hops to calculate the average distance of each hop. For unknown node a, its distance to reference nodesL1, L2, and L3 is obtained by multiplying the average minimum number of hops by the average distance of each hop. The specific formula is as follows:(1)d^1=3×HS1D,d^2=2×HS2D,d^3=3×HS3D,where d^1 represents the distance from unknown node A to reference node Ll; d^2 represents the distance from unknown node A to reference node L2; d^3 represents the distance from unknown node A to reference node L3; HS1D represents the average per hop distance calculated based on reference node Ll; HS2D represents the average per hop distance calculated based on reference node L2; and HS3D represents the flat distance calculated based on reference node L3. Every jump distance represents the average per hop distance calculated based on reference node L3.After calculating the average per hop distance of communication between the reference nodes in this range, it is broadcast to the unknown nodes in the network. The unknown node is used to locate itself after receiving these data [48, 49]. The unknown node will receive the average per hop distance from all the reference nodes. The average per hop distance from each reference node can reflect the node density of the reference node. Because the average hop distance calculated by each reference node is different, the DV-HOP algorithm is improved by using weighted average to reduce the overall error range [50–52]. Through the weighted process, the average hop distance of unknown nodes can be reflected from the average hop distance of multiple beacon nodes. The weighted average hop distance is closer to the actual average hop distance of the network [53–57].


#### 2.3.2. Node Location of Ecological Environment Monitoring Network

Based on the obtained results, the nodes of the ecological environment monitoring network are located by the trilateral positioning method. The principle of trilateral positioning method is shown in Figure13.Figure 13
Principle of trilateral positioning method.Equation (2) can be listed according to the distance formula between two points:(2)xa−x2+ya−y2=da2,xb−x2+yb−y2=db2,xc−x2+yc−y2=dc2.Among them,xa and ya represent the left and right coordinates of reference node A; xb and yb represent the left and right coordinates of reference node B; xc and yc represent the left and right coordinates of reference node C; x and y represent the left and right coordinates of unknown node D; and da, db, and dc are the distances from D to three reference nodes A, B, and C obtained by the same ranging algorithm.By solving the equation, the coordinates of the unknown nodes can be obtained, and the nodes of the ecological environment monitoring network can be located.


## 2.1. Construction of Node Data Acquisition Model

Based on Zigbee, the node data collection model of ecological environment monitoring network is constructed, and the node data of ecological environment monitoring network are automatically collected by installing different types of sensors and sent to the server. The structure of Zigbee protocol is shown in Figure1.Figure 1
Structure and division of labor of Zigbee protocol.The node data collection model of the ecological environment monitoring network can be divided into four modules in terms of function, namely, Zigbee wireless sensor network module based on star topology, embedded module based on ARM and Linux, breakpoint continuous transmission processing module, and information management module based on web [12, 13]. Zigbee wireless sensor network module adopts a star topology structure, which can collect and summarize various data of ecological environment monitoring network to the main node in a wide range; embedded module based on ARM and Linux is deployed on the main node, which is mainly responsible for processing and packaging the collected data, which are sent to the server by 3G router after AD conversion; breakpoint continuous transmission processing module is enough to send the lagging data to the server to ensure the integrity of the collected data; the web-based information management module is deployed on the web server to realize the functions of receiving data, querying, and downloading data [14]. The framework of the node data collection model of the ecological environment monitoring network is shown in Figure 2.Figure 2
Framework of node data collection model of ecological environment monitoring network.


### 2.1.1. Design of Zigbee Wireless Sensor Network Module

In Zigbee wireless sensor network module based on star topology, the slave node communicates with the master node directly. The slave node is mainly used in the network distribution scene with short distance and more monitoring positions [15]. The specific structure of Zigbee wireless sensor network is shown in Figure 3.Figure 3
Specific structure of Zigbee wireless sensor network.The master node plays the coordination function in Zigbee wireless sensor network. The main node is the convergence node of the network, and the physical device used is the full-function device FFD, which can communicate with other devices in the network through software design [16–18]. In Zigbee wireless sensor network, the slave node uses the simplified function device RFD, which can complete the communication function with the master node. JN5139 chip is used in sensor network nodes. JN5139 chip is a low-power, low-cost wireless microcontroller, which is suitable for Zigbee applications. JN5139 chip integrates 32-bit RISC reduced instruction set processor, fully compatible with 2.4 GHz IEEE802.15.4 wireless transceiver, 96 kb RAM, 192 kb ROM, and a variety of mixed analog and digital external devices. The ROM and RAM architecture of JN5139 chip supports the storage system software, including protocol stack, routing table, application code and data, and so on. On the other hand, based on the special Jennic development tools, Zigbee network platform can be built conveniently and quickly and can be easily integrated into the product, so as to help developers develop stable programs in a short time, shorten the product development cycle, and reduce the development difficulty and cost [19]. The specific block diagram of JN5139 is shown in Figure 4.Figure 4
Specific block diagram of JN5139 chip.Zigbee wireless sensor network module is equipped with RS-485 interface and RS-232 interface, which can form a system with RS485, Ethernet, RS232, and GPRS according to specific application. The communication between RFD and FFD adopts the special development tool Jennic suite, and the programming language of Zigbee wireless sensor network module is C language. In Zigbee wireless sensor network, each master device can communicate with 2–4 slave devices, and each slave device can connect up to 16 sensors, which can meet the actual application requirements of data collection of ecological environment monitoring network. The slave device first collects the data of the ecological environment monitoring network and then transmits the collected data to the master device. After receiving the data from the device, the master device first summarizes the data and then sends the summarized data to the arm board [20, 21]. After receiving the data, the arm board converts the data into binary format and sends it to the web information management module on the server [22]. The transmission data flow of the main equipment is shown in Figure 5.Figure 5
Transmission data flow of main equipment.


### 2.1.2. Design of Embedded Module Based on Arm and Linux

The embedded module based on arm and Linux is the lower computer of the node data collection model of the ecological environment monitoring network [23, 24]. The arm data acquisition board consists of a core board and an expansion board connected by a connector. The core board is a 6-layer board, mainly including the core circuit of arm system such as the main controller, memory SDRAM, power and clock circuit, and flash of stored program. The expansion board is equipped with a memory controller and various interfaces that can communicate with external devices. Its memory controller includes 32 MB SDRAM, 64 MB NandFlash, and 4 MB NorFlash memory modules; It has two USB2.0 interfaces, a debugging port, and two data serial ports, as well as a 10/100 M adaptive Ethernet port and multiple GPIO ports. The expansion board is also equipped with RTC clock, power supply, and other auxiliary circuits. Among them, the 10/100 M self-adaptive Ethernet port is used for network transmission of data, the USB interface is used for local data storage and connecting the USB interface micro-camera, the serial port is mainly used to connect the Zigbee main node, and the multi-channel GPIO interface is mainly used to output control instructions and control the auxiliary equipment. The control panel of the arm board is shown in Figure 6.Figure 6
Control panel of arm board.The Linux operating system is a cross platform system, which can adapt to a variety of CPUs and hardware platforms, support multi-user, multi-task, multi-thread, and multi-CPU, and support 32-bit and 64-bit hardware [25].


### 2.1.3. Design of Breakpoint Continuous Transmission Processing Module

The overall design of the breakpoint continuous transmission processing module is as follows:(1)
Start the main thread and initialize global variables.(2)
The main thread starts the data collection thread, data sending thread, receiving confirmation thread, and breakpoint renewal thread.(3)
The main thread establishes a network communication socket with the web information management module on the server.(4)
After the network communication socket is established, the web information management module on the server will send the last received collection data timestamp through the network communication socket.(5)
The receiving confirmation thread receives the time stamp sent by the web information management module and compares the time stamp with the collected data saved in the local file. If the time stamp of some collected data is greater than the time stamp sent by the web information management module, the collected data will not be sent to the server directly, but will be sent to the server by the breakpoint update thread notified by the receiving confirmation thread.(6)
The data acquisition thread collects the value of each channel sensor of each Zigbee node and forms the data message according to the format of the collected data. The header of the message includes the time stamp of month, day, hour, and minute.(7)
The data collection thread writes the data message into the memory for the data sending thread to send and also stores the data message in the local file. When the file is full of 100 pieces of collection, close the file, create a new local file, and start to save the collection data. The file name is named by the time stamp corresponding to the first record.(8)
The data sending thread obtains the data message put in by the data collection thread from the memory and then sends it to the web information management module on the server through the socket communication connection.(9)
After the web information management module receives 100 collection data messages, it sends a receiving confirmation message through the network communication socket. After receiving the confirmation message, the receiving confirmation thread informs the data collection thread to delete the local files corresponding to the 100 collection data, so as to avoid the local storage space being filled up after too many files [26].


### 2.1.4. Design of Information Management Module Based on Web

The web-based information management module is deployed on the server, which mainly realizes the following functions: communicating with the lower computer based on arm and Linux, receiving the collected ecological environment monitoring network data, and storing the data in the database; interacting with the user, providing the functions of browsing, and downloading the collected data [27–29]. The information management module based on web is realized by ASP.NET and C# programming language [30, 31]. Microsoft SQL Server 2005 database is used to store information, and MVC mode is used to design the architecture of the whole web module. ASP.NET includes all kinds of services necessary for generating enterprise level web applications with as little code as possible. It has the characteristics of excellent upgrade, stability, faster development, easier management, brand-new language, and network services. Microsoft SQL Server 2005 is a comprehensive database platform, which uses integrated business intelligence tools to realize enterprise level data management, provides more secure and reliable storage functions for relational data and structured data, and has functions such as analysis, report, integration, and knowledge [32–34].The information management module based on web adopts the design pattern of MVC and clearly divides each level of web module. Specifically, the model layer is responsible for the realization of the business logic function of the module [35, 36]. The view layer includes an interface that provides user access. The control level is mainly responsible for the control of the process. MVC pattern has many advantages, such as low coupling, high reusability, applicability, low life cycle cost, rapid deployment, and maintainability [37, 38]. The MVC mode is shown in Figure 7.Figure 7
MVC mode.The collected ecological environment monitoring network data is converted through the ad embedded module in the arm and Linux software, and sent to the web server through the 3G router. The collected data are received and saved by the information management module deployed on the web server. The information management module deployed on the web server receives and saves the collected data.


## 2.1.1. Design of Zigbee Wireless Sensor Network Module

In Zigbee wireless sensor network module based on star topology, the slave node communicates with the master node directly. The slave node is mainly used in the network distribution scene with short distance and more monitoring positions [15]. The specific structure of Zigbee wireless sensor network is shown in Figure 3.Figure 3
Specific structure of Zigbee wireless sensor network.The master node plays the coordination function in Zigbee wireless sensor network. The main node is the convergence node of the network, and the physical device used is the full-function device FFD, which can communicate with other devices in the network through software design [16–18]. In Zigbee wireless sensor network, the slave node uses the simplified function device RFD, which can complete the communication function with the master node. JN5139 chip is used in sensor network nodes. JN5139 chip is a low-power, low-cost wireless microcontroller, which is suitable for Zigbee applications. JN5139 chip integrates 32-bit RISC reduced instruction set processor, fully compatible with 2.4 GHz IEEE802.15.4 wireless transceiver, 96 kb RAM, 192 kb ROM, and a variety of mixed analog and digital external devices. The ROM and RAM architecture of JN5139 chip supports the storage system software, including protocol stack, routing table, application code and data, and so on. On the other hand, based on the special Jennic development tools, Zigbee network platform can be built conveniently and quickly and can be easily integrated into the product, so as to help developers develop stable programs in a short time, shorten the product development cycle, and reduce the development difficulty and cost [19]. The specific block diagram of JN5139 is shown in Figure 4.Figure 4
Specific block diagram of JN5139 chip.Zigbee wireless sensor network module is equipped with RS-485 interface and RS-232 interface, which can form a system with RS485, Ethernet, RS232, and GPRS according to specific application. The communication between RFD and FFD adopts the special development tool Jennic suite, and the programming language of Zigbee wireless sensor network module is C language. In Zigbee wireless sensor network, each master device can communicate with 2–4 slave devices, and each slave device can connect up to 16 sensors, which can meet the actual application requirements of data collection of ecological environment monitoring network. The slave device first collects the data of the ecological environment monitoring network and then transmits the collected data to the master device. After receiving the data from the device, the master device first summarizes the data and then sends the summarized data to the arm board [20, 21]. After receiving the data, the arm board converts the data into binary format and sends it to the web information management module on the server [22]. The transmission data flow of the main equipment is shown in Figure 5.Figure 5
Transmission data flow of main equipment.


## 2.1.2. Design of Embedded Module Based on Arm and Linux

The embedded module based on arm and Linux is the lower computer of the node data collection model of the ecological environment monitoring network [23, 24]. The arm data acquisition board consists of a core board and an expansion board connected by a connector. The core board is a 6-layer board, mainly including the core circuit of arm system such as the main controller, memory SDRAM, power and clock circuit, and flash of stored program. The expansion board is equipped with a memory controller and various interfaces that can communicate with external devices. Its memory controller includes 32 MB SDRAM, 64 MB NandFlash, and 4 MB NorFlash memory modules; It has two USB2.0 interfaces, a debugging port, and two data serial ports, as well as a 10/100 M adaptive Ethernet port and multiple GPIO ports. The expansion board is also equipped with RTC clock, power supply, and other auxiliary circuits. Among them, the 10/100 M self-adaptive Ethernet port is used for network transmission of data, the USB interface is used for local data storage and connecting the USB interface micro-camera, the serial port is mainly used to connect the Zigbee main node, and the multi-channel GPIO interface is mainly used to output control instructions and control the auxiliary equipment. The control panel of the arm board is shown in Figure 6.Figure 6
Control panel of arm board.The Linux operating system is a cross platform system, which can adapt to a variety of CPUs and hardware platforms, support multi-user, multi-task, multi-thread, and multi-CPU, and support 32-bit and 64-bit hardware [25].


## 2.1.3. Design of Breakpoint Continuous Transmission Processing Module

The overall design of the breakpoint continuous transmission processing module is as follows:(1)
Start the main thread and initialize global variables.(2)
The main thread starts the data collection thread, data sending thread, receiving confirmation thread, and breakpoint renewal thread.(3)
The main thread establishes a network communication socket with the web information management module on the server.(4)
After the network communication socket is established, the web information management module on the server will send the last received collection data timestamp through the network communication socket.(5)
The receiving confirmation thread receives the time stamp sent by the web information management module and compares the time stamp with the collected data saved in the local file. If the time stamp of some collected data is greater than the time stamp sent by the web information management module, the collected data will not be sent to the server directly, but will be sent to the server by the breakpoint update thread notified by the receiving confirmation thread.(6)
The data acquisition thread collects the value of each channel sensor of each Zigbee node and forms the data message according to the format of the collected data. The header of the message includes the time stamp of month, day, hour, and minute.(7)
The data collection thread writes the data message into the memory for the data sending thread to send and also stores the data message in the local file. When the file is full of 100 pieces of collection, close the file, create a new local file, and start to save the collection data. The file name is named by the time stamp corresponding to the first record.(8)
The data sending thread obtains the data message put in by the data collection thread from the memory and then sends it to the web information management module on the server through the socket communication connection.(9)
After the web information management module receives 100 collection data messages, it sends a receiving confirmation message through the network communication socket. After receiving the confirmation message, the receiving confirmation thread informs the data collection thread to delete the local files corresponding to the 100 collection data, so as to avoid the local storage space being filled up after too many files [26].


## 2.1.4. Design of Information Management Module Based on Web

The web-based information management module is deployed on the server, which mainly realizes the following functions: communicating with the lower computer based on arm and Linux, receiving the collected ecological environment monitoring network data, and storing the data in the database; interacting with the user, providing the functions of browsing, and downloading the collected data [27–29]. The information management module based on web is realized by ASP.NET and C# programming language [30, 31]. Microsoft SQL Server 2005 database is used to store information, and MVC mode is used to design the architecture of the whole web module. ASP.NET includes all kinds of services necessary for generating enterprise level web applications with as little code as possible. It has the characteristics of excellent upgrade, stability, faster development, easier management, brand-new language, and network services. Microsoft SQL Server 2005 is a comprehensive database platform, which uses integrated business intelligence tools to realize enterprise level data management, provides more secure and reliable storage functions for relational data and structured data, and has functions such as analysis, report, integration, and knowledge [32–34].The information management module based on web adopts the design pattern of MVC and clearly divides each level of web module. Specifically, the model layer is responsible for the realization of the business logic function of the module [35, 36]. The view layer includes an interface that provides user access. The control level is mainly responsible for the control of the process. MVC pattern has many advantages, such as low coupling, high reusability, applicability, low life cycle cost, rapid deployment, and maintainability [37, 38]. The MVC mode is shown in Figure 7.Figure 7
MVC mode.The collected ecological environment monitoring network data is converted through the ad embedded module in the arm and Linux software, and sent to the web server through the 3G router. The collected data are received and saved by the information management module deployed on the web server. The information management module deployed on the web server receives and saves the collected data.


## 2.2. Correction of Data Static Weight Correction Coefficient

### 2.2.1. Correction under the Change of Location Area Size

The static weight correction coefficient is used to modify the collected ecological environment monitoring network node data. The optimal weight correction coefficient is generally obtained between0,4, which has an important impact on the quality of node positioning. Under the same location conditions, when the size of the location area, the number of reference nodes, the intensity of air interference and the number of obstacles change, it is necessary to modify the static weight value correction coefficient. Firstly, the change of the size of the location area is corrected. In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area [39]. For the Gaussian white noise with the mean increase of signal strength of 0 and the variance of 1, the weight correction coefficient increases in steps of 0.1 within 0,4 and gradually traverses the interval value. The size of the location area is 10 m × 10 m, 20 m × 20 m, and 30 m × 30 m, respectively, and the simulation results are shown in Figure 8.Figure 8
Impact diagram of location area size.According to the simulation results of the influence of the change of the size of the positioning area on the static weight correction coefficient, the static weight correction coefficient is corrected, and the correction results are shown in Table1.Table 1
Static weight correction coefficient correction results of positioning area size.
Location area (m2)Error rangeOptimal weight correction coefficient10 × 101.31–1.711.920 × 201.67–2.122.030 × 302.05–2.592.1It can be seen from Table1 that when the size of positioning area changes, because the number of reference nodes is determined, the larger the positioning area is, the smaller the distribution density of reference nodes is, and the less the number of reference nodes selected by unknown nodes is, the greater the positioning error is, and the larger the positioning error is, the larger the static weight correction coefficient is. On the contrary, the smaller the location area, the smaller the static weight correction coefficient, and the smaller the location error.


### 2.2.2. Correction under the Influence of Obstacles

In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area. In the location area of 10 m × 10 m, for the Gaussian white noise with the mean value of signal strength increase of 0 and variance of 1, the weight correction coefficient increases in steps of 0.1 within0,4, and gradually values are traversed [40]. At the same time, the number of people in the location area increases from 1, 2, and 3, and the obstacles are randomly determined; the simulation results are shown in Figure 9.Figure 9
Obstacle impact diagram.As shown in Table2, when the number of obstacles changes, the wireless signal will reflect when encountering obstacles, which will result in the error of the signal strength received by the receiving node, thus affecting the positioning results. The more the number of obstacles, the larger the static weight correction coefficient, which shows that under the influence of the number of obstacles, the correction direction of the static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.Table 2
Correction results of static weight correction coefficient under the change of the number of obstacles.
Number of obstaclesError rangeOptimal weight correction coefficient11.42–1.751.921.71–2.922.032.01–2.392.1


### 2.2.3. Correction under the Influence of Air Interference Intensity

In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area, and the size of the location area is within the range of l0 m × l0 m. For the Gaussian white noise with the mean value of signal strength increase of 0 and the variance increasing from 1, 2, 3, 4, and 5, respectively, the weight correction coefficient is 0.1 in step within0,4, and it is gradually traversed from the value within the interval. The simulation results are shown in Figure 10.Figure 10
Interference intensity influence diagram.The simulation results of the influence of the variance of Gaussian distribution on the static weight correction coefficient are sorted out, as shown in Table3.Table 3
Correction results of static weight correction coefficient under the influence of air interference intensity.
Variance (σ2)Error rangeOptimal weight correction coefficient11.36–1.741.931.59–1.922.051.83–2.122.172.10–2.282.292.21–2.492.3It can be seen from Table3 that when the variance of Gaussian white noise changes, as the interference intensity received by the sensor node increases, the interference generated by the signal intensity value received by the receiving node also increases, and the positioning accuracy of the unknown node will produce errors. When the variance of Gaussian white noise is larger, the static weight correction coefficient is larger, which shows that under the influence of air interference intensity, the correction direction of static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.


### 2.2.4. Correction under the Influence of the Number of Reference Nodes

In the MATLAB simulation environment, the size of the positioning area is within the range of 10 m × 10 m. For the Gaussian white noise with the mean value of signal strength increase of 0 and the variance of 1, the number of reference nodes increases gradually from 10, 15, 20, 25, and 30, and the weight correction coefficient traverses in steps of 0.1 within0,4. The simulation results are shown in Figure 11.Figure 11
Reference node number influence chart.The simulation results of the influence of the number of different reference nodes on the static weight correction coefficient are sorted out, as shown in Table4.Table 4
Correction results of static weight correction coefficient under the influence of number of reference nodes.
Number of reference nodesError rangeOptimal weight correction coefficient101.36–1.692.1151.23–1.502.1201.08–1.232.0250.91–1.152.0300.77–0.961.9It can be seen from Table4 that when the number of reference nodes changes, the number of reference nodes increases due to the constant location area, that is, the density of reference nodes in unit area increases, and the number of unknown reference nodes increases, so the more accurate the signal strength value received by the unknown nodes, the more accurate the positioning accuracy. When the signal strength value received by the unknown node is more accurate, the static weight correction coefficient is smaller, which shows that under the influence of the number of reference nodes, the correction direction of the static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.


## 2.2.1. Correction under the Change of Location Area Size

The static weight correction coefficient is used to modify the collected ecological environment monitoring network node data. The optimal weight correction coefficient is generally obtained between0,4, which has an important impact on the quality of node positioning. Under the same location conditions, when the size of the location area, the number of reference nodes, the intensity of air interference and the number of obstacles change, it is necessary to modify the static weight value correction coefficient. Firstly, the change of the size of the location area is corrected. In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area [39]. For the Gaussian white noise with the mean increase of signal strength of 0 and the variance of 1, the weight correction coefficient increases in steps of 0.1 within 0,4 and gradually traverses the interval value. The size of the location area is 10 m × 10 m, 20 m × 20 m, and 30 m × 30 m, respectively, and the simulation results are shown in Figure 8.Figure 8
Impact diagram of location area size.According to the simulation results of the influence of the change of the size of the positioning area on the static weight correction coefficient, the static weight correction coefficient is corrected, and the correction results are shown in Table1.Table 1
Static weight correction coefficient correction results of positioning area size.
Location area (m2)Error rangeOptimal weight correction coefficient10 × 101.31–1.711.920 × 201.67–2.122.030 × 302.05–2.592.1It can be seen from Table1 that when the size of positioning area changes, because the number of reference nodes is determined, the larger the positioning area is, the smaller the distribution density of reference nodes is, and the less the number of reference nodes selected by unknown nodes is, the greater the positioning error is, and the larger the positioning error is, the larger the static weight correction coefficient is. On the contrary, the smaller the location area, the smaller the static weight correction coefficient, and the smaller the location error.


## 2.2.2. Correction under the Influence of Obstacles

In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area. In the location area of 10 m × 10 m, for the Gaussian white noise with the mean value of signal strength increase of 0 and variance of 1, the weight correction coefficient increases in steps of 0.1 within0,4, and gradually values are traversed [40]. At the same time, the number of people in the location area increases from 1, 2, and 3, and the obstacles are randomly determined; the simulation results are shown in Figure 9.Figure 9
Obstacle impact diagram.As shown in Table2, when the number of obstacles changes, the wireless signal will reflect when encountering obstacles, which will result in the error of the signal strength received by the receiving node, thus affecting the positioning results. The more the number of obstacles, the larger the static weight correction coefficient, which shows that under the influence of the number of obstacles, the correction direction of the static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.Table 2
Correction results of static weight correction coefficient under the change of the number of obstacles.
Number of obstaclesError rangeOptimal weight correction coefficient11.42–1.751.921.71–2.922.032.01–2.392.1


## 2.2.3. Correction under the Influence of Air Interference Intensity

In the MATLAB simulation environment, 10 reference nodes and 2 unknown nodes are randomly deployed in the location area, and the size of the location area is within the range of l0 m × l0 m. For the Gaussian white noise with the mean value of signal strength increase of 0 and the variance increasing from 1, 2, 3, 4, and 5, respectively, the weight correction coefficient is 0.1 in step within0,4, and it is gradually traversed from the value within the interval. The simulation results are shown in Figure 10.Figure 10
Interference intensity influence diagram.The simulation results of the influence of the variance of Gaussian distribution on the static weight correction coefficient are sorted out, as shown in Table3.Table 3
Correction results of static weight correction coefficient under the influence of air interference intensity.
Variance (σ2)Error rangeOptimal weight correction coefficient11.36–1.741.931.59–1.922.051.83–2.122.172.10–2.282.292.21–2.492.3It can be seen from Table3 that when the variance of Gaussian white noise changes, as the interference intensity received by the sensor node increases, the interference generated by the signal intensity value received by the receiving node also increases, and the positioning accuracy of the unknown node will produce errors. When the variance of Gaussian white noise is larger, the static weight correction coefficient is larger, which shows that under the influence of air interference intensity, the correction direction of static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.


## 2.2.4. Correction under the Influence of the Number of Reference Nodes

In the MATLAB simulation environment, the size of the positioning area is within the range of 10 m × 10 m. For the Gaussian white noise with the mean value of signal strength increase of 0 and the variance of 1, the number of reference nodes increases gradually from 10, 15, 20, 25, and 30, and the weight correction coefficient traverses in steps of 0.1 within0,4. The simulation results are shown in Figure 11.Figure 11
Reference node number influence chart.The simulation results of the influence of the number of different reference nodes on the static weight correction coefficient are sorted out, as shown in Table4.Table 4
Correction results of static weight correction coefficient under the influence of number of reference nodes.
Number of reference nodesError rangeOptimal weight correction coefficient101.36–1.692.1151.23–1.502.1201.08–1.232.0250.91–1.152.0300.77–0.961.9It can be seen from Table4 that when the number of reference nodes changes, the number of reference nodes increases due to the constant location area, that is, the density of reference nodes in unit area increases, and the number of unknown reference nodes increases, so the more accurate the signal strength value received by the unknown nodes, the more accurate the positioning accuracy. When the signal strength value received by the unknown node is more accurate, the static weight correction coefficient is smaller, which shows that under the influence of the number of reference nodes, the correction direction of the static weight correction coefficient is that the smaller the static weight correction coefficient is, the smaller the positioning error is.


## 2.3. Realizing Node Positioning

### 2.3.1. Node Linear Distance Ranging

According to the results of the static weight correction coefficient, the distance between the nodes of the ecological environment monitoring network is measured by DV-HOP algorithm, which includes two stages [41–43].In the first stage, using the wireless sensor network architecture, through the typical distance vector exchange protocol, each reference node in the ecological environment monitoring network broadcasts its own location information group to the neighbor node, so that other reference nodes in the ecological environment monitoring network can obtain the minimum hop information of the reference node [44–47]. The architecture of wireless sensor network is shown in Figure 12.Figure 12
Wireless sensor network architecture.L1, L2, and L3 represent three reference nodes with known positions, the rest are unknown nodes, and unknown node A is located by three reference nodes.In the second stage, each reference node uses the location information of other reference nodes and the minimum number of route hops to calculate the average distance of each hop. For unknown node a, its distance to reference nodesL1, L2, and L3 is obtained by multiplying the average minimum number of hops by the average distance of each hop. The specific formula is as follows:(1)d^1=3×HS1D,d^2=2×HS2D,d^3=3×HS3D,where d^1 represents the distance from unknown node A to reference node Ll; d^2 represents the distance from unknown node A to reference node L2; d^3 represents the distance from unknown node A to reference node L3; HS1D represents the average per hop distance calculated based on reference node Ll; HS2D represents the average per hop distance calculated based on reference node L2; and HS3D represents the flat distance calculated based on reference node L3. Every jump distance represents the average per hop distance calculated based on reference node L3.After calculating the average per hop distance of communication between the reference nodes in this range, it is broadcast to the unknown nodes in the network. The unknown node is used to locate itself after receiving these data [48, 49]. The unknown node will receive the average per hop distance from all the reference nodes. The average per hop distance from each reference node can reflect the node density of the reference node. Because the average hop distance calculated by each reference node is different, the DV-HOP algorithm is improved by using weighted average to reduce the overall error range [50–52]. Through the weighted process, the average hop distance of unknown nodes can be reflected from the average hop distance of multiple beacon nodes. The weighted average hop distance is closer to the actual average hop distance of the network [53–57].


### 2.3.2. Node Location of Ecological Environment Monitoring Network

Based on the obtained results, the nodes of the ecological environment monitoring network are located by the trilateral positioning method. The principle of trilateral positioning method is shown in Figure13.Figure 13
Principle of trilateral positioning method.Equation (2) can be listed according to the distance formula between two points:(2)xa−x2+ya−y2=da2,xb−x2+yb−y2=db2,xc−x2+yc−y2=dc2.Among them,xa and ya represent the left and right coordinates of reference node A; xb and yb represent the left and right coordinates of reference node B; xc and yc represent the left and right coordinates of reference node C; x and y represent the left and right coordinates of unknown node D; and da, db, and dc are the distances from D to three reference nodes A, B, and C obtained by the same ranging algorithm.By solving the equation, the coordinates of the unknown nodes can be obtained, and the nodes of the ecological environment monitoring network can be located.


## 2.3.1. Node Linear Distance Ranging

According to the results of the static weight correction coefficient, the distance between the nodes of the ecological environment monitoring network is measured by DV-HOP algorithm, which includes two stages [41–43].In the first stage, using the wireless sensor network architecture, through the typical distance vector exchange protocol, each reference node in the ecological environment monitoring network broadcasts its own location information group to the neighbor node, so that other reference nodes in the ecological environment monitoring network can obtain the minimum hop information of the reference node [44–47]. The architecture of wireless sensor network is shown in Figure 12.Figure 12
Wireless sensor network architecture.L1, L2, and L3 represent three reference nodes with known positions, the rest are unknown nodes, and unknown node A is located by three reference nodes.In the second stage, each reference node uses the location information of other reference nodes and the minimum number of route hops to calculate the average distance of each hop. For unknown node a, its distance to reference nodesL1, L2, and L3 is obtained by multiplying the average minimum number of hops by the average distance of each hop. The specific formula is as follows:(1)d^1=3×HS1D,d^2=2×HS2D,d^3=3×HS3D,where d^1 represents the distance from unknown node A to reference node Ll; d^2 represents the distance from unknown node A to reference node L2; d^3 represents the distance from unknown node A to reference node L3; HS1D represents the average per hop distance calculated based on reference node Ll; HS2D represents the average per hop distance calculated based on reference node L2; and HS3D represents the flat distance calculated based on reference node L3. Every jump distance represents the average per hop distance calculated based on reference node L3.After calculating the average per hop distance of communication between the reference nodes in this range, it is broadcast to the unknown nodes in the network. The unknown node is used to locate itself after receiving these data [48, 49]. The unknown node will receive the average per hop distance from all the reference nodes. The average per hop distance from each reference node can reflect the node density of the reference node. Because the average hop distance calculated by each reference node is different, the DV-HOP algorithm is improved by using weighted average to reduce the overall error range [50–52]. Through the weighted process, the average hop distance of unknown nodes can be reflected from the average hop distance of multiple beacon nodes. The weighted average hop distance is closer to the actual average hop distance of the network [53–57].


## 2.3.2. Node Location of Ecological Environment Monitoring Network

Based on the obtained results, the nodes of the ecological environment monitoring network are located by the trilateral positioning method. The principle of trilateral positioning method is shown in Figure13.Figure 13
Principle of trilateral positioning method.Equation (2) can be listed according to the distance formula between two points:(2)xa−x2+ya−y2=da2,xb−x2+yb−y2=db2,xc−x2+yc−y2=dc2.Among them,xa and ya represent the left and right coordinates of reference node A; xb and yb represent the left and right coordinates of reference node B; xc and yc represent the left and right coordinates of reference node C; x and y represent the left and right coordinates of unknown node D; and da, db, and dc are the distances from D to three reference nodes A, B, and C obtained by the same ranging algorithm.By solving the equation, the coordinates of the unknown nodes can be obtained, and the nodes of the ecological environment monitoring network can be located.


## 3. Experimental Studies

### 3.1. Experimental Preparation

Firstly, the experimental test platform is built to realize the construction of Zigbee network and its connection with Wi-Fi network and then realize two-way communication, as shown in Figure14.Figure 14
Experimental test platform.The specific control protocol of the experimental test platform is shown in Table5.Table 5
Specific control protocol of experimental test platform.
HexadecimalDecimal systemControl objectState01H01LED1On/off02H02LED2On/off03H03LED3On/off04H04LED4On/off05H05LED5On/off06H06LED6On/off07H07LED7On/off08H08LED8On/off09H09LED1/3/5/7Full openOAH10LED1/3/5/7Full openOBH11LED2/4/6/8Full openOCH12LED1/3/5/7All passODH13All LEDFull openOEH14All LEDAll passOFH15On/offOpen/closeThe experimental node distribution is shown in Figure15.Figure 15
Node distribution of experiment.


### 3.2. Experiment and Result Analysis

In order to ensure the reliability of the experimental results, the real-time location and monitoring method of network node data under the metadata standard in literature [3] is taken as the traditional method, and the wireless network node location algorithm based on Gauss–Newton iterative estimation in literature [4] is taken as the comparison method. The comparison is made with the Zigbee-based ecological environment monitoring node location method designed in this paper. First, the node initialization performance is compared. The judgment of node initialization performance is based on the density of the node initialization distribution map. The denser the node initialization distribution is, the more the nodes are proved and the better the initialization performance is.The experimental results of node initialization performance of traditional ecological environment monitoring network node positioning method are shown in Figure16.Figure 16
Experimental results of node initialization performance of traditional methods.The experimental results of node initialization performance of the comparison method are shown in Figure17.Figure 17
Experimental results of node initialization performance of the comparison method.The experimental results of node initialization performance of Zigbee-based ecological environment monitoring network node positioning method are shown in Figure18.Figure 18
Experimental results of node initialization performance of this method.According to the experimental results of the node initialization performance in Figures16–18, the density of the node initialization distribution map of the traditional method and the comparison method is relatively scattered, while the density of the node initialization distribution map of the Zigbee-based ecological environment monitoring network node positioning method is very dense, which indicates that the node initialization performance of the proposed method is better than the first two methods.In order to further verify the accuracy of the proposed method, the positioning accuracy performance of the proposed method is compared with that of the traditional method and the comparison method. The results are shown in Figure19.Figure 19
Positioning accuracy comparison results.According to the experimental results of node positioning accuracy in Figure19, it can be seen that the measurement results of node positioning accuracy of the traditional method and the comparative method are unstable, high, and low, and the accuracy results are between 75% and 89%. The accuracy of the proposed method is about 98%, and the measurement results are stable, which indicates that the proposed method has high node positioning accuracy and stable results.


## 3.1. Experimental Preparation

Firstly, the experimental test platform is built to realize the construction of Zigbee network and its connection with Wi-Fi network and then realize two-way communication, as shown in Figure14.Figure 14
Experimental test platform.The specific control protocol of the experimental test platform is shown in Table5.Table 5
Specific control protocol of experimental test platform.
HexadecimalDecimal systemControl objectState01H01LED1On/off02H02LED2On/off03H03LED3On/off04H04LED4On/off05H05LED5On/off06H06LED6On/off07H07LED7On/off08H08LED8On/off09H09LED1/3/5/7Full openOAH10LED1/3/5/7Full openOBH11LED2/4/6/8Full openOCH12LED1/3/5/7All passODH13All LEDFull openOEH14All LEDAll passOFH15On/offOpen/closeThe experimental node distribution is shown in Figure15.Figure 15
Node distribution of experiment.


## 3.2. Experiment and Result Analysis

In order to ensure the reliability of the experimental results, the real-time location and monitoring method of network node data under the metadata standard in literature [3] is taken as the traditional method, and the wireless network node location algorithm based on Gauss–Newton iterative estimation in literature [4] is taken as the comparison method. The comparison is made with the Zigbee-based ecological environment monitoring node location method designed in this paper. First, the node initialization performance is compared. The judgment of node initialization performance is based on the density of the node initialization distribution map. The denser the node initialization distribution is, the more the nodes are proved and the better the initialization performance is.The experimental results of node initialization performance of traditional ecological environment monitoring network node positioning method are shown in Figure16.Figure 16
Experimental results of node initialization performance of traditional methods.The experimental results of node initialization performance of the comparison method are shown in Figure17.Figure 17
Experimental results of node initialization performance of the comparison method.The experimental results of node initialization performance of Zigbee-based ecological environment monitoring network node positioning method are shown in Figure18.Figure 18
Experimental results of node initialization performance of this method.According to the experimental results of the node initialization performance in Figures16–18, the density of the node initialization distribution map of the traditional method and the comparison method is relatively scattered, while the density of the node initialization distribution map of the Zigbee-based ecological environment monitoring network node positioning method is very dense, which indicates that the node initialization performance of the proposed method is better than the first two methods.In order to further verify the accuracy of the proposed method, the positioning accuracy performance of the proposed method is compared with that of the traditional method and the comparison method. The results are shown in Figure19.Figure 19
Positioning accuracy comparison results.According to the experimental results of node positioning accuracy in Figure19, it can be seen that the measurement results of node positioning accuracy of the traditional method and the comparative method are unstable, high, and low, and the accuracy results are between 75% and 89%. The accuracy of the proposed method is about 98%, and the measurement results are stable, which indicates that the proposed method has high node positioning accuracy and stable results.


## 4. Conclusions

Due to the poor initialization performance of the ecological environment monitoring network node positioning method, a Zigbee-based ecological environment monitoring network node positioning method is proposed to improve the accuracy of node positioning. Based on Zigbee, the node data collection model of the ecological environment monitoring network is constructed, and the nodes of the ecological environment monitoring network are located by the trilateral positioning method. The results show that the initialization performance of this method is better, the accuracy is about 98%, and it is stable. It is more suitable for the node location of ecological environment monitoring network. The improvement of node initialization performance is of great significance to the development of ecological environment monitoring network. It can improve the precision and real-time degree of ecological environment monitoring, reduce the tedious degree of human participation, and form a multi-level, multi-parameter, real-time, and fine ecological environment monitoring process.



---

*Source: 5854569-2022-10-10.xml*