You are on page 1of 5

Design of Arduino-based Communication Agent

for Rural Indian Microgrids


Dhiwaakar Purusothaman S R R, Member, IEEE, Ramesh Rajesh, Member, IEEE,
Vineeth Vijayaraghavan, Member, IEEE, Karan K Bajaj, Member, IEEE
Abstract - This paper explains the design of a communication
system, using an Arduino microcontroller and GSM Module and
its functions / associated components to be implemented in a
microgrid. The microgrid control and coordination infrastructure
has been realized as a hierarchical multi-agent system (MAS)
comprising of the DG agents, the Mu agent and the D agent. The
Communication (Mu) Agent acts as a link between the lower-level
microgrid agents (distributed energy resources (DERs), the load,
the storage and the utility grid) which provide the required
digital parameter inputs, and the Control Agent comprising of the
Cloud. Data storage, analytics and control commands are
generated based on the rule engine updates given by the Utility
Service Provider (USP) to the Cloud. The microgrid side input
data are converted into appropriate GPRS signals within the
Arduino. The specific functions that enable this conversion are
elucidated as pseudocode. Further, the cloud control commands
are sent back to the various microgrid-side agents via the Mu
agent as GPRS signals. The communication strategy has been
explained in detail and has been implemented using Arduino
keeping in mind system costs, ease of operability and
maintenance.
Index Terms Autonomous agents, GSM, Microgrids, Open
source hardware, Rural areas

I. INTRODUCTION
s of 2012, in several parts of the world, particularly in
developing countries such as India, where 25% (~293
million) of the citizens have no access to electricity, it has
become imperative to research, design and implement modern
distributed power systems at low cost to curb the shortage or
absence of electric power [1]. The access to electric power in
many parts of the world is gradually being revolutionized by
the advancements and outreach in the field of microgrid design
and technology. With tremendous policy support from the
Government of India (GoI) through the Ministry of New and
Renewable Energy (MNRE)s policy which suggests that India
would produce an ideal 41.2 GW of power from renewable
energy sources alone by the year 2017 [2]. To add to this, the
Re-Structured Accelerated Power Development and Reform
Program (R-APDRP) lays emphasis on the need to improve
control and communication infrastructure in power grids for
improved performance and diminution of aggregate technical

Dhiwaakar and Rajesh are full-time Research Assistants with the Solarillion
Foundation, Chennai, India (email:d.srr.1992@ieee.org;
rajeshramesh90@ieee.org)
Vineeth Vijayaraghavan is the Director Research & Outreach, Solarillion
Foundation, Chennai, India (e-mail: vineethv@ieee.org)
Karan K Bajaj is a Programmer Analyst with the Cognizant Technology
Solutions Pvt. Ltd., Chennai, India (email : karan.k.bajaj@ieee.org)

and commercial (AT&C) losses [3]. Progress in rural


renewable energy developments in India, taking into special
account the development in solar, has been documented by
experts [4]. Taking into consideration the recent proposal for
the implementation of a model smart microgrid project for a
utility scale solar PV plant in Neemrana Industrial Park,
Rajasthan, India, jointly by the Governments of India and
Japan, it can be seen that fiber-optics and Wi-Fi are the
predominantly preferred communication technologies used
across the various components of the microgrid [5]. These
would add to the cost of the system. With the introduction of
the concept of multi-agent systems for rural microgrids, it is
now possible to design efficient communication and control
methods between the central controlling unit and system
components [6]. In this case, a remote cloud, associated
communication hardware, the distributed energy resources
(DERs), storage, load, the utility grid and the respective agents
are the primary system components. The agent-based
communication system proposed is designed in Arduino
making use of the GSM / GPRS module to send data and
receive commands from the system to the cloud and vice versa
respectively.
II. RELATED WORK
Microgrid communications have been widely discussed in
several technical literatures. Hao Liang et al present a detailed
exertion on utilizing wireless networks for multi-agent
coordination [7]. Although the proposed methodology states
the use of wireless standards such as ZigBee and Wi-Fi, the
associated components and implementation of the
communication has not been described which is discussed in
this paper. The hardware/software implementation of the agent
system using open-source technology has been implemented.
Logenthiran and Srinivasan exhaustively cover the application
of multi-agent systems in rural electricity markets built on the
FIPA compliant JADE platform [8]. Extensive knowledge of
multi-agent architectural strategies and topologies is needed to
implement JADE or ZEUS based systems. Hence, to satisfy
the necessity for ease of programming, operation, upgradation
and maintenance, this paper outlines the use of an open-source
microcontroller-based machine language such as Embedded C.
The communication infrastructures in multi-agent systems for
microgrids fail to meet the defined objectives when proposed
for a clustered architecture where multiple microgrids operate
simultaneously. Hence, in this case, the agent designed is
capable of handling data from clusters as the data is converted
and communicated as GPRS data packets to and from the
cloud server.

