- freely available
- re-usable

*Sensors*
**2009**,
*9*(11),
8593-8609;
doi:10.3390/s91108593

Published: 28 October 2009

## Abstract

**:**We propose a decentralized algorithm to calculate the control signals for lights in wireless sensor/actuator networks. This algorithm uses an appropriate step size in the iterative process used for quickly computing the control signals. We demonstrate the accuracy and efficiency of this approach compared with the penalty method by using Mote-based mesh sensor networks. The estimation error of the new approach is one-eighth as large as that of the penalty method with one-fifth of its computation time. In addition, we describe our sensor/actuator node for distributed lighting control based on the decentralized algorithm and demonstrate its practical efficacy.

## 1. Introduction

Wireless sensor/actuator networks (WSANs) have been investigated in addition to wireless sensor networks (WSNs) since WSANs have more attractive and useful applications than WSNs alone. In WSNs, the main objective is to gather raw sensor data or estimate the condition of the environment. From such a sensing standpoint, Zhao et al. proposed collaborative signal and information processing (CSIP) to target tracking problems [1]. They showed that collaborative and decentralized sensor networks are scalable and efficient as regards sensing and communication. Rabbat et al. investigated distributed algorithms for sensor network data processing [2]. They formulated estimation problems as optimization problems in distributed WSNs. WSANs have the potential to expand WSN applications, enabling the nodes to perform both sensing and actuation [3-5]. A promising WSAN application is the control of spatially distributed actuators, such as dimmable lighting ballasts, switches and air conditioning systems. WSANs can save energy because they can accurately monitor environmental conditions and thus control the actuators precisely. In this context, Taylor et al. developed WSANs for energy management in heating, ventilation, and air-conditioning (HVAC) systems [6]. Zhang et al. proposed a field estimation technique that uses WSANs to control HVAC systems in buildings [7]. Li et al. developed WSANs for lighting control in the home environment [8]. One challenge is to develop algorithms that save energy without sacrificing user comfort. Sandhu et al. proposed WSANs for lighting control using a multi-agent system [9]. Singhvi et al. developed a centralized lighting system to increase user comfort and reduce energy costs by using Motes [10]. Lin et al. proposed a decentralized algorithm for WSANs for optimal lighting control [11]. We proposed WSANs that can provide optimal actuator control with respect to energy saving and control signal quality as well as sensing [12]. The sensor/actuator nodes perform sensing and actuation autonomously. However, the decentralized algorithm is based on the penalty function method, and it takes a long time to compute optimal control signals.

In this paper, we introduce an improved collaborative sensing and actuation algorithm in an optimization framework for controlling lights in workplaces. In our algorithm, an objective function is defined that balances energy saving against control signal quality. We describe a decentralized algorithm that is more scalable than the centralized one, and that can autonomously calculate control signals without a central server. This algorithm uses an appropriate step size in the iterative process for calculating control signals. We demonstrate its accuracy and efficiency compared with the previously proposed method by simulations. We also carry out WSAN experiments using Motes to examine the feasibility of the algorithm. We show that the estimation error of the proposed method is one-eighth as large as that of the previous method with one-fifth of its computation time. In addition, we describe a testbed that consists of Motes and infrared (IR) remote controls for distributed lighting control based on the decentralized algorithm.

## 2. Distributed WSAN Model

In dense distributed WSANs, collaborative processing is essential for intelligent sensing and for controlling environments such as shared workplaces. To conserve energy, local sensing usually determines the local actuation of, for example, a light by using an occupancy sensor. When sensor/actuator nodes are networked, the quality of the control signals within the WSANs is improved, resulting in occupant satisfaction. In this paper, we use “control signal” as the signal applied to actuators. We assume that a control signal, for example a current, corresponds to the controlled environmental condition, such as the brightness of lights. We focus on the energy saving of the lights. In addition, the spatial smoothness of brightness is likely to be preferred by users. We propose a method that balances energy saving and the spatial smoothness of the control signals to improve control signal quality. Our method is formulated as an optimization problem. Let J be an objective function defined as:

_{i}is the control signal of sensor node i, f

_{j}is the control signal of sensor node j within the communication range N

