Cooperative Optimal Control Strategy for Microgrid under Grid-Connected and Islanded Modes

This paper investigates the control performance of a physical configuration of a microgrid (MG), integrated with photovoltaic (PV) arrays, battery energy storage systems (BESSs), and variable loads. The main purpose is to achieve cooperative optimal control under both grid-connected and islanded modes for the MG. For the grid-connected mode, a voltage source inverter (VSI) based on swoop control is used to control the MG connection to the grid even if PV arrays are under partially shading conditions (PSC). Then, for the islandedmode, the paper analyzes themodel of the PV unit and BESS unit detailed from the small signal point of view and designs the suitable control strategy for them. Finally, the whole MG system combines the droop control and the main/slave control to stabilize the DC bus line voltage and frequency. Both simulation and experimental results confirm that the proposed method can achieve cooperative control of the MG system in both grid-connected and islanded mode.


Introduction
To address the challenges of tackling climate change and maintaining energy security, many countries worldwide are committed to decarbonizing their energy systems.As a result, the renewable energy solution becomes an increasingly attractive and important topic, and it contributes to a sustainable development of the society.The development of hybrid power systems incorporating renewable sources represents a big step towards distributed generation (DG).The microgrid (MG) concept [1][2][3][4], which represents a cluster of interconnected DGs, loads, and intermediate battery energy storage systems (BESSs), has caught many researchers' interest.The MG flexibility can be achieved by allowing the electricity operation under two different modes [5]: one is the gridconnected mode where the MG is connected to the main grid, being either partially supplied from the grid or injecting power into the grid; the other is the islanded mode, where the MG operates autonomously when it is disconnected from the main grid.
Voltage source inverters (VSI) are often used as a power electronics interface; hence, the control of parallel VSI forming a MG has been intensively investigated in recent years [1][2][3][4][5][6][7][8][9][10].Decentralized and cooperative controllers such as the droop method have been proposed in the literature.Further, in order to enhance the reliability and performance of the droop control of VSI, virtual impedance control algorithms have been developed, providing the inverters with hot-swap operation, harmonic power sharing, and robustness for large line power impedance variations [11].
However, droop control has several drawbacks such as poor harmonic current sharing and high dependence on the power line impedances.In order to overcome these drawbacks, methods were proposed by combining lowbandwidth communications with average power sharing, droop control, and extra harmonic compensation control loops [12,13].Another solution is to combine both masterslave and droop control techniques according to the distance of individual DG unit in an islanded MG [14].
In the case of transferring from the islanded operation mode to the grid-connected mode, it is necessary to first synchronize the MGs to the grid [1].Once the synchronization is achieved, a static transfer switch is triggered to connect the MG to the grid.After the transition process between islanded and grid-connected mode is completed, it is necessary to control the active and the reactive power flows at the point of common coupling [7].

International Journal of Photoenergy
For the grid-connected mode, the PV source has the advantages of low maintenance cost, no moving/rotating parts, and pollution-free energy conversion.However, a major drawback of the PV source is its ineffectiveness during the nights or low isolation periods or during partially shaded conditions (PSC).A major challenge in using the PV source is posed by its nonlinear current-voltage (I-V) characteristics, which result in a unique maximum power point (MPPT) on its power-voltage (P-V) curve.
Several tracking schemes have been proposed [15][16][17][18][19][20][21][22][23][24], among which the popular tracking schemes include the perturb and observe (P&O), hill climbing [17,18], shortcircuit current [17], and open-circuit voltage [20].The tracking schemes mentioned above have been shown to be effective under uniform solar insolation conditions, where P-V curve of a PV module exhibits only one MPPT for a given temperature and insolation.Under PSC, the entire array, however, does not receive uniform insolation and the P-V characteristic becomes more complex, displaying multiple peaks.The effectiveness of the existing MPPT schemes, which assume a single peak power point on the P-V characteristics, will then become less effective.Therefore, there is a need to develop special MPPT schemes that can track the global peak under PSC.
This paper investigates the control performance of a physical configuration of a MG, which incorporates photovoltaic (PV) arrays, a BESS, and variable loads.In order to improve the conversion efficiency of the PV array and the charger under PSC in MG grid-connected mode, we use a MPPT algorithm under PSC developed by Ji et al. [24] based on the analysis of the P-V and I-V output characteristics.Then, the grid connection requirements of the whole MG system are achieved using a VSI.Then, for the islanded mode, the paper analyzes the model of the PV unit and the BESS unit detailed from the small signal point of view and designs the suitable control strategy for them.Finally, the whole MG system combines the droop control and the main/slave control to stabilize the DC bus line voltage and frequency.Both simulation and experimental results confirm that the proposed method can achieve cooperative control of the MG system in both grid-connected and islanded mode.Both simulation and experimental results confirm that the proposed algorithm can automatically track the global power point under different isolation conditions and coordinated control of the MG is achieved.
This paper is organized as follows.Section 2 describes the physical configuration of the MG under study, Section 3 analyzes the MG system control strategy in grid-connected mode, and Section 4 proposes a coordinated control loop for the MG system in islanded mode.Section 5 details the simulation and experimental results.Finally, Section 6 concludes the paper.

