Abstract

Isolated microgrids (MGs) face challenges in performance stability and active/reactive power sharing as a result of frequency/voltage deviations and mismatched line impedance issues. In this paper, a consensus-based multiagent system (MAS) is proposed as a solution to restore voltage/frequency deviations and enable true power sharing. The invention of an Intelligent Distributed Secondary Control Scheme (IDSCS) can efficiently achieve hoped-for outcomes. The proposed IDSCS features estimation and compensation sublayers. For the estimation sublayer, discrete dynamic consensus algorithm-based state estimators are presented to collect average information of frequency, voltage, and reactive power. Each DG is viewed as an agent sharing information with its immediate neighbors through a sparse cyber communication network. In the compensation sublayer, online tuned proportional integral (PI) controllers using artificial neural networks (ANNs) are proposed as an intelligent voltage and frequency compensators. This combination uses the simplicity of the PI controller mathematical formula and ANN’s ability to deal with parameter variations and nonlinearity. Due to the global nature of the frequency parameter, the active power-sharing compensator is unnecessary. For compensating reactive power deviations, ANNs-based reactive power controllers are proposed. Furthermore, at the primary control level, the proposed strategy employs discrete-time proportional resonant (PR) controllers in a stationary reference frame, eliminating the need for any or transformations. Distributed implementation of the proposed method guarantees system scalability without MG topology or demand pattern expertise. The control scheme was validated using hypothetical MAS in MATLAB Simulink platform. The simulation findings indicate the proposed MG system can effectively distribute power among the DGs while maintaining voltage and frequency stable.

1. Introduction

MGs can be operated on a grid-connected or islanded basis. Islanding capability enhances MG reliability in terms of supplying load demands during utility outages. In islanded operation, MG control is more difficult, and efficient voltage and frequency control strategies are essential for achieving stable operation. Consequently, the system’s frequency and voltage are always controlled by DGs. Conventional active power-frequency (P-f) and reactive power-voltage (Q-V) droop methods have seen extensive use for controlling frequency/active power and voltage/reactive power, respectively. Since the frequency is a global system quantity, P-f droop allows for real power to be shared among DGs based on their individual power ratings. Reactive power sharing is disrupted by the Q-V method because: (1) voltage parameter is local, unlike frequency [1]; (2) the network’s reactive power requirement depends on loads, network configuration, and transmission line parameters [1]; and (3) the resistive nature of the transmission lines in the network makes the active power and reactive power mutually dependent [2]. Improper sharing of the reactive power among DGs can result in voltage and frequency deviations, unanticipated load curtailment, degraded power quality, and protection failures of DGs, all of which impact the MG stability. Accordingly, it is crucial to improve upon traditional droop techniques in order to fairly distribute reactive power among DG units [3]. A variety of power electronics components, including static compensators and switched capacitors, have historically been responsible for distributing reactive power. However, in MGs based on power electronics, reactive power management objectives can be met via control of distributed power electronic converters. The P-V and Q-f droop control schemes are viable for smaller networks with a predominantly resistive nature. The network impedance is inductive for larger networks, and relationships of P-f and Q-V are more advantageous [4]. Using a virtual impedance control in conjunction with the traditional droop method improves the control performance by rendering the network virtually more inductive [5]. Additionally, the virtual impedance approach can be used in primary control to efficiently address the power sharing issue in case that DGs are connected in purely parallel like mode to the loads (in a bus or star-connected MG, not a ring or mesh MG configuration).

Due to the aforementioned issues, the primary control cannot resolve the voltage and frequency variations. Also, using the virtual impedance method-based primary control to solve active and reactive power sharing problems in the presence of line impedances connecting DGs with each other like in ring or mesh network topology is also inefficient. A secondary tracking and corrective control layer is necessary for properly reducing the deviations between nominal frequency/voltage and their actual values, as well as for sharing active/reactive powers. To minimize errors, corrective terms are routed through PI controllers. Secondary Control Units (SCUs) can typically be centralized or distributed, as shown in Figure 1. The grid’s voltage and frequency are typically estimated and compared to corresponding reference values in a centralized control strategy. A controller processes the error signals before sending corrective signals to all DG units (see Figure 1(a)). A typical distributed control system is shown in Figure 1(b), where each DG unit has a secondary control unit to remedy voltage and frequency deviations individually. In distributed secondary control, every DG can communicate with its neighbors.

