# Operation of Parallel Inverters in Microgrid Using New Adaptive PI Controllers Based on Least Mean Fourth Technique

Authors: A. Elnady; M. AlShabi
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

This paper shows the operation of the microgrid using a new adaptive PI controller based operational (control) scheme. The core of the proposed control scheme is the suggested adaptive PI controller. The parameters of the PI controller are adaptively tuned using a variable step-size least mean fourth algorithm with no need for any system model to operate this adaptive controller. The main merit of the proposed scheme is that it stabilizes the magnitude and frequency of the voltage at any loading condition such as variable balanced loads, variable unbalanced loads, and nonlinear loads. The proposed scheme has a simple structure and accurate performance. In addition, the structure of proposed scheme provides a seamless transition toward any loss or reconnection of any inverter in the microgrid. Furthermore, the suggested operational scheme is flexible enough to enable the microgrid to be operative in a grid-connected mode and to transfer from the voltage control mode to power control mode with a smooth transitional procedure. To validate the meritorious performance of the suggested scheme, its performance is compared to similar schemes based on a linear controller (regular PI controller), single-neuron PI controller (adaptive PI controller), recursive least square-support vector machine based PI controller (another adaptive PI controller), and nonlinear controller (sliding mode controller) for different operations of the microgrid.


---

## Body

## 1. Introduction

The microgrid is a new effective trend in the power system. It gains much popularity nowadays because it solves many problems in the power system [1–3]. The microgrid can accommodate diverse renewable energy resources with power electronics interface. In the microgrid, the carbon emission is minimum compared to the central grid. The microgrid is a perfect solution for the isolated or far-sited loads. The microgrid has a capability to work in an autonomous mode (microgrid mode) and in a grid-connected mode [4]. The microgrid can be considered as backup generation in case a small portion of the central grid experiences some outages.The operation of the microgrid is mainly dictated by its operational (control) scheme, which is adopted to operate this microgrid. The control scheme of the microgrid is mainly divided into two main categories. The first category is the droop control schemes (communication-less based schemes) and the second category is the distributed control schemes (communication based schemes). Each category has its own merits and demerits [5–10]. The droop control scheme has the advantage of its independence since it is not required to have any communication among the generation units. Yet, it suffers from some drawbacks, which can be briefly summarized as follows:(1)
Accurate sharing for power necessitates a steep slope of its droop characteristics, which makes a considerable variation in voltage and frequency.(2)
The variable impedance of the feeders greatly influences the operation of the droop control and it creates a circulating current.(3)
The X/R ratio impacts the performance of the droop. If this ratio is high, the performance is good and vice versa. In the distribution system, this X/R ratio is low, which inflicts the performance of the droop control.(4)
The low X/R ratio of the distribution feeder increases the coupling between active power and reactive power, which entails substantial modifications to the conventional droop control.(5)
Existence of the injected harmonics deteriorates the droop performance because the droop is mainly designated for the fundamental voltage and current.All aforementioned problems motivate the researchers to utilize the second category. The main problem of the distributed control is its essential communication among its generation units (inverters). The main focus of this paper is directed toward the second category. Therefore, the literature survey of this paper focuses on the distributed current control schemes.The distributed current control scheme has a typical structure of two cascaded control loops [6, 8, 11], which are named in the literature as the primary current control loop (inner loop) and secondary voltage control loop (outer loop). The primary control loop is accountable for adjusting the injected current of the inverter. The secondary control loop is responsible for controlling the voltage at the loads’ side. The publications related to the distributed current control give more attention to the different schemes used in this category along with the utilized controller of the primary control loop.Several schemes are used in the distributed current control. The average and instantaneous current sharing scheme is employed to equalize the current injected by inverters [12], which requires a sort of communication among these inverters to get the power and current share of each inverter. Another scheme is called the master-slave scheme [13], where one inverter is responsible for adjusting the voltage and the other inverters share the load current and power. This scheme suffers from robustness due to the loss of the master inverter. Some modifications have been suggested to this scheme to increase its robustness and modularity. The circular chain control (3C) is another scheme, which is introduced to operate the distributed generation system [14]. This scheme has a typical structure of two cascaded control loops (inner for current and outer for voltage). This scheme requires communications among the inverters such that the inner current loop tracks the current of the previous inverter. A current limiting control is introduced in [15], where its control scheme consists of two loops: one for voltage and the other one for current. The current command of each module (inverter) is generated by the previous module based on the module capacity. By limiting the output current command of these modules in [15], each module has to share the load current with a different factor not similar to the factors provided by all previous modules.The core of the primary control loop (current control) is the controller that is adopted to govern the primary control loop in terms of adjusting the injected current of the inverter. The most widely used controllers in the current control are the PI or PID controller in thed-q rotating frame and the proportional-resonant (PR) or proportional-complex-integral (PCI) controllers in the α-β stationary frame [16]. The main shortcoming of the PI and PR controllers is that they do not give their optimum performance at all operating conditions. The predictive current control is proposed in [17], where the current error is corrected by an adaptive strategy. It has the disadvantage of susceptibility to the system uncertainty. The deadbeat controller is commonly used for current control [18], in which the current error is predicted and corrected from an adaptive self-tuning load model. The sliding mode control is also utilized for the current control in the distributed generation system [19]; it proves that it is a robust controller for any uncertainty in the system, but its main problem is the chattering that appears due to the existence of the discrete input in its control law. The 2nd order sliding mode current control [20] is also utilized in the distributed generation system so as to precisely govern the injected current with the minimum chattering level. The H∞ current controller allows maintaining balanced currents for the three-phase four-wire inverter [21].This paper presents an innovative operational (control) scheme to stabilize the voltage along with its frequency in the microgrid under different loading conditions such as variable balanced loads, variable unbalanced loads, and nonlinear loads. This operational scheme is based on the self-adaptive PI controller, which has not been used before for microgrid operations. The suggested controller innovatively adapts its own parameters such that the error cost function is minimized at any operating condition; therefore, the proposed controller gives its best performance at any operation condition. This paper is composed of seven sections. The second section shows the microgrid under study. The third section explains the mathematical formulation of the proposed controller along with other controllers used to validate the performance of the proposed controller. The proposed control scheme is compared to other common controllers in the fourth section. The simulation results of the microgrid operation are illustrated in the fifth section. The results of the microgrid in a grid-connected mode are displayed in the sixth section. The findings are concluded in the last section.


## 2. Microgrid Under Study

This section shows the configuration of the microgrid with its simple mathematical model. To ease understanding this section, the microgrid under study with several inverters is already depicted in Figure1Figure 1
Microgrid under study.The load voltage of Figure1 is expressed as follows.(1)Eabc=Vabc-loads+Iabc-loads∗ZfeederEquation (1) is transformed from the a-b-c natural frame to the d-q rotating frame, which yields a state space form written as(2)
p
I
d
-
l
o
a
d
p
I
q
-
l
o
a
d
=
-
R
L
ω
ω
-
R
L
I
d
-
l
o
a
d
I
q
-
l
o
a
d
+
1
L
0
0
1
L
E
d
E
q
+
-
1
L
0
0
-
1
L
V
d
-
l
o
a
d
V
q
-
l
o
a
d
x
˙
=
A
x
+
B
u
+
F
dwhere p=d/dt; the microgrid is a group of generation units with groups of different loads. The microgrid parameters are listed in Table 1. The utilized inverter is the 5-level diode-clamped inverter, which gives small total harmonic distortion compared to the traditional 2-level and 3-level inverter. The operation and control of the 5-level diode-clamped inverter are well documented in [22]. The switching modulation of the 5-level diode-clamped inverter is the multicarrier pulse width modulation (PWM). The phase-disposition pulse width modulation (PD-PWM) [22] is the modulation technique considered to operate the three-phase 5-level diode-clamped inverters. All given load impedances in this paper are referred to the primary side of the transformer tr2.Table 1
Microgrid parameters.
Parameter/Description Values Voltage level = 6.6 kV Microgrid rating/base = 2.5 MVA Power Rating/inverter = 0.75MVA Feeder impedanceZf = 1.2 Ω + 1.5 j   Ω Transformer Tr1, Tr2 rating = 2.5 MVA Transformer Tr1 voltage ratio =1.32kV:6.6kV Transformer Tr1, Tr2 resistance = 0.0101   p u Transformers Tr1, Tr2 inductance = 0.1   p u Transformer Tr1, Tr2 rating = 2.5 MVA Transformer Tr2 voltage ratio =6.6kV:0.4kV Inverter Type 5-level Diode Clamped Inverter Number of Parallel Inverters in Microgrid Three


## 3. Proposed Operational Scheme

This section explains the proposed operational scheme, and how it works to stabilize the magnitude and frequency of the voltage at load side (point of common coupling). The subsequent sections clarify the formulation of the other controllers for comparison with the proposed controller.


### 3.1. Structure of Proposed Control Scheme for Microgrid Mode

This section explains the proposed control scheme used to operate the microgrid in an autonomous mode (microgrid mode). The control scheme for positive-sequence components is illustrated in Figure2. The control scheme of Figure 2 shows that the primary and secondary control loops stabilize the voltage at the load side. The primary current control loop (inner loop) is the main loop in the proposed scheme of Figure 2. The input of this primary control loop is the current reference (current command), which is received from the secondary control loop (voltage control), while the output of this primary current control (inner loop) is the required injected voltage by inverters. This required voltage is used to generate a control signal utilized to operate the switching modulation (PD-PWM). The secondary control loop (voltage control) receives the voltage reference in the a-b-c frame and generates the current references for the primary control loop. Its function is to stabilize the magnitude of the voltage at the load bus.Figure 2
Proposed scheme for microgrid operation.In the voltage control, its loop commonly employs a linear controller like a regular PI controller because the relation between the load voltage and fundamental load current is almost linear. Thus, a regular PI controller in this loop is enough to get a fast and suitable dynamic performance, whereas the current control governs another part of the microgrid along with the inverter circuits. Therefore, it is strongly recommended that this loop encompasses an efficient (self-adaptive) controller like what is proposed in this paper. The frequency of the generated voltage is always stable and constant because it is driven by an internal crystal clock with a constant frequencyωref as shown in Figure 2. This frequency loop is operated as an open loop control because the switching modulation (PD-PWM) does not change the frequency of the injected voltage and it is always constant regardless of any variation in loading conditions.The effectiveness of this control scheme is exemplified in the operation of the inverters’ module. This inverters’ module contains three three-phase inverters. Each three-phase inverter receives the same switching signals generated by the PD-PWM, meaning that each inverter independently injects a certain voltage to stabilize the voltage along with its frequency at the load side. Another advantage of this proposed structure for the operational scheme is that the total load current/power is equally divided among all working inverters. In case one inverter is disconnected/reconnected, the total load current is seamlessly redistributed among all working inverters with the minimum voltage transition (similar to plug-and-play capability) as will be illustrated in later sections. More importantly, this proposed scheme does not need any sort of communication among the inverters because each inverter is working independently of the others.