Physical Configuration of the Microgrid under Study
The paper considers the following physical configuration of a MG as depicted in Figure 1, which consists of 2 PV units representing renewable power and a BESS, central controller, and the local loads, which are all connected to an AC bus line through static switch.The static switch will connect to the AC grid and realize grid-connected mode and islanded mode through the static switch on and off mode.The PV power systems are subject to the atmosphere condition and thus generate variable power.An inverter consisting of a DC/DC converter, a DC bus, and an H-bridge can realize the interface between the PV panels and the MG.The inverter injects active power and reactive power through the point of common coupling based on different operation conditions.
The battery energy storage system ensures the power balance in the MG, acting as a load or a source according to power unbalance situation.In the ideal condition, the active power balance is given by where  L is the load power requirement,  BESS is the BESS power (charging or discharging), and  PV is the PV power.The active power balance must be ensured at any time and the purpose is to maintain the frequency of the system within the required limits.The main sources of uncertainties are from the PV power systems, which inject variable active power according to the actual requirements, and also from the loads that vary quasirandomly.

MG Control Strategy under Grid-Connected Mode
When the MG works in grid-connected mode, the frequency and the voltage of the MG are maintained within a tight range by the main grid.In this section, we consider the MG control design under grid-connected mode.

Normal Model of a PV Array.
To control the MG with integration of PV power as shown in Figure 1, modeling the PV array is necessary.A PV array is composed of several PV modules connected in series parallel to produce desired voltage and current.Usually, more PV cells are needed to form the series-parallel PV array.The relationship of the output voltage and current of one PV cell can be represented as follows: where  is the output current of PV cell;  is the output voltage of PV cell;  ph is the photocurrent;  s is the reverse saturation current of diode;  is the electronic charge (1.6 × 10 −19 C);  is Boltzmann's constant (1.38 × 10 −23 J/K);  is junction temperature;  is the diode ideality factor;  s is series resister;  sh is shunt resister.Due to the large value of shunt resistance  sh , the last term in ( 2) is often omitted, the short-circuit current and photocurrent are considered to be equal ( sc ≈  ph ), and when the PV cell is on open circuit, the output current is zero, so output current of a PV cell can be approximated as Equation ( 3) is an implicit function relating the voltage and current.To help with the analysis, it can be shown that Then, the output power of a PV cell is Equations ( 4) and ( 5) can be used to produce output characteristic curve of the PV cell.When these series-parallel PV cells constitute a  S ×  P array ( S is the number of PV cells in series, and  P is the number in parallel), the corresponding PV array output voltage, current, open-circuit voltage, short-circuit current, and series resistance can be formulated as Taking an array of  S × P = 3×2 PV as an example, Figure 2 shows the I-V curve and P-V curve, respectively, under the normal condition.

MG Unit Control under PSC.
To control the MG configured in Figure 1, we first aim to achieve the PV MPPT control and improve the efficiency of the PV array power conversion under PSC.Then, we use DC/DC converter to make the output current and the grid voltage following the same phase and frequency to realize the unit power factor control.
An important target in MPPT control is to track the global MPPT under PSC.One of the key issues is to identify the PSC, and, in this paper, we adopt the following PSC judgment criteria which was originally proposed in [24]: where Δ pv is the voltage change of PV array, Δ set is a preset voltage variation limit of PV array, Δ pv is the current change of PV array, and Δ set is a preset current voltage variation limit of PV array.
The overall configuration of the control system for MG under PSC is shown in Figure 3, and it has two separate parts that can be controlled individually.The first part incorporates the global MPPT into the inverter to connect DC power from the PV array to the MG.The back part is the inverter for controlling the integration of MG to the AC line.In this configuration, the key element is the MPPT control of the PV system with a PSC judging mechanism.
In Figure 3, the first converter is the boost converter and adopts voltage loop control, which is used to achieve the MPPT control through adjusting the output voltage of the PV array.The second converter is with a two-phase bridge, and  1 - 4 are the control signals of the four switches, and it is connected with the first converter by a large capacitor C 2 , and the output current of the first converter is the control target in the back converter.
DC bus line control is also necessary.Although MPPT control can make the PV array track the MPPT, the different levels of isolation will affect the power output, and the power change will cause the DC bus line to drift.If the PV output energy increases sharply, the power delivery of DC bus line will be increased if there is no converter or load to consume the extra energy.On the contrary, if the PV output energy is decreased and cannot satisfy AC line voltage peak value, the converter cannot work; therefore it is necessary to keep the DC bus line balanced.
The second part has two loops, that is, the outer voltage loop and inner current loop.The function of the voltage loop is to keep the DC bus line balanced; it is controlled by a PI controller by comparing the actual value  dc and the given value  * dc as the error for driving the PI controller.The output of the outer loop PI controller produces the AC given current value, which is multiplied by the sine output signal of the phase-locked loop (PLL) of the AC voltage  ac to produce the given current  * ac .The aim of the inner current loop is to realize the AC current control.The given current  * ac is compared with the actual  ac , producing the error, and is controlled by the inner loop PI controller.The output of the inner loop PI controller is compared with the triangle wave for generating the PWM signal to control  1 to  4 and thus produce the AC current output, which has the same frequency and phase with the grid side.

