Wake-up timer and binary exponential backoff for ZigBee-based wireless sensor network for flexible movement control system of a self-lifting scaffold

Synchronous movement of attached self-lifting scaffolds is traditionally monitored with wired sensors in high-rise building construction, which limits their flexibility of movements. A ZigBee-based wireless sensor system has been suggested in this article to prove the effectiveness of wireless sensor networks in actual implementation. Two optoelectronic sensors are integrated into a ZigBee node for measuring the displacement of attached self-lifting scaffolds. The proposed wireless sensor network combines an end device and a coordinator to allow easy replacement of sensors as compared to a wired network. A wake-up timer algorithm is proposed to reduce the transmitting power during continuous wireless data communication in the wireless sensor network. Furthermore, a variant binary exponential backoff transmission algorithm for data loss avoidance is proposed. The variant binary exponential backoff algorithm reduces packet collisions during simultaneous access by increasing the randomizing moments at nodes attempting to access the wireless channels. The performance of three of the proposed modules—a cable sensor, a 315-MHz sensor, and a ZigBee sensor—is evaluated in terms of packet delivery ratio and the end-to-end delay of a ZigBee-based wireless sensor network. The experimental results show that the proposed variant binary exponential backoff transmission algorithm achieves a higher packet delivery ratio at the cost of higher delays. The average cost of the developed ZigBee-based wireless sensor network decreased by 24% compared with the cable sensor. The power consumption of ZigBee is approximately 53.75% of the 315-MHz sensor. The average current consumption is reduced by approximately 1.5 mA with the wake-up timer algorithm at the same sampling rate.


Introduction
The construction of external walls for a high-rise or super high-rise building is often performed with the help of full scaffolds, which is time-consuming and costly and has low efficiency. Attached self-lifting scaffolds (ASL scaffolds) 1,2 are a type of lifting scaffold that are composed of steel tubes connected with couplers and are easy to assemble/disassemble. The purpose of ASL scaffolds is to act as a construction platform that supports the workers and transports construction materials and to act as platform for the machinery. With the development of Chinese urban areas, applications of ASL scaffolds are widely used in nearly every construction site.
The ASL scaffolds are lifted by electric hoists in high-rise building construction, which are fixed on the construction's external body. The hoists are mounted with equal width so that each hoist carries the same weight for different parts of ASL scaffolds. The location of each hoist, which has been mounted to the ASL scaffolds, is called a machine position. To keep ASL scaffolds moving synchronously, the electric hoist at each machine position must run with the same velocity. Because there are variations in the manufacturing of hoists, it is hard to accurately guarantee that each electric hoist has an equal rotational speed. In this case, the load at each machine position may be distributed unequally, which is unsafe for the lifting process. Consequently, a synchronous movement controlling device must be designed to keep the synchronous movements of each machine position on ASL scaffolds. The movement variation between any two machine positions must be limited to within 30 mm 3 according to specifications from the Ministry of Housing and Urban-Rural Development of the People's Republic of China. The parameters of motor rotation speed or fluid level in the connected pipe are usually detected with wired sensors to keep the electric hoists moving synchronously. 4 In the harsh construction environment, the traditional cable sensors often cause inconvenience to workers by restricting their mobility and disturbing them with the presence of cables. To overcome these problems, wireless sensors are developed and applied.
Wireless sensor networks (WSNs) have great applications for gathering sensed data from remote or inaccessible locations. [5][6][7] A WSN-based construction monitoring system can be researched and applied in many areas of damage detection, fault diagnosis, construction process monitoring, or structural health monitoring. [8][9][10][11][12][13] Advancements in electronics and communication make it possible to develop small sensors that can be integrated into communication modules to construct wireless sensor nodes. ZigBee is feasible for WSNs because of its low energy requirements. 14 Additionally, ZigBee employs the globally available, license-free 2.4-GHz frequency band. It has advantages such as suitable communication distances between nodes, good capacity of nodes, low energy consumption, low complexity, cost-effective nodes based on the IEEE 802.15.4 standard, easy network installation, and convenient maintenance compared with other WSNs. 15 ZigBee enables high-efficiency data communication in personal area networks 16 despite its low data rate (250 kbps). Consequently, ZigBee technology is widely applied in industrial, agricultural, construction, and other fields. [17][18][19][20][21] Considering the advantages of the ZigBee technology standard which has been widely recognized as an industrial standard to develop low-power, short-range radio-frequency (RF) transceivers that can be used for sensor nodes, in this article, we present a WSN based on IEEE 802.15.4 to monitor and control the movement of ASL scaffolds in high-rise building construction. Signals from ASL scaffolds, which are different as compared to other mechanical systems (e.g. bearings or gearboxes 22,23 ), are detected by the sensors in each machine position and must be transmitted to the central control system. A WSN has been developed and is substituted for the traditional cable sensor. Based on the traditional cable optoelectronic sensor presented by Yang and Notodirdjo,4 an improved sensor node embedded with ZigBee is designed to measure the movement variation among machine positions of ASL scaffolds. The coordinator node of ZigBee is developed for the purpose of real-time data transmission. The investigated performances include the end-to-end packet delivery ratio (PDR) and the end-to-end delay, which are common and crucial network performance criteria for WSNs. 24 A variant binary exponential backoff (v-BEB) transmission algorithm that resolves collisions of packets transmitted simultaneously by multiple nodes and a wake-up timer (WT) energyefficient algorithm are proposed. The v-BEB and WT algorithms achieve a considerably higher end-to-end PDR, a lower end-to-end delay, and a higher energy efficiency than the default ZigBee settings in our experiments. Numerically, the proposed v-BEB and BEB algorithms result in a PDR from 98.3% to 80.7% and 97.1% to 79.6%, respectively, with a sample rate from 2 to 10 Hz, which is higher than that of the default ZigBee transmission algorithm from 92.7% to 75.2%. The performance, such as average transmission current, PDR, and power consumption of the three solutions including a cable sensor, a 315-MHz sensor, and a ZigBee sensor, is evaluated.
This article is organized as follows. The existing ASL scaffolds system is provided in section ''Existing ASL scaffolds measurement and controlling system.'' Section ''System architecture and deployment of proposed system'' presents the v-BEB algorithm and an analysis of proposed wireless sensor system. Next, the implementation results are presented and discussed in section ''Evaluation results and analysis.'' Section ''Conclusion'' concludes this article.