#### 3.1.1. Mathematical Formulation of Proposed Scheme/Controller for Balanced Loads

The proposed adaptive PI controller is based on adaptation of the controller parameters (KP,KI) using an improved version of the least mean fourth algorithm. In the primary control loop (current control), the error is defined as (3)ek=Irefk-Ifeedbackk=rk-ykwhere r=Iref, y=Ifeedback. The recursive form of the adaptive PI controller is expressed using the Dahlin formula as in [23](4)uk=uk-1+KPek-ek-1+KIekwhere KP, KI are the parameters that should be recursively changed such that the error of (3) is minimized using the least mean fourth algorithm whose cost function is defined as follows.(5)J=min⁡e4The controller is redefined in terms of some weights as(6)uk=uk-1+K1W1kX1k+K1W2kX2kwhere X1=(e(k)-e(k-1)), X2=e(k), KP=K1W1, KI=K2W2. The optimization of the cost function in (5) is obtained from its gradient descent with respect to the variables (W1,W2) [24], and the result of the differentiation of the cost function is given as follows. (7)∂J∂W1=ΔW1=-∂∂W1e4=-4ηe3∂u∂W1∂e∂u=4ηe3K1X1∂r-y∂u∂J∂W2=ΔW2=-∂∂W2e4=-4ηe3∂u∂W2∂e∂u=4ηe3K1X2∂r-y∂uThe term ∂y/∂u is calculated based on the model of the system of Figure 2. The output of each control loop y is equal to the injected voltage E in each loop as shown in Figure 2. From the formula of (2) and the block diagram of Figure 2, it can be deduced that ∂y/∂u is equal to 1 in both loops. Some modifications have been introduced to improve the overall adaptation mechanism for the controller parameters. These modifications are listed as follows.(1)
In order to improve the stability of the adaptation mechanism. The normalized LMF is considered for adapting the controller parameters [25]. Its stability is improved because the input power does not depend on the adaptation mechanism as proved in [25]. The formula of (7) is modified such that the normalized least mean fourth algorithm is defined as (8)ΔWik=4ηe3kK1XikXik2=η′e3kK1XikXik2where the subscripti shown in (8) indicates either 1 or 2 as shown in (7).(2)
The adaptation mechanism is again modified to fasten its convergence. The suggested modification is to make the step-sizeη′ variable not fixed. A large step-size makes faster convergence and more fluctuation and vice versa. The effective variable step-size algorithm is defined in [26](9)η′k=αpkX′k∗XkX′k=X1X2X1=ek-ek-1X2=ekpk=λpk-1+1-λXkekη′k=η′kη′k<ηmaxηmaxη′k>ηmaxwhereα is a factor selected by trial and error to balance between the convergence rate and stability of adaptation mechanism, λ is a forgetting factor used in the calculation of correlation process, and p(k) is an estimate of the correlation between the input and the error.The final adaptation mechanism, including all proposed modifications, is defined as(10)ΔW1k=η′ke3kK1X1kX1k2W1k=Wk-1+ΔW1k(11)ΔW2k=η′ke3kK1X2kX2k2W2k=Wk-1+ΔW2kwhere η′(k) is defined in (9). The final equations of the normalized least mean fourth algorithm (NLMF) are combined to form the self-adaptive PI controller of (6) along with (9), (10), and (11). The parameters of the suggested adaptation algorithm are tabulated in Table 2.Table 2
Parameters of proposed adaptive and regular PI controllers for positive loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 2e-4 α = 0.0125 λ = 0.75 η m a x = 7.5e-3 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Adaptive PI controller of q-axis in current loop K 1 = 1.05e-4 α = 0.7 λ = 0.000125 η m a x = 7.5e-5 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Regular PI controller of d-axis in voltage control K p = 0.282 K I = 1.333  Regular PI controller of q-axis in voltage control K p = 0.423 K I = 0.111


#### 3.1.2. Mathematical Formulation of Proposed Scheme for Unbalanced Loads

The objective of the proposed scheme to deal with the unbalanced loads is to stabilize the positive-sequence voltages at 1 pu (100 %) and mitigate all negative-sequence voltages to the smallest possible level. The control diagram of Figure2 is used for the positive-sequence voltages with the voltages references for the system under study of Figure 1 as follows.(12)V+a-ref=6.6300kVV+b-ref=6.63-1200kV,andV+c-ref=6.631200kVTo deal with the negative-sequence components, another scheme similar to the control scheme of Figure 2 (current and voltage control loops) is paralleled with the original one to mitigate the negative-sequence voltages with the voltage references given as follows.(13)V-a-ref=0kV,V-b-ref=0kV,andV-c-ref=0kVEven the mathematical formulation for the negative-sequence component is similar to (2) with changing the sign of ω. The whole control block diagram for operating the microgrid at any load is clarified in Figure 3. Eventually, the output control signals of the positive-sequence and negative-sequence components are aggregated to operate the PD-PWM. The parameters of both adaptive and regular PI controllers of the negative-sequence components are tabulated in Table 3.Table 3
Parameters of the proposed adaptive and regular PI controllers for negative loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 2e-4 α = 0.00125 λ = 0.75 η m a x = 7.5e-3 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Adaptive PI controller of q-axis in current loop K 1 = 1.05e-4 α = 0.7 λ = 0.000125 η m a x = 7.5e-5 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5Figure 3
Complete operational block diagram for proposed scheme for positive and negative components.


#### 3.1.3. Mathematical Formulation of Single-Neuron Adaptive PI Controller

To prove the advantageous performance of the suggested controller, the proposed adaptive controller is compared to another commonly used adaptive PI controller, which is the single-neuron (single-perceptron) based PI controller. The single-neuron is the smallest unit in the neural network; it is operated based on the Hebbian rule [27] where the updated weights are given as(14)ΔWik=ζekXikukWik=Wik-1+ΔWikW′ik=Wik∑i=12Wikuk=uk-1+K1∑i=12W′iXikwhere ζ is a positive fixed step less than one. The formulation of (14) is employed to adapt the parameters of the PI controller. The single-neuron PI controller replaces the proposed controller (normalized LMF based PI controller) in the control scheme of Figure 2 and operational bock diagram of Figure 3. The parameters of the single-neuron adaptive PI controller for positive control loops that give the best performance are written in Table 4.Table 4
Parameters of single-neuron adaptive and regular PI controllers for positive loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 1.5e-3 η → W 1 = 6e-5 η → W 2 = 3e-5 W 1 ( 0 ) = 1 W 2 ( 0 ) = 1  Adaptive PI controller of q-axis in current loop K 1 = 5e-5 η → W 1 = 0.15 η → W 2 = 0.015 W 1 ( 0 ) = 1 W 2 ( 0 ) = 1  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


#### 3.1.4. Mathematical Formulation of Recursive Least Square Adaptive PI Controller

For the sake of tough comparison, the proposed adaptive controller is compared to the recursive least square based PI controller (RLS-PI) presented in [27]. This PI controller parameters are recursively adapted using the same algorithm given in [27], which is newly formulated here as follows.(15)Kpk+1=Kpk+ηX2kdykdxX1kKIk+1=KIk+ηX2kdykdxX2kThe adaptation mechanism of (15) is similar to those described before as X1=(e(k)-e(k-1)), X2=e(k), and η is a fixed learning rate. However, the adaptation of (15) differs in how to calculate the derivative term (dy(k)/dx) with no need for the system model of Figure 2 or system equation of (2). The derivative term is calculated from the estimated function y(k) with respect to the input (x), which is estimated using the least square-support vector machine (LS-SVM) defined in [28] as(16)yk=∑i=1LαiWk,ixb+bwhere Wk,ixbo (defined in (17)) is a Kernel function of the support vector machine (SVM), and it is a function of batch of n output data and m input data, represented in xbo as xbo(k)=y(k)...y(k-n+1)...u(k)...u(k-m+1)T. (17)Wk,ixbo=exp-1σ2xbok-xbojTxbok-xbojn and m are related to the system order. On the other hand, αi is a constant and it represents the ith item in α(k), which is defined as(18)αk=WbkYbk-1L×1bkwhere Yb(k) is a batch of the output data points in the sliding window of length L sorted as Yb(k)=y(k)…y(k-L+1)T, Wbk is the batch of the Kernel functions in the sliding window and it is defined in (19), and b(k) is the average constant of b in the sliding window and it is defined in (20).(19)Wbk=Wk-1,k-1xbo+C⋯Wk-L,k-1xbo⋮⋱⋮Wk-1,k-Lxbo⋯Wk-L,k-Lxbo+C(20)bk=WbkYbk1L×1TWbk1L×1where C is a constant. The derivative of (16) yields the following.(21)dykdx=1σ2∑i=k-Lk-1αi-k+L+1kuk-uiWk,ixboThe derivative formula in (21) is then plugged in (15). The RL-SVM based PI controller replaces the proposed controller (normalized LMF based PI controller) in the control scheme of Figure 2 and its operational bock diagram of Figure 3. The parameters of the RL-SVM based PI controller for the positive control loop that give the best performance are written in Table 5.Table 5
Parameters of RL-SVM based PI and regular PI controllers for positive loop.
Parameters Value  RL-SVM-PI controller of d-axis in current loop K P = 1.5 K I = 1e-17 η 1 = 1e-6 η 2 = 1e-12 σ 2 = 100 C = 10  RL-SVM-PI controller of q-axis in current lop K P = 1.5 K I = 1e-17 η 1 = 1e-6 η 2 = 1e-12 σ 2 = 100 C = 10  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


