## 3 WSAN for Control Applications  
This section describes the architecture of WSANs as a backbone for constructing control applications. The main challenges in design of WSANs will also be discussed briefly. In general, there are three essential components in a WSAN: sensors, actuators, and base stations. The roles of sensors and actuators have been described previously, while the base stations are often responsible for monitoring and managing the overall network through communications with sensors and actuators. Depending on whether or not there are explicit controller entities within the network, two types of architectures of WSANs for control applications can be distinguished, as shown in Fig. 1 and Fig. 2, respectively. These two architectures are called automated architecture and semi-automated architecture, respectively, in [1]. In the first type of architecture as shown in Fig. 1(a), there is no explicit controller entity in the WSAN. In this case, controllers are embedded into the actuators and control algorithms for making decisions on what actions should be performed upon the physical systems will be executed on the actuator nodes. The data gathered by sensors will be transmitted directly to the corresponding actuators via single-hop or multi-hop communications. The actuators then process all incoming data by executing pre-designed control algorithms and perform appropriate actions. From the control perspective, the actuator nodes serve as not only the actuators but also the controllers in control loops. From a high-level view, wireless communications over WSANs are involved only in transmitting the sensed data from sensors to actuators; control commands do not need to experience any wireless transmission because the controllers and the actuators are logically integrated, as shown in Fig. 1(b). Fig. 2(a) shows the second type of architecture, in which one or more controller entities explicitly exist in the WSAN. The controller entities could be functional modules embedded in the base stations or separated nodes equipped with sufficient computation and communication capacities. With this architecture, sensors send the collected data to the controller entities. The controller entities then execute certain control algorithms to produce control commands and send them to actuators. Finally, the actuators perform the actions. In this context, both the sensor data and control commands need to be transmitted wirelessly in a single-hop or multi-hop fashion. A high-level view of the applications of this architecture is depicted in Fig. 2(b). Figure 1: WSAN Architecture without explicit controllers. Figure 2: WSAN Architecture with explicit controllers. In combination with the unique characteristics of WSANs, control applications pose the following main challenges associated with the design of WSANs:  
* _Reliability_. From the control perspective, packet loss degrades control performance and even causes system instability. Because practical control applications can only tolerate occasional packet losses with a certain upper bound of allowable packet loss rate, WSAN design should minimize the occurrence of packet losses as much as possible. Ideally, every packet should be transmitted successfully from the source to the destination without loss. However, due to many factors such as low-power radio communication, variable transmit power, multi-hop transmission, noise, radio interference, and node mobility, packet loss cannot be completely avoided in WSANs. The challenge then becomes how to improve the reliability of the network system in the presence of packet loss. * _Real-time constraint_. Control systems are inherently real-time systems in the sense that control actions must be performed on the physical systems by their deadlines. It is worth mentioning that real-time does not necessarily mean 'fast'. For real-time control applications, both delay and its jitter should be limited and predictable in favor of control performance improvement.