III. PROBLEM STATEMENT


In India, several rural communities are steadily being
serviced under various microgrid schemes initiated by start-up
energy providers. Existing communication technology
proposed for urban microgrids involve agent-based modelling
using JADE and ZEUS. These systems pose multifarious
limitations like complex functionalities, high cost of
installation, operation and maintenance for a rural scenario.
Hence the challenge of adopting a communication framework
for the increasing number of remote rural microgrids remains
unsolved. With the availability of a robust telecom network,
our system intends to provide a low cost, easy to installoperate-maintain communication agent infrastructure that
leverages the GSM/GPRS standards to transmit and receive
field data and return cloud-computed commands to provide an
efficacious system control. Employing Arduino based
modelling and operation of the communication agent makes
the system cost-effective. By incorporating only the vital
functions and adopting a custom binary messaging ontology,
the size of data exchanged between the agents through the
agent and other agents is made succinct.
IV. METHODOLOGY
A. Microgrid Multi-Agent System
An ideal microgrid comprises of DERs (solar PV, wind,
Biogas), storage unit, utility grid supply and loads. These
microgrid components are hierarchically grouped into three
levels of agents (DG, Mu, D) forming a multi-agent system.
The DER agent, storage agent, grid agent and load agent form
the lower level agents and are referred to as DG agents. The
agent at the top-most level is the D agent which is responsible
for generation of appropriate commands based on the inputs
from the various DG agents for control, coordination and
performance optimization of the entire microgrid. Located
between these two agent groups is the or the Communication
agent which is responsible for the relaying of information/data
sensed on the DG side to the D agent and vice versa.
B. Existing Communication Agent models
Communication between agents in a multi-agent system is
one of the key components leading to efficient collaboration.
Agents have been modelled to interact with each other using
special
communication
languages
called
Agent
Communication Languages (ACL). An example of ACL is
KQML (Developing Multi-Agent Systems with JADE).
Communication Agent models present today rely greatly on
wireline and wireless communication infrastructure. The use of
fibre-optic cables is not a viable option considering the remote
geographic locations to be serviced by DER dependent and
more often, islanded, microgrid clusters (Multi-Agent
Coordination in Microgrids via Wireless Networks).
Utilization of ZigBee and Wi-Fi in addition would be less
cost-effective as compared to exploiting readily available
GSM/GPRS services via telecom service providers (TSPs)
keeping in mind the rural and emerging economic scenario.

C. Input /Output Data Handling


Digital and analog inputs from various DER agents are
received at the Digital/Analog input pins of the Arduino
microcontroller. Considering the number of inputs and outputs
on the basis of cost, the interfacing with the microcontroller
pins is realized using respective multiplexers CD4051 (8 pin
multiplexer-de-multiplexer) and HC4067 (16 pin multiplexerde-multiplexer) [9]. It is to be noted that analog multiplexers
are used to relay digital signals to the respective DERs
considering the fact that the commands to the DERs are either
connect or disconnect which can be achieved using the analog
multiplexers itself.
D. (Mu) Agent modelling in Arduino
The agent responsible for communication between the DG
and D agents is modelled using a GSM SIM 300 module
interfaced with Arduino. The system parameters sensed by DG
agents and the commands generated by the D agent (Cloud)
are transmitted as binary string messages through General
Packet Radio Service (GPRS). The size and contents of each
message varies with the agent and the parameters sensed. The
data sent from the various DG agents are stored in the
respective tables defined by the cloud. The sensed data are
also stored in an SD card interfaced with the Arduino. It is
assumed that the time corresponding to the data in the SD card
and the time in Cloud are synchronised. For every message
sent by the agent, the cloud sends a 1 as an
acknowledgement or a 0 otherwise. The agent sends the
next message only after receiving the acknowledgement for the
previous message.
The time interval t between the
transmission of each message and the interval tr between
transmission of successive set of messages is set by the user.
The proposed communication agent design is depicted in fig.
2.
1. Message Format DG Agent to Cloud
The various parameters sensed at each DG agent are
composed into a single binary string. A sample binary message
is shown in fig. 1.

