You are on page 1of 5

A Cloud-Based System Architecture for Advanced

Metering in Smart Cities


Felipe Marques Pires Lorena León Quiñonez Leonardo de Souza Mendes
School of Electrical and School of Electrical and School of Electrical and
Computer Engineering Computer Engineering Computer Engineering
State University of Campinas State University of Campinas State University of Campinas
Campinas, Brazil Campinas, Brazil Campinas, Brazil
felipe.mpires@ifsp.edu.br loreleon@decom.fee.unicamp.br lmendes@decom.fee.unicamp.br

Abstract—Advanced meter infrastructures are changing the single reading during the month is enough to utilities, but
way smart metering is made, especially making use of compu- for deep analyses the higher the frequency of readings the
tational tools such as machine learning techniques to improve better the quality of information extracted [4]. In this context,
data processing and analyses. In this work, we present a cloud-
based system architecture for advanced electric metering in the AMI systems need computation tools to improve the
smart cities, whose purpose is to achieve better management analyses. Big data platforms and techniques are suitable for
of electric energy use by consumers and an efficient balance data management and processing in these type of applications
between demand and consumption by utilities. In our approach, [5]. The large volume of data and the capacity of using
in addition to energy consumption data (kilowatt-hour), other stream processing techniques in conjunction with analytical
electrical parameters (e.g., current, power factor, active and
reactive power) are collected in real-time from smart meters for tools can help the utilities improve the understanding about
storage and deeper analyses in a big data ecosystem. Moreover, consumption, demand, and consumer behavior keeping track
we introduce the smart gateway (sGateway), a component of the of downtime and outages [6].
system architecture to provide local processing and to simplify the In this work, we propose a cloud-based system architecture
communication between smart meters and the cloud processing for advanced electric metering in smart cities, which can
system.
benefit both the utilities and the consumers. In our approach,
Index Terms—Advanced metering system, Big data, IoT, Smart
we collect nine different electrical parameters (e.g., current,
city, Smart energy, Smart meter.
power factor, active and reactive power) from the smart meter
for deeper analysis in a big data ecosystem. Moreover, we
I. I NTRODUCTION
introduce the smart gateway (sGateway), a component of the
Globally, more than half (55%) of the world's current system architecture to provide local processing and to simplify
population resides in urban areas compared with just 30% the communication between smart meters with heterogeneous
in 1950. By 2050 is expected that 68% of all people will network interfaces and the cloud processing system.
be urban dwellers [1]. As the world continues the process of In the remainder of this paper, we detail our approach
urbanization, sustainable development depends on the success- to advanced metering system architecture. In Section II, we
ful management of urban growth. Otherwise, it may lead to present the global scenario overview and related work in
exurban expansion, power outages, scattered workplaces, and AMIs. Section III explains the proposed system architecture
aging infrastructure. These issues may cause inefficiencies in and its components. Section IV describes how we performed
different areas, especially in electric energy use. The public the experimental validation and preliminary results. Finally, in
and private sectors are investing new smart city technologies Section V, we present the conclusions and future works.
to integrate intelligent measuring devices in order to achieve
II. G LOBAL SCENARIO OVERVIEW AND RELATED WORK
better management of electric energy use and an efficient
balance between demand and consumption [2]. Information A. The global scenario
and Communication Technologies (ICTs) and smart meters On the global stage, several countries have developed smart
are technological elements that enable the development of metering network programs in the last few years. In the
Advanced Meter Infrastructures (AMIs) which are changing United States, the Smart Grid Investment Grant Program
the way smart metering is made. AMI provides communication under the American Recovery and Reinvestment Act of 2009
between utilities central system and the smart meters installed provided $4.5 billion to modernize the electric power grid
on the consumer side for real-time data collection [3]. implementing AMIs. In 2016 the American electric utilities
AMI systems are mainly concerned with the collection of had about 70 million AMIs installations, and about 88% were
energy consumption data, which is the kilowatt-hour (kWh), residential customers [7]. In Europe, 200 million smart meters
due to the importance of this data to extract useful infor- for electricity are expected to be deployed by 2020, reaching
mation and also because of electricity tariffs cost per kWh 72% of European consumers [7]. Among Asian countries,
to customers. As the charge for energy use is monthly, a China is a promising country for smart meter deployment and

978-1-7281-2530-5/19/$31.00 ©2019 IEEE


