Keywords

1 Introduction

The proliferation of Distributed Energy Resources (DER) [1] leads to a change of the energy consumers’ role, moving from passive consumers to active “prosumers”, i.e. being also able to generate power on site and to manage their surplus, feeding it to the grid or storing it for later usage. Moreover, the increasing number of electric vehicles will have a profound impact on the power system, since storage systems, grid-to-vehicle and vehicle-to-grid features will offer tools that ease the loads management and improve the control of the market pricing. As prosumers become more and more independent, the unidirectional power system will be replaced by a prosumer-dominated system where power will be primarily exchanged locally between prosumers in a bidirectional way. This supports the appearance and operation of small portion of distribution networks called micro-grids. A micro-grid is a small-scale power system comprising DERs and suitable control systems able to work in both grid-connected and islanded operating modes [2]. Islanded, or stand-alone (besides the forced islanding in case of failure of the main utility), are used in case of unavailability to connect the main utility due to financial or geographical reasons. These stand-alone micro-grids tend to rely mainly on Renewable Energy Sources (RES) turning them into a complex and difficult system to predict and control, which require intelligent control and management systems to turn these complex systems as reliable and efficient as possible. In particular, this problem arises in case of unpredicted underproduction events (due to production device failure or unpredicted weather event) where it is necessary to improve the self-sustainability of a micro-grid working in isolated mode.

Emergent ICT technologies and paradigms, and particularly multi-agent systems (MAS) and holonic systems, are being adopted in several domains of smart grids field due to their capabilities to offer modularity, flexibility, robustness, scalability and re-configurability. Different approaches reported in the literature show the benefits of decentralized structures and particularly holonic principles to address the challenges imposed by the smart grids being mainly centred in answering the problems of power scheduling and structural smart grid organization (surveys of several applications can be found in [1, 3]). However, these approaches do not explore important aspects, namely the self-sustainability in stand-alone micro-grids, where a tighter control of the available resources and enhanced cooperation among entities is needed.

Having this in mind, the paper proposes a holonic architecture addressing the self-sustainability in micro-grids that operate disconnected from the main utility grid, being focused the formal specification of the structural and behavioural models of the ecosystem holons, as well as the associated coordination models. The Petri nets formalism [4] is used taking advantage of its powerful mathematical foundation to model, analyse and validate the behaviour of complex event-driven systems.

The rest of the paper is organized as follows: Sect. 2 describes the main guidelines of the proposed holonic system architecture for the self-sustainability in stand-alone micro-grids. Section 3 discusses the formal modelling of the holonic system by using the Petri nets formalism, and Sect. 4 presents the coordination models among distributed holons. Section 5 describes the validation of the designed holons’ behaviour models, namely by performing a qualitative and quantitative analysis using the PnDK tool. Finally, Sect. 6 rounds up the paper with the conclusions.

2 Holonic System Architecture for Micro-grid Self-sustainability

The proposed holonic architecture is based upon a set of autonomous and cooperative holons that share resources and responsibilities in order to achieve self-sustainability within the stand-alone micro-grid with the lowest degradation of the user QoS. Each holon represents an autonomous electrical entity, such as producer units (e.g., photovoltaic panel or wind turbine), storage units (e.g., battery bank) and controllable loads (e.g., refrigerator and lamps). Three types of holons where identified, namely Consumer Holon (CH), Producer Holon (PH) and Storage Holon (SH), with each one owing a specific role, proper knowledge and a set of functionalities.

CHs are responsible to manage the controllable loads, ensuring that the delivery of power is performed according to the consumer needs. This type of holon also implements scheduling and prioritization functions that assume particular relevance when the available power is below the load demand. PHs are responsible to ensure a stable power supply, executing power production forecasting and condition health monitoring functions. SHs are responsible to ensure a stable grid absorbing production surplus and to provide power in under-production periods.