Existing ASL scaffolds measurement and controlling system
It is mentioned in section ''Introduction'' that each machine position of the ASL scaffolds must move with equal velocity for the purpose of the ASL scaffolds being lifted synchronously. Consequently, construction safety is ensured. According to the Chinese construction specifications, the moving displacement difference between any two machine positions should not exceed 30 mm 25 for safety. When the difference in the lifting length is more than 30 mm, the related electric hoist must be stopped by the control system to avoid accidents.
The moving displacement of ASL scaffolds is usually detected by wired infrared optoelectronic sensors because of its convenience. Optoelectronic sensors are widely used in many areas to detect displacement or deflection variations and fluid level. In the existing ASL scaffolds measurement and control system, a connected pipe system is mounted on the ASL scaffolds. There is a vertical pipe installed on each machine position, and the bottom of all of these vertical pipes is connected with one horizontal pipe. Based on the principle of the connected pipe, the liquid levels in each vertical pipe are of equal length if the ASL scaffolds move synchronously. Otherwise, the liquid levels in the vertical pipes will not be equal at different machine positions.
Any hoist that is running faster or slower than other hoists will lead to the changing of the outputs of the sensors at that machine position, and this hoist is stopped or restarted by a control system according to the dual-side model presented by Yang et al. For example, the unbalanced state of the ASL scaffolds when rising is shown in Figure 1. The outputs of the sensors at each machine position are shown in Table 1.
Assume that the moving difference between any two pipes is Dh i, j , where i and j are the pipe numbers. Assume that the maximum permissible distance between the top sensor and the bottom sensor is h s , which is a constant equal to 30 mm. From this figure, the maximum moving difference between pipe No. 1 and No. 3 is Dh 1, 3 . The construction specification requires that the movement difference Dh i, j of different machine positions should be limited within h s = 30 mm. Therefore, in the process of lifting, the hoist in machine position 3 is stopped as soon as the liquid level in pipe No. 3 is lowered to the bottom sensor.
This existing measurement and control system is an effective solution and has worked at the construction site for more than 2 years. However, there are some problems when it is applied. The wired sensors often cause an inconvenience to workers by restricting their mobility and disturbing them with the presence of cables. The cable of the sensor is easily destroyed or cut down by the construction machinery tools on every floor. A cheap and poor quality cable is often replaced because of the higher cost of high-quality cable, which may destroy the cable more easily and may result in the failure of the controlling system. Additionally, assembly or disassembly of wired sensors causes higher human cost. The efficiency of controlling system management is also degraded. To avoid these deficiencies, wireless sensors are strongly suggested by construction industry. Obviously, a cheap and reliable WSN-based control system is more acceptable for workers and customers at the construction site.
System architecture and deployment of proposed system WSN system architecture ASL scaffolds are attached to the external walls of high-rise buildings. Sensors in the movement controlling system are placed with equal space on the ASL scaffolds. All of the sensors are connected to the controlling device with cables, which is time-consuming and inconvenient at a construction site.
As shown in section ''Existing ASL scaffolds measurement and controlling system,'' the liquid levels of vertical pipes are measured using a group of selfmanufactured optoelectronic sensors, which are set up at different testing points (i.e. machine positions) and are linked together with connected pipes filled with water. Thus, the liquid level at different testing points can be detected, and hence, the unbalanced movement of ASL scaffolds can be detected. The optoelectronic sensors are placed on the top and bottom sides of the vertical pipe at a distance of 15 mm above and below the liquid level, respectively. The optoelectronic sensor is mounted around the outside of the pipes. The structure of the optoelectronic sensors and the connected pipes is shown in Figure 2.
An accurate relative liquid level in the connected pipes is detected by the sensors that are mounted at  different machine positions. When the liquid level is higher than the sensor, a binary value ''1'' is output by the sensor. Otherwise, a binary ''0'' is output. The ASL scaffolds movement is controlled by stopping or restarting the hoist and by setting the allowable relative movement of any two machine positions as 30.0 mm. In order to replace cable sensors with wireless sensor nodes, the existing cable sensors are equipped with a Texas Instruments (TI) CC2530 radio chip that implements the IEEE 802.15.4 standard. The CC2530 is a true system-on-chip (SoC) solution for IEEE 802.15.4, ZigBee applications. 26 It enables network nodes to be built at low cost. The CC2530 combines a RF transceiver with an industry standard-enhanced 8051 MCU, an in-system programmable flash memory, 8-kB RAM, and many other features. It is combined with the ZigBee protocol stack (Z-Stack) from TI. The maximum number of sensors in this system is 20. The architecture of the WSN is shown in Figure 3. It can be seen from this figure that all of the sensors exchange data with the coordinator (central node) through the WSN. The cables are eliminated.
It is assumed that there are a maximum number of n (n 20) sensors in the WSN. When ASL scaffolds move up synchronously, the outputs of the top and bottom sensors at different machine positions are shown in Table 2.
During the movement of ASL scaffolds, the hoists at different machine positions will be controlled by changes in the output of the sensor. The data in this study are transmitted from the sensors to the coordinator, embedded in the control device, and there is no data transmission from the coordinator to the sensors. The data transmitted include outputs from the top and bottom sensors. The data packets are designed to have small size for transmission efficiency and energy savings. The packet format is given in Table 3. A sign of x in this table means that x can be 0 or 1 in binary.
Each section of the packet is described as follows: Begin of packet. This indicates the beginning of the packet; a fixed binary value 101 is illustrated, three bits in length.
No. of machine position. This section defines the ID of the machine position (sensor) with five bits, which is in the range from 0 to 31. The maximum number of machine positions is 20 in this system. Hence, the minimum bits of this section are five.
Output of sensor-top. Output of top sensor is contained in this bit.
Output of sensor-bottom. Output of bottom sensor is contained in this bit.
Checksum. This section defines the checksum of the package with three bits.   Reserved. This section is a reserved section with three bits.