_{i}of sensor node i, and α (0 < α < 1) is a tradeoff parameter balancing $\frac{1}{2}\sum _{i=1}^{n}(\frac{1}{2}\sum _{j\in {N}_{i}}{({f}_{i}-{f}_{j})}^{2})$ in Equation (1) (the spatial roughness of the control signals) against $\frac{1}{2}\sum _{i=1}^{n}{f}_{i}^{2}$ (the consumed energy). For this discussion, let us consider that the sensors are passive infrared (PIR) occupancy sensors that detect the presence of people, and that the controlled actuators are lights. Occupancy sensor response s

_{i}is binary such that:

The lights are turned on in areas where people are present. To simplify the problem, we assume that the control signals are set at 1 where people are present, that is:

Minimizing J with respect to f_{i} means that lights must be turned on in areas where people are present and controlled to balance the spatial smoothness of the control signals and energy saving otherwise. To obtain f_{i} that minimizes J, the partial derivative of J with respect to f_{i} is calculated as:

Equation (4) is a simultaneous equation which represents a centralized algorithm. It can be solved by a server collecting sensor responses from all sensor nodes. After collecting the sensor responses { S_{1}, ‥, S_{i}_{−1}, S_{1}, S_{i}_{+1}, ‥, S_{n} }, the server computes control signals { f_{1}, ‥, f_{i}_{−1}, f_{1}, f_{i}_{+1}, ‥, f_{n} } by solving Equation (4) and sends the resulting control signals back to the sensor nodes. The sensor nodes control their external actuators through their digital output ports depending on the control signals.

It is also possible to use a decentralized algorithm, which can compute each control signal without a server. Rabbat et al. showed that distributed optimization algorithms are more efficient than centralized ones in terms of energy and communications [2]. The gradient method can be used to determine the value of f_{i} that minimizes J [13]. Using the gradient method, f_{i} is incrementally updated by Δf_{i} as:

Formerly J was redefined to include the condition of Equation (3) using the penalty function method [12]. This approach was very useful for formulating the objective function without classifying the values of s_{i}. However, the convergence of f_{i} was very slow. In this paper, f_{i} is computed separately by Equations (3) and (5) depending on the values of s_{i}.

Figure 1 shows a decentralized sensor/actuator network system in a shared workplace and an example of calculated brightness for each node. Each sensor node is arranged at regular intervals and communicates with neighboring nodes to compute its control signal locally. In this model, there is no central server collecting sensor data and computing control signals. It is necessary to repeat the updates described by Equation (5) and the communications of the control signals between neighboring nodes.

Figure 2 shows the two-dimensional sensor node arrangement and how the signals propagate in the network for activation. To simplify the problem, sensor nodes were arranged at regular intervals to form a mesh network. The dashed circle N_{i} represents the communication range of sensor node i, which covers neighboring nodes. First, the nodes detect people and become active. Then they communicate their signals to neighboring nodes. The nodes that receive the signals become active in turn so that finally all the nodes are active.

Figure 3 shows how the control signals propagate after activation. They compute their control signals and communicate them to their neighboring nodes in turn. In this way, the control signals are computed as they propagate through the network. After some communication and computation iterations, each node provides the optimal control signal for environment control.

It is very important to reduce the number of iterations in this process. We have to determine a large ε value that ensures the stability of Equation (5). Suppose that m sensor nodes detect the presence of people. Then Equation (4) is represented as:

**H**is an (n-m) × (n-m) matrix, and

**f**and

**d**are n-m element column vectors. The elements of

**H**satisfy the following equation:

**H**is strictly diagonally dominant and regular [14].

In addition, because the diagonal elements of **H** are positive:

**H**is a positive definite matrix.

To guarantee the stability of Equation (5), we have the following equation [12]:

_{max}is the largest eigenvalue of

**H**.

With the penalty function method, there are large values in the diagonal elements and large eigenvalues of **H** because the penalty parameter is usually large (e.g. 100) [12]. Therefore, we had to use a small ε value, which resulted in the slow computation of f_{i}. In contrast, we can apply a larger ε to Equation (5) than with the penalty function method since we have a smaller λ_{max} than that of the penalty function method. This is expected to lead to the fast and precise computation of the control signals.

## 3. Experimental

