Keywords

1 Introduction

The power grid is evolving to a new generation called “Smart-Grid” which introduces several technologies such as ICT to guarantee reliability, demand management, storage, distribution and transport of electrical energy [1, 2]. Smart-grid is expected to incorporate distributed renewable resources such as wind or solar energy to offer a greener solution compared to traditional energy sources such as fossil. Although renewable energy is inexhaustible, it is however intermittent and irregular which makes it difficult to balance supply and demand. In this context and facing to the necessity of integration of renewable sources, energy management algorithms are of great importance to meet energy needs, to minimize energy loss and to reduce consumers’ energy bill.

The term “energy management” is defined as the essential functions needed to increase energy efficiency and to optimally coordinate several energy sources. It is the process of observing, controlling and conserving electricity usage in a building, a neighborhood, etc. It should find a solution that optimizes costs and minimizes the risk of loss of production excess.

In the other hand, in certain hours of the day or periods of the year the produced energy can exceed the consumption needs. This energy excess justifies the use of a storage system that allows short-term balance [3].

To be able to make intelligent decisions about energy management a multi-agent approach has been used by several researchers. Because of its distributed nature, a multi-agent system (MAS) represents an excellent tool for self control in widely distributed systems whose characteristics are very dynamic [4]. In this paper, we propose a negotiation algorithm to help consumer choose the appropriate producer that provides the energy he needs at the lowest price.

The remainder of the paper is organized as follows. In Sect. 2, we describe some of the existing approaches that are related to our work. We present in Sect. 3 our proposal and we explain our model and its characteristics, the agents’ algorithms and the chosen scenarios. We describe in Sect. 4 the simulation results. We conclude our paper and give the future research directions in the Sect. 5.

2 Related Work

Several researchers have paid attention to the use of multi-agent systems and/or storage systems for energy management in smart-grids or microgrids. Microgrids can be defined as a cluster of energy sources, fuel cells and load serviced by a distributed system which may be integrated to the main grid or can be operated as a standalone system.

Some approaches have used storage systems in order to help in smart-grid energy management [5, 6] while others introduced storage systems and microgids in order to enable an electricity market for the operation of a microgrid in both islanded and grid-connected modes [7]. Furthermore, an algorithm for energy management in smart-grid using a multi-agent system was proposed by Nagata et al. [8]. In this algorithm, there is a smart-grid controller unit that aims to negotiate and optimize the buying prices for consumers. This energy management algorithm aims to reduce the energy costs. Colson et al. [9] proposed an energy management algorithm for microgrid, using an MAS. In this algorithm, consumer agents use negotiation to get the energy at the lowest price. Finally, an agent-based approach was proposed in [10]. In this work, the authors proposed an agent-based algorithm allowing more efficient use of energy while minimizing cost and taking into account the integration of distributed renewable energy resources.

Some approaches summarized in this section have a common drawback which is lack of the integration of a storage system [810]. The approach proposed in [7] uses a storage system but without introducing intelligence to the storage management. In addition, the approaches presented in [5, 6] consider only storage agents in their system. In our proposed approach which will be explained in the following section, we aim to ensure energy demand to consumers at the lowest price by introducing a storage system and negotiation algorithms.

3 ANEMAS: The Proposed Approach

This section describes our proposal “ANEMAS” (Agent-based eNErgy MAnagement in Smart-grids) which aims to resolve the problem of generation intermittency and to optimize in real time the consumer bill by integrating a storage system and using multi-agent algorithms (including negotiation).

3.1 The Proposed Multi-agent Model

The Agents are integrated in the different components of the smart-grid. They must control generation, load, and storage assets primarily from the standpoint of power flows. In our proposal, we define four agents:

  1. 1.

    Grid Agent: satisfies the energy lack and buys the excess of energy produced.

  2. 2.

    Storage Agent: controls the energy storage and are introduced in batteries.

  3. 3.

    Prosumer Agent: controls the distribution of the energy he produces.

  4. 4.

    Consumption Agent: negotiates the energy purchase with other consumers and prosumers.