Control Strategy for Islanded Mode
When the MG is in the islanded mode, the two PV units and one BESS are all in parallel connection with the AC bus line (Figure 1).As the MG system is separated from the grid, and the frequency and voltage will not be provided by the grid, the MG system needs a suitable control strategy to balance the frequency and the volume of the AC line.
The control method proposed in the paper is shown in Figure 4.The MG system adopts two-layered control strategy, where the upper layer is the main controller to realize the energy prediction and balance, while the lower layer controller is connected to the main controller and achieves the output power control, bus line control, and the control of the PV array and the BESS system state.As shown in Figure 4, the PV array adopts droop control in the main controller to achieve stable voltage and frequency regulation.The BESS inverter is the slave inverter and adopts PLL control and active and reactive power (/) control to ensure that the frequency and phase are synchronized with the MG system.If the solar irradiation is less than the normal value, the PV array will stop generating power and the BESS system adopts voltage/frequency (/) control to provide the energy for the load and run the MG system continuously.

4.1.
The PV Unit Islanded Control Strategy.Figure 5 is the control system structure of PV unit.The first boost converter can raise the PV voltage to the needed level and the second converter adopts voltage and current loop to improve the response and the property of MG system.When the MG is in the islanded mode, the PV unit will act as the main converter to provide the voltage and the frequency for the other converters.

Small Signal Model of Boost Converter.
In the circuit topology shown in Figure 5, variety of the boost switch duty cycle  affects equivalent impedance of the PV system directly and the PV modules can work at their MPP by adjusting the duty cycle .So the output of PV modules should respond to the change of  as quickly as possible [15].By analyzing small signal model of the system, the transfer function of the output voltage and the inductor current versus the boost switch duty cycle  can be shown as where  dc and  L are the output voltage and inductor current at static point.From (8), we can get the following transfer function: In order to raise the dynamic characteristic of PV unit, we add a PI controller (shown in (10)) in the original PV unit: Figure 6 showed the frequency characteristic of boost converter before and after PI correction.Comparing them, it can be seen that the phase margin and the gain margin are all raised, and the stability of the MG system is improved.

International Journal of Photoenergy
We add a PI controller as shown in Figure 7 is the frequency characteristic of voltage loop after correction.And we can see that, after the correction, the phase margin is 81.6 dB and the angle margin is 48.9 ∘ .The MG system dynamic response is improved.

BESS Unit Control
Strategy.BESS unit is the most important part in the MG system, for it will influence the property and the cost of MG.It is necessary to use and control the BESS unit.Normally, the BESS unit can have two states, that is, the charging state and the discharging state.The control aim of the BESS unit is to let the BESS system realize energy balance and stable output in the MG system based on charging and discharging strategy.In this paper, we adopt constant-voltage limit current charging method.Frequency (rad/s) Figure 7: The frequency characteristic of boost converter before and after correction.
Figure 8 is the control block of energy storage unit on different modes.The first and the second converter are controlled individually in order to decrease the design difficulty.Figure 8(a) is the figure of BESS unit which acts as a master.The first converter control DC bus line and BESS unit discharged, while the second converter adopts voltage and current loop control and exchange with AC line.Figure 8(b) is the figure of BESS unit that acts as a slave.Under this state, the first converter has the same controller as in Figure 8(a).Bidirectional converter worked as boost converter, BESS unit discharges, and the second converter provides the energy for the loads.Figure 8(c) is the BESS unit that works on charge mode, at which the first converter worked as buck mode, BESS unit is charged, and the second converter is to keep the DC bus line voltage and the AC input current stable.9 is the whole MG control block under the islanded mode.Every PV unit adopts VSI for connection to the MG, and there is no need for the PV units to adopt MPPT control and they only need to adjust voltage loop to keep DC bus balanced.The inverter adopts droop control strategy with an additional power calculation loop.

