23
Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication Eects on Frequency Control O. Kilkki a,1 , A. Kangasr¨ asi¨ o a , R. Nikkil¨ a a , A. Alah¨ aiv¨ al¨ a a , I. Seilonen a a Aalto University School of Electrical Engineering, 00076 Aalto, Finland Abstract Smart grid is the next generation power grid focused on providing increased reliability and eciency in the wake of integration of volatile distributed energy resources. For the development of the smart grid, the modeling and simulation infrastructure is an important concern. This study presents an agent-based model for simulating dierent smart grid frequency control schemes, such as demand response. The model can be used for combined simulation of electrical, communication and control dynamics. The model structure is presented in detail, and the applicability of the model is evaluated with four distinct simulation case examples. The study confirms that an agent-based modeling and simulation approach is suitable for modeling frequency control in the smart grid. Additionally, the simulations indicate that demand response could be a viable alternative for providing primary control capabilities to the smart grid, even when faced with communication constraints. Keywords: Agent-based modeling and simulation, smart grid, frequency control, communication 1. Introduction 1 Smart grid is the envisioned more flexible electricity network of the future. One 2 motivation for smart grid is the increase in distributed energy resources (DER), such 3 as wind and solar power, which increase the power generation volatility (ENTSO-E, 4 * Corresponding author Preprint submitted to Engineering Applications of Artificial Intelligence December 16, 2013

Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Agent-based Modeling and Simulation of Smart Grid: aCase Study of Communication Effects on Frequency

Control

O. Kilkkia,1, A. Kangasraasioa, R. Nikkilaa, A. Alahaivalaa, I. Seilonena

aAalto University School of Electrical Engineering, 00076 Aalto, Finland

Abstract

Smart grid is the next generation power grid focused on providing increased reliability

and efficiency in the wake of integration of volatile distributed energy resources. For

the development of the smart grid, the modeling and simulation infrastructure is an

important concern. This study presents an agent-based model for simulating different

smart grid frequency control schemes, such as demand response. The model can be

used for combined simulation of electrical, communication and control dynamics. The

model structure is presented in detail, and the applicability of the model is evaluated

with four distinct simulation case examples. The study confirms that an agent-based

modeling and simulation approach is suitable for modeling frequency control in the

smart grid. Additionally, the simulations indicate that demand response could be a

viable alternative for providing primary control capabilities to the smart grid, even

when faced with communication constraints.

Keywords: Agent-based modeling and simulation, smart grid, frequency control,

communication

1. Introduction1

Smart grid is the envisioned more flexible electricity network of the future. One2

motivation for smart grid is the increase in distributed energy resources (DER), such3

as wind and solar power, which increase the power generation volatility (ENTSO-E,4

∗Corresponding author

Preprint submitted to Engineering Applications of Artificial Intelligence December 16, 2013

Page 2: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

2012). The increased volatility in power generation can lead to imbalances in pro-5

duced and consumed energy, which causes frequency deviations in the grid. Large fre-6

quency deviations can subsequently lead to grid instability, which should be avoided at7

all costs. Future smart grid technologies are planned to enable managing innefficien-8

cies in consumption and production of energy. However, appropriate control strategies9

must be devised and implemented in order to avoid adverse effects from communica-10

tion latencies (US Department of Energy, 2010) and possible synchronization effects11

involved (Ramchurn et al., 2011).12

One technique for countering this volatility is demand response (DR), meaning the13

ability to adjust the customer electricity consumption based on control signals. With14

smart grid-enabled DR, customers can participate in maintaining the balance between15

produced and consumed energy. This helps to ensure grid stability with the addition of16

DER (Finnish Energy Industries and Fingrid Oy, 2012), but can also be useful in miti-17

gating other issues in power generation and distribution, such as line failures (ENTSO-18

E, 2012).19

The purpose of this paper is to evaluate agent-based modeling and simulation20

(ABMS) as a method for studying balancing control in the smart grid. In addition to the21

producers of energy and the consumers, the communication infrastructure responsible22

for relaying the control signals and relevant information between the actors in the grid,23

is an important element which is integrated in to the model. With a simulator based24

on the model, the effects of the communication latencies involved in controlling the25

frequency of the grid are investigated. The paper is structured as follows. Section 2 re-26

views related research concerning frequency control, communication, and agent-based27

modeling and simulation of smart grid. Section 3 describes the agent-based model of28

the frequency control problem. Section 4 presents the results from simulations, fol-29

lowed by discussion and conclusions in Sections 5 and 6.30

2

Page 3: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

2. Related research31

2.1. Frequency control of smart grid32

Frequency stability requires that the electricity grid is able to maintain a steady fre-33

quency even when the power production and consumption become imbalanced (Kun-34

dur et al., 2004). Without frequency control the grid may become unstable, as large35

frequency deviations can lead to generating units disconnecting and further imbalanc-36

ing the system. This instability can eventually lead to large blackouts and damage to37

the physical equipment. Small variations in the frequency are dampened by the kinetic38

energy of the rotating motors connected to the grid (Rebours et al., 2007), but greater39

imbalances need to be compensated with the regulation of supply or demand.40

Primary control is the mechanism used to limit the short-term deviation of the sys-41

tem frequency and sustain the stability by varying the production of the generators42

dedicated to primary control (UCTE, 2004). The ENTSO-E (European Network of43

Transmission System Operators for Electricity) standards (UCTE, 2004) dictate that44

primary control reserves react to the system frequency deviation by varying the gener-45

ated power proportionally to the frequency deviation ∆ f according the formula46

∆PP = KP∆ f , (1)

where ∆PP is the change in the generated power and KP the generator specific coeffi-47

cient. However, this proportional primary control leaves a constant steady-state error to48

the system frequency. The constant power imbalance is removed with subsequently ac-49

tivated integral secondary and tertiary controls. According to the ENTSO-E standards,50

the primary control reserves must be fully activated in 30 seconds, where a 0.2 Hz de-51

viation leads to a full activation. The correcting secondary controlled reserves are then52

activated within 15 minutes (UCTE, 2004).53

With the communication and demand-side capabilities of smart grid, at least a por-54

tion of the primary control can be realized by controlling the demand instead of the55

supply (Callaway and Hiskens, 2011). Demand side load balancing could enable faster,56

more efficient and more reliable balancing of the power grid compared to traditional57

primary control using large generators.58

3

Page 4: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

The basic control architectures for DR are the centralized and decentralized ap-59

proaches. In centralized control, primary frequency control is provided by centrally60

controlling customer loads as a function of the grid frequency. An example of cen-61

tralized control approach is presented by Shimizu et al. (2010), where electric vehicle62

charging rates are synchronized centrally to manage grid frequency. Alternatively, in63

decentralized control, the loads measure the grid frequency independently and act ac-64

cording to their individual frequency thresholds, as presented by Molina-Garcıa et al.65

(2011). Some quality of service requirements for the required communication tech-66

nologies have already been suggested (Gungor et al., 2013; Bouhafs et al., 2012), but67

more convenient models could be used to further inspect the effects of communication68

latencies on frequency control.69

2.2. Communication in smart grid70

Extensive communication is a distinguishing factor between the smart grid and the71

traditional electric grid. Providing this communication is a significant technical chal-72

lenge (Bouhafs et al., 2012). Communication in smart grid is generally conceived as73

a heterogenous communication infrastructure utilising existing networks and technolo-74

gies (Gungor et al., 2011; Zaballos et al., 2011). Particularly in centralized control,75

all these communication media are relied on to transmit the control signals between76

the central controller and the associated energy resources. Thus, the properties of the77

communication infrastructure, such as latency or potential packet loss, are a significant78

constituent in centralized frequency control of smart grids (Lu et al., 2013). Further-79

more, the use of existing networks and particularly the Internet, for communication,80

raises security concerns which must be addressed in smart grids (Wang and Yi, 2011).81

Simulations of smart grids generally include some simulation of the communica-82

tion infrastructure. Communication can be modeled at various levels of authenticity,83

spanning from constant zero delays to statistical modeling of individual communication84

technologies. These statistical models can take into account such features as latency,85

network congestion, packet loss, or packet duplication. For the most comprehensive86

and accurate simulation of communication, a specialised communication network sim-87

ulator may be integrated to the smart grid simulation (Mets et al., 2011).88

4

Page 5: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

2.3. Agent-based modeling and control of smart grid89

A popular approach for modeling smart grids is to build upon existing electric and90

communication simulation frameworks, such as PSCAD/EMTDC (Hopkinson et al.,91

2006), OpenDSS (Godfrey et al., 2010), OMNeT++ (Mets et al., 2011) or NS2 (Nutaro92

et al., 2008). This allows existing simulation libraries and algorithms to be employed,93

and thus possibly reduces the effort needed for model implementation. For example,94

Lin et al. (2011) present a versatile co-simulation model that takes into account the95

synchronization of both the electric and communication dynamics.96

In contrast, agent-based models have recently been applied for modeling smart97

grids (Conzelmann et al., 2005; Karnouskos and De Holanda, 2009; Lin et al., 2011).98

Likely because the decentralized and potentially co-operative nature of the consumers99

in DR highlights the potential of ABMS as a method to model and simulate the system100

(Zhou et al., 2011). In addition, the communication framework with sophisticated101

varying latencies is naturally suited for ABMS (Borshchev and Filippov, 2004). Agent-102

based modeling of smart grids has however been mostly limited to electricity markets103

(Weidlich and Veit, 2008; Zhou et al., 2011; Conzelmann et al., 2005) and control104

strategies related to load shifting in long time scales (Callaway and Hiskens, 2011). In105

addition to the modeling and simulation of smart grids, agents have been introduced to106

control algorithms, e.g. in self-healing control under fault situations (Liu et al., 2012).107

Simulating and modeling DR using ABMS has seen various efforts, including108

PHEV (plug-in hybrid electric vehicles) (Galus and Andersson, 2008) and residen-109

tial appliances (Ramchurn et al., 2011; Karnouskos and De Holanda, 2009). However,110

agent-based modeling and simulation has not been thoroughly investigated in smaller111

time-scale frequency stabilizing control scenarios. In addition, the frequency control112

and demand response simulations presented in literature have very simplistic models of113

communication dynamics, such as discrete packet delays (Bhowmik et al., 2004). This114

is likely because they are mainly focused on load shedding during daily power demand115

peak moments, where the time scales are such that the effects of communication tend116

to be negligible. However, in short-term outage management scenarios when follow-117

ing the ENTSO-E primary control standards, the varying delays in the communication118

infrastructure between the loads and central control stations are a significant part of119

5

Page 6: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

the total response time (Moslehi and Kumar, 2010) and may become an issue for the120

performance (US Department of Energy, 2010).121

3. Agent-based modeling of frequency control122

3.1. Modeling Approach123

ABMS is a paradigm suited for modeling systems with multiple decision-makers124

that interact with each other (Macal and North, 2010). These kind of systems are re-125

ferred to as complex adaptive systems (CAS) (Miller and Page, 2010). CAS often126

exhibit complex behavior arising from the low-level interactions and behaviors of the127

decision-makers, which makes them generally difficult to model using traditional meth-128

ods. ABMS allows this complex behavior to be reproduced without having to construct129

explicit models of the system.130

In ABMS, agents are used to represent the decision-makers in the system, such as131

plant operators or intelligent control programs. The purpose of the agents is to repro-132

duce the behaviors of real world decision-makers in the smart grid. In order for the133

agents to have a realistic operating environment, the relevant dynamics of the system134

are replicated by a different part of the model called the environment entities. These135

entities represent the environment of the agents, for example, the electric grid, commu-136

nication channels and electric devices in the system.137

According to ABMS, a model is constructed by describing the types of agents and138

environment entities in the system and how they communicate with each other. When139

the model is executed, each agent and environment entity act in turn according to the140

behavior rules defined by the modeler.141

3.2. Model Structure142

The ABMS model of smart grid defined in this paper consists of the acting agents143

and the environment, which is affected by the agents and various environmental influ-144

ences. An example of how the smart grid can be described using these model entities is145

shown in Table 1. The first column of the table identifies the organization of the model146

entities that constitute the smart grid. The second column identifies some prominent147

6

Page 7: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Table 1: A taxonomy of entities in an ABMS model of the smart grid

Entity Properties, behaviours & functionality Examples

Agent Communicates with other agents, affects the envi-

ronment, makes control decisions

System operator, consumer, power plant

Electrical device Electrical dynamics Generator, relay, electrical appliance

Communication link Deliver messages between communicating agents,

includes communication dynamics (especially la-

tency)

Powerline communication, 3G, Ethernet

Grid Connects electrical devices, transmits electricity Transport link, abstract grid (non-spatial)

Environmental influences Outside sources which affect the environment and

the behaviour of the agents

Weather, demand patterns

features and functionalities that characterize each of these classes. The third column148

lists some concrete examples of each class.149

The model consists of three types of agents, their control logic and the environment150

which they affect. The most relevant model entities are illustrated in Figure 1. The151

grid environment is represented by a grid entity, which calculates the grid frequency152

based on the power production and consumption of all the electrical devices in the153

model. The model is designed to cover studying of frequency control scenarios with154

different control approaches. The control approaches are studied in a situation where155

a large generator unexpectedly disconnects from the grid, leaving a large imbalance in156

generated and consumed power. The frequency can be stabilized using either a smaller157

generator, centralized DR or decentralized DR, which are scaled to represent equally158

large power reserves. The stabilizing generators are modeled using power plant agents,159

which contain a generator entity and a simple decision logic that operates them.160

The demand response is modeled using a virtual power plant (VPP) agent that pro-161

vides a number of consumer agents with additional information. The VPP represents a162

centralized control system that has a communication link to all the consumer agents and163

a decision logic that induces the desired control behaviors in the consumers. The con-164

sumer agents model the control of house temperature control systems, and they com-165

7

Page 8: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Figure 1: A class diagram illustrating the most relevant model entities and their interconnections.

prise of a controllable electric heater, a house temperature model and a control logic.166

The control logic is used to influence the environment through the electric heater. The167

heater affects the house temperature and grid frequency, respectively. In the centralized168

control scenario, the VPP is responsible for controlling the power consumption of the169

consumers. Alternatively in the decentralized scenario, the VPP allocates the separate170

control parameters to each consumer so that their combined behavior is similar to the171

centralized control situation.172

Simulations with the model are run with the help of an underlying discrete-event173

scheduler, that schedules the order of simulation events, such as updating of the grid174

frequency, arrival of a message or action made by an agent. The scheduling logic in the175

developed simulator is similar to the one presented by Lin et al. (2011). Agents react176

8

Page 9: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

to messages by determing appropriate control actions with their decision logic. These177

are modeled as procedures which are different for each agent type, i.e. VPP, power178

plant and consumer agents. The details of modeling agent behaviors and their physical179

effects is presented in subsequent sections.180

3.3. Thermal and electrical behaviors181

The electrical devices in the model consist of electric heaters and power genera-182

tors. The heater is either fully on or fully off, and is primarily controlled by a simple183

thermostat that aims to maintain the house temperature within set limits. However, the184

consumer decision logic can override this control and set the heater to either state if185

needed. The consumer agent is a model of the thermostat decision logic and through186

its electrical device affects the grid frequency.187

The house temperature is modeled using discretized first-order dynamics, adapted188

from Mortensen and Haggerty (1988),189

Tt = e−dtτ Tt−1 + (1 − e−

dtτ )(Ta + GhPh) + νt, (2)

where Tt is the internal temperature at time t, dt is the simulation timestep, τ is the time190

constant of the house, Ta the ambient temperature, Gh the heater temperature gain per191

unit of power, Ph the heater power and νt a Gaussian white noise process. In practice,192

the house thermal dynamics contribute marginally to the simulation results due to the193

short simulation runs conducted in this study. In this model, the time constant of a194

house was approximated to be 24 hours and the temperature gain was approximated to195

be 10 ◦C/kW.196

Likewise, the generators are simplified and modeled also using discretized first-197

order dynamics198

Pt = e−dtτ Pt−1 + (1 − e−

dtτ )Pre f , (3)

where Pt is the generator power at time t, dt is the simulation timestep, τ is the time199

constant of the generator and Pre f the power reference value given by the proportional200

control. In this model, only the dynamics of the primary control generator are relevant,201

as the failing generator is cut down from the grid instantaneously. The time constant τ202

of the primary control generator is approximated to be 8 seconds.203

9

Page 10: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

The electric grid is the environment in which the electric devices interact with each204

other. The composite frequency dynamics of the whole grid are taken into account with205

the simplified model:206

2Wk

fn∆ f ′(t) + Kv∆ f (t) = ∆PG + ∆PDR − ∆PL, (4)

which includes the kinetic energy Wk, the nominal frequency fn and the self-regulation207

of the loads Kv in the grid (Elovaara and Haarla, 2011). The system under consid-208

eration is the Nordic power grid for which the values for the factors involved are209

Wk = 110 GWs (Fingrid, 2012), fn = 50 Hz and Kv = 1000 MW/Hz (Elovaara and210

Haarla, 2011). Additionally, the model includes the power generation and demand in211

the form of change in power generation ∆PG, change in demand response ∆PDR and212

∆PL as the change in load power. The resulting deviation of the grid frequency is213

denoted by ∆ f .214

3.4. Communication behaviors215

Figure 2 illustrates communication between agents. Agents are connected through216

unidirectional communication channels that are instances of a communication tech-217

nology. The communication technology consists of the sending and receiving devices218

and the network connecting them. Each communication technology has a model for219

channel reliability, permitting the modeling of packet loss as latency or total loss, and a220

model for channel and communication base latency. These models reflect the stochas-221

tic nature of latencies and packet loss in real-world communication networks, and can222

cover congestional, as well as, computational latencies. Messages sent over the com-223

munication channel are turned into scheduled events, notwithstanding possible packet224

loss. Scenarios comparable to packet loss could occur in case of communication chan-225

nel outages, and the resulting communication link switching. The message incurs a226

delay drawn from the latency model of the communication channel. After the delay, a227

message event is invoked in the receiving agent. In addition to the stochastic properties228

of the communication channels, most scheduled events include a slight, for example,229

5% inaccuracy, in their delay. Hence, on consecutive simulation runs, two events with230

an equal delay are eventually invoked in a non-deterministic order. Furthermore, laten-231

10

Page 11: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Figure 2: Message transmission between agents through their shared communication channel and scheduler

by the scheduler.

cies other than the actual propagation of the packets, such as related to the processing232

and queuing of packets has been augmented to the communication channel.233

The communication channels support comprehensive modeling of latency. With234

unidirectional channels, bidirectional communication can be symmetric or asymmetric,235

for example, broadcast over the electric grid and response over the Internet. Low la-236

tency reliable communication channels, such as local Ethernet connections, have prac-237

tically zero latency with very little variation. On the other hand, unreliable wireless238

communication can exhibit highly variable latencies and possible retransmissions. For239

simulating reliable communication, such as that over the TCP protocol, latencies can be240

drawn from two or more distributions to cover the possible retransmission of packets.241

11

Page 12: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

3.5. Control behaviors242

In the system, the VPP governs a set of consumers and keeps a list of their nominal243

power, operation state (on or off) and willingness to change state. The willingness is244

indicated by a real number ranging from 0 to 1, where ’1’ indicates the device is very245

willing to change to ’disabled’ and vice versa. To implement frequency control, the246

VPP measures the grid frequency and communicates to a required amount of loads247

to turn on or off proportionally to the frequency deviation. The loads are controlled248

in the order of their reported willingness. In case the decentralized control approach249

is used, the VPP distributes a randomized set of frequency thresholds to the loads.250

These thresholds are chosen so that the combined effect of the decentralized control251

conducted by the loads is similar to the proportional control defined by ENTSO-E252

(UCTE, 2004). The randomization is implemented to avoid synchronized reaction to253

frequency fluctuations.254

The control behaviour of the electric heaters in consumer residences are modeled255

as consumer agents, as seen in Figure 1. The heater can be controlled remotely by the256

operating VPP or in a decentralized manner by the consumer. In centralized control,257

the consumer agent receives control and query messages from the VPP agent, which258

models the aggregating virtual power plant. The control messages can force the de-259

vice ’enabled’ or ’disabled’, or change the frequency threshold used in decentralized260

DR. The query messages are responded with a message that includes the agents’ op-261

eration state and willingness to change it. The willingness is determined based on the262

proximity of the thermostat temperature to the upper temperature threshold. In decen-263

tralized control, the electric device agents locally sense the grid performance and act on264

it independently. When the individual frequency threshold is exceeded, the consumer265

switches the operation state of its heater correspondingly.266

4. Simulations267

The feasibility of the previously presented agent-based modeling and simulation268

method was analyzed through simulations based on the model presented in the previ-269

ous section. Four different experiments were conducted on the model. The investigated270

12

Page 13: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

scenarios cover different control alternatives under several communication and simula-271

tion parameter variations:272

Case A compares traditional primary control reserve activation from a power273

plant, DR and lack of control.274

Case B covers centralized DR with two different communication parameters and275

decentralized control.276

Case C examines the sensitivity analysis performed on the communication chan-277

nel parameters.278

Case D demonstrates the effect of the number of consumer agents used for DR.279

4.1. Simulation setup280

The simulation platform to evaluate the detailed agent-based model was coded from281

the ground up in C++. The system includes simultaneously the scheduling of the282

thermal and communication dynamics of the system. The main investigated scenario283

with the simulation framework is the detachment of the largest allowed power plant in284

the Finnish grid (1650 MW (Fingrid, 2012)). The power generator is detached at t = 2,285

which activates the primary frequency control. The effects of secondary and tertiary286

control are omitted in this short-term simulation. This drastic step response is used to287

evaluate the possible problems due to communication dynamics when stabilizing the288

frequency with DR.289

The primary reserves are modeled with a single plant able to activate 1400 MW of290

primary reserves in response to the deviation of 0.2 Hz in the system frequency. The291

plant follows first-order dynamics with a time constant of 8 s and thus the proportional292

control gain KP is defined as 7617 MW/Hz.293

Alternatively, the primary control is fully handled by controlling the demand side294

consumer loads. The combined maximal power of controllable loads is set to 2000 MW295

for studying the feasibility of providing primary control using the consumer loads. In296

practice, most of the primary control would be dedicated to the traditional reserves.297

In the beginning of the simulation, the power grid is assumed to be balanced. Each298

consumer agent is connected to the VPP by a communication link with individual pa-299

rameters drawn from a suitable normal distribution. The thermal loads are initialized300

13

Page 14: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

with randomized values, averaged at their equilibrium state assuming constant weather301

conditions.302

4.2. Simulation results303

Case A compares the centralized DR to traditional control and control failure. The304

simulated grid frequency deviations are shown in Figure 3. Without any correction in305

production or load shedding when the power generator is disconnected, the frequency306

deviation soon falls below acceptable levels (−0.8 Hz (UCTE, 2004)), and settles at307

−1.6 Hz. In case a traditional power plant is used for proportional control, the system308

frequency deviation settles after some slight oscillation at the expected −0.2 Hz. Us-309

ing demand response with similar proportional control, the system reaches the settling310

frequency faster due to the more immediate nature of the devices.311

0 5 10 15 20 25 30 35 40 45 50

−1.5

−1

−0.5

0

t (s)

∆ f (

Hz)

No control

Power plant

Load control

Figure 3: Case A Power grid frequency behavior without control, with a conventional power plant and

demand side load control.

Case B compares the decentralized DR control to two implementations of central-312

ized DR control using GPRS communications with and without packet loss. In the case313

of packet loss, 20% of the sent messages never reach the recipient. The frequency devi-314

ations illustrated in Figure 4 show that decentralized control exhibits the best behavior315

with no oscillation, whereas with centralized control the frequency tends to oscillate.316

This can be explained by the delays incurred in centralized control. The particularly317

good behaviour of the system under decentralized control can be explained by the fact318

that the sensing and response to the frequency variations can be implemented without319

any of the latency involved with communicating the control or measurement signals320

14

Page 15: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

over various channels. With packet loss or similar long reception delay, the frequency321

can be seen to oscillate slightly more and settle at a slightly lower frequency. The322

frequency deviation is explained by the fact that the control algorithm is based on the323

assertion that each control message is always delivered, which is now not the case in324

the surveyed time frame. It should be noted that the system is not unstable in any of the325

presented configurations. The 200 mHz deviation is later compensated with secondary326

and tertiary control.327

0 5 10 15 20 25 30 35 40 45 50−0.4

−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

t (s)

∆ f (

Hz)

GPRS

Decentralized

Lossy

Figure 4: Case B Power grid frequency behavior with demand side load control using GPRS for communi-

cation and using decentralized control.

Case C considers the sensitivity analysis with respect to the communication chan-328

nel parameters. As the parameters used for the communication channels are only ap-329

proximations, it is interesting to know how the results would vary with slightly dif-330

ferent parameter values. This was studied by running 1000 simulations, where all the331

parameters for each communication link were varied randomly between ±50% of their332

nominal values. The resulting distribution of frequency deviation curves is shown in333

Figure 5. Apart from different levels of oscillation, varying the parameters beyond their334

approximated values does not result in radically different behavior.335

Case D demonstrates the effect of the number of consumer agents used for DR. In336

these simulations, a VPP with 100, 1000 and 10000 consumers is used for control with337

an aggregate control potential scaled to a same value, and simulated 1000 times with338

different initial seeds used for random processes. The results in Figure 6 show that the339

number of oscillation, and especially variation between individual simulations dimin-340

15

Page 16: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

0 5 10 15 20 25 30 35 40 45 50−0.4

−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

t (s)

∆ f (

Hz)

95%

50%

mean

Figure 5: Case C Power grid frequency behavior when varying the GPRS communication channel parame-

ters ±50%.

ishes, when the number of load agents is increased. While using only 100 simulated341

loads (Figure 6a), there is significant variation between the simulations but the system342

is not driven unstable. When the number of loads is increased to 10000 (Figure 6c), the343

system exhibits unified behavior, even though the individual agents may experience,344

for example, varying communication delays. Thus, the results indicate increasing pre-345

dictability of control when the number of loads is increased.346

5. Discussion347

The main purpose of this research was to evaluate the method of agent-based mod-348

eling and simulation, for studying the balancing control of the smart grid. This study349

differed from the previous related studies, such as by Lin et al. (2011), in the aspect350

that the model was constructed without relying on external modeling frameworks. This351

approach was motivated by the independence of this model from any particular model-352

ing framework and the possibility to choose exactly which aspects are included in the353

model and how they are simulated. Furthermore, this study focused on presenting a354

feasible agent-based model for simulating smart grids, instead of solving issues with355

framework integration. Nevertheless, it should be possible to integrate external frame-356

works into the model presented in this paper, as many succesful comparable integration357

projects have already been reported in the literature (Hopkinson et al., 2006; Godfrey358

et al., 2010; Mets et al., 2011; Nutaro et al., 2008).359

16

Page 17: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

0 10 20 30 40 50

−0.4

−0.3

−0.2

−0.1

0

t (s)

∆ f

(H

z)

95%

50%

mean

(a) N=100

0 10 20 30 40 50

−0.4

−0.3

−0.2

−0.1

0

t (s)

∆ f

(H

z)

95%

50%

mean

(b) N=1000

0 10 20 30 40 50

−0.4

−0.3

−0.2

−0.1

0

t (s)

∆ f

(H

z)

95%

50%

mean

(c) N=10000

Figure 6: Case D Effect of number of simulated loads on the frequency behaviour with 1000 simulations in

varying communication conditions.

As the model is constructed in a modular way, it could be expanded in the di-360

rection of, for example, electricity market simulation. Many of the existing features361

could remain intact, such as the electrical and communication dynamics, whereas new362

dynamics would have to be introduced for marketplaces and bidding logic.363

In addition, the supplementary objective of simulating effects of communication la-364

tencies was explored. The simulation cases cover a variety of communication scenarios365

which indicate that communication dynamics with realistic worst-case parameters have366

only a minimal effect on the grid frequency transients. The large number of interacting367

agents can be seen as a factor resulting in unified and composed behavior, as seen in368

Figure 6. In addition, the kinetic energy of the grid resists the faster oscillations and369

17

Page 18: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

decline of the grid frequency. However, to further investigate the effect of communica-370

tion dynamics on frequency control, more simulation studies with different scenarios371

and possibly more refined models could be required.372

The electric and communication dynamics were approximated with rather simple373

equations. This was because highly accurate dynamics were not deemed necessary for374

demonstrating the feasibility of the modeling approach itself, or the most prominent375

features of the system under study. The dynamic models could be changed into more376

complicated ones if necessary. This was considered to be an important feature in the377

implemented model as the DR is likely to cause several challenges requiring further378

research. From the electric grid point of view, voltage stability, component overload-379

ing, and the DR effect on the grid losses are relevant issues requiring more complicated380

models. In addition, the frequency stability focused in this paper could be studied381

with more detailed grid dynamics. However, the primary control has relatively slow382

performance requirements, which is why the approximate grid dynamics was consid-383

ered to be sufficient for the purposes of this study. Including load-shedding and other384

supportive procedures, would mitigate the role of the DR as the frequency controlled385

reserve.386

In practice, the DR specified in the paper can be realized by implementing the387

intelligent electronic devices capable of controlling the loads either remotely using388

communication with a central controller or locally using frequency measurementents.389

Currently, the DR programmes in progress are mainly limited to industrial loads but390

consumer participation is expected to be increasing in the near future (Torriti et al.,391

2010). Some consumer devices already exist in the market, which have the ability to392

react to price or other control signals in order to offer more optimized performance for393

all parties involved 1.394

Some practical issues with DR were not considered in this study. For example,395

when controlling consumer loads directly, the effect on customer satisfaction should396

be taken into account. However, as in this study the house thermal dynamics are slow397

compared to the simulation case duration, the effects of this kind of control should be398

1www.fortum.com/countries/fi/yksityisasiakkaat/energiansaasto/fortum-fiksu/info/pages/default.aspx

18

Page 19: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

negligible. From DR control perspective, further research would be required to study399

the limitations caused by a limited and varying amount of total controllable power and400

the possible effects of a postcontrol ”recovery peak”.401

6. Conclusion402

This paper presented an agent-based model that can be used for modeling frequency403

control scenarios in smart grid. The model is designed for reproducing system-level404

behaviors in the smart grid by implementing sufficiently accurate models of the relevant405

bottom-level behaviors. The main components of the model were presented and the406

function of the model was studied through four separate simulation case examples,407

where frequency control efficiency was studied after an unexpected power plant failure.408

The simulation model could be used to derive clear and understandable results that can409

be used to analyze of the control system under study. These results indicate that the410

proposed agent-based modeling approach is functional for modeling frequency control411

in the smart grid and could be expanded to include additional aspects of smart grid412

operation.413

In addition, the simulation study did not indicate that modern communication ar-414

chitectures would be a bottleneck for the implementation of virtual power plants that415

organize demand response, as even with realistic worst-case communication links, the416

grid frequency could be kept stable with acceptable transients. The sensitivity of the417

control was studied by running a large amount of repeated simulations with varying418

parameters, but no cases of instability were observed. Furthermore, the simulations419

indicated that fully decentralized demand response could be an even faster and more420

robust alternative to centrally controlled demand response. These results further indi-421

cate that demand response, especially if organized in decentralized manner, could be422

a viable alternative for providing primary control capabilities to the smart grid. Addi-423

tional research could be carried out by expanding the agent model to include the effects424

on the voltage of the grid, regarding line losses in a grid with more complex topology.425

Bhowmik, S., Tomsovic, K., Bose, A., 2004. Communication models for third party426

load frequency control. Power Systems, IEEE Transactions on 19, 543–548.427

19

Page 20: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Borshchev, A., Filippov, A., 2004. From system dynamics and discrete event to prac-428

tical agent based modeling: reasons, techniques, tools, in: Proceedings of the 22nd429

international conference of the system dynamics society.430

Bouhafs, F., Mackay, M., Merabti, M., 2012. Links to the future: Communication431

requirements and challenges in the smart grid. Power and Energy Magazine, IEEE432

10, 24–32. doi:10.1109/MPE.2011.943134.433

Callaway, D.S., Hiskens, I.A., 2011. Achieving controllability of electric loads. Pro-434

ceedings of the IEEE 99, 184–199.435

Conzelmann, G., Boyd, G., Koritarov, V., Veselka, T., 2005. Multi-agent power market436

simulation using EMCAS, in: Power Engineering Society General Meeting, 2005.437

IEEE, IEEE. pp. 2829–2834.438

Elovaara, J., Haarla, L., 2011. Electric Power Systems I: Technology and Computation.439

Otatieto. [In Finnish].440

ENTSO-E, 2012. Ten-year network development plan 2012. https:441

//www.entsoe.eu/fileadmin/user_upload/_library/SDC/TYNDP/2012/442

TYNDP_2012_report.pdf. Accessed: 2013-05-22.443

Fingrid, 2012. Justification for power limit of 1650 MW set in general444

terms of accession (YLE2013). http://www.emvi.fi/files/Fingrid%20Oyj%445

20perustelumuistio%20tehonmuutosrajalle%20YLE2013.pdf. Accessed:446

2013-05-22, In Finnish.447

Finnish Energy Industries and Fingrid Oy, 2012. How to add the power system flex-448

ibility. http://energia.fi/sites/default/files/mista_lisajoustoa_449

sahkojarjestelmaan_loppuraportti_28_11_2012.pdf. Accessed: 2013-05-450

22.451

Galus, M.D., Andersson, G., 2008. Demand management of grid connected plug-in452

hybrid electric vehicles (phev), in: Energy 2030 Conference, 2008. ENERGY 2008.453

IEEE, IEEE. pp. 1–8.454

20

Page 21: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Godfrey, T., Mullen, S., Dugan, R.C., Rodine, C., Griffith, D.W., Golmie, N., 2010.455

Modeling smart grid applications with co-simulation, in: Smart Grid Communica-456

tions (SmartGridComm), 2010 First IEEE International Conference on, IEEE. pp.457

291–296.458

Gungor, V., Sahin, D., Kocak, T., Ergut, S., Buccella, C., Cecati, C., Hancke, G.,459

2013. A survey on smart grid potential applications and communication require-460

ments. Industrial Informatics, IEEE Transactions on 9, 28–42. doi:10.1109/TII.461

2012.2218253.462

Gungor, V.C., Sahin, D., Kocak, T., Ergut, S., Buccella, C., Cecati, C., Hancke, G.P.,463

2011. Smart grid technologies: communication technologies and standards. Indus-464

trial Informatics, IEEE Transactions on 7, 529–539.465

Hopkinson, K., Wang, X., Giovanini, R., Thorp, J., Birman, K., Coury, D., 2006.466

EPOCHS: a platform for agent-based electric power and communication simulation467

built from commercial off-the-shelf components. Power Systems, IEEE Transactions468

on 21, 548–558. doi:10.1109/TPWRS.2006.873129.469

Karnouskos, S., De Holanda, T.N., 2009. Simulation of a smart grid city with soft-470

ware agents, in: Computer Modeling and Simulation, 2009. EMS’09. Third UKSim471

European Symposium on, IEEE. pp. 424–429.472

Kundur, P., Paserba, J., Ajjarapu, V., Andersson, G., Bose, A., Canizares, C., Hatziar-473

gyriou, N., Hill, D., Stankovic, A., Taylor, C., et al., 2004. Definition and classifi-474

cation of power system stability IEEE/CIGRE joint task force on stability terms and475

definitions. Power Systems, IEEE Transactions on 19, 1387–1401.476

Lin, H., Sambamoorthy, S., Shukla, S., Thorp, J., Mili, L., 2011. Power system and477

communication network co-simulation for smart grid applications, in: Innovative478

Smart Grid Technologies (ISGT), 2011 IEEE PES, IEEE. pp. 1–6.479

Liu, H., Chen, X., Yu, K., Hou, Y., 2012. The control and analysis of self-healing urban480

power grid. Smart Grid, IEEE Transactions on 3, 1119–1129.481

21

Page 22: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Lu, X., Wang, W., Ma, J., 2013. An empirical study of communication infrastructures482

towards the smart grid: Design, implementation, and evaluation. Smart Grid, IEEE483

Transactions on 4, 170–183. doi:10.1109/TSG.2012.2225453.484

Macal, C., North, M., 2010. Tutorial on agent-based modelling and simulation. Journal485

of Simulation 4, 151–162.486

Mets, K., Verschueren, T., Develder, C., Vandoorn, T.L., Vandevelde, L., 2011. Inte-487

grated simulation of power and communication networks for smart grid applications,488

in: Computer Aided Modeling and Design of Communication Links and Networks489

(CAMAD), 2011 IEEE 16th International Workshop on, IEEE. pp. 61–65.490

Miller, J.H., Page, S.E., 2010. Complex Adaptive Systems: An Introduction to Compu-491

tational Models of Social Life: An Introduction to Computational Models of Social492

Life. Princeton University Press.493

Molina-Garcıa, A., Bouffard, F., Kirschen, D.S., 2011. Decentralized demand-side494

contribution to primary frequency control. Power Systems, IEEE Transactions on495

26, 411–419.496

Mortensen, R., Haggerty, K., 1988. A stochastic computer model for heating and497

cooling loads. Power Systems, IEEE Transactions on 3, 1213–1219.498

Moslehi, K., Kumar, R., 2010. A reliability perspective of the smart grid. Smart Grid,499

IEEE Transactions on 1, 57–64.500

Nutaro, J., Kuruganti, P., Shankar, M., Miller, L., Mullen, S., 2008. Integrated model-501

ing of the electric grid, communications, and control. International Journal of Energy502

Sector Management 2, 420–438.503

Ramchurn, S.D., Vytelingum, P., Rogers, A., Jennings, N., 2011. Agent-based control504

for decentralised demand side management in the smart grid, in: The 10th Interna-505

tional Conference on Autonomous Agents and Multiagent Systems-Volume 1, Inter-506

national Foundation for Autonomous Agents and Multiagent Systems. pp. 5–12.507

22

Page 23: Agent-based Modeling and Simulation of Smart Grid: a Case Study … · 2016. 2. 29. · Agent-based Modeling and Simulation of Smart Grid: a Case Study of Communication E ects on

Rebours, Y.G., Kirschen, D.S., Trotignon, M., Rossignol, S., 2007. A survey of fre-508

quency and voltage control ancillary services - part I: Technical features. Power509

Systems, IEEE Transactions on 22, 350–357.510

Shimizu, K., Masuta, T., Ota, Y., Yokoyama, A., 2010. Load frequency control in511

power system using vehicle-to-grid system considering the customer convenience of512

electric vehicles, in: Power System Technology (POWERCON), 2010 International513

Conference on, IEEE. pp. 1–8.514

Torriti, J., Hassan, M.G., Leach, M., 2010. Demand response experience in europe:515

Policies, programmes and implementation. Energy 35, 1575–1583.516

UCTE, 2004. UCTE operation handbook - Appendix 1: Load-frequency control and517

perfomance. https://www.entsoe.eu/fileadmin/user_upload/_library/518

publications/entsoe/Operation_Handbook/Policy_1_Appendix%20_519

final.pdf. Accessed: 2013-05-22.520

US Department of Energy, 2010. Smart grid communications requirements521

report. http://www.smartgrid.gov/sites/default/files/Smart_Grid_522

Communications_Requirements_Report_10-05-2010.pdf. Accessed: 2013-523

05-22.524

Wang, X., Yi, P., 2011. Security framework for wireless communications in smart525

distribution grid. Smart Grid, IEEE Transactions on 2, 809–818. doi:10.1109/526

TSG.2011.2167354.527

Weidlich, A., Veit, D., 2008. A critical survey of agent-based wholesale electricity528

market models. Energy Economics 30, 1728–1759.529

Zaballos, A., Vallejo, A., Selga, J., 2011. Heterogeneous communication architecture530

for the smart grid. Network, IEEE 25, 30–37. doi:10.1109/MNET.2011.6033033.531

Zhou, Z., Zhao, F., Wang, J., 2011. Agent-based electricity market simulation with532

demand response from commercial buildings. Smart Grid, IEEE Transactions on 2,533

580–588.534

23