An Inductor Current Sensorless Control Strategy Based on Modified VSG Method for Single-Phase Microgrid Application With Seamless Transfer Capability

This paper proposes an inductor current sensorless control strategy based on modified virtual synchronous generator (VSG) method for single-phase inverter-interfaced microgrid application. Firstly, the outer power loop with Q-U integral term is presented for output reactive power enhancement, and an inner voltage regulation loop based on luenberger state observer is proposed to reduce the inductor current sensor. Meanwhile, in order to improve the response speed of the observer, the luenberger observer is designed based on the optimal pole assignment method. Secondly, a seamless switching strategy based on the modified VSG method is proposed, which can realize the seamless transition between the island mode and grid-connected mode. Finally, a single-phase 3kW VSG prototype is built, and the effectiveness and correctness of the proposed control strategy is verified by the simulation and experimental results.


INTRODUCTION
With the increasing popularity of distributed power sources (such as photovoltaic panels, fuel cells, wind turbines etc.) (Valinejad et al., 2020;Canziani et al., 2021), microgrid based on these distributed generations (DGs) has become an effective power supply supplement for the main power grid (Wang et al., 2015;Qazi et al., 2021). Meantime, the inverter-based interfaces which is connected between the DG unit and the power grid are used more and more widely for grid-connected application (Zhu and Fei, 2018;Tran and Kim, 2020), but the traditional inverters exhibit relatively rapid voltage/ frequency changes when faced with power changes, which is not conducive to the safe operation of power electronic devices, and it also could lead to the instability of the power grid system (Van, 2010).
In view of the lack of stability of the inverter-based microgrid, the VSG technology which mimics the characteristics of traditional synchronous generator (SG) is proposed (Blaabjerg et al., 2006;Beck and Hesse, 2007;Zhong and Weiss, 2011), it can provide virtual inertia and damping for the inverter to enhance the stability of the microgrid system. At present, the VSG-based inverters are widely implemented for three-phase grid-connected applications and various improved VSG strategies are proposed to obtain better static and dynamic performance of the inverter system. Reference (Li et al., 2017) proposes a self-adaptive inertia and damping combination control method to improve the frequency stability. Reference (Zhong and Weiss, 2011) illustrates a magnitude-reshaping strategy to increase the output impedance and suppress the harmonics when VSG-based system operates under distorted voltage condition, and high quality of grid-connected current can be obtained. In view of the presence of nonlinear loads and distorted grid, a hybrid harmonics suppression method which mainly consists of a local voltage harmonic control loop and an adaptive gridconnected current loop is presented in (Lou et al., 2021), high power quality of local load voltage and grid current are achieved. In (Teng et al., 2021), a composite control method which integrates the integral sliding mode and backstepping control method is proposed to realize the free switch between the island mode and grid-connected mode with high dynamic performance.
With the increasing installation capacity of household DG units, the power interface devices of single phase inverters have gradually received more and more attention (Monfared et al., 2014;. A flexible inertia optimization method based on hold filter is proposed for single-phase VSG-based inverter , and the inertia can be freely adjusted to meet the actual system requirements without affecting the frequency stability. A robust power regulation controller is presented for single-phase grid-connected VSG-based inverter, the smooth power response characteristics and robustness to parameter variation can be achieved . A singlephase VSG-based inverter is proposed for vehicle-to-grid (V2G) application (Suul et al., 2016), it can provide primary frequency control, inertia emulation and local voltage or reactive power regulation. Referents (Zhang et al., 2017;Wang et al., 2018) illustrates an adaptive adjustment system damping ratio scheme to suppress the power and frequency oscillations, the dynamic performances of the VSG are enhanced. Reference (Zhao et al., 2017) presents a method based on virtual power calculation to realize the seamless transfer between islanded/grid-connected mode and enhance the stability of single-phase microgrid.
However, most of these control strategies mentioned above require the knowledge of the output voltage, load current and inductor current to achieve power/voltage asymptotic tracking. In order to improve the stability and reduce the sensor counts, some voltage or current sensorless control strategies based on state observer methods are proposed. A robust nonlinear controller based on variable structure observer is proposed for output voltage tracking (Latham et al., 2017), which can improve the steady-state and transient performance of the inverter under nonlinear loads conditions. A full-state feedback current controller with a reduced-order disturbance observer is proposed for single-phase grid-tied inverter systeme (Cheng et al., 2021), it can reduce the influence of uncertain interference factors and improve the robustness of the system. Reference (Hinsui and Sangtungtong, 2019) designed a voltage observer instead of a voltage sensor for the single-phase gridconnected inverter system, and it can achieve the same performance in comparison with the actual solar-array voltage.
In this paper, a modified VSG strategy with the inductor current observer is proposed for single-phase inverter application, and it can be summarized as follows: 1) The improved algorithm for single-phase VSG has the ability to simulate the frequency and voltage characteristics of SG, and it can achieve the zero-steady-error tracking of the reference output reactive power when the VSG operates in grid-connected mode. The small signal model of the modified VSG algorithm for grid-connected application is also established, and the selections for the key parameters of inertia and damping coefficient are analyzed in detail. 2) A luenberger state observer based on the optimal pole assignment method for estimating the inductor current is proposed to reduce the sensor count and improve the dynamic performance of the single-phase inverter. 3) A seamless switching ability between grid-connected mode and island mode based on the proposed modified VSG method can be guaranteed.
This paper is organized as follows. Section 2 gives the introduction of the basic structure of the modified VSG control strategy, and the influence of the damping coefficient and inertia for the stability of the modified VSG system is analyzed in detail. A luenberger observer-based inductor 15N · m · s/rad Switching frequency f s 10 kHz Frontiers in Energy Research | www.frontiersin.org October 2021 | Volume 9 | Article 752422 2 current sensorless control method for inner voltage regulation is presented in Section 3, and the optimal pole assignment is also introduced for the luenberger observer. Section 4 introduces the seamless switching strategy between the island and gridconnected mode. Simulation and experimental results are provided in Section 5 to verify the validity and feasibility of the proposed modified VSG method. Finally, the conclusion is summarized in Section 6.

