Robotics and Autonomous Systems ELSEVIER
Robotics and Autonomous Systems 28 (1999) 115-125
www.elsevier.com/locat e/robot
An adapllive sensor network system for complex environments Michimune Kohno *, Masahiro Matsunaga, Yuichiro Anzai Keio University, 3-14-1 Hiyoshi, Kohoku-ku, Yokohama, 223-8522 Japan Received 14 December 1998
Abstract
This paper describes the design and implementation of a sensor network system that can adapt to node failures and changes in node positions. The objective of this system is to support human actions in typical living and working environments such as buildings, offices, and homes. The adaptive sensor network system we designed and implemented can estimate the spatial position of each node, can detect a connection or disconnection between a node and the network, and can translate a positionbased address into the appropriate set of sensor nodes. The evaluation results show the possibility of the system adapting to dynamic network changes. © 1999 Elsevier Science B.V. All fight reserved. Keywords: Sensor network; Adaptive system; Position-based addressing; Automatic position estimation
1. Introduction
Our research aim is to construct a sensor network having communication abilities and allowing the sensing of environmental information. Such networks will be useful in supporting human actions in typical living and working environments such as buildings, offices, and homes. Sensor networks differ from ordinary computer networks in that a sensor network node is characterized by its spatial position and its category (or sensor-type), while an ordinary computer network node is associated only with a unique identifier. Each sensor is characterized not only by its absolute spatial position, but also by the positional relationship between a sensed object and the sensor. For example, the input to a sensor attached to a movable object such as a chair or a desk will be a function of time, the spatial position of the sensor, and its relationship to the environment. By following where sensor nodes are positioned, spatial data will less likely be in error. In order to obtain the information, a position estimating mechanism is needed. GPS is available for such purpose, however, it can be used only outside of a building. For estimating the position of an indoor sensor node, an alternative postition estimating system is needed. Following the positions of sensor nodes has another merit. Suppose a certain node in a system becomes malfunction and does not reply to a request. Of course the request will fall due to the timeout. Such fail has possibility to be chained, thus the situation sometimes involves a critical problem especially the system is a critical operation system or is used for keeping safety of another system. If the node position was followed and some nodes exist nearby * Corresponding author E-mail:
[email protected] 0921-8890/99/$ - see front matter © 1999 Elsevier Science B.V. All rights reserved. PII: S0921-8890(99)00010
116
M. Kohno et al. /Robotics and Autonomous Systems 28 (1999) 115-125
the node, an alternative node may obtain an approximate sensing value and reply to the request node instead of the faulty one. In comparison to traditional computer networks, it is also important that networks composed of such sensors be more fault tolerant and adaptive to environmental changes. Commercial sensor network nodes are already available. One of them is NeuronChip, the network node of LonWorks. It communicates using LonTalk Protocol, a protocol stack ensuring that nodes can interoperate using an efficient and reliable communication standard [1]. Applications can be developed for NeuronChip in a GUI-based programming environment using Neuron-C. Neuron-C provides implicit message passing through network variables. Once the network is configured and variables are bound, the input nodes automatically receive updated values [2]. Several communication media are supported and the network topology is not restricted (bus, ring, star, or mixture). A NeuronChip and similar devices have been shown to simplify the search for the faulty parts and to reduce part replacements [2,3]. This paper proposes a sensor network system that is adaptive to node failures and changes in node positions. The sensor network is composed of sensors embedded in various objects. The following functions have been designed and implemented: a network interface that can connect sensors to the network, an Indoor Positioning System (IPS), and a sensor node management system that integrates all the components and mediates between the sensor network and existing computer networks. The integrated system can adapt to dynamic changes in the sensor network.
2. Adaptive sensor network It is essential for sensor systems to be fault tolerant and have real-time capabilities. Takegaki et al. proposed a task mapping algorithm based on a diffusion model for distributed real-time systems [4]. Their approach included the analysis of task scheduling on the basis of a Rate Monotonic algorithm. Nadig et al. proposed a network architecture composed of a hierarchical de Bruijn network to prevent node isolation due to route failures [5]. That network could also reject faulty values from faulty nodes. Sha et al. proposed an architecture to ensure safe software updating in a real-time system [6]. The above works were generally intended for plants or large scale factories, but not for more human-centered environments such as offices or homes. Exemplary works having such a goal include Ubiquitous Computing [7] and TRON [8]. The concept of ubiquitous computing is that it enhances computer use by making many computers available throughout the physical environment, while making them effectively invisible to the user [9]. The approach was construction of new computing artifacts for use in everyday life. To realize that, new hardware systems had been oriented toward experimental platforms for systems and applications of invisibility. TRON (The Real-time Operating system Nucleus) is aimed at creating an ideal computer architecture for highly functionally distributed system (HFDS), in which each of these computerized objects is able to work in cooperation with other objects. In the project, the TRON-concept Intelligent House was constructed as an experimental house. Computers and sensors in the intelligent house make overall judgments on outdoor and indoor conditions, then operate as an integrated system to provide maximum comfort. In their networks, components are mostly electrical equipment, while we aim at connecting not only electrical equipment but also non-electrical objects by embedding networked sensors in them. We call such a network a "distributed sensor network". 2.1. Capabilities o f distributed sensor network
Each sensor in a plant system can be given a unique identifier during system design because the position of every sensor can be fixed (and thereby identified uniquely). A unit of data from a given sensor is tagged by the identifier of the sensor.
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
117
On the other hand, in case of distributed sensor networks, removal or movement of nodes can often occur. Therefore if combined data are used by some applications that use sensing values from several nodes and the spatial positions of those nodes are unknown, the analysis of the data can become difficult. To avoid this, sensing values must be a function of time and the spatial position of the sensor, and must also depend upon other sensed objects in the environment. We assume that ew,~rynode has one sensor, and that only one node is collecting sensor inputs from other nodes. Let V(t) be the set of sensor inputs in reply to a request at time t, that is, V(t) = {(Pa(t ÷ ea), Va(t + ea)) I a E A}
(1)
where A is the set of sensor nodes, Ea is the transmission delay of request packet for node a, and Pa(t + ea) and Va (t ÷ ea) are, respectively, the spatial position and sensor input for node a at the time t at which it received the request. The spatial position is expressed by a triple of the form (x, y, z) that is a relative coordinate from a reference point in a space. To satisfy the above equation, we require ea << Ata ('Ca E A), where Ata is the minimum sampling interval of all nodes. Since V(t) gives a !pair of the spatial position and the sensed data, the following functions are available if a certain algorithm for either compensation or presumption is implemented on a node: • data compensation for inexistent nodes, • data presumption at a void location using nearby sensors, • data presumption of faulty nodes. The network that has such capabilities can adapt to topological changes and the positional changes of sensor nodes. This paper calls such a network an adaptive sensor network. To realize an adaptive sensor network, some mechanisms to detect the spatial position of each node are needed. 2.2. Hardware mechanisms The following mechanisms have to be embedded to construct an adaptive sensor network: • automatic detection of nodes' connection/disconnection, • estimating system of node positions. The first one is necessary not only for recovery from a temporary disconnection of radio-connected nodes, but also for preventing an output of invalid data. The second one is used to calculate Pa. GPS is the general method to estimate an automobile's position. However, it cannot be used for indoor position estimation, because it utilizes multiple satellites. Related work on indoor position estimation can be found for such applications as estimating positions of autonomous mobile robots [10]. These systems utilize infrared waves or ultrasonic waves and measures the time of flight (TOF). Note that in such cases, the position estimation is requested by the mobile robot. However, in the case of the sensor network, not all nodes invoke such requests. In addition, it is not desirable that such requests are made simultaneously by many sensor nodes. Also, if it takes a long time for the positions of all nodes to be measured, the sensor inputs become meaningless. Therefore a required positioning system has the following characteristics: • It can estimate positions of lots of sensors at a single phase within a short time. • It has a position compensation algorithm appropriate for the estimation method. An example of the', second case is that it is effective to compensate with temperature for measuring the TOF of an ultrasonic wave. This can be achieved by equipping each node with a thermometer. 2.3. Software considerations In order to design applications that collect data from a great deal of sensors, it is effective to apply an objectoriented approach. However, if each instance is mapped to a substantial sensor node, it is difficult for applications to cope with node faults. To overcome this difficulty, object classes must be hierarchical, and applications must access
118
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
instances on the upper class only. The upper class objects are not mapped directly to substantial nodes but only to lower class instances. We call such upper class objects "virtual sensor objects", and the classes of the objects is called virtual sensor classes in this paper. The concept of virtual sensor classes is not a novelty and is already provided by LonWorks. However, any existing sensor-network systems have not incorporated a sensor positioning system as a fundamental component. Such system makes it possible for applications to request data using not only the key of a node identifier but also using information regarding the sensor's spatial coordination and sensor-type. Moreover, by incorporating any data compensation facility into the system, the corresponding fault handling routines do not need to be implemented within the applications. We call an address representing the three-dimensional coordinates of a point a "position-based address", and describe the mechanisms that support the addressing in this paper. 2.4. Position-based address
This section describes a proposed position-based address with an example as follows: x30y4 0 z2 5r5 0 @ rooml 0 9.bui Id2 6.yagami .keio.sens-domain
The address consists of two parts separated by an "at mark". The former part represents a sphere of which the center is the specified relative coordination from the origin of the sensor network (the unit is centimeter). It also represents the radius of the sphere. The latter part represents the address of a sensor network manager. It is like a fully qualified domain name (FQDN) because such an address must be easy to be translated into one in the computer network domain. In order to send a request from a host computer using a position-based address, the address must be translated into IP address at the beginning. This is done by a DNS server that handles both sensor network domain and computer network domain. Once the IP address is given, the host computer can send a packet to the appropriate sensor network manager. The packet contains the former part of the address. Therefore the manager interprets it as a set of sensors that exist in the specified sphere, and the manager sends packets to the obtained sensors.
3. System components This section describes details regarding each system component for realizing an adaptive sensor network system. In this paper, wireless connections are not considered. Also, we assume that the size of each packet transmitted by a sensor node is small. This is quite reasonable since every node transmits only its own inputs. The overview of the system is shown in Fig. 1. 3.1. Sensor node
We implemented two sorts of sensor nodes (Fig. 2). One of them is based on LonWorks; thus, the CPU is a NeuronChip. The other one was constructed by the authors using a 10MHz Z80 as the CPU and an RS422 connector as the network interface. We created this node at the first step of our research, and for experiments of the early IPS. Since the LonWorks-compliant node is much smaller than the Z80-based node, the Z80-based node has many input/output channels. We are all now using LonWorks-compliant nodes, and embedded a thermometer in every node. The block diagram of the designed LonWorks-compliant node is shown in Fig. 3. The block diagram of the Z80based node is almost the same except the sort of the CPU and ROM instead of flash memory. The network cable consists of two twisted pair wires: one for ordinal network communication, and another for timing synchronization of the IPS (described later). A power transceiver provides power source for nodes through the communication wire,
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
appfications on computer network
I
119
existing computer network
I
sensor network Fig. 1. The concept view of the designed sensor network.
Fig. 2. The photographs of sensor nodes: LonWorks-compliant node (left) and Z-80 node (right).
thus neither battery nor other on-board power source is necessary. The IPS receiver consists of an ultrasonic sensor, a counter, and a synchronization circuitry. It is connected to the CPU through its general purpose I/O port pins. Both of sensor nodes can download a task from the network. NeuronChip has a LonTalk protocol stack inside the chip, thus downloading can be easily achieved by pre-writing a minimum additional program on the flash memory. On the other hand, a Z80-based node of course does not have any network handling routine, therefore we wrote a minimum operating system kernel into the ROM. It supports task downloading from the network using a simple protocol. There are two meanings of the address of a node: a physical (MAC) address and a logical address (such as IP address). A NeuronChip has its unique, 48-bit physical address. LonTalk also defines the logical addressing, consisting of a domain, a subnet, and a node ID. This address is bound to a node automatically, however, the binding is done only when a new network configuration is installed. Therefore unlike to DHCP, it is difficult to dynamically give a logical address to a node by using the pure LonTalk protocol. Instead of using the logical address defined by
120
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
power transceiver
~,onWorks P S signal ultrasonic sensor
Sensor Node Fig. 3. The block diagram of the designed sensor node. LonWorks, we used only MAC addresses and made every communication bypass the sensor network manager to support automatic node detection. The details of this are described later. 3.2. Position estimating system: IPS
Our Indoor Positioning System (IPS) [11] was designed to estimate the positions of several sensors in a single phase. As mentioned above, every node has an ultrasonic sensor to receive ultrasonic waves from transmitters. We adopted the use of ultrasonic sensors because they were very cheap and their directionality was wide. Three transmitters were set on the ceiling, and these transmitters were also sensor nodes. Considering the precision of an ultrasonic sensor and on-board clock rate, we estimated 2 cm as the maximum permissible error of the IPS. The IPS diagram shown in Fig. 4 contains multiple transmitters, a receiver, and a mobile robot in a room. The robot also has an IPS receiver and the network can keep track of the position of the robot (viz., it was an element of the adaptive sensor network). The robot can act as a mobile sensor device, but wireless IPS is not available yet, the position of the robot cannot be obtained now. The IPS timing diagram is shown in Fig. 5. With ZS0-based nodes, synchronization of receivers and transmitters was done by broadcasting a synchronization packet that contained a transmitter ID. LonWorks-compliant nodes cannot do as ZS0-based nodes because computing cost of packet handling is too high to synchronize using a packet. We adopted adding a wire to the network cable and directly signalling the IPS receiver circuitry. As shown in the figure, the transmitters generate waves under the manager's control. We chose to use a 30ms interval between wave transmissions that is given consideration to the attenuation characteristic of ultrasonic waves. Thus the receiver can detect the arrival of the single wave at a particular temporal delay. By collecting and operating upon the delays, the distance between the receiver and the plane formed by the transmitters can be estimated. It is possible that a node cannot receive a wave because of the node's location. In such situation, though the counter on the node will continue running, the counter is reset when a new synchronization signal arrives. Actual position estimation process is done by the sensor network manager. The manager collects not only TOF but also temperature obtained by the thermometer embedded in receivers. Distance compensation is processed by calculating the velocity of each wave.
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
121
Fig. 4. An overview of IPS. manager
Trl
Tr2
Tr3
node
,TOF
1
TOF 2
get tof
\
ITOF 3
sync. signal m~
ultrasonic wave
Fig. 5. IPS timing diagram.
3.3. Sensor node manager A sensor node manager works as a server process on the host that connects a sensor network and computer networks [12]. The manager combines every component described in the section into one system. The current implementation of tile manager is a user process running on Windows NT. The host is a P C / A T (PentiumPro 333 MHz, 96 MB) with a LonWorks interface card. The manager accepts a service request to sensor nodes with TCP socket.
122
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
The manager creates the instance of a sensor class in the address space. The instance is mapped to a real sensor node, and has a unique identifier (Object ID) used by clients for specifying it. To support on-line node addition and removal, every object code was built as one Windows DLL (Dynamic Link Library) file. When a sensor node connected to a sensor network, it broadcasts a Node Attach Packet. The packet contains an address of the node and a Program ID, an ASCII string that is the program identifier downloaded on the node. The manager recognizes that a new node has been connected to the network. The manager creates an instance corresponding to it. Since every DLL is loaded automatically when it is necessary, a new object code can be installed by the operating system. The type of a sensor node is distinguished by a Program ID. When a request comes from a client, the manager passes the packet to the corresponding sensor node instance. Protcol conversion between TCP/IP and LonTalk is processed by the instance. The manager also governs IPS transmitters. The routine was also implemeneted as a DLL and is imported automatically. The routine always counts the number of transmitter nodes available and activate them when three or more nodes can be used. As shown in Fig. 5, it requests for activation one by one according to the scheduled order. Each estimated position is stored into the variable in the corresponding instance. In order to avoid unexpected application fault due to a node failure, the manager supports an automatic node substitution. When a request to a sensor node times out, if the substituting service is specified, the manager searches the most nearest node of the faulty node. Then the request is forwarded to the node, and the manager sends the replied packet to the client with the flag that indicates a substitution has processed. Virtual sensor classes described in the previous section are supported by a basic class library that we implemented. The handling routine of a position-based address was implemented by using this library. The manager initially creates the instance of a virtual sensor class. The instance does not have any object that is steady mapped to. When the manager receives a request with a position-based address, the manager handles it with a method of the instance. The method parses the address and creates a list of appropriate sensor objects by referring each object's position. Then the manager multicasts packets to the listed sensor nodes.
4. System evaluation All of the above components were integrated into a functioning system for performance evaluation. Two experiments were executed: one examining the spatial accuracy of the IPS, and the other examining the effectiveness of the automatic node substitution mechanism for a node failure. 4.1. I P S a c c u r a c y
This experiment examined the effect of data compensation on errors in the estimation of spatial position of a sensor node moving along the floor at a speed of 15 cm/s within the functional range of IPS. Estimated positions were compensated with regard to temperature information obtained simultaneously. The result is shown in Fig. 6 and Table 1. The average error was reduced by about a factor of three via data compensation. Thus the resulting error (1.61 cm) achieved the criterion (2 cm) specified in the aims of IPS. Table 1 The effect of data compensationin the IPS evalution
Without compensation With compensation
Averageerror
Standard deviation
5.32 cm 1.61 cm
2.12 1.82
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
123
difference (cm) 10 5 0 -5 -10 ........ ......... ~ ~
"................::i
60 90
~ 0 0 y x~(cm~ 30 6 ~ - 6 0
(cm) . . . . .
Fig. 6. An evaluation of IPS accuracy with temperaturecompensation. in our test case, the error was only about 0.6% of the distance between the receiver and the center of transmitters. Thus we concluded that the positions of moving sensors could be estimated with sufficient accuracy. 4.2. Automatic node substitution
We verified the effectiveness of the integrated system through this experiment. In this experiment, the temporal transition of water temperature was measured by four sensor nodes in a sensor network. The data was requested by the experimental program on a computer network periodically, every one second a time. The program sent every message through the sensor node manager. The spatial postion of every node was measured by IPS during the experiment. Two of the sensor nodes were not changed any situation during the experiment. Other two nodes were unplugged from the network at 5 second, and only one node of them was specified for automatic node substitution. The experimental program was coded to set the value as same as the previous value when a request fails. The result of this experiment is shown in Fig. 7. The result line of the node which was unplugged and not substituted showed an illegal, flat line during the unplugged section. However, the result line of the node which was unplugged but executed substitution showed almost the same values during unplugged section. The result line of the substitution was not shown in the figure. The difference among lines will be caused by the characteristic dispersion of the sensors. The results shown in the figure can be explained as follows: when the nodes were unplugged from the sensor network, the manager could not receive a reply packet, then the request timed out. The manager sought a node existing at the most nearest location using the position information obtained by IPS, and sends a request to the node. Therefore the replied values during unplugged were the result of the substitution. After the nodes plugged again, the requests were processed normally. Though this experiment was only a test case, the effect of automatic node substitution was shown by the experiment. The node failure implicitly means changes of the network itself, thus the result also showed the system coped with a dynamic system change.
5. Conclusion The basic design and implementation of sensor networks adaptive to node failures and changes in the spatial position of nodes were described. Some commercial sensor network devices were discussed, and the requirement capabilities for adaptive: networks were proposed. Also each component of our adaptive sensor network was described. The performance ewduation of our IPS showed the obtained spatial accuracy satisfied our maximum permissible
124
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
42
I
I
I
I
40 ...
ol1
38
+
/ II
~ . . . . . . . . . . . . . . . . . .
i II
36 _= 34
B 32 ] ' u n p l u g g e d : ,
30 28 0
I
I
5
10
ted not substituted . . . . . . . always plugged . . . . . . . . I
I
15
20
25
time [sec] Fig. 7. The effect ofautomatic node substituion: in a certain case.
error. Though the effect of proposed position-based addressing cannot be shown in the paper, the effect of the mechanism for node failures was shown with the experiments. Moreover, it must be noted that whole experiments were carried out by using the integrated system.
Acknowledgements This work is supported by grants from the "Research for the Future" Program, Japan Society for the Promotion of Science. LonWorks is the trademark of Echelon Corporation. Also I would like to thank Masahiro Matsunaga, the co-author of this paper, for the great effort to have designed and developed the algorithm and the real system of IPS.
References [1] M.T. Hoske, LonWorks expands, Positions as universal network solution, Control Engineering 43 (7) (1996) 77-78. [2] S.M. Smith, An approach to intelligent distributed control for autonomous underwater vehicle technology, in: Proceedings of the 1994 Symposium on Autonomous Underwater Vehicle Technology, 1994, pp. 105-111. [3] D. Loy, R. Schmalek, Thoughts about redundancy in fieldbus systems anchored in OSI Layer-4 and applied to the LonTalk Protocol on neuron based network nodes, in: Proceedings of the 1995 IEEE International Workshop on Factory Communication Systems, WFCS'95, 1995, pp. 21-26. [4] M. Takegaki, H. Kanamaru, M. Fujita, The diffusion model based task remapping for distributed real-time systems, in: Proceedings of the Twelth Real-Time Systems Symposium, 1991, 2-11. [5] D. Nadig, S.S. Iyengar, D.N. Jayasimha, A new architecture for distributed sensor integration, in: Proceedings of IEEE Southeastcon'93, 1993, 1-8. [6] L. Sha, R. Rajkumar, M. Gagliardi, Evolving dependable real time systems, in: Proceedings of IEEE Aerospace Applications Conference, 1996, pp. 125-132. [7] M. Weiser, The computer for the twenty-first century, Scientific American 263 (3) (1991) 94--104.
M. Kohno et al./Robotics and Autonomous Systems 28 (1999) 115-125
125
[8] N. Koshizuka, The current status and future of the BTRON and human machine interface subprojects, in: Proceedings of the Thirteenth TRON Project International Symposium, 1996, pp. 22-27. [9] M. Weiser, Some computer science issues in ubiquitous computing, Communications of the ACM 36 (7) (1993) 75-85. [10] H. Eren, C.E China, Y. Nakazato, Accuracy in position estimation of mobile robots based on coded infrared signal transmission, in: Proceedings of 1995 IEEE Instrumentation/Measurement Technology Conference, Integrating Intelligent Instrumentation and Control, 1995, pp. 548-551. [11] M. Kohno, Y. Anzal, Intelligent sensor network as nervous system of artifacts, in: Proceedings of International Symposium on System Life, 1997, pp. 109-115. [12] M. Kohno, M. Ohta, Y. Shiralshi, Y. Anzai, Distributed sensor network management system for dynamic network reconfiguration, in: Proceedings of the 1998 International Conference on Parallel and Distributed Processing Techniques and Applications, 1998, pp. 21-28. Michimune Kohno was born in 1971, and graduated from the Department Electrical Engineering, Faculty of Science and Engineering, Keio University, in 1994. He completed the Master's program (computer science) in the Graduate School of the same university in 1996. He is now enrolled in the Doctor's program of the same university. He is engaged in distributed systems, operating systems, and real-time systems. He is a member of the Information Processing Society of Japan.
Masahiro Matsunaga was born in 1974. and graduated from the Department Electrical Engineering, Faculty of Science and Engineering, Keio University, in 1997. He completed the Master's program (computer science) in the Graduate School of the same university in 1999. He is engaged in distributed systems composed of artifacts in living environments.
Yuichiro Anzai was born in 1946 in Tokyo and received Ph.D. from Keio University, Yokohama, in 1974. After staying at Keio, Hokkaido University and Carnegie-Mellon University, he has been a professor at Department of Electrical Engineering, Keio University, since 1988, as well as the Dean of the Faculty of Science and Technology, Keio University, since 1993. His main interest lies in human-robot-computer interaction, intelligent systems design and cognitive modeling, and he has published more than 10 books and numerous technical papers in these areas. He has also served for many professional activities, including a member of the Board of Trustees of the Information Processing Society of Japan, an associate editor of International Journal of Human-Computer Interaction, and an editorial board member of the j ourual Artificial Intelligence, Journal of Artificial Intelligence Research, Neural Networks, and other international and domestic technical journals.