1. Introduction
Voltage source inverters (VSIs) are a common interface in modern power electronic systems, facilitating the conversion between direct-current (DC) and alternating-current (AC) domains [
1,
2]. These devices are widely used in various technological applications, such as advanced motor drive systems [
3,
4], renewable energy systems, and distributed energy resources (DERs) [
5].
Figure 1 presents a generic representation of the VSI control system. The energy resource (ER) typically consists of sources such as photovoltaic panels (PV) [
6], battery energy storage systems (BESS) [
7], or wind energy systems (WES) [
8]. The inverter converts the ER’s DC voltage into AC and is connected through an LC filter to attenuate high-frequency harmonics. An isolation transformer is used to connect to the point of coupling (PC), facilitating the connection to the microgrid or local loads. This system is equipped with sensors to measure the voltages and currents required for the VSI controller. The control objective of the VSI is to achieve reference tracking of the LC filter’s output voltage with robustness and low distortion. The control action is sent to a pulse-width modulation (PWM) to generate the inverter’s triggering pulses [
9,
10].
The voltage control of the LC filter requires advanced strategies compared to current control in grid-connected converters [
9]. Typically, proportional-integral (PI) cascaded control strategies are employed [
11,
12]. These strategies have the advantage of imposing restrictions on the converter current by imposing limits on its reference; however, they result in limited dynamic performance [
13]. Multiple-input multiple-output (MIMO) control strategies have been proposed [
12] for VSI control. Nevertheless, these approaches often preserve the cascaded control structure. State feedback control with disturbance compensation has also been proposed [
14], satisfying the dynamic performance objectives. However, this strategy does not allow for imposing the converter’s physical constraint. The control of VSIs can be formulated using Model Predictive Control (MPC) to achieve a dynamic performance consistent with MIMO optimal control when operational constraints are not violated. Furthermore, MPC offers the distinctive advantage of directly incorporating operational and physical constraints into the control design process [
15], effectively overcoming the performance limitations of hierarchical control structures. This topic has gained significant attention in recent years, prompting researchers to propose various MPC strategies for VSIs [
16,
17,
18]. In [
16], an implicit MPC is proposed, using a custom active set method to solve the optimization problem. The estimated computational complexity of the algorithm is five times lower than explicit MPC formulations, but only for a prediction horizon of one, and only simulation results are presented. In [
18], simulation results using MATLAB / Simulink show the use of finite control set model predictive control (FCS-MPC) with horizon one for voltage control of VSIs in a droop-controlled standalone AC microgrid. None of the two previous works incorporate integration for voltage regulation. In [
19], an FCS-MPC strategy is proposed again with a prediction horizon of one, but with delay compensation, incorporating an observer that provides integration to the control. This mitigates the effects of uncertainties in voltage regulation. Experimental results obtained in a laboratory setup validate the proposal. However, tuning the bandwidth of an FCS-MPC controlled system is not possible; it has stringent requirements on sampling time and produces a spread switching harmonics spectra, which is undesirable.
In general, the MPC strategy can be formulated as a quadratic programming (QP) problem, minimizing a quadratic cost function subject to linear constraints [
20,
21]. Several solvers are available for QP problems, such as MOSEK [
22], GUROBI [
23], ECOS [
24], and OSQP [
25]. Proper selection of the QP solver is crucial to meet the time requirements for fast dynamic systems. In [
25], the authors present a benchmark comparing OSQP with MOSEK, GUROBI, and ECOS. This work shows that the OSQP solver, based on the alternating direction method of multipliers (ADMM), has fast response times and reliable performance compared to other alternatives. Moreover, it is open-source and suitable for embedded implementations. Additionally, other implementations of ADMM have been extensively studied for power electronic systems applications [
26,
27,
28].
This work introduces an MPC for the control of a voltage source inverter. The proposed algorithm is formulated based on dynamic performance criteria and incorporates integral action to mitigate unmodeled errors and system disturbances. The MPC is designed as a QP problem, where the predictive dynamic model is included as a linear equality constraint and physical and operational constraints are expressed as linear inequalities. MATLAB simulations demonstrate the superior performance of the proposed approach compared to conventional hierarchical PI control. The optimization problem is solved using the OSQP algorithm, achieving real-time execution with an average computation time of approximately using the MicroLabox controller of dSPACE, confirming its suitability for microgrid applications.
2. Materials and Methods
Figure 2 presents the schematic of the voltage source inverter connected to the grid and the voltage control system examined in this paper. To focus exclusively on voltage control, the grid interaction is excluded from this study, and the inverter is connected to a local resistive load. The controller processes measurements of the output voltage, filter current, and output current, converting them into the
reference frame. These
variables are subsequently used to formulate a quadratic programming (QP) problem. The optimal control problem is solved using the OSQP solver with a receding horizon approach. The resulting control actions are then transformed back into the
reference frame and applied using PWM modulation. The parameters of the laboratory experimental setup used in this study are summarized in
Table 1.
Figure 3 shows the experimental setup used to evaluate the proposed MPC control for the voltage source inverter (VSI). In this setup, the energy resource (ER) is emulated using a Chroma 62060 regenerative DC power supply, which provides the necessary DC-link voltage for a Semikron three-phase inverter. An LC filter is implemented to attenuate high-frequency harmonics in the three-phase voltage (
) and produce a smooth output capacitor voltage (
). The VSI configuration includes an output transformer, modeled as an unknown series impedance for control purposes, that is connected to a star-connected resistor bank with a resistance of 47
per phase. Furthermore, a star-connected resistor bank of 23
is connected in parallel through a breaker, allowing the introduction of a load disturbance into the system. Filter currents, output voltages, and output currents are measured using custom-designed sensor boards. The dSPACE MicroLabBox acquires these measurements via its analog-to-digital (ADC) channels for control purposes.
3. Voltage Source Inverter Model
This section provides a brief description of the dynamic model of the VSI and the filter used in the experimental setup for this study. The dynamic model of the filter is expressed in the
synchronous reference frame by applying the Clarke and Park transformations (
1) and (
2):
In (
2), the angle
is determined by integrating the reference frequency of capacitor voltage (
). The resulting dynamic model of the LC filter is described by the following equations [
14,
26]:
where
are the LC filter parameters,
is the current vector at the inductor,
is the inverter modulated voltage vector, and
is the output current. Equation (
3) can be expressed in a continuous state-space model, where the voltage and current are separated into their real and imaginary components:
The system of Equation (
4) can be expressed in its compact form as follows:
From (
5), the system’s discrete state-space representation is derived using a sampling period
, as outlined in [
14,
26]:
where
The discrete-time model in (
6) serves as the foundation for constructing the prediction model required for MPC control. This work uses the multivariable frequency response of the model in (
6) to establish design criteria for the closed-loop control.
Figure 4 illustrates the eigenvalues that define the bandwidth of the open-loop system. Although the model is stable, it exhibits resonance points near 4500 rad/s and 5000 rad/s. Therefore, the control design must ensure robustness to effectively mitigate these oscillations at the resonant frequency. Moreover, it is essential to impose current constraints considering the nominal current of the VSI’s power semiconductors and ensure a feasible modulation voltage for safe operation. The voltage magnitude constraints at the converter output, which serves as the input to the LC filter, along with the system’s current constraints, are used to formulate the MPC optimization problem. The MPC formulation requires that the constraints be expressed as linear inequalities using the QP approach [
15,
21]. However, controlling the VSI in
coordinates introduces specific challenges. To overcome these issues, this work adopts the approximations proposed in [
29], using polygonal restrictions to the modulated voltage and current restrictions. To ensure the operation of the current within the nominal range, it is crucial to limit the output current of the converter (
) within a circular boundary of radius
, where
is the nominal current of the inverter. As discussed previously, these constraints must be reformulated as linear inequalities. In this study, this is achieved by approximating the circle with a regular dodecagon, as depicted in
Figure 5. The current generation capacity accounts for 95.5% of the total circumference, with the remainder sacrificed due to the approximation. This strategy ensures rapid and robust control and maintains safe operation within the limits of the semiconductor. However, it involves a trade-off between the current restriction design’s precision and the optimization solver’s computational cost. The current constraints
shown in
Figure 5 can be expressed as inequality constraints by utilizing trigonometric identities, as follows:
where the vectors and matrices are given by the following:
In (
8), the current constraints are represented using a constant matrix (
) and a vector parameterized by
, allowing generalization for various VSI generation capacities.
The voltage actuation, on the other hand, is achieved using space vector pulse width modulation (SV-PWM). This technique is widely employed in power electronics and is readily implemented in digital signal processors. The objective of the SV-PWM modulator is to generate a pulsed voltage with the desired average value, ensuring constant switching frequency and optimal utilization of the DC bus voltage. SV-PWM achieves approximately 15% greater utilization of the DC bus voltage compared to sinusoidal PWM techniques [
30]. When the Clarke transformation is applied to all modulated inverter voltages,
, these voltages are constrained within the hexagon defined by the six active vectors of the inverter, as illustrated in
Figure 6. These constraints can be formulated as constant linear inequalities in the
frame. However, the control of the inverter with an LC filter is performed in the
frame, requiring the rotation of these constraints. This results in
-dependent, time-varying constraints [
29], which can be expressed in the
frame but involve a high computational cost. To avoid this cost, the voltage is limited to the circle inscribed within the hexagon, approximated using the same method applied to the filter current, i.e., with a dodecagon in
coordinates, as illustrated in
Figure 6. These voltage constraints can be expressed as inequality constraints in
using (
10).
where the vectors and matrices are given by the following:
In (
10), the modulated voltage constraints are represented using a constant matrix (
) and a vector parameterized by
, allowing for generalization across VSIs with different DC-link voltages. The following sections detail the control design based on the model (
6) and describe how the constraints in (
8) and (
10) are incorporated into the proposed MPC strategy.
4. Optimal Control Problem with Reference Tracking of the VSI Output Voltage
This section introduces reference tracking for the capacitor voltage magnitude using the linear quadratic regulator with integral action (LQI) method [
31]. The integral action aims to reject the unmodeled errors and the disturbances in the system described in (
6). To achieve this, newly expanded states are introduced to include the integral of the desired tracking error. The dynamic model of the augmented estates is given by the following:
where
are the expanded states and
is the voltage reference. Using (
12) and treating the output current (
) as an unmeasured disturbance, the model in (
6) is expanded as follows:
where the augmented state is
, and the matrices of the augmented system are as follows:
The control feedback matrix is obtained by solving the following optimization problem:
where
are weighting matrices that define the desired closed-loop performance of the system. Limiting the closed-loop system’s bandwidth is crucial to achieving a robust design and mitigating system resonances. Conversely, ensuring a sufficiently high bandwidth is essential for enhancing the dynamic performance of the control loop. This trade-off is addressed by adjusting the values of
and
. Following the methodology proposed in [
32], the matrices are adjusted as
and
. Consequently, the control design is simplified to tuning the parameter
to achieve the desired closed-loop bandwidth. The LQI control law is given by the following:
with
the optimal gain matrix, and
the solution to the Riccati, and the closed-loop system transition matrix is given by the following:
Figure 7 illustrates the multivariable frequency response of the closed-loop system with the parameter
. This design criterion ensures the damping of critical frequencies near 4500 rad/s and 5000 rad/s, and cero db gain at dc, i.e., achieving reference tracking at steady state. However, it is essential to reformulate this problem as a constrained QP optimization problem to incorporate the system constraints described in (
8) and (
10). The next section introduces the MPC framework to address this requirement. This leads to a constrained MPC formulation with explicit integration [
33].
5. Model-Based Predictive Control of the VSI
The model in (
6) and the inequality constraints in (
8) and (
10) are used to formulate the control algorithm as a quadratic programming (QP) problem, based on the following quadratic cost function [
33]:
where
and
are the same weighting matrices for the state and input defined of (
15), and
is the solution of the discrete-time Riccati equation associated with the optimal control problem. This criterion ensures system stability while maintaining the same dynamic response as the LQI when the constraints are not active. The prediction horizon is
N, and
represent deviation variables around de desired steady-state operating point,
The steady-state operating point
is computed as follows:
The state and input constraints are given by the following:
where
, and (24) and (25) represent the states and inputs constraints using the transformations (
20) and (21). The control action is computed by solving the optimization problem and using a receding horizon scheme (RHC) at time
t. This approach accelerates the steady state convergence of the system by forwarding the steady state operating point, using the references and known disturbances, improving the system’s time response. However, when current constraints are active, the integral of the error between the voltage and its references becomes an open integrator, leading to numerical problems in the MPC control. To address this challenge, this work adopts the incremental formulation proposed in [
34].
6. Results
This section presents the results of controlling a VSI using the proposed strategy detailed in
Section 5. Specifically, the tests assess the performance of the MPC controller, designed with a prediction horizon
, derived from the system’s dynamic model and extended with integral action [
34], in achieving offset-free voltage reference tracking. Additionally, the analysis evaluates the system’s compliance with operational and physical limitations, which are incorporated into the MPC formulation as linear constraints. The proposed approach is first tested through MATLAB simulations to evaluate its functionality. Finally, experimental results are presented to validate the proposed method.
To evaluate its performance, a simulation comparison is conducted with a conventional cascaded PI control strategy presented in [
36]. The system parameters used in this work are summarized in
Table 1, and correspond to the experimental setup in the electronic power laboratory discussed in
Section 2.
6.1. Simulation Results
The time-response simulations are performed in MATLAB.
Figure 8 presents the simulation results in the
reference frame, with the hierarchical control response based on PIs shown on the left and the response of the proposed MPC strategy displayed on the right. Initially, the VSI supplies a resistive load of
with a reference voltage of
. Both control strategies achieve offset-free behavior due to the integral action. However, the MPC approach achieves steady-state operation faster than the PI-based approach, demonstrating improved settling time. At
, the resistive load is increased to
to evaluate the system’s response to load changes when no constraints are active. The MPC response is almost instantaneous, attributed to the feed-forward compensation of the measured disturbance,
.
At
, the load resistance is changed to
to evaluate compliance with the current limitation depicted in
Figure 5. The MPC controller effectively enforces the steady-state current limit of
by reducing the modulated voltage (
). Additionally, the MPC demonstrates improved settling time compared to the PI controllers. While transient responses briefly exceed the limits, the PI controllers exhibit significantly higher overshoot and are unable to restrict the load current effectively.
6.2. Experimental Results
This section presents the VSI control of the experimental setup illustrated in
Figure 3. The MPC is formulated as a QP problem, as described in
Section 5, and implemented in C code using the OSQP solver [
25,
37]. The RHC computes the MPC control input, which is transformed back to
coordinates (
). The inverter pulses are generated using the space vector pulse-width modulator (SVPWM) in the dSPACE system. The human–machine interface (HMI) displays the voltage magnitude, filter current, output current, and execution time of the MPC algorithm in the ControlDesk software, enabling the evaluation of the VSI’s dynamic performance and computational cost.
This work evaluates the performance of the OSQP solver under various important operating conditions. Specifically, it focuses on voltage reference tracking and the activation of constraints for modulated voltage and filter current. In all cases, the iterative computation of voltage actuation is performed with 10 iterations, allowing the OSQP solver to achieve the solution in an average time of s, demonstrating its suitability for MPC implementation in VSI control with the target sampling time of s. For simplicity in the experimental tests, the steady-state values in the MPC algorithm design are set to zero, i.e., and . Although this decision slows the system’s convergence to a steady state, offset-free performance is ensured by the integral action included in the control design.
6.3. Voltage Magnitude Reference Tracking
Figure 9 illustrates the filter current, output current, and capacitor voltage in
coordinates, highlighting the VSI’s voltage tracking response to the capacitor voltage reference. The modulated voltage and current constraints are represented by dashed lines. At
s, a step voltage reference is applied, resulting in an output voltage of
. The MPC controller successfully tracks the desired reference voltage, demonstrating the fast response of the proposed control strategy.
6.4. Modulated Voltage Constraints
Figure 10 illustrates the VSI transient response under active modulated voltage constraints. The voltage amplitude constraint is fixed to
and originally the system operates in the unconstrained region with a reference of
. At
s; the voltage reference is changed to
exceeding the specified restriction. In this case, the filter current and modulated voltage are constrained to ensure compliance with the imposed limits, even when the reference signal exceeds the defined limit. The experimental results show that the modulated voltage remains within the specified limits enforced by the MPC control strategy.
6.5. Filter Current Restriction
Figure 11 illustrates the VSI response when current limit constraints are activated. Initially, the VSI operates with an output voltage of
, supplying a load resistance of
and a current limit of
, i.e., in unconstrained operation mode. At
, a load breaker is closed, connecting an additional bank of
load resistances in parallel, activating the current limit. During the transient response, the current constraint is briefly exceeded due to large output current disturbances. The algorithm responds by reducing the output voltage, albeit at a limited rate, resulting in a transient overcurrent. However, the MPC controller quickly adjusts the modulated voltage to ensure that the output current remains within the predefined limit of
in steady state, as set by the current constraints.
7. Discussion
Advancements in computational resources have enabled the application of MPC in systems requiring high dynamic performance, such as VSI control. Unlike conventional control strategies, MPC can predict system behavior and incorporate operational constraints directly into control design. In this context, the proposed MPC computes the optimal control action to achieve the voltage magnitude reference while considering filter current and voltage modulation constraints. Additionally, the method leverages an augmented system to incorporate integral action, improving steady-state accuracy, and utilizes the system’s steady-state behavior to enhance the transient response, ensuring faster convergence.
This article presents an offset-free MPC for the VSI using the OSQP solver, which efficiently solves the resulting QP problem. The computational cost is evaluated on the dSPACE MicroLabBox platform, demonstrating the feasibility of this approach via the condensed problem formulation. The proposed methodology is applicable to voltage control in DERs within microgrids, meeting the growing demand for advanced control strategies in modern decentralized power systems. This control approach could be extended to higher-level control loops in microgrids [
38], such as secondary control, to achieve reference tracking of voltage and operating frequency while also incorporating operational constraints.