# State Feedback Control Based Seamless Switch Control for Microgrid Inverter
## 3 Proposed Control
### 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:  
\[\left\{\begin{array}{c}\dot{\mathbf{x}}_{c}\ =\ j\omega\mathbf{x}_{c}\ +\ \mathbf{v}_{ic}\\ \mathbf{y}_{c}\ =\ \mathbf{x}_{c}\end{array}\right. \tag{9}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Variable** & **Significance** & **Value** \\ \hline L & inductance & 2 mH \\ C & capacitance & 30 uF \\ R & inductor resistance & 0.1 f \\ \(f_{s}\) & switch frequency & 12.800 Hz \\  & Output voltage peak & 310 V \\  & DC link voltage & 650 V \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameters of battery storage invert system.  
Figure 4: Comparison of the two control objects.  
where \(\mathbf{x}_{c}\) and \(\mathbf{v}_{ic}\) are the state variable and input of the controller, respectively. Translating (9) into complex transfer function form:  
\[G_{c}\ =\ \frac{\mathbf{y}_{c}}{\mathbf{v}_{ic}}\ =\ \frac{1}{s\ -\ j\omega} \tag{10}\]  
It is revealed that, unlike scalar resonant controller, which has infinite gain at both positive and negative \(\omega\) points, the dynamic model described by (9) has only one frequency resonant point at the positive \(\omega\). 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:  
\[G_{IVTC}\ =\ \frac{\mathbf{u}}{\mathbf{e}_{u}}\ =\ K_{u}G_{c}G_{GCCou} \tag{11}\]  
where \(K_{u}=K_{uR}+jK_{ul}\) 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 \(K_{ulR}\), the phase margin (PM) and amplitude margin (AM) both decrease. However, with the increasing of the imaginary part of the parameter \(K_{ul}\), both the PM and AM will be improved. However, in low-frequency range, the phase is close to \(180^{\circ}\), which is harmful for the system, hence \(K_{ul}\), cannot be tuned too big. According to the Bode analysis Figure 6, the complex parameter of the voltage controller is designed as \(K_{u}=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  
Figure 5: Block diagram of the voltage control.  
Figure 6: Bode diagram of the open-loop gain of the voltage control with: (**a**) \(K_{uR}\) and (**b**) \(K_{ul}\) change.  
function. Hence, similar with the case of the voltage control, the parameter for the current control is selected as \(\mathbf{K_{i}}=3000+j20\).