Crossbow Motes, MICA2DOTs equipped with PIR occupancy sensors (AMN 13112, Matsushita Electric Works, Ltd.) were used as the sensor/actuator network testbed. A MICA2DOT consists of an Atmega128 microcontroller (4 MHz) and a CC1000 radio (315 MHz). The occupancy sensor can be easily attached to the 10-bit A/D converter of the Mote. The sensor reading ranged from 0 to 1023. The software was TinyOS1.1 [15].

First, we examined the decentralized algorithm by simulations and by implementing it using Motes. A Mote has digital I/O pins that can control electronic components such as lights. In this experiment, Motes were assumed to detect occupancy by using the PIR sensors and control lights. We assumed that the sensor/actuator nodes were arranged on the ceiling in a shared workplace. The lights are controlled depending on the response of the occupancy sensors. Basically, the occupied areas must be bright and the unoccupied areas may be dark. Any nonuniformity of brightness may be unacceptable to the occupants. Therefore, both energy saving and smoothness of spatial brightness must be taken into consideration. In this experiment, we used 25 Motes, each with an occupancy sensor. Each node's sampling time was 2 s and its neighboring nodes were fixed regardless of the wireless communication range. All nodes were assumed to have a light control unit with a digital output port. Figure 4 shows the experimental setup. Nodes 1, 4 and 19 detected the presence of people and communicated their signals to the neighboring nodes. First we investigated the resulting control signals using the penalty function method. There were 50 communication iterations. Then we evaluated the proposed decentralized algorithm. There were 10 communication iterations.

Next, we developed a testbed for WSANs based on Motes. The sensor/actuator node consists of a MICA2DOT, a PIC microcontroller (PIC12F629, Microchip Technology Inc.), a PIR occupancy sensor and an IR LED for remote control. The IR LED is driven by the PIC microcontroller and generates remote control signals for lights. The light has an IR detector for reading the control signals. Lighting brightness can vary by eight magnitudes depending on the control signals from the Mote. In this experiment, three lights were deployed on the ceiling and three corresponding nodes were placed on the desk (Figure 5). Each node detected occupancy and communicated the control signal to its neighboring nodes, and then controlled the brightness of a unique light right above it. The Mote's wireless communication range was limited to approximately 2 m. Figure 6 is a photograph of a distributed lighting experiment. First, the three nodes detected three people and set the corresponding lights at maximum brightness. When the two people at nodes 1 and 3 left their desks, the nodes detected the occupancy changes {s_{1},s_{2},s_{3}} = {0,1,0} and began to compute the optimal brightness by communicating with each other. In this experiment, the node's communication interval was 5 s and the nodes adjusted the lights every interval. There were 10 communication and control iterations, which means a communication and control duration of 50 s. Experiments were also conducted for the following occupancy changes, {s_{1},s_{2},s_{3}} = {1,0,0}, {s_{1},s_{2},s_{3}} = {1,0,1}, {s_{1},s_{2},s_{3}} = {1,1,0}.

## 4. Results

Figure 7 compares the control signals simulated by the decentralized and centralized algorithms. Equation (1) was redefined by the penalty function method taking account of Equation (3) [12]. Parameter α in Equation (1) was 0.3. The centralized algorithm provides an exact solution for modified Equation (4) by the penalty function method. This result shows that illumination was provided in unpopulated areas close to an area where people were present. In the decentralized algorithm, the initial values of the calculated control signals were determined by sensor responses, that is, 1 for nodes 1, 4 and 19, and 0 for the others. The parameter ε in Equation (6) was 0.015. The root mean square (RMS) error between the centralized and decentralized results was 0.069. This result indicates that there were some errors in the estimated control signals when using the decentralized algorithm even with a large iteration number. We must increase the iteration number further to obtain a better estimation.

Figure 8 compares the experimental results for distributed actuation using Motes implemented with a decentralized algorithm and a simulation of the centralized algorithm. The parameters were the same as those used in Figure 7. The Motes were implemented with the same decentralized algorithm as in Figure 7. The RMS error was 0.088. It is clear that, despite some errors, Motes can provide a good estimation. The average communication error rate among the Motes was 9.9%. We believe that communication error led to the Motes' calculation error. When there is no communication error, the Motes can compute perfectly, and provide the same result as that in Figure 7.

