A Proposal for a Multi-Agent based Synchronization Method for Distributed Generators in Micro-Grid Systems

A synchronization technique based on the Multi-Agent Systems approach, is proposed for a group of Distributed Generators belonging to a Micro-Grid. The Average Time Synchronization consensus algorithm is used. A detailed description of system’s hardware architecture is given and several simulations of the dynamic are performed. Since the synchronization take place on a dedicated layer, different from the power grid one, the proposed technique does not require voltage and current measurements. This gives scalable, flexible and resilient characteristics to the system by construction.


Introduction
Until the advent of distributed generation, electric power grids were conceived as hierarchical systems, with few large electrical power plants (hundreds MVA), the large majority of which are electromechanical generators driven by heat-engines fueled by chemical combustion or nuclear fission, transmission and distribution lines and, at bottom level, a huge number of passive loads [1].With such a philosophy, the energy flow is unidirectional, the control of the whole grid is centralized and the whole system including power plants, transmission lines, substations and distribution lines is coordinated by a Supervisory Control and Data Acquisition (SCADA) system [2,3].The potential difficulties and the limits imposed by such configuration, could lead to face catastrophic situations in case of large scale power blackouts [4,5].
Distributed generation is based on a different approach: a huge amount of power plants, ranging from few kW up to MW and scattered on the territory, are directly connected with distribution lines, thus producing energy close to customers.In some circumstances, customers themselves produce energy, which is injected in the grid and sold to other customers through Distribution System Operators (DSO) [6,7].The high number and the different power level of Distributed Generators (DGs), lead to face several power grid interface problems.The huge number and the different power level of the available generators and energy fluctuations caused by, for example, intrinsic nature of renewable energy sources, lead to face several power grid interface problems.Voltage and currents produced by power plants must primarily satisfy strict requirements in terms of amplitude, frequency, phase and quality of waveform, which is expected to be pure sinusoidal.Total Harmonic Distortion (THD) and more in general Power Quality (PQ) requirements must be strictly ensured.This result can only be achieved using power converters, i.e. electronic interfaces inserted between distributed generators and power grid with the purpose of making the produced energy as much as possible similar to the one already available in the grid [8].
However, power electronics alone is not sufficient for full and efficient integration of DGs within the grid and a complex Information and Communication Technology (ICT) infrastructure is required, leading to the concept of Smart Grid (SG) [9].In SGs, the power grid layer necessary to sustain energy flows, is now parallelized with an information and communication layer, necessary for exchanging real time processing P. Giammatteo, C. Buccella, C. Cecati data among generators, distribution chain nodes and customers [10,11].A decentralized architecture can be then obtained consisting of a number of interconnected Micro-Grids (MGs) [12,13], including generators, loads and storage systems (SSs).Power and real-time informations flow across two separate layers in both ahead and astern, without any fixed direction.The resulting two networks (power grid and information network) could be distinct from a virtual level point of view, but they may insist either on the same physical infrastructure, as in the case of Power Line Communications (PLCs) [14], or on two different and dedicated physical media.
Many contributions to the decentralization of the power grid and its control, were presented, and different software architectures and paradigms were proposed, in order to define specific standards for the SG, necessary for avoiding proliferation of abnormal situations too difficult to be managed.The Multi-Agent Systems (MASs) approach, already exploited in industrial and scientific domain, is an example of these paradigms.An agent is an autonomous entity which observes through sensors and acts upon an environment using actuators and a MAS is a system composed of multiple interacting intelligent agents within an environment [15].The MAS potential for the power grid is well documented in several simulation studies and projects [16,17] and papers [18] and [19] give specifically a vision of how the MASs approach could be used into the power grid.The main benefit of this approach is that the SG can be seen as a very complex system, consisting of many distinct nodes (generators, loads, transformers, etc...) interconnected among each other, with different tasks to be accomplished [20].MASs approach enhance and fits several functionalities typical of SG, such as distributed and real-time control, diagnosis, negotiation/consensus and selfmaintenance.Furthermore, is surely useful for the large-scale integration and coordination of DGs and SSs.
Within the most important MAS applications, it is possible to find the control strategies for parameters optimization such as voltage level [18,21] and the field of intelligent grid operations such as grid restoration and power distribution management [22,23].As mentioned above, the quality of power signals is fundamental for the functionality of a group of DGs inside a MG.While for the signal amplitude and THD, the generator's converter is capable to control and regulate them according to power grid specifications, injection of the generator signal or better signal synchronization inside the grid, depends on the presence of the other generators.Traditional synchronization methods used for large power plants appear too expensive and complex to be used in distributed generation.MASs paradigm, with the use of a consensus algorithm [24], could be a viable alternative not only to these approaches, but also to the classical and known techniques of power grid synchronization for DGs.
This paper intends to focus its attention on the topic of the synchronization of a group of DGs inside a MG, by using the MAS approach.The paper is organized as follows.In Section 2 a review of synchronization techniques for distributed systems is given.In Section 3 definitions and mathematical model are described.In Section 4 the implementation of system's hardware architecture and simulations are discussed.Finally, Section 5 presents the conclusions of the paper.

