The Strategy of Inverter Seamless Mode Switching in Master-Slave Independent Micro-grid

In order to realize the uninterruptible power supply in the master-slave independent micro-grid system, the micro-grid inverter needs to realize the mode switching of the grid-connection/grid-disconnection. How to reduce the transient oscillation during switching, so as to effectively achieve seamless mode switching is a key issue to be solved. In this paper, a typical master-slave control independent micro-grid is used as an example, the strategy of mode switching is improved in two aspects. On the one hand, the state-following algorithm is adopted to improve the switching strategy of the outer loop. On the other hand, the current inner loop is taken by the H∞ robust controller to improve the robustness of the controller. Compared with the traditional PI control mode switching, this paper illustrates the feasibility of the proposed strategy through the simulation and experiment verification. The improvement strategy in this paper can effectively reduce the voltage and current oscillation during mode switching.


Introduction
With the problem of environmental pollution is more and more serious, new energy power generation has become a hot spot in various countries. Distributed generation (DG) technology and communication technology is the everchanging development, which makes the application of micro-grid system more and more popular [1][2][3].
Master-slave control independent micro-grid system is an effective way to supply power to remote areas, which is difficult be covered by large power grids. The principle of independent micro-grids is to collect windphotovoltaic energy and parallel in the synchronous generator through the inverter.
Due to the volatility of wind-photovoltaic energy, the independent micro-grid system generally needs to be equipped with a certain capacity battery energy storage system, which is used to stabilize the wind-photovoltaic volatility. Because the independent micro-grid system is independent of the large power grid, its stability is worse than the large power grid, so it is the hot topic of the current scholars [4]. How to ensure the critical loads in the independent micro-grid uninterrupted power supply, that is, to achieve the inverter grid-connection/griddisconnection seamless smooth mode switch, which is a challenge to study the independent micro-grid technology. [5] proposes an indirect current control algorithm for seamless transfer of three-phase utility-interactive voltage source inverters. The propose method is able to provide critical loads with a stable and seamless voltage. [6] presents voltage magnitude and frequency control of a three-phase voltage source inverter to achieve a seamless transfer between grid-tied mode and intentional islanding mode. A virtual inductor with high-pass filter in synchronous d-q frame is proposed to improve the transient response. A novel seamless transfer of singlephase grid-interactive inverters between grid-connection and grid-disconnection modes is presented in [7].The voltage controller is used for compensating the filter capacitor current in grid-tied mode, and the voltage controller is used to regulate the output voltage in griddisconnection mode. In [ 8], the scheme of the seamless transfer control strategy is investigated, and the proposed seamless transfer control strategy is not only capable of guaranteeing the uninterruptible load voltage, but also protecting fuel cell against the power demands beyond its allowed bandwidth. [9] proposes a phase-locked loop (PLL)-based seamless transfer control method between grid-connection and islanding modes in a three-phase grid-connection inverter.
In order to improve the stability during mode switching, this paper improves the strategy of mode switching in two aspects. On the one side, this paper improves the switching mode of the outer loop and proposes a kind of state-following switching strategy. On the other side, this paper adopts a H∞ robust controller instead of the current inner loop controller to ensure the robustness during switching and reduce the transient oscillation of voltage and current.
The structure of this paper is as follows: A typical topology of DC/AC hybrid isolated micro-grid system is used as an object in Section II Section III analyzes the MATEC Web of Conferences characteristics of traditional mode switching and explains the existing problems. In Section IV, the design of H∞ robust controller is studied and an improved method of replacing the current inner loop with robust controller is given. In Section V, the feasibility and superiority of the proposed strategy are verified by simulation. The construction of the experiment platform and experiment verification is given in section VI Finally, Section VI gives the conclusions.
2 Master-slave control independent micro-grid system structure In this paper, a typical topology of DC/AC hybrid isolated micro-grid system is used as an object of study, which includes photo-voltaic (PV), battery storage system (BSS), and synchronous generator (SG), as shown in Figure 1. SG is a master power supply, and renewable energy system (RES) inverter is a slave power supply [10][11][12]. The DC bus is constructed by a new energy power generation system. RES inverter and SG are connected in parallel through the isolation transformer to form a AC bus to bear the load in common. The inverter has two operating conditions with grid-connection and griddisconnection power generation. Therefore, the control strategy has two modes: PQ or V/f, as shown in Figure 2. When the grid is connected, the synchronous generator system is the master power supply, which provides stable voltage and frequency support, the inverter is the slave power supply, using the PQ control mode. When the synchronous generator system is faulty or requires service, the inverter control mode is switched from PQ to V/f, and the critical loads are supplied by the inverter, thus ensuring uninterrupted power supply for critical loads.