The use of holonic principles takes advantages of the distributed nature of this paradigm, and their intrinsic provided features, namely in terms of modularity, flexibility and robustness. Additionally, the recursive property, inherent to holonic systems, allows simplifying the design of such complex large-scale systems. In fact, a single holon can comprise several others in a recursive and fractal manner: as example, a micro-grid holon can comprise multiple holons (e.g., house holons and producers), with each house holon comprising, in a recursive manner, multiple loads (i.e. CHs), producers (i.e. PHs), and storage elements (i.e. SHs). Additionally, a cluster of micro-grid holons can be aggregated forming a larger micro-grid holarchy.

The micro-grid control applications based on this holonic approach are usually complex, due to their distributed nature, making them difficult to understand even when using high levels of abstraction. The design of complex systems, as micro-grids are, requires the formal modelling and validation of the system behaviour, guaranteeing the system correctness and the detection of malfunctions and misunderstandings earlier during the design phase.

3 Modelling the Holons’ Behaviour

The holonic system architecture distributes control functions by several autonomous and cooperative holons. The behaviour of each individual holon is formally specified by using the Petri nets formalism [4, 5], which, based in its powerful mathematical foundation, allows to analyse, validate and verify the behaviour of complex event-driven systems exhibiting parallelism, concurrency, synchronization and resource sharing.

3.1 Behaviour Model of the Producer Holon

PHs represent the resources producing energy, their behaviour model being illustrated in Fig. 1. The initialization procedure, represented by the transition t2, comprises the actions related to loading the holon’s profile, registering its skills in the yellow pages service and creating its local database. This procedure is similar to other holons.

Fig. 1
figure 1

Petri nets model for the PH

In normal operation, PH is continuously monitoring the status of its connected devices (periodically triggered or when an event occurs, e.g., a condition change in the device). This monitoring sub-behaviour comprises a direct access to the physical device to gather production data (represented by t5), such as the instantaneous production power and meteorological parameters (e.g., temperature, irradiation and wind speed according to the type of production device). The historical and current production data is deeply and online analysed (represented by t6) to extract valuable knowledge, e.g., to detect deviations and patterns, namely the detection of anomalies in the device operation (underproduction due to cell damage or bad panel orientation, and detection of surplus in the energy production). For this purpose, data mining algorithms are used.

Forecasting algorithms (represented by t9) are running in parallel to predict the future production of energy (particularly important for RES), anticipating the occurrence of under-production/over-production events. The generation of these unexpected events will trigger the implementation of proper actions to mitigate the possible undesirable impacts, e.g., storing the energy surplus through a proper negotiation process. The result of this activity also affects the power scheduling process (represented by t10).

Also in parallel, the holon is continuously waiting for requests from CH, related to the power delivery availability that starts a negotiation process (t17), and the power supply cancel that triggers a re-scheduling process (t18) aiming to relocate the power elsewhere. In case of a surplus detection (t12), a negotiation process to store the surplus is initiated (t13); in case the storage devices are unavailable, the power dissipation process is started (t15). The sub-behaviour control function handles the switch on/off of the production device, which depends of the inputs from other sub-behaviors, ensuring a proper physical connection/disconnection (t20).

3.2 Behaviour Model of the Consumer Holon

The Petri nets behaviour model for the CH, which represents the controllable loads, is illustrated in Fig. 2.

Fig. 2
figure 2

Petri nets model for the CH

After the initialization process, similar to the one described for PH, four sub-behaviours are launched to run in parallel: one related to the monitoring process, another to the power acquisition and handling process, another related to load forecast scheduling, prioritization and shedding, and the last one related to the physical control. In the first one the holon monitors the status of the controllable loads and their instantaneous power consumption. As in the PH, the historical and current data is analysed (t6) in order to detect unexpected events, e.g., unexpected consumption profiles.