1087
AMIs. According to the studies by 2020, there will be 377 data collection by removing irrelevant and inconsistent param-
million smart meters installed in China [8]. In the Brazilian eters, and efficient data analyses. To address the challenges of
scenario, there is not a mandate for electric utilities to install improving data extraction, management, and analyses in a vast
smart meters. In April 2010, the Brazilian Ministry of Mines volume of energy consumption data, we propose a cloud-based
and Energy has signed a decree to establish a workgroup system architecture for advanced energy metering. A layered
responsible for studying and planning the deployment of architecture enables us to describe the components according
monitoring systems and smart meters [9]. The investment to their purposes. Our proposed architecture uses four layers
is mainly restricted to pilot projects undertaken by power (Fig. 1). In layer 1, the smart meters allow data collection
distribution companies. Besides, implementation of time of and measurements. The sGateway for local processing and
use tariff model and distributed generation are also driving communication constitutes layer 2. Layer 3 includes machine
market growth [10]. learning techniques, analytical tools, and storage in a big data
cloud platform to convert data into knowledge. The application
B. Advanced metering infrastructures
and visualization component is found in layer 4, and it brings
Aiming for the same goal, authors have addressed important useful information to end-users.
projects and implementations in advanced metering and smart
grid. Wilcox et al present in [11] a platform for big data
solution in the domain of meter data management named
Smart Meter Analytics Scaled by Hadoop (SMASH). The
scope of this study is the cloud platform, which includes a
Hadoop ecosystem [12] performing data storing, querying,
analyses and visualization on data sets for smart meters.
The data had been collected from meter readings at a 30-
minute interval. In [6], the authors describe the proposal of
an integrated IoT architecture for electricity, water, and gas
smart metering. They have chosen Apache Spark integrated
with Hadoop ecosystem for the big data processing with
different machine learning techniques to predict the future
consumption, detection of incidents and characterization of
the kind of costumers. The work proposed in [13] presents a
cloud-based software infrastructure for smart metering named
Flexmeter, which allows handling smart meters measurements
and supporting the automation of future distribution grids and
its smart management and control. It enables communication
among IoT devices and systems, providing hardware abstrac-
tion. In [14], authors review smart meters functionalities with
a focus on data analysis aspects such as complexity, collection
velocity, and volume of data. They also survey Self-Organizing
Maps, Support Vector Machine, and other machine learning
techniques used in smart metering. Authors in [15] present
an overview of IoT-enabled smart grid with an emphasis on
Fig. 1. Proposed system architecture and its components.
power reliability, routing algorithm, and power quality. Based
on related work, we may highlight some contributions of our
proposal: A. Smart meters
• Monitoring of different electrical parameters beyond con- Smart meters are enabling keys to data extraction as they
sumption, thus allowing more insightful analyses of the are installed on the consumer side for collecting real-time
use of electrical energy in a smart city context; kilowatt-hour, voltage, current, etc [16]. Unlike conventional
• Perform data collection with a higher sample rate; meter readings where data collection is monthly, smart meters
• The sGateway, which differs from conventional gateways, provide daily, hourly or even every second data collection
enabling the system operation even without an Internet using communication networks [17]. Hence, smart meters are
connection, and promoting local processing; beneficial not only for consumers but also for utilities and the
• Design of a Load Signature Database (LSD) to infer the environment. Basically, a smart meter consists of a microcon-
usage of the distinct appliances in a smart environment. troller unit (MCU), voltage and current sensors for active and
reactive energy measurements, communication interfaces, and
III. S YSTEM ARCHITECTURE FOR ADVANCED METERING most of them are equipped with LCD interface that enables
To achieve an advanced knowledge about the generation and the consumers to not only learn their electricity tariffs and
consumption of electrical energy is necessary a well-defined energy consumption patterns but also learn the quality of