Grid-connection and grid-disconnection operation mode
The grid-connection mode of the inverter generally takes the typical PQ double-loop control structure as shown in Figure 3(a). The off-grid operation mode of the inverter is V/f double-loop controller as shown in Figure 3   The dual-loop controller not only improves the quality of the three-phase output power, but also provides a buffering effect on both controller outputs during mode switching, reducing transient oscillations caused by controller switching.

The problem of traditional mode switching
As the inverter PQ and V/f controller is completely different, so to achieve the inverter grid-connection/griddisconnection smooth switching, it is necessary to have some logic switches to realize the switching of different controllers. Switch controller structure is shown in Figure  4, where the grid controller is the PQ control mode, the independent controller is the V/f. The input of the controller is the difference between the feedback and the given reference value, and K1 and K2 are logic switches [13,14]. The reasons for the oscillation in the traditional mode switching process are the problem of outer loop controller and the problem of inner loop controller.

The problem of outer loop controller
When the PQ controller is running, the V/f controller is also running and the V/f output does not work. Since the output states of the two are not equal when switching, the output of the controller has a transition jump.
In order to reduce the transient shock of the switch, trying to set the V/f controller to zero before the switch, and the zero output of V/f controller and the output of PQ controller are still in a different state, which is not substantially eliminated the output with no match phenomenon of the two controllers, so the transient oscillation still exists. Figure 5 shows the simulation waveform that the controller does not initialize or initialize to zero when switching.

The problem of inner loop controller
The mode switching mainly completes the switching of the outer loop controller, and the current inner loop controller is the common part, that is, the current inner loop is not switched. If the parameters of the inner loop controller is not appropriate, it may cause the oscillation to be large during the switching process, and even the system is unstable. As shown in Figure 6, k ii =0.24, k pi =110, the micro-grid is switched at t=1. Simulation results show that, the system is stable in grid-connection cases (PQ), but the voltage and frequency of the system are unstable when switching to grid-disconnection cases (V/f). The simulation results in Figure 6 show that the control system parameters have different best match values for different control modes. However, in the micro-grid mode switching, only the outer loop controller switching, the inner loop control parameters are not switched, it is easy to cause the system instability after the mode switch. Therefore, a robust controller is required to replace the current inner loop to reduce the oscillation caused during the switching and to improve the controller's anti-interference capability. The following takes the H ∞ robust controller instead of the current inner loop and gives the controller design process.

The basic theory of H∞ robust control
The basic theory of H ∞ robust control is based on the development of liner quadratic regulation (LQR), which has become a mature optimal control theory, the optimal solution is the minimum value of the H ∞ norm. Because the parameters of H ∞ robust control system are easy to set, closed-loop feedback control can be realized effectively. Robust control has the characteristics of rapid response, strong anti-interference and dynamic performance, and it has been widely used in the field of control engineering. The basic principle of the H ∞ robust controller is shown in Figure 7 [15,16]. In Figure 7, P is a generalized controlled object, K is a controller, w is an external input, u is a control output, y is a measurement output, and z is a controllable output. x = Ax+ B w+ B u z = C x+ D w+ D u y = C x+ D w+ D u (1) where, x is the state variable, then system open-loop transfer function in Figure 7 is: where, The feedback branch function in Figure 7 is set to: Then the closed-loop transfer function of w to z is: T zw =P 11 +P 12 K(I-P 22 ) -1 P 21 (5) In engineering applications, the H ∞ robust control problem is: ① It is needed to find K to make the H ∞ norm of T zw minimum, that is, min||T zw ||≤γ 0 (γ 0 is a very small positive number).
② When the condition ① is satisfied, the controlled object P(s) is stabilized in the closed loop system.

