## 4 Proposed Grid Current Closed-Loop Control
### C. Parameter Design of Proposed Compound Controller  
According to the above analysis, the parameters of PR and OMRC can be designed separately. The parameter design of the PR controller is first. From Figure 7, the discrete-domain open-loop transfer function of Q1S AC-DC converter is expressed as  
\[G_{\bar{q}_{z},\bar{z}_{\bar{g}}}(z)=\frac{T_{Sa}}{L_{g}}\frac{c_{1}z}{z^{3}-c_ {2}z^{2}+(c_{1}K_{v}+1)z-c_{1}K_{v}} \tag{27}\]  
In (27), \(c_{1}=\omega_{n}L_{g}\sin(T_{Sa}\omega_{n})\), \(c_{2}=2\cos(T_{Sa}\omega_{n})\), \(\omega_{n}=1/\sqrt{L_{g}C_{1}}\).  
In [21], the PR controller's parameter design has been discussed in detail and it is not mentioned here. Table 2 lists the resulted parameter values. The bode diagram of the closed-loop system with the PR controller \(P^{\prime}(z)\) drawn and shown in Figure 12. At grid frequency, characteristics of \(P^{\prime}(z)\) are unit gain and zero phase shift. Therefore, the control of grid current first harmonic without steady-state error can be achieved.  
The parameters design procedure of OMRC is introduced as follows. The sampling frequency is the same as the switching frequency: \(N_{Sa}/2=f_{S}/f_{S}/2=500\). An LPF without phase shift is used for \(Q(z)\) and its expression is  
\[Q(z)=0.25z^{-1}+0.5+0.25z \tag{28}\]  
The general expression of compensator \(S(z)\) is  
\[S(z)=K_{rc}z^{c}F(z) \tag{29}\]  
where \(K_{rc}\) is the gain factor of the compensator, \(z^{c}\) is the phase lead link, and \(F(z)\) is the low-pass filter.  
From Figure 12, in the low-frequency bands, the gain of \(P^{\prime}(z)\) is unity, therefore, \(K_{r}=1\) and \(F(z)=1\) are determined. Since there is the phase lag in \(P^{\prime}(z)\), the phase lead link \(z^{c}\) should be used. From Figure 12, the lag phase of \(P^{\prime}(z)\) at 1 kHz is \(\theta_{l}=53.2^{\circ}/180^{\circ}\cdot\pi=0.932\)rad. Therefore, phase advance factor \(c\) is  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Parameter** & \(\omega_{c}\) & \(K_{r}\) & \(K_{p}\) & \(K_{a}\) & \(\omega_{a}\) & \(\omega_{b}\) \\ \hline Value & 2 rad/s & 100 & 0.8 & 20 & 17,920 rad/s & 280 rad/s \\ \hline \hline \end{tabular}
\end{table}
Table 2: PR Controller Parameters.  
Figure 12: Bode diagram of system closed-loop transfer function with PR controller.  
\[c=\theta_{l}/\left(2\pi f_{m}T_{Sa}\right)\approx 7.4 \tag{30}\]  
From (30), \(c\) contains the fractional part and it will decrease the actual phase compensation performance. In order to solve this problem, the finite-impulse response filter is utilized to approximate \(z^{c}\)[26]. The final expression of \(z^{c}\) in the discrete domain is  
\[z^{c}=z^{8}\left(0.28+0.84z^{-1}-0.12z^{-2}\right) \tag{31}\]  
Based on these determined parameters, the Nyquist curve of \(H(z)\) is drawn and shown in Figure 13. From Figure 13, \(|H(z)|\) is always less than 1 in the entire frequency range. In consequence, the designed closed-loop system is globally stable.  
Figure 14 shows the bode diagram of the control error transfer function of the PR + OMRC. From Figure 14, the tracking error of grid current at fundamental frequency is far less than 0 dB. It means that the zero steady-state error grid current control can be achieved. Furthermore, tracking errors of grid current at the odd-order frequencies are also far less than 0 dB. It means that the influence of grid voltage odd harmonics on grid current can be efficiently eliminated by the proposed compound controller.