.
Figure 1. Binary Message Format

P1, P2 and P3 represent the binary equivalent of the analog


parameters sensed by the DG agents. Usually, 7 bits are
assigned to each parameter to achieve high precision. S

Figure 2. GSM-Arduino-SD Adapter System Pin Mapping


represents the operational status of the principal (eg. Solar PV
system) corresponding to the respective DG agent while CS
represents the connection status of the same. A 0 for S
represents normal operation while a 1 represents an
emergency state. The connected and disconnected states are
represented using 1 and 0 respectively. The guard bit indicates
the end of each message thus ensuring proper reception of the
messages. Usually a special character like # or @ is used as
the guard bit. It also differentiates one message from the
successive messages. ER is the error code set by the
corresponding agent to notify the cloud whenever there is an
error in the system that the agent is associated with. The size
of the message varies with each agent. AL represents the DG
agent identity / agent label. The various DG agents and their
respective agent labels are as shown in Table I.

i) Solar and Wind: For solar and wind DER agents


the message format is similar to the one shown in fig.3 except
for the size and number of parameters. The parameter 1 and
parameter 2 are voltage and current respectively. These
parameters are scaled down to the range of 0-5V which is then
converted into binary form. They are represented using 7 bits
to provide more precision. The message format for solar and
wind DER agent is as given below. P1 represents voltage and
P2 represents current in the message.

TABLE I. DG AGENTS AND LABELS

ii) Biogas and Grid: The message format for the DG


agent corresponding to the biogas plant and the utility grid
supply has a third parameter apart from voltage and current,
which are rpm and frequency respectively. The third parameter
is represented using 3 bits.

Agent
Solar
Wind
Biogas
Grid
Storage
Load Group 1
Load Group 2
Load Group 3

Label
000
001
010
011
100
101
110
111

a) DER Agent
Table II shows a sample pseudocode for the binary string
message sent from the solar DER agent to the cloud. This
pseudocode shows the various steps such as retrieving the
input at the input pins of Arduino, storing the inputs in
corresponding variables and SD card, establishing connection
to the cloud, transmission of message and reception of
acknowledgement.

Figure 3. Message Format for Solar/Wind

b) Storage: This agent has only one parameter associated


with it, charge level in percentage (%). The message format for
this agent is as shown in fig. 4.

Figure 4. Message Format for Storage

c) Load: The load agent senses only the operational and


connection statuses of the load groups and hence, there are no
parameters associated with the corresponding message sent to
the cloud. Fig. 5 shows the message format associated with
this agent. AL can be one among 1 0 1, 1 1 0, 1 1 1 depending
on the load group for which the message is sent.

TABLE III. COMMAND FROM CLOUD TO DG - PSEUDOCODE

Figure 5. Message Format for Load

2. Message Format Cloud to DG Agent


Fig. 6 shows the message format for the command
generated by the cloud to be sent to the DG agent. AL
represents the agent ID of the DG agent to which a command
is sent.
A 1 in the SO bit overrides the system operation and
resets the system to its initial state. AO bit is used to override
the operation of a particular agent denoted by the AL bits. SC
bit is used to connect or disconnect the agent which is denoted
by the AL bits. Table III shows the pseudocode for the
command sent from the cloud to the DG agents.

TABLE IV. INFORMATION REQUEST FROM CLOUD SD CARD PSEUDOCODE

TABLE II. DG TO CLOUD - PSEUDOCODE

TABLE V. EXCEPTION HANDLING - PSEUDOCODE

It is to be noted that a HEF4050 chip is used to ensure that


the 5V supply from the Arduino is converted to a voltage
range of 0-3.3V, where the chip acts as a voltage leveler for
the SD card.

Figure 6. Message Format - Cloud to DG

This involves establishing a GPRS link, reception of