Design of H∞ robust controller for current inner loop
dq coordinate system of the current loop control equation is: Considering the parameter uncertainty, it is assumed that the deviation of the parameter R and L is ΔR and ΔL, respectively. That is: where L 0 and R 0 are the measured values of the inductance and the resistance, ΔR and ΔL are the disturbance values of the inductance and the resistance. Therefore, (6) can be written as: According to the equation of state equation (1), the controlled object P with parameter perturbation can be expressed as: where x is the state variable, y is the measured output, z is the evaluation signal, w is the external input of the corresponding dimension, u is the control output of the corresponding dimension. A, B 1 , B 2 , C, D are constant matrices. ΔA, ΔB is the perturbation matrix.
According to the H ∞ robust controller design requirements, ΔA, ΔB satisfy the equation: is an uncertain matrix that satisfies ∑ T (t)∑(t)≤I. The specific definitions of the matrices are as follows. maximum values of the δ 1 and δ 2 parameter deviations are σ 1 and σ 2 , that is, | δ 1 |≤σ 1 ,| δ 2 |≤σ 2 . From the above can be obtained as follows:   q 1 , q 2 , q 3 , q 4 , ρ 1 , ρ 2 are the parameters that need to be optimized to determine the H ∞ robust controller design process. Generally, the optimal value is found by repeated iteration method.
The optimal H ∞ robust controller design is solved by the existence of a scalar λ> 0 such that the Riccati inequality satisfies: There are positive definite solution P>0, where the H ∞ robust controller of the quadratic stability of the closedloop system is given as follows: When the H ∞ robust control law is used to instead of the current inner loop, the current inner loop H ∞ robust control law is as follows: The current inner loop control block diagram taken in this paper is shown in Figure 8 below: The parameters of the controller in this paper are shown in Table 1.

The improvement of the outer loop controller switching mode
In order to achieve seamless smooth mode switching and reduce the transient oscillation during switching, this paper not only takes the H ∞ robust controller instead of the current inner loop PI controller to improve the robustness of the system. In this paper, the state-following algorithm is adopted to improve the switching mode of the outer loop controller The method designs the output status of the V/f controller and the PQ controller as a negative feedback, which is the input of the PQ controller and the V/f controller respectively, to ensure the output status of both controllers always keep the same.
As shown in Figure 9, when the control mode is PQ,

Simulation verification
In order to verify the feasibility of the proposed method, the simulation model is built in Matlab/Simulink. The parameters of the simulation model are shown in Table 2.

PI control mode switch
Scenario setting: At t=0s, the inverter independently assumes a sensitive load of 5kW, and the synchronous generator independently bears a load of 10kW. At t=7s, the inverter is connected to the network, and the control mode is switched from V/f to PQ. At t=15s, the inverter output power increased to 9kW. At the time of t=19s, the inverter runs grid-disconnection, the inverter and the synchronous generator return to the initial state of t=0s. It can be seen from Figure 10, the current loop takes PI controller. V/f switches to PQ at t = 7s. Due to take the state-following algorithm, the inverter voltage and frequency waveform does not appear obvious transient fluctuation. At t = 19s, during the mode PQ switching to V/f, the inverter output power suddenly becomes smaller, and the voltage and frequency have a significant transient oscillation during the switching. Figure 11 shows the voltage and current waveforms during mode switching.  Figure 11. PI control the voltage and current simulation waveforms.
As shown in Figure 11, after taking the statefollowing, the voltage and current are transition smooth during V/f switching to PQ. But in the PQ switch to V/f moment, the inverter output voltage appears to be overshoot and oscillation phenomenon.