The main objective of the distributed controller is to bypass the drawbacks of centralized control strategies. The complex nature of the information transfer network affects the centralized controllers [6]. Consequently, the controller’s reliability decreases and its sensitivity to failure increases. The distributed control method is utilized to eliminate the aforementioned central controller drawbacks. Through a graph-based communication network, it can utilize the information and data of its neighbors. It increases system reliability, reduces system failure sensitivity, and reduces the need for a central control unit [7]. The system’s distributed secondary controller makes it easy to add new components, increases security, facilitates smooth data and information exchange between nodes, and makes decisions quickly [8].

Sharing power proportionally can be achieved by merging the droop control and secondary control into one, and then using a sparsely connected network to coordinate and communicate with other control systems. In order to generate frequency and voltage references, PI controllers and consensus estimators must exclude active, reactive power, frequency, and voltage mismatches. Reactive power in an island grid can be efficiently controlled by MAS. The MAS is comprised of a group of agents, each of which possesses some levels of intelligence and makes decisions with a degree of autonomy. Nonetheless, a significant drawback of PI controllers is their limited performance, which is largely dependent on the correct tuning of their gain coefficients. Using soft computing techniques, these coefficients can be made static or dynamic throughout the process. Adaptive or “trial and error” methods [9, 10] or the alternative Ziegler–Nichols (ZN) method [1113] are utilized to calculate static gains in PI controllers. Consequently, they may result in a delay when trying to enter a stable operation region. In order to improve power quality and system performance throughout load changes, it is crucial to properly online tune PI gains.

Distributed algorithms are used to implement the secondary controllers of the MG, as described in [14]. For voltage/frequency recovering [5], sharing of power [15], and compensation for imbalanced voltage, distributed cooperative control is primarily employed for secondary control [16]. In addition, the conflict between reactive power sharing and voltage regulation is described in reference [17]. By changing the proportionality of the control gain, a proposed distributed average proportional controller can bring about a decrease in voltage deviation and an increase in precisely shared reactive power. Moreover, the authors of reference [18] proposed a method for islanded MG to equitably distribute reactive power using a combination of consensus and adaptive virtual impedance control. The proposed method restores the lowered voltage of every DG to address the mismatch in sharing of reactive power due to lines mismatched. For the purpose of sharing reactive power [19], demonstrates distributed methods adopting average PIs, which are comprised of graph theory. Despite the tuning of controllers, it is not possible to address both realizing voltage and reactive power regulation at the same time [20]. However, the active power sharing, frequency restoration, and online tuning control gains of PI controllers were not addressed in the aforementioned references [1720]. While eliminating frequency deviations and guaranteeing accurate power sharing was proposed in [21], voltage restoration was not taken into account. However, some of the distributed secondary control-based current literature such as the ones mentioned in [2224], offer solutions for frequency/voltage recovery as well as active power sharing with global asymptotic convergence speed. An intelligent method using fuzzy logic and PSO techniques were suggested in references [25, 26] as a means of controlling the MG frequency only using centralized control. In [27], a secondary control strategy for restoring voltage and distributing reactive power is proposed where the PI control gains are selected empirically, and no learning or optimization techniques are incorporated into the design process. Recent research has focused on distributed consensus algorithms for secondary control. A bounded, distributed, and convergent consistency control protocol for the exact allocation of active power and frequency recovery has been proposed in [28]. In [29, 30], a finite time convergence protocol enables frequency recovery and precise active power distribution. In contrast, the reactive power sharing, voltage restoration, and online tuning control gains of PI controllers were not addressed in references [29, 30]. Uneven sharing of reactive power caused by a mismatch in line impedance is addressed in [31] by proposing a virtual impedance controller with consensus-based adaptation. To adjust the reactive power mismatch, a consensus algorithm is employed, and a term to correct impedance virtualization is produced via a PI controller to eliminate a mismatch in line impedance. In order to maintain proper control of the frequency and voltage of fully DGs-based islanded MGs, the authors of paper [32] proposed a new distributed consensus-based control approach. The approach generalizes some secondary voltage and frequency control methods as a result of enhancing the accuracy of reactive power distribution and incorporating active power sharing into voltage regulation. First, secondary frequency control is implemented on a decentralized basis. Second, the voltage is not controlled by a centralized entity but rather by a network of decentralized, average voltage regulators and self-contained, portable voltage regulators. In this reference, conventional PI controllers are used as system regulators. In the paper [33], the authors provided a distributed secondary controller for voltage signals only. In the meantime, an accurately reactive distribution of power has been accomplished. Table 1 summarizes related studies and compares them to current work.

