Building Automation Networks for Smart Grids

Smart grid, as an intelligent power generation, distribution, and control system, needs various communication systems to meet its requirements. The ability to communicate seamlessly across multiple networks and domains is an open issue which is yet to be adequately addressed in smart grid architectures. In this paper, we present a framework for end-to-end interoperability in home and building area networks within smart grids. 6LoWPAN and the compact application protocol are utilized to facilitate the use of IPv6 and Zigbee application profiles such as Zigbee smart energy for network and application layer interoperability, respectively. A differential service medium access control scheme enables end-to-end connectivity between 802.15.4 and IP networks while providing quality of service guarantees for Zigbee traffic over Wi-Fi. We also address several issues including interference mitigation, load scheduling, and security and propose solutions to them.


Introduction
The smart grid is an intelligent power generation, distribution, and control system.It enhances today's power grid with intelligence, bidirectional communication capabilities and energy flows [1].These enhancements address the efficiency, stability, and flexibility issues that plague the grid at present.In order to achieve its promised potential, the smart grid must facilitate services including the wide-scale integration of renewable energy sources, provision of real-time pricing information to consumers, demand response programs involving residential and commercial customers, and rapid outage detection.All these tasks demand the collection and analysis of real-time data.This data is then used to control electrical loads and perform demand response.
In order to obtain the full benefit of smart grids, their communication infrastructure must support device control and data exchanges between various domains which comprise the smart grid.The smart grid must be allied with smart consumption in order to achieve optimum power system efficiency.This necessitates the integration of smart buildings, appliances, and consumers in order to reduce energy consumption while satisfying occupant comfort.Building automation systems (BASs) already provide this intelligence, enabling computerized measurement, control and management of heating, ventilation, air-conditioning (HVAC), lighting, and security systems to enhance energy efficiency, reduce costs, and improve user comfort.Buildings consume 29% of all electricity generated in the United States [2]; therefore, the ability of BASs to communicate and coordinate with the power grid will have a tremendous effect on grid performance.Home area networks (HANs) provide similar capabilities for residential buildings.They facilitate the interconnection of smart appliances with smart meters to automatically regulate residential electricity usage and respond to pricing signals from the utility [3].
Zigbee is a low cost, low power, low data rate and short-range communication technology based on the IEEE 802.15.4 standard.United States National Institute for Standards and Technology (NIST) has defined Zigbee and the Zigbee smart energy profile (SEP) as the one of the communication standards for use in the customer premise network domain of the smart grid [4].However, due to Zigbee's limited transmission range, it must be a combined with longer-range communication technologies such as IEEE802.11 in order to provide end-to-end connectivity across the smart grid.
In this paper, we discuss the different issues relevant to communication infrastructures for building automation system in smart grid.We begin with an introduction of whole system architecture of a smart grid system based on a perfect power system [5] including premises networks, field area International Journal of Digital Multimedia Broadcasting networks, and a power system controller.We designed and implemented a Zigbee-based building energy management testbed system.Our system integrates a Zigbee-enhanced building automation system with the smart grid to harness energy management schemes such as demand response, realtime power pricing, peak load management, and distributed generation.We also propose a quality of service (QoS) aware 802.15.4/802.11interoperability framework for home area network and building area network (BAN) which prioritizes wireless sensor network (WSN) traffic over Wi-Fi networks.In our scheme, WSN packets are classified according to their QoS requirements.They are then aggregated and tunneled over the Wi-Fi to the BASs server.We also proposed a frequency agility-based interference mitigation scheme to avoid interference from neighboring Wi-Fi networks.Distributed load scheduling based on optimal stopping rules [6] was proposed in the paper which can reduce the peak load and adjust utility operation time based on electricity pricing and waiting time.We also discuss open issues including security and data compression.
The rest of paper is organized as follows.Section 2 describes a smart grid system architecture.In Section 3, the Zigbee-based building energy management system was introduced.Our proposed QoS-aware 802.15.4/802.11interoperability framework is presented in Section 4. Frequencyagility-based interference mitigation algorithm is proposed in Section 5. Section 6 presents our proposed optimal stopping rule-based distributed load scheduling scheme.Several open issues including smart grid security and data compression discussed in Section 7. Finally, the paper is concluded in Section 8.

