In the realm of renewable energy integration, the on-grid inverter stands as a pivotal component, whose control performance directly dictates the quality of power fed into the grid. Over the years, various control strategies for on-grid inverters have been explored to enhance precision and reduce output current ripple. These include current hysteresis control, repetitive control, traditional d,q-axis decoupling control, and proportional-resonant control. Among these, Model Predictive Current Control (MPCC) has garnered significant attention due to its fast dynamic response, excellent current tracking capability, and absence of complex parameter tuning. For an on-grid inverter, MPCC can be categorized based on the number of voltage vectors applied per sampling period: single-vector MPCC, dual-vector MPCC, and three-vector MPCC (3V-MPCC). While traditional 3V-MPCC offers superior steady-state performance and reduced current ripple compared to single or dual-vector approaches, it suffers from a substantial computational burden, as it requires evaluating six voltage vector combinations and performing six current predictions per control cycle. This high computational load impedes real-time implementation on digital processors. To address this limitation, this paper proposes an optimized three-vector model predictive current control (03V-MPCC) algorithm based on desired sector selection for on-grid inverters. The algorithm maintains the control performance of traditional 3V-MPCC while drastically reducing the computation time, making it more suitable for practical applications. The core idea is to rapidly determine the optimal voltage vector combination by calculating an ideal voltage vector based on dead-beat control principles, thereby eliminating the exhaustive search process. The feasibility and superiority of the proposed 03V-MPCC are validated through experimental results from a platform built around an STM32F407VET6 microcontroller.
The performance of any on-grid inverter control scheme is fundamentally tied to an accurate mathematical model of the system. Consider a standard three-phase two-level voltage source on-grid inverter. The circuit topology, which includes a DC-link capacitor, an L filter (inductor L and its equivalent series resistance R), and the grid connection, is standard. The output voltages of the inverter bridges relative to the DC-link midpoint are denoted as \(u_{aN}\), \(u_{bN}\), and \(u_{cN}\). The three-phase grid currents are \(i_a\), \(i_b\), \(i_c\), and the grid phase voltages are \(e_a\), \(e_b\), \(e_c\). Assuming balanced and symmetric three-phase parameters, the voltage equation in the three-phase stationary coordinate system is:
$$ \begin{bmatrix} u_{aN} \\ u_{bN} \\ u_{cN} \end{bmatrix} = R \begin{bmatrix} i_a \\ i_b \\ i_c \end{bmatrix} + L \frac{d}{dt} \begin{bmatrix} i_a \\ i_b \\ i_c \end{bmatrix} + \begin{bmatrix} e_a \\ e_b \\ e_c \end{bmatrix} $$
Transforming this equation to the synchronous rotating d,q coordinate system using the Park transformation yields the continuous-time model:
$$ \begin{aligned}
e_d &= u_d – L \frac{di_d}{dt} – R i_d + \omega L i_q, \\
e_q &= u_q – L \frac{di_q}{dt} – R i_q – \omega L i_d,
\end{aligned} $$
where \(i_d\) and \(i_q\) are the d- and q-axis current components, \(u_d\) and \(u_q\) are the d- and q-axis inverter output voltage components, \(e_d\) and \(e_q\) are the d- and q-axis grid voltage components, and \(\omega\) is the grid angular frequency. For digital implementation, a discrete-time model is essential. Using the forward Euler approximation with a sampling period \(T_s\), the discrete model is derived as:
$$ \begin{aligned}
i_d(k+1) &= \left(1 – \frac{R T_s}{L}\right) i_d(k) + \frac{T_s}{L} \left[ u_d(k) – e_d(k) + \omega L i_q(k) \right], \\
i_q(k+1) &= \left(1 – \frac{R T_s}{L}\right) i_q(k) + \frac{T_s}{L} \left[ u_q(k) – e_q(k) – \omega L i_d(k) \right].
\end{aligned} $$
Here, \(k\) denotes the current sampling instant, and \(k+1\) denotes the next instant. This discrete model is the cornerstone for all model predictive control strategies for the on-grid inverter, as it predicts the future current based on present measurements and applied voltages.