BASIC STRUCTURE OF THE MODIFIED VSG CONTROL STRATEGY
The topology and basic block diagram of the single-phase VSG is shown in Figure 1. The main topology consists of a traditional H-bridge circuit with four power switches V T1 ∼ V T4 . U dc is the DC side power supply voltage, U A is the arm-bridge voltage. Inductor L S and capacitor C are composed of an LC filter circuit. R s is the equivalent series resistance (ESR) of the filter inductor, and Z load is the load. Z g represents the line impedance and U g is the grid voltage. The basic block diagram consists of an outer VSG power loop cascaded with an inner voltage regulation loop. The following are the detailed introduction for the basic block diagram.

Outer Loop of the Modified VSG
The output active power P e and reactive power Q e of single VSG can be calculated in the virtual two-phase system by sampling the output voltage u C and load current i d (Suul et al., 2016). The virtual voltage and current will be 90°phase shifted in stationary conditions, and the vector amplitudes of the voltage and current are equal to the amplitude of the measured signals of the voltage and current. Then, the amplitude E 0 and frequency ω of the output voltage reference can be obtained based on the VSG algorithm. The VSG algorithm includes active-frequency (P − f) and reactive- voltage (Q − U) control method by mimicing the traditional SG (Zhong and Weiss, 2011). In convenience of practical engineering applications, the second-order model of traditional SG is expressed as where T m and T e are the mechanical and electrical torques respectively, P m and P e are the mechanical and electrical power. J is the moment of inertia, D p is the damping coefficient, ω is the rotor angular velocity, and ω ref is the grid synchronous angular velocity. When the single-phase VSG operates in grid-connected mode, the value of ω ref is the power grid frequency ω g which can be obtained through a phase-locked loop (PLL). When the VSG works in island mode, its value is equal to the microgrid reference frequency. In order to mimic the primary frequency function of the SG, the primary frequency controller is substituted into the power frequency Eq. 1. The primary frequency controller can be expressed as where k p is the P − f droop coefficient, P ref is the active power reference value. By combing Eqs 1-3 can be deduced as From the above Eq. 3, it can be seen that the P − f controller of the VSG includes the characteristics of the droop control, moment of inertia and damp, which can enhance the stability of the power grid.
The Q − U controller of the VSG mimics the excitation regulation function of the SG to realize the drop characteristics of reactive power and voltage amplitude (Zhong and Weiss, 2011), and the equation can be expressed as: where E 0 and E ref are the actual output and rated voltage amplitude of the VSG respectively, k q is the Q − U droop coefficient, Q ref and Q e are the reference and actual output reactive power respectively.
FIGURE 4 | The equivalent circuit when VSG operates in gridconnected mode.
Frontiers in Energy Research | www.frontiersin.org October 2021 | Volume 9 | Article 752422 However, according to Eq. 4, output reactive power Q e cannot achieve the zero-steady-error tracking of the reference reactive power Q ref based on the proportional gain k q when the VSG operates in grid-connected mode. Therefore, a modified Q-U controller with integral term is obtained as where k i is the integral coefficient of the Q-U controller. It should be noted that when the single VSG operates in grid-connected mode, Eq. 5 is used for achieving the zero-steady-error tracking of the reactive power, and the voltage amplitude E ref is equal to the grid voltage amplitude U gm . When the VSG operates in island mode, Eq. 4 is used for Q-U controller, the reference reactive power Q ref is equal to zero and the voltage amplitude E ref is equal to rated value.