System Architecture
The smart grid is the convergence of information technology, communications, and power system engineering to provide a more robust and efficient electrical power system [7].Smart grids consist of sensing, communication, control, and actuation systems which enable pervasive monitoring and control of the power grid [8].These features enable utilities to accurately predict, monitor and control the electricity flows throughout the grid.They also transform the power grid into a bidirectional power system in which customers can supply as well as receive power from the grid, converting the grid into a distributed power generation system [9].
The smart grid utilizes the hierarchical structure detailed in [8] and displayed in Figure 1.The foundation of this structure is the power system infrastructure consisting of power conversion, transportation, consumption, and actuation devices.They include power plants, transmission lines, transformers, smart meters, capacitor banks, reclosers, and various devices.Smart meters enable bidirectional power flows between utilities and consumers, enabling consumers to produce and supply energy to the grid, thereby becoming "prosumers".This development promises significant improvements in power system reliability, as alternative power sources can supply the grid during utility power outages.It also increases system efficiency, as line losses due to long-distance transmission are eliminated.These smart grid capabilities will foster greater incorporation of renewable energy sources such as wind and solar power into the grid, thereby reducing the dependence on fossil-fuel power generation and reducing greenhouse gas emissions.
The second layer of the smart grid architecture is the sensors.Power system reliability is significantly improved via embedded sensors distributed throughout nodes within the power system.These sensors enable real-time fault detection and isolation via bidirectional digital communication links.They also provide granular system health data that can be used for rapid system analysis, fault preemption, and trending.Smart meters also provide users and utilities with real-time power consumption data and enable the remote monitoring and control of building loads and home appliances.Consumers can also receive real-time pricing information to facilitate informed decision making.
The communications infrastructure is the glue that binds all these various layers together and consists of wide, local building and home area networks.They consist of broadband technologies such as 802.16WiMAX, 802.11Wi-Fi, optical fiber, 802.15.4/Zigbee, and power line carrier schemes.Zigbee has found great application in smart metering, home, and building automation control due to its low-cost, flexibility, wide-spread support, and intervendor interoperability.
At the top of the system is the decision intelligence block which encompasses substation automation, faultmanagement, load distribution, and other control strategies deployed to guarantee power system stability and balance power demand and supply.
The smart grid concept has been extended to smaller smart grid networks known as smart microgrids.A smart microgrid is a localized smart grid covering specific geographical regions, such as suburban neighborhoods or university campuses, and incorporating local or onsite power generation.
Building automation systems provide centralized and automated management of major or critical loads within building.Building automation aims to reduce energy costs, improve energy efficiency and facilitate off-site building management [10][11][12].The primary requirements for building automation applications are low cost, ease of installation, and flexibility/reconfigurability.Zigbee devices are ideal for smart grid and building automation applications, because they are wireless, low cost, and robust.Wireless nodes also provide flexibility, easy redeployment, and reconfiguration.The integration of Zigbee radios with light switches, occupancy sensors, temperature sensors, and smoke detectors enables measurement and control of all the building loads.The low power consumption of Zigbee is achieved by very low system duty cycles, with typical Zigbee nodes having duty cycles of less than 5%.The result is significant energy savings and greater comfort for building occupants [13,14].Details of Zigbee's radio frequency characteristics, frequency bands, and modulation schemes are provided in Table 1.

Home Automation System.
We developed a Zigbee-based home automation system [15] in order to demonstrate the utility of Zigbee-based home automation networks.Two-way communication was used to transmit readings from Zigbee end nodes to a data collection and control center (DCCC) and to pass control messages from the DCCC to the end nodes.Each end node is able to relay the collected data to the DCCC via distributed Zigbee routing nodes.The test bed architecture is shown in Figure 2. The Zigbee coordinator aggregates received data for display and processing and transmits control signals to the end nodes according to the selected power management strategy.