Synchronization methods for distributed systems
The aim of this Section is to review the most important synchronization techniques and protocols already used in the electric system and more in general for distributed systems.

Synchronization methods used for distributed generators in power grids
There are two main categories of methods used for the synchronization of DGs.They are respectively the openloop and the closed-loop methods [25].
Open-loop methods.Among the open-loop methods there are the Zero-Crossing (ZC) and the Filtering of the Grid Voltage (FGV).The ZC method is the most simple methodology to detect the phase information of a sinusoidal signal [26] and is also used for AC-DC converters with triacs or thyristors to calculate the firing angle for distributed gating pulses [27].The phase is calculated through the use of a timer, which is always restarted when the input signal crosses the zero value.This specific method is very vulnerable when large loads are switched on, because harmonics can arise, providing an input signal no longer perfectly sinusoidal, but soiled by other frequencies, usually very high respect to the fundamental, and so causing multiple zero-crossing at high frequency, making the method totally unreliable.
FGV methods include Space-Vector-Filter (SVF)based procedure and the Extended Kalman Filter (EKF) procedure [28].The SVF is used specifically for threephase applications and consists nothing more of a lowpass filter.The methodology is focused on the on the mutual dependence of the transformed αβ-components of the grid voltage.A SVF-based method can be tuned to provide highly distortion-free estimation [29].On the other hand, the EKF algorithm consists of two steps: estimation and correction executed in loop.The first step define a prediction of the state estimation and of its covariance matrix, while the second step corrects both the prediction of the state estimation and its covariance A synchronization technique based on the Multi-Agent Systems approach matrix with a feedback mechanism with the help of the power grid measured quantities.The use of the EKF as a power grid synchronization method is not so diffused.Anyway, its use as a synchronization method to the power grid is technically feasible, but it requires a high computational resources, when implemented on a Digital Signal Processor (DSP).
Unfortunately, also these two methods are considered high sensitivity to the frequency deviations, voltage distortions and imbalance [26].Infact, for example, SVF methods are not satisfactory in providing the desired performance and many difficulty and limitations are found in presence of noise and harmonics.So sensitivity to the input frequency variations and imbalance are the most important problems identified.
Closed-loop methods.Differently from the previous case, closed-loop methods insert in the process of synchronization, the acquisition of useful informations related to the grid to which the DGs want to synchronize.Infact, due to these acquired informations, such as the voltage and current values, a feedback loop triggers for the calculation of the necessary parameters.This loop helps the synchronization method to be more accurate, precise and, most important, reliable respect to the open one, giving the right parameter values in order to have a synchronized generator with the power grid.They are much more diffused than the open loop methods, thanks to their greater reliability, and so more attention is given to them.
A. Phased Locked Loop method.Typical examples of closed-loop methods include the PLL, which is a feedback frequency control system, whose functioning is based on the sensitive detection of phase difference between the input and output signals of a reference oscillator.In a nutshell, it consists of a system that allows to synthesize a signal, whose phase has a fixed relationship with that one of a reference signal.The PLL method is the most commonly used method of producing high frequency oscillations in nowadays communications instrumentation.The most, or maybe, the totality of the radio amateur or commercial receiver of any kind nowadays, employ at least one, if not several, PLL systems, to generate stable high frequency oscillations.The first PLL circuits were originally realized by Appleton in 1923 and Bellescize in 1932, and, as mentioned above, was mainly used for synchronous reception of radio signals [30].Subsequently, PLL technique was used in various industrial fields such as communication systems.Infact, the first large-scale utilization of the PLL occurred in analog receivers for television devices, where a circuit with similar functionality was used for over three decades [30].Then, other PLL applications were developed in the field of motor control systems [31] and in the induction heating power supplies [32].However, the great popularity of this method started with the development of integrated circuits, which allow to realize, at low cost on a single integrated circuit, an entire PLL system.An example is the CD4046CMOS Micropower PLL, which became a popular integrated circuit.Many of the advanced technologies of recent years, including mobile phones, wireless communications, GPS and satellite and digital terrestrial television make an intensive use of the PLL circuit.
Recently, the PLL technique has been used for synchronization between grid-interfaced converters and the power grid, and nowadays covers the majority of the controllers of the grid-connected applications.In this case, the reference signal is the measured electric signal on the power grid to which the DG is connected.The PLL robustness and accuracy are basic to the operation of the controllers which are in charge to establish a synchronization with the power-grid.In general, the PLL classical configuration is shown in Figure (1).This mechanism can be implemented as either analog or digital circuits.Both implementations use the same basic structure.Both analog and digital PLL circuits include the four basic elements described in Figure (1), namely: This is the easiest manner to describe a basic PLL thorough the block diagram formalism.Several PLL techniques has been proposed over the past years and many variations have been developed, depending on the kind of the specific application request.One of the most widely used technique is the Synchronously Rotating Reference Frame PLL (SRF PLL), which is diffused for the three-phase inverters [33], but also for single-phase applications [34].The block diagram is shown in Figure (2).SRF PLL is really fast and good in tracking the power grid signal frequency and phase, diminishing the steady state error at very low values.Anyway, it is extremely sensitive to harmonics and imbalance in the voltage signal and more complex control techniques are necessary to compensate this aspect [35], so a tradeoff is necessary between the two characteristic of fast tracking as well as good filtering.
Other declinations of the PLL method exist, such as the Second Order Generalized Integrator PLL (SOGI PLL) and the Sinusoidal Tracking Algorithm (STA), also known as the Enhanced PLL (EPLL) [36], which gained a lot of importance in recent years.Good comparative analysis and results on different PLL techniques are reported in paper [25] for singlephase PV systems and in paper [37] for advanced inverters used to connect electric vehicles to the grid.Furthermore, it is worthy mentioning that there are several other sophisticated techniques like Decoupled Double Synchronously Rotating Reference Frame PLL (DDSRF PLL) [38], the Delayed Signal Cancellation PLL [39], the Fixed-Reference-Frame PLL (FRF PLL) [35] and the Dual SOGI PLL (DSOGI PLL) [40].
A new and recent PLL technique, which could be a suitable solution for the exploitation of interconnected renewable energy systems with a fault ride through capability, is presented in paper [41].It consists in the hybridization of three PLL techniques, respectively the SRF PLL, the FRF PLL and the DDSRF PLL.The result of this hybrid operation is called the Decoupled Stationary Reference Frame PLL (Dαβ PLL).The advantages of this technique derive from the aforementioned PLL ones, operating accurately under balanced and unbalanced conditions and reducing the errors on the estimation of the phase angle and frequency, which is the main disadvantage of the DDSRF PLL.This leads to a faster time response, making the Dαβ PLL useful for interconnected renewable energy systems, with particular attention in the design of a fault ride through control.Improvements of the Dαβ PLL have been developed in papers [42,43], in particular its performances have been studied under grid faults, proposing an adaptive behavior.
However, all these method declinations show that the PLL is a control architecture which may be subject to the origin and/or to the propagation of interference and errors that normally travel through the reference signal of the grid, with consequent difficulties in the synchronization part of the generator.The Dαβ PLL method goes in this direction and propose a fast and accurate synchronization under harmonic distorted voltage and low-voltage grid faults.Anyway, the PLL technique always require the presence of a reference signal within the electrical power grid on which insists the generator that has to be synchronized.