Inner Loop of Voltage Regulation
Based on the analysis of the above mentioned section, the amplitude and frequency of the reference voltage E ref can be derived from the outer VSG power loop. In this section, the inner voltage regulation loop based on capacitor voltage and inductor current feedback achieves the tracking of the reference voltage, and the control block diagram is shown in Figure 2.
The capacitor voltage transfer function u c (s) of the closed-loop system can be derived as For simplicity, the resistance R s is ignored because the value is small, and the voltage gain G(s) and output impedance Z o (s) can be respectively expressed as where k up and k ui are the proportional coefficient and integral coefficient of the capacitor voltage feedback loop controller respectively, k L is the proportional coefficient of the VSG inductor current feedback loop controller. According to Eq. 6, the output impedance of the system can be adjusted by changing the proportional and integral (PI) coefficient. Therefore, different output impedance can be obtained by selecting the appropriate PI parameters.  The detailed parameters of the whole system are given in Table 1 and Figure 3 shows bode diagram of output impedance Z o (s) with different PI parameters. As the value of the proportionality coefficient k up increase, it can be seen that the inductive proportion of the output impedance of the system gradually increases at the low frequency as shown in Figure 3A. However, large value of parameter k up will cause the instability of the system. Therefore, the parameter k up should be chosen based on the tradeoff the dynamic performance and the stability of the system. Figure 3B shows that the inductive proportion of the output impedance of the system gradually increases at the low frequency with the decreasing value of parameter k ui , so a small value of parameter k ui is preferred.

Small Signal Model and Parameter Analysis
Although the inertia and damping are provided for the singlephase inverter by mimicking the traditional SG, the effects of virtual moment of inertia J, damping coefficient D p , P − f and Q − U  October 2021 | Volume 9 | Article 752422 6 droop coefficients k p and k q on the stability of the VSG should be further analyzed. Next, a small signal model of the modified VSG strategy in grid-connected mode is established, and the influence of key parameters on the stability of the system is introduced. Figure 4 shows the equivalent circuit when VSG operates in grid-connected mode. Where E and U represents the amplitude of the VSG output terminal voltage and the grid voltage respectively. Assuming that the phase angel of the power grid voltage is zero, δ is the phase angle of the VSG output voltage, the total impedance of the line between the VSG and the grid can be equivalent to Z∠α R + jX, where α is the impedance angle. Therefore, the apparent power output of the VSG can be obtained, Assuming that the line impedance is mainly inductive and active power P e and reactive power Q e can be derived as (Liu et al., 2020b) where K PE and K Pδ are the partial derivative of active power P e to voltage amplitude E and power angle δ respectively. K QE and K Qδ are the partial derivative of reactive power Q e to voltage amplitude E and power angle δ respectively, and they can be expression as As the output power of a single-phase VSG contains secondary power oscillations, a first-order low-pass filter is used to filter the secondary power oscillations contained in the output power. Small signal model of the output voltage amplitude and frequency of the VSG can also be obtained based on Eqs 1, 2, 5, where, ω c is the cut-off frequency of the low-pass filter. Since Δω sΔδ According to Eqs 8, 9, 12, it implies that s 4 Δδ(s) + as 3 Δδ(s) + bs 2 Δδ(s) + csΔδ(s) + dΔδ(s) 0 (15) where Eq. 15 describes the characteristics of the system with the small disturbances around the equilibrium point. Figure 5 shows the root locus diagram with different inertial J, damp coefficient D p , droop parameters k p and k q .
It can be seen that with the increase of inertia J, droop parameters k p and k q , oscillation will appear and the system will become unstable. On the contrary, the VSG system will become more stable with the damp coefficient D p increases.

INDUCTOR CURRENT SENSORLESS CONTROL STRATEGY BASED ON LUENBERGER OBSERVER FOR INNER VOLTAGE REGULATION
In this section, an inductor current sensorless control method based on luenberger observer is proposed, and optimal pole assignment of the observer is also analyzed.