According to the authors’ knowledge, there is no prior study that retrieves both nominal values of frequency and voltage and shares active and reactive energy utilizing PR-controllers, virtual impedance-based primary control, and distributed consensus secondary control with online tuning parameters using ANNs. We propose an intelligent secondary control system uses consensus estimators, ANNs-based frequency and voltage PI compensators as well as ANNs-based reactive power compensator as a means of overcoming the challenges of frequency/voltage restoration and active/reactive power sharing. Intelligent compensation method-based voltage and frequency PI controllers can make online adjustments for the control parameters using ANNs. In addition, ANNs-based reactive power compensators have been proposed to compensate any power deviations. For globally averaged voltage/frequency restoration and shared active/reactive power, it is presented to collect the average information of voltage, frequency, and reactive power using state estimators based on a consensus algorithm. The following points are the foremost contributions made by this paper:(1)In this paper, an effective voltage and frequency control process with inner loops, virtual impedance control, droop control, and IDSCS is proposed to enhance the performance of adopted islanded multiagents MG and equally share power among DGs. In the proposed MAS, each DG is interpreted as an agent sharing data with its neighbors via a sparse cyber-layer communication network. The distributed implementation of the proposed method ensures scalability without requiring expert knowledge of the MG topology or demand patterns.(2)We develop an online strategy for fine-tuning control parameters of PI compensators-based IDSCS using ANN learning features. The learning ability of the ANN controller enhances the proposed control mechanism’s extensibility, resulting in an independent online controller.(3)For the proposed control strategy, a consensus algorithm-based IDSCS is used to meet the power-sharing requirements with adopting ANNs-based reactive power compensators, as well as ANNs-based tuned frequency and voltage PI compensators.(4)By adopting a stationary reference frame (-frame), the proposed mathematical models of the inverters, voltage, and current inner control loops require less processing capability. Inner controllers of each DG are implemented using proportional resonant (PR) controllers to further regulate system state variables, reduce steady-state errors, and accurately share the power of each DG. This work does not necessitate any or transformations, unlike conventional control methods based on the synchronous reference frame (-frame).(5)By instantaneously responding to load changes in secondary control to achieve real-time power distribution, voltage and frequency stability and accurate active and reactive power distribution can be achieved.

As for the rest of this paper, it is structured as follows. The proposed MG system is discussed in detail in Section 2. Section 3 describes the modeling of the system generation resources. The cyber-physical model is developed in Section 4. Section 5 includes the details of the ANNS-based proposed control method. Section 6 performs extensive simulation studies to evaluate the proposed controller’s performance. The paper’s conclusion is presented in Section 7.

2. Proposed MG System

Consider the adopted, islanded MG illustrated in Figure 2. This MG is comprised of five DGs (three solar photovoltaics and two storage devices), nine AC transmission line impedances shown in Table 2, and three load banks. The specified power filter parameters and droop coefficients for each DG are shown in Table 3.