Traditional Three-Vector Model Predictive Current Control (3V-MPCC) aims to enhance performance by applying three voltage vectors within one control period: two active non-zero vectors and one zero vector. The standard two-level inverter has eight basic voltage vectors (six active, two zero). For sector I, defined by active vectors \(U_1(100)\) and \(U_2(110)\), the vector combination is \((U_1, U_2, U_0)\). Similar combinations are formed for all six sectors, creating six virtual voltage vector sets that can synthesize an output vector in any direction. The core task is to calculate the dwell times \(t_i\), \(t_j\), and \(t_0\) for the two active vectors and the zero vector, respectively, such that the predicted current at \(k+1\) equals the reference current \(i_d^*(k+1)\) and \(i_q^*(k+1)\). Based on the dead-beat principle, the current slopes when applying the zero vector and the active vectors are first determined. The current slopes for the zero vector are:
$$ \begin{aligned}
s_{d0} &= \frac{di_d}{dt} \bigg|_{U_0} = \frac{1}{L} ( \omega L i_q – R i_d – e_d ), \\
s_{q0} &= \frac{di_q}{dt} \bigg|_{U_0} = \frac{1}{L} ( -\omega L i_d – R i_q – e_q ).
\end{aligned} $$
For the active vectors \(U_i\) and \(U_j\), the slopes are:
$$ \begin{aligned}
s_{di} &= s_{d0} + \frac{u_{di}}{L}, \quad s_{qi} = s_{q0} + \frac{u_{qi}}{L}, \\
s_{dj} &= s_{d0} + \frac{u_{dj}}{L}, \quad s_{qj} = s_{q0} + \frac{u_{qj}}{L},
\end{aligned} $$
where \(u_{di}, u_{qi}, u_{dj}, u_{qj}\) are the d,q components of vectors \(U_i\) and \(U_j\). The dead-beat condition and the time constraint are:
$$ \begin{aligned}
i_d(k) + s_{di} t_i + s_{dj} t_j + s_{d0} t_0 &= i_d^*(k+1), \\
i_q(k) + s_{qi} t_i + s_{qj} t_j + s_{q0} t_0 &= i_q^*(k+1), \\
t_i + t_j + t_0 &= T_s.
\end{aligned} $$
Solving this system yields the dwell times:
$$ \begin{aligned}
t_i &= \frac{X(s_{qj} – s_{q0}) + Y(s_{d0} – s_{dj}) + T_s(s_{q0}s_{dj} – s_{qj}s_{d0})}{Z}, \\
t_j &= \frac{X(s_{q0} – s_{qi}) + Y(s_{di} – s_{d0}) + T_s(s_{qi}s_{d0} – s_{q0}s_{di})}{Z}, \\
t_0 &= T_s – t_i – t_j,
\end{aligned} $$
where \(X = i_d^* – i_d(k)\), \(Y = i_q^* – i_q(k)\), and \(Z = s_{q0}s_{di} + s_{qi}s_{d0} + s_{qj}s_{di} – s_{qi}s_{dj} – s_{qj}s_{d0} – s_{q0}s_{dj}\). After calculation, these times must be validated and possibly redistributed if they fall outside the range [0, \(T_s\)]. For instance, if \(t_i\) and \(t_j\) are within range but \(t_0\) is not, only the two active vectors are used, and their times are scaled as \(t_i’ = \frac{t_i}{t_i+t_j}T_s\), \(t_j’ = \frac{t_j}{t_i+t_j}T_s\). Once valid times are obtained for a sector, the resulting average voltage vector for that sector is computed:
$$ u_d^{sec} = \frac{t_i}{T_s} u_{di} + \frac{t_j}{T_s} u_{dj}, \quad u_q^{sec} = \frac{t_i}{T_s} u_{qi} + \frac{t_j}{T_s} u_{qj}. $$
This vector is used in the discrete model to predict the current at \(k+1\) for that sector. A cost function, typically the squared error between reference and predicted currents, is evaluated for all six sectors:
$$ g = [i_d^* – i_d(k+1)]^2 + [i_q^* – i_q(k+1)]^2. $$
The sector with the minimum cost function value is selected, and its corresponding voltage vector combination and dwell times are applied via Space Vector Pulse Width Modulation (SVPWM). While this method improves performance, it requires calculating dwell times and evaluating the cost function six times per cycle, leading to high computational load for the on-grid inverter controller.
The proposed Optimized Three-Vector Model Predictive Current Control (03V-MPCC) algorithm circumvents this exhaustive search by directly determining the optimal sector. The key insight is that for an on-grid inverter under dead-beat control, there exists an ideal voltage vector that would force the current to match its reference in one step. This ideal vector, derived from the discrete model, is calculated at each sampling instant. Setting the predicted current equal to the reference in the discrete model gives:
$$ \begin{aligned}
u_d^*(k) &= \frac{L}{T_s} \left[ i_d^*(k+1) – \left(1 – \frac{R T_s}{L}\right) i_d(k) \right] + e_d(k) – \omega L i_q(k), \\
u_q^*(k) &= \frac{L}{T_s} \left[ i_q^*(k+1) – \left(1 – \frac{R T_s}{L}\right) i_q(k) \right] + e_q(k) + \omega L i_d(k).
\end{aligned} $$
Here, \(u_d^*(k)\) and \(u_q^*(k)\) represent the d,q components of the ideal voltage vector needed for perfect tracking. This vector is then transformed back to the two-phase stationary coordinate system (\(\alpha,\beta\)) using the inverse Park transformation with the grid phase angle \(\theta\) provided by a Phase-Locked Loop (PLL):
$$ \begin{aligned}
u_\alpha^*(k) &= u_d^*(k) \cos\theta – u_q^*(k) \sin\theta, \\
u_\beta^*(k) &= u_d^*(k) \sin\theta + u_q^*(k) \cos\theta.
\end{aligned} $$
The angle \(\gamma\) of this ideal voltage vector relative to the \(\alpha\)-axis determines the sector:
$$ \gamma = \arctan2\left( u_\beta^*(k), u_\alpha^*(k) \right). $$
Based on \(\gamma\), the sector (and thus the optimal active vector pair \(U_i, U_j\)) is immediately identified. Once the sector is known, only one set of dwell times for the three vectors (\(U_i, U_j, U_0\)) needs to be calculated using the formulas from the traditional 3V-MPCC. This eliminates the need to compute times for all six sectors and perform six cost function evaluations. The steps of the 03V-MPCC algorithm for the on-grid inverter are summarized as follows:
- Sample the grid currents \(i_a, i_b, i_c\) and grid voltages (or estimate them) at instant \(k\). Transform them to d,q coordinates.
- Calculate the ideal voltage vector components \(u_d^*(k)\) and \(u_q^*(k)\) using the dead-beat equation above.
- Transform \(u_d^*(k), u_q^*(k)\) to \(\alpha,\beta\) coordinates and compute the angle \(\gamma\) to determine the optimal sector and its corresponding active vectors \(U_i, U_j\).
- Calculate the current slopes \(s_{d0}, s_{q0}, s_{di}, s_{qi}, s_{dj}, s_{qj}\) for the selected vectors.
- Compute the dwell times \(t_i, t_j, t_0\) using the solved equations. Validate and redistribute times if necessary.
- Apply the selected voltage vector combination with the calculated dwell times via SVPWM to generate the PWM signals for the on-grid inverter switches.
This optimized approach significantly reduces the computational burden while preserving the control performance. The reduction stems from performing the sector selection analytically via the ideal vector, rather than through iterative prediction and cost function evaluation for all sectors. This makes the 03V-MPCC highly suitable for real-time control of on-grid inverters with limited processor resources.
To validate the proposed 03V-MPCC, an experimental platform was constructed. The core controller was an STM32F407VET6 microcontroller. The on-grid inverter was a three-phase two-level IGBT module connected to a programmable AC source simulating the grid. The system parameters are listed in the table below.
| Parameter | Symbol | Value |
|---|---|---|
| Grid Voltage (phase) | \(E_{ph}\) | 20 V |
| Grid Frequency | \(f\) | 50 Hz |
| DC-Link Voltage | \(U_{dc}\) | 100 V |
| Filter Inductance | \(L\) | 500 μH |
| Filter Resistance | \(R\) | 0.05 Ω |
| DC-Link Capacitance | \(C_{dc}\) | 10 μF |
| Sampling/Switching Frequency | \(f_s\) | 20 kHz |
| Control Period | \(T_s\) | 50 μs |
The steady-state performance was evaluated by comparing the output current waveforms and Total Harmonic Distortion (THD) of the proposed 03V-MPCC against traditional d,q-axis decoupling control for the on-grid inverter. At an output current reference of 2 A (d-axis), the phase current waveforms were recorded. The THD was measured using a power analyzer. The results for different current levels are summarized in the following table.
| Current Reference (A) | THD with 03V-MPCC (%) | THD with d,q-Decoupling (%) |
|---|---|---|
| 1.0 | 4.099 | 5.893 |
| 1.5 | 3.342 | 3.879 |
| 2.0 | 3.163 | 3.301 |
The table shows that the 03V-MPCC consistently achieves lower THD than the traditional d,q-axis decoupling method across different operating points. Notably, at lower currents (e.g., 1 A), the d,q-decoupling control fails to meet the typical grid code requirement of THD < 5%, whereas the 03V-MPCC maintains compliance. This demonstrates the superior current quality offered by the predictive control approach for the on-grid inverter. The dynamic performance was tested by applying a step change in the d-axis current reference from 1 A to 2 A. The response time, defined as the time for the current to settle within 5% of the new reference, was measured. The 03V-MPCC exhibited a response time of approximately 1.2 ms, while the d,q-decoupling control showed a response time of 1.6 ms. This confirms the faster dynamic response inherent to model predictive control, which is crucial for on-grid inverters in rapidly changing conditions like solar irradiance variations or grid disturbances.
A critical advantage of the 03V-MPCC is its reduced computational load. To quantify this, the execution time of the control algorithm within one interrupt service routine was measured using a GPIO pin toggled at the start and end of the computation. For the traditional 3V-MPCC, the interrupt duration was approximately 44 μs, whereas for the proposed 03V-MPCC, it was only 20 μs. This represents a reduction of over 50% in computation time, freeing up processor resources for other tasks like communication or advanced grid support functions in an on-grid inverter system. The comparison is summarized below.
| Algorithm | Average Interrupt Duration (μs) | Key Operations per Cycle |
|---|---|---|
| Traditional 3V-MPCC | 44 | 6x dwell time calc, 6x current prediction, 6x cost function eval |
| Proposed 03V-MPCC | 20 | 1x ideal vector calc, 1x sector determination, 1x dwell time calc |
The mathematical foundation of the sector selection can be further analyzed. The ideal voltage vector \(U^*(k)\) in the \(\alpha\beta\) plane must be synthesized by the inverter’s available voltage vectors. The on-grid inverter’s voltage vectors form a hexagon. The sector is determined by the angle \(\gamma\). The condition for the ideal vector to lie within a sector bounded by vectors \(U_i\) and \(U_j\) is that its projection onto the orthogonal complements of these vectors satisfies certain inequalities. However, the arctan2 method provides a straightforward implementation. The robustness of this selection relies on accurate system parameters (\(L, R\)) and a precise PLL for \(\theta\). In practice, online parameter estimation or adaptive schemes could be incorporated to maintain performance for the on-grid inverter under parameter variations.
Furthermore, the impact of the proposed algorithm on switching frequency and losses for the on-grid inverter can be considered. Since 03V-MPCC still uses three vectors per cycle with calculated dwell times, the switching frequency is approximately constant and equal to the sampling frequency (20 kHz in this case), unlike some single-vector MPCC methods that have variable switching frequency. The use of two active vectors and a zero vector helps distribute switching events, potentially reducing switching losses compared to methods that heavily favor certain vectors. A more detailed loss analysis would require measuring inverter efficiency under different loads, which is a subject for future work.
The discrete model used for prediction assumes a constant grid frequency and parameters during one sampling period. For an on-grid inverter connected to a stiff grid, this is generally valid. However, under severe grid distortions or imbalances, the model accuracy might degrade. Extensions of the 03V-MPCC to handle unbalanced grids or harmonic compensation could involve using multiple reference frames or incorporating negative-sequence components into the predictive model. The modularity of the predictive control framework allows for such enhancements. The core advantage of the 03V-MPCC—reduced computation via sector selection—would remain beneficial even in these more complex scenarios for advanced on-grid inverter applications.
In conclusion, this paper has presented an optimized three-vector model predictive current control algorithm for on-grid inverters. The algorithm, termed 03V-MPCC, leverages dead-beat principles to quickly identify the optimal voltage vector sector, eliminating the exhaustive search required in traditional 3V-MPCC. This results in a significant reduction in computational time—over 50% in experimental measurements—while maintaining excellent steady-state and dynamic performance. The on-grid inverter controlled with 03V-MPCC exhibits lower current THD and faster response compared to conventional d,q-axis decoupling control. The proposed method thus offers a compelling solution for high-performance on-grid inverters, balancing control quality with computational efficiency, making it suitable for implementation on mid-range digital signal processors or microcontrollers commonly used in renewable energy systems.