Luenberger State Observer
In order to reduce the sensor counts, a state observer is introduced here to evaluate the actual inductor current i L value. By the kirchhoff′s law of voltage and current, the single VSG system is modeled by And the state-space mode can be derived by Eq. 17 and state variable x, input variable u, disturbance signal ω, and output variable y can be expressed as x u c i L T , u U A , ω i d , y u C , As the load current i d and capacitor voltage u C must be obtained to calculate the output active power P e and reactive power Q e , an observed inductor current i L is used to replace the real inductor current to reduce the sensor counts for the inner voltage regulation. Eq. 18 can be rewritten as and matrix A′ A, C′ C, B′ and the input variable u can be expressed as It is easy to prove that Eq. 19 satisfies the observability condition, that is Therefore, the observed inductor current i L can be obtain based on Eq. 20.
where L is gain matrix. The block diagram of the observer is shown in Figure 6. By subtracting Eq. 20 from Eq. 19, the state error matrix is introduced: where e x represents the state error matrix. When the eigenvalue of the matrix (A′ − LC′) is in the left side of the complex plate, the error of the observer will approach zero. Therefore, it is necessary to adjust the parameters of the state feedback matrix L.

Pole Assignment
In this section, the optimal pole assignment of the state observer is designed based on the optimal pole assignment principle (Lin, 2007). The distribution of the position of the characteristic root of the system in the complex plane determines the dynamic Frontiers in Energy Research | www.frontiersin.org October 2021 | Volume 9 | Article 752422 8 response speed and the degree of oscillation of the system, the farther the pole position of the transfer function is from the imaginary axis, the faster the dynamic response speed of the system. Based on Eq. 19, the state variables of the capacitor voltage u C and the inductor current i L have the greatest impact on the system, the poles related to these two state variables are selected as the dominant poles. The original dominant pole and the expectation dominant pole after the optimal pole placement are shown in Figure 7. It is found that the original system is relatively close to the imaginary axis, the convergence speed of the system is slow, and it may cause instability of the system. However, the expectation pole is farther from the imaginary axis, which improves the dynamic response speed of the system. As the inductor current must be used for feedback control, the dynamic speed for the state observer should be faster than the controller, that is, its pole is generally 4 to 10 times that of the controller.

SEAMLESS SWITCHING
Seamless switching is an important feature for safe operation of the VSG. Due to the deviation between the VSG output voltage and the grid voltage, seamless transfer requires presynchronization. As the output voltage and the power grid voltage can be measured, an orthogonal voltage signal must be obtained. In this paper, a phase-locked loop (SOGI-PLL) based on the second-order generalized integral is used to extract the grid voltage information (Matas et al., 2010;Liu et al., 2020a). The whole block diagram of the single-phase VSG is shown in Figure 8.

Island Mode
When VSG operates in island mode, the switch S 2 is disconnected and the VSG works in P − f. The switch S 5 is connected to the rated angular frequency ω ref . The switches S 1 , S 4 are disconnected and VSG works in Q − U, the switch S 3 is connected to the rated voltage amplitude E ref . At this time, the output power of the VSG is the load power.

Grid-Connected Mode
When the VSG operates in grid-connected mode, the switch S 2 is disconnected and the switch S 5 is connected to the grid and the reference frequency is angular frequency ω g . The switch S 4 is disconnected, the switch S 1 is connected to make the integration term works, the switch S 3 is connected to the grid voltage amplitude U gm .

Seamless Switching
When the VSG receives a signal that it needs to switch from grid-connected mode to island mode, since the VSG was previously in grid-connected operation and there is an inertia link in the VSG, the output voltage of the VSG theoretically will not have a transient sudden change at the moment of switching. At this time, the voltage, angular frequency, power reference value in the VSG control will automatically change to the given amount when the island is isolated, so the switch from grid-connected to island operation of the VSG can be completed without adding a complicated control strategy.
When the VSG switches from grid-connected mode to island mode, it starts the pre-synchronization process. At this time, the switches S 2 and S 4 are closed, the VSG gradually adjusts the phase, frequency and amplitude information of the output voltage in the island operation mode. When the grid-connected standard is reached, the pre-synchronization process finished and the grid-connected switch is closed. The reference power P ref and Q ref in the VSG control loop will be replaced by the grid's active power P g and reactive power Q g . Due to the inertia of the VSG, the power output by the VSG will not undergo a step change, the VSG will complete the transfer from island to grid-connected with seamless switching feature.