Figure 9 compares the control signals simulated by the proposed decentralized and centralized algorithms. The parameter ε in Equation (6) was 0.5 and the iteration number was 10. We were able to use a larger ε and a smaller iteration number than in Figure 7. The RMS error was 0.00067, which indicates that this algorithm could achieve better performance than seen in Figure 7. This proposed algorithm enables WSANs to calculate the optimal control signals rapidly and precisely.

Figure 10 compares the calculation results obtained for the Motes and the centralized algorithm by simulation. The parameters were the same as in Figure 9. The Motes were implemented with the proposed decentralized algorithm. The RMS error was 0.011 and the average communication error rate among the Motes was 9.7%. Compared with Figure 8, the RMS error of the proposed algorithm was one-eighth as large as that of the penalty method with one-fifth of its computation time. The computation errors were caused by the communication errors. This result shows that the Motes could provide almost the same result as the simulation in Figure 9. It was found that the algorithm was capable of constructing practical environment control systems using Motes despite the communication errors.

Figure 11 compares the simulation results indicating that how the RMS error depends on the communication error for the proposed and the previously proposed algorithms. The parameters were the same as those in Figures 7 and 9. The Mote's average packet loss rate was approximately 10%. The simulation results indicate that the proposed algorithm is robust against the communication error.

In order to show that the proposed algorithm can be applied in general cases, we used another occupancy pattern and conducted distributed actuation experiments. Figure 12 shows the occupancy pattern and the distributed actuation results. The Motes could provide a good estimation. This result shows that the algorithm works even if the occupancy pattern changes.

Figure 13 shows the control signal profiles of the three lights in the distributed lighting experiment using a Mote testbed for {s_{1},s_{2},s_{3}} = {0,1,0}. The parameters were the same as those in Figure 9. After detecting the occupancy changes, the nodes dimmed the lights gradually and completed computing the brightness at 30% of the maximum brightness for lights 1 and 3. The brightness of light 2 remained unchanged. Using the centralized algorithm of Equation (4), we obtained the control signals of the lights as:

Figure 14 shows the control signal profiles of the three lights for {s_{1},s_{2},s_{3}} = {1,0,0}. The control signals calculated from the centralized algorithm are:

The RMS error of the calculated control signals was 0.0045 and the average communication error rate was 10.0%.

Figure 15 shows the control signal profiles of the three lights for {s_{1},s_{2},s_{3}} = {1,0,1}. The control signals calculated from the centralized algorithm are:

The RMS error of the calculated control signals was 0.00003 and the average communication error rate was 5.0%.

Figure 16 shows the control signal profiles of the three lights for {s_{1},s_{2},s_{3}} = {1,1,0}. The control signals calculated from the centralized algorithm are:

The RMS error of the calculated control signals was 0.00049 and the average communication error rate was 10.0%.

These results indicate that the various decentralized lighting controls were successful when using the proposed decentralized algorithm of the wireless sensor/actuator nodes. We attained the same accuracy as the centralized algorithm with a small number of communications and computations because of the large value of the step size employed in the iterative process.

## 5. Discussion

The simulation of the centralized collaborative actuation algorithm revealed that optimal control signals can be obtained when the central server can gather data from all the sensor nodes. This algorithm will be useful when it is used in relatively small WSANs. On the other hand, the proposed decentralized collaborative actuation algorithm is more scalable in practical deployment because it does not need a central server. The routing becomes more complicated as the sensor network becomes larger. This algorithm is free from such a complicated routing problem. The trade-off between the accuracy of the calculated signals and the energy consumed by communication is still a significant problem in the decentralized WSANs. We proposed an improved decentralized algorithm for fast control signal computation. Experiments have indicated that the number of iterations is reduced to approximately ten with appropriate step values in the iterative process. We implemented the algorithm on Motes and evaluated its feasibility.

The Mote employing the decentralized algorithm provided the same results as the simulations. The accuracy of computing the control signals depends on the step values, the number of iterations, and the communication quality. However, the increase in iterations leads directly to a long computation time. In addition, communication error is likely to be inevitable in WSANs. Experimental results indicated that using large step values is effective for computing the control signals rapidly and precisely.

