Development and Coverage Evaluation of ZigBee-Based Wireless Network Applications

Network coverage is one of the basic issues for information collection and data processing in ZigBee-based wireless sensor networks. Each nodemay be randomly distributed in amonitoring area, reflecting the network event of tracking in ZigBee network applications. This paper presents the development and coverage evaluation of a ZigBee-based wireless network application. A stack structure node available for home service integration is proposed, and all data of sensing nodes with an adaptive weighted fusion (AWF) processing are passed to the gateway and through the gateway to reexecute packet processing and then reported to the monitoring center, which effectively optimize the wireless network to the scale of the data processing efficiency. The linear interpolation theory is used for background graphical user interface so as to evaluate the working status of each node and the whole network coverage case. A testbed has been created for validating the basic functions of the proposed ZigBee-based home network system. Network coverage capabilities were tested, and packet loss and energy saving of the proposed system in longtime wireless network monitoring tasks were also verified.


Introduction
With recent wireless sensor network (WSN) development, more and more sensors and actuators for monitoring and control are embedded with wireless communication standards, which can be connected together to form an autonomous network.Meanwhile, ZigBee-based technology is considered one of the major communication advances in recent years, since it offers the basis for mesh networking, full area coverage, and development of independent cooperative services and applications [1].
Extensive research is underway using this concept in different areas, such as regional environmental monitoring and management [2], animal presence and pasture time monitoring in an extended area [3], medication management and health care system [4], and, in particular, home network application (HNA).For example, the IoT potential for HNAs has been reported in [5][6][7][8].An intelligent selfadjusting sensor for smart home services based on ZigBee Communications is proposed in [5].A smart home testbed based on the pedagogical model of project-based learning (PBL) for undergraduate education is proposed in [6].A wireless home automation network for indoor surveillance is presented in [7].References [8,9] proposed smart and wireless home energy management scenario synchronously.These show potential identification capacities for self-configuration, comprehensive management, and communication capabilities.
However, there are still some challenges in designing ZigBee-based home network system and applications.Firstly, according to the current situation, the ZigBee-based service terminals need to provide the total solution to improve the integrated efficiency.Meanwhile, the ZigBee module will be used as a supplementary means of integration.Secondly, the ZigBee-based service node uses a limited power resource, such as a battery.Thus, the network lifetime is greatly influenced by the battery lifetime.Last but in no means least, compared with the ZigBee network itself, users are more In ZigBee wireless network, sensor nodes scale deployment and, with limited power, it is necessary to implement data fusion procedure and reduce data reporting frequency and improve the measure precision and meet the long-term, reliable coverage monitoring needs.
At present, the main fusion algorithms are shown in Table 1, and all kinds of algorithms have their own characteristics and application scenarios [10][11][12][13][14][15].And for the energy constrained ZigBee node, the data fusion algorithm is a good choice, which mainly includes the arithmetic mean method (AMM), the batch estimation algorithm, and the adaptive weighted fusion (AWF) algorithm.Among them, the AMM is the most simple, but its fusion precision is low; batch estimation algorithm can avoid the negative impact brought by the abnormal data, but it can ensure that the measurement accuracy of the sensor is highly consistent; AWF algorithm is relatively simple to implement, of high precision, only relying on multisensor data measurements, and applicable to the ZigBee network node, respectively, to perform data acquisition and monitoring coverage of the scene.
In this study, we designed a ZigBee-based intelligent selfadjusting node (ZiSAN) for wireless network applications.The ZiSAN, using a compact stack type structure, provides a microoperation system (MOS) for ZigBee network management and service scheduling.Then, a development and coverage evaluation of ZigBee-based wireless network application is proposed.The remainder of this paper is organized as follows.Section 2 proposes the ZigBee-based networking architecture for environmental monitoring system.Section 3 describes the design method of the ZigBeebased sensing node, data processing model, workflow, and procedure.Section 4 illustrates the testbed setup and results and finally some conclusions are presented.