The hierarchy of controls for a single DG is shown in Figure 3. There are two levels of control in this setup: the primary and the secondary. The signals measured are all in the αβ-frame. Voltage and current inner control loops, as well as inverter mathematical models, require less processing capabilities by using αβ-frame. Each local primary control scheme composed for three components: power controller, current and voltage controllers. Based on Q-V and P-f droop control, the power control loop adjusts the frequency and voltage at nominal points. The coefficients for droop control of the frequency and voltage are and , respectively. Large droop controller slopes can be used to accelerate the process of load sharing; however, this impacts the system’s stability negatively. Figures 3 and4 illustrate the ideas behind the droop controller. To remove transient fluctuations from the power calculations, 10π cutoff frequency low-pass filters are decided to apply for the instantaneous signals of active and reactive powers (P and Q).

Loops of virtual impedance (virtual resistor = 0.1 and virtual inductor = 0.1) are used to enhance control performance (see Figure 3). Reference inverter voltages in the αβ-frame are derived from the voltage produced by the power controller and virtual impedance loops, as well as the voltage drops caused by the line impedance. Current and voltage controllers are implemented in the discrete domain using PR controllers to eliminate high-frequency disturbances and dampen the responses, respectively.

High-level controllers like SCUs are required to bring the system’s frequency and voltage back to their nominal values and improve upon the droop controller method [34]. This is due to the fact that droop controller-based low-level control is incapable of restoring their set points. The secondary controller’s main job is to fix any steady-state errors caused by the droop controller. In this paper, the distributed secondary intelligent controllers for frequency and voltage parameters are implemented using ANNs-based PI controllers. ANNs are proposed for online tuning parameters of PI controllers to minimize frequency and voltage fluctuations under load changing conditions. Also, other ANNs are proposed to create reactive power compensators with minimal deviations. Finally, voltage and reactive power compensators are combined to compensate any secondary-to-primary voltage deviation, while global frequency-based compensator is adopted to compensate secondary-to-primary frequency deviation. These deviation values are applied to the primary control layer for the restoration of nominal values of volt-age and frequency.

3. Modeling System-Generation Resources

3.1. Solar Photovoltaic

To model the operation of a PV cell, an equation defining the I-V relationship between the cell’s one diode and two resistors is provided in in the following equation [35, 36]:where represents the photocurrent, the diode’s saturation reverse current, the series voltage (which includes the voltage drop across the PV series resistor), is the shunt resistor responsible for current loss through highly conductive shunts across the p-n junction, and the ideality factor () characterizes the degree to which the diodes diverge from their ideal state. The diode’s thermal voltage, denoted by , depends on the temperature (), the number of series cells (), the Boltzmann constant (), the charge on an electron ().

The photocurrent, denoted by the following equation, depends on both the amount of solar irradiance reaching the module and the temperature of the PV cells.where is the deviation in temperature from the nominal temperature, is the reference irradiance, and is the photocurrent measured under the reference conditions (temperature = 25°C and irradiance = 1000 Watt/m2). Both the solar irradiance () and the temperature coefficient () are given in terms of watts per square meter.

The cell’s open-circuit voltage () varies with temperature, as shown by the following equation:where is the V oc at nominal temperature and is the temperature coefficient for this voltage. The saturation current through the diode can be determined by solving for .where is the normal short circuit current.

3.2. Battery Energy Storage System (BESS)

Two important factors representing the battery state in a BESS are the terminal voltage and the SOC, which are depicted as follows [37, 38]:where represents the battery’s internal resistance; is the open-circuit voltage; is the charging current from the BESS; denotes the polarization voltage; represents the battery’s capacity; denotes the exponential voltage; and is the battery’s total storage capacity.

4. Islanded MG Cyber-Physical Model

4.1. Cyber Layer

DGs are treated as agents in the cyber layer. DGs communicate with each other via a sparse communication network. To describe the communication network, we use , where is the set of nodes relating to each DG and is the set of edges relating to the communication link.