The average consensus algorithm [16] is closely related to ours. It minimizes a disagreement function to compute the average of the nodes' initial values. It provides a consensus mechanism to compute the average in a large network. It is also applied to a variety of networks such as dynamic networks. In our work, on the other hand, the aim is not to compute the average but to minimize the sum of the consumed energy and the spatial roughness of brightness. And the topology is fixed in the lighting application. Applying the proposed algorithm to various networks remains to be investigated.

In the proposed distributed actuation model, it is unnecessary to clarify the location of each sensor node. Each sensor node may have access to information about neighboring nodes. It is best to arrange sensor nodes at regular intervals and limit the communication range to their neighbors. One way to recognize neighboring nodes is to use a received signal strength indicator (RSSI). This also remains to be investigated.

The smoothness of controlled signals depends on model parameter α When α is set at 0, the calculated controlled signal is such that only occupied areas are illuminated and other areas are dark. In contrast, when α is set at 1 the calculated control signal is such that all areas are illuminated. The parameter depends on whether the purpose of controlling the environment is to save energy or to maintain user satisfaction.

The distributed lighting experiment showed that the autonomous nodes provided the optimal lighting actuation without a central server. The experiment was on a small scale using only three lights. However, a larger light network would be possible, as shown in Figure 10. These results show that the proposed WSANs are scalable for practical environment control systems.

In this work we assumed that the controlled actuators are mainly lights. Other actuators such as air conditioning systems are applicable, and temperature and humidity can also be controlled. These spatially distributed physical signals are targeted by the proposed WSANs. Our testbed has IR LEDs capable of controlling various devices easily thus constituting a versatile controller. We plan to use it to control other actuators.

In this paper, we developed nodes equipped with sensing and actuation functions. By contrast, it is possible to construct WSANs consisting of three types of nodes: sensors, actuators and controllers [3]. In such networks, sensors are distributed densely, and actuators and controllers are distributed sparsely. We must build a heterogeneous communication model that incorporates these different types of nodes.

As future work, we plan to develop a testbed that adapts to users' actions and preferences. We also plan to employ the proposed algorithm in this testbed and demonstrate distributed sensing and actuation that adapts to the users.

## 6. Conclusions

This paper described improved collaborative sensing and actuation algorithms for providing optimal control of lights in workplaces. In our algorithm, the objective function is defined to balance energy saving against control signal quality. We proposed a decentralized algorithm that can autonomously calculate control signals without a central server. We demonstrated its accuracy and efficiency compared with the previously proposed method using simulations and Motes. It uses appropriate step size values in the iterative process used for calculating control signals. Experimental results showed that it is useful for providing accurate and fast computation because it is difficult to eliminate communication errors. This approach enables practical WSAN deployment because it is easy to implement and maintain. In addition, we described a testbed for distributed lighting control based on the decentralized algorithm. It has IR LEDs for controlling various devices wirelessly and flexibly. It can be used as a versatile controller for other actuators with IR detectors. We showed that it achieved optimal lighting control without a central server. In addition, the decentralized computation was very fast and precise. The experimental results suggest that this approach will allow us to realize a practical environment control system.

## References and Notes