B. The Sinusoid Locked Loop method.
Another closedloop technique, different from the conventional PLL synchronization methods discussed above, is presented in papers [44,45] and in book [46].It is known as the Sinusoid Locked Loop (SLL) and it is based on the idea of mimicking a grid-connected synchronous machine, which does not exchange power with the grid.This because the generated signal is synthesized with the same instantaneous voltage as the grid voltage.So a generic distributed voltage source, which need to be synchronized to an existing power grid, which possess a prevalent signal, is seen as a Single-phase Synchronous Machine (SSM), with the aim that the active power P and the reactive power Q, flowing out of this generator, have to be leaded to the zero value.Their formulas are shown as follows [45,46]: where all the parameters are defined in Figure (3).In order to fulfill the method, the values of Equations ( 1) and ( 2) must be equal to zero, and so that the conditions: are verified.A frequency droop control is present in order to determine the correct phase which eliminate the active power flow, but the voltage droop control is not needed for the SLL because the generated voltage is expected to be the same as the voltage v, so E = v m .Droop control is a control strategy commonly applied to generators for primary frequency control (and occasionally voltage control) to allow parallel generator operation, so that loads are shared among generators themselves in proportion to their power rating [47].As shown in [45,46], the SLL method is capable to provide fast times of response in synchronization, given that a small machine response (the DG) is surely faster than a big one response (the power grid).

