## 4 Improved Model-Predictive Control  
Electrical drivers, UPS, and grid-connected inverters have all been proposed as applications for MPC [26; 27]. FCS-MPC is based on the principle of employing a discrete model of the power converter and its associated filter to anticipate future behavior for all potential control inputs and then applying the best one that minimizes a predetermined cost function (CF) at each sampling period. The main concept is to harness the microcontroller's raw processing capability to integrate all control loops in a single algorithm that takes into account the converter's model and accompanying filter. A three-phase voltage source inverter driven by the FCS-MPC is shown in Figure 1 as a general block diagram.  
The method is conducted sequentially in its most basic form, and at the start of each sampling time (\(T_{s}\)), it applies new switching configurations generated based on the measurements from the previous step [7]. It then receives new and updated measurements in order to select new switching configurations. The three-phase 2L-VSI power circuit is considered, with the two switches in each leg operating in a complimentary mode [28; 29]. The switching states can be represented by the switching signals \(S_{ka}\), \(S_{kb}\), and \(S_{kc}\), which are defined as follows:  
\[S_{ka}=\begin{cases}1\text{ if }S_{1}\text{ on and }S_{4}\text{ off}\\ 0\text{ if }S_{1}\text{ off and }S_{4}\text{ on}\end{cases} \tag{15}\]  
\[S_{kb}=\begin{cases}1\text{ if }S_{2}\text{ on and }S_{5}\text{ off}\\ 0\text{ if }S_{2}\text{ off and }S_{5}\text{ on}\end{cases} \tag{16}\]  
\[S_{kc}=\begin{cases}1\text{ if }S_{3}\text{ on and }S_{6}\text{ off}\\ 0\text{ if }S_{3}\text{ off and }S_{6}\text{ on}\end{cases} \tag{17}\]  
The filter inductance (\(L_{fa}\), \(L_{fb}\), \(L_{fc}\)) equation can be expressed in the vectorial form as  
\[L_{f}\frac{\text{d}i_{L_{f}}}{\text{d}t}=v_{i}-v_{o} \tag{18}\]  
where \(L_{f}\) is the filter inductance and \(i_{Lf}\) and \(v_{o}\) are the filter current and voltage, respectively. Variable \(v_{i}\) is the inverter voltage of the system, and it has eight different voltage vectors, as shown in Figure 2.  
The equation that describes the dynamic behavior of the output voltage can be expressed as  
\[C_{f}\frac{\text{d}v_{o}}{\text{d}t}=i_{L_{f}}-i_{o} \tag{19}\]  
where \(C_{f}\) is the filter capacitance (\(C_{fa}\), \(C_{fb}\), \(C_{fc}\)) and \(i_{o}\) is the load current, which can be estimated or measured. These equations can be rewritten in the state space model as [30; 31]:  
\[\frac{\text{d}X}{\text{d}t}=AX+B_{1}v_{i}+B_{2}i_{o} \tag{20}\]  
where,  
\[X=\begin{bmatrix}i_{L_{f}}\\ v_{o}\end{bmatrix} \tag{21}\]  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline \(K_{o}\) & 2 \\ \(R_{i}\) & 10 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Control parameters of the IPBC2 controller, voltage gain—\(K_{v}\), and additional input resistance factor—\(R_{i}\).  
A discrete model is obtained from (20) and it can be expressed as follows:  
\[x\big{(}k+1\big{)}=A_{q}x\big{(}k\big{)}+B_{q}v_{i}\big{(}k\big{)}+B_{dq}i_{o} \big{(}k\big{)} \tag{25}\]  
where  
\[A_{q}=exp^{A\tau_{z}} \tag{26}\]  
\[B_{q}=\int_{0}^{T_{z}}exp^{A\tau}B_{1}d\tau \tag{27}\]  
\[B_{dq}=\int_{0}^{T_{z}}exp^{A\tau}B_{2}d\tau. \tag{28}\]  
This model is used to calculate the prediction of filter voltage and currents for every possible input voltage. The selection of the optimal output voltage vector depends on the evaluation of CF. The two different CFs for such system will be [30]:  
\[J=(v_{oa}^{*}-v_{oa}^{p}(k+1))^{2}+(v_{o\beta}^{*}-v_{o\beta}^{p}(k+1))^{2}+( \lambda_{d}*g_{I}) \tag{29}\]  
\[g_{I}=(i_{Lfa}-i_{oa}+C_{f}\omega_{ref}(v_{o\beta}^{*}))^{2}+(i_{Lf\beta}-i_{ o\beta}+C_{f}\omega_{ref}(v_{oa}^{*}))^{2} \tag{30}\]  
where \(\lambda_{d}\) = 0.6.