System Overview
As shown in Figure 1, a ZigBee-based WSN architecture adapted to home network application mainly includes three types of nodes: sink node, ZigBee router (ZR), and ZigBee end node (ZE), respectively.The sink node is the ZigBee-based gateway (ZBGW) which is also the coordinator (ZC) of the  ZigBee network, and it is responsible for reporting light data to user service side.
In ZigBee-based wireless monitoring area, two nodes that need to communicate may be beyond direct communication range, so the partial nodes are adopted to be configured as router nodes (ZR nodes) and then all the nodes working in the 2.4 frequency band and building up a ZigBee-based mesh network structure enable the end nodes (ZE nodes) to use the ZR nodes for data forwarding.In the mesh topology, a "route discovery" feature of each node is configured which allows the network to find the best available route for data transmission.Likewise, if there is a bad radio link (coverage hole due to the failure communication) between two nodes, that coverage hole can be overcome by rerouting around the area of bad service.
ZigBee nodes (ZE or ZR) integrated with the home security terminal (e.g., Doorsensor and smoke detector), environmental monitoring terminal (such as formaldehyde or PM2.5 monitor), and controller terminal (such as remote control device or a socket), and all of them build a mesh structure network.The sensing node receives the control instruction through the ZBGW and carries out the real-time monitoring task.Node failure (the power supply is under pressure, being destroyed, etc.) means the coverage with a hole and the node in the failure area to report to an alarm automatically.According to the application requirement of the ZigBee wireless network, the packet loss retransmission mechanism (no more than 3 times) will be executed when the communication between the nodes appeared, so as to ensure the effective coverage of the wireless network application system.

ZiSAN Structure Decomposition.
In a home network system, the ZiSAN mainly acts as a ZR or ZE.In order to facilitate the integrated development of home terminal and ZigBee technology, the ZiSAN uses the stack structure convenient for sensor replacement and expansion.Figure 2 shows the structure of the proposed ZiSAN used for light monitoring in an exploded view.The whole architecture includes a ZigBee radio module, a light sensing module, an interface board, a case plastic, and so forth.The ZiSANs powered by 2 AA batteries or direct current (DC) are integrated on other monitoring or control devices and deployed at different places of the home monitoring area.The ZigBee radio is a microembedded system, which integrated with a microcontrol unit (MCU) and microoperation system (MOS) software, and it connected with the interface board through a 22-pin interface, so as to output its general purpose input output (GPIO) and cluster communication port (COM) to the interface board.The ZigBee radio can be configured with 4 different power levels (8.25 mW-66 mW) and it is also equipped with an onboard antenna or a cylindrical antenna, so as to make it possible for the user to fit all kinds of monitoring field.An arrangement structure of 3 light sensors enables the ZiSAN to distinguish between light and darkness, to read the light intensity in wireless network applications.

Data Processing Strategy.
A ZigBee-based wireless network scenario exhibits a ZBGW and a number of ZiSANs; the ZiSANs implement coverage monitoring task and cause a large scale of homogeneous data; such data are gathered by the ZBGW and then reported to the monitoring center.If ZBGW collected each piece of sensing data of the sensing node, without any processing and directly reporting to the monitoring center, in the ZigBee wireless channel, congestion of ZBGW serial data is easy to be caused.Therefore, it is necessary for ZBGW to reexecute package processing to be reported again, so as to optimize the efficiency of the transmission channel.
The data processing workflow is shown in Figure 3, and the specific evaluation processes are as follows.
(S1) Each sensing node is installed with multiple light sensors, and continuous sampling is performed simultaneously.
(S2) The multisensor sampling data is processed by the AWF model for data fusion.
The AWF process of executing includes the following steps: firstly, the sampling values of each sensor are   ( = 1, 2, . . ., ), and they are independent of each other, so as to evaluate the variance of the sensing node; then, according to the multivariate function theory, the weighted factor   ( = 1, 2, . . ., ) can be obtained by the value corresponding to the minimum total mean square error (TMSE) [13][14][15]; secondly, the sensing data are fused with the WAF model, thereby obtaining the final real-time fusion value of the sensor node.
(S3) The same type sensor data is packed into a stack queue through the ZBGW and reexecution of packet processing within set time threshold is performed, with the whole packet length being less than the set threshold.
(S5) The ZBGW reports data (regardless of whether the message packet meets the full packet condition) to the monitoring center.
(S6) The monitoring center displays sensor data in realtime and positions monitoring events.
(S7) Check the data queue of the ZBGW if there exists a full message packet.
(S8) If there is a full message packet that complies with the requirements, then go to (S5); otherwise (S7) is reexecuted.
Figure 3: Data processing and reporting workflow.