The Data Collection and Control Center (DCCC).
The DCCC serves as the system controller, receiving input from the various sensors along with real-time power pricing.It also manages the loads for energy efficiency, demand response, and cost savings.A screenshot of the DCCC's user interface is shown in Figure 3.The DCCC is developed in MATLAB and utilizes a GUI front end to communicate directly with the Zigbee network coordinator and remote actuator modules.The DCCC provides the following functions: (i) the display of received sensor data (temperature, light levels, room occupancy, etc.), (ii) remote control of Zigbee modules, (iii) user configuration of timing, pricing, and sensor data threshold values, (iv) control of externally connected loads on the basis of user-determined price thresholds, time of day, and sensor readings, (v) lighting control based on room occupancy and other variables.
3.2.2.Hardware System.Our hardware system consists of several meshbean Zigbee motes which we programmed to support the following functions: (i) demand response, (ii) lighting control, (iii) ambient temperature sensing and control.
As shown in Figure 4, these modules combine an ATMEL 1281 V low-power microcontroller with 8 K of RAM and 128 kB of flash memory, an ATMEL RF230 Zigbee radio, onboard light and temperature sensors in a single batterypowered module with a USB interface.More details of our scheme can be found in [15].

Interoperability of Zigbee and Wi-Fi
Building and home area networks are only one of a variety of networks that make up the smart grid.Due to the multiplicity of networks and protocols within the smart grid, interoperability is a key issue.The availability of an interoperability framework is essential to end-to-end communication across and within smart grid domains, so a significant amount of work is being invested in interoperability frameworks for the smart grid.
The usage of IP within wireless sensor networks facilitates easy interconnectivity with existing networks, enables the reuse of existing TCP/IP protocols, tools, and programming paradigms, and permits the usage of IP friendly protocols such as BACnet and Modbus over WSN nodes.These goals sparked research into the use of IPv6 over WSNs, as the ability to connect even tiny wireless sensor nodes to the internet would facilitate ubiquitous computing in the home and throughout the smart grid.
Interconnection between WSNs and TCP/IP networks has primarily been by means of gateways [16], as it had been assumed that TCP/IP was too memory and bandwidth intensive for usage in resource constrained wireless sensor networks [17].However, the development of uIP, the first lightweight IP stack for WSNs [18] demonstrated the viability of IP for wireless sensor networks and led to a flurry of work into on the use of IP for WSNs.The 6LoWPAN IETF standard defines a framework for deployment of IPv6 over IEEE 802.15.4 networks [19] by means of header compression and routing and forwarding at layers 3 and 2, respectively.This work is extended in [20] to address issues such as link duty cycling, network bootstrapping and node discovery to create a complete IPv6 architecture for WSNs.
The primary interconnection schemes proposed for connecting Zigbee WSNs to the Internet are proxy-based   gateways [16,21,22] and sensor stack schemes [20,23].The issue of the inability of Zigbee to natively support IP is addressed by the compact architecture protocol (CAP) [24] in which the authors create a framework to enable the usage of Zigbee application layer protocols over any IP-capable network.We extend their work by creating a framework for interworking between Zigbee and Wi-Fi networks in HANs and BANs while providing QoS guarantees.The proposed interoperability network architecture is shown in Figure 5. Taking into consideration BASs application requirements, reliability and short delay are two most important factor related to the performance.In [25], the authors present an architecture for a medical information system which integrates WLAN and WSNs.In [26,27], several QoSenabling mechanisms present in the IEEE 802.11e provide us some ideas to design the frame work of the integration system.A two-tiered WSN and WLAN scheme with QoS guarantees is provided in [28], but the authors do not address IP-based interoperability.

