Building Intelligent Middleware for Large Scale CPS Systems
Total Page:16
File Type:pdf, Size:1020Kb
Building Intelligent Middleware for Large Scale CPS Systems Niels Reijers, Yu-Chung Wang, Chi-Sheng Shih, Jane Y. Kwei-Jay Lin Hsu Department of Electrical Eng. and Comp. Sci. Intel-NTU Connected Context Computing Center University of California, Irvine National Taiwan University Irvine, CA, USA Taipei, Taiwan Abstract—This paper presents a study on building intelligent application to express globally what it really wants from the middleware on wireless sensor network (WSN) for large-scale sensor network. Furthermore, since most WSN applications are cyber-physical systems (LCPS). A large portion of WSN projects specifically designed to particular scenarios and unique target has focused on low-level algorithms such as routing, MAC layers, environments, most behavior is hardcoded, resulting in rigid and data aggregation. At a higher level, various WSN networks that are typically not very flexible at adjusting their applications with specific target environments have been behavior to faults or changing external conditions. A more high developed and deployed. Most applications are built directly on level vision on how large-scale cyber-physical systems (LCPS) top of a small OS, which is notoriously hard to work with, and or networks of sensors should be programmed, deployed, and results in applications that are fragile and cannot be ported to configured is still missing. other platforms. The gap between the low level algorithms and the application development process has received significantly Indeed, we are far from conducting Rapid Application less attention. Our interest is to fill that gap by developing Development (RAD) for LCPS. This project aims to fill the gap, intelligent middleware for building LCPS applications. The goal by developing a flexible and self-organizing middleware for our research is to produce a "zero-cost" deployment support for LCPS deployment and management in the capability where an LCPS application does not need to be envisioned ubiquitous LCPS of the near future. The constrained on what and where sensors are deployed. An middleware will pursue intelligent capabilities to detect, intelligent WSN middleware can automatically perform optimal identify, configure, deploy, and if necessary, repair, reload and sensor node configuration, bandwidth allocation, fault redeploy an LCPS application. The intelligent capabilities have management, and re-configuration in response to new missions and new devices available. similar goals to autonomic computing, including Self- Configuration, Self-Healing, Self-Optimization, and Self- Keywords: wireless sensor networks; machine-to-machine; Protection. But our research project will be specifically for middleware; virtual machine; configuration; policy; profile LCPS where much of computing, network, energy and memory resources may be under severe constraints. We design the I. INTRODUCTION middleware architecture as configurable modules so that Many existing wireless sensor network (WSN) research different subsets of the “self-X” capabilities may be selected projects have focused on low-level algorithms such as routing, and embedded in a WSN middleware instance for a specific MAC layers, and data aggregation. At a higher level, a sensor node, in order to best meet the needs of the node itself significant number of single-purpose WSN applications have and the LCPS application. been developed and deployed. In between, however, the gap The grand vision for our research is that future LCPS between the low level HW/network support and the mission of should have "zero-cost" deployment where users of an LCPS high-level applications, has received significantly less study. application do not need to be concerned on how and where to Most WSN implementation projects show that building a deploy sensors. The built-in intelligence from the proposed complete, working WSN is still very hard, not to mention LCPS support can automatically perform the optimal sensor making them dynamically adaptable or capable of evolving node configuration, bandwidth allocation, fault management, with new missions, new sensors, and/or new target and re-configuration in response to new missions and new environments. Except for the low level building blocks, there is device deployment. Much like the past transition from low- very little software reuse from one WSN to another WSN. level assembly codes to high-level programming using general WSNs have historically been built with a strong coupling purpose OS and compiler support, LCPS programming may be among applications and the underlying network infrastructure. as platform-independent as possible while keep only the most Many WSN applications are built directly on top of the essential system primitives to allow automatic performance hardware or on some minimum operating system, such as optimization. TinyOS, which is very hard to work with. This results in applications being programmed from the individual node’s perspective, telling a node what to do, rather than allowing the II. PROJECT OVERVIEW process, connecting and setting up sensors, linking them up We envision that LCPS will have many heterogeneous with gateway nodes and cloud servers in a complete WSN sensor nodes (shown as various shapes and sizes in Figure 1), infrastructure. and one or more gateway nodes connected to them. The Finally, in most LCPS applications Master will need to gateway node (shown as EeeBox in the figure) usually has a configure, optimize, and reconfigure sensors in real time. The more powerful computing and networking capability than configuration decision will be made by an optimization engine sensor nodes, and one of the gateways will take the role for residing on Master and may be supported by cloud servers and configuration decision making, referred as Master in our gateways. We propose to implement the configuration engine project, making coordination decisions and configuring the using incremental algorithms so that initial configuration can system and sensor nodes. Master may be connected to some be set up quickly, refined as the application is being used, and Cloud servers in order to maintain some knowledge base for eventually stabilizes. Configuration decisions will be made the application and access big computing power if needed. In based on factors such as sensor profiles, user policy, context our current study, we assume there is only one Master in any knowledge, application history, and real time status, allowing LCPS. There may be shadow Masters in the system to provide the application to respond to changing external conditions. fault tolerance through some real-time backup process. In the future, we will also study distributed Masters for more flexible III. TRI-FRAMEWORK APPROACH and scalable!"#$%&'()*+' support on,-./0.& LCPS. ' To achieve the above goals we will develop three orthogonal middleware frameworks: '$(%")%& #)*+$"'()(" :%(7;<$"'()(" 5/0/6/%$& 1. Sensor profile framework: to enable the handling of <$/#& #$%&"'()(" #$%&"'()(" heterogeneous or new sensor nodes, and for high-level, logical abstraction of low-level, native sensor operations. *++,-./0-"(1& !"#$%& 7"")#-(/0")& 2$$3"4& 2. Application policy framework: to allow user-friendly :)-0$& #$%&"6*%)+*7"8$99(3$" #$%&"6*%)+*7"8$99(3$" #,*-"),$"&()("*%"./" specification of application execution objective, and 0" context-dependent optimization of WSN performance. 891&:$6&9(0$);/.$& 1$(+%2%3" 3. Real-time decision framework: to facilitate real-time 4$5*)$"6*%)+*7" WSN management where decisions are made flexibly and quickly using current data and available sensors. '$=2>$9" #5(+)"'$=2>$9" !" Figure 1. A simple example LCPS application The most important task of Master is to configure, optimize, and reconfigure sensors. To do this it communicates with sensors through a layer of abstraction, hiding hardware and An LCPS application is started by a user who wants to network details of the underlying sensor platform. During the access sensor nodes via Master or other gateways to be discovery and identification phase, Master uses the profile configured by Master. When the user initiates the application, framework to discover the capabilities of connected sensors, Master starts a discovery phase to identify all "capable" sensor and configure sensors' parameters. While there has been some nodes within its connection network. A sensor node is work on discovery protocols in other contexts (for instance "capable" if it is pre-loaded with our light-weight discovery UPnP and DPWS), these approaches are often too heavy for the protocol support in order to communicate with Master for resource-constrained nodes in a sensor network. responding to its query and configuration requests. Each sensor should be loaded with a device profile definition, identifying its capabilities, operational conditions, data attributes and sensing/actuating actions. After all device profiles are collected by Master, Master will match the logical devices used in an application to the available physical nodes in the current operational environment. Many LCPS applications are heavily influenced by the user preference and system context, since users and applications are often mobile and have changing needs under different situations. For example, a user may need different ambient lightings at different time and locations. Another example is that a smart home should provide different room temperatures during night or day, and also depending on the activity inside of each room. We therefore need a policy framework to make LCPS intelligent