KILAVI Wireless Communication Protocol for the Building Environment – Networking Issues Mikael Soini, Hannu Sikkila, Petri Oksa, Lauri Sydanheimo, and Markku Kivikoski Abstract —
the KILAVI communication protocol is developed for low-power and low data rate wireless communication in the building environment. The KILAVI network links together building control and monitoring applications into an intelligent self-configurable system that can be easily controlled and monitored by the consumer through wireless and wired interfaces either locally or remotely. A KILAVI network consists of master, intermediate and sensor nodes. The master manages communication in the network, handles security, carries out node registration, and initiates the device control and monitoring tasks. Intermediate nodes are sensor/control nodes with data relaying capability that may be used to implement a multihop network. Power scarce sensors are primarily kept in the sleep state to minimize power consumption. Sensors wake up only to transfer or query data. Lifetime analysis on practical KILAVI nodes shows very promising results. 1
Index Terms — Building Automation, Low-power, Sensor networks, Wireless communication
I. INTRODUCTION Demand for better living and working facilities together with the recent advances in electronics and RF-based communication have made the development of low power and low-cost wireless sensing and control networks actual. These networks can be applied e.g. to home control applications such as lighting control, temperature monitoring, humidity damage prevention, electricity and water meter reading, fire detection and access control. Many building automation systems are implemented with wired connections. There are numerous manufacturer and function dependent standards. This usually leads to situations, where due to incompatibility aspects e.g. heating and air conditioning, are controlled by separate systems. 1 This work was supported by Tekes and European Regional Development Fund (ERDF) under ILTa project. M. Soini is with the Tampere University of Technology (TUT) Rauma Research Unit, Kalliokatu 2, 26100 Rauma, FINLAND (e-mail:
[email protected]). H. Sikkila is with the TUT Rauma Research Unit, 26100 Rauma, Kalliokatu 2, FINLAND (e-mail:
[email protected]). P. Oksa is with the TUT Rauma Research Unit, 26100 Rauma, Kalliokatu 2, FINLAND (e-mail:
[email protected]). L. Sydanheimo is with the TUT Rauma Research Unit, Kalliokatu 2, 26100 Rauma, FINLAND (e-mail:
[email protected]). M. Kivikoski is with the Tampere University of Technology, Electronics Institute, 33101 Tampere, FINLAND (e-mail:
[email protected]).
In building automation, the wireless approach has several 1-4244-0216-6/06/$20.00 ©2006 IEEE
advantages compared to wire. Implementation of wired solutions is troublesome especially to existing buildings and network topology changes can be inconvenient. In addition to cable reduction, wireless systems make network installation, extension and reconfigurations easier. In practice, RF is the only wireless medium choice in the building environment. However, buildings are very nonideal environments for radio wave propagation because of strong path loss, multipath propagation, antenna positions, non line of sight (NLOS) paths, and diffraction, reflection and scattering effects. Frequency has a major effect on power consumption, data transfer capacity, and operating distances. A relatively low frequency band generally used for low-power and low-data rate applications is 433MHz. The references [1] compare 433MHz and 2,4GHz radio wave propagation in a typical office environment. There are significant differences in propagation values (up to 30 dBm in 10 metres) between these frequencies and lower frequency enables lower transmission power and fewer hops on the multi-hop path. There are several aspects that must be taken into consideration when designing power efficient wireless sensor networks. Trade-offs must be made between performance, reliability, and energy consumption. The goal is to keep a power scarce sensor in the low-power sleep state as much as possible without effecting system operability. Small transmission distances causing receive power domination over transmission power thus shutting down the radio whenever possible is vital [2]. Compact packets, simple communication protocol, low transmission power, efficient transmission algorithms, short transmission distances, appropriate transmission methods and frequencies, low-power and simple hardware components, software optimization, and developed energy sources or energy scavenging: the reference [3] gives a good overview of these important aspects in sensor networks design. This paper presents the KILAVI communication protocol intended for low-power and low data rate wireless networks that are used in device control and monitoring in buildings. KILAVI communication protocol is an open standard. The protocol is compact but comprehensive with regard to the different functions and devices needed to implement an operative building network. The KILAVI is targeted at building automation and thus the packet length, data rate, and functions can be optimized. KILAVI application layer possess qualities that enable self-configurable network operation during topology
changes, easy off-the-shelf device registration to the network, security features and network scalability and therefore helps in the integration of home control and monitoring devices into a single system [4]. The remainder of the paper is organized as follows. Section II presents the KILAVI protocol and packets used for control and data transfer purposes. Section III concentrates on different types of KILAVI network nodes. Section IV introduces new node attachment, data collection and device control procedures. Section V introduces different rendezvous schemes. Section VI analyzes node lifetimes based on measurements. Finally, section VII concludes the paper. II. KILAVI PROTOCOL AND PACKETS The KILAVI protocol is constructed from Application and Data Link layers. The application layer contains information related to a specific device or its operation. The Data field can be empty or contain e.g. state, measurement, control, manufacturer, security or external system information. Type field presents different types of messages such as Set, Query, State, On/Off. The end-to-end MAC (Message Authentication Code) authentication (optional) is used to verify parties and packet integrity, intermediate nodes relaying information do not interpret packets and therefore only the original sender and receiver need to know security keys. Thus simplifying simplifies the security protocols. RC5 encryption (optional) does not increase the length of messages. The Data Link layer contains information required to transfer packets in the network. These include transmitter and receiver address, header, and path fields (intermediate node addresses in multi-hop). Intermediate nodes use data link layer information when receiving, relaying, and storing KILAVI packets. The header contains information about the application layer, the size of the data field and the path fields (hop counter in broadcasts), authentication and encryption level used, and type of data. Table I summarizes the KILAVI protocol. TABLE I DIFFERENT FIELDS OF KILAVI PACKETS
FIELDS RX_ADDR & TX_ADDR
BITS 16
HEADER
16
PATH
0-112 n≤6 8 0-504 32
TYPE DATA MAC
1 8 7 4 6 3 3 16 16
DESCRIPTION Relay option Device address Device type Message format Data length (bytes) Path length (bytes) N/A n * IN RX_addr Master RX_addr Message type Application data Authentication code
KILAVI protocol has two kinds of packets. Fig. 1 presents short standard length (6 byte that is 48 bits) KILAVIa packets used for network control purposes. These
packets enable the efficient use of limited shared radio channel and node energy resources.
Fig. 1. KILAVIa packet format used for network control.
Fig. 2 presents longer variable length KILAVIb packets used for data transfer between devices. These packets have different security levels, data contents and path length. Packets are extremely short (typically 50 to 100 bits) to conserve limited energy resources by reducing the time spent in the transmission state and retransmissions due to collisions in the transmission channel.
Fig. 2 KILAVIb packet format used for data transfer.
III. KILAVI NETWORK NODES KILAVI network consists of master node (MN), intermediate nodes (IN) and sensor nodes (SN). Network operation is based on MN that has large power, memory and processing capabilities. The MN may also offer the interface to the local or external user. MN handles the network operations such as new node registration, communication path creation and maintenance, node operation mode changes, security key management, and network reconfiguration in case of node failure or decline. MN is always either a receiver or transmitter of a KILAVI packet. Capacity centralization enables one to use simple nodes, simplify security architecture, optimize node power consumption, and simplify network operation. A building environment has devices that are naturally mains powered such as light switches or air-conditioning units. The use of these higher resource or altruist nodes in a KILAVI network gives the possibility of improved network operability and node lifetime. INs and SNs with transceiver have similar functionality and they both function as a sensing or a control device. Altruist devices are usually set as INs and battery-operated devices are set to SNs. If the power limited nodes are temporarily forced to operate as INs, the operation periods must be restricted to avoid node failures. Because buildings are very non-ideal environments
for radio wave propagation, the INs can enhance network range and reliability without drastic increase of SN transmission power. If INs are used, the network is a multi-hop tree network. Otherwise, the network is a single-hop star and INs operate as SNs. To keep nodes simple and communication overhead light, INs do not need any information about the network infrastructure. INs decide based on the received message whether they should forward, store or decline the message. When IN receives a message it first checks if the RX_ADDR field matches with its own address. If so, it processes the message by replacing its own address in the RX_ADDR field with the next hop address from the path field. If the IN is the last intermediate node on the multi-hop path, it stores the message if it is intended for duty cycling SN (last RX_ADDR, relay option). The SN wakes up and queries periodically new messages from the IN that operates as a post box. SN wake up schedule can be controlled depending on the type of application to optimize power consumption versus delay. SNs with only a transmitter can be used in a KILAVI network to achieve extremely long operation periods. These nodes cannot adjust the power and they can actually increase the network traffic significantly if not used properly. In practice, these nodes communicate extremely infrequently and thus their presence despite flooding does not significantly decrease the network operability. IV. KILAVI NETWORK OPERATION This section presents the operation of a KILAVI network by explaining the new node registration and typical control and monitoring tasks in a building network. KILAVI protocol includes also other master initiated operations such as route recovery, new route establishment, and node parameters adjustment. Network reconfiguration takes place if there is a node failure or network operability can be optimized to e.g. prevent network congestion or node failure. The security can be used to prevent eavesdropping, modification and fabrication of network packets. A. Node registration The new node registration process starts by setting MN to registration mode. This prevents unwanted registration requests during normal operation. The new node is registered to a system by simply pushing the node’s registration button. In KILAVI, security can be increased by transferring primary key from registration device to sensor. This key can be used in registration to authenticate the parties. Fig. 3 presents the registration procedure in KILAVI. [5]
Fig. 3. KILAVI registration process.
Pushing the registration button produces a broadcast KILAVI Registration Request. Special registrations addresses are used. Manufacturer IDs are transferred in registration to identify a node before the final addresses are obtained in the registration access. Maximum hop counts are used to restrict the flooding. In the registration message the path field is initially empty and it works as a hop counter. The data field may contain a sensor generated nonce for security purposes. This message is relayed to MN through INs which increase hop count, add their own addresses to the message and resend them with random delays. If optional security features are utilized in registration, then Registration Challenge and Registration Response messages are sent between the parties. These messages are used to make sure of the identity of the other party, and to produce a key used for message authentication. Aside from extra security related items sent in the data field, these messages are similar to the Registration Request message. After this, MN adds the new node to its database, gives a next available device address to the node, calculates the best route to the new node, and sends a Registration Confirmation to the sensor. The manufacturer ID is transferred to identify for whom the confirmation is intended. The successful registration process is finalized by sending a Registration Acknowledgement (table II) to MN. At this time, TX_ADDR is the SN address, RX_ADDR is the first IN address, and the path field includes all INs on the path plus the MN address (the last address). After registration process, the path between MN and SN is determined for following activity. TABLE II REGISTRATION ACKNOWLEDGEMENT TO MASTER FIELDS Contents TYPE (1 byte) Acknowledgement TX_ADDR (2 byte) SN device type and device address RX_ADDR (2 byte) MN device type and device address HEADER (2 byte) hop count, message form, data length PATH (2 byte/hop) Intermediate node addresses
In some applications it is necessary to use SNs with only a transmitter causing some differences in the node attachment procedure has few differences. First of all, these nodes cannot use 16-bit addresses and thus the 32-bit manufacturer ID is used as the device address. Other manufacturer dependent information is transferred in the data field. RX_ADDR contains the MN device type and registration ID as device address. Because communication is one-way the packets can be sent as three copies to achieve more reliable data transfer. These nodes enable several years of operation required in special cases such as water meters, and structure embedded sensors where delay is not a problem. B. Operating tasks in a KILAVI network The master node controls and monitors devices by simple KILAVI messages. These tasks can be accomplished primarily by very short Set, Query, State, and On/Off messages. The basic idea is to minimize the power consumption by using duty cycling. Duty cycling periods can be optimized in respect of node lifetime and delay. There are three basic control and monitoring tasks in a KILAVI network: 1) MN driven monitoring, 2) MN driven control, and 3) SN initiated intermittent or periodic monitoring. In the first case, MN makes a query to get information from IN or SN. If nodes are duty cycled, the last IN on the path stores the information until SN wakes up and checks for and queries messages sent by MN. In the second case, MN sets IN or SN to certain state or change their operational parameters. If node is always active (INs) requests are sent to the node through the path determined in registration or path update processes. In the third case, SN or IN sends information to MN at certain intervals or state changes through a predetermined path. V. RENDEZVOUS SCHEMES IN KILAVI This section presents RTS (Ready-to-Send) and RTS/CTS (Ready-to-Send/Clear-to-Send) rendezvous schemes whose function in KILAVI network operation is analyzed in the next section, in respect of sensor lifetime. RTS and CTS packets are KILAVIa packets. In RTS (1) and RTS/CTS (1) schemes control and acknowledgements messages are not used. The latter scheme can reduce collisions in shared RF transmission channel, and the former can be used with sensors with only transmitter capability to yield very long node lifetime. In RTS (2) and RTS/CTS (2) schemes, ACK signals can be used to informing sensor about successful transmission or that there is no data in the post box. Also the reception of control and configuring commands is possible (DATA). The difference is in the channel access, where the latter scheme waits for a CTS signal after an RTS signal before transmitting DATA or QUERY. Lifetime analysis is based on sensor node rendezvous schemes and operation phases summarized in table III (0-1
is the probability of a phase). In the measurements, when SN wakes up it first measures the temperature that is sent to IN/MN. In the sleep state the node switches off the radio and the microcontroller is set to low-power mode. TABLE III MESURED KILAVI SENSOR OPERATION CASES PHASES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
SN wakes up Measure temp. Transceiver on Send RTS Receive CTS Send Data SN goes to sleep SN wakes up Transceiver on Send RTS Receive CTS Send Query Receive Ack/RTS Send CTS Receive Data SN goes to sleep
RTS 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0
RTS/ CTS 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0
RTS 2 1 1 1 1 0 1 1 1 1 1 0 1 0,99 0 0,01 1
RTS / CTS 2 1 1 1 1 1 1 1 1 1 1 1 1 0,99 0,01 0,01 1
VI. KILAVI MEASUREMENTS AND ANALYSIS This section presents and analyzes measurement results related to sensor node lifetime. Nodes are built around a Texas Instrument MSP430F147 microcontroller and a Nordic NRF905 radio transceiver. Lifetime values are cumulative and measured power consumptions of the KILAVI node includes communication, processing and measurement phases. Sensor node lifetime analysis includes the following parameters: rendezvous scheme, communication interval, data packet size, and transmission power. Equation (1) is used to analyze node lifetime (Tl). Tl =
Wb Is + Qm* fm + Qtx* ftx + fq * (QQ1* p + QQ2* (1- p))
(1)
Is = sleep state current (measured) Qm = electric charge in measurement (measured) fm = measurement frequency Qtx = electric charge in transmission state (measured) ftx = transmission frequency fq = query frequency QQ1 = electric charge in query (if ACK) (measured) QQ2 = electric charge in query (if DATA) (measured) p = probability that query is responded to with ACK or NO DATA
Lifetime analysis assumes that the energy (Wb) of an AA battery (1500 mAh) can be exploited totally. Battery characteristics such as over-charge, relaxation effect, and self-discharge currents are major aspects influencing available energy. Batteries do not fall into the scope of the paper but to achieve 1500mAh energy may require the use of two batteries. In the following analysis f=fm=ftx=fq. A. Communication interval effect on node lifetime Figure 4 shows the sensor node lifetime with different
rendezvous schemes and communication frequencies when data packet length is 9 bytes (data field contains 2-byte temperature value) and transmission power is 0,6mW.
derived from increasing collisions in the RF channel. P = 0,6 mW, f = 10 s
10 9
P = 0,6 mW, L = 9 bytes
10
RTS(1)
9
8
RTS/CTS(1)
7 RTS(2)
7
Lifetime (years)
Lifetime (years)
8
6
RTS/CTS(2)
5 4
RTS(1)
6
RTS/CTS(1)
5 RTS(2)
4 3
RTS/CTS(2)
2
3
1
2
0
1
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Packet Size (Bytes)
0 5
10
15
20
25
30
Comm unication interval (s)
Fig. 4. Sensor node lifetime vs. communication interval.
When the communication interval is 1s, the node is in the sleep state over 98% of the time. When the interval is increased to over 2s the sleep state accounts for over 99% of the time, and when over 10s more than 99,8%. Communication intervals should be restricted to keep sensors in a low power state (IS=8,5µA) most of the time. For the sake of comparison, IACTIVE (receiver on) is 12,99mA. The increase in communication frequency causes the response times between nodes to increase. However, sensors are primarily used to measure and report environmental events or inform on changes in state. These sensors can be configured to adjust e.g. the measurements process and communication interval. Delays of several or even tens of seconds are not usually puzzling. To control different phenomena often takes a long time and thus control command delay is not a factor in control task delay. B. Packet length effect on node lifetime Figure 5 shows the sensor node lifetime with different rendezvous schemes and data packet lengths when communication frequency is once in 10 seconds and transmission power is 0,6mW. Data packet length is increased from 9 bytes to 72 bytes. When frequency is increased to once in 2 seconds then the node lifetime is reduced in 1) RTS (1) scheme from 2,8 to 1,2 years; 2) RTS/CTS (1) from 2,0 to 1,0 year; 3) RTS (2) from 1,2 to 0,7 years; 4) RTS/CTS (2) from 0,9 to 0,6 years. The size of packets sent is a significant factor in sensor node lifetime and is the reason for small KILAVI packets. Measurements showed lifetime fluctuation in cases where data packet size varied between 9 and 72 bytes. Longer packets will cause higher transmitter activity because of packet transmission times and retransmissions that are
Fig. 5. Sensor node lifetime vs. packet size.
C. Transmission power effect on node lifetime Figure 6 show the sensor node lifetime with different rendezvous schemes and transmission power levels when communication frequency is once in 10 seconds and data packet length is 9 bytes. Power is increased from 0,1mW to 10mW. When communication frequency is increased to once per 2 seconds and power is increased two decades from 0,1mW to 10mW then node lifetime is reduced in 1) RTS (1) scheme from 3,0 to 1,9 years; 2) RTS/CTS (1) from 2,1 to 1,5 years; 3) RTS (2) from 1,3 to 0,8 years; 4) RTS/CTS (2) from 1,0 to 0,7 years. f = 10 s, L = 9 bytes
10 9 8
RTS(1)
7
Lifetime (years)
0
RTS/CTS(1)
6 5
RTS(2)
4 RTS/CTS(2)
3 2 1 0 0
1
2
3
4
5
6
7
8
9
10
Power (mW)
Fig. 6. Sensor node lifetime vs. transmission power.
Transmission power is a major factor in node lifetime and it also influences network connectivity. KILAVI protocol includes a power control feature where SN’s next hop
neighbour, that is IN or MN, can request SN to adjust its transmission power based on received signal strength. In measurements, four level, two decade (0,1 to 10mW) power control causes range variation between 4 and 15 metres, in the test environment. However, in building environment the communication path is anything but ideal even in this relatively low 433 MHz operating frequency. Thus the power control is not a straightforward task to accomplish and there should be strong hysteresis in power control.
[3] [4]
[5]
I.F. Akyildiz, W. Su, Y. Sankarasubramaniam, E. Cayirci, “A Survey on Sensor Networks”, IEEE Communications Magazine, Aug 2002, pp. 102-114. N. Pere, M. Soini, L. Sydanheimo, and M. Kivikoski, ”The Wireless Information Centre Concept in the Building Environment,” In the proceedings of the IASTED International Conference on Wireless Networks and Emerging Technologies (WNET2005). 19 – 21.7.2005. Banff, Canada. H. Sikkila, M. Soini, L. Sydanheimo, and M. Kivikoski, ”KILAVI Wireless Communication Protocol for the Building Environment – Security Issues,” In the proceedings of the 10th IEEE International Symposium of Consumer Electronics (ISCE2006), St. Petersburg, Russia, June 29-July 1, 2006.
VII. CONCLUSIONS A building is a very challenging environment in which to implement a functional low-power wireless network. This is due to the high path loss environment and the need for several years of maintenance free operation of wireless nodes. The wireless approach is a notable option due to easy installation, network configurability, and reduction in cabling costs. The simple and low data rate KILAVI protocol has been developed for building environment communication with these things in mind. Idea is to minimize the number of packets sent and as well as their size, over the RF medium, simplify the communication protocol between devices, use available resources of altruist nodes, keep the power scarce nodes very simple and use centralized topology to simplify the network operation. The KILAVI protocol defines functions that are used to gather data, control and adjust nodes, register devices to the system, and optimize network operation. Measurements indicate that sensors in a KILAVI network can achieve extremely long operating periods because nodes are in a very low-power state at least 98 % of the time. To achieve several years of operation time communication frequency, transmission power, and packet size must be restricted. Multi-hop communication enables sensor to use lower transmission power, and in many practical building control and monitoring applications communication delay is not a critical factor. To achieve reliable communication, especially in a multi-hop KILAVI network the use of CTS signals may be reasonable though shorter lifetimes will be gained. A big challenge is timing optimization. Initial studies indicate that there is a possibility to achieve a reduction of as much as 20 % in power consumption if physical layer timing between nodes is made more accurate and thus nodes can spend further time in the low-power sleep state. REFERENCES [1]
[2]
P. Ali-Rantala, L. Sydanheimo, M. Keskilammi, and M. Kivikoski, ”Indoor propagation comparison between 2,45 GHz and 433 MHz Transmissions,” In the proceedings of the 2002 IEEE Antennas and Propagation Society International Symposium, San Antonio, Texas, 16-21 June 2002. V. Raghunathan, C. Schurgers, S. Park, and M. B. Srivastava, “Energy aware wireless sensor networks,” IEEE Signal Processing Magazine, 19(2):40-50, March 2002.
Mikael N. K. Soini (S´03) was born in Uusikaupunki, Finland, on November 23, 1979. He received his M. Sc. degree in electronics from Tampere University of Technology (TUT), Tampere, Finland, in 2002. He is currently a Research group manager at TUT, Institute of Electronics, Rauma Research Unit. His research interests are focused in the area of wireless data communication. Hannu M. Sikkilä was born in Alajärvi, Finland, on October 20, 1982. He works currently towards the M. Sc. degree and acts as Research assistant at TUT Rauma Research Unit. His research interests are focused on embedded systems and secure data transfer for home environment. Petri T. Oksa was born in Pori, Finland, on September 1, 1972. He received the M.Sc. in electrical engineering from Tampere University of Technology (TUT), Pori, Finland, in 2005. He is currently a researcher at TUT Rauma Research Unit. His research interests are in the field of wireless data transmission for building environments. Lauri T. Sydänheimo was born in Tampere, Finland, on February 19, 1959. He received the M.Sc. and Doctor of Technology degrees in electrical engineering from Tampere University of Technology (TUT), Tampere, Finland, in 1997 and 2005, respectively. He is currently a Senior Researcher at TUT, Institute of Electronics, Rauma Research Unit where he runs day-to-day operations. His research interests are focused on wireless data communication and radio frequency identification. Markku Kivikoski (S´77-M´82) was born in Tampere, Finland, on May 13, 1952. He received the Diploma Engineer (M.Sc.), the Licentiate of Technology, and the Doctor of Technology degrees in electrical engineering from Tampere University of Technology (TUT), Tampere, Finland, in 1976, 1980, and 1985, respectively. From 1976 to 1984, he was Assistant, Head Assistant, Research Scientist, Laboratory Engineer, Senior Research Scientist, and acting Associate Professor at TUT. From 1984 to 1988, he was R&D Manager, Head of Section, and Technical Director with Hollming Ltd. Electronics. From 1988 to 1994, he was at Technical Research Centre of Finland (VTT) Professor and Director of Machine Automation Laboratory, and Research Professor and Head of Machine Automation Research. In 1994, he was appointed by invitation to the Professor Chair of Industrial Electronics with TUT. Since 1996 he has also been Head of Institute of Electronics at TUT. In 1998, he became the Head of Department of Electrical Engineering, and further in 2002, he was elected the Vice Rector, TUT. From 2001 to 2003 he has served on the Research Council for Natural Sciences and Engineering, the Academy of Finland. His research interests include wireless data transfer for industrial environment, electromagnetic compatibility, embedded real-time systems, and mechatronics.