Simple Explicit Solution of Finite Control Set Model Predictive Control for Cascaded H-Bridge Inverters

In multilevel converters, finite control set model predictive control (MPC) suffers from high computational costs. This article proposes a simple method to reduce the computational burden by solving the equivalent unconstrained continuous control problem, by constraining the solution, and thus by searching the nearest feasible voltage vector. The proposed technique requires a few simple computations that do not depend on the number of levels. An analysis of the computational complexity of the proposed technique is presented and comparisons with other methodologies are discussed. The proposed technique was implemented on a field programmable gate array (FPGA) and tested on a cascaded H-bridge multilevel static synchronous compensator, evaluating the execution time and verifying the validity of the approach.

Abstract-In multilevel converters, finite control set model predictive control (MPC) suffers from high computational costs.This article proposes a simple method to reduce the computational burden by solving the equivalent unconstrained continuous control problem, by constraining the solution, and thus by searching the nearest feasible voltage vector.The proposed technique requires a few simple computations that do not depend on the number of levels.An analysis of the computational complexity of the proposed technique is presented and comparisons with other methodologies are discussed.The proposed technique was implemented on a field programmable gate array (FPGA) and tested on a cascaded H-bridge multilevel static synchronous compensator, evaluating the execution time and verifying the validity of the approach.Index Terms-Model predictive control (MPC), multilevel converter, static compensator.

I. INTRODUCTION
D URING the last decade, model predictive control (MPC)   has become a popular control technique for power converters.The main idea of MPC is to formulate the control problem as an optimization problem and the control action is computed by minimizing the error between the reference and the predicted state variables for different future instants.A dynamical model of the system is employed to compute the predictions and the optimum problem can handle the physical constraints of the system.The continuous control set MPC (CCS-MPC) or modulated MPC (indirect MPC) computes a continuous voltage vector that is modulated to synthesize the switching signals [1], [2].The finite control set MPC (FCS-MPC or direct MPC), instead, is formulated as a discrete optimization problem by considering the discrete nature of the switches, which can only be turned ON and OFF.The consequence of directly controlling the switching state is a fast dynamic response, which makes a modulation algorithm unnecessary.The most straightforward way to implement the FCS-MPC is to compute predictions of the output variable for every possible switching pattern and compute the related cost to find the best control action.The main disadvantage of this strategy is its large number of computations, which grows exponentially when the converter number of levels increases.Many works can be found in the literature to reduce the computational burden of the FCS-MPC algorithm for cascaded H-bridge (CHB) inverters.A simple approach consists of searching for the optimum input in a subset of all the possible combinations, as in [3], [4], [5], and [6].For example, the manuscript [3] limits the search set to the vectors that are nearest to the last applied vector, reducing the number of calculations to only seven predictions.It leads to a suboptimal solution, which is effective in the steady state but negatively affects the transient performance.
Other approaches explicitly use the dynamical model of the converter without solving an optimization problem [7], [8].
By contrast, model-free predictive control avoids using a nominal model [9].It uses past data samples to make predictions of future states, creating a data-driven controller that improves the robustness to parametric variations.However, the optimization problem is addressed by limiting the search space, leading to a suboptimal result.
The sphere decoding algorithm was successfully investigated by the authors in [10], [11], and [12], reducing the number of computations when using multiple prediction horizons, and it is referred to as multistep or long-horizon FCS-MPC.One of the major problems of this algorithm is the choice of the initial radius, which strongly affects the computational load during fast transients.Moreover, the computational improvement relies on the fact that the search space is limited to the vectors adjacent to the previous control input, implying a suboptimal solution.
Despite the improvements when using multiple prediction horizons in motor drives [13], [14], many applications employ the FCS-MPC formulation with one prediction horizon.In grid-tied inverters, for instance, the iterative predictions of the output variable would rely on the prediction of the grid voltage, which is generally not feasible and leads to inaccuracy.The authors in [15], [16], and [17] applied FCS-MPC to a CHB static synchronous compensator (CHB-STATCOM), dividing the overall optimization problem into subproblems, strongly reducing the total computational burden.Zhang et al. [15] individually compute the currents and voltages optimization subproblems, reducing the computational burden from exponential to polynomial level.Zhang et al. [18] further improved the current optimization, proposing an algorithm with linear complexity.The authors in [19], [20], [21], and [22] proposed machine learning techniques to speed up the online implementation of the control.However, the obtained control low is a suboptimal solution.
In this work, an algorithm for finding the global optimal solution of the current control problem of FCS-MPC is presented.The main contribution of this approach is that it allows computing the optimal switching vector with a few simple mathematical operations regardless of the number of levels, thus overcoming the existing methodologies.