#### 3.1.5. Mathematical Formulation of Sliding Mode Controller

Another robust controller is added in this paper to compare its performance to the proposed controller of Figure2. This candidate is very efficient since it is a robust nonlinear controller, which is the sliding mode controller. The adopted sliding mode controller is formulated for the current control loop. The mathematical formulation of this sliding mode control is already detailed in [19]. The utilized control law in this paper is an aggregated form of two terms, which are written as(22)n=nc+neqwhere nc is the corrective input, which pushes the system trajectory from its initial location to the sliding manifold, while neq is the equivalent input that keeps the system trajectory on the sliding manifold. The definition of the sliding manifold follows the integral sliding mode control and it is given as (23)s=e+λ∫edtThe corrective input is associated with a boundary layer to minimize the chattering and it is defined as(24)
n
c
=
-
k
1
s
α
→
s
>
β
-
s
β
→
-
β
<
s
<
β
+
k
2
s
α
→
s
<
-
βwhere k1,k2,β are positive constants.Theneq is designed such that the system with the sliding mode controller becomes stable; the system stability is derived by Lyapunov stability criterion such that the adopted Lyapunov function is selected to express the distance between the system’s state and sliding manifold, and its definition is written as (25)Vs=12sTsThe derivative of this function should be less than or equal to zero as (26)V.s=dVsdsdsdt=sTs˙<=0For tracking problem like the case of this paper, V.(s)=0→s.=0, which leads to the following.(27)s˙=e˙+λe=0s˙=r˙-y˙+λeThe state space form of the system model is given as (28)y˙=Ax+Bu+FdSubstitution of (28) in (27) leads to the following.(29)s.=-Ax+Bneq+Fd+λe=0The Lyapunov function requires that its derivative is equal to zero for the stable system. This condition yields the following.(30)s˙=-Ax+Bneq+Fd+λe=0Eventually, the equivalent input is given as (31)neq=-B-1Ax+Fd-λeThe control law of (22) and (23) with its two terms in (24) and (31) is used to control the injected current of the primary control loop. Eventually, this current controller replaces the proposed adaptive PI controller in the control scheme of Figure 2 and its operational block diagram of Figure 3. The parameters of the sliding mode controllers for positive control loops are written in Table 6.Table 6
Parameters of sliding mode and regular PI controllers for positive loop.
Parameters Value  Sliding mode controller of d-axis in current loop λ = 100 k 1 = 0.8 k 2 = 0.8 β = 20  Sliding mode controller of q-axis in current loop λ = 81 k 1 = 0.8 k 2 = 0.8 β = 20  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


### 3.2. Structure of Proposed Control Scheme for Grid-Connected Mode

Sometimes the microgrid is required to be connected to the main power grid (distribution system) in order to acquire some benefits [4, 5]. The main challenge that faces the suggested control scheme in the grid-connected mode is how to transfer the control concept from the constant voltage/frequency operation to constant current/power operation because both the grid voltage and its frequency are governed by the power grid in a grid-connected mode. Therefore, an additional power control loop is integrated with the utilized operational scheme as depicted in Figure 2. In this additional control loop, any power reference is converted into a current reference, which is consequently applied (as input) to the primary current control loop of the scheme illustrated in Figure 2. The power formula in the d-q frame is expressed as (32)PQ=32VDG-dVDG-qVDG-q-VDG-dIDG-dIDG-qThen, the current reference of power control can be deduced using the inverse of (32) as (33)IDG-d-refIDG-q-ref=23VDG-dVDG-qVDG-q-VDG-d-1PrefQref


## 3.1. Structure of Proposed Control Scheme for Microgrid Mode

This section explains the proposed control scheme used to operate the microgrid in an autonomous mode (microgrid mode). The control scheme for positive-sequence components is illustrated in Figure2. The control scheme of Figure 2 shows that the primary and secondary control loops stabilize the voltage at the load side. The primary current control loop (inner loop) is the main loop in the proposed scheme of Figure 2. The input of this primary control loop is the current reference (current command), which is received from the secondary control loop (voltage control), while the output of this primary current control (inner loop) is the required injected voltage by inverters. This required voltage is used to generate a control signal utilized to operate the switching modulation (PD-PWM). The secondary control loop (voltage control) receives the voltage reference in the a-b-c frame and generates the current references for the primary control loop. Its function is to stabilize the magnitude of the voltage at the load bus.Figure 2
Proposed scheme for microgrid operation.In the voltage control, its loop commonly employs a linear controller like a regular PI controller because the relation between the load voltage and fundamental load current is almost linear. Thus, a regular PI controller in this loop is enough to get a fast and suitable dynamic performance, whereas the current control governs another part of the microgrid along with the inverter circuits. Therefore, it is strongly recommended that this loop encompasses an efficient (self-adaptive) controller like what is proposed in this paper. The frequency of the generated voltage is always stable and constant because it is driven by an internal crystal clock with a constant frequencyωref as shown in Figure 2. This frequency loop is operated as an open loop control because the switching modulation (PD-PWM) does not change the frequency of the injected voltage and it is always constant regardless of any variation in loading conditions.The effectiveness of this control scheme is exemplified in the operation of the inverters’ module. This inverters’ module contains three three-phase inverters. Each three-phase inverter receives the same switching signals generated by the PD-PWM, meaning that each inverter independently injects a certain voltage to stabilize the voltage along with its frequency at the load side. Another advantage of this proposed structure for the operational scheme is that the total load current/power is equally divided among all working inverters. In case one inverter is disconnected/reconnected, the total load current is seamlessly redistributed among all working inverters with the minimum voltage transition (similar to plug-and-play capability) as will be illustrated in later sections. More importantly, this proposed scheme does not need any sort of communication among the inverters because each inverter is working independently of the others.


### 3.1.1. Mathematical Formulation of Proposed Scheme/Controller for Balanced Loads

The proposed adaptive PI controller is based on adaptation of the controller parameters (KP,KI) using an improved version of the least mean fourth algorithm. In the primary control loop (current control), the error is defined as (3)ek=Irefk-Ifeedbackk=rk-ykwhere r=Iref, y=Ifeedback. The recursive form of the adaptive PI controller is expressed using the Dahlin formula as in [23](4)uk=uk-1+KPek-ek-1+KIekwhere KP, KI are the parameters that should be recursively changed such that the error of (3) is minimized using the least mean fourth algorithm whose cost function is defined as follows.(5)J=min⁡e4The controller is redefined in terms of some weights as(6)uk=uk-1+K1W1kX1k+K1W2kX2kwhere X1=(e(k)-e(k-1)), X2=e(k), KP=K1W1, KI=K2W2. The optimization of the cost function in (5) is obtained from its gradient descent with respect to the variables (W1,W2) [24], and the result of the differentiation of the cost function is given as follows. (7)∂J∂W1=ΔW1=-∂∂W1e4=-4ηe3∂u∂W1∂e∂u=4ηe3K1X1∂r-y∂u∂J∂W2=ΔW2=-∂∂W2e4=-4ηe3∂u∂W2∂e∂u=4ηe3K1X2∂r-y∂uThe term ∂y/∂u is calculated based on the model of the system of Figure 2. The output of each control loop y is equal to the injected voltage E in each loop as shown in Figure 2. From the formula of (2) and the block diagram of Figure 2, it can be deduced that ∂y/∂u is equal to 1 in both loops. Some modifications have been introduced to improve the overall adaptation mechanism for the controller parameters. These modifications are listed as follows.(1)
In order to improve the stability of the adaptation mechanism. The normalized LMF is considered for adapting the controller parameters [25]. Its stability is improved because the input power does not depend on the adaptation mechanism as proved in [25]. The formula of (7) is modified such that the normalized least mean fourth algorithm is defined as (8)ΔWik=4ηe3kK1XikXik2=η′e3kK1XikXik2where the subscripti shown in (8) indicates either 1 or 2 as shown in (7).(2)
The adaptation mechanism is again modified to fasten its convergence. The suggested modification is to make the step-sizeη′ variable not fixed. A large step-size makes faster convergence and more fluctuation and vice versa. The effective variable step-size algorithm is defined in [26](9)η′k=αpkX′k∗XkX′k=X1X2X1=ek-ek-1X2=ekpk=λpk-1+1-λXkekη′k=η′kη′k<ηmaxηmaxη′k>ηmaxwhereα is a factor selected by trial and error to balance between the convergence rate and stability of adaptation mechanism, λ is a forgetting factor used in the calculation of correlation process, and p(k) is an estimate of the correlation between the input and the error.The final adaptation mechanism, including all proposed modifications, is defined as(10)ΔW1k=η′ke3kK1X1kX1k2W1k=Wk-1+ΔW1k(11)ΔW2k=η′ke3kK1X2kX2k2W2k=Wk-1+ΔW2kwhere η′(k) is defined in (9). The final equations of the normalized least mean fourth algorithm (NLMF) are combined to form the self-adaptive PI controller of (6) along with (9), (10), and (11). The parameters of the suggested adaptation algorithm are tabulated in Table 2.Table 2
Parameters of proposed adaptive and regular PI controllers for positive loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 2e-4 α = 0.0125 λ = 0.75 η m a x = 7.5e-3 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Adaptive PI controller of q-axis in current loop K 1 = 1.05e-4 α = 0.7 λ = 0.000125 η m a x = 7.5e-5 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Regular PI controller of d-axis in voltage control K p = 0.282 K I = 1.333  Regular PI controller of q-axis in voltage control K p = 0.423 K I = 0.111


### 3.1.2. Mathematical Formulation of Proposed Scheme for Unbalanced Loads