- Zhao, F.; Guibas, L. Wireless Sensor Networks: An Information Processing Approach; Elsevier: San Francisco, CA, USA, 2004. [Google Scholar]
- Rabbat, M.; Nowak, R. Distributed Optimization in Sensor Networks. Proceedings of IPSN'04, Berkeley, CA, USA, April 26-27, 2004; pp. 20–27.
- Rabaey, J.M. Low-power Sensor Networks. Proceedings of ISSNIP2005 Tutorial, Melbourne, Australia, December 5-8, 2005.
- Robomote, Available online: http://www-robotics.usc.edu/∼robomote/ (accessed on October 20, 2009).
- Coates, M.; Ing, G. Actuator Networks: Distributed Evaluation of Causal Effect. Proceedings of Signals, Systems and Computers, Pacific Grove, CA, USA, November 7-10, 2004; pp. 1376–1380.
- Taylor, K.; Ward, J.; Gerasimov, V.; James, G. Sensor/Actuator Networks Supporting Agents for Distributed Energy Management. Proceedings of 29th Annual IEEE International Conference on Local Computer Networks (LCN'04), Tampa, FL, USA, November 15-17, 200; pp. 463–470.
- Zhang, H.; Krogh, B.; Moura, J.M.F.; Zhang, W. Estimation in Virtual Sensor-Actuator Arrays Using Reduced-Order Physical Models. Proceedings of 43rd IEEE Conference on Decision and Control, Atlantis, Paradise Island, Bahamas, December 14-17, 2004; pp. 3792–3797.
- Li, S. Wireless Sensor Actuator Network for Light Monitoring and Control Application. Proceedings of Consumer Communications and Networking Conference, Las Vegas, NV, USA, January 8-10, 2006; pp. 974–978.
- Sandhu, J.S.; Agogino, A.M.; Agogino, A.K. Wireless Sensor Networks for Commercial Lighting Control: Decision Making with Multi-agent Systems. Proceedings of Working Notes of the AAAI-04 Sensor Networks Workshop, San Jose, CA, USA, July 26, 2004; pp. 88–92.
- Singhvi, V.; Krause, A.; Guestrin, C.; Garrett, J.H., Jr.; Matthews, H.S. Intelligent Light Control using Sensor Networks. Proceedings of SenSys'05, San Diego, CA, USA, November 2-4, 2005; pp. 218–229.
- Lin, Y.; Megerian, S. Low Cost Distributed Actuation in Large-scale Ad Hoc Sensor-actuator Networks. Proceedings of 2005 International Conference on Wireless Networks, Communications and Mobile Computing, Maui, HI, USA; 2005; pp. 975–980. [Google Scholar]
- Nakamura, M.; Sakurai, A.; Furubo, S.; Ban, H. Collaborative Processing in Mote-based Sensor/actuator Networks for Environment Control Application. Signal Proc.
**2008**, 88, 1827–1838. [Google Scholar] - Bryson, A.E., Jr.; Ho, Y.-C. Applied Optimal Control; Taylor & Francis: Levittown, PA, USA, 1975. [Google Scholar]
- Varga, R.S. Matrix Iterative Analysis; Prentice Hall: Englewood Cliffs, NJ, USA, 1962. [Google Scholar]
- TinyOS, Available online: http://www.tinyos.net/ (accessed on October 20, 2009).
- Saber, R,O.; Fax, J.A.; Murray, R.M. Consensus and Cooperation in Networked Multi-Agent Systems. Proc. IEEE
**2007**, 95, 215–233. [Google Scholar]

**Figure 1.**Decentralized sensor/actuator network system and calculated brightness of each node.

**Figure 2.**Two-dimensional schematic diagram of signal propagation for activation.

**Figure 3.**Two-dimensional schematic diagram of control signal computation.

**Figure 4.**Distributed actuation experiment using Motes.

**Figure 5.**Distributed lighting control experiment using Mote testbed.

**Figure 6.**Photograph of the distributed lighting experiment.

**Figure 7.**Experimental results of distributed actuation using simulations of centralized and decentralized algorithms. The decentralized algorithm is based on the penalty function method.

**Figure 8.**Experimental results of distributed actuation using Motes implemented with decentralized algorithm and simulation of centralized algorithm. The decentralized algorithm is based on the penalty function method.

**Figure 9.**Experimental distributed actuation results obtained using simulations of centralized and proposed decentralized algorithms.

**Figure 10.**Experimental distributed actuation results obtained using Motes implemented with proposed decentralized algorithm and simulation of centralized algorithm.

**Figure 11.**Simulation result of packet loss rate vs. RMS error between centralized and decentralized algorithms (circle: proposed algorithm, square: previously proposed algorithm).

**Figure 12.**Occupancy pattern and experimental distributed actuation results obtained using Motes implemented with proposed decentralized algorithm and simulation of centralized algorithm.

**Figure 13.**Experimental distributed lighting result obtained using Mote testbed for {s1,s2,s3} = {0,1,0}.

**Figure 14.**Experimental distributed lighting result obtained using Mote testbed for {s1,s2,s3} = {1,0,0}.

**Figure 15.**Experimental distributed lighting result obtained using Mote testbed for {s1,s2,s3} = {1,0,1}.

**Figure 16.**Experimental distributed lighting result obtained using Mote testbed for {s1,s2,s3} = {1,1,0}.

© 2009 by the authors; licensee Molecular Diversity Preservation International, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).