The energy management system in our approach is divided into two layers: the proactive layer and the reactive layer. The proactive layer is responsible for the prediction of energy production and consumption. We choose the period as \(\varDelta \)t = 24 h. In this layer, the predicted values of consumption and production are those adopted by EDF (Electicité de France) and defined in [11]. The reactive layer is responsible for planning and negotiating consumption at shorter periods \(\varDelta \mathrm{t}^{\prime }\) = 1 h [10] and helps to buy energy with a minimal cost.

A priority P will be assigned for each user demand according to the user’s preferences and the required quantity of energy. A demand’s priority can be High, Medium, or Low, and the energy grid prices, at each period, are fixed by the grid. The agent satisfies the highest priority demands at the beginning, then it will satisfy the medium priority demands and finally the lowest priority ones. The agent can delay the medium priority for a given time, that we call Medium Delay (MD), and the low priority for a Low Delay (LD), such as \(LD>MD\). Moreover, the consumption periods are divided during the day as follows: the Off-Peak period (OP), the Low-Peak period (LP) and the High-Peak period (HP). In the Off-Peak period, the energy use and the cost are minimal while in the Low-Peak period, the energy consumption and the purchase of energy start to increase. Finally, in the High-Peak period, the energy use reaches its maximum and the purchase price of energy becomes very high [10].

Within the constraints listed above, an algorithm is proposed for each agent for the purpose of energy management.

3.2 Agents Algorithms

Each agent has its own algorithm that we will describe in the following.

Grid Agent

The grid agent provides the lack of energy to consumers when the production of renewable energy does not meet their demands. Furthermore, in case of an excess of production, this agent can arrange to purchase energy in excess. This agent receives requests from consumers to meet the demands unsatisfied by the renewable resources and from producers to sell him their excess.

Storage Agent

The storage agent is responsible for providing energy to consumers during peak hours or in case of lack of energy. In case of production excess, these agents store energy. This stored energy may be used later in order to reduce energy cost. The storage agent has to respect multiple constraints, presented hereafter, concerning the amount of energy to store in order to meet the users needs:

  • \(SOC_{min}\): minimum state of charge.

  • \(SOC_{max}\): maximum state of charge.

  • \(PR\): grid price.

  • \(PR_{min}\): minimum grid price.

  • Peak = sum of peak demands predicted for all consumers.

  • SOC(t) = instantaneous state of battery charge.

  • \(D_j\) = requested demand for period j.

  • \(RE_j\) = renewable energy produced on period j.

  • \(EN_{st}\) = energy to be stored.

  • \(tpeak\) = time corresponding to the maximum consumption during a day.

The steps of the storage agent algorithm are presented in the Algorithm 1. In Table 1, we show an example to explain how we calculate \( EN_{st}\). We suppose that \(Peak-SOC(tpeak)-RE_{tpeak}=Peak-\sum _{j=0}^{tpeak-1} (RE_j-D_j)-RE_{tpeak}\) and we consider that at period 0 the energy price is minimal so the storage agent will calculate the energy to store. For sake of clarity, we will present only 3 periods. As shown in the example, the High-peak period is the period 1. Normally, the battery should store the lack of energy that can occur, which is 3 in this example but in the peak period the consumers may have a lack of energy that the storage cannot satisfy. In this period (High-peak) the demand may be greater than the total lack, in this example it is 5 which is greater than 3 so the storage system should store 5 KW (max(5,3)) at period 0.

figure a
Table 1. Example of \(EN_{st}\)

Consumption Agent

We consider that consumption agents are deployed in smart homes. At each period, the consumption agent divides its demands into three priorities: (1) the priority 1 is the higher priority and its demands should not be delayed or dropped, (2) the priority 2 is the medium priority and its demands can be delayed for a short time, (3) and finally the priority 3 is the lowest one and its needs can be delayed for a time higher than the delay time for the priority 2. The activities with priority 2 or 3 can be delayed without causing any inconvenience. The priority 2 activities delay is called Medium Delay (MD) and the priority 3 activities delay is called Low Delay (LD). The MD and the LD will be chosen so that the consumer does not lose in comfort. In other words, the MD and the LD have a maximum that will be selected so that the activity will be satisfied. This maximum will be set by the system administrator.

