Intelligent Transition Control between Grid-Connected and Standalone Modes of Three-Phase Grid-Integrated Distributed Generation Systems

: This paper proposes an intelligent seamless transition controller for smooth transition between grid-connected (GC) and standalone modes of distributed generation (DG) units in the grid. The development of this seamless controller contributes to two main processes in the transition modes: the synchronization process and an islanding process. For the synchronization process, the stationary reference frame phase-locked loop (SRF-PLL) associated with the voltage source inverter (VSI) is modiﬁed using the frequency, voltage deviation, and phase angle information. Furthermore, the islanding process is classiﬁed as intentional and unintentional islanding scenarios for achieving efﬁcient transition control. Here, the intentional islanding process is achieved with the information that is available in the system due to the planned disconnection. For the unintentional islanding process, a fuzzy inference system (FIS) is used to modify the conventional droop control using the information of change in active power, voltage, and frequency. To identify the action of the proposed approach during the transition process, numerical simulations are conducted with the hardware-in-loop (HIL) simulator by developing a 10 kWp three-phase grid-connected DG system. The results identiﬁed the efﬁcient control of the VSI for both islanding and grid connection processes. In the islanding conditions, the proposed controller provides advantage with less detection and disconnection time, and during synchronization, it instantly minimizes the phase-angle deviation to achieve efﬁcient control.


Introduction
The increasing renewable energy installations has led to the formation of distributed generation networks (DGs), which tend to support the grids by sharing the load and reducing the peak demand on the grid [1]. The DGs also make the consumer more independent and the system more reliable with their ability to operate in a centralized and decentralized manner [2]. For being able to operate in multiple operating states, the inverter needs to be able to perform seamless transition between the states without causing any form of transient response or lead the system to frequency desynchronization, which may lead to mass blackout and can severely damage the components connected in the network.
While operating in the centralized mode of operation, the grid is connected with the DGs, and the voltage and frequency of the DGs are in synchronization with the grid [3]. The DGs supply power to the local load and remaining power is either stored into the energy management system or injected into the utilities [4]. However, in case of grid abnormalities [5], the DGs try to recover the system as per the grid codes, and on failure to attain, the grid is disconnected from the DGs along with its local load [6][7][8][9]. The DGs are required to maintain the operation as per the grid parameters and satisfy the local load, and at the same time, it must be capable enough to reconnect back to the grid as it returns online.
For achieving the fast and reliable transition between the modes, various techniques have been presented in the literature. Conventionally, a switch-based mechanism was introduced in which a static switch is used to change the controller with the change in mode of operation [10,11]. However, the use of static switches caused concern, as the time between the disconnect and reconnect period may act as a source of transition for the operating voltage. Furthermore, in [12,13], a single control structure is used for the dual mode of operation. The outer loop acts as a reference current generator in gridconnected (GC) mode, whereas it acts as a voltage regulator for the standalone (SA) mode of operation. It is better than the static controller; however, voltage overshoot may cause reduced efficiency and reliability while operating in standalone mode [14][15][16][17].
Furthermore, in [18], a staircase-based frequency variation technique implemented using proportional integral (PI) controller effectively reduces the total harmonic distortion (THD). However, the problem with the PI controller remains due to the presence of steadystate error for a stationary frame [19]. To overcome the issue, a proportional resonant (PR)-based control scheme for indirect current control is presented in [20]. Although the PR controller resolves the drawback of the PI controller, for grid voltage distortion, the response speed for the controller is affected and causes delay in the average power-based current reference generation. To maintain the response speed, a stationary reference frame proportional resonant control is proposed in [21]. It overcomes transient responses and helps in providing active and reactive power control to overcome the varying output voltage and power.
Furthermore, a robust hierarchical control system is proposed [22] in order to overcome the issues with previous controllers. The voltage controller is designed with variable structure elements for mitigation of voltage disturbance. It also utilizes the power-sharing abilities of a droop-based controller. However, the variable element structure introduces harmonics in the system and causes a delay in transient response. To overcome the transient response delay, a model predictive control (MPC)-based technique is proposed in [23]. The MPC provides a stable output that is easy to design and has low cost for implementation. For all the literature identified in this research [24], the control techniques faced drawbacks while achieving fast and efficient synchronization and disconnection, especially during the unintentional islanding condition. Furthermore, most of the literature faced issues due to the deviation of voltage and frequency crossing the predefined limits during transient conditions.
To overcome the drawbacks during the transition process, this paper develops an intelligent control algorithm for smooth transition while keeping all the concern parameters under check. The proposed controller is motivated toward the following aspects: • Provide faster and efficient grid synchronization without compromising for both phase-angle and frequency deviations. • Reduce the preparation time of the disconnection controller by estimating and adjusting the phase and voltage of the VSIs. • Improve the operating condition of the system with a fuzzy controller during the transition process, especially under transients in the system operation.
The details of these aspects are further discussed as follows: In Section 2, the system configuration of the grid-connected DG unit is discussed, and the model of the VSI is derived. In Section 3, the control aspects associated with the control of VSIs are discussed. Based on these control models, the islanding detection, control, and grid resynchronization process are achieved through various modifications and by developing the intelligent control approaches in Section 4. The numerical simulations are developed in Section 5 to Energies 2021, 14, 3979 3 of 21 assess the performance of the developed modifications and intelligent controller, and the discussion is concluded in Section 6.