In the second sub-behaviour, triggered periodically or due to an external event detected in the monitoring process, the load demand is initially forecasted (t9) and then prioritized (t10), being necessary to ensure that the critical loads need to be attended first, and others can be turned-off. The prioritization process is modelled in detail by the Petri nets model illustrated in Fig. 3, where the influence of the production and storage levels as well as the usability of each load are considered. The usability level ensures that no load that is being used or will be used in the near future will be down prioritized, making it highly eligible for the shedding or the scheduling process.

Fig. 3
figure 3

Petri net model for the prioritization timed transition

The load scheduling, represented by transition t11, tries to shift the non-priority loads to less crowded and less expensive periods, enabling a better distribution of the loads over the time and leading to a better load balance and cost savings. In case of under-supply situations or over-consumption of non-critical loads, a shedding process (t12) is implemented aiming to reduce power consumption of un-priority loads and parasite consumptions, such as equipment in stand-by mode. In parallel, the negotiation process between CH and PHs and SHs (t18) is performed, taking into consideration the load demand after prioritization, scheduling and shedding processes. The physical control, held in t22, handles the loads’ switch on/off, as well as the diming power adjustment according to the scheduling and shedding processes.

3.3 Behaviour Model of the Storage Holon

SHs represent storage devices, e.g., battery banks and electric vehicles; its behaviour model is illustrated in Fig. 4. This holon assumes a strategic role in the micro-grid system as it handles the storage of the energy surplus and the supply of energy in empty production time windows, managing the fluctuations of power within the micro-grid.

Fig. 4
figure 4

Petri nets model for the SH

The forecasting takes place in transition t9 ensuring a proper forecast of the battery levels enabling a better fitment of charging and discharging. The scheduling, represented in transition t10, is responsible to schedule the charging and discharging cycles to maximize the available energy and battery life. At last, the physical control sub-behaviour (t19) is responsible to manage the battery’s charge and discharge cycles.

4 Coordination Models

In such distributed systems, the global system operation emerges from the interaction among the individual autonomous entities, which share their knowledge and skills aiming to reach the global system objectives. In this case, the interaction is performed by synchronizing the individual Petri net models described previously. In the literature, several methods can be found to handle these kind of interactions namely MUTEX (Mutual Exclusion Object), Queue Theory, Mailbox and Rendezvous [6]. In this work, the synchronization of the evolution of each Petri net model uses places playing the role of Mailboxes. Figure 5 illustrates the coordination model between a CH a PH that are interacting during the negotiation process for energy acquisition.

Fig. 5
figure 5

Coordination of individual models of PH and CHs during the negotiation process

During this process, the CH sends a message requesting energy to the PH (indicating the requested amount of energy and the baseline conditions). For this purpose, the place pb1 is marked, enabling the transition t16 in the PH model. When fired, the request is analysed and a proposal is elaborated and sent to the CH by marking the place pb2.

The timed transitions t18.3 and t17.1 of CH and PH, respectively, model the step-by-step analysis of the proposals and comprise the context aware adaptation as well as learning mechanisms that allows the holons to adapt the negotiation conditions. The negotiation process is finished when PH sends an “end”/“refuse” message, which triggers the scheduling update in each holon. Similar coordination models where developed for other interaction patterns representing cooperation and collaboration processes.

5 Validating the Holon Behaviours’ Models

The validation of the behaviour of the holonic system was performed through the analysis and simulation of the behavioural models of each individual designed holon, using the Petri net Development toolkit (PnDK) [7]. Initially, the described Petri nets models and sub-models for each holon were edited in the PnDK tool, being ready to be validated through qualitative and quantitative analysis.

5.1 Qualitative Analysis

The qualitative analysis enables the verification of both structural and behavioural properties of the model, allowing observing the system’s operation by analyzing the existence of deadlocks, the structural and behavioural conflicts and the capacity of resources.

Figure 6 illustrates the result of the behavioural analysis for the consumer holon model. The behavioural properties analysis was supported by the linear algebra methods provided by the PnDK software tool.