Node is indeed a neighbor of node if an edge defined as exists . represents the adjacency matrix where for all , and if and only if , otherwise . denotes the neighbors of node , and the definition of degree of node is . The symbol stands for the Laplacian matrix of the graph , where is the graph’s degree matrix. A path in a graph is defined as a connected edge, and the graph is linked if there is a path connecting any two nodes. Figure 5 illustrates the proposed cyber-layer communication system. In the adopted communication system, the adjacency matrix is given by the following equation:

4.2. Proposed Primary Control

A VSI, a power LC filter, and an output connector are adopted to connect a 3ϕ inverter-based to the MG at the physical layer. The inductances, capacitances, and resistances of the LC filter are denoted by , , and , respectively, while the inductances and resistances of the output connector are denoted by and , respectively. and represent the inductances and resistances, respectively, between pairs of DGs.

The primary control of consists of the droop-based power controller, the PI current and voltage controllers, as shown in Figure 3. Power controllers for uses to regulate angular frequency () and voltage (), which can be found in references [39, 40].where and are the coefficients for frequency and voltage droop. Active and reactive power are made up of and , which can be calculated and filtered using two low-pass filters. In this paper, the primary control reference signals are and which are created by the secondary control.

In order to improve the control performance by virtually increasing the network’s inductance, virtual impedance loops in αβ-frame have been applied in primary control using the following equations:where and are the virtual resistance and inductance, and are inverter’s currents in αβ-frame, and are the drop voltages compensation due to line impedances.

The PI controller of an inverter has well-known disadvantages, including steady-state errors in magnitude and phase responses and restricted capability for disturbance rejection [41]. The proposed αβ-frame-based voltage and current control loops adopt PR controllers. Current harmonic tracking is used in the current control loop to provide nonlinear currents to nonlinear loads, and voltage harmonic suppression is applied in the voltage control loop to reduce voltage harmonics [42]. The voltage and current controllers use generalized integrators (GI) to eliminate steady-state error. The transfer function of the PR controller is described by the following equation [43, 44].where the resonant constant () is responsible for eliminating steady-state error [42]. The bandwidth, centered on the resonance frequency, is defined by the parameter . The proportional gain of the PR controller, like that of the classical PI controller, defines the operating range and the margin of stability [45].

The GI in equation (11) is decomposed into two easy integrators as follows to facilitate the discretization:

Figure 6(a) is a schematic representation of the GI equivalent form. It is recommended that the forward method be used to discretize the direct integrator and the backwards method be used to discretize the feedback integrator, resulting in

This leads to the following expression for the transfer function of the PR controllerand can be expressed as follows in discrete form:where is the control input signal to the plant transfer function (G(s))

Figure 6(b) illustrates the block diagram of the implementation of the PR control. The antiwindup function (A) described asand has been included to avoid the well-known winding up issues.

The outer voltage PR controller is adopted for providing the reference αβ-frame currents ( and ) to the inner current PR controller using the following equations:where and are the αβ-frame inverter voltages, and are the control parameters of the voltage PR controller.

The inner current controller generates the reference voltage for the VSI in αβ-frame ( and ) using the following equations:where and are the control parameters of PR current controller.

Using the inverse of Clarke transform, the inverter’s voltage reference signals in αβ-frame are then transformed into abc-frame as follows:

Then, these three phase voltage signals are applied to the pulse width modulation (PWM) generator in order to turn on/off the power electronics switches of the corresponding VSI.

Table 4 illustrates the main control parameters for the voltage and current PI controllers.

4.3. Framework of Proposed Consensus-Based IDSCS

Voltage and frequency of DGs depart from nominal values due to droop control. Moreover, it is impossible to achieve equitable power distribution among DGs in the case of mismatching line impedances. In this paper, the objective of the IDSCS is to restore voltage/frequency to its nominal values while keeping active/reactive power sharing among DGs. This is achievable by consensus, where each DG is treated as an agent and its neighboring members exchange information via a distributed cyber-layer network. Figure 7 demonstrates the framework of the presented IDSCS for frequency/voltage and active/reactive power control, which includes compensation and estimation sublayers. In a distributed fashion, the estimation sublayer collects data on the average frequency, voltage, active power, and reactive power, and then transmits it to the compensation sublayer. The second sublayer computes the reference signals ( and ) and transmits it to the primary control in order to regulate the frequency and voltage of each DG.