1088
power delivered from utilities as well as the indication of a and the server [21]. Posteriorly, the data are redirected to the
power outage when it occurs [15]. Smart meters can be single- AWS Kinesis that facilitates to collect, process and analyze
phase, bi-phase, or three-phase for residential usage. Three- real-time streaming data, enabling timely insights and react
phase meters are more suitable for industrial applications or quickly to new data [22]. Lastly, the AWS Elastic MapReduce
large facilities (e.g., schools and hospitals). Besides, when (EMR) clusters can read and process Kinesis streams directly
measuring high power systems, indirect current measurement using Hadoop big data ecosystem. The EMR connector for
techniques can be employed, in this case, smart power meter Kinesis uses the DynamoDB database as support for check-
and current transformers (hall effect sensors) are used to point metadata. We have chosen AWS services, specifically
achieve accurate results [18]. because it has a large number of tools from data collection
to results visualization. Besides, EMR Hadoop ecosystem
B. sGateway accommodates the Apache Spark framework which integrates
The interoperability with smart meters from different man- the MLib, Spark's machine learning library. Currently, Hadoop
ufacturers is a hard task as there is not a standard commu- and Spark are the most used big data processing frameworks
nication protocol [6]. Most meters communicate via specific [23].
network protocols (e.g., Zigbee, Modbus RTU). Newer models
have WiFi interface using the ESP8266 module or similar. D. Application and visualization component
However, there are limitations in data access, and the nonex- The application and visualization component is a collection
istence of APIs when the data is stored in the manufacturer's of cloud-based software and APIs which perform the data
cloud. To address this issue, the sGateway component is interpretation by creating monitoring services, dashboards, and
proposed to collect the data from the devices regardless of the a user control panel. Amazon offers the QuickSight which is
standard protocol adopted by the manufacturer. For example, a cloud-based business intelligence service that makes it easy
the smart meters used in our experiments are equipped with to deliver reports, views, and insight quickly.
Modbus RTU network interface, as the most devices in the
industry segment. We built our sGateway prototypes firstly IV. E XPERIMENTAL VALIDATION
using an Arduino and later a Raspberry Pi 3 running a Python This section describes some of the experiments and tests
application over a Linux Raspibian distribution. In both cases that are associated with the system architecture described in
using Ethernet, WiFi, 4G and RS485 network interfaces. the previous section. These include the selection of electrical
The sGateway differs from conventional gateways by en- parameters to be analyzed, the connection between sGateway
abling local data processing, which reduces the time between with IoT broker, the collection of metering data to create our
an event occurrence and the event being acquired and pro- dataset and preliminary results. We still progressing to create
cessed by the system. The component interacts with the cloud analytical models for deeper analyzes.
by connecting to the Amazon Web Services (AWS) IoT service
through the Message Queuing Telemetry Transport (MQTT) A. Data acquisition
protocol over a WebSocket [19]. The AWS IoT provides secure For data acquisition, we have used a residential bi-phase
and bidirectional communication between the sGateway and multi-function smart meter from Hiking manufacturer model
the cloud platform. Another advantage of this configuration is DDS238-4W, illustrated in Fig. 2.
the high level of reliability as the application can still run even
without Internet access.

C. Big data cloud platform


The big data cloud platform enables remote access to
services as infrastructures, frameworks, and software over the
Internet using the resources available in AWS. The main
features of the cloud are agility, scalability, access to any
location and by different devices (e.g., smartphones, laptops),
which allows the sharing of resources by a large group of
users, easy-to-use services, not being necessary installation
[20]. Cloud integrates all facets of ubiquitous computing by
providing scalable storage, and computational resources to
build advanced metering applications.
As aforementioned, the sGateway establishes a connection
with the AWS IoT core service which is a secure and managed
MQTT broker. At the core, the AWS IoT provides Transport
Layer Security (TLS) and Secure Sockets Layer (SSL) crypto-
graphic protocols that use a handshake mechanism to negotiate
parameters to create a secure connection between the client Fig. 2. Smart meter showing voltage value.