The objective of the proposed scheme to deal with the unbalanced loads is to stabilize the positive-sequence voltages at 1 pu (100 %) and mitigate all negative-sequence voltages to the smallest possible level. The control diagram of Figure2 is used for the positive-sequence voltages with the voltages references for the system under study of Figure 1 as follows.(12)V+a-ref=6.6300kVV+b-ref=6.63-1200kV,andV+c-ref=6.631200kVTo deal with the negative-sequence components, another scheme similar to the control scheme of Figure 2 (current and voltage control loops) is paralleled with the original one to mitigate the negative-sequence voltages with the voltage references given as follows.(13)V-a-ref=0kV,V-b-ref=0kV,andV-c-ref=0kVEven the mathematical formulation for the negative-sequence component is similar to (2) with changing the sign of ω. The whole control block diagram for operating the microgrid at any load is clarified in Figure 3. Eventually, the output control signals of the positive-sequence and negative-sequence components are aggregated to operate the PD-PWM. The parameters of both adaptive and regular PI controllers of the negative-sequence components are tabulated in Table 3.Table 3
Parameters of the proposed adaptive and regular PI controllers for negative loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 2e-4 α = 0.00125 λ = 0.75 η m a x = 7.5e-3 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Adaptive PI controller of q-axis in current loop K 1 = 1.05e-4 α = 0.7 λ = 0.000125 η m a x = 7.5e-5 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5Figure 3
Complete operational block diagram for proposed scheme for positive and negative components.


### 3.1.3. Mathematical Formulation of Single-Neuron Adaptive PI Controller

To prove the advantageous performance of the suggested controller, the proposed adaptive controller is compared to another commonly used adaptive PI controller, which is the single-neuron (single-perceptron) based PI controller. The single-neuron is the smallest unit in the neural network; it is operated based on the Hebbian rule [27] where the updated weights are given as(14)ΔWik=ζekXikukWik=Wik-1+ΔWikW′ik=Wik∑i=12Wikuk=uk-1+K1∑i=12W′iXikwhere ζ is a positive fixed step less than one. The formulation of (14) is employed to adapt the parameters of the PI controller. The single-neuron PI controller replaces the proposed controller (normalized LMF based PI controller) in the control scheme of Figure 2 and operational bock diagram of Figure 3. The parameters of the single-neuron adaptive PI controller for positive control loops that give the best performance are written in Table 4.Table 4
Parameters of single-neuron adaptive and regular PI controllers for positive loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 1.5e-3 η → W 1 = 6e-5 η → W 2 = 3e-5 W 1 ( 0 ) = 1 W 2 ( 0 ) = 1  Adaptive PI controller of q-axis in current loop K 1 = 5e-5 η → W 1 = 0.15 η → W 2 = 0.015 W 1 ( 0 ) = 1 W 2 ( 0 ) = 1  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


### 3.1.4. Mathematical Formulation of Recursive Least Square Adaptive PI Controller

For the sake of tough comparison, the proposed adaptive controller is compared to the recursive least square based PI controller (RLS-PI) presented in [27]. This PI controller parameters are recursively adapted using the same algorithm given in [27], which is newly formulated here as follows.(15)Kpk+1=Kpk+ηX2kdykdxX1kKIk+1=KIk+ηX2kdykdxX2kThe adaptation mechanism of (15) is similar to those described before as X1=(e(k)-e(k-1)), X2=e(k), and η is a fixed learning rate. However, the adaptation of (15) differs in how to calculate the derivative term (dy(k)/dx) with no need for the system model of Figure 2 or system equation of (2). The derivative term is calculated from the estimated function y(k) with respect to the input (x), which is estimated using the least square-support vector machine (LS-SVM) defined in [28] as(16)yk=∑i=1LαiWk,ixb+bwhere Wk,ixbo (defined in (17)) is a Kernel function of the support vector machine (SVM), and it is a function of batch of n output data and m input data, represented in xbo as xbo(k)=y(k)...y(k-n+1)...u(k)...u(k-m+1)T. (17)Wk,ixbo=exp-1σ2xbok-xbojTxbok-xbojn and m are related to the system order. On the other hand, αi is a constant and it represents the ith item in α(k), which is defined as(18)αk=WbkYbk-1L×1bkwhere Yb(k) is a batch of the output data points in the sliding window of length L sorted as Yb(k)=y(k)…y(k-L+1)T, Wbk is the batch of the Kernel functions in the sliding window and it is defined in (19), and b(k) is the average constant of b in the sliding window and it is defined in (20).(19)Wbk=Wk-1,k-1xbo+C⋯Wk-L,k-1xbo⋮⋱⋮Wk-1,k-Lxbo⋯Wk-L,k-Lxbo+C(20)bk=WbkYbk1L×1TWbk1L×1where C is a constant. The derivative of (16) yields the following.(21)dykdx=1σ2∑i=k-Lk-1αi-k+L+1kuk-uiWk,ixboThe derivative formula in (21) is then plugged in (15). The RL-SVM based PI controller replaces the proposed controller (normalized LMF based PI controller) in the control scheme of Figure 2 and its operational bock diagram of Figure 3. The parameters of the RL-SVM based PI controller for the positive control loop that give the best performance are written in Table 5.Table 5
Parameters of RL-SVM based PI and regular PI controllers for positive loop.
Parameters Value  RL-SVM-PI controller of d-axis in current loop K P = 1.5 K I = 1e-17 η 1 = 1e-6 η 2 = 1e-12 σ 2 = 100 C = 10  RL-SVM-PI controller of q-axis in current lop K P = 1.5 K I = 1e-17 η 1 = 1e-6 η 2 = 1e-12 σ 2 = 100 C = 10  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


### 3.1.5. Mathematical Formulation of Sliding Mode Controller

Another robust controller is added in this paper to compare its performance to the proposed controller of Figure2. This candidate is very efficient since it is a robust nonlinear controller, which is the sliding mode controller. The adopted sliding mode controller is formulated for the current control loop. The mathematical formulation of this sliding mode control is already detailed in [19]. The utilized control law in this paper is an aggregated form of two terms, which are written as(22)n=nc+neqwhere nc is the corrective input, which pushes the system trajectory from its initial location to the sliding manifold, while neq is the equivalent input that keeps the system trajectory on the sliding manifold. The definition of the sliding manifold follows the integral sliding mode control and it is given as (23)s=e+λ∫edtThe corrective input is associated with a boundary layer to minimize the chattering and it is defined as(24)
n
c
=
-
k
1
s
α
→
s
>
β
-
s
β
→
-
β
<
s
<
β
+
k
2
s
α
→
s
<
-
βwhere k1,k2,β are positive constants.Theneq is designed such that the system with the sliding mode controller becomes stable; the system stability is derived by Lyapunov stability criterion such that the adopted Lyapunov function is selected to express the distance between the system’s state and sliding manifold, and its definition is written as (25)Vs=12sTsThe derivative of this function should be less than or equal to zero as (26)V.s=dVsdsdsdt=sTs˙<=0For tracking problem like the case of this paper, V.(s)=0→s.=0, which leads to the following.(27)s˙=e˙+λe=0s˙=r˙-y˙+λeThe state space form of the system model is given as (28)y˙=Ax+Bu+FdSubstitution of (28) in (27) leads to the following.(29)s.=-Ax+Bneq+Fd+λe=0The Lyapunov function requires that its derivative is equal to zero for the stable system. This condition yields the following.(30)s˙=-Ax+Bneq+Fd+λe=0Eventually, the equivalent input is given as (31)neq=-B-1Ax+Fd-λeThe control law of (22) and (23) with its two terms in (24) and (31) is used to control the injected current of the primary control loop. Eventually, this current controller replaces the proposed adaptive PI controller in the control scheme of Figure 2 and its operational block diagram of Figure 3. The parameters of the sliding mode controllers for positive control loops are written in Table 6.Table 6
Parameters of sliding mode and regular PI controllers for positive loop.
Parameters Value  Sliding mode controller of d-axis in current loop λ = 100 k 1 = 0.8 k 2 = 0.8 β = 20  Sliding mode controller of q-axis in current loop λ = 81 k 1 = 0.8 k 2 = 0.8 β = 20  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


## 3.1.1. Mathematical Formulation of Proposed Scheme/Controller for Balanced Loads