4.3.1. Estimation Sublayer

A state estimator called average frequency estimator (AFE), average voltage estimator (AVE), and average reactive power estimator (ARPE) based on the average information about frequency, voltage, and reactive power is found using discrete consensus algorithms. represents the average estimation signal of frequency, voltage, and reactive power, respectively, at each iteration . receives the neighboring estimates via the communication network.

Through the communication network, receives the neighboring estimates , , and the state estimators are modified as shown in the following equation:where the step-size that should satisfy to ensure algorithm convergence.

eventually approaches the average value of frequency, voltage, and reactive power, which can be written as the following expression:

The consensus-based state estimators allow DGs to evaluate the average frequency, voltage, and reactive power in a fully distributed manner, as opposed to the conventional centralized method.

4.3.2. Compensation Sublayer

To obtain frequency and voltage regulation, each DG must measure the frequency and voltage errors and compensate for the primary control-caused deviations. In the meantime, the estimated average reactive power serves as a benchmark for each DG to eventually realize power sharing. For , two compensation terms are computed:where denote the ANNs-based tuned proportional and integral gains of PI frequency controller, while the proportional and integral parameter gains for the PI voltage controller.

The ANNs are used to develop the reactive power compensators which produce output signals () correspond to the minimum deviations in reactive power (next section for details). For all DGs, and stand for the universal reference frequency and voltage, respectively. Once the compensation terms are added to and , the secondary-to-primary frequency and voltage signals ( and ) are applied to the primary control of and they can be calculated as follows:

5. ANNs-Based Proposed IDSCS

5.1. ANNs-Based Online Tuning PI Controller

We use an intelligent algorithm to fine-tune the control parameters in real-time in order to improve the capabilities of secondary controllers. Voltage and frequency control must be controlled simultaneously for the efficient and reliable operation of the MG. Therefore, we develop IDSCS based on ANNs. In particular, the ANN is a parallel processing tool comprised of numerous processing components. To accomplish a specific goal, these components are organized in a particular manner. Its benefits include parallel processing, extensibility, and tolerable mechanisms for noisy and uncertain processes. In general, feedforward and feedback processes are applied to the training process and weight adjustment.

The operating point of the MG changes as a result of changing load conditions. Thus, noticeable variations can be seen to occur in both frequency and voltage signals. It is necessary to make online adjustments to the control parameters of frequency and voltage compensators using ANNs to prevent this issue. This broadens the range of operational conditions. The proposed IDSCS is shown pictorially in Figure 3. First, both the frequency and voltage deviations are being collected. These data are processed and used as the inputs to the ANN, and the appropriate learning rules are applied in order to make adjustments for the weights of the nodes. As a direct consequence of this, accurate set-points are produced in each DG. By carrying out the control procedure, a risk-free outcome is achieved, which in turn ensures that the MG voltage and frequency will continue to be stable.

An ANN-based PI controller is composed of three layers: the input, output, and hidden layers. We have decided to utilize five neurons for the input layer based on the information supplied by the system expert. Twenty neurons are located in the hidden layer. In the input layer, the neurons are of the linear type, while in the hidden layer, they are of the nonlinear type. The number of controlling variables determines how many neurons comprise the output layer. As shown in Figure 2, the investigated MG is composed of a total of five DGs. Each DG has two SCUs, one for voltage signal and other for frequency. Each of these controllers possesses a proportional gain parameter in addition to an integral gain. Consequently, the output layer contains two linear neurons per SCU. The feed-forward mechanism activates the hidden and output layers when the input date is considered. A neuron is the fundamental building block of an ANN, and it consists of three primary components: weights, biases, and activation functions. The labels indicate the incoming data. The equation (35) depicts the relationship between these variables.where is the total number of input layer neurons, stands for bias, is the activation function, is the weights of the hidden layer at iteration , and indices and are the input layer and output layer neurons, respectively. may indeed be sign, logsigmoid, tansigmoid, etc. For learning algorithms such as the back-propagation algorithm, activation function derivative () are required. Because the control parameters ( and ) cannot be negative, of output layer neuron employs the non-negative sigmoid function. In addition, it is essential to provide the correct initial conditions for an ANN-based controller. The desired initial values of the voltage and frequency signals are set to their nominal values .