II. CHB INVERTER MODEL
Fig. 1 shows the schematic diagram of the considered CHB inverter connected to a general RL load and a three-phase voltage source.Depending on the application, this schematic can represent a grid-tied inverter connected to the grid through a filter inductor with its internal resistance, such as an inverter connected to a motor, where the voltage sources represent the electromotive forces [23].
The discretized dynamic equations of the currents, in αβ coordinates, are as follows: where i α,β is the current vector, v s(α,β) is the voltage source vector, v α,β is the voltage vector at the inverter terminals, R and L are resistance and inductance of the load, considered balanced, and T s is the sampling period.The inverter voltage can be expressed as v α,β (k) = S α,β (k)V dc , where V dc is the nominal dc-link voltage of each H-bridge and S α,β (k) is the switching vector at the time k, which is a discrete variable corresponding to the control input applied to the inverter.Equation (1) can be formulated as follows: where

III. PROPOSED METHOD
The MPC problem is expressed as follows: where Q and P are two weighting matrices and i ref α,β (k + 2) is the predicted reference value.The optimal switching vector must belong to V α,β , the set of all the vectors that the inverter can physically generate.In order to compute the control at time k + 1, the currents at time k + 2 must be computed.Iterating (2), the following formulation is obtained: with two unknowns: the control input at next time S α,β (k + 1), which is the variable to be computed, and the grid voltage at next time v s(α,β) (k + 1), which must be predicted.It is reasonable to approximate the grid voltage at time k + 1 as the voltage at time k rotated by one step at line frequency ω, i.e., With this assumption, the currents at time k + 2 are given as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
The current reference at time k + 2 can be predicted by i ref The proposed method aims to solve the discrete optimization problem in (3) solving, at first, the equivalent continuous problem; then, the discrete solution is found based on the continuous solution.Assuming the variables to be continuous, the problem in (3) becomes a quadratic programming problem since there is a quadratic cost function and the optimization variables must belong to a hexagonal space vector, which is defined by linear inequalities.This problem can be solved using standard quadratic programming.However, since several iterations could be needed, a simple way to solve this quadratic and constrained problem is proposed.
The overall problem is divided into three distinct steps.First, the equivalent continuous unconstrained problem is solved.Then, the unconstrained solution is projected into the space vector to find the continuous constrained solution.Finally, the discrete optimum solution is found based on the continuous constrained solution.

A. Continuous Unconstrained Problem
Let us call S c α,β the continuous unconstrained optimum switching vector.The minimum problem of the MPC in (3) becomes as follows: where S α,β is the optimization variable and i α,β (k + 2) is predicted by using (5).The solution of ( 6) is simply given by computing the derivative of the cost function with respect to S α,β , and setting it to zero.In this discussion, the calculation of the derivative is omitted and just the result is given, that is as follows:

