# 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
### Control System Configuration  
The PMQR controller is composed of a proportional controller and a multiple quasi-resonant controller. Its control structure diagram is shown in Figure 2. It can be expressed as [23]:  
\[G_{c}\left(s\right)=K_{p}+\sum_{n=1}^{k}\frac{2k_{r}\omega_{c}s}{s^{2}+2\omega_ {c}s+\left(n\omega_{0}\right)^{2}} \tag{11}\]  
\(G_{c}\left(s\right)\) is the transfer function of the PMQR controller, where \(K_{p}\) is the proportional gain. \(k_{r}\) is the integral gain of the \(n^{\text{th}}\)-order quasi-resonant controller. \(\omega_{c}\) and \(\omega_{0}\) are the cut-off and resonant angular frequency of the quasi-resonant controller, respectively. \(\omega_{0}=2\pi/T_{0}\) is the fundamental angular frequency. \(k\) is the specified highest harmonic order that is required to be compensated, and \(n\) is the order of the harmonics, usually low-order harmonics, especially 3, 5, and 7 harmonics.  
In spite of the capability of tracking sinusoidal reference current and compensating various harmonic components, the utilization of the MQR controller leads to a complex control structure, expensive computational cost, and difficulties in implementing on low-end MCUs or DSPs [21]. Furthermore, the design of the control gain for the quasi-resonant controller is not an easy task, especially when the current controller needs to compensate for higher harmonics. So as to avoid these problems, RC is regarded as an appropriate alternative. An RC is able to offer a similar characteristic as MQR controllers by employing a simple delay function. The transfer function in the s-domain of the RC can be described as:  
\[G_{rc}\left(s\right)=\frac{k_{rc}e^{-sT_{0}}}{1-Q\left(s\right)e^{-sT_{0}}} \tag{12}\]  
According to [24], Equation (12) can also be expressed as:  
\[\begin{split}& G_{rc}\left(s\right)=\frac{k_{rc}Q\left(s\right)e^{ -sT_{0}}}{1-Q\left(s\right)e^{-sT_{0}}}\\ &=-\frac{k_{rc}}{2}+\frac{k_{rc}}{T_{0}s+T_{0}\omega_{c}}+\frac{2 k_{rc}}{T_{0}}\sum_{n=1}^{\infty}\frac{s+\omega_{c}}{s^{2}+2\omega_{c}s+ \omega_{c}^{2}+\left(\frac{2\pi n}{T_{0}}\right)^{2}}\\ &\approx-\frac{k_{rc}}{2}+\frac{k_{rc}}{T_{0}s+T_{0}\omega_{c}} +\frac{2k_{rc}}{T_{0}}\sum_{n=1}^{\infty}\frac{s}{s^{2}+2\omega_{c}s+\left(n \omega_{0}\right)^{2}}\end{split} \tag{13}\]  
where \(k_{rc}\) is the RC gain and \(T_{0}=1/f_{grid}\) is the time delay. \(Q\left(s\right)\) is a low-pass filter or a simple constant slightly less than one to improve system stability and robustness. \(\omega_{c}=-lnQ/T_{0}\) is the cut-off angular frequency, and \(\omega_{0}=2\pi/T_{0}\). \(\omega_{c}^{2}\) can be ignored due to \(\omega_{c}<<\omega_{0}\). Equation (13) shows  
Figure 2: The proportional multiple quasi-resonant (PMQR) controller for fundamental and harmonic components.  
that the repetitive controller contains a limitless number of MQR controllers. In order to improve the system dynamic response, a proportional controller \(G_{p}\left(s\right)\) is selected to connect in parallel with the RC, which forms the PMQR-type RC, as shown in Figure 3. The parallel structure of different controllers perhaps affects the dynamic response of the system. However, it seems that the relatively slow RC will not affect the quick response performance of the proportional controller in the parallel configuration [25]. It is worth noting that the repetitive controller should be designed for the frequency characteristics of its control plant. And the parallel structure will provide a more friendly plant for the repetitive controller. As can be seen from the Figure 4. the transfer function of the new plant \(P_{0}\left(s\right)\) can be expressed as:  
\[P_{0}\left(s\right)=\frac{P\left(s\right)}{1+G_{p}\left(s\right)P\left(s\right)} \tag{14}\]