Overview of the synchronization methodologies in distributed systems
Distributed systems, in general, are defined as a set of spatially separated, independently running processes, each equipped with a local time clock.The synchronization of these processes is fundamental for the whole system of which they belong [48][49][50].Distributed systems can be implemented in different manners.An example is a network consisting of spatially wide distributed computers, which have to be coordinated because they share and work on the same task.Another example is the interaction of different block functions on a chip.The power grid itself, consisting of many devices spread on a wide area and connected through an infrastructure, is a distributed system.So it is straightforward, that the capability to synchronize devices with high precision and align their local clocks is of primary relevance in several contexts [51,52].The alignment of device local clocks to a single system-wide time is generally achieved through the exchange of messages over the network according to a clock synchronization algorithm or protocol.The aim of this protocol is to keep the local time clock of a group of networked devices aligned to each other to the same system time.How the exact system time is provided to the running processes of any single device, competes to the operating system.All clock synchronization protocols work basically in the same way, and must pass necessarily at least through these following points, preferably in this order: 1. estimation of the local clocks deviations respect to the system time with the utilization of time-stamp messages 2. computation of the correct compensation values through the acquired measurements 3. correction of the local time clock for each node.
These points could be slightly different or could be not so clearly separated in the process.The related operations, including the measurement of times and the exchange of informations, depends on a suitable choice of the time-stamp messages and the technique used to interchange these messages between the nodes of the network.
Mainly the estimation of the clock deviations are obtained through the time-stamps, taken by several network nodes.In this case, it is really important the way how the time-stamps are produced and taken.The three most important methods are: • Master-Slaves method: a special node (the master) is in charge to keep the correct time and cyclically gives its time to the others (the slaves) who synchronize themselves to the value received • Server-Clients method: a node (the server) is in charge to keep the correct time and the others (the clients) ask explicitly for synchronization sending a message to the first one when they need • Distributed method: each node sends synchronization messages through the network, which are received by all the other reachable nodes, then a distributed procedure is taken, which enables them to reach a common average reference time value after some iterations of communication.
The clock compensation can be accomplished with two different steps: 1. clock rate correction: due to parameters like temperature, or other intrinsic features, oscillators may suffer of rate deviations so they must be monitored and adjusted accordingly 2. clock offset correction: even in the case of ideal clock with exactly the same frequency or rate, deviations may still occur on the offset value, because devices could be started at different time clock values.
Another aspect that must be considered is the transmission latency.The exchange of information among nodes is based on the communication services offered by the used network.Consequently, for every message exchanged, there is the propagation delay over the communication media (which depends on the physical distance between nodes and its material) and the pass-through delay of the network equipment, which is related to the used technology, the process running as well as the algorithms performed.For small networks, transmission latency of messages could be considered little and generally deterministic, while for large geographic networks, it could grow considerably and may suffer of stochastic noise.Propagation delays can be determined by the beginning in the design phase, considering suitable network topology and efficient algorithm procedures.In general, the industrial bus does not allow to reach, in an autonomous way, the synchronization requests for measurement and control.Other procedures are based on systems of satellite type, by which is possible to obtain best performance in terms of synchronization at the expense of installation costs.
A. Network Time Protocol.One of the earliest, most widespread and advanced algorithm in the field of synchronization protocols, is the Network Time Protocol (NTP), proposed by Mills [53].NTP was designed to meet large networks with topology quite static, such as the Internet, so it falls in the category of the industrial procedure type.In NTP, the network nodes are synchronized to a reference signal, which is injected into the network through a sub-group of master nodes, called stratum-1 server.These master nodes are directly synchronized to an external source of time such as a GPS device, which in turn form the stratum-0.The entire network consists of a series of hierarchical levels, where the leaf nodes are called clients, while internal nodes are called stratum-L servers, where L is the level of the node in the hierarchy.Each node must specify, in a configuration file, which are its parent nodes.These nodes frequently share synchronization messages with their fathers and use the informations obtained to regularly update its own clock.The synchronization is less accurate the further one moves away from the first layer.Going from the layers of higher level to those of lower level increases the transmission time of the signal through the network, therefore, in order to make the system more reliable, it is necessary to connect the computer to several servers of the upper layer.From the comparison between the different signals, is determined the more reliably server.
This method allows to maintain synchronization between the nodes in a fully automatic, continuous and transparent manner to the users, resulting at the same time suitable to the synchronization of a single device or an entire network.Since it has a unique format for messages, NTP is easily implemented and used by a large number of operating systems and network environments, guaranteeing the requirements of accuracy in the synchronization of the order of milliseconds.A different declension of this method is the Simple Network Time Protocol (SNTP).hardware and software in order to allow networked devices (slaves) to synchronize their clocks to a master clock.The standard was originally developed for the environment of industrial automation where previously it was not possible a precise control using a Local Area Network (LAN), in particular it was developed to exploit Ethernet systems as a means to achieve the synchronization.After, this method was considered interesting in telecommunication, energy and military fields.The standard is applicable to LAN that support multicast communications, including and not limited to Ethernet.IEEE 1588 consists in a Master/Slaves protocol, which is based on the exchange of a series of packets between a master clock and several slave clocks.IEEE 1588 is able to synchronize heterogeneous systems, with clocks that vary in accuracy, resolution and stability, and superior accuracy to within microseconds.In order to reach such precision, it requires that the shipping/incoming time-stamp of the messages is generated by a specific hardware or a component as close as possible to the physical medium, in contrast to the NTP that acts only at the software level and does not require any particular hardware.An attempts to extend the PTP protocol to Wireless Local Area Network is presented in [55].