Simulation and Experimental Results
The above described configuration and control methods were first simulated over four different scenarios considering the variations in the produced PV power and the demand in the grid-connected mode.Figure 10 shows the simulation results adopting the control strategy in Figure 4, where  grid ,  grid ,  load ,  pv1 ,  pv2 ,  pv1 , and  pv2 are the grid voltage, grid current, load current, the output current of PV1 and PV2, and the output power of PV1 and PV2, respectively.During 0.1 s∼0.2 s, the PV array produced 6000 W power and the total power was greater than the load demand, so excessive The energy storage unit acts as a master  power was fed back to the grid and the current had the same phase as the grid voltage.During 0.2 s∼0.4 s, as light intensity was decreased, the total PV energy was reduced to 2200 W, which could not meet the demands, so the extra power was injected from the grid, and the grid side current and the grid voltage had different phase.Between 0.4 s and 0.6 s, although the PV array produced 2200 W power, the load demand was decreased, and the extra PV power was fed back to the grid again.It is evident from these figures that the quality of the output current of converter was satisfied and the response of MPPT control strategy was swift.The proposed control schemes were then applied to physical setup for the grid-connected mode, and Figure 11 shows the experimental results when the PV was connected to the grid.It can be seen that the output current and the output voltage of converter have the same phase and the unit power factor has been achieved.
Simulation results of the energy storage unit working on different modes are shown in Figure 12.
From the simulation results, it can be seen that, whether the BESS unit is in the master or the slave, the voltage of BESS unit is always kept stable and the output current changed with the AC line and kept the DC bus line voltage stable also.From Figures 12(a) and 12(b), it can be seen that the DC bus line is stable in 400 V quickly.From Figure 12(c), it can be seen that when the BESS unit is in the charging state, the energy will flow into BESS from AC line and the phase angle between the charging state and the discharging state is 180 ∘ .
Figure 13 is the simulation and experiment of BESS charging state. bat and  bat are the voltage and current of battery, respectively.From the results, it can be seen that battery can realize from constant-current charging to constant-voltage charging and there is no current peak.The proposed control scheme was then simulated under 5 different scenarios for the islanded mode.Figure 14 is the simulation results adopting the control strategy under the islanded mode. load ,  load ,  pv1 ,  pv1 ,  pv2 ,  pv2 ,   ,  pv1 ,  pv1 ,  pv2 ,  pv2 , and  are the load voltage and current, the voltage, current, active power and reactive power of PV1 and PV2, and the frequency, respectively.Between 0 s and 0.1 s, the MG had no load; therefore, the current and the active power and reactive power of PV units were all zero.At 0.1 s, the load of MG became larger and nearly half of the rated load, the voltage and the current had the same phase, and the active power was increased to 1500 W, while the reactive   power was still 0 W and the frequency was lower than the prior frequency.Between 0.2 s and 0.3 s, the load increased continuously; between 0.3 s and 0.4 s, the load was decreased to half load again, and, during 0.4 s∼0.5 s, the MG had no load again.From the simulation results, it can be seen that the MG system responded exceptionally well and the loop current is small and even the load changes continuously.In the meantime, the results show that the droop control used for the control of the inverter could achieve stability of the whole MG system under different operation scenarios.

Conclusion
This paper studied a MG system integrated with PV panels, variable loads, a BESS, and AC line under the grid-connected mode and islanded mode.For the grid-connected mode, the paper adopts the MPPT combined PSC judgment to get the maximum power, while for the islanded mode the paper proposed to combine the droop control and the main/slave control to achieve the demanded voltage and the frequency and analysis of the function of BESS unit.Finally, simulation and experimental results have shown that the proposed method can automatically track the global power point under grid-connected mode and realize collaborative control of the MG system in islanded mode.

Figure 1 :
Figure 1: The structure of MG under study.

Figure 2 :Figure 3 :
Figure 2: I-V and P-V characteristic curve under normal condition.

Figure 4 :Figure 5 :
Figure 4: MG system control strategy under the islanded mode.

Figure 6 :
Figure 6: The frequency characteristic of voltage loop in inverter after correction.
The energy storage unit acts as a slave BESS

Figure 8 : 8 InternationalFigure 9 :Figure 10 :
Figure 8: The control block of energy storage unit on different modes.

1 Figure 11 :
Figure 11: The experimental results in grid-connected mode.

Figure 12 :
Figure 12: Simulation results of the energy storage unit working on different modes.

Figure 13 :
Figure 13: Results of constant-voltage current-limiting charge method.