The proposed adaptive PI controller is based on adaptation of the controller parameters (KP,KI) using an improved version of the least mean fourth algorithm. In the primary control loop (current control), the error is defined as (3)ek=Irefk-Ifeedbackk=rk-ykwhere r=Iref, y=Ifeedback. The recursive form of the adaptive PI controller is expressed using the Dahlin formula as in [23](4)uk=uk-1+KPek-ek-1+KIekwhere KP, KI are the parameters that should be recursively changed such that the error of (3) is minimized using the least mean fourth algorithm whose cost function is defined as follows.(5)J=min⁡e4The controller is redefined in terms of some weights as(6)uk=uk-1+K1W1kX1k+K1W2kX2kwhere X1=(e(k)-e(k-1)), X2=e(k), KP=K1W1, KI=K2W2. The optimization of the cost function in (5) is obtained from its gradient descent with respect to the variables (W1,W2) [24], and the result of the differentiation of the cost function is given as follows. (7)∂J∂W1=ΔW1=-∂∂W1e4=-4ηe3∂u∂W1∂e∂u=4ηe3K1X1∂r-y∂u∂J∂W2=ΔW2=-∂∂W2e4=-4ηe3∂u∂W2∂e∂u=4ηe3K1X2∂r-y∂uThe term ∂y/∂u is calculated based on the model of the system of Figure 2. The output of each control loop y is equal to the injected voltage E in each loop as shown in Figure 2. From the formula of (2) and the block diagram of Figure 2, it can be deduced that ∂y/∂u is equal to 1 in both loops. Some modifications have been introduced to improve the overall adaptation mechanism for the controller parameters. These modifications are listed as follows.(1)
In order to improve the stability of the adaptation mechanism. The normalized LMF is considered for adapting the controller parameters [25]. Its stability is improved because the input power does not depend on the adaptation mechanism as proved in [25]. The formula of (7) is modified such that the normalized least mean fourth algorithm is defined as (8)ΔWik=4ηe3kK1XikXik2=η′e3kK1XikXik2where the subscripti shown in (8) indicates either 1 or 2 as shown in (7).(2)
The adaptation mechanism is again modified to fasten its convergence. The suggested modification is to make the step-sizeη′ variable not fixed. A large step-size makes faster convergence and more fluctuation and vice versa. The effective variable step-size algorithm is defined in [26](9)η′k=αpkX′k∗XkX′k=X1X2X1=ek-ek-1X2=ekpk=λpk-1+1-λXkekη′k=η′kη′k<ηmaxηmaxη′k>ηmaxwhereα is a factor selected by trial and error to balance between the convergence rate and stability of adaptation mechanism, λ is a forgetting factor used in the calculation of correlation process, and p(k) is an estimate of the correlation between the input and the error.The final adaptation mechanism, including all proposed modifications, is defined as(10)ΔW1k=η′ke3kK1X1kX1k2W1k=Wk-1+ΔW1k(11)ΔW2k=η′ke3kK1X2kX2k2W2k=Wk-1+ΔW2kwhere η′(k) is defined in (9). The final equations of the normalized least mean fourth algorithm (NLMF) are combined to form the self-adaptive PI controller of (6) along with (9), (10), and (11). The parameters of the suggested adaptation algorithm are tabulated in Table 2.Table 2
Parameters of proposed adaptive and regular PI controllers for positive loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 2e-4 α = 0.0125 λ = 0.75 η m a x = 7.5e-3 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Adaptive PI controller of q-axis in current loop K 1 = 1.05e-4 α = 0.7 λ = 0.000125 η m a x = 7.5e-5 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Regular PI controller of d-axis in voltage control K p = 0.282 K I = 1.333  Regular PI controller of q-axis in voltage control K p = 0.423 K I = 0.111


## 3.1.2. Mathematical Formulation of Proposed Scheme for Unbalanced Loads

The objective of the proposed scheme to deal with the unbalanced loads is to stabilize the positive-sequence voltages at 1 pu (100 %) and mitigate all negative-sequence voltages to the smallest possible level. The control diagram of Figure2 is used for the positive-sequence voltages with the voltages references for the system under study of Figure 1 as follows.(12)V+a-ref=6.6300kVV+b-ref=6.63-1200kV,andV+c-ref=6.631200kVTo deal with the negative-sequence components, another scheme similar to the control scheme of Figure 2 (current and voltage control loops) is paralleled with the original one to mitigate the negative-sequence voltages with the voltage references given as follows.(13)V-a-ref=0kV,V-b-ref=0kV,andV-c-ref=0kVEven the mathematical formulation for the negative-sequence component is similar to (2) with changing the sign of ω. The whole control block diagram for operating the microgrid at any load is clarified in Figure 3. Eventually, the output control signals of the positive-sequence and negative-sequence components are aggregated to operate the PD-PWM. The parameters of both adaptive and regular PI controllers of the negative-sequence components are tabulated in Table 3.Table 3
Parameters of the proposed adaptive and regular PI controllers for negative loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 2e-4 α = 0.00125 λ = 0.75 η m a x = 7.5e-3 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Adaptive PI controller of q-axis in current loop K 1 = 1.05e-4 α = 0.7 λ = 0.000125 η m a x = 7.5e-5 p ( 0 ) = 0 W 1 ( 0 ) = 5.25 W 2 ( 0 ) = 5  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5Figure 3
Complete operational block diagram for proposed scheme for positive and negative components.


## 3.1.3. Mathematical Formulation of Single-Neuron Adaptive PI Controller

To prove the advantageous performance of the suggested controller, the proposed adaptive controller is compared to another commonly used adaptive PI controller, which is the single-neuron (single-perceptron) based PI controller. The single-neuron is the smallest unit in the neural network; it is operated based on the Hebbian rule [27] where the updated weights are given as(14)ΔWik=ζekXikukWik=Wik-1+ΔWikW′ik=Wik∑i=12Wikuk=uk-1+K1∑i=12W′iXikwhere ζ is a positive fixed step less than one. The formulation of (14) is employed to adapt the parameters of the PI controller. The single-neuron PI controller replaces the proposed controller (normalized LMF based PI controller) in the control scheme of Figure 2 and operational bock diagram of Figure 3. The parameters of the single-neuron adaptive PI controller for positive control loops that give the best performance are written in Table 4.Table 4
Parameters of single-neuron adaptive and regular PI controllers for positive loop.
Parameters Value  Adaptive PI controller of d-axis in current loop K 1 = 1.5e-3 η → W 1 = 6e-5 η → W 2 = 3e-5 W 1 ( 0 ) = 1 W 2 ( 0 ) = 1  Adaptive PI controller of q-axis in current loop K 1 = 5e-5 η → W 1 = 0.15 η → W 2 = 0.015 W 1 ( 0 ) = 1 W 2 ( 0 ) = 1  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


## 3.1.4. Mathematical Formulation of Recursive Least Square Adaptive PI Controller

For the sake of tough comparison, the proposed adaptive controller is compared to the recursive least square based PI controller (RLS-PI) presented in [27]. This PI controller parameters are recursively adapted using the same algorithm given in [27], which is newly formulated here as follows.(15)Kpk+1=Kpk+ηX2kdykdxX1kKIk+1=KIk+ηX2kdykdxX2kThe adaptation mechanism of (15) is similar to those described before as X1=(e(k)-e(k-1)), X2=e(k), and η is a fixed learning rate. However, the adaptation of (15) differs in how to calculate the derivative term (dy(k)/dx) with no need for the system model of Figure 2 or system equation of (2). The derivative term is calculated from the estimated function y(k) with respect to the input (x), which is estimated using the least square-support vector machine (LS-SVM) defined in [28] as(16)yk=∑i=1LαiWk,ixb+bwhere Wk,ixbo (defined in (17)) is a Kernel function of the support vector machine (SVM), and it is a function of batch of n output data and m input data, represented in xbo as xbo(k)=y(k)...y(k-n+1)...u(k)...u(k-m+1)T. (17)Wk,ixbo=exp-1σ2xbok-xbojTxbok-xbojn and m are related to the system order. On the other hand, αi is a constant and it represents the ith item in α(k), which is defined as(18)αk=WbkYbk-1L×1bkwhere Yb(k) is a batch of the output data points in the sliding window of length L sorted as Yb(k)=y(k)…y(k-L+1)T, Wbk is the batch of the Kernel functions in the sliding window and it is defined in (19), and b(k) is the average constant of b in the sliding window and it is defined in (20).(19)Wbk=Wk-1,k-1xbo+C⋯Wk-L,k-1xbo⋮⋱⋮Wk-1,k-Lxbo⋯Wk-L,k-Lxbo+C(20)bk=WbkYbk1L×1TWbk1L×1where C is a constant. The derivative of (16) yields the following.(21)dykdx=1σ2∑i=k-Lk-1αi-k+L+1kuk-uiWk,ixboThe derivative formula in (21) is then plugged in (15). The RL-SVM based PI controller replaces the proposed controller (normalized LMF based PI controller) in the control scheme of Figure 2 and its operational bock diagram of Figure 3. The parameters of the RL-SVM based PI controller for the positive control loop that give the best performance are written in Table 5.Table 5
Parameters of RL-SVM based PI and regular PI controllers for positive loop.
Parameters Value  RL-SVM-PI controller of d-axis in current loop K P = 1.5 K I = 1e-17 η 1 = 1e-6 η 2 = 1e-12 σ 2 = 100 C = 10  RL-SVM-PI controller of q-axis in current lop K P = 1.5 K I = 1e-17 η 1 = 1e-6 η 2 = 1e-12 σ 2 = 100 C = 10  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


## 3.1.5. Mathematical Formulation of Sliding Mode Controller

Another robust controller is added in this paper to compare its performance to the proposed controller of Figure2. This candidate is very efficient since it is a robust nonlinear controller, which is the sliding mode controller. The adopted sliding mode controller is formulated for the current control loop. The mathematical formulation of this sliding mode control is already detailed in [19]. The utilized control law in this paper is an aggregated form of two terms, which are written as(22)n=nc+neqwhere nc is the corrective input, which pushes the system trajectory from its initial location to the sliding manifold, while neq is the equivalent input that keeps the system trajectory on the sliding manifold. The definition of the sliding manifold follows the integral sliding mode control and it is given as (23)s=e+λ∫edtThe corrective input is associated with a boundary layer to minimize the chattering and it is defined as(24)
n
c
=
-
k
1
s
α
→
s
>
β
-
s
β
→
-
β
<
s
<
β
+
k
2
s
α
→
s
<
-
βwhere k1,k2,β are positive constants.Theneq is designed such that the system with the sliding mode controller becomes stable; the system stability is derived by Lyapunov stability criterion such that the adopted Lyapunov function is selected to express the distance between the system’s state and sliding manifold, and its definition is written as (25)Vs=12sTsThe derivative of this function should be less than or equal to zero as (26)V.s=dVsdsdsdt=sTs˙<=0For tracking problem like the case of this paper, V.(s)=0→s.=0, which leads to the following.(27)s˙=e˙+λe=0s˙=r˙-y˙+λeThe state space form of the system model is given as (28)y˙=Ax+Bu+FdSubstitution of (28) in (27) leads to the following.(29)s.=-Ax+Bneq+Fd+λe=0The Lyapunov function requires that its derivative is equal to zero for the stable system. This condition yields the following.(30)s˙=-Ax+Bneq+Fd+λe=0Eventually, the equivalent input is given as (31)neq=-B-1Ax+Fd-λeThe control law of (22) and (23) with its two terms in (24) and (31) is used to control the injected current of the primary control loop. Eventually, this current controller replaces the proposed adaptive PI controller in the control scheme of Figure 2 and its operational block diagram of Figure 3. The parameters of the sliding mode controllers for positive control loops are written in Table 6.Table 6
Parameters of sliding mode and regular PI controllers for positive loop.
Parameters Value  Sliding mode controller of d-axis in current loop λ = 100 k 1 = 0.8 k 2 = 0.8 β = 20  Sliding mode controller of q-axis in current loop λ = 81 k 1 = 0.8 k 2 = 0.8 β = 20  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5