1089
The smart meter has RS485 serial communication interface
which uses the Modbus RTU protocol and all of its functions
comply with the relative technical requirements for class one
meter. As Modbus is a request/replay protocol, the sGate-
way component was configured to operate in master mode,
while the smart meter operates in slave mode. The data has
been collected from meter readings at a 2-seconds interval
(0.5Hz sample rate). The smart meter has been installed in
the electrical panel in the entrance of the residence, whose
electrical power from the utility is 220V and frequency 60Hz.
The average power consumption of the household is 350kWh
monthly.
B. System communication
The sGateway component establishes communication with Fig. 3. Total energy consumption from January 2019 to June 15th .
the smart meter via a wire pair, therefore, the sGateway has
also been installed in the electrical panel. The data of the
The described computational tools available in the cloud
smart meter are routed to the IoT core cloud platform via
platform, allow us to analyze the energy usage behavior
WiFi 802.11b/g/n. The connection between the cloud and
deeper. We are making progress in researching Non-Intrusive
the sGateway can go through periods of downtime for a
Load Monitoring (NILM) approach [24], which is a method to
variety of reasons, including human error, system reboots,
identify the use of individual appliances avoiding the installa-
power issues, lack of Internet connectivity and others, thus the
tion of any equipment inside the consumer's property, but only
sGateway component ensures local storage. Once a connection
the smart meter in the electrical central panel. The first step
is reestablished, sGateway sends all data storage to the cloud.
of the NILM approach is to disaggregate the electrical load by
C. The dataset analyzing the power consumption signature of the appliances
The system has monitored nine different electrical parame- [25]. The load signature corresponds to the specific electrical
ters during the experiment. We have decided to use the NoSQL behavior (e.g., active and reactive power, current, frequency)
DynamoDB database to host the dataset which is being used to of an individual appliance when it is in operation [26]. Similar
evaluate the analytical models. Table I shows the parameters to human's signature, each electrical appliance contains unique
collected and their units. Regarding the "Export energy" and intrinsic features in its consumption behavior. We have already
"Import energy" parameters, these are used in the case of other taken two steps in this matter. (1) We collected the individual
energy sources besides the utility. load signature of the main appliances in our experiment (all
parameters). And (2) we stored this information in a database
TABLE I
which we named Load Signature Database (LSB). Fig. 4
E LECTRICAL PARAMETERS AND UNITS . shows the disparity of the load signature of appliances in terms
of active and reactive power.
Electrical parameters Unit
Total energy consumption kWh
Export energy kWh
Import energy kWh
Voltage V
Current A
Active power kW
Reactive power kVAR
Power factor cosφ
Frequency Hz

D. Preliminary results
Fig. 3 shows the energy consumption statistics from the six
first months of 2019. This information can help to predict en-
ergy consumption in the future, also it is possible to calculate
the charge by multiplying the number of kWh consumed by
the rate for energy in different regions. For plotting this graph
we used the parameter "Total energy consumption" that was Fig. 4. Load signature of individual appliances.
presented earlier.