4.1.
Interworking.Interoperability is "The capability of two or more networks, systems, devices, applications, or components to exchange and readily use information-securely, effectively, and with little or no inconvenience to the user" [29].The grid-wise architecture council (GWAC) [30] has defined an 8-layer interoperability framework encompassing all the facets of interoperability.Our primary focus is the 4 lowest layers of this framework (Figure 6), and we utilize it to develop an interoperability framework for HANs and BANs.
The internet engineering task force (IETF) 6LoWPAN working group defined the IPv6 over low-power wireless personal area networks (6LoWPAN) protocol to facilitate the use of IPv6 over low power and low data rate WSNs [31].It was initially designed for usage over the 802.15.4 physical (PHY) and medium access layer (MAC) layers but can be extended for use over other PHY and MAC architectures (Figure 6).
In order to use IPv6 over 802.15.4 networks, an adaptation layer between the 802.15.4 data link and network layers [17] was developed to provide the following functions: (i) stateless compression of IPv6 headers by means of HC1 compression [19] to reduce their size from 40 bytes to approximately 4 bytes, thereby reducing transmission overhead, (ii) fragmentation and reassembly scheme to support the transmission of IPv6 packets over 802.15.4 frames.This is required as the minimum MTU of IPv6 packets is 1280 bytes, while the maximum size of a 802.15.4 frame is 127 bytes.
The benefits of 6LoWPAN over competing WSN implementations are its ease of connectivity with IP networks and its large addressing space (2 128 compared with 2 16 for Zigbee).In addition, the concept of device roles found in Zigbee is not applicable, with each device serving as a router for its neighbor's traffic.Unlike Zigbee, 6LoWPAN permits duty cycling of routers, thereby extending device lifetime.The primary drawback of 6LoWPAN is its incompatibility with Zigbee, Zigbee's significant industry support, and very strong device interoperability guarantees across multiple vendors.A combination of the flexibility of IP networking and 6LoWPAN's power saving schemes with Zigbee's application profiles would marry the best features of both implementations to provide an industry standard, interoperable framework for HANs and BANs [32].
The compact application protocol (CAP) details a mapping of the Zigbee application layer to UDP/IP primitives [32,33], permitting the usage of Zigbee application profiles over any IP capable network [24].This removes the Zigbee application layer (ZAL) dependency on the Zigbee network layer and the 802.15.4 PHY and MAC layers.As shown in Figure 7, it preserves the excellent application layer interoperability features of public Zigbee application profiles while enabling end to end interoperability across the HAN/BAN using Wi-Fi, 802.15.4,and Ethernet.Rather than transmitting APS frames to the Zigbee network (NWK) layer for transmission to other nodes across the network using Zigbee addresses, the APS frames are now carried over UDP frames, necessitating modification to the addressing scheme to support communication with IP hosts using IP addresses and port numbers.
CAP is composed of four modules which correspond to the Zigbee application support sublayer (APS), Zigbee device objects (ZDO), Zigbee cluster library (ZCL), and APS security modules.The lowest layer of CAP is the Core module, which corresponds to the Zigbee APS layer.It frames data packets for transmission across the network, but now APS layer frames will be sent in UDP datagrams rather than in Zigbee NWK layer frames.In order to achieve this, Zigbee application profiles are rewritten to replace each Zigbee short (16-bit) and long (64-bit) address entry with a CAP address record.This consists of an IP address and UDP port pair, or a fully qualified domain name and UDP port number.
The data protocol is used to exchange data items and commands between communicating peer nodes.It encapsulates the ZCL and allows it to be used without modification, providing full ZCL support.The management protocol encapsulates Zigbee device profile (ZDP) command messages which are handled by the ZDO module, and provides service and device discovery and binding functionality.The final module is the security module which provides the same services as the APS security layer and is used to encrypt APS frames for secure transmission.

