## 4 Three-Phase Inverters
### Grid Forming Inverters
In addition, often there is a need to precisely control the output voltage. An improved design with additional current and voltage loops is shown in Figure 21. The objective of the system is to regulate the output voltages such that \(v_{d}=v_{d}^{*}\), \(v_{q}=0\), \(v_{0}=0\). This is achieved by two loops: an inner loop that controls the currents, and an outer loop that controls the voltages. The inner loop regulates the currents such that \(i_{d}(t)=i_{d}^{*}(t)\) and \(i_{q}(t)=i_{q}^{*}(t)\), by adjusting the inverter duty cycles. This loop is typically modeled as follows. The average voltages \(u_{d}(t)\), \(u_{q}(t)\), \(u_{0}(t)\) are  
\[u_{d} =V_{dc}d_{d}, \tag{128}\] Figure 19:0 Figure 19:1  
Figure 19:2 A basic three-phase inverter stage. and the inductor equations in the \(dq\) reference frame are  
\[ \begin{split}\frac{\mathrm{d}}{\mathrm{d}t}i_{d}&=\omega^{* }i_{q}+\frac{1}{L}(u_{d}-v_{d}),\\ \frac{\mathrm{d}}{\mathrm{d}t}i_{q}&=-\omega^{*}i_{d }+\frac{1}{L}(u_{q}-v_{q}).\end{split}  \tag{129}\]  
The cross terms \(\omega^{*}i_{q}\) and \(-\omega^{*}i_{d}\) that appear in these equations complicate the controller design, since \(i_{d}\) depends on \(i_{q}\), and \(i_{q}\) depends on \(i_{d}\). A typical solution is to eliminate the cross terms, using the following control law  
\[ \begin{split} d_{d}(t)&=V_{dc}^{-1}\left(v_{d}(t)- \omega^{*}Li_{q}(t)+k_{p}(i_{d}^{*}(t)-i_{d}(t))+k_{i}\int_{0}^{t}(i_{d}^{*}( \tau)-i_{d}(\tau))\mathrm{d}\tau\right),\\ d_{q}(t)&=V_{dc}^{-1}\left(v_{q}(t)+\omega^{*}Li_{d }(t)+k_{p}(i_{q}^{*}(t)-i_{q}(t))+k_{i}\int_{0}^{t}(i_{q}^{*}(\tau)-i_{q}(\tau ))\mathrm{d}\tau\right),\\ d_{0}(t)&=0,\end{split}  \tag{130}\]  
where \(i_{d}^{*}(t)\) and \(i_{q}^{*}(t)\) are the target currents, and \(k_{p},k_{i}\) are parameters of a PI controller. This control law is illustrated in Figure 22. Substitution of (128) and (130) into (129) yields  
\[ \begin{split} L\frac{\mathrm{d}}{\mathrm{d}t}i_{d}&= k_{p}(i_{d}^{*}(t)-i_{d}(t))+k_{i}\int_{0}^{t}(i_{d}^{*}(\tau)-i_{d}(\tau)) \mathrm{d}\tau,\\ L\frac{\mathrm{d}}{\mathrm{d}t}i_{q}&=k_{p}(i_{q}^ {*}(t)-i_{q}(t))+k_{i}\int_{0}^{t}(i_{q}^{*}(\tau)-i_{q}(\tau))\mathrm{d}\tau. \end{split}  \tag{131}\]  
Since the cross terms are eliminated, the currents are governed by two single-input single-output systems, as shown in Figure 23. This enables straightforward t  
Figure 21: Grid forming inverter, with additional current and voltage control loops. The outer voltage loop operates based on similar principles. As an example, assuming a balanced resistive load, the capacitor equations may be approximated as  
\[ \begin{split}\frac{\mathrm{d}}{\mathrm{d}t}v_{d}&= \omega^{*}v_{q}+\frac{1}{C}\left(i_{d}^{*}-\frac{v_{d}}{R}\right),\\ \frac{\mathrm{d}}{\mathrm{d}t}v_{q}&=-\omega^{*}v_{ d}+\frac{1}{C}\left(i_{q}^{*}-\frac{v_{q}}{R}\right),\end{split}  \tag{132}\]  
and a possible control law that eliminates the cross terms is  
\[ \begin{split} i_{d}^{*}&=\frac{v_{d}(t)}{R}-\omega^ {*}Ci_{q}(t)+k_{p,v}(v_{d}^{*}(t)-v_{d}(t))+k_{i,v}\int_{0}^{t}(v_{d}^{*}(\tau)- v_{d}(\tau))\mathrm{d}\tau,\\ i_{q}^{*}&=\frac{v_{q}(t)}{R}+\omega^{*}Ci_{d}(t)+k_ {p,v}(v_{q}^{*}(t)-v_{q}(t))+k_{i,v}\int_{0}^{t}(v_{q}^{*}(\tau)-v_{q}(\tau)) \mathrm{d}\tau,\end{split}  \tag{133}\]  
where \(v_{d}^{*}\) and \(v_{q}^{*}\) are the target voltages, and \(k_{p,v}\), \(k_{i,v}\) are the parameters of a PI controller.