Event Monitoring Model.
According to the ZiSAN data transfer to the user client server through the ZBGW, the linear interpolation principle is adopted to obtain a full rendering.As shown in Figure 4, 2 * 2 pixels represent the wireless monitoring area converging with 4 nodes, and then it can be turned into a 9-pixel picture through interpolation, which reflects that the monitoring area of each ZiSAN is smaller, but the behavior monitor of each node can be evaluated more accurately.Hence, through the background graphical user interface (GUI), users can directly monitor the working status of the wireless network and timely process the monitoring events.
The capital letters refer to the original pixel, and lowercase letters refer to the new pixel obtained through interpolation; define its linear interpolation as ( The monitoring and analysis of the wireless network can be transformed into interpolation evaluation with multiple ZiSANs and deduce The parameter of  and  can be evaluated from the vertical direction.Similarly, the parameter of  and  can be evaluated from the horizontal direction.Finally we obtain . The evaluation process will be illustrated as follows.The coordinate of pixel  is defined as ( 1 ,  1 ), and its real-time light data is  1 ; with the same principle, the coordinate of pixel  is ( 1 ,  2 ); its real-time light data is  2 .The coordinate of pixel  is ( 2 ,  1 ); its real-time light data is  3 ; the coordinate of pixel  is ( 2 ,  2 ); its real-time light data is  4 .

Prototype System.
A testbed of the proposed ZigBeebased home network system has been created for demonstration.The testbed setup is shown in Figure 5 which consists of a ZigBee gateway and 36 ZiSANs for mesh networking, and the schematic diagram of the testbed is shown in Figure 6.
The ZiSANs are deployed regularly in a 250 cm × 250 cm monitoring area, working on the minimum power level.The ZBGW is connected with the monitoring GUI through a serial port of PC.The ZiSAN senses the light intensity and transmits it to the ZBGW synchronously and finally reports to the background GUI.The user through the GUI can conveniently evaluate the light intensity of each monitoring point and evaluate the light distribution trend of the whole proposed ZigBee-based wireless network monitoring scheme.If a ZiSAN fails (under voltage alarm, network failure, etc.), the user can visually monitor the network events.

Experimental Results
Figure 7 shows the real-time sample results of the ZiSANs (the adopted node number is 1, 6, and 36, resp.).First the ceiling and the desk lamp are both closed and the real-time light intensities of the 3 nodes are all very small.Then, the desk lamp located in the light sensing ZiSAN 6 is turned on, and node 6 has the maximum uplift amplitude of the real-time light data curve.Finally, the indoor ceiling lamp is switched on, and all of these 3 nodes have a larger uplift.Figure 8 shows the light gradient changes of the monitoring testbed.According to the 3D curves, it is easy to know the illumination distribution of the test area.Meanwhile, the actual measurement shows that even though the ZiSANs in the monitoring area are arranged tightly, they can access the network once the ZiSANs start.And the real-time light sensing data will be updated every 2 seconds.Each ZiSAN mounted 3 light sensors and executed data acquisition once per second and continuously executed data acquisition 2 times.The light sensing data is processed by the AWF model.Node number 23 is selected for light realtime data collection and fusion, and the test result is shown in Figure 9.The first 60 seconds of the light curve is influenced by an indoor fluorescent light; the fluorescent light is turned off at 60 seconds and then the desk lamp is turned on nearby node number 6, followed by the curve of the increasing trend (amplitude is relatively small).As shown in Figure 9, when the light measured data processing by the AWF and the AMM (in most cases the fusion results remain basically the same) can be mutually replaced, only near the 15 seconds, 40 seconds, 50-70 seconds, 80 seconds, there exits some dynamic change, and the main reason is that the AWF model due to the weights can be automatically updated to the measured values, can be more sensitive to light, and has a better performance than that of the arithmetic mean method.Figure 10 is the power consumption comparison results of the ZiSAN in different operating modes.Continuous work mode is to perform data collection and data reporting every second; the intermittent mode of work is to collect data per second, but every two seconds after the data collection through AWF processing and then report, and it shows that the intermittent operation mode can optimize the power consumption of the node.
For ZBGW, continuous work mode is that real-time light data of the ZiSAN per second is received and reported to the monitoring center; reexecuting package processing mode refers to receiving the light data of the ZiSAN every 2 seconds and implementing data fusion of multinode's data and then transmitting to avoid the parallel wireless transmission and serial event triggered communication per second.Figure 11 shows the power consumption comparison results of the different working mode; when each node sends real-time sampling data per second, the power supply of the ZBGW is close to the configured threshold (2.5 V) after 24 hours and that of the reexecuting packet processing mode is better improved.
Some packet loss tests were carried out to evaluate the network stability of our ZigBee-based wireless monitoring system.ZiSANs are collected and reported one light dataset per second.A 16-byte light data protocol of the system which consists of packet header, MAC (medium access control), NetID, SenData, volt, and CRC (Cyclical Redundancy Check) is transferred every second and received by the PC GUI.The packet header is 0xAA and 0x55, and the MAC address, network address, real-time data, remaining energy voltage, and CRC byte are the corresponding components of the ZiSAN.As shown in Figure 12, packet loss test was performed 10 times to obtain the average of the failure probabilities; the right color represents the average packet loss number in 1000 seconds.The ZigBee multiple RF (radio frequency) communication links vary over location due to their strong correlation to the physical environment.The packet loss of the ZiSAN deployed in the middle area is higher than that of the edge node and the retransmit mechanism is configured in the application layer so as to improve the wireless communication.
Reexecuting packet processing method can effectively improve the packet loss of the ZigBee wireless network, so as to optimize the monitoring center of the screen refresh rate (e.g., a node data loss will display a coverage hole on the monitoring GUI).The packet loss test results of node number 23 in different working mode are shown in Figure 13.The initial stage of ZigBee network packet loss rate is higher.If the sampling data of the ZiSAN are not processed and fused by the ZBGW, the minimum refresh time is 1 second and the packet loss rate is about 3.5%.In addition, when packet loss occurs, the retransmission mechanism will consume extra energy.In contrast, when the reexecuting packet processing mechanism is adopted, the refresh time is  2 seconds and the packet loss is reduced to 0.54%.Therefore, in the ZigBee wireless network, the scale data of sensor nodes are preprocessed by the gateway (or some controller nodes) which can effectively improve the transmission reliability of the system, optimize the wireless channel occupancy, and reduce the packet loss rate of the wireless network.

Concluding
In this paper, we proposed a ZigBee-based network scheme for home network applications.A stack structure node available for home service integration is provided.Based on the node, user can quickly develop a coverage monitoring application integration of ZigBee technology.User client server side adopts linear interpolation theory to evaluate the working status of each node in the ZigBee-based wireless network.A testbed of the proposed ZigBee-based wireless network system has been created to validate its basic functions.Experimental results of the demonstration project show that the testbed is convenient enough to perform wireless network coverage and monitoring tasks, and each node can visually display its working state.

Figure 1 :
Figure 1: ZigBee-based network scheme for home applications.

Figure 2 :
Figure 2: Exploded view of the proposed ZiSAN stack structure.

Figure 6 :Figure 7 :
Figure 6: Schematic diagram showing the process of the coverage test.

Figure 8 :Figure 9 :
Figure 8: Light gradient measured by the light sensing nodes during the coverage test.

Figure 10 :
Figure 10: Node power consumption comparison results with different working mode.

Figure 11 :Figure 12 :
Figure 11: Analysis with power management of the ZBGW.

Figure 13 :
Figure 13: Packet loss analysis with different working mode.