Gateway
Router.Zigbee networks are primarily used for periodic data collection of low-bandwidth sensor and alarm data, while Wi-Fi networks support a variety of services with varying quality of service requirements.Based on this, a differential service medium access control scheme [25] is required to guarantee timely and reliable delivery of Zigbee traffic over building Wi-Fi networks.Thus, we design an enhanced distributed channel access-(EDCA-) based QoS model to achieve this.Our framework facilitates the interconnection of the WSN to the BAN server via the in-building Wi-Fi system.This interconnection is achieved using a dual-stack gateway router (GR) node which performs QoS classification and packet aggregation on Zigbee application layer packets before tunneling them to the BAN server over Wi-Fi.As seen in Figure 6, we utilize the 802.11 and 802.15.4 MAC and physical layer protocols in conjunction with 6LoWPAN, the compact application protocol, and Zigbee application layer application profiles to provide end-to-end interoperability within HANs and BANs.Physical layer interoperability is provided by means of the GR's dual stack and 802.11 and 802.15.4 interfaces.Network layer interoperability is provided using IPv6 and the use of 6LoWPAN to enable the WSN to communicate using IP.Syntactic interoperability is achieved by the use of the CAP, which allows us to utilize publically defined Zigbee application profiles such as the smart energy or home automation profiles to provide application layer interoperability across multivendor devices.This frees us to use Zigbee application profiles across the HAN, on PCs, routers, and over any IP-capable device nodes all over the home or commercial building, rather than only over Zigbee 802.15.4 networks.In addition, the ability of our system to schedule 802.15  On the basis of these assumptions, we divide the queuing model into three parts.In the first part, traffic from WSN end nodes to the coordinator is considered; in the second part, packets from the Wi-Fi access point (AP) to the GR are discussed; finally, we will focus on the queuing model of packets sent from GR.In this scheduling scheme, the use of guaranteed time slots (GTSs) can combine the task of scheduling uplink and downlink flows of a naturally distributed carrier sense medium access with collision avoidance (CSMA/CA) environment into a central scheduler residing in the GR.As shown in Figure 8, each WSN node has two traffic queues, one for emergency or alarm traffic and the second for normal traffic [25].Class 0 (alarm packets) are higher priority emergency/control data, while Class 1 (normal packets) contains routine data.Nodes will typically transmit two message types.The first are GTSs requests to reserve slots in CFP, and the second types are data packets containing sensor data.
Data frames are assigned to their respective queue and contend for transmission over the channel.A node contends per information frame and can only send one packet each time.If the node has an emergency message in its queue, it will request a shorter back off exponent value to enable prompt transmission of emergency traffic.Nodes which do not have emergency traffic utilize the regular value of the back off exponent, resulting in longer wait times.
Traffic differentiation at the GR is performed on the basis of destination ports.As seen in Figure 9, we use different ports for normal and emergency traffic and map them to EDCA video (AC VI) and voice (AC VO) access categories, respectively, before transmitting over the Wi-Fi network.A dedicated BASs server is the final recipient of the entire off network WSN traffic, and this server filters traffic based on the ports the data is received on.Due to the significant size difference between 802.15.4 and Wi-Fi frames, traffic aggregation is required for delaytolerant traffic, while time sensitive WSN traffic is transmitted immediately.The encapsulation of individual 802.15.4 packets is very inefficient as the Wi-Fi header frame overhead is often larger than the useful information, necessitating packet aggregation to improve efficiency.
A hybrid scheduling model is used in the GR as shown in Figure 10.All packets received at the GR can be transmitted in either contention access period (CP) or contention-free period (CFP) modes.During the CP mode, nodes use a slotted CSMA/CA scheme to compete for the channel with other nodes.In CFP mode, up to seven GTS can be reserved and allocated by the coordinator.Devices which require the allocation of a new GTS transmit a GTS request command to the WSN coordinator and coordinator will International Journal of Digital Multimedia Broadcasting assign GTS to each device.Our hybrid scheduling model adopts both EDCA in CP and point coordination function (PCF) controlled channel access (PCCA) in the CFP to achieve fairness and provide service guarantees.The GR assigns packets to different MAC schemes based on message type.Emergency/control messages which need to be sent out immediately will use EDCA contention access with smaller back off exponent.On the other hand, PCCA is used for routine messages, as these can wait for aggregation to be performed and are subsequently transmitted in reserved times slots.
Routine messages sent from the 802.15.4 PAN to the Wi-Fi access point are initially sent to the scheduler, where they are enqueued and time-stamped while a countdown timer initialized.The queue size is set to maximum size of a Wi-Fi payload, and if the queue is filled with routine messages before timer expiry, the scheduler reserves a GTS, aggregates all the enqueued traffic, and transmits them over the Wi-Fi radio.If the queue is not filled by timer expiry, then the GR reserves the number of GTSs required to transmit the queue and sends the accumulated data.The primary benefits of message aggregation with PCCA are collision and delay reduction for routine traffic.