H∞ robust control mode switching
Scenario settings: the same as scenario setting in 5.1.
As shown in Figure 12, it is a simulation experiment waveform when the current inner loop takes H ∞ robust control and the grid/grid-disconnection mode is switched. It can be seen from Figure 12 that smooth and seamless mode switching can be achieved when H ∞ robust control is adopted in the inner loop. Compared with the waveform of Figure 10, the voltage amplitude oscillation of the inverter becomes noticeably smaller and the frequency does not fluctuate during the period when PQ is switched to V/f. Figure 13 shows the voltage and current waveforms during mode switching  Compared with Figure 11 and Figure 13, it can be seen that the voltage and current of PI control and H ∞ robust control are smoothed when V/f is switched to PQ mode at t=7s.

EECR 2018
However, when the current loop is H ∞ robust controller, the PQ mode is switched to V/f mode at t=19s, voltage and frequency does not appear overshoot and oscillation phenomenon as shown in Figure 11. The simulation results show that the H ∞ robust control can realize the seamless switching of the inverter. 6 Experiment verification 6

.1 The construction of the experimental platform
This paper sets up a set of experimental system, the experimental system structure is shown in Figure 14. DC bus side is replaced by a battery, the battery DC output voltage is 710V. Inverter rated power is 15kVA, the inverter with the sensitive load is P Load2 = 3kW. K PCC is a grid breaker.
Using the inductance L Line =3mH to simulate the line length, the simulate line length is 3kM. Taking the "backto-back" converter to simulate the synchronous generator, its rated power is 30kVA,and its input is 380V urban electricity. The fixed load of synchronous generator is P load0 =11kW. The load that can be switched is P Load1 =4kW.

Analog Synchronus Generator
(ASG)30kW  Figure 14. The structure diagram of experimental system.

RES
The main control chip for the converter is the DSP F2812. System of the host computer monitoring is the use of LabWindows/CVI, it is through the serial port to realtime access to device parameters. The experimental system is shown in Figure 15.  At t=0ms, the inverter and the analog synchronous generator are connected to the grid, and the shared load is 14kW. At t=75ms, the inverter is grid-disconnection and bear the sensitive load 3kW independently, the control mode is switched from PQ to V/f. The voltage and frequency curves are shown in Figure 16 when the current inner loop is taken by the PI controller.

The current loop is taken by the PI controller, the inverter is switched from PQ to V/f mode
As can be seen from Figure 16, the amplitude of the voltage fluctuates slightly and the current waveform has a significant oscillation during PQ switching to V/f. When the current inner loop is taken by PI controller there is a significant transient shock. Figure 17, the voltage is almost no transient oscillation and the current fluctuation is also significantly reduced during the mode switching since the current inner loop is taken by H ∞ robust control. Compared with Figure 16, the transient oscillation during switching is smaller in Figure 17 since H ∞ robust control is adopted, and the seamless mode switching can be achieved better.

Conclusion
In this paper, the seamless mode switching of independent micro-grid inverter is studied, and the reason of transient oscillation of the traditional mode switching is analyzed. In order to effectively realize the seamless mode switching of the inverter, this paper has improved in two aspects. The simulation and experiment are given to illustrate the effectiveness of the proposed method. This paper mainly completed the following three aspect works.
1) In this paper, the dual-loop control structure of micro-network inverter is given, the traditional gridconnection/grid-disconnection mode switching is analyzed, and the influence of control parameters on mode switching is explained. Outer loop controller inappropriate switching timing and poor robustness of current inner loop controller are the main cause of transient oscillation.
2) The state-following algorithm is used to improve the switching timing to ensure that the output of the two outer loop controllers are seamlessly connected at the time of switching.
3) The H ∞ robust controller is used to instead of the current inner loop to improve the adaptability and robustness of the current loop control, which can further improve the power quality during switching.