Sensor design
Data sampling is implemented by the sensor node in the ZigBee network. In this study, a sensor node must gather the information for the liquid level and transmit it to the controlling device. The liquid level is detected by two optoelectronic sensors, which were introduced in section ''Existing ASL scaffolds measurement and controlling system.'' The sensor-integrated ZigBee module (node) is powered by two batteries, each with + 1.5 V direct current (DC). This module will alarm by light on a light-emitting diode (LED) when the liquid level is out of the top sensor and bottom sensor. The functional block diagram of the sensor is provided in Figure 4. In the figure, sensor-t represents the top optoelectronic sensor and sensor-b represents the bottom optoelectronic sensor.

Controlling system design
The control system has been improved and simplified by the ZigBee-based wireless network. The sensor interface circuit is substituted by the CC2530 module in this system. There are a total of 20 channels for the input LEDs and output contactors. The input LEDs show the working status of hoists, which means that 20 LEDs indicate whether the hoists of the corresponding machine positions are chosen to run. The function of the output contactors is to control the action or switching on/off of corresponding hoists. The functional block diagram of the controlling system is shown in Figure 5.

A WT algorithm
In a WSN, an improvement in the energy efficiency of battery-powered devices has been an important issue for increasing battery life and prolonging the network lifetime. Hence, there arises a need to develop a powersaving algorithm. As the moving displacement parameters are monitored and transmitted for every machine position, the sensor node does not sleep for a long time, causing the power consumption to rise. Therefore, a WT algorithm is implemented for this application to place the sensor node (CC2530 integrated) into sleep mode while maintaining the performance. This is achieved by waking up the ZigBee transceiver when measuring data that need to be transmitted. In one sampling period, the RF transceiver is put into sleep mode for power saving. It is also achieved by minimizing the data packet transmission as much as possible, which results in reduced power consumption.
The WT algorithm is described in Figure 6. In a sample period 0-t n in Figure 6, the ZigBee RF transceiver is divided into multiple gaps such as 0-t 2 . In each gap, the ZigBee RF transceiver is awakened for a short time (e.g. t 1 -t 2 ) for data measuring and transmission. A timer is defined for sleep mode. The defined time is t 1 or t 3 2 t 2 . The other times in this gap are the sleep time of ZigBee. As we know, the transmission current in maintenance mode (which is several milliamperes) is considerably more than that of the sleep mode (which is several microamperes); thus, power is saved.
It is assumed that the sampling rate and sampling period of the control system are R (Hz) and S (s), respectively, and that the transmission current of the ZigBee sensor is at P (dBm) transmission power. The   wake-up time of the ZigBee RF transceiver of CC2530 is T 1 = 5 ms. The sampling time of the control system is T 2 \ 0.1 ms. The transmission time of the controlling system is T 3 = 16/(250*1000) bps = 0.064 ms. Because T 2 and T 3 are very small and can be ignored, the total wake-up time of T = T 1 + T 2 + T 3 is approximately 5 ms. The current according to CC2530 in sleep mode is less than 10 mA. The steady state current A m is approximately 1-3 mA. The current consumption of the ZigBee sensor in normal working conditions is given by where A m is the steady state current. The current consumption A TW of the ZigBee sensor in the WT algorithm is given by where A s is the current consumption in sleep mode.

