## 4 Predictive Current Control Strategy
### The Predictive Current Control Scheme of the T-Type Inverter
#### 4.2.2 Discrete-Time Model of Prediction  
The discrete-time model is used to predict the future value of the grid current at the \(k\)th instant sampling the instantaneous voltage and measured current [18]. Several discrete methods are used in order to obtain a suitable predictive computing discrete-time model.  
Use the forward Euler approximation to replace the grid current derivative \(di/dt\). That is, the derivatives are approximated as follows:  
\[\frac{di}{dt}\approx\frac{i(k+1)-i(k)}{T_{s}} \tag{13}\]  
This is substituted into Equation (9) to obtain an equation that allows the prediction of the future load currents at time \(k+1\) for each of the 27 voltage vectors \(v(k)\) generated by the inverter. This equation is:  
\[i^{p}(k+1)=(1-\frac{RT_{S}}{L})i(k)+\frac{T_{s}}{L}(v(k)-\overset{\wedge}{e} (k)) \tag{14}\]  
where \(\overset{\wedge}{e}(k)\) represents the estimated back EMF. The superscript p indicates the predictor.  
The reference currents can be calculated by considering the active and reactive power reference \(P^{*}=1 kw\), \(Q^{*}=0\). According to instantaneous power theory [19], the system instantaneous active power and reactive power can be calculated using the following expressions:  
\[\left[\begin{array}{c}P\\ Q\end{array}\right]=\frac{3}{2}\left[\begin{array}{cc}e_{d}&e_{q}\\ e_{q}&-e_{d}\end{array}\right]\left[\begin{array}{c}i_{d}\\ i_{q}\end{array}\right] \tag{15}\]  
Thus, it is easy to obtain the reference current:  
\[\left[\begin{array}{c}i_{d}^{*}\\ i_{q}^{*}\end{array}\right]=\frac{2}{3\left[\left(e_{d}\right)^{2}+\left(e_{q} \right)^{2}\right]}\left[\begin{array}{cc}e_{q}&-e_{d}\\ e_{d}&e_{q}\end{array}\right]\left[\begin{array}{c}p^{*}\\ q^{*}\end{array}\right] \tag{16}\]  
Back-EMF voltage can be calculated from Equation (10). Considering the measurement of the load voltage and current, the equation is as follows:  
\[\overset{\wedge}{e}(k-1)=v(k-1)-\frac{L}{T_{s}}i(k)-(R-\frac{L}{T_{s}})i(k-1) \tag{17}\]  
where \(\overset{\wedge}{e}(k-1)\) is the estimated value of \(e(k-1)\). The present back-EMF is \(e(k)\), the value of the back-EMF can be estimated by extrapolating it, or, since the back-EMF frequency is much less than the sampling frequency, we can assume that within a sampling interval little change happens. Therefore, assume \(\overset{\wedge}{e}(k)=\overset{\wedge}{e}(k-1)\). The same derivative approximation can be used for the capacitor voltage at sampling time \(T_{s}\) which gives the following discrete-time equation:  
\[\frac{dv_{cx}}{dt}\approx\frac{v_{cx}(k+1)-v_{cx}(k)}{T_{s}} \tag{18}\]  
\[v_{c1}^{p}(k+1)=v_{c1}(k)+\frac{1}{c}i_{c1}(k)T_{s} \tag{19}\]\[v_{c2}^{p}(k+1)=v_{c2}(k)+\frac{1}{c}i_{c2}(k)T_{s} \tag{20}\]  
where, the currents \(i_{c1}(k)\) and \(i_{c2}(k)\) depend on the switching state of the T-type inverter and the values of the output currents can be calculated from the following equations:  
\[i_{c1}(k)=i_{dc}(k)-H_{1a}i_{a}(k)-H_{1b}i_{b}(k)-H_{1c}i_{c}(k) \tag{21}\]  
\[i_{c2}(k)=i_{dc}(k)+H_{2a}i_{a}(k)+H_{2b}i_{b}(k)+H_{2c}i_{c}(k) \tag{22}\]  
where \(i_{dc}\) is the current supplied by the DC voltage source \(V_{dc}\). Variables \(H_{1x}\) and \(H_{2x}\) depend on the logical value of the switching states and are defined as:  
\[H_{1x}=\left\{\begin{array}{ll}1,\;\text{if}\;S_{x}=\;^{\prime\prime}+^{ \prime\prime}\\ 0,\;\text{otherwise}\end{array}\right. \tag{23}\]  
\[H_{2x}=\left\{\begin{array}{ll}1,\;\text{if}\;S_{x}=\;^{\prime\prime}-^{ \prime\prime}\\ 0,\;\text{otherwise}\end{array}\right. \tag{24}\]  
with \(x=a\), \(b\), \(c\).  
Therefore, Equations (13)-(16) predict the influence of a given switch state on the change of capacitor voltage [20].