B. Continuous Constrained Problem
Once the optimal continuous unconstrained solution is computed, it is needed to compute S proj α,β , i.e., the projection of S c α,β into the hexagonal space of feasible solutions.The hexagonal space is a polytope described by six inequalities.Given n Hbridges per phase, the vertices of the polytope, by construction, are as follows: By simply computing the equations of the lines passing through two consecutive vertices, it is possible to obtain the constraints of the hexagon, shown in Fig. 2. Given m = √ 3 and q = 4n/ √ 3, the constraints are as follows: where S α and S β are continuous points on the α and β axes, respectively.If one of these inequalities is not satisfied for the computed solution S c α,β , it is necessary to identify in which region outside the hexagon the point lays.Once the region is determined, the constrained solution is computed by projecting the point on the violated constraint, i.e., computing the point on the violated constraint that minimizes the distance between the solution and the constraint.Let us refer to the violated constraint as S β = mS α + q, with m and q as in (9).This problem can be expressed as follows: where the matrix (B T Q B + P) is the quadratic term of the cost function.In general, it does not make sense to weigh the α coordinate differently from the β coordinate, and Q and P are diagonal matrices.Consequently, w 11 = w 22 and w 12 = w 21 = 0, so the level curves of the cost function are circles and it is possible to find the projection by simply applying the pointto-line projection formula.Indeed, with these assumptions, (10) becomes which leads to The solution S proj α is simply computed by setting the derivative with respect to S α to zero If the violated constraints are two, the projection is one of the vertices of the hexagon.The constraints that determine the regions are computed by substituting S c α and S c β with the vertices in (8) in the projection formulas in (13), in this way, the separation lines between the regions are found.
The constraints of the regions are the following, where m = −1/m and q = q/3: Fig. 3 shows the different regions outside the hexagonal space vector and underlines the constraints of the regions.The set V α,β of feasible points is computed by transforming in the α, β frame all the a, b, c switching vectors that the inverter can output.The figure also shows an example of a generic unconstrained solution S c α,β that lays outside the polytope.As evident, the level curves of the quadratic cost function are circles and the optimal constrained solution is the point related to the lower level curve, i.e., the projection S proj α,β of the point into the hexagon.Table I summarizes the projection rule.In the first column, the regions are listed and in the second one, the constraints that define the regions are shown where not( * ) means that the constraint is violated.The last column is related to the projection rule of the Fig. 3. Space vector with level curves for a n=10 CHB-inverter.

TABLE I PROJECTION RULE
different regions: the solution can be a projection on an edge or a vertex of the hexagon.

C. Discrete Problem
Due to the quadratic cost function, the optimal point must be one of the feasible points close to the continuous constrained solution S proj α,β .Since the searched point lies on a plane, the candidate points are four.To simplify the computations, the possible points S α,β are scaled as follows: Thanks to this scaling, the feasible points are equidistant and have integer values.The quadratic part of the cost function, with the previous assumptions, is given as follows: = ST where in these new variables, W weights differently in α and β directions and the relative level curves are ellipses.Since W is a diagonal matrix, the axis of the ellipses are aligned with α and β axes and, if all the integer values would be feasible points, it would be sufficient to round the continuous solution Sc α,β to obtain the optimal point.However, only two of the four points around Sc α,β are feasible by construction.Once the rounded point is computed, it is necessary to verify if it is a feasible point.If it is not, the two feasible points around the continuous solution are evaluated.The distances between them and the continuous solution, weighted by W, are computed and the closest one is the solution of the discrete optimization.Fig. 4 shows an example of a continuous solution with the four points around it.The rounded solution, in the example, is not a feasible point and, as underlined by the level curves, the optimum point is (−26;0).The flow chart in Fig. 5 summarizes the overall procedure.