A v-BEB algorithm
A BEB algorithm is often applied as a retransmission mechanism to share the medium and avoid data collision or data loss. All nodes in the ASL scaffolds movement control system transmit the packages to receivers simultaneously, which may produce data collision and package loss. A novel BEB algorithm is studied in this article. The time is divided into time slots (T s ) of equal length: T s = 1 ms. The number of time slots is j, the backoff time delay is T j , and the backoff counter is k. Thus, overall we have in which ''random'' is a function that generates the random number from 1 to 2 k . Additionally, all packets are assumed to be of the same length and have equal probability to access the slot time T s . In the first transmission, a packet is transmitted after waiting for available slots j to be randomly selected from f0, 1 . . . , jg, where j is an integer representing the minimum contention window size. For any time slot, if a packet from certain node is involved in a collision, the contention window size for that node is multiplied by the backoff counter k (=2) and a random integer number is generated (j) within the contention window for the next transmission attempt. A packet's kth contention window size is ½m k , n k 24,27,28 When k = 1, the initial value is m 0 = 0 and n 0 = 0. The backoff counter of a node is reset to 1 after a successful completion of the packet. Although BEB is a widely used algorithm, it is proven that the traditional BEB may cause increased packet delay and packet drops due to the collision of the packets; the utility and fairness are lowered, and the time delay of the packet can increase.
A variable window size starting from a fixed value m 0 and then addition of a backoff counter value for each new packet is proposed. The variable window size BEB algorithm can be expressed as follows From this equation, a packet's kth retransmission is limited within the contention window size ½m k , n k . The window sizes of BEB and variable BEB are listed in Tables 4 and 5.
The collision probability at the kth contention for each transmitter is where N is the total number of nodes, and it can be proven from equation (6) that the collision probability of BEB is higher than that of variable BEB. As the contention window's lower bound of variable BEB is lower than that of BEB, the size, which is enlarged, and the nodes can have a greater opportunity to share the media.