System Configuration and Model Derivation
The general overview of a three-phase grid-connected distributed generation (DG) unit with a resistive-inductive (RL) load is shown in Figure 1. This configuration has a primary energy source with a DC-DC boost converter and a three-phase voltage source inverter (3-φ VSI) connected at the point of common coupling (PCC) through an LC filter and RL load. The switch S 1 at the grid side of the system is used to achieve the grid-connected and standalone operation of the DG unit. An ideal three-phase voltage source is considered as the main grid with R g and L g components per phase. The major challenge with this configuration is to maintain voltage and frequency at the PCC and coordinate the operation of reclosures and protective relays for safe and quick disconnection of DGs from the utility during the grid-side abnormalities with compliance to the grid standards [25,26]. This operation also involves automatic reconnecting, or intervention of the operator to reclose the DG connection with the grid after the abnormality is cleared. All these operations require the system to be equipped with an accurate islanding detection mechanism [27][28][29] and a robust and smooth seamless transition control infrastructure. Based on these control models, the islanding detection, control, and grid resynchronization process are achieved through various modifications and by developing the intelligent control approaches in Section 4. The numerical simulations are developed in Section 5 to assess the performance of the developed modifications and intelligent controller, and the discussion is concluded in Section 6.

System Configuration and Model Derivation
The general overview of a three-phase grid-connected distributed generation (DG) unit with a resistive-inductive (RL) load is shown in Figure 1. This configuration has a primary energy source with a DC-DC boost converter and a three-phase voltage source inverter (3-VSI) connected at the point of common coupling (PCC) through an LC filter and RL load. The switch 1 at the grid side of the system is used to achieve the gridconnected and standalone operation of the DG unit. An ideal three-phase voltage source is considered as the main grid with and components per phase. The major challenge with this configuration is to maintain voltage and frequency at the PCC and coordinate the operation of reclosures and protective relays for safe and quick disconnection of DGs from the utility during the grid-side abnormalities with compliance to the grid standards [25,26]. This operation also involves automatic reconnecting, or intervention of the operator to reclose the DG connection with the grid after the abnormality is cleared. All these operations require the system to be equipped with an accurate islanding detection mechanism [27][28][29] and a robust and smooth seamless transition control infrastructure. To identify the state-space representation of the configuration in Figure 1 for standalone and grid-connected modes, a simplified network is developed, as shown in where , is the vector representation of the output voltage at each phase of the inverter, , is the vector representation of the output current at each phase of the inverter, is the filter inductance, 0, is the voltage at the PCC, is the filter capacitance, , is the current flowing through the three-phase RL Load, and , is the three-phase grid current.  To identify the state-space representation of the configuration in Figure 1 for standalone and grid-connected modes, a simplified network is developed, as shown in Figure 2. The equations governing these modes of operation are derived as v inv,abc = Ri I,abc + L di I,abc where v inv,abc is the vector representation of the output voltage at each phase of the inverter, i I,abc is the vector representation of the output current at each phase of the inverter, L is the filter inductance, v 0,abc is the voltage at the PCC, C is the filter capacitance, i L,abc is the current flowing through the three-phase RL Load, and i g,abc is the three-phase grid current. Furthermore, the state-space representation in (1) is simplified for the grid-tied mode by formulating the stationary reference frame, , as a fact that grid impedance is less than the base impedance. Here, 0 is equal to , and without the loss of generality, the modified formulation is given as  Furthermore, the state-space representation in (1) is simplified for the grid-tied mode by formulating the stationary reference frame, αβ, as a fact that grid impedance is less than the base impedance. Here, v 0 is equal to v g , and without the loss of generality, the modified formulation is given as ( Therefore, by considering the Laplace domain for nominal values of the filter components, the ideal model of the system is given as where G Pi is the model representation that can be controlled with a current control loop.
The above equation provides an aspect of implementing model-based control with the grid-connected mode of the configuration in Figure 1. Furthermore, for an islanded or standalone mode of operation, the v 0 is equal to the load voltage, and its stationary frame representation is given as For an islanded operation, the main objective is to maintain the load voltage. Hence, the system model based on the inverter output voltage and the voltage across the filter capacitor is derived as where G Pv identifies the model representation of the plant that can be controlled with the voltage control loop. The details of the control methodology associated with the VSI, and the development of the intelligent transition system are discussed in the further sections.

Control Development for Voltage Source Inverter
As per the details provided in Section 2, the control model of a three-phase inverter is developed. The inverter needs to be capable enough to adject the output frequency and voltage based on the changes observed from the setpoint in the droop controller. The value of current and the voltage for each phase is measured locally and then transformed in the dq frame of reference, as represented in Figure 3. The transformation facilitates an effortless implementation of the control mechanism.

Reference Frame
The transformation operates in two stages: initially, the parameters are converted into an frame, which is further transformed into a rotating frame of reference [30]. The transformation aids the system control by converting the rotation frame components into a stationary frame. This reduces the complexity of the controller, and the

Reference Frame
The dq transformation operates in two stages: initially, the abc parameters are converted into an αβ frame, which is further transformed into a dq rotating frame of reference [30]. The transformation aids the system control by converting the rotation frame components into a stationary frame. This reduces the complexity of the controller, and the implementation of a decoupled linear controller can be enabled.
As per Figure 3, the rotating angle between the dq frame with respect to the αβ frame is represented by a rotating angle, which is denoted by θ. The value of the q axis is fixed to zero for locking the stationary frame with the rotating frame.
The mathematical representation of the abc → αβ transformation can be expressed as: Furthermore, the αβ → dq transformation is expressed as: where x is a representation of the value to be transformed.

Phase-Locked Loop
The phase-locked loop (PLL) is configured based on the dq transformation [31]. The phase angle and the frequency of the inverter are measured using PLL. A conventional PLL consists of a reference signal, phase detector, and filter unit. Whereas in synchronous reference frame phase-locked loop (SRF-PLL), the components are similar with the insertion of a dq transformation block by keeping the q-axis value zero, the phase is locked with the rotating frame of reference, as represented in Figure 4 [31,32]. The signal is fed to the PI controller and further added with the frequency frame of reference. By integrating frequency over the time step, value of the phase angle can be achieved, which is fed back to the dq transformation block to close the loop. If the q-axis is driven at zero, then the desired frequency is achieved, whereas the other parameters obtained can be used for further control.

Droop Implementation
The droop controller is implemented to identify the change in the measure and reference value, as represented in Figure 5 [33]. The active (P) and reactive (Q) power are calculated from the v d , v q and i d , i q , which are measured locally and transformed. The expression for P and Q calculations are as follows: Energies 2021, 14, 3979

of 21
The droop controller is implemented to identify the change in the measure and reference value, as represented in Figure 5 [33]. The active (P) and reactive (Q) power are calculated from the , and , , which are measured locally and transformed. The expression for P and Q calculations are as follows:

Frequency Setpoint
The P and Q values are fed to the droop controller to obtain the operating voltage and frequency. The conventional grid used to have the operating frequency fixed at the nominal value [34][35][36]. However, with the improvement in the grid, the nature of the frequency has become dynamic. The frequency setpoint is chosen based on the battery state of charge (SOC). The frequency ( ) dependency on SOC is represented by the equation: Furthermore, Figure 6 represents the SOC dependency. The slopes determine the battery SOC. The steep slope represents that the condition is critical, and the battery is charging and discharging at a faster rate.

Frequency Setpoint
The P and Q values are fed to the droop controller to obtain the operating voltage and frequency. The conventional grid used to have the operating frequency fixed at the nominal value [34][35][36]. However, with the improvement in the grid, the nature of the frequency has become dynamic. The frequency setpoint is chosen based on the battery state of charge (SOC). The frequency ( f soc ) dependency on SOC is represented by the equation: Furthermore, Figure 6 represents the SOC dependency. The slopes determine the battery SOC. The steep slope represents that the condition is critical, and the battery is charging and discharging at a faster rate. For making the controller more robust, a control loop with is formulated. The frequency of change in active power is also considered for determining . The active power change counters the frequency change during power exchange. Hence, the frequency change is damped to protect the system from power imbalance. The expression can be denoted as: where is the frequency change during the power exchange.

Voltage Controller
After the SRF-PLL and obtaining the frequency setpoint, the voltage control with power sharing needs to be considered. A feedforward control is considered with current, and the voltage of each phase is transformed to the frame. The current reference * and * are formulated by feeding the PI controller with and . The reference can be mathematically represented as: For making the controller more robust, a control loop with f o is formulated. The frequency of change in active power is also considered for determining f o . The active power change counters the frequency change during power exchange. Hence, the frequency change is damped to protect the system from power imbalance. The expression can be denoted as: where f dp is the frequency change during the power exchange.

Voltage Controller
After the SRF-PLL and obtaining the frequency setpoint, the voltage control with power sharing needs to be considered. A feedforward control is considered with current, and the voltage of each phase is transformed to the dq frame. The current reference i * and i * q are formulated by feeding the PI controller with v d and v q . The reference can be mathematically represented as: where c f and L f represent the capacitance and inductance of the filter, respectively. The voltage references are denoted by v * d and v * q . The signals are again transformed from dq to abc per phase of the inverter. The frequency setpoint is incorporated to attain the desired frequency and voltage for the inverter.

Virtual Impedance
To overcome the resistive nature of low voltage, a virtual impedance is added into the system. Adding up physical inductance to the power system is a bulky and expensive solution; hence, to avoid that and attain a desired inductive behavior, a decoupled current is multiplied with the required inductance value [37,38]. The voltage references after adding the virtual impedance are expressed as follows: where the virtual reactance is denoted by L v .

Voltage Compensation
The voltage compensation reduces the losses that a power system may suffer due to the existing line connection. The voltage compensator is designed similar to the virtual impedance where the amount of voltage drop is added to the voltage setpoint. The expression for the voltage drop is as: where the line resistance is represented by R l . The derivative value is added to the setpoint, and the dq reference value can be mathematically represented as:

Seamless Transition Control
The need for a robust and smooth seamless transition control infrastructure has been emphasized in the previous sections. In this section, the development of this seamless controller will be achieved with two main processes, which can be listed as the synchronization process and an islanding process. The synchronization process of the seamless controller implements relevant loops of voltage and phase synchronization to reconnect the islanded DG with the grid. Furthermore, the islanded process has two aspects: an intentional islanding and an unintentional islanding. During the intentional islanding, the controller has sufficient information of the planned disconnection and minimizes the transients during the process. In contrast, during an unintentional islanding condition, the process is abrupt with unforeseen events. Here, the controller must impose fast actions to minimize the damages in the system.

Transition from Grid-Connected to Standalone Mode
The main challenge of this transition process is to maintain the voltage and frequency levels within the predefined limits of grid standards [39,40]. Generally, for an islanded system, the inverter power output moves along the droop curve, and the setpoint of frequency f 0 depends on the SOC of the Energy Storage System (ESS) in the system. Hence, as the DG is disconnected from the grid, the frequency shifts immediately to the setpoint, especially during a significant amount of incoming power, which results in large disturbances. However, when the system is reconnected in the grid, it either feeds power into the system or receives the power from the grid to satisfy the loads. Here, the frequency either decreases or increases depending on the power exchange, and when the equilibrium between both the points is reached, the system achieves steady state.

Intentional Islanding
This section develops the controller to prepare the DG for a disconnection during an intentional islanding case. The disconnection process is explained based on the P/F and V/Q droop curve characteristics, as shown in Figure 7a-d, respectively.
In Figure 7, the intentional and unintentional islanding conditions based on P/ f droop curve characteristics are shown to identify the the change in operating points, especially the frequency setpoints f 01 and f 02 of the DG system before and after the disconnection process. Here, f 01 is the interconnected system setpoint, and f 02 is the original frequency setpoint of the system. Initially, before the disconnection process, the DG interconnection receives active power as per the load requirement, but after the disconnection process, the power flow in the system changes, which results in a sudden decrease of the frequency. Here, the frequency setpoint is estimated through the derivative of the active power and through the SOC of the ESS. Generally, the setpoint estimated through the SOC is developed for longer periods of disconnection and cannot be changed. However, during intentional islanding, the derivative of active power can be planned through the frequency change while the DG is operating in the grid-connected mode. This reduces the frequency change, and the droop curve alters, as shown in Figure 7.
Similarly, the V/Q droop curve characteristics during the intentional and unintentional islanding conditions are shown in Figure 7 to identify the change in the voltage setpoints v 01 and v 02 of the DG system before and after the disconnection process. Here, v 01 is the interconnected system voltage setpoint, and v 02 is the original voltage setpoint of the DG system. As the DG is islanded, the system holds an inherent voltage setpoint depending upon the state of the system, and it jumps back to the original setpoint due to the influence of line voltage compensations and virtual impedance. This phenomenon is expected to create a significant disturbance based on the reactive power required to restore the voltage during the fault ride-through process. This can be further minimized by relatively controlling the reactive power sharing in the system prior to the DG disconnection [41,42]. To achieve this, the voltage and frequency deviation with the droop control needs to be implemented for creating a power flow between the connected DGs. This indicates that an additional deviation is provided to the voltage and frequency setpoints to manipulate the line active and reactive power regardless of the other parameters in the system. The control loops shown in Figure 8 set the line active and reactive power to zero for the intentional islanding condition. In both these cases, the line power is fed to a PI controller, which provides the voltage and frequency deviations until the line power is set to zero.
interconnection receives active power as per the load requirement, but after the disconnection process, the power flow in the system changes, which results in a sudden decrease of the frequency. Here, the frequency setpoint is estimated through the derivative of the active power and through the SOC of the ESS. Generally, the setpoint estimated through the SOC is developed for longer periods of disconnection and cannot be changed. However, during intentional islanding, the derivative of active power can be planned through the frequency change while the DG is operating in the grid-connected mode. This reduces the frequency change, and the droop curve alters, as shown in Figure 7. Similarly, the / droop curve characteristics during the intentional and unintentional islanding conditions are shown in Figure 7 to identify the change in the voltage setpoints 01 and 02 of the DG system before and after the disconnection process. Here, 01 is the interconnected system voltage setpoint, and 02 is the original voltage setpoint of the DG system. As the DG is islanded, the system holds an inherent voltage setpoint depending upon the state of the system, and it jumps back to the original setpoint due to the influence of line voltage compensations and virtual impedance. This phenomenon is expected to create a significant disturbance based on the reactive power required to restore the voltage during the fault ride-through process. This can be further minimized by relatively controlling the reactive power sharing in the system prior to the DG disconnection [41,42]. To achieve this, the voltage and frequency deviation with the droop control needs to be implemented for creating a power flow between the connected DGs. This indicates that an additional deviation is provided to the voltage and frequency setpoints to manipulate the line active and reactive power regardless of the other parameters in the system. The control loops shown in Figure 8 set the line active and reactive power to zero for the intentional islanding condition. In both these cases, the line power is fed to a PI controller, which provides the voltage and frequency deviations until the line power is set to zero.
(a) Active power control.

Unintentional Islanding
This section develops the controller to prepare the DG for a disconnection during an unintentional islanding case. This process is implemented with a fuzzy inference system (FIS), which overcomes the drawback of fixed droop gain with the conventional control in the systems dynamic performance. The FIS achieves the flexibility in the droop gain by

Unintentional Islanding
This section develops the controller to prepare the DG for a disconnection during an unintentional islanding case. This process is implemented with a fuzzy inference system (FIS), which overcomes the drawback of fixed droop gain with the conventional control in the systems dynamic performance. The FIS achieves the flexibility in the droop gain by incorporating both the magnitude and derivative of the active power exchange ∆P in the system [43,44]. The inverse relation of these parameters with the droop gain is expressed as From (22), it is identified that the frequency deviation ∆ f is proportional to the product of exchanged active power ∆P and the droop gain k p . Similarly, the voltage deviation ∆V is proportional to the product of exchanged reactive power and the droop gain k q . These equations indicate that under a constant droop gain, the system is more unstable for large active and reactive power deviation. Hence, an effective pairing of the droop gain with the fuzzy controller will stabilize the deviation and its derivative. The details of the fuzzy controller for seamless disconnection from the grid are discussed in the further sections.
Fuzzy Droop Controller: The details of the FIS and their application to power system and power electronic applications are widely discussed in the literature [45][46][47][48][49]. The basic block representation of the FIS process in the development of the droop controller is shown in Figure 9. Fuzzy Droop Controller: The details of the FIS and their application to power system and power electronic applications are widely discussed in the literature [45][46][47][48][49]. The basic block representation of the FIS process in the development of the droop controller is shown in Figure 9.
The process of developing a seamless control action with the fuzzy droop controller is achieved in three steps: fuzzy sets, rule development, and defuzzification. In the first step, the fuzzy sets are created to map the membership functions in a range of 0 to 1 between both the inputs and the output variables. In this condition, the active power exchange and its derivative are input variables for the development of the fuzzy controller.
Here, a small low-pass filter is used with the derivative input of the active power exchange. This is to filter the distorted values under the derivative function of the unstable active power measurements. Furthermore, the droop gains are obtained as the outputs of the controller. The mapping between the inputs and outputs with the membership functions i.e., the fuzzy sets, are shown in Figure 10. The fuzzy set of active power input shown in Figure 10a is developed with five membership functions, and the range of each membership function represents the power exchanged. Each membership function in the fuzzy set is termed as big negative ( ), low  The process of developing a seamless control action with the fuzzy droop controller is achieved in three steps: fuzzy sets, rule development, and defuzzification. In the first step, the fuzzy sets are created to map the membership functions in a range of 0 to 1 between both the inputs and the output variables. In this condition, the active power exchange and its derivative are input variables for the development of the fuzzy controller. Here, a small low-pass filter is used with the derivative input of the active power exchange. This is to filter the distorted values under the derivative function of the unstable active power measurements. Furthermore, the droop gains are obtained as the outputs of the controller. The mapping between the inputs and outputs with the membership functions i.e., the fuzzy sets, are shown in Figure 10.  The fuzzy set of active power input shown in Figure 10a is developed with five membership functions, and the range of each membership function represents the power exchanged. Each membership function in the fuzzy set is termed as big negative ( ), low negative ( ), zero ( ), low positive ( ), and big positive ( ). Furthermore, it can be identified that the membership functions overlap with each other; this signifies that the variable does not have a single truth value but lays over multiple regions. Sometimes, this  In the second step of developing the seamless controller, the fuzzy rules are established to determine the control action for each input sample. These rules are framed in such a way that the fuzzy output enhances the dynamic response of the system during sudden power changes while maintaining the system stability. The generalized rule set for fuzzy droop control with reference to the membership functions of active power and derivative of active power are tabulated in Table 1. For a condition where both ∆P and d∆P are zero, the droop gain is set high to induce the power change. As the DG operation reaches equilibrium, and d∆P starts to decrease, the droop gain is reduced to maintain the system stability. Furthermore, the output membership rule is selected from the table based on its matching between the ∆P and d∆P values. Here, the degree of function is inserted into the vertical axis with contrast to the input function, and the corresponding output is obtained from the horizontal axis. In the final step, the defuzzification process is applied to represent the derived output fuzzy values to crisp values. Generally, there is a wide literature for defuzzification of the fuzzy outputs. In this case, the most used center of area method is implemented. This method combines the results in all the inference steps into a centroid of area. The details of the process are as follows: Initially, the centroid of the corresponding function range is multiplied with the degree of output membership function, and the values are added up. This interprets that the membership functions are integrated over a given range and divided by the summed degree of function. The resultant of this process is a fuzzy droop gain k p, f uzzy and k q, f uzzy such that the voltage and frequency setpoints are set to the VSI. Here, both k p, f uzzy and k q, f uzzy are considered to have the same value, as reactive power control is not the major area of focus in this research. Considering the newly obtained droop gains, the droop equation is given as where k q, f uzzy (∆P, d∆P) and k p, f uzzy (∆P, d∆P) can be expressed as the derived fuzzy gains of functions of ∆P and d∆P. The implementation of the developed fuzzy droop controller with the voltage source inverter is shown in Figure 11.

Transition from Standalone to Grid-Connected Mode
During the standalone operating mode, the DG is operating at its own voltage and frequency setpoints, which are completely grid-connected operation. This resulted in some inevitable differences between the two modes of operations. According to the theory of power flow in a grid-connected system, the frequency difference in the system, i.e., the voltage and phase angle difference, causes the power flow between the systems. For any condition, if these differences are large, there is a sudden change in the power flow between the system, resulting in unwanted transients and deviations in the system. Hence, to ensure a stable connection of the islanded DGs into the grid, the seamless control action is achieved through the synchronization of voltage, frequency, and the phase angle. Further, the standards for safe connection of DGs with the utility is suggested by various grid codes and in the literature [50][51][52]. The research in [53] indicates that the phase angle difference of a DG to the grid should not be more than 60 0 . More strict requirements for the

Transition from Standalone to Grid-Connected Mode
During the standalone operating mode, the DG is operating at its own voltage and frequency setpoints, which are completely grid-connected operation. This resulted in some inevitable differences between the two modes of operations. According to the theory of power flow in a grid-connected system, the frequency difference in the system, i.e., the voltage and phase angle difference, causes the power flow between the systems. For any condition, if these differences are large, there is a sudden change in the power flow between the system, resulting in unwanted transients and deviations in the system. Hence, to ensure a stable connection of the islanded DGs into the grid, the seamless control action is achieved through the synchronization of voltage, frequency, and the phase angle. Further, the standards for safe connection of DGs with the utility is suggested by various grid codes and in the literature [50][51][52]. The research in [53] indicates that the phase angle difference of a DG to the grid should not be more than 60 0 . More strict requirements for the grid interconnection of DGs are mentioned in the IEEE 1547 standards [54][55][56], and these requirements vary depending on the system size. The grid integration standards for low-voltage grids discussed in [57] proclaim that the phase angle difference of a DG to the grid should not be more than 10 0 . Considering these aspects, all the necessary controller components are examined to eliminate any errors during this grid interconnection process. Furthermore, an additional control layer will be developed to monitor the deprivations within the allowable limits.

Voltage Synchronization
The control structure of VSI discussed in Section 3 is modeled by considering voltage and frequency setpoints as the inputs. However, during the standalone operating mode, the DG is operating at its own voltage and frequency setpoints, which are fed to the VSI. This same principle is used for the synchronization process, but the voltage setpoint is swapped with that of the utility [58]. This control aspect does not need any additional control action except for the change in the setpoint for the VSI, and it has instant response. The control structure of the VSI with the newly obtained voltage setpoints from the grid is shown in Figure 12.

Phase and Frequency Synchronization
The phase-locked loop is used to control both the phase angle and frequency during the grid integration of the DGs. To achieve this, a synchronization loop is implemented using the SRF-PLL, within which a reference frequency is provided as an input. Furthermore, driving the -axis voltage to zero locks the phase angle to the reference frame to achieve the desired frequency. In this process, the DG tries to match its phase angle and frequency level to the values at the grid and thus obtains new frequency and phase setpoints and , respectively. Similar to the voltage synchronization, the frequency synchronization can be achieved by shifting the frequency setpoint to the SRF-PLL from to , and this process also has an instant response as the VSI drives the to zero. Furthermore, to achieve the phase synchronization an extra control layer is required to eliminate the phase angle difference and to prevent the unwanted power flows during grid integration of DGs. The control structure for the frequency and phase synchronization loop is shown in Figure 13.

Phase and Frequency Synchronization
The phase-locked loop is used to control both the phase angle and frequency during the grid integration of the DGs. To achieve this, a synchronization loop is implemented using the SRF-PLL, within which a reference frequency is provided as an input. Furthermore, driving the q-axis voltage to zero locks the phase angle to the reference frame to achieve the desired frequency. In this process, the DG tries to match its phase angle and frequency level to the values at the grid and thus obtains new frequency and phase setpoints f g and θ g , respectively. Similar to the voltage synchronization, the frequency synchronization can be achieved by shifting the frequency setpoint to the SRF-PLL from f dg to f g , and this process also has an instant response as the VSI drives the V q to zero. Furthermore, to achieve the phase synchronization an extra control layer is required to eliminate the phase angle difference and to prevent the unwanted power flows during grid integration of DGs. The control structure for the frequency and phase synchronization loop is shown in Figure 13.
points and , respectively. Similar to the voltage synchronization, the frequency synchronization can be achieved by shifting the frequency setpoint to the SRF-PLL from to , and this process also has an instant response as the VSI drives the to zero. Furthermore, to achieve the phase synchronization an extra control layer is required to eliminate the phase angle difference and to prevent the unwanted power flows during grid integration of DGs. The control structure for the frequency and phase synchronization loop is shown in Figure 13. From Figure 13, it is observed that by sending out the signals for -axis control, the phase angle locked to the reference frame can be manipulated. Here, instead of driving the -axis voltage to zero, the setpoint is achieved by driving the phase angle difference to a PI controller. This variation will slightly affect the frequency at the initial stage, but as the phase angle difference decreases, the frequency synchronization can be locked at its original setpoint.

Numerical Simulations
For experimental validation of the developed control action, a DG system connected in the grid is developed as shown in Figure 1. The details of the grid-connected DG unit are shown in Table 2. The control action is developed using Typhoon-hardware in loopapplication programming interface (HIL-API) with the real-time operation of the DGs in the grid. The DG systems contribute to 10 kWp power output, and the three-phase VSI From Figure 13, it is observed that by sending out the signals for q-axis control, the phase angle locked to the reference frame can be manipulated. Here, instead of driving the q-axis voltage to zero, the V q setpoint is achieved by driving the phase angle difference to a PI controller. This variation will slightly affect the frequency at the initial stage, but as the phase angle difference decreases, the frequency synchronization can be locked at its original setpoint.

Numerical Simulations
For experimental validation of the developed control action, a DG system connected in the grid is developed as shown in Figure 1. The details of the grid-connected DG unit are shown in Table 2. The control action is developed using Typhoon-hardware in loopapplication programming interface (HIL-API) with the real-time operation of the DGs in the grid. The DG systems contribute to 10 kWp power output, and the three-phase VSI connected with the DG is operated with the pulse width modulation (PWM) generated from the HIL interface. The generic user interface (UI) system for establishing interconnection between PV systems and the grid has four machine states, which correspond to the starting up state, running state, disabled state, and islanded state. The generic inputs of the UI are active power curtailment, rate of change of active power, voltage deviation, frequency deviation, and phase angle deviation. As the effect of ESS-SOC on the system operation and control action is found to be negligible, the aspects of SOC are considered constant during the simulation. Furthermore, the battery is considered to be fully charged at 100% SOC. The operating characteristics of the PV systems connected at the point of common coupling are shown in Figure 14. The figure shows the voltage, current, active power, and q-axis voltage for the grid-connected operation of the DG system. power curtailment, rate of change of active power, voltage deviation, frequency deviation, and phase angle deviation. As the effect of ESS-SOC on the system operation and control action is found to be negligible, the aspects of SOC are considered constant during the simulation. Furthermore, the battery is considered to be fully charged at 100% SOC. The operating characteristics of the PV systems connected at the point of common coupling are shown in Figure 14. The figure shows the voltage, current, active power, and -axis voltage for the grid-connected operation of the DG system.

Case 1: Unintentional Islanding Operation
In this case, the fuzzy controller developed for the islanded operation of the DG system is tested. A sample result scenario identifying the low-voltage ride through fault at the grid side and the operation of the developed controller in identifying and disconnecting the DG from the grid is shown in Figure 15. Case 1: Unintentional Islanding Operation In this case, the fuzzy controller developed for the islanded operation of the DG system is tested. A sample result scenario identifying the low-voltage ride through fault at the grid side and the operation of the developed controller in identifying and disconnecting the DG from the grid is shown in Figure 15. Initially, the DG is operating in the grid-connected environment. As the grid-side abnormality occurs, the controller identifies the fault in 0.2 s and disconnects the DG from the grid. During the transition period, the fuzzy transition controller lowers the droop gain value to accommodate the sudden change in the active power. As the transition is being achieved, there will be a sudden inrush in voltages and currents. Once the active Initially, the DG is operating in the grid-connected environment. As the grid-side abnormality occurs, the controller identifies the fault in 0.2 s and disconnects the DG from the grid. During the transition period, the fuzzy transition controller lowers the droop gain value to accommodate the sudden change in the active power. As the transition is being achieved, there will be a sudden inrush in voltages and currents. Once the active power deviation decreases, to suppress these transients, the fuzzy tries to increase the droop gain and operate the DG in the standalone mode with its local load. Furthermore, the islanded DG system operates with its RL load within 0.1 s from the time of disconnection. The impact of low-voltage fault in the system can be observed through the voltage, current, active power, and q-axis voltage. Upon the disconnection of the DG and action of the controller, the magnitude of frequency and active power has foreseen a slight variation. The frequency of the DG increased and reached the setpoint according to the state of charge of the battery, and the active power in the connecting line was directed to satisfy the local load. The standalone operating characteristics of the DG unit with an RL load is shown in Figure 16. Case II: Grid Synchronization Operation In this case, the DG system is reconnected with the utility after the low-voltage fault is cleared in the system. A sample result of the condition is shown in Figure 17. Case II: Grid Synchronization Operation In this case, the DG system is reconnected with the utility after the low-voltage fault is cleared in the system. A sample result of the condition is shown in Figure 17. Case II: Grid Synchronization Operation In this case, the DG system is reconnected with the utility after the low-voltage fault is cleared in the system. A sample result of the condition is shown in Figure 17. From the result, it is identified that upon the reconnections, the fuzzy transition controller tries to identify the voltage, frequency, and phase angle setpoints for synchronizing with the grid operation. Here, from the active power, and the q-axis voltage, it is observed that the synchronization is achieved within 0.1 s of reconnection of DG with the grid. A brief comparison of the characteristics of the developed transition controller with the conventional droop controller during the transition of the DG system from standalone to grid-connected mode is given in Table 3. Furthermore, a detailed comparison between different characteristics of the developed fuzzy control approach with the conventional droop controller are shown in Table 4. For both the cases, it is identified that the fuzzy transition controller was successful in identifying the grid abnormalities and disconnecting the DG system for standalone operation. Furthermore, it reduces the impact of transients in the system for variation in the active power. It was observed that the magnitude of the active power and q-axis voltage had a major influence during the disconnection instant. Furthermore, the detection time for the islanding scenario and disconnection from the grid takes less time with the developed controller and has better performance. Similarly, the results of case 2 identify that the synchronizing capability of the developed controller is very smooth with better performance and less synchronization time. The developed controller showed increased performance compared to the conventional control techniques, and it increased the overall dynamic stability of the system. In summary, the major aspects achieved through this paper are as follows: • The fuzzy transition controller established the dynamic stability of the droop controller and achieved stable disconnection of a DG from the grid.

•
The synchronization method using SRF-PLL estimates the phase angle during the grid synchronization and has significantly improved the synchronization performance.

Conclusions
In this paper, the seamless transition control for grid-connected operation of a threephase DG unit is achieved by modifying the conventional control and also by introducing intelligent control mechanisms. The developed approach is achieved by initially dividing the transition control into two processes: an islanding process and synchronization process. In the islanding process, control modifications for intentional islanding are developed based on the information that is available in the system due to the planned disconnection for driving the active and reactive power setpoints to zero. Furthermore, the unintentional islanding is controlled with the fuzzy inference system by modifying the droop characteristics based on the information of change in active power, voltage, and frequency during the grid abnormal operating condition. In the grid synchronization approach, the stationary reference frame phase-locked loop is modified by driving the phase angle difference to a PI controller with the q-axis voltage setpoint to zero. The developed modifications in the control schemes are tested by simulating two cases: unintentional islanding and grid synchronization during reconnection in a 10 kWp three-phase grid-connected system. The results in both the cases identify that the islanding detection, standalone control, and synchronizing capability of the developed controller are very smooth with better performance and less time.
Furthermore, the work can be extended to show the effectiveness of the developed system by implementing it with an actual system consisting of multiple distributed generation systems.