IV. COMPUTATIONAL ANALYSIS OF THE PROPOSED ALGORITHM
The first part of the algorithm in Section III-A requires the computation of (7), which can be expressed as follows:  In order to compute the constrained solution in Section III-B, the constraints in (9) must be evaluated, which requires four multiplications, four sums, and six inequality operators.If one of them is violated, the projection must be computed and one if-than-else is needed.In order to identify the region outside the hexagon, the evaluation of constraints in ( 14) requires four multiplications, four sums, and six inequality operators.The projection rule in Table I requires 12 comparisons and the most involved projection rule is in (13), which requires six online multiplications and sums.The total computations of this phase are 14 multiplications, 14 sums, and 13 comparisons.
In the discretization of the continuous solution in Section III-C, the scaling operation in (15), and the subsequent inverse scaling to compute Sproj α,β and S * α,β in the flow chart in Fig. 5 requires four multiplications.The odd/even α,β in Fig. 5 is obtained by taking the first bit of Sr α and Sr β , which is the mod 2 ( * ) operator.To compute the vector Sr α,β , the round( * ) operator is needed.The dir α,β in Fig. 5 is the vector containing Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE III COMPUTATIONAL BURDEN OF DIFFERENT APPROACHES
the sign bits of the result of two subtractions.Computing the feasible solutions Sf1 α,β and Sf2 α,β requires two sums, whereas the two distance operators d( * ) require four subtractions, eight multiplications, and two sums.The total operations are 12 multiplications, four sums, six subtractions (or six two's complement calculations and six sums), two rounding, and two comparisons.
Table II summarizes the basic operations needed by the overall procedure.In order to emphasize the computational advantages of the proposed technique, a comparison with two other methodologies is presented.Table III depicts the number of elementary operations for the proposed approach compared with "Fast MPC" in [15] and "B and B Approach" in [18].The "Fast MPC" algorithm reduces the computational burden from exponential to quadratic level.The "B and B Approach" leads to an algorithm of linear complexity with respect to n, overcoming the previous one.Finally, the proposed approach consists of less computations for every n > 1 and the number of operations is constant irrespective of n, further overcoming the other methodologies.

V. EXPERIMENTAL RESULTS FOR A FIVE-LEVEL CHB-STATCOM
In order to evaluate the time spent by the overall control technique and to test the validity of the proposed strategy, an experimental validation was carried out using a five-level CHB STATCOM built by DigiPower Ltd [24].Since the prediction of the grid voltage can cause inaccuracy and deterioration of the controller performance, the STATCOM MPC is commonly formulated with one prediction horizon.The control scheme comprises a reference generator for the reference direct current able to balance the overall capacitor voltage.

A. CHB-STATCOM Control Scheme
A PI regulator is employed to compute the reference direct current i ref d capable of stabilizing the average dc-link voltage v C to the nominal value v ref C .The MPC scheme follows the well-known partially stratified approach where the currents controller (CC) is followed by the voltages balancing controller, as in [15], [18], and [25].The reference currents are transformed into αand β frame, and the CC is computed as in Section III.The dc-link capacitor voltage dynamics is where v Cpi is the voltage on the ithcapacitor of phase p and s pi = {−1, 0, 1} is the related switching signal.The optimum vector S * α,β , computed by the CC, is transformed into S * a,b,c in a, b, c coordinates.Then, the voltage controller computes the switching signals in order to balance the dc-link capacitor voltages by solving the following optimization problem: where is the dc-link voltage vector, and s p = [s p1 ; . ..; s pn ] is the vector of the individual switching signals of phase p.The voltages balancing problem can be solved by employing the algorithms in [15], [18], and [25].Fig. 6 shows the diagram of the overall control scheme.

B. Experimental Setup
The experimental system in Fig. 7 is composed of two series-connected H-bridges per phase supplied by C = 0.9 mF dc-link capacitors.The three-phase system is connected to the grid through a 230/80 V isolation transformer and an L = 0.6 mH inductor.Table IV summarizes the main parameters of the hardware components and the controller.A master-slave converter architecture comprises a main control board with a 50 MHz Intel Cyclone V 5CEBA7F31C8 field programmable gate array (FPGA), one external I/O board capable of acquiring the grid voltage measurements, and six H-bridges with local signal conditioning circuits, used to sample the dc input voltages

TABLE IV PARAMETERS OF THE FIVE-LEVEL CHB-STATCOM
and the output currents.Each H-bridge equips a Texas Instrument TMS320 F28377SPTPT digital signal processor (DSP) responsible for acquiring the measurements and sending them to the master FPGA.Fig. 8 shows the schematic diagram of the experimental system.At the beginning of each sampling interval, the FPGA applies the switching signals computed during the  previous interval.Then, it starts an serial peripheral interface (SPI) communication process with the seven peripheral slaves to sample the three-phase grid voltage, the dc-link capacitors voltages, and the current flowing through the H-bridges, i.e., the three-phase current exchanged to the grid.Once the data are sampled, the FPGA starts the computation of the overall optimization algorithm and computes the optimal switching signals to be sent to the insulated-gate bipolar transistors (IGBTs) at the start of the next sampling interval.Table V summarizes the time and the resource utilization of the different parts of the implementation, i.e., SPI transmission, phase locked loop (PLL), PI of the reference direct current, CC, and voltages balance (VB).five-level three-phase CHB-STATCOM output voltage and currents when injecting +2 kVAR into the grid.
2) Capacitive Mode CHB-STATCOM: Similarly, the system was tested for the rated current in capacitive mode.Fig. 11(a) shows the output current underlying the dc-link balancing between the three phases.Fig. 11(b) highlights the balancing of the different dc-link capacitors in the same phase.Fig. 11(c) and (d) shows the step response and steady-state performance of the system when absorbing 2 kVAR from the grid.Table VI summarizes the harmonic components of the output current for both inductive and capacitive modes when following a 4 A rms current reference.