Evaluation results and analysis
To validate the feasibility of the proposed WSN-based controlling system, the experiments and evaluation are conducted at the Yingfengsheng Machinery Corporation, Huixing district, Chongqing, China.  Figure 7(a) and a 2.4-GHz band-based ZigBee wireless module is indicated in Figure 7(b). It is shown in Figure  8 that a ZigBee-based central node (coordinator) is integrated in the control system.

Experiment environment
An existing cable sensor and an improved wireless sensor are shown in Figure 9(a) and (b), respectively. The RF transceiver module in a wireless sensor can be changed with a 315-MHz module or a ZigBee module.
The experimental platform is shown in Figure 10. There are a total of five sensors at five machine positions on ASL scaffolds. The connected pipe system is mounted on ASL scaffolds. The control device is located on the indoor floor of the building and is shown in Figure 11. ASL scaffolds are lifted by the hoists at different machine positions. The lifting speed of ASL scaffolds is decided by the rotation of the hoist. In this study, the lifting speed of ASL scaffolds is v = 12 cm/min. The sample rate of the cable sensor is r = 10 Hz, which is the same as the 315-MHz module sensor and the ZigBee sensor. Therefore, the moving distance Dl between every sampling time is given as equation (7) Dl It shows that the moving distance of ASL scaffolds between every sampling is 0.2 mm. A 0.2-mm resolution of data transmission is obtained. This distance is far less than the allowable threshold of 30 mm.
The distance between the sensors and the control device is not varied in these experiments, and the maximum distance between the sensor and the control device is 57 m. The average distance between the sensors and the control device is 46 m.

The validity test of proposed WSN-based controlling system
Experiments were first conducted to test the validity of the proposed WSN control system. Three groups of   experiments were performed to prove that the proposed WSN system could satisfy the construction specifications of the maximum 30-mm relative movement for any two machine positions. All tests were conducted with five machine positions and the equal lifting speed.
The rotation speed of hoist No. 3 is adjusted to be slightly higher than the others. Therefore, it can be concluded that hoist No. 3 will be stopped to achieve synchronous movement during the lifting process. A total of 20 tests are conducted in each group of experiments for the cable sensor, 315 MHz module sensor, and ZigBee sensor, respectively. In each test, the maximum moving displacement difference is manually measured and recorded when the hoist is stopped. The recorded data in the 20 tests for each experiment are shown in Figure 12. From this figure, it is observed that the wireless sensors can correctly transmit data to the control system similar to cable sensors. The maximum moving differences of each group of tests are all limited within the threshold range of 30 mm. The maximum average moving differences of the three solutions (cable sensor, 315 MHz sensor, and ZigBee sensor) are 23.1, 23.3, and 22.8 mm, respectively. The synchronous movement of ASL scaffolds is ensured in these three solutions.
Power consumption of the 315-MHz module and ZigBee sensors is shown in Figure 13. They are measured and calculated under the conditions of equal bit     Table 6.
The average transmission currents of the default ZigBee sensor with the WT algorithm are computed and shown in Figure 14. The data in this figure are given by equations (1) and (2) as presented in section ''System architecture and deployment of proposed system.'' For example, when the sampling rate is 10, the current consumptions are given as follows It is observed that when a WT algorithm is applied, the transmission current of the ZigBee sensor is reduced sharply and an average current decrease of approximately 1.6 mA is achieved when at the same sampling rate. The average transmission current of the ZigBee sensor decreases with an increase in the sampling rate, which is caused by more power being consumed when the sampling rate is higher.