Interference Avoidance Scheme
Zigbee networks operate in the license-free industrial, scientific and medical (ISM) frequency band, making them subject to interference from various devices that also share this license-free frequency band.These devices range from IEEE 802.11 wireless local area networks or Wi-Fi networks and Bluetooth devices to baby monitors and microwave ovens.Studies have shown that Wi-Fi is the most significant interference source for Zigbee within the 2.4 GHz ISM band [36,37].Zigbee and Wi-Fi networks are used extensively for BAN in smart grid applications, leading to coexistence problems as seen in Figure 11.
Therefore, we have performed a large amount of experiments to identify the "safe distance" and "safe offset frequency" to guide the Zigbee deployment [38].The performance of Zigbee in the presence of IEEE 802.11 is defined and analyzed in terms of bit error rate (BER) and packet error rate (PER) by comprehensive approach including theoretical analysis, software simulation, and empirical measurement.Based on the concepts of "safe distance" and "safe offset frequency," we propose a frequency-agility-based interference mitigation algorithm [39].PER, link quality Indication (LQI), and energy detection mechanisms are used to detect the presence of significant levels of interference within the current channel.Once interference is detected, the coordinator instructs all the routers to perform an energy detection scan on channels and then send a report to the coordinator.The coordinator selects the channel with the lowest noise levels and then requests all nodes in the PAN to migrate to this channel.In order to improve the detection time and power efficiency, all Zigbee channels are divided into three classes based on the offset frequency.The energy detection scan will be performed from high-priority class to low-priority class channels to quickly identify the channel with acceptable interference level.The testbed implementation shows that the proposed frequency-agilitybased algorithm is simple but efficient, fast, and practical.

Opportunistic Load Scheduling
Demand response is the technology that manages customers' electricity usage to reduce electricity expenditure.Since customers are provided with the real-time power price by smart metering devices, load scheduling must incorporate real price in order to perform load control.The real-time price is an indicator of the system load.In general, the price is high when the load demand is high and vice versa.Some level of peak demand reduction may be automatically achieved by rational customers who aim to minimize the electricity cost.Naturally, the customers will choose to operate their flexible loads when the real-time price reaches the minimum.In this way, those flexible loads are shifted to the low demand time period, and consequently, the peak demand is reduced.
Nowadays, most existing load scheduling schemes are based on the assumption that future electricity prices are known or predictable.We propose to apply the optimal stopping rule [40] to perform distributed load scheduling.Our scheme to determines when to operate the flexible loads under the assumption that price signals are unknown and considered as random processes optimal stopping rule is proved to perform excellently in communication networks [41].Thus, we extend the application of optimal stopping rule to power grids [42].The time requirement of the load is taken into the consideration.If a user does not have time requirement, it will always choose to operate at the time when the electricity price is the lowest to minimize the electricity cost.However, many appliances, such as washing machine, are sensitive to the waiting time.Therefore, the spent time (which includes waiting time and service time) must be taken into consideration.The cost is modeled as the wait cost plus the electricity cost, and the objective is to minimize the total cost by choosing the best operating time.We show that the optimal scheduling scheme is a pure threshold policy; that is, each user needs to turn on the load when the electricity price is lower than a certain value; otherwise, the load remains idle.Simulation results show that the proposed low-complexity distributed scheduling scheme can dramatically reduce the cost.In other words, the loads are effectively shifted to low-demand time period.More details can be found in [6].

Open Issues and Future Work
7.1.Smart Grid Security.The smart grid requires detailed energy usage information in order to facilitate services such as real-time pricing and billing, customer energy management, and system load prediction.Unfortunately, as is the case with many other complex systems, the smart grid falls foul of the law of unintended consequences.The availability of such detailed usage data from every household every 5-15 minutes has created a massive security problem [43].Smart meter data analysis provides the ability to determine which appliances are in use at any given time period.This has led to the fear that users can be spied upon by their meters, negatively impacting smart meter deployment [44].
The networking of smart meters with the electricity grid also raises the specter of smart meter fraud and increases the vulnerability of these devices to malicious attacks such as denial of service (DoS) attacks.

Privacy Issues.
Research into nonintrusive appliance load monitoring technology (NALM) [45][46][47] has enabled the identification of appliances by means of their unique fingerprint or "appliance load profiles."By means of software analysis, it possible to determine which appliances are in use and at what frequency.It provides access to information including the types of appliances a resident possesses, when he/she has their shower each day (by monitoring extended usage of the heater), how many hours they spend using their PC, or whether they cook often or eat microwave meals.This has led to the very valid fear that customers can be profiled and monitored by means of their smart meter.In addition, improper access to such data can lead to violations of privacy or even make one open to burglary.

