# 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  
### Modelling of the Single-Phase Grid-Tied H6 Inverter  
The output voltage of the H6 inverter has three different levels, \(U_{dc},0,-U_{dc}\), and the transition between these three levels will be determined by the switching function \(\sigma\), which can be expressed as:  
\[\sigma=\left\{\begin{array}{ll}1,&(S_{1},S_{4}\quad on)\\ 0,&(S_{5},D_{2}\quad on\quad or\quad S_{6},D1\quad on)\\ -1,&(S_{2},S_{3}\quad on)\end{array}\right. \tag{1}\]  
Figure 1: The overall control block diagram of a single-phase grid-connected H6 inverter. SOGI, second-order generalized integrator.  
Analyses of the H6 inverter in the positive cycle and negative cycle are similar. Hence, only the inverter in the positive half cycle is analysed below. Assume that the bus voltage \(U_{dc}\) remains unchanged at the \(k^{\text{th}}\) switching period. The H6 inverter output voltage \(u_{AB}\left(t\right)\) can be expressed as:  
\[u_{AB}\left(t\right)=U_{dc}\sigma=\left\{\begin{array}{ll}U_{dc},&kT\leq t<kT +t_{on}\\ 0,&kT+t_{on}\leq\left(k+1\right)T\end{array}\right. \tag{2}\]  
where \(T\) is the sampling period. \(t_{on}\) is the turn-on time of the switch \(S_{1}\) during the \(kT\) switching period. \(D\) is the switching duty ratio. Therefore, the inverter average output voltage \(\overline{u}_{AB}\) during the \(kT\) switching period can be expressed as:  
\[\overline{u}_{AB}=U_{dc}\frac{t_{on}}{T}=U_{dc}D \tag{3}\]  
and \(D\) can also be written as:  
\[D=\frac{V_{m}}{V_{tri}} \tag{4}\]  
where \(V_{m}\) is the reference sinusoidal signal value. \(V_{tri}\) is the triangular carrier amplitude, which is set at one in this paper.  
Because the switching frequency is much higher than the grid frequency, the average switching model of the inverter bridge can be approximated by a gain link \(K_{PWM}\). Substituting of Equation (4) into Equation (3), \(K_{PWM}\) can be obtained as:  
\[K_{PWM}=\frac{\overline{u}_{AB}}{V_{m}}=\frac{U_{dc}}{V_{tri}}=U_{dc} \tag{5}\]  
Due to the inverter being connected to the grid through the filter inductor \(L\) (\(L=L_{1}+L_{2}\)) with an internal resistance \(R\), the state-space equation of the single phase grid connected inverter system is given by:  
\[L\frac{di_{g}}{dt}=u_{AB}-i_{g}R-u_{g} \tag{6}\]  
Taking the Laplace transform on the dynamic equation, the transfer function of the inverter output voltage \(u_{AB}\) to the grid current \(i_{g}\) can be expressed as:  
\[G_{L}\left(s\right)=\frac{i_{g}\left(s\right)}{u_{AB}\left(s\right)-u_{g} \left(s\right)}=\frac{1}{R+Ls} \tag{7}\]  
Actually, there is a control delay in the digital control together with a zero-order hold (ZOH) characteristic [22]. If a discrete system has to be modelled as a continuous system, the sampler needs to be considered. In addition, the actual modulated signal values remain constant for each sampling period. To express this feature accurately, the control structure should add a delay link \(e^{-T_{s}s}\), the sampler \(1/T_{s}\), as well as the ZOH; where \(T_{s}\) means the sampling period. The ZOH function can be described as:  
\[G_{zoh}\left(s\right)=\frac{1-e^{-T_{s}s}}{s} \tag{8}\]  
Therefore, the transfer function \(D_{s}\) in the s-domain of the digital control emulator can be expressed as:  
\[D_{s}=\frac{e^{-T_{s}s}(1-e^{-T_{s}s})}{T_{s}s}\approx\frac{1}{1.5T_{s}s+1} \tag{9}\]  
From Equations (5), (7), and (9), the plant \(P\left(s\right)\) of the current control system can be obtained as:\[\begin{split} P\left(s\right)&=K_{PWM}G_{L}\left(s\right)D_{s} \\ &=U_{dc}\frac{1}{\left(1.5T_{s}s+1\right)\left(R+Ls\right)}\end{split} \tag{10}\]