## 4 Proposed Grid Current Closed-Loop Control
### Grid Current Closed-Loop Control Configuration  
To realize the control of the grid current fundamental component without steady error, the PR controller is utilized [21]. Because the single-phase grid voltage generally contains odd harmonics, the odd harmonics will be caused in the grid current. The odd-mode repetitive controller (OMRC) contains the internal modes of all odd harmonics resonant controllers, so it can effectively eliminate the grid current odd harmonics [22]. Besides, the needed data storage space of the OMRC is half the standard repetitive controller (RC), and its control error convergence period of the OMRC is also half the standard one [23]. Then, a novel compound grid current closed-loop control strategy containing a PR controller and an OMRC is proposed.  
Figure 6 shows the configuration of the grid current closed-loop control strategy that is put forward. Variables with asterisk (*) are reference instructions. In Figure 6, \(I_{gm}^{*}\) is the amplitude of the grid current reference, which multiplies by the sine value of grid phase angle to gain the momentary grid current reference \(i_{S}^{*}\). This grid phase angle is estimated online by the EPLL in [24]. The difference between \(i_{S}^{*}\) and \(i_{g}\), \(i_{Er}\) is set to be the input of the OMRC. The sum of \(i_{Er}\) and the OMRC output are set to be the input of the PR controller. Furthermore, the active damping method in [25] is used to eliminate the resonance of LC filter. The inductor voltage is reconstructed by the differentiation of the acquired grid current to avoid adding an extra voltage sensor.  
After the output of the PR controller deducts the feedback inductor voltage, the absolute value is set to be the AC side current reference of ITPS. Furthermore, the instantaneous grid voltage and the DC side voltage input ITPS, then the control signals of switching cycles are finally obtained. According to Figure 6, the block diagram of the closed-loop system in  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Values** & **Parameters** & **Values** \\ \hline \(V_{m}\) & 311 V & \(n\) & 1:1 \\ \(f_{S}\) & 50 Hz & \(L_{leak}\) & 45 uH \\ \(V_{dc}\) & 220 V & \(L_{g}\) & 180 uH \\ \(f_{S}\) & 50 kHz & \(C_{1}\) & 5 uF \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation parameters.  
Figure 6: Schematic of the grid current closed-loop control strategy put forward.  
the discrete domain is gained, just as shown in Figure 7. The corresponding configuration of the OMRC is shown in Figure 8, in which \(N_{Sa}=T_{1}/T_{Sa}\) is the number of the data that should be stored in a grid period. \(T_{1}\) is the grid period and \(T_{Sa}\) is the sampling period. For the purpose of increasing this system stability, a LPF \(Q(z)\) and a compensator \(S(z)\) are set.  
From Figure 8, the internal mode of OMRC is expressed as  
\[G_{ORC}(z)=-\frac{z^{-N_{Sa}/2}}{1+Qz^{-N_{Sa}/2}} \tag{17}\]  
Equation (17) in s domain can be expressed as  
\[\begin{array}{rl}G_{ORC}(s)&=\frac{1}{Q}\left[-1+\frac{4}{N_{Sa}T_{Sa}}\sum \limits_{k=1}^{\infty}\frac{s+\omega_{Qc}}{s^{2}+2\omega_{Qc}s+\omega_{Qc}^{2} +((2k-1)\omega_{1})^{2}}\right]\\ &\approx\frac{1}{Q}\left[-1+\frac{4}{N_{Sa}T_{Sa}}\sum\limits_{k=1}^{\infty} \frac{s+\omega_{Qc}}{s^{2}+2\omega_{Qc}s+((2k-1)\omega_{1})^{2}}\right]\end{array} \tag{18}\]  
where \(\omega_{Qc}=-\left(\ln Q\right)/\left(N_{Sa}T_{Sa}\right)\) is the resonant cutoff frequency.  
From (18), the OMRC contains the internal modes of all odd harmonics resonant controllers, so it is able to effectively eliminate the odd harmonics. Figure 9 shows the curve of the OMRC's amplitude-frequency characteristics, which can be gained on the basis of (18). According to Figure 9, the OMRC presents the high gains in odd harmonic frequencies and accordingly, the effect of odd-order grid harmonics can be eliminated.