## 3.2. Structure of Proposed Control Scheme for Grid-Connected Mode

Sometimes the microgrid is required to be connected to the main power grid (distribution system) in order to acquire some benefits [4, 5]. The main challenge that faces the suggested control scheme in the grid-connected mode is how to transfer the control concept from the constant voltage/frequency operation to constant current/power operation because both the grid voltage and its frequency are governed by the power grid in a grid-connected mode. Therefore, an additional power control loop is integrated with the utilized operational scheme as depicted in Figure 2. In this additional control loop, any power reference is converted into a current reference, which is consequently applied (as input) to the primary current control loop of the scheme illustrated in Figure 2. The power formula in the d-q frame is expressed as (32)PQ=32VDG-dVDG-qVDG-q-VDG-dIDG-dIDG-qThen, the current reference of power control can be deduced using the inverse of (32) as (33)IDG-d-refIDG-q-ref=23VDG-dVDG-qVDG-q-VDG-d-1PrefQref


## 4. Comparing Proposed Adaptive PI to Other Controllers

The objective of this section is to validate the meritorious characteristics of the proposed controller along with the suggested scheme for the microgrid operation. This section includes comparisons between the proposed controller and the regular PI controller, single-neuron adaptive PI controller, recursive least square adaptive PI controller, and sliding mode controller for the same control scheme including its block diagram given in Figures2 and 3. For all subsequent sections, the comparison encompasses the performance of each controller during the starting of the microgrid whose loads are the parallel combination of two balanced loads of Zload1-phase=55+18.84j and Zload2-phase=65+31.4j (all impedances in this section are referred to the primary side of transformer tr2 in Figure 1). At time t = 2.5 s, the second load is disconnected and the first load remains connected to the microgrid.


### 4.1. Comparing Regular PI Controller to Proposed Controller

In order to justify the praiseworthy performance of the proposed scheme, its performance is compared to the regular PI controller. This regular PI controller replaces the proposed controller in the control scheme of Figure2 and in the whole operational diagram in Figure 3. The parameters of PI controllers that give the optimized performance are listed in Table 7. The rms voltage profile in percent of the load side at the point of common coupling (PCC) is given in Figure 4(a) with the voltage profile of the proposed controller to compare both profiles, and the zoom-in view for both voltages is given in Figure 4(b). It is worth mentioning that the proposed controller has a better performance than the regular PI controller for all operating conditions. Figure 4(a) affirms that the transient performance of the regular PI is not guaranteed at all operating conditions. The oscillation around 100% does not exceed ±1%. The adaptation of the proposed controller weights (W1,W2) in the d-axis current control loop is illustrated in Figure 4(c). Also, the current performance (current reference vs feedback current) of the d-axis current control is elucidated in Figure 4(d), which shows good transient and steady-state performance. In addition, the formula shown in (9) is used to change the step-size (η′(n)) such that at the beginning of the adaptation process it becomes very small to stabilize the adaptation mechanism; afterward it gets bigger when the adaptation reaches its steady state to fasten its convergence. This variable step-size η′(n) is shown in Figure 4(e).Table 7
Parameters of regular PI controllers for positive control loop.
Parameters Value  Regular PI controller of d-axis in current control K p = 1 K I = 18.75  Regular PI controller of q-axis in current control K p = 1.5 K I = 18.75  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5Figure 4
Performance of regular PI controller compared to proposed controller along with parameters adaptation.
(a)
Voltage profile at PCC for regular PI controller and proposed controller (b)
Zoom-in view for voltage curves in Figure4(a) (c)
Adaption of controller weights (W1, W2) for d-axis current control loop (d)
Performance of current reference and feedback current for d-axis current control loop (e)
Performance of variable step size for d-axis current control loop


### 4.2. Comparing Single-Neuron Adaptive PI Controller to Proposed Controller

The single-neuron adaptive PI controller is another strong candidate for comparison. This controller is already explained before, where the parameters of the controller,Kp,KI, are recursively tuned such that the mean square error becomes minimum as explained earlier. The parameters of the controllers are already written in Table 4. The rms voltage in percent is portrayed in Figure 5(a) with the performance of the proposed controller, and its zoom-in view is also depicted in Figure 5(b). Figure 5 reveals that the proposed controller is faster than the single-neuron PI controller at the starting of the microgrid operation and at the load change after time t > 2.5 s.Figure 5
Performance of single-neuron PI controller compared to proposed controller.
(a)
Voltage profile at PCC for single-neuron adaptive PI controller and proposed controller (b)
Zoom-in view for voltage curves in Figure5(a)


### 4.3. Comparing Recursive Least Square Adaptive PI Controller to Proposed Controller

This section shows the performance of the recursive least square-support vector machine based adaptive PI controller. The mathematical formulation is already explained in a previous section. The recursive least square PI controller replaces the proposed controller in Figure2 and in its overall operational block diagram of Figure 3. Its performance is depicted in Figure 6(a) with the performance of the proposed controller, and its zoom-in view is displayed in Figure 6(b). From Figure 6, it is clear that the proposed controller is faster with more oscillation at the start of the microgrid operation and at the load change.Figure 6
Performance of recursive least square PI controller compared to proposed controller.
(a)
Voltage profile at PCC for recursive least square PI controller and proposed controller (b)
Zoom-in view for voltage curves in Figure6(a)


### 4.4. Comparing Sliding Mode Controller to Proposed Controller

The sliding mode is a robust nonlinear controller used for nonlinear and linear systems. This controller, explained in a previous section, is adopted in the control scheme of Figure2 instead of the proposed controller. The controller parameters, which give the best performance for this microgrid, are written in Table 6. The performance of the SMC is displayed in Figure 7(a) compared to the proposed controller, and its zoom-in view is portrayed in Figure 7(b). This figure indicates that the sliding mode controller has less overshoot/undershoot and the proposed controller converges faster to minimize its error. The major difference between the proposed controller and the sliding mode controller is that the later controller needs the full model of the system and the proposed controller works without utilizing any model for the microgrid.Figure 7
Performance of sliding mode controller compared to proposed controller.
(a)
Voltage profile at PCC for sliding mode controller with proposed controller (b)
Zoom-in view for voltage curves in Figure7(a)


### 4.5. Quantitative Comparisons between Proposed Controller and Other Controllers

In previous subsections, the proposed controller is compared to some linear/adaptive/nonlinear controllers to affirm its good characteristics for the operation of the microgrid at different operating conditions. The summary of this comparisons is tabulated in Table8.Table 8
Comparative analysis of proposed controller with other linear/adaptive/nonlinear controllers.
Parameters ProposedAdaptiveController RegularPI Controller Single-NeuronAdaptive PI Recursive Least Square Adaptive PI SMC Average steady-state error (%) < 0.5 % < 1 % < 0.5 % 2 % 1 %  Average settling time (s) 0.5 s 1 s 1 s 1.5 s 1 s  1 s t overshoot (%) at the start of microgrid operation 32 % 34 % 32 % 34 % Large for short time 1 s t undershoot (%) 7 % 4 % 4 % 8 % 0 %  Variation of controller performance with operating conditions (at time= 0 s and time = 2.5 s) Small - almost same optimum performance Large - optimum performance is not guaranteed Medium - almost same optimum performance Medium - performance differ from one to another Small - almost same performance


## 4.1. Comparing Regular PI Controller to Proposed Controller

In order to justify the praiseworthy performance of the proposed scheme, its performance is compared to the regular PI controller. This regular PI controller replaces the proposed controller in the control scheme of Figure2 and in the whole operational diagram in Figure 3. The parameters of PI controllers that give the optimized performance are listed in Table 7. The rms voltage profile in percent of the load side at the point of common coupling (PCC) is given in Figure 4(a) with the voltage profile of the proposed controller to compare both profiles, and the zoom-in view for both voltages is given in Figure 4(b). It is worth mentioning that the proposed controller has a better performance than the regular PI controller for all operating conditions. Figure 4(a) affirms that the transient performance of the regular PI is not guaranteed at all operating conditions. The oscillation around 100% does not exceed ±1%. The adaptation of the proposed controller weights (W1,W2) in the d-axis current control loop is illustrated in Figure 4(c). Also, the current performance (current reference vs feedback current) of the d-axis current control is elucidated in Figure 4(d), which shows good transient and steady-state performance. In addition, the formula shown in (9) is used to change the step-size (η′(n)) such that at the beginning of the adaptation process it becomes very small to stabilize the adaptation mechanism; afterward it gets bigger when the adaptation reaches its steady state to fasten its convergence. This variable step-size η′(n) is shown in Figure 4(e).Table 7
Parameters of regular PI controllers for positive control loop.
Parameters Value  Regular PI controller of d-axis in current control K p = 1 K I = 18.75  Regular PI controller of q-axis in current control K p = 1.5 K I = 18.75  Regular PI controller of d-axis in voltage control K p = 0.0625 K I = 0.5  Regular PI controller of q-axis in voltage control K p = 0.0625 K I = 0.5Figure 4
Performance of regular PI controller compared to proposed controller along with parameters adaptation.
(a)
Voltage profile at PCC for regular PI controller and proposed controller (b)
Zoom-in view for voltage curves in Figure4(a) (c)
Adaption of controller weights (W1, W2) for d-axis current control loop (d)
Performance of current reference and feedback current for d-axis current control loop (e)
Performance of variable step size for d-axis current control loop


## 4.2. Comparing Single-Neuron Adaptive PI Controller to Proposed Controller