input message from DG agents, sending the corresponding
acknowledgements, identifying appropriate normal and
emergency states of the agents and sending the corresponding
messages to respective agents.
3. Data Retrieval from SD Card
The cloud sends out a Short Message Service (SMS) to
the Mu agent as and when a need to retrieve SD card data
arises. The format of this SMS is given below:
<time_1><time_2><agent_label>
When the above SMS is received the Mu agent retrieves
all the data between the time interval time_1 and time_2 and
sends it to the cloud through GPRS. The pseudocode for this
process is as shown in table IV

4. Exceptional Cases
a) Case 1: Whenever the Mu agent doesnt receive an
acknowledgement, it waits for time t1 < t and resends the last
sent message.
b) Case 2: When the Mu agent receives a 0, it resends
the previous message.
c) Case 3: When the cloud doesnt receive a message, it
waits for time t2 before it sends a 0 to the Mu agent. The
value of resend in the cloud data table is incremented by 1 to
indicate that a resend has been requested. t1 and t2 are selected
such that t1 < t2 < t < tr.
d) Case 4: When the cloud receives the message just after
sending a 0 to the Mu agent, it compares the agent label of
the received message with the previous message. If the agent
labels are different, the received message is stored in the
corresponding data table else discarded. The pseudocode for
handling these exceptions is given table V.

V. CONCLUSION
The Arduino-based communication agent has been devised
taking into account the ease of implementation, operation,
maintenance and cost. The off-the-shelf components used in
tandem with the ATMega microcontroller, such as the
multiplexers, the GSM module and the SD Card adapter allow
for faster adoption of the topology in present microgrid
networks. By leveraging the existing GPRS/GSM protocols
made available by the extensive telecom network coverage in
most parts of the country, this system can be implemented over
a large area for a comparatively minor investment. The
inclusion of a cloud based-command generation option allows
USPs to update and control the functions of the agent. This
is also visualized to provide users with usage statistics and
other vital analytics.
REFERENCES
[1]

Practical Action, "Poor peoples energy outlook 2013 - Energy for


community
services,"
pp.51,
2013
[Online]
Available:
http://practicalaction.org/media/preview/27109

[2]

Ministry of New and Renewable Energy, Government of India Report,


Strategic Plan for New and Renewable Energy Sector for the Period
2011-17 ", February 2011.

[3]

Ministry of Power, Government of India, (2008, September 19), Order


No.
14/04/2008-APDRP,
Re-structured
Accelerated
Power
Development and Reforms Programme (APDRP) during XI Plan
[Online] Available:
http://www.apdrp.gov.in/OrderSGuidelines/Mop%20Order(19.09.08)%
20-%20Presidential%20approval%20of%20R-APDRP.pdf

[4]

Sreevas S., Jery Althaf and Sankar R., "Rural electrification using solar
power - A model for developing country", LAP LAMBERT Academic
Publishing. 2013

[5]

Ministry of New and Renewable Energy, Government of India, The


Model Project for a Microgrid System using Large-Scale PV Power
Generation and Related Technology, 30th April 2012 [Online]
Available: http://mnre.gov.in/mous/mou-japan.pdf

[6]

Purusothaman, S R R Dhiwaakar; Rajesh, Ramesh; Bajaj, Karan K;


Vijayaraghavan, Vineeth, "Multi-Agent System Framework for Rural
Indian Microgrids," Conference on Clean Energy and Technology,
2013 IEEE, 27-29 Jun. 2013.

[7]

Hao Liang; Bong Jun Choi; Weihua Zhuang; Xuemin Shen; Awad, A. S
A; Abdr, A., "Multiagent coordination in microgrids via wireless
networks," Wireless Communications, IEEE , vol.19, no.3, pp.14,22,
June 2012.

[8]

Logenthiran, T; Srinivasan, Dipti. Multi-agent system for market based


microgrid operation in smart grid environment, Dept. of Elec. &
Comp. Science, National University of Singapore, 2011 [Online}
Available:
http://www.smartgridcontest.com/attachments/idea_63_102_130275933
5.3161_Publication_1.pdf

[9]

Purusothaman, S R R Dhiwaakar; Rajesh, Ramesh; Bajaj, Karan K;


Vijayaraghavan, Vineeth, "Implementation of Arduino-based multiagent system for rural Indian microgrids," Innovative Smart Grid
Technologies - Asia (ISGT Asia), 2013 IEEE , vol., no., pp.1,5, 10-13
Nov. 2013

You might also like