Performance of WSN evaluation
The PDR is calculated by counting the total number of successfully delivered packets of one node and dividing it by the number of packets created by the source node. The PDR is an important indicator because it describes how successful the data transmission is in transferring packets through the network. The end-to-end delay is the total time it takes from the transmitter to the destination node in the network. To measure the end-to-end delay, we use timestamps when all nodes in the network are synchronized.
The experiments with different values of the sample rate and the number of sensor nodes show the variation in the network performance with different transmission algorithms. The v-BEB algorithm achieves a higher PDR than the BEB algorithm and the default ZigBee algorithm, as depicted in Figures 15 and 16.
As seen in the figure, the default ZigBee transmission algorithm acquired a PDR from 92.7% to 75.2% with a sampling rate of 2-10 Hz, while the v-BEB and BEB algorithms are from 98.3% to 80.7% and 97.1% to 79.6%, respectively. With the increase in the sampling rate, more data packets are transmitted in the network, which will cause data loss. Additionally, a higher number of allowed retransmissions result in a higher PDR.
The similarities in the performances have been observed for the PDR with a different number of sensors in the network when the sample rate is 2 Hz. For low traffic cases with the use of one to four sensors, most of the packet transmissions were successful. When the sensor number was increased in the network, the traffic load of the WSN increased as well. The PDRs show an overall decreasing tendency. Among three transmission algorithms, the v-BEB algorithm achieved a higher PDR.
The average end-to-end delay estimations are shown in Figures 17 and 18. If a data loss is detected, that is, if the internal timer of a node expires or the package is lost and the packet needs to be retransmitted, a v-BEB  Similarly, the BEB algorithm has a larger delay than that of the default ZigBee algorithm when the sensors in the network increase, which is depicted in Figure 18. As seen in the figure, for the number of sensors from one to seven, higher delays are experienced overall. Comparative studies show that the overall delays increase to a peak value of 662, 1245, and 1085 ms for the default ZigBee, v-BEB, and BEB algorithms, respectively. The PDR and the average end-to-end delay are studied, and it is shown that by adding a variable BEB backoff to the default ZigBee transmission algorithm, the v-BEB transmission algorithm achieves a higher PDR at the cost of higher delays especially at higher traffic load.

Cost comparisons of different solutions
Cost per unit could be one of the important determinants in selecting technology solution. Therefore, the costs of each solution are roughly computed. The total price of the cable sensor is computed by taking into the account the cost of the sensor and copper cable. It is shown that the average cost of the cable sensor is highest. The cost is approximately 25 RMB per sensor, compared with 19 RMB for the ZigBee sensor, because the     cost of the cable connecting the sensors and the controlling device is high. The 315-MHz sensor is the lowest of the three solutions. This cost is lower because of the elimination of copper cables.

Conclusion
An improved measurement system based on a ZigBee WSN for controlling the synchronous movement of an ASL scaffolds system is proposed in this article. The moving displacement difference of ASL scaffolds at different machine positions is monitored by two optoelectronic sensors mounted on a connected pipe system. The relative displacement of each machine position is transmitted by a sensor node in a ZigBee-based WSN.
The performances of the WSNs such as end-to-end delay and PDR are considered in this article. A v-BEB transmission algorithm for data loss avoidance in WSNs is investigated. The proposed v-BEB algorithm resolves collisions of packets transmitted simultaneously by multiple nodes. The v-BEB algorithm reduces packet collisions during simultaneous access by enlarging the randomizing moments at nodes attempting to access the wireless channels. The end-to-end PDR and delay are evaluated and discussed. It is shown that the overall PDR can be increased using the v-BEB algorithm at the cost of higher delays. As a balanced alternative to the default algorithm, the v-BEB algorithm presented is an effective solution. In addition, a WT scheme used for WSNs improves the network lifetime because of decreased power consumption by all nodes. It is also proven that a ZigBeebased sensor results in reduced power consumption, cost, and improved performance. The main contribution of this article includes the following: Providing an improved solution for the existing cable sensor-based ASL scaffolds movement and control system by proposing and implementing a ZigBee WSN; Comparative analysis is presented for various solutions such as the cable sensor, 315 MHz sensor, and ZigBee sensor; A WT algorithm is proposed to save power and reduce energy consumption.
A v-BEB transmission algorithm for data loss avoidance in WSNs is investigated. Despite the improvements achieved by the proposed WSN, some challenges, such as bit error rate and link reliability, should be considered to widen its application in future work.