1
Architecture of Web Services Interface for A Home Energy Management System M. M. Rahman, Student Member, IEEE, M. Kuzlu, Member, IEEE, M. Pipattanasomporn, Senior Member, IEEE, and S. Rahman, Fellow, IEEE Virginia Tech – Advanced Research Institute, Arlington, VA 22203 Abstract— This paper proposes a web-based architecture to enable information retrieval and appliance management for a Home Energy Management (HEM) system. With the proposed architecture, homeowners can monitor their basic energy usage information, and can perform necessary appliance management based on their pre-defined load priority, preferences, and comfort settings. The proposed architecture is designed based on the Standard Energy Usage Information (PAP10), which ensures interoperability among smart grid equipment. It is also designed with comprehensive security measures. It is expected that the proposed architecture can serve as a reference model for custom hardware designs and implementation of a real time, lightweight and reliable embedded web server for HEM applications in the smart grid environment.
Index Terms—Smart grid, smart appliance interface, ZigBee communications and Home Energy Management.
I. INTRODUCTION
V
ARIOUS Home Energy Management (HEM) systems have been designed to enable end-use appliance control. Many organizations and standards bodies have defined related profiles and standards, which alleviate interoperability and compatibility issues. Web services for HEM are essential for enabling machine-to-machine interaction, using which developers can offer innovative services without repetitive and complex handling of lower level communication technologies (e.g., WiFi, IEEE 802.15.4, or Bluetooth). In many cases it is still quite challenging for application developers, for these web services do not achieve reasonable level of abstraction. Most web services are designed to be a suitable Service Access Point (SAP) for a very broad range of application profiles – hence unsuitable for HEM applications, in which the problem and solution space has to be conceptualized in terms of appliances, their power consumption, price signal, user choices and restrictions, etc. There are many commercial implementations of the gateway device specification [1] from ZigBee [2, 3]—known as ZigBee Gateway Devices (ZGD). ZGDs offer SOAP (Simple Object Access Protocol) and/or REST (Representational State Transfer)-based access to the low level and generic network services of a ZigBee Personal Area Network (PAN). Without an additional layer of abstraction, this web services-based interface is not of much help for developers of client systems.
This project was supported in part by the US National Science Foundation under Grant no. IIP-1114314. M. M. Rahman, M. Kuzlu and M. Pipattanasomporn are with Virginia Tech – Advanced Research Institute, Arlington, VA 22203 USA (e-mails:
[email protected],
[email protected],
[email protected]). Professor Saifur Rahman is the Director and Professor of the Advanced Research Institute of Virginia Tech (e-mail:
[email protected]).
In some cases, vendors of individual appliances provide both WiFi and ZigBee chips, and offer web services-based interfaces to control appliances [4]. Such an interface makes device integration easy for that particular devices. One problem with such features is that, there can be as many such different web services interfaces as there are devices. This makes it impractical for the developer to implement numerous vendor specific web services. Such a collection of appliances will have a collection of different APIs (Application Programmers Interface); and it will be difficult to implement a bunch of different web services for even a single home. Another problem with traditional HEM systems is that, each of those has different energy usage information (EUI) model. This creates barrier when interfacing with other systems. The objective of this paper is to describe a web-based architecture and interface for an HEM system that allows demand response (DR) implementation at the appliance level. The proposed web-based interface offers EUI in the standard PAP10 model [5] so that integration with new energy management systems becomes possible. The system proposed in this paper emphasizes on offering web services for machineto-machine (M2M) communications without dealing with lower level complexities, which is developed with information model compatible with PAP10. The proposed system also emphasizes on user experience. It offers information visualization regarding appliance’s energy consumption in an intuitive manner. Evaluation of security is also performed to ensure that the proposed system doesn’t introduce any new security hole, and is more secure. II. OVERVIEW OF A HOME ENERGY MANAGEMENT SYSTEM With the emergence of the smart grid, demand response (DR) has become a new possibility. DR is an approach to allow end-use demand management, where an electric utility company—according to prior agreements—sends price or DR signals to residential/commercial customers. This DR request can be sent using Power Line Communication (PLC) or RF communication to customer premises through a local gateway, i.e., smart meters. Based on this signal, customers may choose to manage their energy usage and turn ON/OFF selected appliances based on their preferences and load priorities. An HEM system can help a customer to respond to such demand response events. Fig. 1 illustrates the overall concept of an HEM system that can be used to manage or schedule appliance operation within a residential house.
2
it would not encourage others to build innovative applications and solutions. B. Review of Energy Usage Information Models A variety of information models for energy usage have been developed by many prominent organizations, such as ZigBee Smart Energy Profile (SEP2), IEC CIM, OASIS OpenADE, ANSI C12.19/22, etc. [13]. To ensure interoperability, PAP10 – the Energy Usage Information (EUI) Model defined by NAESB (North American Energy Standards Board) – has been developed by the alliance of major organizations. PAP10 is the organization of EUI collected from devices. PAP10 serves as a basis for one of the main focuses of this work, which is to develop a web services-based gateway to make the EUI available in the PAP10 format. C. Review of Web Services Technologies Fig. 1. A conceptual architecture of a Home Energy Management (HEM).
III. REVIEW OF PREVIOUS WORK, EXISTING PROTOCOLS AND COMMUNICATION STANDARDS FOR HEM APPLICATIONS This section provides a thorough review of previous work, existing protocols and communication standards for HEM applications. A. Review of Previous Work In recent years, many works have been carried out which are related to HEM systems. In [6], the authors present a home gateway to offer interoperability among various devices at the service level. The proposed gateway comes with an ability to apply energy management strategy. In [7], authors have described a home energy monitoring system using sensor networks. They have also evaluated its accuracy and energy saving efficiency. The authors in [8] offer a RESTful interface of a building energy management system. The authors have discussed challenges of interoperability, integration, overhead, and bandwidth limitation of WSN (Wireless Sensor Network). In [9], the authors have presented a thorough evaluation of application of M2M communications and discuss their open research issues. The authors of [10] offer a service-oriented system to enable delivery of energy management services by other providers who are interested to develop innovative applications. They also offer an algorithm that makes use of aggregated user information to yield more efficient energy saving strategy. The system in [11] offers a generic energy consumption model with the support for per user and per appliance energy consumption measurement. Sensor-Actuator Gateway Agent (SAGA) [12] is another system offering easy configuration and grouping of devices using a web interface. It has been deployed in three homes in the Pittsburg area; and it has been collecting date for several years. From the above discussions, there are numerous HEM architectures developed in the past, and many new architectures are on the way. However, very few have dealt with the challenge of making these systems interoperable. If all available systems use as many different information models, or utilize different types of communication protocols,
Two popular web services technologies are SOAP (Simple Object Access Protocol) and REST (Representational State Transfer). SOAP procedures are invoked by sending requests with necessary parameters. In REST, everything is perceived as a resource. An application is said to be RESTful, if it adheres to the REST philosophy. Both REST and SOAP messages are exchanged as XML payload over HTTP (Hyper Text Transfer Protocol). HTTP runs on top of Transmission Control Protocol (TCP) and T CP runs on IP. D. Review of Communication Technologies for HEM Three prominent wireless communication technologies that may be applicable for HEM implementation are ZigBee, Wi-Fi and Bluetooth. The IEEE 802.15.4—simply referred to as ZigBee—is a low power, short range and reliable protocol with strong security features, which is suitable for home environment. ZigBee has a range of up to 100 m and can operate at a maximum data rate of 250 kbps. ZigBee Pro can have ranges of up to 1,600 m. Wi-Fi with IEEE 802.11x has a data transfer rate up to 54 Mbps, and the new 802.11n can achieve a rate of 600 Mbps, and the range can be up to 100 m. It has the advantage of being compatible with IP. However; it needs much higher power than 802.15.4 due to its high data rate. It also needs high processing capabilities; therefore, it is infeasible for implementation in low-end embedded chips. Another prominent short ranged wireless communication technology is Bluetooth. Bluetooth offers data rate of up to 721 kbps, with the coverage distance of up to 100 m. Network formation and pairing take approximately three seconds whereas the IEEE 802.15.4 needs only 30 milliseconds. Bluetooth protocol stack size is also much bigger than that of IEEE 802.15.4. ZigBee/IEEE 802.15.4 has better power efficiency in the HEM environment. Considering these factors, ZigBee is a more suitable communication technology than Bluetooth and WiFi for the implementation of the web-based architecture presented in this paper.
3
IV. THE PROPOSED ARCHITECTURE This section discusses the proposed web-based architecture for an HEM, as well as information model standards, protocols and security measures implemented for the proposed webbased architecture. A. The Proposed Web-based Architecture for HEM Systems A high-level depiction of the overall system architecture is illustrated in Fig. 2, where the portion with green background corresponds to the designed system.
Fig. 2. High-level architecture of the proposed system.
Components of the proposed system are arranged in three tiers: (1) ZAL (ZigBee Abstraction Layer), as shown at the top of the portion in Fig. 2; (2) DB (Database Layer); and (3) HEMWS (HEM and web services). ZAL is responsible for interacting with the ZigBee-enabled devices. This tier has three modules: Attribute Report Listener (ARL), Device and Service Discovery Module (DSDM), and ZigBee Command Dispatcher (ZCD). The ARL periodically receives values of various attributes which are sent by ZigBee-enabled devices. ON/OFF and CurrentLevel are two example attributes reported by most ZigBee devices. The value of the ON/OFF attribute indicates if the device is switched ON or switched OFF. The value of CurrentLevel attribute indicates the magnitude of current drawn by a device. All attributes information received by the ARL is stored in the database DB1, which belongs to the DB (database) tier. The DB tier has three databases named DB1, DB2, and DB3. The DSDM is responsible for discovering devices and the services on those devices. It stores discovery information in database DB2. It also processes the endpoint service descriptions, and maps these devices and services with the household appliances. Appliances identified are stored in HEM Information Model (HEM IM) format in the DB3 database. The ARL uses this information to store measurement sample for a particular appliance.
The ZCD module sends HEM commands issued by the modules in the HEMWS (HEM and web services) tier to the ZigBee devices. HEM commands correspond to the ZigBee commands and similarly named. Some example commands are: ON, OFF, Toggle, Move to level, Step, Stop, etc. The ZCD handles details of forming the command frame. The HEMWS tier – the bottom tier in the green background in Fig. 2 – contains the following four modules: • The PAP10 web services (WS) Interface offers web services for the EUI in the PAP10 format. • The HEM information model (IM) WS Interface offers web services monitor and manage appliances. • The DR Algorithm Routine can be invoked during a DR request from the utility. • The HEM website component is responsible for displaying the user interface and responding to the user actions. All information necessary for the operation of the modules in the bottom tier is obtained from DB3. When HEM IM WS or HEM Website need to perform any action on an appliance, they invoke the ZCD module in the top tier, which then forms a ZigBee command frame and sends to the correct device. In this simple information model the major object or resource is appliance, which represents any individual device that consumes electric energy. The system contains the database, DB3, in which the measurement samples of current level are stored by the Attribute Record Listener module. Third party systems developers—who may provide innovative applications involving EUI—can obtain data from the PAP10 WS Interface. Data in the PAP10 information model is generated on the fly from the HEM IM data stored in DB3. For example, PAP10 IM contains IntervalReading and MeterReading data, which can be computed from the Measurement Sample data stored in DB3. There can be other applications which will need the HEM IM data. These are represented by IPHA (IP Host Application) in Fig. 2. The proposed system offers IPHA development that uses information in a more intuitive HEM IM format, instead of the analogous IPHAs relying solely on ZigBee Gateway Device—which offers generic lower level interface. In Fig. 2, red arrows represent flow of information, which does not cause any change to the state or attribute of a device. On the other hand, black arrows represent commands or invocation of web services methods that change state or attribute of a device. Lastly, the AUTH tier provides Authentication and authorization services. B. Protocols for the Proposed Web-based Architecture We begin by briefly discussing the ZigBee Stack starting from the lowest level. Each ZigBee node has a single IEEE 802.15.4, which is used by ZigBee Network Layer Management Entity (NLME). Application Support Sub-layer (APS) depends on NLME for network services. The ZigBee Device Object (ZDO) resides on top of APS. A node can host many applications on a single physical device, each of which can be addressed by Endpoint. On top of the ZigBee stack, a ZigBee Abstraction Layer (ZAL) as depicted in in Fig. 2 has been designed, which takes care of all complexities of interacting with ZigBee devices.
4
We choose ZigBee as our preferred technology in this design, because of the comprehensive nature of ZigBee standards and specifications. ZigBee Alliance consists with many other leading organizations and standards bodies to keep its standards, and products compatible. As discussed in Section III, ZigBee has a number of benefits over Bluetooth and WiFi in the context of Home Area Networking. Above the ZAL, the web services layer is designed. The external interface connected to the public Internet have been designed to offer a REST interface, where information is encoded as XML text and transported over HTTP communication protocol. This is intuitive and easy for the developers who build innovative Home Automation applications. The reason to choose XML over HTTP is that it is one of the most prevalent protocols. Almost every device— not in the network core—has implementation of the TCP, on which HTTP depends. HTTP client side implementation is available in web browsers, who also have XML processing capabilities. In fact, XHTML (the presentation markup language for web pages) is an XML language. This ubiquity of XML and HTTP is the motivation behind selecting REST based web services over HTTP. It also has strong security features. Our system adheres to the XML schema—syntactically and semantically—used by Green Button [14]. The XML format is very straightforward and obvious from the NAESB PAP10 class diagram in [15]. The machine interface managing NAESB PAP10 information system also offers REST, and the message formats are according the XML schema defined by on the NAESB server [16].
can still be used, such as Firewall, IDS (Intrusion Detection System), or even IPSec. The designed system also provides support for the encryption of wireless transmissions. By default the system does not operate in this mode. If the security requirement is higher and there is risk of eavesdropping in the ZigBee wireless network, it is recommended to activate network key based encryption of messages. In a residential implementation, a network key is transported from the Trust Center using unsecured communication. Therefore, confidentiality of the ZigBee wireless network cannot be guaranteed; but this makes it impractical for an eavesdropper to compromise the confidentiality. The encryption standard used is 128 bit AES (Advanced Encryption Standard), which was established by NIST in 2001. V. USER INTERFACE (UI) DESIGN The web-based interface designed in this work offers an easy and convenient user interface (UI) for a homeowner to interact with the HEM system. Fig. 3 illustrates our user interface (UI) design.
C. Security Measures Implemented for the Proposed Webbased Architecture The first-level defense of our designed system is the AUTH (Authentication and Authorization) tier. All requests and responses sent over HTTP pass through this layer. All systems or users using web services or websites must have a valid username and password. The passwords are used to compute a salted one-way hash function (inverse computation is infeasible) using Secure Hash Algorithm (SHA-1), and this hash function outputs are stored with in the AUTH tier. This is carried out to make it difficult to compromise the plaintext password. SHA-1 was designed by NSA (National Security Agency); and NIST (National Institute of Standards and Technology) has published it as a U.S. Federal Information Processing Standard. Permission-based access to web services has been used to implement authorization. Permissions can be assigned to groups or individual clients. Although there are not as many clients as compared to typical websites, these features are provided in our design, so that in case of an unauthorized access, it is still difficult for the intruder to perform critical operations. The communication is secured using TLS (Transport Layer Security). TLS offers end-to-end encryption of all packets. Therefore, even if packets are sniffed by some eavesdroppers in intermediate nodes of the network, the confidentiality is not compromised. If more security is needed, traditional approaches of securing an Internet gateway server
Fig. 3. The user interface (UI) of the system.
With the proposed user interface (UI), a homeowner can specify their comfort level and load priority preferences. A homeowner can rank appliances by their priority. For example, as shown in Fig. 3, HVAC is of the highest priority. This is followed by an electric water heater, a clothes dryer and an electric vehicle (EV). A homeowner can also set their preferences. Examples of preference settings include room temperature set point, hot water temperature set point, preferred clothes dryer operating period and preferred EV charging period. In addition, with the proposed UI, a homeowner can switch ON/OFF or set schedule of selected appliances from any computer or a smart phone with an Internet access. The proposed UI also offers a homeowner several visualization features. A homeowner can have access to realtime and historical appliance usage information with graphs.
5
There are several options for plot view visualization, including 1-second plot view for up to 1 minute in duration; 1-minute plot view for up to 1 hour in duration; 10-minute plot view for up to 4 days in duration; and 1-month plot view for up to 12 months in duration. Fig. 4 and Fig. 5 illustrate examples of the visualization screens of real-time instantaneous power demand, and the hourly energy consumption of four appliances measured in a laboratory environment, respectively.
interface stores the information within the HEM system’s databases within the house, which allows the user to be more in control of what devices to be shown. To this end, it is expected that the proposed architecture will benefit application developers and designers who can use the proposed architecture as a reference model for custom hardware designs and implementation. It will ensure a lightweight, reliable and real time service for an HEM system. VII. REFERENCES [1]
Fig. 4. Visualization screen showing the instantaneous power consumption of four appliances measured in a laboratory environment.
Fig. 5. Visualization screen showing the hourly energy consumption of four appliances measured in a laboratory environment.
VI. CONCLUSIONS This importance of innovation in designing HEM is paramount and many have proposed architectures addressing this need. However, so far this progress has happened in quite an ad-hoc manner, without considering application designers and developers. A web-based architecture to enable information retrieval and appliance management for an HEM system is proposed in this paper. The proposed architecture aims to ensure ensures interoperability among smart grid equipment, thus it is designed on NAESB framework and heavily utilizes ZigBee standard. Additionally, the proposed web-based
Network Device: Gateway Specification [Online]. Available: http://www.zigbee.org/Standards/ZigBeeNetworkDevices/download.asp x. Retrieved: July, 2013. [2] Q53 Gateway [Online]. Available: http://www.exegin.com/hardware/q53app.php. Retrieved: July, 2013 [3] ZigBee Network Device Certified Products [Online]. Available: http://www.zigbee.org/Products/ByStandard/ZigBeeNetworkDevices.asp x. Retrieved: July, 2013. [4] Filtrete 3M-50 WiFi Thermostat Product [Online]. Available: http://www.radiothermostat.com/filtrete/products/3M-50/. Retrieved: July, 2013. [5] Smart Grid Standards Subcommittee on Priority Action Plan 10 [Online]. Available: http://www.naesb.org/smart_grid_pap10.asp. Retrieved: July, 2013. [6] A. Rossello-Busquet, J. Soler, L. Dittmann, “A Novel Home Energy Management System Architecture,” Computer Modelling and Simulation (UKSim), 2011 UkSim 13th, International Conference on, UK, pp. 387 – 392, 2011. [7] A. Hashizume, H. Mineno, T. Mizuno, “Energy Monitoring System Using Sensor Networks in Residential Houses,” Advanced Information Networking and Applications Workshops (WAINA), 2012 26th International Conference on, Japan, pp. 595-600, 2012. [8] RESTful Architecture of Wireless Sensor Network for Building Management System [Online]. Available: http://www.freepatentsonline.com/article/KSII-Transactions-InternetInformation-Systems/288688949.html. Retrieved: September 2012. [9] D. Niyato, L. Xiao, P. Wang, "Machine-to-machine communications for home energy management system in smart grid," IEEE Communications Magazine, vol. 49, no. 4, pp. 53 - 59, 2011. [10] C. Wang, M. de Groot, P. Marendy, "A Service-Oriented System for Optimizing Residential Energy Use, submitted to the IEEE Trans on Smart Grid," Web Services, IEEE International Conference on, Florida, pp. 735 - 742, 2009. [11] V. Jain, G.P. Parr, D.W. Bustard, P.J. Morrow, "Deriving a generic energy consumption model for network enabled devices," Communications (NCC), 2010 National Conference on, India, pp. 1-5, 2010. 12] M. Buevich, A. Rowe, R. Rajkumar, "SAGA: Tracking and Visualization of Building Energy," Embedded and Real-Time Computing Systems and Applications (RTCSA), 2011 IEEE 17th International Conference on, Japan, pp. 31 - 36, 2011. [13] UCAlug and Green Button Conference [Online]. Available: http://www.pointview.com/data/2012/05/55/pdf/Erich-GuntherAUFDTQXV-16365.pdf. Retrieved: July, 2013. [14] Green Button [Online]. Available: http://www.greenbuttondata.org/. Retrieved: July, 2013. [15] NAESB Energy Usage Information Model [Online]. Available: http://www.naesb.org/pdf4/naesb_energy_usage_information_model.pdf. Retrieved: July, 2013. [16] NAESB XML Schema [Online]. Available: http:// naesb.org/copyright%5Cespi.xsd/ Retrieved: July, 2013.