B. Precise Time
C. Real Time Networks.During the recent years, the Ethernet technology has taken over, becoming really popular and widely used [56] in the field of industrial applications, offering cost advantages, high-speed interconnections and the possibility of achieving an integration of different components into a network with several applications.Among the most popular synchronization protocols that exploit this technology, may be mentioned the distributed clock mechanism of EtherCAT, the synchronization technique of Ethernet Power-Link (EPL), and FlexRay (FR).These three protocols are generally known as special-purpose protocols, conceived explicitly for real-time control systems like industrial, embedded and automotive systems.In particular it is possible to highlight EtherCAT, which is mainly used in factory automation, and the synchronization protocol FR, which is intended for the automotive domain.
It is worth noting that the PTP is related with some other implementations in commercial industrial networks, such as EtherNet/IP and PROFINET [51,57].Another important example is the Time-Triggered Ethernet (TTEthernet), where the specification [58] gives detailed information about the architecture, the synchronization protocol, and the data flow.D. Satellite protocols.Satellite systems posses nowadays a key role in several fields of science and technology.During the last years, there were incessant developments and increased adoptions of applications used in the life of every day, based on the use of satellite systems.The satellite systems, intended more generally as apparatus for positioning, navigation and timing, allow any user, equipped with adequate receiving devices, the use of the signals emitted by the satellite network, with the purpose of determining important informations, such as the geographic position, the altitude with respect to sea level and the signal of time synchronization reported to UTC, with a good degree of accuracy.
The principle of operation of any satellite system is based on the measure of the travel time of the signal between the satellites and the terrestrial reception apparatus.The receivers are equipped with an internal clock and are therefore capable of measuring the time interval that elapses between the instant of transmission of the signal and the instant of reception.Through the knowledge of this information, it is possible to obtain, at first approximation, the distance value between the satellite and the receiver.
Among the most important cases of satellite systems, is possible to list the Navigation System Time And Ranging Global Position System (NAVSTAR GPS) [59], the Global Navigation Satellite System (GLONASS) [60] and the GALILEO system [61].The first two were designed for military applications, but just the GPS system evolved to other fields considering a multitude of civil applications giving a global and continuous coverage.The third case is the European answer to the American GPS, but its birth is due only for civilian purposes and its entry into service is scheduled for the end of the 2019.

System description
This Section gives a description of the MG architecture through the MAS paradigm and the theory of consensus [62].The considered MG consists of n DGs feeding the local loads inside an isolated or peninsula network.These DGs could be Renewable Energy Sources (RESs) or SSs.In this structure there is not a real predominant generator, but a myriad of independent DGs; for this reason a new approach and the development of a synchronization method exploiting the information layer to synchronize several energy sources (PV panels, wind turbines, batteries, etc...) could be a valid purpose.

The Micro-Grid
A Microgrid can be represented as a set of nodes N i i = 1, ... n as in Figure (4).Each node is twofold connected to its neighbors, thus forming a two layer network: the first layer provides to power exchange and the second one for information data flow.
Within the information layer, each node can exchange data only with its neighbors, which depends on how the information network topology has been realized, spreading messages and data packets about its state and updating it according to the received informations.Every node includes the energy source, the power converter and the Agent Control Unit (ACU), as shown in Figure (5).A synchronization process is required in order to obtain a common phase for all signals in order to get a good operation of the MG.

The agent
A typical ACU is featured by the following properties: 1. it is resident in a specific node 2. it is capable to send/receive data informations about its internal/external state and to act locally through a control scheme 3. it can interact only with a certain number of adjacent agents, according to the MG information network topology 4. it is modeled by a first-order dynamic system, whose initial state is determined by local data detected by the agent itself.Each single dynamic is mutually coupled with the nearby dynamics by a proper local coupling law, or better, by a consensus algorithm.
The whole MG system is capable to reach globally a consensus on local variables under certain conditions [63].A consensus means that, after a time interval in the system dynamic, all the agents share the same value of certain parameters proper to their state, such as the signal phase and frequency.So, through this dynamic, the agents can solve global and complex problems, such as the synchronization, by only processing local informations.This ability allows each agent to estimate the most important variables that characterize the global MG, without the need to utilize central facilities and reference signals.(i.e., monitoring, control and time synchronization) can be performed according to a decentralized and selforganized computing framework.