Fig. 6
figure 6

Behavioural analysis of consumer holon model

This analysis allows verifying that the model is:

  • Bounded, i.e. any place holds a maximum of 1 token.

  • Safe, i.e. all places hold at maximum 1 token.

  • Conservative, i.e. the number of tokens is constant for all marking, which means that no resources are added or removed during the holon’s life-cycle.

  • Deadlocks-absent, i.e. no matter what marking was reached from the initial marking, there is always a possibility to fire a transition to change to another state.

The invariants analysis, extracted from the incidence matrix, provide more valuable information about the model. The place invariants analysis allows verifying mutual exclusion relationships among places, functions and resources involved in the structure and behaviour of the holon. For example, the invariants x1 = {p1, p2, p3, p4, p5, p6, p7}, x2 = {p8, p9, p10, p11, p12, p13, p14} and x3 = {p19, p20}, confirm that during the execution of each sub-behaviour, only one of the places/functions can be simultaneously marked. Transition invariants represent the several sequences of operations exhibited by the behaviour model. The existing invariants have the following physical meaning (note that invariants that are linear dependent are not considered):

  • y1 = {t1, t2 t3, t23} represents the initialization and conclusion cycle.

  • y2 = {t4, t5, t6, t7} represents the acquisition, analysis and monitoring of data cycle.

  • y5 = {t8, t9, t10, t11, t12, t14, t15} represents the load prioritization and scheduling.

  • y6 = {t21, t22} represents the cycle related to the physical control of the loads.

As previously described, this model comprises several timed transitions (representing the execution of time consuming actions), each one being exploded into a more detailed Petri nets sub-model. According to the Vallete theorem [8], if all sub-Petri nets models of a larger Petri nets are absent of deadlocks and bounded, then the larger Petri nets model is also bounded and absent of deadlocks. Having this in mind, besides the validation of the Petri nets models for the three holons, all sub-Petri nets models for the timed transitions were validated to ensure the correctness of the holons’ behaviour.

5.2 Quantitative Analysis

The quantitative analysis allows performing an evaluation of the performance, responsiveness and resource utilization, requiring introducing time parameters associated to each transition. For the CH model, it comprises 12 logic transitions (representing the execution of non-time consuming actions), namely t23, t1, t3, t4, t7, t8, t13, t15, t16, t17, t20 and t21 with an estimated time of 1 t.u. (time unit) per transition. Regarding the timed transitions, some functions need more time to be executed and other less time to be executed. In this way, transitions t6, t9, t10, t11, t14 and t18 have associated 5 t.u., and the transitions t5, t19 and t22 have associated 2 t.u. Aiming to simulate the Petri nets model and observe the evolution of the tokens over the time, a token-game simulation was used, allowing to identify important characteristics of the holon’s behaviour, such as bottlenecks, cyclic evolution and potential conflicts. The retrieved information contributes to improve the system performance.

The above described analysis has been repeated for the Petri nets models of the three individual holons, ensuring a proper evaluation of the system performance. Coordination models representing the interaction protocols among the holons were also validated to achieve a complete computational model ready to be deployed.

6 Conclusions

An intelligent and adaptive control must be performed to guarantee that a micro-grid is operating with quality of service with low energy resources, especially when operating disconnected from the main utility. Therefore, this paper describes the formal specification of a holonic system that is able to perform automation control functions in electrical stand-alone micro-grids, particularly aiming to improve their self-sustainability. For this purpose, the Petri nets formalism was used to model, validate and simulate the behaviour of the different designed holons. The validation of the structural and behavioural properties, and posterior simulation of the holons’ models, allowed evaluating the correctness of the system behaviour.

Future work will be focused on the specification of appropriate functions to be embedded in the holons, namely forecasting, prioritization, scheduling and shedding, and lately its implementation using a MAS development framework, e.g., JADE [9].