The activation function differential at the hidden layer can be written as [46].

Calculation of the network’s output layer nodes iswhere represents the hidden layer neurons, is the weight vector for the output layer at iteration , represents the neurons number in output layer.

The frequency and voltage PI controllers’ parameters can be computed as follows:where the denote the outputs of ANNs, which are frequency and voltage controllers’ proportional and integral gains, respectively.

The frequency and voltage outputs are compared to their desired vector, denoted by , in order to enhance frequency and voltage performance through intelligent online tuning of control parameters using an ANN structure. This study employs a supervised learning method to learning. The back-propagation method is used to implement the learning approach. The following is the error function at the neuron and iteration [46]:where represents the measured output and denotes the desired output.

The weights have been updated as follows based on the error [46]:where and denote the weight changes due to the system error value. The indices , , and represent the neurons in the input layer, hidden, and output layers, respectively.where represent the learning rate (it is small positive number), and represents the error gradient at iteration and neuron in the output layer.

Multiplying the error at the output neuron by the derivative of the activation function yields an error gradient. This means that in the output layer, for neuron k, we havewhere at iteration , is the net weighted input to neuron at the same iteration in the process.

For a sigmoid activation function, equation (43) can be written as

Consequently, we getwhere

The weight correction for the hidden layer can be determined using the same formula as for the output layer:where represents the error gradient at neuron:where denotes the count of output layer neurons.

The process of learning will continue until the minimum amount of error is reached.

5.2. ANNs-Based Reactive Power Compensator

To produce minimum deviations in reactive power, the ANNs-based reactive power compensators use the same technique as described in the previous subsection. In every DG, the voltage compensator output compensating term (equation (33)) is added to the reactive power compensating term and the reference system voltage. The complete summation signal must be applied to the primary control level in order to compensate for any voltage deviation.

In addition, back-propagation is employed to implement the learning strategy, along with equations (39)–(49).

6. Simulation Results and Discussion

The proposed islanded MG has been simulated in MATLAB/Simulink environment. We have carried out the three described scenarios below:Scenario #1: The MG operates with an overall proposed control structure and an unchanged load conditions.Scenario #2: The MG operates with secondary and primary control separately with an unchanged load conditions.Scenario #3: The MG operates with an overall proposed control structure and changing load conditions.

In the starting condition of the first work’s scenario, the system is under the proposed control structure and constant load (58 kW + j24 kVAR). There are three adopted loads, as shown in Figure 2, and they are all the same: (58 kW + j24 kVAR)/3, with a 0.924 power factor (active power/apparent power). The evolutions of the frequency, voltage, active power, and reactive power responses of all DGs are shown in Figures 8(a)8(d). It is cleared that the proposed control can maintain frequencies and voltages to their nominal values (50 Hz and 220 V). The active/reactive power of all DGs share the load power equally, as shown in Figures 8(b) and 8(d). The voltage signals at each load are illustrated in Figure 9. The load voltages here are unmistakably sinusoidal signals of constant amplitude, which match up very well with the nominal system values. The root mean square values of the load voltages per phase are illustrated in Figure 9(b). In Figure 10(a), the current signals of each loads are shown. Since the loads are held constant in this scenario, the resulting currents can be seen to be sinusoidal signals of constant amplitude. The root mean square values of the load currents per phase are illustrated in Figure 10(b). Each load draws a current of up to 33 A.