The single-neuron adaptive PI controller is another strong candidate for comparison. This controller is already explained before, where the parameters of the controller,Kp,KI, are recursively tuned such that the mean square error becomes minimum as explained earlier. The parameters of the controllers are already written in Table 4. The rms voltage in percent is portrayed in Figure 5(a) with the performance of the proposed controller, and its zoom-in view is also depicted in Figure 5(b). Figure 5 reveals that the proposed controller is faster than the single-neuron PI controller at the starting of the microgrid operation and at the load change after time t > 2.5 s.Figure 5
Performance of single-neuron PI controller compared to proposed controller.
(a)
Voltage profile at PCC for single-neuron adaptive PI controller and proposed controller (b)
Zoom-in view for voltage curves in Figure5(a)


## 4.3. Comparing Recursive Least Square Adaptive PI Controller to Proposed Controller

This section shows the performance of the recursive least square-support vector machine based adaptive PI controller. The mathematical formulation is already explained in a previous section. The recursive least square PI controller replaces the proposed controller in Figure2 and in its overall operational block diagram of Figure 3. Its performance is depicted in Figure 6(a) with the performance of the proposed controller, and its zoom-in view is displayed in Figure 6(b). From Figure 6, it is clear that the proposed controller is faster with more oscillation at the start of the microgrid operation and at the load change.Figure 6
Performance of recursive least square PI controller compared to proposed controller.
(a)
Voltage profile at PCC for recursive least square PI controller and proposed controller (b)
Zoom-in view for voltage curves in Figure6(a)


## 4.4. Comparing Sliding Mode Controller to Proposed Controller

The sliding mode is a robust nonlinear controller used for nonlinear and linear systems. This controller, explained in a previous section, is adopted in the control scheme of Figure2 instead of the proposed controller. The controller parameters, which give the best performance for this microgrid, are written in Table 6. The performance of the SMC is displayed in Figure 7(a) compared to the proposed controller, and its zoom-in view is portrayed in Figure 7(b). This figure indicates that the sliding mode controller has less overshoot/undershoot and the proposed controller converges faster to minimize its error. The major difference between the proposed controller and the sliding mode controller is that the later controller needs the full model of the system and the proposed controller works without utilizing any model for the microgrid.Figure 7
Performance of sliding mode controller compared to proposed controller.
(a)
Voltage profile at PCC for sliding mode controller with proposed controller (b)
Zoom-in view for voltage curves in Figure7(a)


## 4.5. Quantitative Comparisons between Proposed Controller and Other Controllers

In previous subsections, the proposed controller is compared to some linear/adaptive/nonlinear controllers to affirm its good characteristics for the operation of the microgrid at different operating conditions. The summary of this comparisons is tabulated in Table8.Table 8
Comparative analysis of proposed controller with other linear/adaptive/nonlinear controllers.
Parameters ProposedAdaptiveController RegularPI Controller Single-NeuronAdaptive PI Recursive Least Square Adaptive PI SMC Average steady-state error (%) < 0.5 % < 1 % < 0.5 % 2 % 1 %  Average settling time (s) 0.5 s 1 s 1 s 1.5 s 1 s  1 s t overshoot (%) at the start of microgrid operation 32 % 34 % 32 % 34 % Large for short time 1 s t undershoot (%) 7 % 4 % 4 % 8 % 0 %  Variation of controller performance with operating conditions (at time= 0 s and time = 2.5 s) Small - almost same optimum performance Large - optimum performance is not guaranteed Medium - almost same optimum performance Medium - performance differ from one to another Small - almost same performance


## 5. Simulation Results of Proposed Operational Scheme in Microgrid Mode

This section is divided into some subsections to show the performance of the proposed scheme, which stabilizes the voltage at the load side for different loading conditions.


### 5.1. Variable Balanced Loads

This section exhibits the simulation results for the proposed scheme and controller documented in a previous section and depicted in Figures2 and 3 for the microgrid of Figure 1. The loads in the microgrid are the parallel combination of two balanced loads of Zload1-phase=55+18.84j and Zload2-phase=65+31.4j. At time t = 2.5 s, the second load is disconnected and the first load remains connected to the grid. The voltages at the inverters’ bus and after transformer bus (before and after the used filter) are given in Figure 8(a). The rms voltage in percent at the point of common coupling (PCC) is displayed in Figure 8(b). In the control scheme of Figure 2, the output of the switching modulation (PD-PWM) is applied on each inverter separately. Therefore, the load power (active and reactive) is equally shared among the working inverters. The load active power and the injected active power by three inverters are given in Figures 8(c), 8(d), 8(e), and 8(f), respectively. The reactive power has a similar performance to the active power sharing of Figure 8. Another advantage of using the 5-level diode-clamped inverter is exemplified in Figure 8(g), where the voltage THD of the injected voltage is less than 2% at any operating condition.Figure 8
Voltage profile, power sharing, and THD at PCC for balanced loads by proposed control.
(a)
Voltage waveforms before and after filter per phase (b)
Voltage profile at PCC for balanced loads by proposed control (c)
Active power consumed by all loads in microgrid (d)
Injected active power by inverter 1 (e)
Injected active power by inverter 2 (f)
Injected active power by inverter 3 (g)
Voltage THD at PCC for balanced loads by proposed control


### 5.2. Variable Unbalanced Loads

This section depicts the simulation results for the suggested scheme in a previous section, which is depicted in Figure3 for the positive- and negative-sequence control loops. Before time t < 5 s, the existing balanced load in the system is Zload1=55+18.84j. At time t = 5 s, the first unbalanced loads are connected to the system; these loads are Zload-a=25+6.28j, Zload-b=50+31.4j, and Zload-c=35+15.7j, which are attached in parallel to the original balanced loads. At time t = 7.5 s, the second unbalanced loads of Zload-a=30+9.42j, Zload-b=35+11j, and Zload-c=45+14.13j are connected to the loads mentioned above. The rms voltage in percent is given in Figure 9(a) for the connection of two groups of unbalanced loads. The effectiveness of the mitigation for the negative-sequence voltage by its control loop is manifested by the negative-sequence factor as defined in IEEE Standard 1159-1995, which should not be greater than 2%. Figures 9(b) and 9(c) show the negative-sequence factor without and with using its control loop (lower blocks) in Figure 3. The reflection of the small negative-sequence factor is shown in the instantaneous voltage and current waveforms at the loads, shown in Figures 10(a) and 10(b), respectively.Figure 9
Voltage profile and negative-sequence factor with and without using negative control loop.
(a)
Voltage profile at PCC for unbalanced loads by proposed control (b)
Negative-sequence without using negative control loop (c)
Negative-sequence with using negative control loopFigure 10
Instantaneous voltage and current waveforms with unbalanced loads.
(a)
Instantaneous voltage waveforms at load side (PCC) with unbalanced loads (b)
Instantaneous current waveforms with unbalanced loads


### 5.3. Nonlinear Loads

The nonlinear load is a drastically problematic issue for the droop control schemes because the conventional droop is designed to let all generators share the fundamental components only. The existence of harmonics adds more complexity to the droop control [29]. On the contrary, the proposed scheme handles the harmonics without any modification or adding more complexity since each inverter is given the same control signals (output of the PD-PWM) to stabilize the voltage at the loads. Therefore, the load harmonics are evenly shared among the inverters. This equal distribution of harmonics among the inverters comes naturally (plug-and-play capability) due to the structure of the proposed operational (control) scheme depicted in Figure 2. The nonlinear load is presented by diode bridges with a highly inductive load. This nonlinear load is added to the system at time t = 12.5 s with the balanced original load of Zload1=55+18.84j. The rms voltage in percent is given in Figure 11(a). The total three-phase load currents are given in Figure 11(b).Figure 11
Voltage and current performance during nonlinear loads.
(a)
Voltage profile at PCC for nonlinear loads by proposed controller (b)
Instantaneous three-phase load current for all loads


### 5.4. Loss/Reconnection of Any Inverter (Generation Unit) to Microgrid

In the droop control scheme, the loss of any inverter greatly influences the transient performance at the instant of the inverter loss [29]. This transition requires the droop control to have a high bandwidth in order to recover the voltage fast. Another advantage of the proposed scheme is its seamless transitional profile during the loss or reconnection of any inverter circuit. The smooth transient performance emanates from the propounded structure of the control scheme because the output of the modulation technique (PD-PWM) is applied on all inverters at the same time, meaning that each inverter works independently of the other inverters to stabilize the voltage at the loads during any transition. As a result, the load current is equally divided among the existing (working) inverters. At time t = 17.5 s, the inverter-1 is disconnected, and both inverter-2 and inverter-3 are adaptively sharing the loads’ currents; that is why there is an increase in the injected current generated by inverter-2 and inverter-3. Consequently, the injected voltage of each existing inverter also changes (slightly increases) to accommodate the change in the injected current. The rms voltage profile in percent during the loss of the inverter-1 is illustrated in Figure 12(a). The three-phase currents of all three inverters are portrayed in Figures 12(b), 12(c), and 12(d). The instantaneous voltage waveforms per phase (before the transformer) of inverter-2 (or inverter-3) before and after the instant of inverter-1 loss are depicted in Figures 12(e) and 12(f), respectively. These two figures (Figures 12(e) and 12(f)) show a difference in the pattern of the voltage pulses, where the pulses of the voltage waveform (after the loss of inverter-1) are wider; this indicates more injected voltage at inverters’ bus to push more currents as shown in Figures 12(c) and 12(d). Almost an adverse performance can be obtained when a new inverter is connected to the microgrid.Figure 12
Root mean square (rms) and instantaneous voltage and instantaneous current waveforms during loss of inverter 1.
(a)
Voltage profile at PCC during loss of inverter 2 by proposed controller (b)
Three-phase currents of inverter-1 during loss of inverter-1 (c)
Three-phase currents of inverter-2 during loss of inverter-1 (d)
Three-phase currents of inverter-3 during loss of inverter-1 (e)
Voltage waveform Inverter-2 (or inverter-3) of one phase (phase A) before loss of inverter-1 (f)
Voltage waveform Inverter-2 (or inverter-3) of one phase (phase A) after loss of inverter-1


## 5.1. Variable Balanced Loads