Mathematical model: the Consensus Algorithm
In the proposed model, each agent is equipped with its own clock and the consensus algorithm resides on the agent itself, i.e. the ACU shown in Figure (5).The clock evolution ξ i (t) provides the dynamic of a single agent; a synchronization among different agents is reached when all of them perform the same dynamics.Neglecting second order terms and stochastic effects, ξ i (t) is given by [64]: where α i and β i are the skew and the offset coefficients, respectively, t is the absolute time and n is the number of agents.In order to estimate these coefficients, the Average Time Synchronization (ATS) algorithm [64] is used.The goal of this algorithm is to obtain informations regarding the clock coefficients of the i th agent dynamic, processing the time offsets with its neighbors and synchronizing the agents dynamics to a virtual reference clock ξ v (t) to which each agent has to converge: The exact values of the two coefficients α v and β v are not important and depends on the initial conditions, so they may change according to them.During the consensus process, each agent has a local estimate of the virtual reference clock ξv,i (t): In [64], it is demonstrated that the convergence is reached when: where ŝi and ôi are the local parameter estimations of the skew and offset, respectively, relatively to the time ξ i (t).These parameters must be given to the i th local clock ξ i (t) in order to compensate its difference with the virtual reference clock ξv,i (t).Substituting Equation ( 4) in Equation ( 6), the following non linear equation is obtained: ATS consensus algorithm estimates the relative speed of the i th clock respect its j th neighbor.
Denoting t k the time when the i th agent receives a timestamp ξ j (t k ) from the j th agent, the pair ξ i (t k ) , ξ j (t k ) is recorded by the i th agent in its own memory.When a second information packet arrives and a second pair ξ i (t k+1 ) , ξ j (t k+1 ) is recorded, the following parameter is evaluated by the i th agent: where µ ij (t k ) represents the estimation of the relative clock speed between the i th and j th clock at the time t k .
In [64] is proved that: where it is possible to define the auxiliary parameters: used in the Figures shown in next section.So, the information packet of the i th agent is given by the local parameters ξ i , ŝi and ôi .When each agent has got, for its own clock, the same reference virtual clock dynamic, the virtual time ξ v is common to all agents and, consequently, a synchronization is reached.When all clock dynamics ξ i (t) i = 1, ... n have been synchronized with ξ v , all generic functions depending on ξ v are, consequently synchronized [65].

EAI
Pulse Width Modulation (PWM) is a typical modulation technique for low/medium power converters [66].In this paper, the main duty of ACU is feed PWM unit toward synchronization.Carrier waveform η performing modulation, represents the function to be synchronized.A triangular carrier waveform (TCW) with period 2a and amplitude from A to −A, can be expressed as: where the operator f is the floor function of f .Since each agent acts as a header emitting its own status information packets to the neighboring agents, the consensus, or better the synchronization, is obtained without the need of any cluster header or centralized supervisory structure.

System implementation
This section shows system implementation.Three distinct configurations have been considered for system's simulation with Matlab/Simulink .

Two node case
Two distinct generators, i.e. nodes, have been considered, each one consisting of 5-level cascaded multilevel H-bridge converter (see Figure (6)).At this level of abstraction, the influence of the electric loads can be neglected and the attention can be focused on the information layer only.Moreover, the delay in communication network tdel can be assumed symmetrical, thus the information propagation time between nodes N 1 and N 2 can be assumed equal in both directions (N 1 -N 2 ) and (N 2 -N 1 ).Converter output is the result of the application of modulation patterns generated by ACU, the latter could be realized using a very large scale integration component (VSLI), for instance a Field Programmable Gate Array (FPGA) or one or multiple microcontrollers [67].In the considered case, ACU includes  • data packets arrive from the Agent Network (AN) to the Communication Microprocessor (CM), bringing information from that particular agent who sent the package

EAI
• CM places informations inside the SMU, available for the Consensus Algorithm Microprocessor (CAM) • CAM picks the external network informations from the SMU and executes the consensus algorithm also with its status informations • the output of the consensus algorithm is used in order to give the right parameters to the PWMU, to synthesize properly the PWM signal to drive the converter • the result of the consensus algorithm is also placed inside the SMU, available for the CM • finally, the CM picks the new status informations of the agent from the SMU and sends them to the AN, so that another agent will perform the same steps.
At this stage, agents have been developed by using Matlab/Simulink and implementing the blocks CM, CAM and PWMU, as shown in Figure (8)  agent, respectively.Furthermore, there is a third parameter RAM Memory Slot (nslot) representing the number of information packets stored inside the SMU, both in Input or Output direction, i.e. a buffer memory.
2. CAM block: this block takes pkgExt parameters from SMU, executes the consensus algorithm with internal and external clock informations, places results inside the SMU through pkgInt and then gives directives through the parameters pkgParamNC, tabs, pkgParamExt and pkgParam to the PWMU.The input parameters of this block are: nslot, Clock Divisions (div) and Lambda Filters λ µ , λ ω , λ 0 .The Clock Divisions parameter controls the frequency of time-stamps extraction from the clock dynamic, the Equation (4).The Lambda Filters represent three λ parameters defined in Equations ( 9), ( 11) and ( 12), respectively, which control the convergence of the consensus algorithm.x , x = 1, 2, 3, 4 and y = 1, 2. Table (1) shows two distinct parameter configurations used during simulations.These values are considered the same for both agents.Figures (9), (10), (11) and (12) report the behaviors of the main system parameters.In particular Figures (9) and (10) show the convergence of the two clock parameters, skew and offset, to the common virtual reference clock value.For both considered parameters  configurations, the system convergence is reached in less than 2 ms.In this test PWM is implemented by using a TCW operating at f 1 = 310 kHz and at f 2 = 210 kHz, respectively, for the two agents, in both delay times tdel.After clocks convergence, the TCW frequency is the same for both the agents, in particular f v = 265 kHz for tdel = 0 s and f v = 280 kHz for tdel = 10 −4 s.As modulating signal, a fixed value comparator comp = 0.8 has been used.Figures (11) and (12) show the TCW and a pulse pattern, respectively, for the two agents, at different delay times.In particular in Figure (12) a single PWM signal is reported, among the eight available.It is imposed that the clocks compensation happens at 6 ms and consequently the two TCW are overlapped.The compensation time value is arbitrarily chosen, but in any case, it is longer than the time required for the mathematical convergence shown in Figures (9) and (10).In these figures it can be seen that after the compensation time, i.e. after agents' synchronization, the TCW and the PWM signal of the nodes are overlapped.The consequence is that the electric signal produced by the two converters are synchronized inside the MG, because the PWM

