1. Introduction
As a popular topic in power electronics, the inverter control has confronted new challenges for microgrid (MG) applications with the massive developments and utilizations of distributed generations (DGs) [
1,
2].
Microgrid inverters can be classified into two categories: voltage-controlled inverters in stand-alone (SA) mode and current-controlled inverters in grid-connected (GC) mode. The current-controlled inverters are mainly designed to deliver a specified amount of active and reactive power following the grid, while the voltage-controlled inverters are designed for autonomous operation, represented as ideal AC voltage sources, balancing the power supplies and loads [
1,
2]. However, when MGs transform unintentionally from the GC mode to a SA mode, the inverter control should be designed carefully to ensure an uninterrupted power supply for critical loads such as medical facilities, data storage systems, online management systems, etc. Therefore, the new challenge for those who control inverters will show up when the tracking control structure is changed. As when current-controlled inverters shift into voltage-controlled inverters, the controlled electric quantity needs to be changed from the current to voltage. This change may arouse severe dynamic voltage distortion, which must be eliminated effectively by specific seamless switch control.
The seamless switch control from GC mode to SA mode is very critical to guarantee the power supply reliability. For different scale MGs, the seamless switch control may be realized in different methods. In a large-scale MG where lots of micro power source exists, the seamless switch can be accomplished via coordinate control by multiple DGs, for example, the droop control [
3,
4,
5,
6]. Nevertheless, in a small MG (less than 100 kW), this function may be achieved by one inverter that is energized by energy storages. Furthermore, in a small-scale MG, the unbalanced power in switch is not too much so that it can be compensated by a single inverter. Therefore, the control for a single inverter should be designed carefully to achieve the seamless switch in small MGs. In general, a well-designed inverter control frame can simplify the complicated switch scheduling. Conversely, if the control frame is not well designed, some complex switch scheduling is indispensable for the smooth seamless switch.
At present, most of the seamless switch control algorithms for single inverter are achieved by means of switch from current control in the GC mode into voltage control in the SA mode [
7,
8,
9,
10,
11,
12]. The voltage control strategies reported in the literature [
7,
8,
9,
10,
11] are analogous to that adopted by regular uninterruptible power supply (UPS) and are not particularly designed for switch application. It then becomes necessary to add switch scheduling during the switchover process to suppress the dynamic impact from the unmatched power. References [
7,
8] for example, adopted a traditional dual-loop control under the synchronous rotating frame (SRF). The inner loop is current loop. The outer loop shifts from power control to voltage control when the MG switches to SA mode. This shifting is completely stiff, leading to poor dynamic performance and a drastic oscillation waveform. The single-loop control under SRF was employed in [
9,
10] in SA mode. However, single-loop control is hard to obtain satisfactory performance with, because the current state information is ignored. Thanh-Vu Tran et al. proposed a single-loop switch control where the outputs of both the voltage loop and current loop act as feedforwards for each other to keep the control signals continuous during the mode-switch process [
11]. This strategy has reduced the impact current during the period of switch. In [
12], a quadrature second order generalized integrator based inner current loop is proposed to improve the transient dynamic response.
Recently, some switch control algorithms were presented in [
13,
14,
15,
16,
17,
18,
19,
20]. In [
13,
14], the voltage control loop, which acts as an inner loop, is cascaded by different outer control modules. The outer control loops are the power control loop in GC mode and voltage reference calculation in SA mode, respectively. The power control loop is either driven by a direct calculation method [
13] or droop calculation method [
14,
15]. When the inverter switches from GC mode to SA mode, the outer power control is switched to voltage reference calculation. However, the voltage reference calculation needs to be carefully designed to ensure the continuousness of the voltage reference. References [
16,
17] adopted slide-mode control, whose sliding surfaces are defined differently for SA mode and GC mode to realize the voltage control in SA mode and current control in GC mode separately. The oscillation on the both sides of the sliding surfaces is a tough problem for slide-mode control. In [
18], a generalized control algorithm was developed to enable the distributed generations (DGs) to operate in both modes with a single control structure, facilitating the seamless transition between the operating modes. Additionally, the effects of disturbances associated with the mode transitions are fully eliminated by dynamic compensation term. However, the compensation term includes differential operation which is hard to realize in digital control. A universal integrated synchronization and control were proposed in [
19] to operate a single-phase dc/ac converter in both GC and SA modes and offer seamless transition between these modes without any reconfiguration of control structure. However, the definition of virtual powers in [
19] excessively relies on the topology structure of filters and the precise parameters of a filter circuit. A unified control loop with a novel anti-derailing control is proposed in [
20] for smooth and autonomous mode switch. An anti-derailing control and the power open loop control are paralleled as the outer loop of the inner current loop. The good performance of the switch control is achieved. A unified complex-based control with an added frequency control loop is proposed for the seamless switching control in [
21]. However, the current controller is not designed and the frequency control loop will deteriorate the dynamic response.
Generally, in present studies, both the current and voltage control are designed separately, and the current control and voltage control are two control systems. Hence, the switch actions are usually complicated. In this paper, with the fundamental work of [
21], a new control frame based on complex-variable-design is proposed, the current controller is added by sharing one dynamic controller with the voltage controller and the frequency control loop is removed. A state feedback control is designed for the instantaneous voltage and current control, a complex variable FLL is designed to realize the voltage and current reference computation. The voltage and current control share one resonant controller to ensure the smooth switch. The good performance of seamless switch is also achieved by the well-designed control method. Lastly, the proposed control strategy is verified through the built MG experiment platform.
3. Proposed Control
For the battery inverter system in
Figure 2, a control frame supporting the seamless GC-to-SA transition is designed in this paper, as shown in
Figure 3. Complex variables are adopted to facilitate the system analysis and design, as a result, the double-line arrows in
Figure 3 represent the information streams of complex variables. We define the complex variables
i =
iα +
jiβ,
u =
uα +
juβ, and
ug =
ugα +
jugβ to represent the inductance current, the output capacitance voltage of the battery inverter, and the grid voltage at the point of common coupling (PCC), respectively, where symbol ‘
j’ denotes the imaginary unit. It is obvious that
u ≈
ug in the GC mode for the small simple MG where the impedance of the line can be ignored. Moreover, the magnitudes of the complex variables are calculated as
.
The control strategy in
Figure 3 includes the generalized control objective (GCO), instantaneous current tracking control (ICTC), instantaneous voltage tracking control (IVTC) and FLL-based reference calculation (RC). The GCO is actually a state feedback system of the original plant which can improve the dynamic response. The IVTC and ICTC constitute to the voltage and current control for the inverter to track the sinusoidal voltage reference. The IVTC and ICTC use one dynamic controller
Gc to ensure the successive control input for the GCO. This is critical for the smooth switch. The FLL based RC realize the continuous reference at the instance of the switch.
3.1. Generalized Control Objective (GCO)
For conventional switch control, the dual-loop control is generally adopted where the voltage control acts as the outer loop of the inner current loop. In this structure, the inner current loop only has a current state, while the voltage state is not included. After the switch, the voltage state is then added in the voltage loop. This will deteriorate the dynamic performance during the switch process. Hence, in this paper, the state feedback control is designed first as the GCO to improve the nature property of the inverter. As shown in
Figure 3, supposing that the line impedance is very small in a small-scale microgrid, then the original state space model of the inverter can be represented as:
where
x = [
i u]
T = [
iα +
jiβ uα +
juβ]
T,
vc =
vcα +
jvcβ,
wp =
iba =
ibaα +
jibaβ, and
This state space model is simplified by ignoring the dynamic of the grid-side line inductance. In grid-connected mode, this simplification may introduce some uncertainties due to the neglect of the grid-side impedance. This can be addressed by the control parameter design to improve the robustness. Moreover, in the GC mode, the capacitor voltage is clamped by the grid, hence the state of the capacitor voltage is also ignored, and the state feedback of the capacitor voltage can be treated as the voltage feedforward control. Based on the model, the input–output transfer function of the inverter can be calculated by
Generally, the response characteristic of
Gopu is completely dependent on the circuit parameters, and the poor performance is often performed just as shown in
Figure 4 where
Gopu performs a terrible impulse response. Therefore, the full state feedback is employed to correct the nature pole placement so that the response characteristic is able to be improved. The transfer function with state feedback control law
K can be derived via
As described in (8), the control law
K can tune the distribution of poles of the GCO. By tuning control law
K, therefore, the response characteristic could be modified better. The state feedback can be designed by the linear quadratic regulation method [
21]. This can be easily realized by the function lqr() in Matlab. Based on the LQR design and the circuit parameters shown in
Table 1, the state feedback is designed as
K = [8.8−0.7]. Then, as shown in
Figure 4, the impulse response of
GGCOu is much better than the original version of
Gopu. The disturbance-rejection ability is considerably improved. This is why the modified state feedback model is adopted as the GCO. Furthermore, another advantage of adopting the state feedback structure is that it is suitable for designing the control parameters by time-domain based modern optimal control method. Since some well-known optimal control method, such as the LQR, optimal H
2/H
inf norm, pole placement, are based on the state space model.
3.2. Voltage and Current Control
The GCO can improve the dynamic response and disturbance-rejection ability, however, it cannot achieve the zero-steady-state-error control. To realize the zero-steady-state-error tracking control for the voltage and current, a complex variable resonant controller will be adopted many times in this paper. Its state space model can be formulated as:
where
xc and
vic are the state variable and input of the controller, respectively. Translating (9) into complex transfer function form:
It is revealed that, unlike scalar resonant controller, which has infinite gain at both positive and negative
points, the dynamic model described by (9) has only one frequency resonant point at the positive
. This feature allows the controller (9) to not only be used in a grid synchronization system to extract positive sequence components [
22], but also be used to track positive sequence sinusoidal signals without steady-state-error [
21,
23].
Thus, the control block diagram of the voltage control is shown in
Figure 5, and the open loop gains of IVTC can be derived as:
where
Ku =
KuR +
jKuI is the complex gain of the controller.
Figure 6 shows the Bode diagram of the open-loop gain of the voltage control with the parameter varying. From
Figure 6, it can be deduced that with the increasing of the real part of the parameter
KuR, the phase margin (PM) and amplitude margin (AM) both decrease. However, with the increasing of the imaginary part of the parameter
KuI, both the PM and AM will be improved. However, in low-frequency range, the phase is close to 180°, which is harmful for the system, hence
KuI, cannot be tuned too big. According to the Bode analysis
Figure 6, the complex parameter of the voltage controller is designed as
Ku = 280 +
j20.
Similarly, the complex parameter of the ICTC can also be designed by the Bode analysis. The Bode plot is shown in
Figure 7 from which we can find that, the real part of the complex parameter mainly affect the amplitude of the transfer function, while the imaginary part of the complex parameter can change the phase response of the transfer function. Hence, similar with the case of the voltage control, the parameter for the current control is selected as
Ki = 3000 +
j20.
3.3. Frequency-Locked Loop
Frequency-locked Loop (FLL) is critical to the proposed switch control method. As the link between voltage control and current control, when the switch from current control to voltage control occurs is important. The FLL, as shown in
Figure 8, is also designed via the complex controller (10). The superscript “*” denotes the complex conjugate.
The FLL is first analyzed in complex frequency domain. Assuming
, where
ω represents the frequency of input signal, then the input–output complex transfer function of the closed-loop filter shown in
Figure 8 can be derived as
where
μ denotes the gain coefficient.
Figure 9 shows the bode plot of
GFLL with different gains. From
Figure 9,
GFLL is a band pass filter with the center frequency of
. Therefore, it can extract the positive sequence component as
. The less
μ is set, the more attenuation for different frequency signal is achieved, while the bandwidth is narrower (the slower dynamic response will be manifested). To reach a compromise between the attenuation ability and bandwidth, the gain
μ is set to 0.8
ω.
When
, the frequency adaption law is designed to estimate the frequency
where
γ can be set as 90 [
24]. The detailed FLL design can refer [
24].
In the proposed control frame, when the system operates in GC mode, the input signal is the grid voltage
ug. Then, FLL extracts the fundamental positive sequence voltage component to calculate power/current reference under grid-feeding mode. In complex domain, the complex power can be expressed as
s =
p +
jq =
ug. Therefore, the current reference in GC mode can be computed as
where
sr =
pr +
jqr is the power reference. Meanwhile, the FLL also estimates the frequency of the fundamental positive sequence voltage for the current controller. When the system transfers into SA mode, the input signal will shift to capacitor voltages automatically. In this condition, the control is changed to voltage control, and meanwhile set
μ to 0 at the instant of switch. This action cuts off the input of FLL to keep the FLL on zero-input response. When
μ is set to 0, the response of the FLL is dependent on (10) and its initial values. Equation (10) can be rewritten as
whose time-domain solution is
xc =
V0ejθ =
V0(cos
θ +
jsin
θ). The amplitude
V0 and phase
θ are successive to the value before
μ is set to 0. Hence,
xc can be adopted as the voltage reference at the switch instance. However, considering the controllability of the voltage, the voltage reference can be computed as
where
Vr is the amplitude reference of the voltage.
3.4. Effect of Islanding Detection Time
The performance of the switching control is highly affected by the islanding detection time. Since during the islanding detection when the grid has been unintentionally disconnected, the system is still in current-controlled mode where the output current tracks the reference. In this condition, the voltage at PCC depends on the output current reference and the load. If the load and the output of the power source are matched, which means that the power in the MG is balanced and the PCC power flowed into the grid is very small, then the PCC voltage will not change too much after islanding even though the control is still in current-controlled mode. However, if the power in MG is not balanced and the PCC power is not that small, then after islanding (the control has not been switched), the PCC voltage will experience a severe variation due to the unbalanced power. Consequently, the islanding detection time will be very important, because it is necessary to switch to voltage control as soon as possible to stabilize the voltage before the protection is triggered. In this case, the maximum borne time will be the protection time.
Furthermore, supposing that the load is resistive, which means
wp = iba =
vc/Rload, then the model during the islanding detection becomes
which can be used to evaluate the stability of the system during the islanding detection. In other word, as long as the designed current control parameters can ensure the stability of the system (17), the system will be stable during the islanding detection.
4. Experiment Verification
In this paper, an experimental MG system whose structure is shown in
Figure 1 is established to validate the performance of the proposed control method. The experimental layout is displayed in
Figure 10. The parameters of the battery inverter which implements the proposed control are shown in
Table 1.
The experiment of seamless switch from GC to SA mode with different load conditions is conducted to verify the proposed control when unintentional islanding is occurred. For this seamless transition, the islanding detection is unavoidable. The IEEE 1547 standard [
22] defined the islanding detection time, which is important for the dynamic performance during the transition process. During this unintentional islanding detecting, voltage across the critical load may experience a severe transient state since the voltage is determined by the amount of the injected power and unknown load condition. Fortunately, the more transient distortion the voltage experiences, the faster the unintentional islanding is detected. Therefore, improving the sensitivity of the islanding detection may alleviate the voltage distortion during the seamless switch. In this paper, to simplify the experiment procedure, the islanding detection takes 3 ms.
Figure 11a,b show the switch voltage waveform of the proposed control and the conventional PI control under idling state. The current of battery inverter is controlled to zero at GC mode and there is no feeding load in SA mode. The islanding detection time
tid is 3 ms. While in
Figure 11c, the islanding detection takes 8 ms for the proposed method. Three criteria are considered to evaluate the performance: the maximum voltage drops, voltage recovering time and the stability. For reading convenience, the variables in these figures and its values and meanings in testing is summarized in
Table 2. The three criteria for the results in
Figure 11a–c are summarized in
Table 3. As is shown in the
Figure 11 and the
Table 3, the proposed control frame owns the advantages of the good dynamic response speed within switch procedure and continuous smooth voltage waveform without mutation before and after switch. It proves the favorable performance of the control frame.
Furthermore, the inverter should cease to energize the local load by disconnecting the DG unit from the grid within two seconds, which is the required clearing time when the islanding is detected [
14]. Therefore, the conventional mode transition from the GC mode to the SA mode will be acceptable during 10–60 cycles of fundamental frequency [
3]. However, to guarantee the uninterrupted power supply for critical loads and enhance the power supply reliability of the photovoltaic source, the seamless switch is indispensable in the near future. Hence, some switch experiments are conducted under different load conditions as shown in
Figure 12. The meanings of the variables in those figures are identical with those in
Figure 1, and shown in
Table 2.
Firstly, two single loads, which are resistor load and negative power load (PV inverter), are connected to the inverter to test the seamless switch performance. As displayed in
Figure 12a, the PV inverter is connected to the AC bus to pour the power into the grid in GC mode. At the moment of changing into SA mode, the battery inverter switches from grid-feeding control into grid-forming control with smooth voltage wave shape. The transient time is less than 6 ms. Additionally, the favorable voltage wave ensures the PV inverter uninterrupted operation without disconnecting the AC bus.
Besides that, considering the condition of harmonic loads, the experiments of the proposed method were performed to manifest the performance of the proposed control frame as displayed in
Figure 12b. The waveforms in
Figure 12b prove that the proposed control frame manifests good performance in seamless transition from GC to SA mode. The smooth and continuous switch voltage waves and fast dynamic restoring time are achieved in less than 8 ms (including 3 ms of the islanding detection time). Thanks to the outstanding performance, the PV inverter remains connected to the AC bus during the switch process. This is meaningful for improving the reliability of the power supply in MGs.