Case 1: Decision for Highest Priority Data. Data with Priority 1 are satisfied at the beginning. The consumption agent negotiates the purchase of renewable energy (Fig. 1, (1)) by using the negotiation strategy explained below:

  1. 1.

    Consumption agent receives at each period the production and the consumption data from each prosumer and consumption agent.

  2. 2.

    Consumption agent j calculates the utility function f(j) defined in the Algorithm 2 Where:

    figure b
    • f(j)= utility funtion for agent j.

    • NbProsumers = prosumers total number.

    • NbConsumers = prosumers total number.

    • \(P_{ji}\) = priority that increases if the resource is closer to the consumer, we consider \(P_{ii}=1\) and \(P_{ij}=P_{ji}\).

    • \(E_{ji}\) = maximum energy that can be bought from prosumer i to consumer j.

    • \(C_{ji}\) = renewable energy cost, we consider \(C_{ii}=0\).

  3. 3.

    Consumption agent sends its proposition to all consumption agents.

  4. 4.

    When consumption agent receives all the proposals, it chooses the one with the highest utility function and purchases energy according to this proposal.

When the negotiation ends (Fig. 1, (2)), and after buying energy from the renewable resources, the consumer agent follows these steps:

  • If there is a demand that cannot be satisfied by renewable resources (Fig. 1, (3)), then the consumption agent compares the storage cost and the grid cost to choose the minimum between them (Fig. 1, (5)).

  • If the grid has the minimum cost and can provide energy (Fig. 1, (7)) a request will be sent to the grid (Fig. 1, (8)).

  • If the storage cost is less than the grid cost and the available storage energy can meet the demands (Fig. 1, (5)), so a request will be sent to the storage system to satisfy user demands (Fig. 1, (6)).

  • If the grid and the storage cannot satisfy the demands so the activity will be dropped (Fig. 1, (10)). In fact, this situation is very rare and should be avoided.

Case 2: Decision for Medium or Low Priority Data. Data with Priority 2 or 3 are satisfied after the data with priority 1. In this case, if the grid and the storage cannot satisfy the demands, so the activity will be delayed for MD for priority 2 demands and for LD for priority 3 demands (Fig. 1, (12)). This activity will be dropped if the maximum which is 1 h for priority 2 and 3 h for priority 3 of delayed periods is reached (Fig. 1, (10)).

Fig. 1.
figure 1

Consumption agent algorithm

Prosumer Agent

Prosumer agents are introduced in production units renewable (photovoltaics, wind turbines, etc.). For each period i, the prosumer agent aims to satisfy firstly its demands, and if the energy it produced exceeds its needs, it will satisfy other consumers demands and buy the energy to the grid or to the storage system. The steps of the prosumer agent algorithm is presented in the Algorithm 3.

figure c

3.3 Description of the Considered Scenarios

We choose to implement in our system an agent for the grid, an agent for each consumer, an agent for the storage system and an agent for each prosumer. For our simulation, we consider two scenarios. Table 2 presents the chosen scenarios.

Table 2. Considered scenarios

The Scenario 1 is a simplified one with 1 grid agent, 2 consumer agents, 3 prosumer agents and 1 storage agent that has a large charge state to serve all the system. Some complexity is introduced in scenario 2 to test the performance of our proposal when we increase agents number. This scenario has 1 grid agent, 3 consumer agents, 7 prosumer agents and 1 storage agent that has a large charge state to serve all the system. Simulation results are presented in the following section.

4 ANEMAS Performance Evaluation

In order to evaluate the performance of our scheme, we simulate the agent behaviors with JADE (Java Agent Development Framework) [12]. It is one of the most popular MAS simulators used for the development of distributed applications.

4.1 Simulation Parameters

The consumption periods during the day are splitted into: the Off-Peak period (OP), the Low-Peak period (LP) and the High-Peak period (HP). Moreover, the day is divided into 24 periods and grid prices vary between 10 cents and 22 cents and wind turbine energy (our renewable energy) prices vary between 14 cents and 7 cents [11]. The peak hours are represented in Table 3.