1090
V. C ONCLUSION AND FUTURE WORKS [15] F. Al-Turjman and M. Abujubbeh, “IoT-enabled smart grid via SM: An
overview,” Future Generation Computer Systems, vol. 96, pp. 579–590,
In this paper, we presented a cloud-based system archi- jul 2019.
tecture for advanced electric metering, highlighting the main [16] X. Liu, L. Golab, W. Golab, I. F. Ilyas, and S. Jin, “Smart Meter Data
contributions of our proposal concerning related work in the Analytics,” ACM Transactions on Database Systems, vol. 42, no. 1, pp.
1–39, nov 2016.
area. The experimental validation enabled the integration of [17] A. M. Tureczek, P. S. Nielsen, H. Madsen, and A. Brun, “Clustering
the system components and the collection of data to create district heat exchange stations using smart meter consumption data,”
datasets. We still making progress in researching the disag- Energy and Buildings, vol. 182, pp. 144–158, 2019.
[18] P. Ripka, K. Draxler, and R. Styblikova, “AC/DC Current Transformer
gregation method used in the NILM approach. We intend to With Single Winding,” IEEE Transactions on Magnetics, vol. 50, no. 4,
use the Load Signature Database to develop new analytical pp. 1–4, apr 2014.
models to identify the use of individual appliances in a smart [19] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, and
M. Ayyash, “Internet of Things: A Survey on Enabling Technologies,
city context. Beyond energy consumption, our final goal is Protocols, and Applications,” IEEE Communications Surveys & Tutori-
to deliver to the consumers the information about appliances als, vol. 17, no. 4, pp. 2347–2376, 2015.
utilization, thus the consumers may effectively know which [20] A. Botta, W. de Donato, V. Persico, and A. Pescapé, “Integration of
Cloud computing and Internet of Things: A survey,” Future Generation
appliances consume the most energy. Computer Systems, vol. 56, pp. 684–700, mar 2016.
[21] N. Imtiaz Jaya and M. F. Hossain, “A Prototype Air Flow Control Sys-
ACKNOWLEDGMENT tem for Home Automation Using MQTT Over Websocket in AWS IoT
Core,” in 2018 International Conference on Cyber-Enabled Distributed
This research was supported by the São Paulo Research Computing and Knowledge Discovery (CyberC). IEEE, oct 2018, pp.
Foundation (FAPESP), process number 2016/08645-9 - Brazil. 111–1116.
[22] N. S. Quadri and D. K. Yadav, “Efficient Data Classification for IoT
Devices using AWS Kinesis Platform,” in 2018 21st Saudi Computer
R EFERENCES Society National Computer Conference (NCC). IEEE, apr 2018, pp.
[1] United Nation, “Press Release on Population,” United Nation Depart- 1–5.
ment of Public Information, New York - USA, Tech. Rep., 2018. [23] W. Inoubli, S. Aridhi, H. Mezni, M. Maddouri, and E. Mephu Nguifo,
[2] H. Ahvenniemi, A. Huovila, I. Pinto-Seppä, and M. Airaksinen, “What “An experimental survey on big data frameworks,” Future Generation
are the differences between sustainable and smart cities?” Cities, vol. 60, Computer Systems, vol. 86, pp. 546–564, sep 2018.
pp. 234–245, feb 2017. [24] I. Abubakar, S. Khalid, M. Mustafa, H. Shareef, and M. Mustapha,
[3] H. Habibzadeh, T. Soyata, B. Kantarci, A. Boukerche, and C. Kaptan, “Application of load monitoring in appliances’ energy management -
“Sensing, communication and security planes: A new challenge for a A review,” Renewable and Sustainable Energy Reviews, vol. 67, pp.
smart city system design,” Computer Networks, vol. 144, pp. 163–200, 235–245, jan 2017.
oct 2018. [25] H. Song, G. Kalogridis, and Z. Fan, “Short paper: Time-dependent power
[4] N. Roy, N. Pathak, and A. Misra, “Fine-grained appliance usage and load disaggregation with applications to daily activity monitoring,” in
energy monitoring through mobile and power-line sensing,” Pervasive 2014 IEEE World Forum on Internet of Things (WF-IoT). IEEE, mar
and Mobile Computing, vol. 30, pp. 132–150, aug 2016. 2014, pp. 183–184.
[5] R. Mohammad, “AMI Smart Meter Big Data Analytics for Time [26] Jian Liang, S. Ng, G. Kendall, and J. Cheng, “Load Signature Study-Part
Series of Electricity Consumption,” in 2018 17th IEEE International I: Basic Concept, Structure, and Methodology,” in IEEE PES General
Conference On Trust, Security And Privacy In Computing And Commu- Meeting, vol. 25, no. 2. IEEE, jul 2010, pp. 1–1.
nications/ 12th IEEE International Conference On Big Data Science And
Engineering (TrustCom/BigDataSE). IEEE, aug 2018, pp. 1771–1776.
[6] J. Lloret, J. Tomas, A. Canovas, and L. Parra, “An Integrated IoT
Architecture for Smart Metering,” IEEE Communications Magazine,
vol. 54, no. 12, pp. 50–57, dec 2016.
[7] M. Barbiroli, F. Fuschini, G. Tartarini, and G. E. Corazza, “Smart
Metering Wireless Networks at 169 MHz,” IEEE Access, vol. 5, pp.
8357–8368, 2017.
[8] A. Ghosal and M. Conti, “Key Management Systems for Smart Grid
Advanced Metering Infrastructure: A Survey,” IEEE Communications
Surveys & Tutorials, vol. PP, no. c, pp. 1–1, 2019.
[9] L. M. Freire, E. M. A. Neves, L. I. Tsunechiro, and D. Capetta,
“Perspectives of Smart Grid in the Brazilian Electricity Market,” in 2011
IEEE PES Conference on Innovative Smart Grid Technologies Latin
America (ISGT LA). IEEE, oct 2011, pp. 1–4.
[10] F. S. Azevedo and R. F. Calili, “The impact of time-of-use electricity
tariffs for Brazilian residential consumers using smart meter real data,”
Journal of Physics: Conference Series, vol. 1044, p. 012068, jun 2018.
[11] T. Wilcox, N. Jin, P. Flach, and J. Thumim, “A Big Data platform for
smart meter data analytics,” Computers in Industry, vol. 105, pp. 250–
259, feb 2019.
[12] A. Kaplunovich and Y. Yesha, “Consolidating billions of Taxi rides
with AWS EMR and Spark in the Cloud : Tuning, Analytics and Best
Practices,” in 2018 IEEE International Conference on Big Data (Big
Data). IEEE, dec 2018, pp. 4501–4507.
[13] M. Pau, E. Patti, L. Barbierato, A. Estebsari, E. Pons, F. Ponci, and
A. Monti, “A cloud-based smart metering infrastructure for distribution
grid services and automation,” Sustainable Energy, Grids and Networks,
vol. 15, no. 2018, pp. 14–25, sep 2018.
[14] S. Pawar and B. F. Momin, “Smart electricity meter data analytics: A
brief review,” in 2017 IEEE Region 10 Symposium (TENSYMP). IEEE,
jul 2017, pp. 1–5.

1091

You might also like