SICE Annual Conference 2007 Sept. 17-20, 2007, Kagawa University, Japan Time synchronized wireless sensor network for vibration measurement Yutaka Uchimura1 , Tadashi Nasu 2 and Motoichi Takahashi2 1 Department of Mechanical Engineering, Shibaura Institute of Technology, Tokyo Japan (E-mail: uchimura@sic.shibaura-it.ac.jp) 2 Kajima Corporation, Tokyo, Japan (E-mail: {takahamo, tadashi-nasu}@kajima.com) Abstract: Network based wireless sensing has become an important area of research and various new applications for remote sensing are expected to emerge. One of the promising applications is structural health monitoring of building or civil engineering structure and it often requires vibration measurement. For the vibration measurement via wireless network, time synchronization is indispensable. In this paper, we introduce a newly developed time synchronized wireless sensor network system. The system employs IEEE 802.11 standard based TSF counter and sends the measured data with the counter value. It enables consistency on common clock among different wireless nodes. We describe the accuracy evaluation by simulation studies when the size of nodes increased. The hardware and software specifications of the developed wireless sensing system are shown. The experiments were conducted in a three-story reinforced concrete building and results showed the system performs more than sufficiently. Keywords: Sensor network, Vibration measurement, Wireless network, Time synchronization 1. INTRODUCTION With the rapid progress of wireless communication and computer network technology, wireless network based sensing has become an important area of research and various new applications for remote sensing are expected to emerge. Applications include monitoring physical or environmental conditions such as temperature, sound, motion or pressure without laying hundreds of meters of signal wires that are prone to breaking. One particularly promising application is monitoring the structural health of buildings and civil engineering structures [1][2]. Since measuring objects are usually huge and wiring very long cables is required, wireless data transmission is highly beneficial. Structure health monitoring often requires measuring vibration data such as acceleration and velocity. Measured data are analyzed to obtain the resonance frequency, damping ratio and spectrum response. measurement For wireless vibration measurements, time synchronization is important because the vibration data are simultaneously measured at multipoint sensor nodes and are often transmitted via multi-hop relayed by wireless devices. As a result, when the data arrive at a measuring station, they are contaminated with an unknown (random) time delay. Even if each sensor node sends data exactly at the same moment, the arrival time of the data does not match. Thus received data needs to be adjusted so as to maintain time consistency on a common time axis. Because when the data are used for modal analysis, a time difference may be misunderstood as a phase shift. To maintain precise time consistency among wireless nodes, time synchronization is indispensable. In this paper we describe a new time synchronized wireless sensor network system for vibration measurement. Time synchronization of network has been a matter of concern, therefore several technologies such as GPS, radio ranging have been used to provide global synchro- nization in networks. GPS based synchronization offers very precise synchronization, however it is not always available indoor place. In wired network, the Network Time Protocol (NTP) has been developed that has kept the Internet’s clocks ticking in phase [3]. Time synchronization is also important to determine radioactive period that directly affects battery life. There have been many studies on time synchronization which aimed for conserving battery energy of network nodes. RT-Link and B-MAC [5] (Berkeley MAC) focused on the life of batteries. RT-Link[4] uses MAC (media access control) based on slotted ALOHA and it employs independent AM carrier-current radio device for indoor time synchronization. B-MAC[5] (Berkeley MAC) supports carrier sense multiple access (CSMA) with low power listening (LPL) where each node periodically wakes up after a sample interval and checks the channel for activity for a short duration of 2.5ms. The main concern of these methods is battery life. Meanwhile, our focus in time synchronization is not only the battery life but also maintaining time consistency among all sensor nodes. When a sensor network is used for vibration measurement and modal analysis, all the data measured at different wireless sensor nodes need to be aligned with a common clock, which need not be the real world clock. Because the difference of the clock among nodes can be misunderstood as a phase shift of vibration, which seriously affects the modal analysis of building vibration. Therefore, the purpose of time synchronization in this paper is essentially different from the studies that focus on battery life. The developed system employs IEEE 802.11[6] standards based wireless devices. These devices are the de facto standard of wireless networks and so are readily available on the market with industrial-level reliability. The modulation uses DS-SS (Direct Sequence Spectrum Spread) and OFDM (Orthogonal Frequency Divi- - 2940 - PR0001/07/0000-2940 ¥400 © 2007 SICE sion Multiplexing) which offer robustness against phasing and noise. Those are advantages against RT-Link and Berkeley Mote which use noise susceptible wireless modulation. IEEE 802.11 standard devices have a timing synchronization function (TSF) by default. We propose to utilize the function for synchronization among nodes, sampling data interval and time stamping of measured data. In the following section, we describe the adverse effects on vibration sensing caused by a time delay in wireless network and the reason why time synchronization is needed. Section III describes simulation studies when the size of wireless nodes becomes large. In Section IV, we describe a newly developed wireless sensing system and also describe its hardware and software components. In Section V, experimental evaluations of time synchronization precision are presented. 2. TIME DELAY ON WIRELESS NETWORK AND TIME SYNCHRONIZATION Data transmission via a wireless network requires certain time periods from the moment when the transmitter sends the data to the moment when the data arrives at the receiver. In vibration sensing applications, sensors usually need to be placed at several points on different floors in the building. The measurement station, which is composed of a host computer system, is placed at a certain location in the building. In such cases, especially in a high-rise building, the wireless radio waves of each sensor node do not directly reach the station. Thus, the network path needs to be multi-hop and the packets are transmitted via the relay of the wireless sensor nodes on the path. This multi-hop relay introduces a time delay, which corresponds to the duration from the moment when a node sends a packet to the moment when the station (host PC) receives the packet. The CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) media access method, which is used in IEEE 802.11 standards, is another cause of time delay, because before the packet sending, it always needs to wait for a random back-off time and also needs to send an ACK packet then wait for a CTS packet before sending the measured data packet. Moreover, the packet does not always go through and may be lost, in which case it needs to be re-transmitted, resulting in a considerable time delay. Therefore, even if all the nodes intend to send packets at exactly the same time, the arrival time may be different. This fact results serious problem when measured data are used for modal analysis. Fig. 1 (a) shows the motion of a bending beam with three measured points (marked as circles). As time proceeds, the beam moves from P1 to P2 and P3 . Suppose the transmission of data on the tip is delayed, it virtually seems that the tip stays at P2 position even though other points moves forward (see Fig. 1 (b)). So, we somehow need to calculate back the measured time and maintain consistency of received data on 2 (a ) 2 2 2 ! 2 2 ! (b ) Fig. 1 Adverse effect on vibration measurement due to transmission delay the common time line. To resolve this issue, we propose to send the vibration data together with the time stamp of the moment when the data is measured. After the data are received, they can be rearranged along the desired time line based on the time stamp. This procedure is valid provided that all clocks of the nodes are matched. However, accuracy of the quartzcrystal oscillator based clock is affected by many factors such as temperature and change of current or voltage [7]. Frequency stability of oscillators used for PCs is mostly around 10−4 (100 ppm). Imprecision of 100 ppm corresponds to a 1 millisecond (1 msec) error in 10 seconds, or an 18-degree phase shift for 100Hz vibration. Even though the resonant frequency of a building is low (typically less than 10 Hz), a 1 msec difference between the fastest clock and the slowest clock is the maximum tolerance, so we set the target performance of time synchronization to be less than 1 msec. 2.1 Timing synchronization function As previously mentioned, we use IEEE 802.11 standards based wireless device and utilize the timing synchronization function (TSF). IEEE 802.11 supports a few wireless configurations such as infrastructure mode or ad hoc mode and each mode uses different time synchronization policy. In the infrastructure mode, the access point periodically generates beacons which contain the current clock value, which is then copied by the all nodes. In the ad hoc case (multi-hop case), the stations share the beacon generation responsibility among themselves in a distributed fashion. The developed system uses the ad hoc mode for network configuration. Each node in the ad hoc mode maintains its own TSF timer, and each time the beacon interval time (default 100msec) elapses, the node will wait a random delay then send a beacon. A synchronization beacon contains a message header and timestamp which is a 64 bit field containing the TSF timer and rolls over after it reaches 264 − 1. To ensure that the timestamp value in the beacon accurately represents the internal timer, the timestamp field - 2941 - M o n ito r th e v a lu e T S F c o u n te r S a m p lin g T im e r T h re a d E x te n t o f R a d io W a v e a q u ire o n e s h o t v a lu e A /D C o n v e rte r Fig. 2 Block diagram of A/D conversion maintaining the constant sampling time is not filled in until after the CSMA deferral. This is very important because as previously mentioned, CSMA is one of the main reasons of the unknown time delay. This procedure is done within MAC layer and it is implemented at the hardware level. If a beacon arrives before the random delay timer has expired, the station cancels the pending beacon transmission and the remaining random delay. Upon receiving a beacon, a station sets its TSF timer to the timestamp of the beacon if the value of the timestamp is later than the station ʟs TSF timer. (It is important to note that clocks only move forward and never backward.) 2.2 Measurement interval (sampling time) Once the vibration measurement starts, CPU of each node commands the embedded A/D converter to acquire a one-shot value from the vibration sensor. The data acquisition is executed at a certain interval. This constant interval corresponds to the sampling time and it ticks along the TSF timer. As shown in Fig. 2, a software task (sampling timer thread) implemented in each node keeps monitoring the value of TSF timer. When the TSF timer elapses and comes up to the next sampling time, the A/D converter acquires a one-shot sensor value. As long as the TSF timers of all wireless nodes are synchronized, the A/D samplings of all sensor nodes are processed at precisely the same moment. 3. SCALABILITY ANALYSIS BY SIMULATION IEEE 802.11 standards based TSF partially depends on a stochastic manner. Possibility of chance to send a beacon is equal, thus it may happen that the node whose clock is fastest cannot be given the chance to propagate one’s clock. This could increasingly occur as the size of IBSS becomes larger, where IBSS is the independent basic service set (in other words, the group of ad hoc nodes which have the same communication ID), and it affects the precision of clock synchronization of multinode. Therefore, we examined the stochastic effect on synchronization precision by the Monte Carlo simulation method. We made simulations under the following conditions: 1. Each node has a TSF clock, whose frequency stability is modeled as a Gaussian distribution. 2. The standard deviation σ is 33.3ppm (parts per million), i.e. 3σ, which contains 99.73% of the clocks, W ire ls s N o d e Fig. 3 Configuration of wireless nodes whose radio wave can reach to all nodes W ire ls s N o d e Fig. 4 Configuration of wireless nodes whose radio wave can reach to only the adjacent nodes corresponds to 100ppm. 3. The beacon interval is 100 msec (10 Hz). The simulations are run for two cases of node arrangements. • Case 1: All nodes are within the range that radio waves can reach, i.e. each node can send a beacon directly to any other node. See Fig. 3. • Case 2: All nodes are arranged in daisy chain configuration so that radio waves can reach two adjacent nodes only (right and left nodes). Fig. 4 illustrates the allocation of nodes. End-to-end communication is possible only through multi-hop relay. In both cases, each simulation trials correspond to 90 minutes elapse of time and we made 100 times of simulation trials by randomly selecting clock speed of attending nodes. During the simulation, we recorded the difference between the fastest clock and the slowest clock every 100msec. Notice that the slowest clock does not indicate a specified clock. The clock, which shows the most delayed time at a certain moment, is the slowest clock. The slowest clock may receive a beacon and adjust its TSF timer; as a result, other clock can be the slowest. Fig. 5 and Fig. 6 show histogram of case 1 simulation. Fig. 5 is the case when the total number of nodes is 20 and Fig. 6 is the case of 100 nodes. As shown in the histograms, the precision of time synchronization gets worse as number of nodes becomes large. In 20-node case, 99.9% of data is within 80μsec. In 100-node case, it is within 473μsec. The median value of 20-node case is 12μsec and that of 100 case is 38μsec. Fig 7, 8 and 9 show the histogram of case 2 for the daisy chain configuration cases. Fig. 7 is the case of 5 nodes, Fig. 8 is that of 20 nodes and Fig. 9 shows 100- - 2942 - x 10 5 2.5 2 2 1.5 1.5 Frequency Frequency 2.5 1 1 0.5 0.5 0 0 20 40 60 80 100 120 Time (micro second) 140 160 5 12 2.5 10 2 8 1.5 4 0.5 2 100 200 300 400 Time (micro second) 500 40 60 80 Time (micro second) 100 120 x 10 0 0 600 4 6 1 0 0 20 Fig. 7 Histogram of simulation results in case 2 of 5 nodes Frequency Frequency x 10 5 0 0 180 Fig. 5 Histogram of simulation results in case 1 of 20 nodes 3 x 10 50 100 150 Time (micro second) 200 250 Fig. 6 Histogram of simulation results in case 1 of 100 nodes Fig. 8 Histogram of simulation results in case 2 of 20 nodes node case. The median value in 5-node case is 11μsec, 66μsec in 20-node case, and 385μsec in 100-node case. In 5-node case, 99.9% of the data maintain less than 64μsec, 174μsec in 20-node, and 909μsec in 100-node case. In the actual measuring environment in a building, the configuration of wireless device allocation is likely to be a mixture of case 1 and 2 as illustrated in Fig. 10. Several wireless nodes are located on a floor and a few of them act as relaying packets to the nodes on a different floor. The target synchronization accuracy is to maintain within 1msec. Form the simulation results, synchronization precision is maintained even when the total number of nodes reaches up to 100 nodes. Table 1 and their block diagram is shown in Fig. 12. The hardware of the node is composed of CPU, DRAM and PC104 extension bus. The A/D converter is connected via the PC104 bus. The A/D converter has 16CH single end input, and 6CH of them are connected to BNC jack. In this system, sensors are not embedded within it. Because the vibration sensing uses various sensors such as accelerometers or velocity sensors. It depends on the structure of the buildings. Additionally, sensors are usually supplied as complete products not component parts, thus separation of sensors and wireless nodes are reasonable and make it more versatile. The operating system (OS) is RT-Linux, which is an extension of Linux to a real-time operating system. Software including OS is implemented on compact flash disk and the disk can also store measured data. As a wireless device, we used IEEE 802.11a/b/g standard wireless device to which an external antenna can be connected. The multi-hop routing is autonomously configured by applying OLSRʢOptimized Link State Routingʣprotocol [8]. The protocol is pro-active, table driven and utilizes a technique called multipoint relaying for message flooding. OLSR also implements a popular optional link quality extension. Thanks to its autonomous routing, even if an operator carries a wireless node and walk 4. DEVELOPMENT OF WIRELESS MEASUREMENT SYSTEM We developed wireless embedded measurement system which can be applicable for vibration sensing. The system is composed of host PC and several identical wireless nodes. Any PC which has an IEEE 802.11 standard wireless device can be the host PC. Fig. 11 is a photo of a wireless node. Size of the node is 120 mm width, 70 mm depth and 50 mm height. Main components and their functions of the wireless node are briefly shown in - 2943 - 14 x 10 4 12 Frequency 10 8 6 4 2 200 400 600 800 Time (micro second) 1000 1200 Fig. 11 Wireless node with external antenna Fig. 9 Histogram of simulation results in case 1 of 100 nodes C P U G e o d e G X 1 W ire le s s n o d e S O -D IM M 2 5 6 M B S D R A M R e la y H o st P C N S 5 5 3 0 A A /D C o n v e rte r B N C C o n n e c to rs R e la y C o m p a c t F la s h ID E P C 1 0 4 0 0 P C M C IA W ire le s s L A N C A R D A R 5 2 1 2 C h ip E x te rn a l A n te n n a Fig. 12 Block diagram of hardware components Fig. 10 Measuring configuration in a building as mixture of case 1 and 2 around the building, the multi-hop relaying maintains the end-to-end communication path. 5. EXPERIMENTAL EVALUATION OF SYNCHRONIZATION PRECISION For the purpose of evaluating TSF based synchronization, we made experiments in a three-story reinforced concrete building. The allocation of wireless node is depict in Fig. 13. Fig. 14 shows the wireless node in the middle place. We used three wireless nodes which were arranged to make two-hop transmission, i.e. the end-to- end communication packets are relayed via the middle node. Wired signal lines are connected to all nodes for the reference purpose and rectangular wave voltage is supplied to generate hardware interrupt. Every moment when the voltage of square wave steps up, an interrupt occurs exactly at the same moment in three wireless nodes and TSF timer count is recorded in the interrupt handler routine. By comparing recorded TSF timer of three nodes, we can evaluate the synchronization precision. The frequency of square wave was set to 10Hz, i.e. the TSF timer value is recorded every 100msec. A measurement was continued for 15 minutes thus total number of TSF record sets was 9,000. After the measurement, the difference between the fastest TSF count and the slowest TSF Table 1 Hardware Specifications of wirelss node CPU Geode GX1 300MHz Chipset NS Geode 5530A chipset RAM 144 Pin SODIMM 256MB External Storage Compact Flash Extention Bus PC104 WLAN Chip Atheros AR5212 A/D Converter 16CH, 16bit Resolution Human Interface LCD and input switches W ire le s s N o d e (M id d le n o d e ) W ire le s s N o d e W ire le s s N o d e 3 F W ire d L in e (u se d fo r re fe re n c e p u rp o s e o n ly ) 2 F 1 F Fig. 13 The allocation of wireless node - 2944 - ware and software specifications of a developed wireless sensing system and experimental evaluations, which were conducted in a three-story reinforced concrete building showed good performance. ACKNOWLEDGMENT This research had been conducted while the first author belonged to Kajima Corporation. REFERENCES Fig. 14 The wireless node placed in the middle 7 x 10 4 6 Frequency 5 4 3 2 1 0 0 Fig. 50 100 Time (micro second) 150 200 15 Histogram of experiment with three wireless nodes count at each recorded set was calculated. We made 15minute measurements totally 15 times, thus total number of samples were 135,000. Fig. 15 shows histograms of the difference of TSF count, which corresponds to synchronization precision. As shown the figure, the most frequent value is around 25 micro sec. It supposed to be smaller by the simulation analysis, however the simulation analysis does not take account for any processing time for synchronization. Therefore, this must be more realistic result when implementing on a real hardware. Nevertheless, the result shows sufficiently high precise synchronization and it maintained much better performance than targeted 1 msec precision. [1] M. Ruiz-Sandoval, B. F. Spencer Jr. and N. Kurata, ”Development of a high sensitivity accelerometer for the Mica platform”, Proc of the 4th Int. Workshop on Structural Health Monitoring, 2003, pp. 1027-1034. [2] J. P. Lynch et.al., ʠ Post-seismic Damage Assessment of Steel Structures Instrumented with Selfinterrogating Wireless Sensors, ʡProc. of the 8th National Conference on Earthquake Engineering, 2006, pp. 18 - 22. [3] D.L. Mills,”Internet Time Synchronization: The Network Time Protocol”,, Global States and Time in Distributed Systems, IEEE Computer Society Press, 1994. [4] A. Rowe, R. Mangharam and R. Rajkumar, ”RTLink: A Time-Synchronized Link Protocol for Energy Constrained Multi-hop Wireless Networks ”, Int. Conf. on Sensors, Mesh and Ad Hoc Communications and Networks Reston, 2006. [5] J. Polastre, J. Hill, and D. Culler, ”Versatile Low Power Media Access for Wireless Sensor Networks”, Proc. of ACM SenSys, 2004, pp. 95 - 107. [6] ANSI/IEEE Std 802.11, 1999 Edition, ”http://standards.ieee.org/getieee802/download/802.111999.pdf” [7] M.D.Lemmon, J.Ganguly, L.Xia,”Model-based clock synchronization in networks with drifting clocks”, Proc. of 2000 Pacific Rim Int. Symposium on Dependable Computing, 2000, pp. 177-184. [8] Engelstad, P.E. Tonnesen, A. Hafslund, A. Egeland, G. ,”Internet connectivity for multi-homed proactive ad hoc networks”, Communications, 2004 IEEE International Conference on , 20-24 June 2004, pp. 4050-4056. 6. CONCLUSION For the vibration measurement via wireless network, time synchronization is indispensable. In this paper, we proposed a new time synchronized wireless sensor network system. The system employed IEEE 802.11 standard based TSF counter and sent the measured data with the counter value. It ensured consistency on the common clock among different wireless nodes. The accuracy when the size of nodes increased was evaluated by simulation studies and the result validated that accuracy maintained within 1 msec. We also described the hard- - 2945 -