Smart Meter
Fraud.The desire for lower electricity bills provides a compelling incentive for smart meter fraud.
The ability to report inaccurate data to the utility means that customers can reduce their bills by falsely claiming to supply power the grid or consume less power than their actually do.The possibility of commercially available smart meter hacking kits is also a reality [48].

Malicious Attacks.
The internetworking of smart meters makes them especially vulnerable to denial of service attacks in which several meters are hijacked in order to flood the network with data in order to shut down portions of the power grid or report false information which can result in grid failures.
7.1.4.Smart Grid Security Solutions.Smart grid security issues can only be solved by a combination of regulatory and technological solutions.A regulatory framework is required to specify who has access to smart meter data and under which conditions as well as enforcement of penalties for data misuse [48].Two technological solutions have been proffered.The first is to aggregate residential data at the neighborhood transformer and then anonymize it by stripping it off its source address before transmitting it to the utility [43].Kalogridis et al. [42] propose the use of a third party escrow service which receives the detailed meter data, anonymizes it by stripping off any information that could be used to identify a specific household, then sends the utility the aggregate data required for billing and monthly energy usage for each customer.
We propose a digital rights management system-(DRMS-) based scheme which extends that proposed in [49].Users license permission to the utility to access their data at varying levels of granularity.By default, the utility would have access to monthly usage and billing data, but customers have to grant the utility permission to access their data at higher levels of granularity in exchange for rebates or other incentives.Such a system eliminates the need for an intermediary between the utility and the consumer but requires a means of guaranteeing that the utility cannot access restricted customer data.

Data Compression.
Mitigating data surges and traffic congestion due to catastrophic events is an open research area.When emergencies such as power blackouts occur, hundreds to thousands of smart meter flood the data collection center with traffic.Reliability is an important issue, since the data needs to be transmitted effectively and efficiently, and network coding is a promising approach to improving the reliability of the wireless networks under such conditions.By means of network coding, we could potentially introduce intraflow network coding into the data transmission in Zigbee networks; that is, routers mix packets heading to the same destination.As a result of this mixing, each received packet contains some information about all packets in the original file, and thus, no coded packet is special.
Conventionally, without coding, a transmitter needs to know which exact packets the destination misses so that it can retransmit them.When the network is unreliable, communicating this feedback reliably consumes significant bandwidth.In the presence of coding, no specific packet is indispensable, and as a result, a transmitter does not need to learn which particular packet the destination misses; it only needs to get feedback from the destination once it has received enough packets to decode the whole file.The reader may have noticed that the above applies to erasure-correcting coding applied at the source too.Indeed, source coding is just a special case of intraflow network coding, where the source is the only node allowed to mix the packets in the flow.

Conclusion
In order for the smart grid to achieve its potential, we need the resolve the problem of interoperability between the different communications technologies deployed in the grid.In this paper, we proposed an HAN architecture for energy management within smart grid environments.Zigbee-based building energy management was demonstrated to enhance building automation systems and permit granular control of electrical and HVAC systems in a smart grid context.An open architecture of an interoperability frame work for HANs and BANs was presented in the paper.Physical layer interoperability is provided by means of a router platform with 802.11 and 802.15.4 interfaces.Network layer interoperability is provided using IPv6 and the usage of 6LoWPAN to enable the WSN to communicate using IP.Syntactic interoperability is achieved by the use of the CAP.In the QoS framework, emergency/control message need to compete with routine traffic from other nodes.The prioritized contention algorithm ensured the high priority access the channel for these messages.Use of compression and scheduling increases the efficiency of the data transferred from Zigbee to Wi-Fi frames.A frequency-agility-based interference mitigation algorithm was introduced in the paper to guarantee the performance of Zigbee and Wi-Fi coexistence.Optimal stopping rule base load scheduling scheme as a distributed load control was present in the paper.More open issues including security and data compression were discussed in the paper.

Figure 8 :Figure 9 :
Figure 8: Queuing model from WSN end nodes to WSN coordinator.
.4 and 802.11MAC frames enables us to provide quality of service prioritization to emergency Zigbee traffic.