D. Robustness
The robustness of the proposed controller was studied by applying parametric variations in the nominal model used to compute the predictions.Since the aim of this work is to present     VII summarizes the total harmonic distortion of the three-phase output current for both cases and the nominal case, highlighting that the performance of the system is not degraded by these parametric variations.

E. Time Comparison With Existing Approaches
Fig. 13(a) shows the time spent with the proposed approach with different number of levels compared with the "B and B Approach" [18].The performance of the "Fast MPC" [15] is omitted since it quickly exceeds the 50 μs sampling time for n=3 and 100 μs for n=4.To make a fair comparison, the methods were implemented on the same FPGA platform with the same technological choices, i.e., the computations were fully implemented on the FPGA, and only fixed-point arithmetic operations were used (only the division in the "B and B Approach" in [18] was implemented with floating point arithmetic since the division is an ill-conditioned operation), the same degree of parallelism was employed by using 12 multipliers and accumulators.Fig. 13(a) also shows the time spent by the overall control in both cases, by including the time for samplings, computing the PLL, i ref d , and the voltage balancing procedure, which was implemented starting from [25].Even if the proposed current control requires constant time, the overall time increases due to the voltage balance.However, it is clear that, with the proposed approach, we can still control an inverter with n ≥ 20 within the 50 μs sampling interval, whereas the approach in [18] fails if n > 10, forcing the design of a larger sampling time that leads to performance degradation for both steady-state and transient operations.Fig. 13(b) highlights the time reduction of our approach, which shows a time reduction of 97% for the current control and 57% for the overall control for n = 10, which remains stable for n = 20.

VI. CONCLUSION
The article presented a simple explicit solution for FCS-MPC of a CHB converter.A computational cost analysis was carried out and the number of individual operations was computed.The proposed method was compared with two well-known approaches in the literature.The method was tested using a five-level CHB-STATCOM.The computational time for the control algorithm was determined, and the hardware resources utilization on FPGA was presented.The proposed method overcomes the existing ones since it computed the optimum solution by requiring a few simple operations that did not depend on the number of levels of the converter.
) where, unnumberd shown bottom of the next page.are 2 × 2 matrices computed offline.The online computations are the

Fig. 13 .
Fig. 13.Time comparison with "B and B Approach" in [18].(a) Execution times comparison for different levels.(b) Time reduction of the proposed approach for different levels.

TABLE V TIME
AND SPACE UTILIZATION FPGA IMPLEMENTATION

TABLE VI HARMONIC
COMPONENTS FOR 4 A RMS 50 HZ CURRENT

TABLE VII TOTAL
HARMONIC DISTORTION PARAMETRIC VARIATIONS