Simulation Results of Seamless Switching With State Observer
In order to verify the effectiveness of the above-mentioned luenberger observed-based VSG strategy, a 3kVA simulation model based on the single-phase inverter was built. The key parameters are given in Table 1. The whole control diagram of the proposed modifier single-phase VSG control strategy is shown in Figure 8.
The single VSG operates in island mode initially, and the gridconnected signal is triggered at 0.35s, the island mode signal is triggered at 1.4s. In grid-connected mode, the VSG reference active power and reactive power is 3kW and 500var respectively. Figure 9 shows the output active power P e and reactive power Q e of single-phase VSG when operates in gridconnected mode and island mode. The simulation results demonstrate that when the single-phase VSG switches between the two operating modes, there is no obvious power mutation and the output power of the VSG can reach the reference power in grid-connected mode.
The seamless transfer capability of the single-phase VSG based on the proposed method is also verified by simulation results as shown in Figure 10. Figure 11A shows the waveform of capacitor voltage u C , power grid voltage U g , and the load current i d when the VSG operates in island mode. As the initial phase difference between the power grid voltage and capacitor voltage u C is 30°, the voltage deviation Δu between the grid voltage and the inverter output voltage exists. Figure 10B shows the pre-synchronization process when single-phase VSG switches from island mode to gridconnected mode. At time 0.3s, the trigger signal enables, and the pre-synchronization process starts, the phase angle difference Δθ between the VSG output voltage phase and the grid voltage phase gradually decreases. When the phase difference Δθ is less than the threshold value of 3°at time 0.45s, the presynchronization process ends, and the VSG switches to the grid-connected mode. Figure 10C,D shows the voltage and current waveforms of seamless transfer between the island mode and grid-connected mode at time 0.45 and 1.4 s respectively. Simulation results demonstrate that smooth switching between island mode and grid-connected mode can be achieved, and the inrush current is small. Figure 10E shows the partial enlarged view of VSG voltage October 2021 | Volume 9 | Article 752422 u C and load current i d , it demonstrates that the voltage sags is small when VSG switches from grid-connected mode to island mode. Figure 11 shows the simulation waveform of the observed inductor current i L and the actual inductor current i L , and Δi L is the deviation between them. The gain matrix L [−500,−500,−500,−500,−500,−500,−500,−500,−500,−500] T . It can be seen that the estimation error of the observer is small and the dynamic response speed is fast when the VSG operates in grid-connected mode and island mode.

Experimental Results of Seamless Switching With State Observer
A 3kW single-phase full-bridge inverter prototype is built to verify the feasibility of the proposed control method. The main parameters of the system use are shown in Table 1. The performance of the proposed control strategy is validated by dSPACE SCALEXIO system for real-time implementation, as shown in Figure 12. The prototype is mainly composed of singlephase full-bridge inverter main circuit, A/D sampling circuit, DSPACE transfer board, auxiliary switching power supply and host computer. The output voltage and current waveforms are displayed through the oscilloscope YOKOGAWA-DLM2024. The DC side voltage source adopts programmable DC power supply model Chroma62150H-1000s, and the AC power supply adopts the programmable AC power supply model Chroma61845. Figure 13 shows the experimental results of seamless transfer process between the island and grid-connected based on the proposed control strategy. The output voltage u C and load current i d experimental waveform is demonstrated in Figure 13A when the VSG is switched between grid-connected and island modes. The output voltage almost unchanged and the grid-connected current fluctuates very little when the operating mode of the single-phase VSG changes. High performance of dynamic waveform can be achieved. Figure 13B,C show the partial enlarged experimental waveform of the dynamic process between the island mode and the grid-connected mode, and the voltage waveform changes little throughout the process. Figure 13D shows the output active power P e and reactive power Q e of the VSG reached 3kW and 500var respectively when connected to the power grid, which is consistent with the reference active and reactive power. Figure 14 shows the experimental waveforms of the actual inductor current i L and the observed current i L when the singlephase VSG works in island and grid-connected modes. The blue waveform is the actual value of the inductor current, the brown waveform is the observed value of the inductor current, and the green waveform is the observation error Δi. The experimental results demonstrate that the observed inductor current can track the actual value well based on the proposed luenberger state observer.

CONCLUSION
A modifier VSG control strategy for single-phase inverterinterfaced microgrid application is proposed in this paper, and it can realize the seamless transition between the island mode and grid-connected mode. The effectiveness and feasibility of the proposed control method is verified by the simulation and experimental results. The main contribution of the proposed modifier VSG control strategy can be summarized as follows: 1) It can achieve zero-steady-tracking error of the output reactive power by adding Q-U integral term in grid-connected mode.
2) The proposed control method can reduce the sensor of inductor current based on the luenberger observer.
3) The high performance of the single-phase inverter based on the proposed modifier VSG method can be obtained in island mode, grid-connected mode and the transient process.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding authors.

AUTHOR CONTRIBUTIONS
ZZ is in charge of the method calculation, paper writing and experiment. JW and DX is in charge of literature review, experimental setup, and proofread the manuscript. LZ is in charge of the experimental setup. XT is in charge of the experimental guidance. All authors contributed to the article and approved the submitted version.