Three node case
In this case, the considered MG consists of three DGs, therefore the system includes three nodes N 1 , N 2 and N 3 .For each node the 5-level converter has been adopted, as described in section 4.1.
As in the previous paragraph, power issues are neglected and the attention is focused just on the information layer.The network communication delay time tdel is assumed symmetric also here, which means that the information propagation time between the three nodes N 1 , N 2 and N 3 is equal in every directions.The information topology network is realized linking node N 1 to node N 2 and vice versa, and node N 1 to node N 3 and vice versa.No direct information connections are realized between nodes N 2 and N 3 .This means that the influence of N 2 on N 3 passes only through the N 1 informations.This is the base of the principle think locally, act globally.All the system configuration set considered in the previous section is replicated in this case, both for hardware, software, parameters and algorithm point of view.Below are shown just some of the simulated characteristic trends.
Figures (13) and ( 14) report the behaviors of the main system parameters in this configuration, with a delay information propagation time tdel = 10 −4 s.In Figure  In Figure ( 14) is reported the TCW convergence, used for the PWM.In this case clock compensation occur at 80 ms, resulting three overlapped TCW.As in the paragraph before, the compensation time value is arbitrarily chosen, but in any case, it is greater than the time required for the mathematical convergence shown in Figures (13a) and (13b).Similar conclusions to the previous paragraph can be deduced from the three clocks synchronization behaviors.The overlap of the three TCW after the compensation time imply the synchronization of the three converter electric signal inside the MG.

Six node case
Here six DGs are considered in the MG, therefore the system includes six nodes N 1 , N 2 , N 3 , N 4 , N 5 and N 6 .Also here, for each node the 5-level converter has been adopted, as described in sections 4.1 and 4.2.The attention is always focused on the information layer and the network communication delay time tdel is assumed symmetric.In this case, two information network topology are considered.In Figure (15) are reported the two information network.Figure (15a) shows a sort of centralized topology where every node has a bi-directional connection only with the node N 1 , which behaves as a information hub. Figure (15b), on the other hand, shows a decentralized network with two cluster of three nodes, connected only by a bidirectional connection between the two nodes N 1 and N 2 .
Figures (16), ( 17), ( 18) and ( 19) report the behaviors of the main system parameters for the six node case for both topology configurations, with a delay information      is that the convergence time lengthens, because a higher number of agents must be mediated.This problem could be further investigated tuning the div and Lambda Filters λ µ λ ω , λ 0 agents parameters, searching the optimal configuration set which minimize the convergence time.The information network topology is also another aspect to consider.Both these observations depends according to the number of agents inside the network.Being connected to particular nodes could accelerate the convergence.These nodes are known as hubs, or better the nodes which collect the largest number of connections with other nodes.In scientific literature this behavior is know as the preferential attachment logic [69].Furthermore a cluster synchronization could be also considered, thinking the system formed of cluster of nodes, which firstly reach the synchronization inside each cluster, and then all the clusters start to synchronize together between them.

Communication specifications
An implementation of the system described in section 3 is possible nowadays, thanks to the improvements of the ICT, and several communication protocols have been developed.The attention must be focused on one aspect in particular, the communication protocol, through which the agent's informations flow.The choice, made in this paper, falls on the communication protocol Field-bus.The reason is because this is a particular industrial computer network protocol realized for real-time distributed control, standardized as IEC 61158 [70].This protocol possesses advantages that well fit the system modeled, including flexible and scalable architecture; therefore, addition of new modules or integration of new functions is always possible without affecting existing wiring.The implementation of a network based on the proposed   Following the Open Systems Interconnection (OSI) model ISO/IEC 7498-1 [71], the Field-bus functional model for communication is made of three levels, as show in Figure (20).In the Application layer resides those informations exchanged between the agents, organized in packets.This means that each agent's CM must be equipped with a peripheral able to generate informations packets, which satisfy the Fieldbus protocol.Among the existing examples of Field-bus, can be found AFDX, EtherCAT, EtherNet/IP, PROFINET IO, PROFINET IRT, TTEthernet and VARAN [51,52].All of them exploit in particular the Ethernet technology as Data Link layer, which is the protocol layer in charge to  transfers data between adjacent network nodes.Other Field-bus protocols are possible on different Data Link layer such as Token and SDLC.