This section exhibits the simulation results for the proposed scheme and controller documented in a previous section and depicted in Figures2 and 3 for the microgrid of Figure 1. The loads in the microgrid are the parallel combination of two balanced loads of Zload1-phase=55+18.84j and Zload2-phase=65+31.4j. At time t = 2.5 s, the second load is disconnected and the first load remains connected to the grid. The voltages at the inverters’ bus and after transformer bus (before and after the used filter) are given in Figure 8(a). The rms voltage in percent at the point of common coupling (PCC) is displayed in Figure 8(b). In the control scheme of Figure 2, the output of the switching modulation (PD-PWM) is applied on each inverter separately. Therefore, the load power (active and reactive) is equally shared among the working inverters. The load active power and the injected active power by three inverters are given in Figures 8(c), 8(d), 8(e), and 8(f), respectively. The reactive power has a similar performance to the active power sharing of Figure 8. Another advantage of using the 5-level diode-clamped inverter is exemplified in Figure 8(g), where the voltage THD of the injected voltage is less than 2% at any operating condition.Figure 8
Voltage profile, power sharing, and THD at PCC for balanced loads by proposed control.
(a)
Voltage waveforms before and after filter per phase (b)
Voltage profile at PCC for balanced loads by proposed control (c)
Active power consumed by all loads in microgrid (d)
Injected active power by inverter 1 (e)
Injected active power by inverter 2 (f)
Injected active power by inverter 3 (g)
Voltage THD at PCC for balanced loads by proposed control


## 5.2. Variable Unbalanced Loads

This section depicts the simulation results for the suggested scheme in a previous section, which is depicted in Figure3 for the positive- and negative-sequence control loops. Before time t < 5 s, the existing balanced load in the system is Zload1=55+18.84j. At time t = 5 s, the first unbalanced loads are connected to the system; these loads are Zload-a=25+6.28j, Zload-b=50+31.4j, and Zload-c=35+15.7j, which are attached in parallel to the original balanced loads. At time t = 7.5 s, the second unbalanced loads of Zload-a=30+9.42j, Zload-b=35+11j, and Zload-c=45+14.13j are connected to the loads mentioned above. The rms voltage in percent is given in Figure 9(a) for the connection of two groups of unbalanced loads. The effectiveness of the mitigation for the negative-sequence voltage by its control loop is manifested by the negative-sequence factor as defined in IEEE Standard 1159-1995, which should not be greater than 2%. Figures 9(b) and 9(c) show the negative-sequence factor without and with using its control loop (lower blocks) in Figure 3. The reflection of the small negative-sequence factor is shown in the instantaneous voltage and current waveforms at the loads, shown in Figures 10(a) and 10(b), respectively.Figure 9
Voltage profile and negative-sequence factor with and without using negative control loop.
(a)
Voltage profile at PCC for unbalanced loads by proposed control (b)
Negative-sequence without using negative control loop (c)
Negative-sequence with using negative control loopFigure 10
Instantaneous voltage and current waveforms with unbalanced loads.
(a)
Instantaneous voltage waveforms at load side (PCC) with unbalanced loads (b)
Instantaneous current waveforms with unbalanced loads


## 5.3. Nonlinear Loads

The nonlinear load is a drastically problematic issue for the droop control schemes because the conventional droop is designed to let all generators share the fundamental components only. The existence of harmonics adds more complexity to the droop control [29]. On the contrary, the proposed scheme handles the harmonics without any modification or adding more complexity since each inverter is given the same control signals (output of the PD-PWM) to stabilize the voltage at the loads. Therefore, the load harmonics are evenly shared among the inverters. This equal distribution of harmonics among the inverters comes naturally (plug-and-play capability) due to the structure of the proposed operational (control) scheme depicted in Figure 2. The nonlinear load is presented by diode bridges with a highly inductive load. This nonlinear load is added to the system at time t = 12.5 s with the balanced original load of Zload1=55+18.84j. The rms voltage in percent is given in Figure 11(a). The total three-phase load currents are given in Figure 11(b).Figure 11
Voltage and current performance during nonlinear loads.
(a)
Voltage profile at PCC for nonlinear loads by proposed controller (b)
Instantaneous three-phase load current for all loads


## 5.4. Loss/Reconnection of Any Inverter (Generation Unit) to Microgrid

In the droop control scheme, the loss of any inverter greatly influences the transient performance at the instant of the inverter loss [29]. This transition requires the droop control to have a high bandwidth in order to recover the voltage fast. Another advantage of the proposed scheme is its seamless transitional profile during the loss or reconnection of any inverter circuit. The smooth transient performance emanates from the propounded structure of the control scheme because the output of the modulation technique (PD-PWM) is applied on all inverters at the same time, meaning that each inverter works independently of the other inverters to stabilize the voltage at the loads during any transition. As a result, the load current is equally divided among the existing (working) inverters. At time t = 17.5 s, the inverter-1 is disconnected, and both inverter-2 and inverter-3 are adaptively sharing the loads’ currents; that is why there is an increase in the injected current generated by inverter-2 and inverter-3. Consequently, the injected voltage of each existing inverter also changes (slightly increases) to accommodate the change in the injected current. The rms voltage profile in percent during the loss of the inverter-1 is illustrated in Figure 12(a). The three-phase currents of all three inverters are portrayed in Figures 12(b), 12(c), and 12(d). The instantaneous voltage waveforms per phase (before the transformer) of inverter-2 (or inverter-3) before and after the instant of inverter-1 loss are depicted in Figures 12(e) and 12(f), respectively. These two figures (Figures 12(e) and 12(f)) show a difference in the pattern of the voltage pulses, where the pulses of the voltage waveform (after the loss of inverter-1) are wider; this indicates more injected voltage at inverters’ bus to push more currents as shown in Figures 12(c) and 12(d). Almost an adverse performance can be obtained when a new inverter is connected to the microgrid.Figure 12
Root mean square (rms) and instantaneous voltage and instantaneous current waveforms during loss of inverter 1.
(a)
Voltage profile at PCC during loss of inverter 2 by proposed controller (b)
Three-phase currents of inverter-1 during loss of inverter-1 (c)
Three-phase currents of inverter-2 during loss of inverter-1 (d)
Three-phase currents of inverter-3 during loss of inverter-1 (e)
Voltage waveform Inverter-2 (or inverter-3) of one phase (phase A) before loss of inverter-1 (f)
Voltage waveform Inverter-2 (or inverter-3) of one phase (phase A) after loss of inverter-1


## 6. Simulation Results of Proposed Operational Scheme in Grid-Connected Mode

The microgrid has an advantage of autonomous working, or working connected to the power grid. The connection between both grids fetches some merits to the microgrid and power grid as well [30]. The current references of (33) are plugged to the current control loop as shown in Figure 2 so as to operate the power control. In order to have a smooth transition from the microgrid operation (microgrid mode) to the grid-connected mode, the following procedure is suggested.(1)
The current control is adjusted such that its input current references are transferred from the microgrid operation (upper block-voltage control of Figure2) to the grid-connected mode (lower block-power control of Figure 2). Meaning that the outputs of the voltage control (upper block) in Figure 2 become zero.(2)
The power references are adjusted to barely cover the loads’ power inside the microgrid only. Therefore, the exchanged power and tie-feeder current between both grids are zero. At this operating condition, the connection between both grids can be established.(3)
After step-2 is successfully realized, the power references are adjusted such that the power can be injected or absorbed in the tie feeder between both grids.This aforementioned transition from the microgrid operation (microgrid mode) to the grid-connected mode is depicted in Figure13(a), which shows the three steps mentioned above and the active power tracking performance to arbitrary power references. Also, the reactive power performance is depicted in Figure 13(b). In Figure 13 at time t = 20 s, the operation is intentionally transferred from the microgrid operation (microgrid mode) to the grid-connected mode. The transient time is almost 1 s for any transition in power and the performance tends to be of 1st order due to the suggested adaptation mechanism of the PI controller parameters.Figure 13
Power tracking performance in grid-connected mode of control scheme.
(a)
Active power tracking performance in grid-connected mode (b)
Reactive power tracking performance in grid-connected modeFigure14 gives more clarification to Figure 13, and it proves the advantages of connecting the microgrid to the main power grid for the same power curves of Figure 13. As shown in Figure 14 from time t = 20 s till t = 22.5 s, the power references are adjusted to cover the loads inside the microgrid only. Therefore, the exchanged power between both grids is zero (Ptie=0). If the power reference is greater than what the loads inside the microgrid need, then the rest of the generated power (PGenerated(MG)) is exported from the microgrid (MG) to the power grid (PG) and vice versa. The exchanged active power between the microgrid and power grid (Ptie), microgrid load power (PLoad(MG)), and generated power of the microgrid (PGenerated(MG)) is depicted in Figure 14(a), and in Figure 14(b) the reactive power is depicted.Figure 14
Active and reactive Powers of microgrid, loads inside micrgord, and power grid in grid-connected mode.
(a)
Performance of active power of microgrid (PGenerated(MG)), loads inside microgrid (PLoad(MG)), and power grid (Ptie) (b)
Performance of reactive power of microgrid (QGenerated(MG)), loads inside microgrid (QLoad(MG)), and power grid (Qtie)


## 7. Conclusion

This paper presents an innovative operational scheme for the microgrid. This scheme has a new adaptive PI controller, which is based on an improved normalized least mean fourth algorithm. This adaptation mechanism is developed with a variable step-size technique in order to fasten its convergence and enhance its stability. The proposed operational scheme along with the developed controller is used to stabilize the magnitude and frequency of the voltage across the loads. This voltage is maintained around 1 pu (100% percent) at different loading conditions such as balanced, unbalanced, and nonlinear loads. The proposed scheme outperforms other linear, adaptive, and nonlinear controllers based similar schemes for the same microgrid operating conditions. Also, the propounded scheme has an advantage of enabling the microgrid to operate in a grid-connected mode and to seamlessly transfer from the microgrid mode (voltage control mode) to grid-connected mode (power control mode).



---

*Source: 4854803-2019-06-19.xml*