# An Observer-Based Current Sensor-Less Control Scheme for Grid-Following Converters
## 2 Modeling of Grid-Following Inverter with L-Type Filter  
Figure 1 shows a three-phase diagram of a GFL inverter with an L-type filter which delivers the power from the primary source to the grid. The state-space dynamic equation of the system consists of the dynamics of the grid-side currents and DC-link voltage in the \"_abc_\" frame as follows:  
\[L\frac{di_{abc}}{dt}=v_{t(abc)}-v_{g(abc)} \tag{1}\] \[\frac{d}{dt}\left(\frac{1}{2}C.v_{dc}^{2}\right)=P_{dc}-v_{t(abc) }i_{abc} \tag{2}\]  
In these equations and the associated Figure 1, \(L_{f}\) is the output filter, \(C_{dc}\) is the DC-link capacitor, \(v_{dc}\) is the DC-link voltage, \(P_{dc}\) is the power generated by the primary power source, \(v_{t(abc)}\) is the VSC terminal voltage, \(v_{g(abc)}\) is the grid (PCC) voltage, and \(i_{(abc)}\) is the grid-side three phase currents. To remove the nonlinearity of (2), it is a common practice to use the DC-link energy \(W_{c}=\frac{1}{2}C.v_{dc}^{2}\) instead of the DC-link voltage \(V_{dc}\) as a state variable. Using a phase-locked loop (PLL) based on \(v_{g(abc)}\) and Park transformation, (1) and (2) can be shown by (3) in the \"dq\" frame representation form:  
\[ \begin{array}{l}\frac{di_{d}}{dt}=-R_{f}i_{d}-w.i_{q}+\frac{(v_{td}-v_{gd})}{ L_{f}}\\ \frac{di_{q}}{dt}=-R_{f}i_{q}+w.i_{d}+\frac{(v_{tq}-v_{gd})}{L_{f}}\\ \frac{d}{dt}(W_{c})=P_{dc}-\frac{3}{2}\left(v_{td}i_{d}+v_{tq}i_{q}\right)\\ \end{array}  \tag{3}\]  
where \(i_{q}\), \(i_{d}\) and \(v_{dc}\) are state variables; \(v_{td}-v_{tq}\), and \(v_{gd}-v_{gq}\) are the inverter and PCC voltages in the \(d\)-\(q\) frame, respectively. It can be seen that the DC-link voltage dynamic is still nonlinear, and (4) shows the dynamic equation, by substituting the grid-voltages instead of the terminal voltages:  
\[\frac{d}{dt}(\text{W}_{c})=P_{dc}-\frac{3}{2}\left(v_{gd}i_{d}+v_{gq}i_{q} \right)-P_{L-inst} \tag{4}\]  
where \(P_{L-inst}\) is the instantaneous power of output filter, which is further expressed in (5):  
\[P_{L-inst}=\frac{3}{4}L_{f}\frac{d}{dt}\left(i_{d}^{2}+i_{q}^{2}\right)+\frac {3}{2}R_{f}\left(i_{d}^{2}+i_{q}^{2}\right) \tag{5}\]  
The first part models the change in the energy stored in the inductance of the filter and the second term models the conduction and switching losses in the inverter and output filter. To consider the worse possible condition from a stability perspective, the loss parts are ignored. Substituting (5) into (4) and with some simplification, the dynamic equation is as given in (6):  
\[\frac{dW_{c}}{dt}=P_{dc}-\frac{3}{2}v_{gd}i_{d}-\frac{3}{2}L_{f}i_{d}\frac{ di_{d}}{dt}-\frac{3}{2}L_{f}i_{q}\frac{di_{q}}{dt} \tag{6}\]  
Figure 1: A GF-VSC. In addition, considering the zero value of \(v_{gq}\) in steady state due to the operation of PLL, the output active and reactive power of the inverter are as given in (7):  
\[ \begin{array}{l}P_{out}=\frac{3}{2}v_{gd}i_{d}\\ Q_{out}=\frac{3}{2}v_{gd}i_{q}\end{array}  \tag{7}\]  
It should be pointed out that the nonlinear terms in the right-hand side of (6) complicate the control design for this system. In order to alleviate the complexity of the nonlinear DC-link voltage dynamic, either a simplified model without non-linear parts or a linearized model with non-linear parts can be used. The simplified model is as shown in (8):  
\[\frac{d}{dt}W_{c}\approx P_{dc}-\frac{3}{2}v_{gd}i_{d} \tag{8}\]  
Accordingly, the closed form of the state equations are as follows:  
\[\begin{array}{l}\left[ \begin{array}{c}\frac{di_{d}}{dt}\\ \frac{di_{q}}{dt}\\ \frac{dW_{c}}{dt}\end{array} \right]=A_{1}\left[ \begin{array}{c}i_{d}\\ i_{q}\\ W_{c}\end{array} \right]+B_{u-1}\left[ \begin{array}{c}v_{td}\\ v_{td}\end{array} \right]+B_{d}\left[ \begin{array}{c}v_{gd}\\ v_{gq}\\ P_{dc}\end{array} \right]\\ y=C\left[ \begin{array}{c}i_{d}\\ i_{q}\\ W_{c}\end{array} \right]\text{where,}\\ \\ A_{1}=\left[ \begin{array}{ccc}0&-\omega&0\\ \omega&0&0\\ -\frac{3}{2}v_{gd}&0&0\end{array} \right]\quad B_{u-1}=\left[ \begin{array}{ ccc}1/L_{f}&0\\ 0&1/L_{f}\\ 0&0\end{array} \right]\quad B_{d}=\left[