## 2 Materials and Methods
### Model of the Injection System
#### 2.1.2 Active Clamp Flyback Model  
A DC-DC flyback converter is an isolated version of the buck-boost converter. A transformer is used to eliminate any direct electrical connection (DC) between the input and output of the power converter. Figure 3 shows the active clamp flyback circuit implemented in the TI solar microinverter development kit (TMDSSOLARUINVKIT). The version of the converter with an active clamp (branch \(C_{ac}\) and \(Q_{ac}\)) can provide zero-voltage switching (ZVS), thus reducing switching losses and electromagnetic interference (EMI) and increasing efficiency [13; 18]. Furthermore, the capacitor \(C_{1}\) with the diode \(D_{1}\) provides a voltage multiplier circuit at the output of the converter. This multiplier circuit operates in a direct converter mode to transfer energy from the input to the output. From the multiplier, the following is obtained:  
\[V_{bus}=-2V_{Ls}. \tag{8}\]  
For modeling, the active clamp stage is omitted, and it is divided into two subintervals. * Subinterval 1 If \(Q_{1}\) is on, the primary side current increases, the inductance \(L_{p}\) is charged, and energy is stored. On the secondary side, \(D_{1}\) and \(D_{2}\) are off. Therefore, the following equations can be obtained: \[\frac{di_{p}}{dt}=\frac{V_{in}}{L_{p}+L_{m}},\] (9) \[\frac{dV_{bus}}{dt}=-\frac{1}{R_{L}\Big{(}\frac{C_{2}}{2}+C_{out}\Big{)}}V_{ bus}.\] (10)
* Subinterval 2 If \(Q_{1}\) is off, power is transferred to the secondary side immediately, and the current \(i_{p}\) decreases to zero. On the secondary side, if \(V_{Ls}<0\), the capacitor \(C_{2}\) is charged through the diode \(D_{2}\), and if \(V_{Ls}>0\), the capacitor \(C_{1}\) is charged through the diode \(D_{1}\); therefore, \(V_{Cout}\) is charged to \(2V_{Ls}\). Then: \[\frac{di_{s}}{dt}=-\frac{V_{bus}}{2L_{s}},\] (11) \[i_{s}=\frac{C_{2}}{2}\frac{dV_{bus}}{dt}+C_{out}\frac{dV_{bus}}{dt}+\frac{V_{ bus}}{R_{L}}.\] (12)  
From the transformation relation \(n\), it is known that \(i_{s}=\frac{i_{p}}{n}\). Therefore, Equations (11) and (12) can be written as:  
\[\frac{di_{p}}{dt}=-\frac{n}{2L_{s}}V_{bus}, \tag{13}\]  
\[\frac{dV_{bus}}{dt}=\frac{1}{\frac{C_{2}}{2}+C_{out}}\Big{(}\frac{i_{p}}{n}- \frac{V_{bus}}{R_{L}}\Big{)}. \tag{14}\]  
When the input is \(u=V_{in}\) and the state variables are  
Figure 3: Active clamp flyback converter, where \(Q_{ac}\) operates in a mode complementary to the main MOSFET \(Q_{1}\)[19]. \[x= \begin{bmatrix}i_{p}\\ V_{bus}\end{bmatrix} , \tag{15}\]  
then, with Equations (9) and (10), the state-space system model for subinterval \(1\) is:  
\[ \begin{split} A_{1}&=\begin{bmatrix}0\\ 0&-\dfrac{1}{R_{L}\Big{(}\frac{C_{2}}{2}+C_{out}\Big{)}}\end{bmatrix},B_{1}= \begin{bmatrix}\dfrac{1}{L_{p}+L_{m}}\\ 0\end{bmatrix},\\ C_{1}&=\begin{bmatrix}1&0\end{bmatrix},\quad D_{1}=[0].\end{split}  \tag{16}\]  
Now, considering Equations (13) and (14), the state-space system model for subinterval \(2\) is:  
\[ \begin{split} A_{2}&=\begin{bmatrix}0\\ \dfrac{1}{n\Big{(}\frac{C_{2}}{2}+C_{out}\Big{)}}\end{bmatrix}&-\dfrac{n}{R_{L} \Big{(}\frac{C_{2}}{2}+C_{out}\Big{)}}\end{bmatrix},B_{2}=\begin{bmatrix}0\\ 0\end{bmatrix},\\ C_{2}&=\begin{bmatrix}1&0\end{bmatrix},\quad D_{2}=[0].\end{split}  \tag{17}\]  
The general model of the system is obtained by using the general notation of the state-space averaging technique [20] as follows:  
\[\dot{x}=\big{(}A_{1}d+A_{2}d^{\prime}\big{)}x+\big{(}B_{1}d+B_{2}d^{\prime} \big{)}V_{in}, \tag{18}\]  
\[y=\big{(}C_{1}d+C_{2}d^{\prime}\big{)}x, \tag{19}\]  
where \(d^{\prime}=1-d\), and \(d\) is the duty cycle. From Equations (18) and (19), the following expression is obtained:  
\[\dot{x}= \begin{bmatrix}-\dfrac{n(1-d)}{2L_{s}}x_{2}+\dfrac{V_{in}}{L_{p}+Lm}d \\ \dfrac{1-d}{n\Big{(}\frac{C_{2}}{2}+C_{out}\Big{)}}x_{1}-\dfrac{1}{R_{L}\Big{(} \frac{C_{2}}{2}+C_{out}\Big{)}}x_{2}\end{bmatrix} . \tag{20}\]  
The flyback converter's inputs are \(u=[d\quad Vin]^{T}\); therefore, the model found in Equation (20) is non-linear.