Table 3. Day peak
Fig. 2.
figure 2

Consumer bills for Scenario 1

Fig. 3.
figure 3

Resources use for ANEMAS (Scenario 1)

4.2 Results

After showing the different scenarios that can take place in a negotiation for energy purchase, the efficiency of ANEMAS will be shown by comparing it to a typical billing scheme used in most electric power systems where some or all consumers pay a fixed price per unit of electricity independently of the cost of production at the time of consumption, this scheme is referred Conventional-case in the following. In addition, we compare our algorithm to a system that uses the renewable resources but do not use storage systems, the scheme used in this case is called RE-case.

Firstly, we illustrate the simulation results for one day of operation. The first simulation test is carried out by using scenario 1 and the results are given in Figs. 2 and 3. Figure 2 shows consumers buying prices with the three defined schemes. During the day, the reduction in consumer bills is caused by the use of renewable energy or by the use of renewable energy and storage systems. During Off-Peak hours the reduction of cost is very high, it is more than 90 % by using ANEMAS and more than 60 % by using only renewable resources in comparison to conventional-case. This reduction decreases and reaches 75 % by using ANEMAS in the period of High-Peak (period 21), whereas during this period the decrease in RE-case is 16 %. In both cases (ANEMAS and RE-case), there is no more cost reduction at periods 22 and 23. The decrease in bills is due to the use of renewable resources for RE-case. Increased demand and decreased production cause the decrease in the percentage of price reduction in Low-peak and High-peak hours. Therefore by switching from Off-Peak to the High-Peak, consumer bills increase to reach the grid costs. In addition, we notice that, by using ANEMAS, the costs are less than costs in RE-case. This reduction is due to the use of storage systems with renewable resources, buying stored energy when costs are low, reducing access to the grid and serving the users with a minimal cost even during HP periods (period 21 for example).

Fig. 4.
figure 4

Consumer bills Scenario 2

Fig. 5.
figure 5

Resources use for ANEMAS (Scenario 2)

Figure 3 shows the use of all resources during the day by ANEMAS. Our algorithm does not use the grid during Off-Peak and Low-Peak periods (grid use is equal to zero). It uses the renewable resources and if these resources do not meet all the demands, it uses the storage. The storage use increases and will be higher than the renewable resources use at period 15, this is caused by the consumption increase and the production decrease at these periods. Furthermore, the use of the grid increases in High-Peak hours and after period 21 the storage use is equal to 0 and the grid use increases. This change is due to the storage charge which reached its minimal value during High-Peak hours.

The results for scenario 2 are shown in Figs. 4 and 5 respectively. When we analyze the results shown in these two figures we can conclude that these results have not much differences from the results of Scenario 1. Figure 4 gives the consumers bill for scenario 2, and shows that minimization of costs is the same as that in scenario 1 in both cases (ANEMAS and RE-case). In High-Peak (period 21), the cost minimization reaches 75 % for ANEMAS and 16 % for RE-case.

Furthermore, resources use shown in Fig. 5 demonstrates that the use of the grid increases in high-peak (period 21) when we use our algorithm (Fig. 5).

These results of our proposed algorithm ANEMAS show that when the number of consumers increases, the cost reduction and the grid use remain the same.

5 Conclusion

Introducing renewable energy sources into smart-grids has some inconvenience due to the weather and time dependencies. The use of energy storage systems and multi-agent approach are good solutions to ensure the energy management, to reduce the consumers’ bills and to minimize the access to the grid. Our proposal introduces four agent types into the system: the grid agent, the storage agent, the prosumer agent and the consumption agent. It aims to lead to more responsible energy consumption while establishing lower contract prices. After simulating the proposed approach using JADE, we noticed that the use of a storage system reduces the energy cost and the grid utilization which will reduce the \(CO_2 \) emissions. As a future work we plan to consider more storage systems which may be in competition. Furthermore, we will compare our approach with other approaches in the literature and will study other negotiation algorithms.