Conclusions
In this paper a synchronization technique, based on the MAS approach, for a group of DGs inside a MG, has been proposed.A review of synchronization methods both for DGs in power grid and distributed systems is reported.Then, a description on how the system hardware architecture is given and system simulation results are shown primarily for a simple configuration of two agents, secondly for three agents and then for six agents.The ATS consensus algorithm has been applied and simulation results have been obtained.
The advantages of the proposed methodology are: • it does not require voltage and current measurements, since the synchronization data travel on a different layer dedicated to the information exchanges, see Figure (4) • it does not require a reference power signal inside the MG, so it is suitable for isolated MG without a connection to the main national power grid Ideally, this new technique creates an open-loop method, because all the measurements of the voltages and currents, required by the traditional synchronization methods such as the PLL [43,46], are eliminated.
Anyway, the open-loop hypothesis is certainly ideal and must be proved.It is evident that the quality of the information network is an important parameter, which must ensure the synchronization task with precision and speed.Future work will focus its attention on the effect of i) the topology of the DGs information network ii) the effect of loads inside the MG.A more detailed study on the influence of delay time propagation could be performed, in order to find the parameters which help to optimize the convergence.Finally the proposed algorithm could be implemented on a real MG, with two or more control boards on which develop the code, in order to synthesize the synchronized PWM signals.

Figure 3 .
Figure 3. Model of an SSM connected to the grid.
Synchronization protocols.Nowadays, several protocols are available for achieving accurate time clock synchronization in distributed systems.The current measurement techniques and distributed control used within the communication networks are mainly based on the use of special industrial bus, for the communication P. Giammatteo, C. Buccella, C. Cecati between different devices, or nodes.Time traceability of the activities carried out in the real-time networks of communication requires to ensure adequate synchronization between the nodes.
Protocol.IEEE 1588 standard, or more commonly known as Precision Time Protocol (PTP), is an industrial type and it was released in November 2002 and based on the work done by John Eidson at Agilent Labs [54].IEEE 1588 specify

Figure 4 .
Figure 4. Microgrid: grey lines represent Power Grid, black arrows represent Information Network, circles represent nodes.

Figure 5 .
Figure 5.The generic node N i and its subsystems: the energy source, the power converter and the ACU.

| Volume 3 |
Issue | e A synchronization technique based on the Multi-Agent Systems approach Figure (6a), each node DG includes two DC power sources V dc .The ACU block is represented in Figure (7), where it is possible to identify eight PWM signals IN y x , x = 1, 2, 3, 4 and y = 1, 2 produced by the ACU and used as shown in Figure (6b).

A
synchronization technique based on the Multi-Agent Systems approach (a) With tdel = 0 s.(b) With tdel = 10 −4 s.

Figure 9 .
Figure 9. Clock skew convergence behaviors of the two nodes.

Figure 10 .
Figure 10.Clock offset convergence behaviors of the two nodes.
(13a) is possible to see the skew convergence of the three nodes.Compared to the two node network, the presence P. Giammatteo, C. Buccella, C. Cecati (a) With tdel = 0 s.(b) With tdel = 10 −4 s.

Figure 11 .
Figure 11.The PWM modulation waveform convergence behaviors of the two nodes.

Figure 12 .
Figure 12.The PWM signal convergence behaviors of the two nodes.

A
synchronization technique based on the Multi-Agent Systems approach (a) The three clocks skew convergence, with tdel = 10 −4 s (b) The three clocks convergence dynamics, with tdel = 10 −4 s.

Figure 13 .
Figure 13.The clocks behavior of the three nodes.

Figure 14 .
Figure 14.The PWM modulation waveform signals of the three nodes, with tdel = 10 −4 s The centralized network topology.
The decentralized network topology.

Figure 15 .
Figure 15.The two topology considered for the six node case.

Figure 16 .
Figure 16.The clocks behavior of the six nodes with centralized topology.

Figure 17 .
Figure 17.The PWM modulation waveform signals of the six node with centralized topology, with tdel = 10 −4 s

Figure 18 .
Figure 18.The clocks behavior of the six nodes with decentralized topology.

Figure 19 .
Figure 19.The PWM modulation waveform signals of the six node with decentralized topology, with tdel = 10 −4 s on 0 -04 2016 | Volume 3 | Issue | e A synchronization technique based on the Multi-Agent Systems approach
• it is scalable, flexible and resilient, in fact it is automatically reconfigured if some DGs are excluded or added into the MG • it represents a new synchronization technique which requires a new standard.