In the second scenario’s starting condition, the system is under the IDSCSs and constant loads. After 5 seconds, the system operates with primary control level only. The evolutions of the output frequency, voltage, active power, and reactive power of all DGs are shown in Figures 11(a)11(d). It is cleared that the proposed control can maintain frequency and voltage of each DG to their nominal values (50 Hz and 220 V) in the interval of [0 10] second. In this interval, it is capable of accurately sharing active/reactive power, the active and reactive power distributed by DGs is equally sharing. After this interval, it is seen that the DGs cannot equally sharing active and reactive load power due to the frequency and voltage deviate below the nominal values. Figures 12(a) and 12(b), respectively, show the root mean square values of the load voltages and currents measured across each phase of the distribution system. Before the time point (5 second), the load voltages are maintained at their nominal values while being kept at a constant level. After this period of time, there was a deviation from the nominal value, which caused a drop in the load current.

In the third scenario, the load starts at 58 kW + j24 kVAR at 0 seconds, increases by 50% at 10 seconds, increases by another 50% of the initial total at 20 seconds, returns to 150% at 30 seconds, and then returns to 100% at 40 seconds. Figures 13 display the time series of frequency, voltage, active power, and reactive power output by all DGs. As can be seen, regardless of load changes, the proposed IDSCSs can keep frequencies and voltages of all DGs within nominal ranges. In all scenario time, the IDSCSs are in effect, and it can accurately share active/reactive power regardless of whether the load is increased or decreased; DGs distribute both active and reactive power in an equal fashion. Figure 14 illustrates the voltage signals at each load in the third scenario. The load voltages here are unmistakably sinusoidal signals with constant amplitudes, and they remain very close to the specified system values even as the load values vary. See Figure 15(a) for a visual representation of the current signals drawn by each load. Because the load changes, the resulting currents can be visualized as sinusoidal signals whose amplitudes increase and decrease proportionally to the change in load values. Figure 15(b) illustrates the values of the load currents’ root mean square per phase. To maintain the desired frequency and voltage levels, the ANNs made real-time adjustments to the control parameters of the frequency and voltage PI controllers in all of the adopted SCU-based DGs. In response to variations in critical operating variables, these modifications are being implemented. These adjustments are being made in light of shifting operating parameters. The variation graphs for these parameters are shown in Figure 16.

7. Conclusion

This paper proposes IDSCS for three-phase islanded MG. Two control levels made up the control structure based on the stationary reference frame. By using an -frame, voltage and current inner control loops and inverter mathematical models require fewer computing resources. Unlike traditional -frame-based control methods, this work does not require any or transformations. The droop control serves as the foundation for the primary control. By essentially increasing the network’s inductance, the virtual impedance-based primary control is used to enhance control performance. The secondary control level is meant to compensate for the frequency and voltage deviations caused by the primary control. The IDSCS is proposed in multiagent MG-based consensus algorithm and ANNs for carrying out voltage/frequency restoration and sharing active/reactive power. The consensus-based state estimators produce average frequency, voltage, and reactive power discrete signals. The average voltage and frequency signals are applied with their nominal values into ANNs-based PI compensators. ANNs are proposed here for online tuning the control parameters of the PI controllers. The combination of PI controller and ANNs utilizes the simplicity of the PI controller mathematical formula and the capacity of ANN to handle parameter variations and nonlinearity. The outputs of these controllers represent compensating voltage and frequency deviation signals. Also, ANNs are proposed to implement reactive power compensators. The primary control level adopts secondary-to-primary frequency compensating to correct any frequency deviation. By combining the output values from the reactive power and voltage compensators, the secondary-to-primary compensating signal is applied to the voltage primary loop. In contrast to traditional secondary control, the presented secondary control strategy dynamically adapts to changes in the load; it not only maintains frequency and voltage but also ensures accurate control of active and reactive power during the process, realizing the MG’s reasonable operation in the process. The MATLAB/Simulink platform is used to validate the proposed control strategy, and it shows that all agents can agreeably accomplish control goals in consensus.

It is feasible in the future to implement practically the proposed approach in a real renewable resources-based microgrid that functions in isolated operation. Moreover, the demand response program may be considered to transfer loads from peak to off-peak operating hours in order to minimize peak-to-average power consumption and improve load factor.

Data Availability

No data were used to support to this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.