# Analysis and Design of A PMQR-Type Repetitive Control Scheme for Grid-Connected H6 Inverters
## 3 Analysis and Design of the PMQR-Type RC Scheme
### PMQR-Type RC Scheme Design  
According to Figure 3, the proposed PMQR-type repetitive controller \(G_{PMQR-typeRC}\left(s\right)\) is composed of a repetitive controller \(G_{rc}\left(s\right)\) and a proportional controller \(G_{p}\left(s\right)\), where \(k_{p}\) is the proportional gain of \(G_{p}\left(s\right)\). Therefore, the parameters of the PMQR-type RC are designed by designing \(G_{rc}\left(s\right)\) and \(k_{p}\). Usually, the RC is implemented in the DSP. For accurate analysis, the following controller design is discussed directly in the z-domain. A more detailed structure of the proposed PMQR-type RC controller is shown in Figure 5.  
The conventional modified RC block is mainly composed of a repetitive signal generator (internal model), a periodic delay link, and a compensator. Its transfer function in the z-domain can be described as:  
\[G_{rc}\left(z\right)=\frac{Q\left(z\right)z^{-N}}{1-Q\left(z\right)z^{-N}}z^{m }k_{r}S\left(z\right) \tag{15}\]  
where \(z^{-N}\) is the cyclic delay link, which causes the current period error information to affect the correction amount from the next cycle. It makes the setting of the advance link possible. The coefficient \(N\) is the number of samples of the output voltage per cycle, \(N=f_{c}/f_{g}\). \(f_{c}\) and \(f_{g}\) are the carrier frequency and the grid voltage reference frequency, respectively. \(Q\left(z\right)\) is a filter or a constant less than one, which is set to overcome the inaccuracies of the object model and enhance system robustness. \(S\left(z\right)\) is the compensation link used to modify the characteristics of the system to meet the requirements  
Figure 4: The equivalent block diagram of \(P_{0}\left(s\right)\). Figure 3: The control structure of the PMQR-type repetitive control (RC) scheme. of repetitive control. \(z^{m}\) is used for phase compensation, so that the modified system has no phase lag in a certain frequency range. Here, \(m\) denotes the number of sampling periods. \(k_{r}\) is the repetitive control gain used for amplitude compensation to maintain system stability. From Figure 5, the relationship between the tracking error \(E\left(z\right)\), the reference input \(i_{ref}\), and disturbances \(u_{g}\) can be written as:  
\[E\left(z\right)=\frac{1}{1+[G_{rc}\left(z\right)+k_{p}]P\left(z\right)}[I_{ ref}\left(z\right)-U_{g}\left(z\right)] \tag{16}\]  
In the discrete domain, the necessary and sufficient condition for the stability of the closed-loop system is that all roots of the characteristic equation are located in the unit circle centred on the origin [25]. From Equation (16), the characteristic equation of the PMQR-type RC control system is obtained as:  
\[1+[G_{rc}\left(z\right)+k_{p}]P\left(z\right)=0 \tag{17}\]  
and the characteristic polynomial expansion can be expressed as:  
\[ \begin{split}& 1+[G_{rc}\left(z\right)+k_{p}]P\left(z\right)=1+G_{rc} \left(z\right)P\left(z\right)+k_{p}P\left(z\right)\\ &=[1+k_{p}P\left(z\right)][1+\frac{G_{rc}\left(z\right)P\left(z \right)}{1+k_{p}P\left(z\right)}]\\ &=[1+k_{p}P\left(z\right)][1+G_{rc}\left(z\right)P_{0}\left(z \right)]\end{split}  \tag{18}\]  
where \(P_{0}\left(z\right)=P\left(z\right)/[1+k_{p}P\left(z\right)]\)  
Hence, according to the condition of system stability, the roots of the equation \(1+k_{p}P\left(z\right)=0\) should be inside the unit circle, which can be controlled by the proportion coefficient \(k_{p}\). At the same time, the inequality \(\left|1+G_{rc}\left(z\right)P_{0}\left(z\right)\right|\
eq 0\) should also be ensured. Therefore, substitution of Equation (15) into this inequality leads to:  
\[\left|1-Q\left(z\right)z^{-N}+k_{r}Q\left(z\right)z^{-N+m}S\left(z\right)P_{0 }\left(z\right)\right|\
eq 0 \tag{19}\]  
Then, there exists:  
\[ \begin{split}\left|Q\left(z\right)z^{-N}[1-k_{r}z^{m}S\left(z \right)P_{0}\left(z\right)]\right|<1\\ \forall z=e^{lyw},0<\omega<\Pi\end{split}