Continuous Set Model Predictive Control for Energy Management of Modular Multilevel Matrix Converters

—The Modular Multilevel Matrix Converter ( M 3 C ) is an AC to AC power converter composed of 9 arms and is proposed for high power applications such as motor drive and wind energy conversion systems. Energy Control of the M 3 C is achieved using 4 circulating currents, and is frequently divided into the Different Frequency Mode (DFM) and Equal Frequency Mode (EFM). EFM is more challenging, because of the larger capacitor voltage oscillations that can be produced. The control schemes are typically different for EFM/DFM operation and this further increases the complexity. In this paper, a Continuous-Control-Set Model Predictive Control (CCS-MPC) for energy management of the M 3 C is proposed. The control scheme is based on solving an equality constrained quadratic programming problem, where the optimal solution is analytically obtained. The result is a single and simple control law to obtain the circulating current references, where a good performance is achieved for both EFM and DFM. The proposed strategy is experimentally validated using a scaled-down M 3 C prototype composed of 27 power cells.


I. INTRODUCTION
Modular Multilevel Cascaded Converters (MMCC) were initially proposed for AC to DC applications, and are now being widely used in High Voltage Direct Current (HVDC) transmission systems [1], [2].MMCC topologies are characterised by cascade connections of Half-Bridge and/or Full-Bridge power cells [3], [4] to form "clusters".The way in which the power-cells and clusters are interconnected leads to many different MMCC topologies, for instance; the Modular Multilevel Converter (MMC or M 2 C) also known as the Marquardt Converter [1], [5], the Hexverter [6], [7], and the Modular Multilevel Matrix Converter (M 3 C).
Some of the benefits that have encouraged the use of MMCCs are their scalable and flexible architecture, robustness, fault tolerant capability, high efficiency, and high power quality [8].Due to these features, MMCCs have now been introduced into other applications.For example, they have been used in high-power converters such as Static Synchronous Compensators (STATCOM) [2], [9], [10], Wind Energy Conversion Systems (WECS) [11], [12], and motor drives [13].Among the different MMCCs, the M 3 C has been identified for use in AC-AC medium to high-power applications [4], [14], [15].According to [3], it is expected that the M 3 C could compete with high-power cyclo-converter-based drives.Moreover, the M3C topology can offer continuous operation even during complete arm faults, if appropriate circulating current definition and adjustment is implemented after the disconnection of the faulty arm [16], [17].
The M 3 C is composed of nine clusters containing a stack of series-connected full-bridge power-cells, as shown in Fig. 1.Maintaining correct operation of the M 3 C is challenging as the capacitor voltage of each power-cell is floating and the power-cells charge and discharge depending on the operating conditions.Additionally, large low-frequency oscillations occur naturally in the capacitor voltages at some operating points [18].The magnitude of these fluctuations can reach unacceptable values unless compensation methods are implemented.
Regulation of the floating capacitor voltages is therefore one of the most important control targets in the M 3 C.In [19], an overview of control strategies for the M 3 C is presented, and the M 3 C operation is categorised into two main modes to consider the floating capacitor voltage oscillations.The first mode, referred to as "Different Frequencies Mode" (DFM), is enabled when the input-port frequency is higher or lower (by a given threshold) than the output-port frequency.The second mode is referred to as "Equal Frequencies Mode" (EFM), and is enabled when the output-port frequency is close or equal to the input-port frequency.Capacitor voltage oscillations are relatively small in DFM; however, low frequency capacitor voltage fluctuations increase in magnitude as the M 3 C enters EFM operation [20], [21].Numerous control approaches based on nested control loops have been proposed in recent publications, mostly focused on DFM operation [19].Outer control loops are normally used to regulate the sum of the capacitor voltages in each cluster, which are commonly referred to as Cluster Capacitor Voltages (CCVs).Since the voltage oscillations are relatively small in DFM, only the average value of the CCVs is regulated using Proportional [22], or Proportional-Integral (PI) controllers [5], [11].Inner control loops regulate the circulating currents using Proportional controllers [5], [11], [22] and the inputoutput port currents are controlled using standard dq based approaches.
For EFM operation, more complicated control strategies are required [23].These strategies can be classified as feedforward or feedback, and are based on superimposing circulating currents and/or common-mode voltage to cancel out the most dominant oscillation frequency present in the CCVs.In feedforward EFM control, the average values of the CCVs are regulated using nested controllers, similar to DFM control, but an offline-obtained feedforward component is introduced into the control to mitigate the voltage oscillations [24].These approaches have some limitations, mainly based on the use of off-line calculated mitigation signals that cannot compensate non-linearities, uncertainties and changes in the operating conditions [19].
Consequently, feedback EFM control strategies have recently been proposed to provide precise regulation of the low-frequency oscillations under all operating conditions [19].For example, an EFM control scheme based on regulating the floating capacitor oscillations using multiple synchronous reference frames, rotating at the oscillation frequencies, is proposed in [18].The method uses PI controllers to define the magnitude of the circulating currents, and requires injection of a predefined common-mode voltage.
Since synchronous rotating dq frame controllers are used, and because circulating current references composed of several terms (which are not simple to calculate) are imposed along with the common-mode injection, filters and frequency estimators diminish the dynamic-response.
In [25], a branch current reallocation is proposed using a theoretical analysis to find an energy equilibrium of the M 3 C during EFM.Although this method ensures regulation without requiring common-mode voltage, the author specifies that this scheme is not suitable for equal magnitude voltages in the input and output ports.
Model Predictive Control (MPC) has been widely proposed and implemented within power electronics and drive systems, where the high-bandwidth response with straightforward integration of system non-linearities and operating constraints are its most attractive features [26], [27].At present, the majority of the proposed MPC strategies for MMMCs are aimed at regulating the M 2 C with Finite-Control Set MPC (FCS-MPC) schemes [27], [28].For the M3C, the search space has 3 9n possibilities, where n is the number of cells per arm [29].Therefore, it is hardly possible to evaluate the cost of each of these 3 9n combinations in real time.Since the search space increases dramatically when the number of cells increases, simplified algorithms with a limited selection of the switching states at each sampling period have been introduced to decrease the computational burden of the original FCS-MPC and allow feasible implementation [26]- [33].Unfortunately, the reduced search space does not ensure that the optimal solution of the global search space is included.
A smaller number of works have discussed Continuous-Control-Set MPC (CCS-MPC) for the control of MMCCs.In [34], an optimisation formulation for controlling the CCVs of the M 3 C is introduced .The strategy uses a three-stage optimisation scheme, where the common-mode voltage and the circulating current references are obtained for DFM and EFM operation.The first stage sets the common-mode voltage in accordance with the available CCVs in each cluster.The second stage defines optimal currents that regulate the CCV oscillations, defining nine independent current values based on the individual condition of each of the nine arms.To transform the solution obtained into a feasible current injection, the third stage includes equality constraints that determine the final four independent circulating currents.Although this method is interesting and useful, division of the circulating current problem into two stages means that the resultant values can be a sub-optimal solution of the initial optimisation problem.
More recently in [35], a CCS-MPC approach for controlling the circulating currents of the M3C is used.The most attractive feature of the scheme is that it allows saturation limiting of the arm currents by integrating the arm currents and CCV limits as constraints of the optimisation problem.However, energy balancing of the converter by controlling the capacitor voltages using CCS-MPC is not considered in [35].In [36], an MPC-based algorithm is used to balance the capacitor voltages.However the control system is validated using only a single arm, and the performance during critical operating points is not addressed.
To address the issues outlined above, a CCVs control scheme based on a Continuous Control Set Model Predictive Control (CCS-MPC) is introduced in this paper, where the output variables are the optimal circulating current references of the M 3 C.The CCS-MPC enables both DFM and EFM operation, using a simple control structure with a straightforward formulation based on a M 3 C state-space model.Using this methodology, optimal circulating current references are obtained from the modelling presented, allowing the fast dynamic response that is typical of MPC, with a fixed and pre-determined computational burden.
The contributions of this work are summarised as follows: • The M 3 C is a MIMO plant.The conventional approach to design a control system for M 3 C application is to consider the plant as several SISO systems where the cross-coupling between energy loops are just neglected.
In this paper a MIMO algorithm, based on a CCS-MPC, is proposed and thoroughly discussed for M 3 C applications.All the dynamics, including cross-couplings, are considered to design this optimal controller.• A single control expression (see Section III.B) obtained from the CCS-MPC replaces the eight energy management control loops typically utilised to obtain the circulating current references in conventional linear control (see [18], [35], [37].The magnitude, waveform shape, and phase sequences of the circulating currents are automatically adjusted by the control law obtained, and no additional reference frames nor phase angle estimations are required.• The control law obtained can be interpreted as a time variant MIMO proportional controller, with a MIMO gain that is calculated at each sampling period with a fixed computational burden.Therefore, the practical implementation of the strategy relies on the straightforward computation of a known analytical expression.• The strategy is based on an overall M 3 C model with transformed variables and, in contrast with the methodology proposed in [34], each transformed variable is related to a specific cost weight in the MPC formulation.Moreover, there is a direct relationship to the M3C critical operating modes with specific penalty costs.• Unlike previous works [11], [18], it is not necessary to change the fundamental structure of the control algorithm to operate during DFM or EFM.The proposed scheme is suitable for both DFM and EFM, requiring only one penalty cost in the formulation to be adjusted.• The strategy is validated experimentally with an M3C prototype composed of 27 power cells, and the results show successful and expected operation.Specifically, fast and stable responses are obtained during critical EFM operating scenarios.
The rest of this article is organised as follows: in Section II the model of the M3C is detailed.In Section III the proposed strategy is presented and analysed, in Section IV the overall control scheme is described.Section V presents results from a simulation study while Section VI presents experimental results and a detailed discussion.An appraisal of the proposed control methodology is presented in the Conclusions.

II. MODELING OF THE M 3 C
In this work, a state space model based on the formulation discussed in [7], [35], [38] is used.For controlling the arm currents, a Current-Voltage Dynamic Model is used whilst for regulating the stored energy, an Output-CCV-Power/Capacitor-Voltage Model is employed.
The modelling approach used in this paper is based on the αβ0ε transform discussed in [38] which is similar to the linear transformation presented in [20], [37], rearranged to obtain an state-space model formulation.The proposed αβ0ε transform is: where the currents i ε1 to i ε4 are circulating currents, and [i α1 , i β1 ,i α2 , i β2 ] are the αβ components of the input/output port currents (represented using the subscript 1 and 2 in this work).The matrix i b represents the arm currents depicted in Fig. 1.
The port voltage transformation at the rst and uvw sides uses the following αβ0 linear transform: For completeness, the model utilised for the proposed CCS-MPC, based on the transforms depicted in (1) (2), is briefly discussed below in subsections A-B.More detail is given in [35], [38].
1) Input/output port Current Modelling: If balanced grids are connected at the input/output ports with series inductances L uvw and L rst respectively, the following port current dynamics, in terms of the transformed variables,are obtained: where I 2 is a second order identity matrix and 0 2 is a 2x2 matrix filled with zeros.
Considering that the grid voltages are measurable, control of the port currents is implemented using vector control based on PI-controllers with anti-windup saturation schemes.The vector control strategies are orientated along synchronously rotating frames at the input/output [11], [39].

B. Output-Power/Capacitor-Voltage Model of the M3C
Control of the stored energy in the M3C is based on regulating the sum of the squares of the cluster capacitor voltages (SSCV) for each of the nine clusters [35].
Defining the auxiliary variable ψ Cbj = n r=1 (v j Cr ) 2 as the sum of the square of the capacitor voltages from the j-th cluster, it can be shown that the Transformed SSCV (T-SSCV) dynamics can be summarised as follows, where the terms on the right are the transformed instantaneous powers of the clusters.For steady state operation and assuming that all the capacitor voltages equal are obtained: where the energy term ψ C0 is related to the total stored energy in the capacitors of the M 3 C. On the other hand, the remaining eight transformed terms are equal to zero when the stored energy is correctly balanced in the M 3 C [11], [37].
The value of p 0 in ( 5) is related to the power at the rst and uvw ports as shown in (7): where are, respectively, the uvw and rst instantaneous powers, and v1 =v α1 +jv β1 ; v2 =v α2 +jv β2 ; ˙i1 =i α1 +ji β1 and ˙i2 =i α2 +ji β2 are the transformed input/output cluster voltages and currents in complex notation.

C. State-space model and analysis of the critical operating points
The transformed power vector, shown at the right-hand side of ( 5) can be obtained as a function of the αβ0ε components of the voltages and currents [18], [37], with the following representation: where and are the input matrix and disturbance vector respectively.Notice that both matrices depend on the input/output voltages, common-mode cluster voltages and input/output port currents of the M 3 C.As discussed below, the input/output port voltages, as well as the input/output port currents, can be assumed as known values at each sampling period.However, the common-mode voltage v 0 is a known degree of freedom, which can be used to mitigate low-frequency capacitor voltage oscillations.Operation 1) Steady State T-SSCV Oscillations in the M 3 C: To identify the operating points where low-frequency-high-amplitude oscillations in the T-SSCV could emerge, steady state operation is assumed.The following transformed port currents and voltages for symmetrical and balanced conditions are defined: Additionally, without loss of generality it is assumed that, where the frequency ω 0 is usually much higher than the input/output port frequencies (|ω . Note that the variable v 0 is related to the traditional definition of the M 3 C Common-mode Voltage (CMV) used in [18] by, .
Using ( 11)-( 12), an analytical derivation of the T-SSCV oscillating components is given in Appendix A. The results are shown in Table I, where the critical operating frequency ranges with their corresponding affected T-SSCV pair are listed.
Assuming that the M 3 C is connected to a balanced utility grid at the rst port, the operating point where ω 2 ≈0 is not feasible and no further analysis in this critical region is required.Additionally, the case where ω 1 ≈0 is not considered further as, in a typical electrical drive, the machine back emf is low at this operating point and consequently the low frequency oscillating power produced is small and relatively simple to compensate [11], [18].Therefore, the critical feasible operating points studied in this work are those where ω 1 ≈ ±ω 2 .
In summary, and depending on the phase-sequences utilised at the input/output ports, the critical frequency range affects either the {ψ Cε1 , ψ Cε2 } or {ψ Cε3 , ψ Cε4 } pair, as shown in Table I.
2) Steady State T-SSCV Oscillations During EFM: As demonstrated in Appendix A, during EFM and depending on the phase-sequences of the ports, only one pair of T-SSCV is affected with low-frequency oscillations. If on the other hand, if where the amplitudes P − 12 and P + 12 are defined in Appendix A. An attractive EFM scenario is when the input/output voltages have equal amplitudes (V 1 =V 2 ).In this case the amplitude of the low power oscillations (i.e.P + 12 and P − 12 ) can be obtained as a function of the input and output reactive powers as follows [23], where Q 1 and Q 2 are respectively the uvw and rst port reactive powers.For instance, if Q 1 ≈ −Q 2 the oscillations are eliminated when positive sequence operation is considered.This is the basis of the open-loop mitigation strategy presented in [23], which uses grid-side reactive power adjustment according to the load-side working power factor.However, the main problem with the strategy is that in open loop operation it does not necessarily ensure that the low frequency fluctuations are completely eliminated [18].In other words, it is not simple for an open loop algorithm to ensure that the voltages are equal and that the reactive power magnitudes are identical.

III. PROPOSED CONTROL SCHEME FOR REGULATING THE SSCV
The main novelty of the work reported here is the introduction of a balancing and mitigation scheme for the SSCV terms, based on a Continuous-Control-Set Model Predictive Control (CCS-MPC).Discussion of the strategy is divided into two sub-sections presented below.A discussion of the proposed CCS-MPC using the state equation of a general discretised system (i.e.x k+1 = Ax k + Bu k + d k ) is presented in sub-section (A).Sub-section (B) presents application of the proposed CCS-MPC for regulation of the T-SSCV.

A. Continuous-Control-Set Model Predictive Control (CCS-MPC)
In order to regulate the cluster balancing terms, a CCS-MPC with finite horizon 1 is proposed [40], [41].The fundamental structure of the MPC implemented is as follows Minimize where xk+1 is the predicted error state, ûk is the actuator signal, matrices A and B are established according to the plant of the controlled system, and d k is a measurable disturbance.R and Q are the cost matrices of the actuator and the state respectively, where it is strongly required that the former be a symmetric positive-definite matrix and the latter be symmetric and positive semi-definite [40], [41].This type of optimisation is known as an Equality Constrained Quadratic Programming problem [42], [43].
The original formulation shown in (17) can be simplified by substituting the equality constraint into the cost function, resulting in the following formulation [31], [44], where the subscript unc refers to "unconstrained".As discussed in [31], the value of ûunc can be calculated as : Equation ( 19) gives, respectively, the optimal unconstrained solution of the optimisation problem and the resultant cost matrix.This simplified formulation has the same solution as the problem depicted in (17), for the argument ûk .Therefore, computation of ( 19) is sufficient to define the optimal solution of (17).

B. Regulation of the Stored Energy Control Based on CCS-MPC
Based on the analysis in the previous sub-section, an optimal control strategy to regulate the SSCVs can be obtained.Firstly, to implement a CCS-MPC strategy for regulating the T-SSCVs, the following discretised form of (8) (obtained using the Forward Euler method) is introduced, where (9)] at the k-th instant, T s is the sampling period, and (10)] at the k-th instant.
As shown in (17), the following required state and actuator signal errors are established, where ψ refMPC Cαβε and i refMPC ε are, respectively, the reference signals from the MPC formulation, which are defined according to the required control goals [40], [41].For the control scheme presented, ψ refMPC Cαβε =0 8x1 is imposed as the required first goal.In addition, it is desirable to achieve this ideal condition by utilising the smallest circulating current magnitudes.In this regard, i refMPC ε =0 4x1 is defined as the second control goal.Using these goal definitions, the CCS-MPC scheme has the following structure, subject to (20) Using ( 18) and ( 19), the following optimal solution is obtained for (23), where k +R e is the resultant cost matrix, which changes at every k-th instant according to B d,k .
As shown in (24), the proposed control law can be interpreted as a closed loop scheme based on a P-controller with time variant MIMO gain K e,k , as illustrated in Fig. 2. The MIMO gain K e,k changes according to the input/output port voltages at every sampling period, and the specified cost weights of matrices Q e and R e .Similarly, d d,k can be seen as a feed forward term in the scheme that depends on the input/output port currents and voltages.
It should be noted that the implementation of the proposed control is straightforward.No states have to be saved, unlike the conventional linear methods shown in [13], [18], and the same calculations are done at every sampling period, regardless of the number of cells.Additionally, as described below, each penalty cost constant is a degree of freedom directly linked with each T-SSCV and circulating current, which gives a clear insight into which term requires regulation depending on the operating mode of the M 3 C.

1) Definition of Cost Matrices:
To accomplish suitable T-SSCVs regulation, it is fundamental to define proper weight values to the cost matrices R e and Q e according to the frequencies at the input and output ports.
For the R e matrix, which is related to the costs of the circulating currents, all its coefficients are set to the same value: R e = r e I 4 (25) This implies that each circulating current has the same cost error in (23) in the approach adopted.
In the case of the matrix Q e , the value of its coefficients are defined in as: Q e = Diag [q 0 , q 0 , q 0 , q 0 , q ε12 , q ε12 , q ε34 , q ε34 ] ( Where the symbol Diag denotes a diagonal matrix, i.e.Q eij =0 when i =j.As depicted in (26), the first four elements of the diagonal are equal to q 0 , giving the same cost to the αβ components of the vector ψ Cαβ0ε .Conversely, weights q ε12 and q ε34 are, respectively, related to the pairs ψ Cε1 -ψ Cε2 and ψ Cε3 -ψ Cε4 , which are critically affected during EFM as described Table I.
2) Operation during DFM: Recalling section II-C1, in DFM operation, no undesirable low frequency power/CVV components are present.Therefore, in this operating range there is no specific priority among the T-SSCV for their regulation, and, hence, Q e =q 0 I 8 .Additionally, in this operating zone, the CMV is set to zero (v 0 =0), since it is not required for proper regulation of the CCVs.
For this operation zone, the gain K e,k can be rewritten as, where it can be seen that the definition of ratio r e /q 0 is chosen high enough to ensure det(K e,k ) =0 in any case.Additionally, because of the presence of the inverse operation and the matrix products involving B d,k , gain matrix K e,k is highly nonlinear.From (27), it is important to remark that the ratio r e /q 0 directly defines the system bandwidth.Although the gain K e,k is a time dependant parameter, the tuning of the cost weight ratio gives an insight of the system response.For instance, if r e /q 0 is tuned to a lower value, the components of K e,k will have higher values and, therefore, the bandwidth is increased.On the contrary, if r e /q 0 is increased, the system dynamics will become slower.
3) Operation during EFM: In this range, depending on the phase sequence at the output port either pair ψ Cε1 -ψ Cε2 or pair ψ Cε3 -ψ Cε4 is affected.In this work, the uvw and rst ports are operating with positive-sequence balanced-voltages, and, therefore, only the pair ψ Cε3 and ψ Cε4 exhibit large lowfrequency oscillations in the system studied [see ( 14)-( 15) above] for EFM operation.However, the scheme presented is not limited to this case and is equally applicable for either phase sequence.
During this operating condition, the parameter r e remains fixed, q ε12 = q 0 , and q ε34 is increased.This new control goal implies that the CCS-MPC scheme regulates pair ψ Cε3 -ψ Cε4 in priority to the others, because their cost is greater in the optimisation function.The suitability of this approach has been validated by the good experimental performance obtained with this selection.
As reported in [18], [34], injection of a Common-mode Voltage (CMV) is fundamental for proper regulation of the CCVs during EFM operation.In this work, the CMV is a degree of freedom, which has to be predefined.Regarding the circulating currents, notice that the shape, phase, frequency, etc. of them do not have to be predefined, because they are automatically obtained from (24).Additionally, if the cost weight of the corresponding affected pair is increased during EFM, the circulating currents will adopt the shape of the CMV waveform to mitigate the low-frequency oscillations.
Regarding the definition of the CMV, this can follow several methodologies.Usually, a high frequency signal is preferred to avoid extra low-frequency components [18], [19].For instance in [34], the authors propose a CMV waveform that depends on the remaining CCV voltage of the M3C.In [18], a square waveform is used, where the fundamental and the third harmonic are used for the circulating current construction.In this work, a sinusoidal waveform, see (12), with twice the input port frequency is adopted.The amplitude of the CMV is specified offline according to the available CCV voltage.
Regarding the tuning of q ε34 , it can be adjusted online.For instance, using simulation work the elements of Q e , as a function of the M 3 C operating point, can be obtained and stored in a look-up table for online adjustment.However, online adjustment of Q e is considered outside the scope of this work and the interested reader is referred elsewhere [45].

IV. OVERALL CONTROL SYSTEM
The overall control scheme implemented for regulating the M3C is shown in Fig. 3.The approach is based on three control stages: Arm Current Control, Stored Energy Control, and Modulation with Local Balancing Control.

A. Arm Current Control
As shown in Fig. 3, the current references are obtained from the stored-energy control system.To regulate the input/output port currents, vector control schemes based on PI-controllers are implemented with a Synchronous Reference Frame (SRF) orientated with the corresponding grid voltage vector.The phase-angles of the grids are estimated using Phase-Locked Loop (PLL) schemes for both ports [46].
As shown in the upper left-side of Fig. 3, the d-axis current reference related to the rst port is the output signal of the the Total Energy control, and the q-axis current reference is a degree of freedom at the rst port.Regarding the uvw (load side) port, the dq-axis current references are regulated according to the load requirements (for example, a vector controlled induction machine).
Regulation of the circulating currents can be realised using P, PI or resonant controllers or other suitable controllers.For simplicity in this work, P-controllers, as shown in Fig 3 are employed [11], [22].Moreover, an additional inner CCS-MPC algorithm, such as that discussed in [35] could be utilised to regulate the circulating currents.

B. Stored Energy Control
The purpose of the Stored Energy Control is to regulate the SSCVs terms of the M 3 C.This target is subdivided into two sub-aims: Total Energy Control and Balancing-Mitigation Control.
The objective of the Total Energy Control is to regulate the transformed term ψ C0 to where v ref C is the capacitor voltage reference used for all power cells, and n is the number of power cells per cluster.
The plant of ψ C0 is defined by relations ( 5) and (7), Hence, for controlling ψ C0 , the grid-side converter is similar to an Active Front End (AFE) [46], and regulation of ψ C0 is very simple to realise using a PI-controller with an anti-windup scheme, whose output is the power component of the rst-port current i ref d2 .This is shown in the upper-left side of Fig. 3.The strategy for distributing and regulating the stored energy is the main contribution of this work and was extensively discussed in Section III-B.In Fig. 3, the scheme is represented in the bottom-left side as a simplified block, where the required input and resulting output signals are shown.

C. Modulation with Local Balancing Control
Local Balancing of the capacitor voltages for each cluster is accomplished by sorting the power cells according to their capacitor voltage magnitudes, and creating a priority list that changes its order according to the state of the output-power sign of each cluster.The strategy implemented is based on the work presented in [36].r ε -q 0 1e5 -5

V. SIMULATION RESULTS
In this section, a simulation model of a 27-cell M 3 C with two balanced grids was implemented in Plexim PLECS software.The system parameters are described in Table II.The control parameters are specified in Table III, where the control sampling time and carrier period were set to 160µs.

A. Steady state performance at different weight costs
In this section, several tests were performed in DFM and EFM in order to compare the performance of the scheme at different cost weight values.In DFM, the output port power is the same: 6.75kW/6.75KVAr at 183.7V RMS line voltage at both grid ports.Additionally, in DFM, five different output frequencies were tested: 10, 20, 30, 40 and 45 Hz.The cost weight q 0 is varied from 0.5 to 40, meanwhile r e is constant at 1e5.Fig. 4 illustrates the maximum CCV ripple (referred to as CVV ripple max.), peak value of T-CCV (T-CCV max.), maximum amplitude of the circulating currents and the maximum value of the arm currents for all the performed tests.Both the CVV ripple max.and the T-CCV max.are shown as percentages of 400V, which is the CVV reference value.Initially, it is observed that when the q 0 parameter is increased, the maximum amplitudes of the circulating and arm currents increase consistently for all the working frequencies.Although CCV ripple max.and T-CCV max.have relatively low magnitudes at q 0 =0.75, their magnitudes decrease even more as the weight is increased.However, since the maximum amplitudes of arm and circulating currents increase strongly at higher q 0 , the corresponding currents can be excessive in comparison with those obtained at the initial cost weight.Therefore, the value q 0 =0.75 is adopted as a good choice because the CCV maximum ripple is regulated within an acceptable margin with lower current amplitudes.
Although the maximum CCV ripple tends to decrease as the frequency is increased, at 45Hz the ripple of the CCVs behaves conversely with respect to the ripple value obtained at 40Hz.This behaviour is produced because of the small value of |ω 1 − ω 2 |; i.e. the low frequency energy terms of ( 14)-( 15) become dominant with respect to the others.It should be noted that the CMV is set to zero for all these results, and its impact is not measured in the analysis of DFM.
A similar study has been undertaken for EFM, at a single output frequency of 49.5Hz with positive sequence, for different CMV amplitudes.The nominal CMV is defined as a 100Hz sinusoidal waveform with an amplitude of 40V (10% of the CCV reference value).The results are shown in Fig. 5, where the same variables ( max.CCV ripple, max.T-CCV, peak circulating current and peak arm currents) are shown at different values of the CMV amplitude (100% corresponding to 40V).Additionally, q ε12 =q 0 =0.75, r e =1e5 and 10<q ε34 <170.From the results shown in Fig. 5, it can be seen that the arm current maximum tends to settle to (different) constant values for 100% and 80% CMV as the cost weight q ε34 is varied.For the 60% and 50% CMV values the arm current is still increasing when the maximum cost weight considered is reached.The CCV ripple max and T-CCV curves become more linear when the CMV is decreased.An interesting result is obtained for the CMV amplitudes of 100% and 80%, where the maximum T-CCV and CCV ripple max curves tend towards constant values.Finally, it can concluded that during EFM, the maximum values of all the studied variables are highly dependant on the CMV Fig. 4. DFM steady state performance at 10, 20, 30, 40, 45Hz at different weight cost q 0 .CCV ripple The operating conditions for both input output port were the same.Fig. 5. EFM steady state performance at 49.5Hz operation with different v 0 amplitudes and weight cost q ε34 .Weight q 0 =q ε12 =0.75 in all scenarios.amplitude, regardless of whether a high cost weight is used.For instance, to obtain 6% for the maximum CCV ripple, q ε34 has to be tuned at 35, 57,109, 169V −1 for CMV amplitudes of 100%, 80%, 60% and 50%, respectively.For these cost weights, the resultant arm peak currents are, respectively, 25.1A, 26.5A, 29A and 31.4A.Therefore, for CCV ripple mitigation purposes, if the CMV amplitude is sufficiently high, the increasing rate of the arm current amplitude with respect to q ε34 become less relevant, and a higher penalty cost does not necessarily imply a significant increase in current amplitudes.Conversely, at lower CMV values, the circulating current amplitudes tend to acquire a linear relationship with q ε34 , and the impact starts to be noticeable.In this range, tuning of the cost weight q ε34 is an important consideration in terms of the permitted maximum arm current.

B. EFM steady performance with different CMV waveforms
In this section, two different types of CMV with the same amplitude are compared in steady state operation: (a) Sinusoidal waveform, (b) Trapezoidal waveform.The output grid power is set to 6.76kW/0.45KVAr at 49.5Hz, the CMV amplitude is 40V at 100Hz for both waveforms, the CCV reference value is 400V, and both grid voltages are 183.7VRMS line.Additionally, q 0 =0.75, q ε12 =75, and r e =1e5.Figure 6 shows results for both cases, illustrating the CCVs and T-CCVs (as a % of 400V), the circulating and arm currents, and the CMV (as a % of 400V).As demonstrated, both cases exhibit good regulation of the CCV oscillations.The maximum ripple amplitudes are 5.3% and 4.5% for cases (a) and (b), respectively.This difference is also noticed in the arm currents where the maximum measured values are 22.15A and 21.65A for cases (a) and (b).A similar trend is seen in the circulating current.The reason why the CMV in (b) gives lower current and CCV amplitudes is related to the harmonic content of the trapezoidal shape.In this particular case, the fundamental has a value of 12.1%, with a peak value 20.1% higher than that of the sinusoidal form.Moreover, there are extra odd harmonics that have an impact in mitigating the low frequency terms of ( 14)-( 15).This can be confirmed by the circulating current waveform shown in (II.b),where it takes the trapezoidal form in comparison the that shown in (II.a).As aforementioned, this current shape is generated automatically by the proposed control scheme, no extra considerations have to be made in the scheme other than to define the waveform of of v 0 in (24).
Although the inclusion of trapezoidal or square shapes can enhance the regulation of the CCVs with lower arm currents, the sinusoidal waveform is preferred in this work.The main reason for this decision is based on the issue of regulating circulating currents with high harmonic content using PWM schemes.Non-sinusoidal waveforms cannot be faithfully reproduced without increasing the carrier frequency in the PWM scheme, which is not always desirable.

C. Dynamic ramp test in DFM operation
In order to verify the performance of the scheme during DFM, a start up ramp test is performed.At constant d-axis output port current, the frequency of the output port is linearly increased from 0Hz to 45Hz.The output port grid voltage is proportional to the output frequency, starting from 1V to 183.7V line voltage at 45Hz.The output port dq-axis currents are constant during the test, with the power reaching 6.75kW/0.9kVAr at 45Hz.The weight costs are r ε =1e5 and q 0 =5 during the whole test and the CCV reference value is set to 400V.Fig. 7 depicts the results obtained in the test.Initially, at 2s, the uvw port d-axis current is suddenly changed to 15A with f uvw =0Hz.Afterwards, at 2.5s, the frequency starts to increase at a constant rate until reaches 45Hz at 11.5s.Fig 7(a) depicts the CCVs (as a % of 400V), output port frequency f uvw , output port active and reactive power (P uvw and Q uvw , respectively as a % of 6.75kVA), circulating currents, arm currents, and dq-axis port currents during the whole test.Without losing generality, this behaviour emulates an electrical machine starting at a constant torque value.The CCVs ripple is below 5% and the arm currents exhibit a smooth increase according to the transition of the output port voltage/frequency.The output power also smoothly increases following the frequency/voltage rise in the output port, without any disturbance.
Figure 7(b) shows a 0.3s interval of the same test while the frequency is 0Hz.Specifically, it illustrates the CCVs, arm currents, input/output port currents, and circulating currents when the output port d-axis current suddenly changes to 15A.As illustrated, the CCVs exhibit small oscillations after the transient, which are directly linked with the pair ψ Cε1 -ψ Cε2 , as previously indicated in Table I and in (10).The arm and output port currents persist with DC components after the daxis step-change, as expected, with a stable a smooth response in the CCVs.The results demonstrate that at 0Hz with high torque and low power, the converter operates properly without any additional consideration than those specified for DFM applications.Therefore, it can be seen that the strategy presented is suitable for starting an electrical drive at constant torque from rest.

D. Dynamic balancing test
To observe the dynamic performance of the scheme at different cost weights, the CCVs are intentionally distributed within a ±20% spread of the nominal value.To achieve steady state operation with distributed CCV values, the T-SSCV reference signal ψ ref Cαβε , shown in Fig. 2, is set with the desired non-zero perturbations.Afterwards, at 0.1s, ψ ref Cαβε is suddenly changed to zero.The grid voltage at both ports is set to 183.7V, and the output port is operating at 25Hz with power of 6.76kW/0.9KVAr.The CCV reference value is set to 450V for the duration of the test.Figure 8 illustrates the CVVs, the circulating currents, the arm currents and dq-axis port currents at two different cost weights: (a) q 0 =0.75 and (b) q 0 =5.In Both cases, r ε =1e5.From the results, it is clear that case (b) has a faster response than case (a).This is because the ratio r e /q 0 is lower in case (b) and, therefore, the gain K e,k has a higher value as described in section III-B2.The higher gain gives a faster response, which requires a larger circulating current than case (a).For example, the transient studied produces an arm current peak of 21.5 in case (a) and of 29.7A in case (b).The input d-axis current, related to the Total Energy Control, has a small disturbance in case (b), which originates from the rapid change in the CCV values.The settling times are approximately 0.9s in case (a) and 0.2s in case (b).In case (a), the circulating current injection has a negligible influence on the arm current amplitudes which can be favourable to avoid hitting limits.

VI. EXPERIMENTAL VALIDATION
To validate the effectiveness of the control approach proposed, it has been applied experimentally to a 27-cell M 3 C prototype (see Fig. 9 and [35]).The prototype is equipped with a control platform composed of a Texas Instruments TMS320C6713 DSP board, three Actel A3P1000 FPGA based boards, and external interface boards for measurements and gating pulses.An Ametek CSW5550 Programmable Power Source is connected at the input (rst) port via series inductors (L rst =5mH).Similarly, an Ametek MX45 Programmable Power Source is connected via series inductors (L uvw =2.5mH) at the output (uvw) port.In both cases, the inductors were selected on the basis of what was available in the laboratory rather than through a design process.For EFM operation the  CMV is set to be a 150Hz sinusoid with an amplitude of 93V.In Tables III and II, the system and controller parameters are specified.
For the experimental work presented in this paper, the rst grid input frequency is fixed at 50Hz, and the uvw load port is also connected to a balanced grid, but with variable amplitude and frequency.The converter is pre-charged using an open loop scheme such as that described in [47].
A. Steady Operation Performance 1) Operation at Near Input Port Frequency: In this test, the grid frequency of the uvw port is set to 49.5Hz with positive sequence.The performance, considering three different values of the parameter q ε34 ∈ {5, 75, 150} is experimentally obtained.For this test, q 0 =5, and the output-port power references are 2.67kW and 446Var, with the input port being operated at unity power factor.The CCVs, Transformed CCVs (T-CCVs), circulating currents and arm currents for each q ε34 Fig. 10.Steady operation of the converter with output port grid frequency of 49.5Hz at different MPC weight values.(a) q ε34 =5, (b) q ε34 =75, and (c) q ε34 =150.value are depicted in Fig. 10.Additionally, the input and output port currents, together with the circulating currents, are shown for a shorter time span in Fig. 11.Additionally, results captured using an oscilloscope are shown in Fig. 12.
As depicted in Fig. 10, when q ε34 >5, lower oscillation amplitudes in the CCVs and T-CCVs are observed, but with an increment in the magnitude of the circulating currents.Although this attractive feature enables a simple regulation of the CCV mitigation, after reaching a given q ε34 gain level there is not a substantial difference in the CCV oscillation amplitudes.This is concluded by comparing the results obtained with q ε34 =75 and q ε34 =150 in Fig. 10, where the CCV peak to peak values are similar, but with an increment of ±1A in the circulating current amplitudes in the latter case.According to Fig. 11, the three phase port currents have negligible distortion for the three different penalty costs, confirming that the port and circulating currents are decoupled.The circulating currents have higher amplitudes in case (b) and (c) than case (a), where a fundamental component of 150Hz is clearly visible in the red trace.This 150Hz component is expected since the CMV and uvw frequencies are 150Hz and 49.5Hz respectively i.e. the control system is in EFM operation.Therefore, as discussed previously in Section IV and shown in Fig. 6, the currents automatically follow the CMV waveform.Finally, case (c) gives slightly higher amplitude circulating currents than case (b).In Fig. 12(a), oscilloscope traces of the port/arm currents and capacitor/output voltages are shown.The input and output currents have no noticeable distortion and they are not affected by the circulating currents.Fig. 12(b) shows that the capacitor voltages are well regulated without large low frequency oscillations.
Unless otherwise stated, in the rest of the experimental work the value of q ε34 = 75 is assumed 2) Steady Operation at 50Hz: In this case, the output uvw port frequency is set at 50Hz (i.e.ω 1 =ω 2 ).The power references at both ports have the same values as those used in the previous section.The results obtained for this test are shown in Fig. 13 and Fig. 14.The CCVs, T-CCVs, circulating currents and arm currents plots are shown in these graphics.
As depicted in the CCVs and T-CCVs (see Fig. 13) , a steady state DC error is produced.This deviation is due to the inherent behaviour of strategies based on CCS-MPC, where no integrator is implemented by the control law [41].Notwithstanding this drawback, the DC error is only 2% and it is considered negligible.It is worth mentioning that this error can be further reduced by increasing the gain q ε34 ; however, as concluded from the results shown in Fig. 13(b)-(c), there is a trade-off between the reduction of the CCV errors and the amplitude of the circulating current magnitudes.
In Fig. 14(a), the arm currents i b1 and i b4 as well as the input/output currents i r and i u are shown; additionally, the output cluster voltage v b4 , the capacitor voltages v 4 C1 and v 4 C2 are shown in Fig. 14(b).The waveforms depicted confirm the good performance of the strategy.The arm and port currents, together with the capacitor voltages maintain stable and well regulated, even though this is a critical operating point producing instability if uncompensated (see Table I).Using the proposed CCS-MPC, the large low frequency oscillations in ψ Cε3 and ψ Cε4 are avoided due to the MPC algorithm [see (24)], where the computed circulating currents are automatically defined with a straightforward procedure.
B. Dynamic Performance of the Strategy 1) Variable Output port Frequency at Constant Power Demand: In this test, the uvw port power is set to 2.67kW and 446Var and the corresponding frequency is changed continuously with the following pattern (see Fig. 15): initially, the output grid frequency is 45Hz before it increases with a constant slope of 3.5Hz/sec to 52Hz where it remains for one second.Subsequently, it decreases to 49.5Hz at a 2.5Hz/sec rate.The CMV is a 93V sinewave at 100Hz.The experimental results are depicted in Fig. 15 and Fig. 17.
In Fig. 15, the CCVs, T-CCVs, grid frequencies ω 1 and ω 2 , dq-axis input/output port currents, output cluster voltages and arm-currents are shown; additionally, the CCVs and T-CVVs are illustrated in per unit with a base of 400V.As illustrated in the behaviour of CCVs and T-CCVs, the oscillations in the capacitor voltages reach ripple magnitudes of only 3% of the nominal voltage.Moreover, the dq-axis input/output port currents are kept relatively constant during the entire test, and do not suffer significant disturbances.As expected, the injected circulating currents increase as the output port frequency approaches 50Hz operation (i.e.EFM), but the additional arm current amplitude compared to 45Hz operation is small.Fig. 16 depicts the rst/uvw and circulating currents for 60ms at  output currents are affected by the circulating currents which clearly have different frequency components at both operating points.Moreover, the circulating currents have relatively small amplitudes during most of this test; nevertheless, the regulation of the CCVs is good during the whole duration as shown in Fig. 15, with peak capacitor voltage oscillations well below 5% of the nominal value.In Fig. 17 (a)-(c), the arm currents i b1 and i b4 with input/output currents i r and i u are shown when the M 3 C is operating with output frequencies of 45Hz, 52Hz and 49.5Hz respectively.Additionally, in Fig. 17  In general, the behaviour of all system variables is stable during the whole test, with higher current demand during near input frequency operation.Moreover, further modifications to the control law of (24), when entering EFM, are not required, due to the automatic adjustment of the output signals.
2) Sudden reversal in Reactive Power Demand: In order to induce a close to critical operating point, the output port grid frequency is set to 49.9Hz and its power reference is set to 0kW/2.67kVar, while the power reference is set to 0kVar at the input port side.At t=0 seconds a sudden change in the output port power demand to 0kW/-2.67kVar is set, which induces a 180 • phase change in the power oscillations that induce low-frequency components in the affected T-SSCV pair.As discussed in appendix A, for positive sequence of the output voltages, the low frequency oscillations during EFM are dependant on |Q 1 + Q 2 | value [see (16)] Therefore, for operation close to EFM, this large step-change in the reactive power represents a large disturbance in the magnitude of P +  q ε34 =75.
As illustrated in Fig. 18, the low-frequency oscillations are mainly generated by the reactive power at the load side.Moreover, the sudden change implies an instant sign reversal of the voltage oscillations related to the {ψ Cε3 , ψ Cε4 } terms.As expected, prior to the sudden change in the power demand, the CCVs are balanced with a low frequency oscillation around 5%, which is related to the unfavourable critical operating point.As shown in the CCVs and T-CCVs the change in the oscillation phase angles is automatic and there is no transient increment of the CVVs oscillation amplitudes.Additionally, the transient responses of the CCVs and T-CCVs exhibit no undesirable oscillations after the reactive power step-change, which demonstrates the good performance of the proposed scheme during critical operating disturbances.In summary, this test shows the favourable response of the proposed strategy, even during challenging operating conditions, with a fast and stable performance.

VII. CONCLUSIONS
This work has presented a continuous-control-set model predictive control strategy for the stored energy management of a M 3 C, which includes equal frequencies operation mode.
The proposed strategy is based on the formulation of a equality constrained quadratic optimisation problem, where the corresponding analytical solution is obtained.This solution is computed at every sampling period with a fixed computation burden.The output signals of the proposed scheme are the reference of the circulating currents of the M 3 C.
An important and attractive feature of this strategy is that it can be used for near input frequency operation without any additional complexity or modifications to the control law obtained.An additional advantage of the controller, when compared with the published approaches based on linear controllers, is that it automatically adjusts the waveform shape, magnitude and phase of the circulating current required to regulate the energies at the critical operating points when the port frequencies are similar or equal.Therefore, it is not necessary to predefine the parameters of the circulating currents (eg.shape, frequency, phase,etc.)for mitigation purposes in the control algorithm.
When the M 3 C is operating during DFM, the required circulating currents are also obtained using the same expression of (24), to balance the ψ αβ terms [see (6)].Using the CCS-MPC, during DFM (or EFM) it is neither necessary to define the circulating current frequencies nor the sequences required to achieve the energy management.This is certainly an advantage when the CCS-MPC is compared to the conventional approaches based on linear components where the circulating current references to compensate the energies [ψ αβ ψ ε12 ψ ε34 ] are obtained from 8 energy control loops which have to be separately tuned and implemented to avoid coupling between them.Additionally,in the conventional approaches, the complexity is further increased considering that the circulating current references, required to balance the energy in the M 3 C, have to have several frequencies and positive/negative sequence components.
The proposed control law has been validated with experimental work considering steady state and transient scenarios, obtaining good results that confirm the advantages of the proposed approach.Notice that the TMS320C6713 control platform and the ACTEL FPGA utilised for this application, are relatively slow devices compared to more modern processors with much higher processing capabilities.However they are able to implement the proposed CCS-MPC algorithm to control an M3C with 27-cells, with a sample-time of 160µs, and utilising about 85%-90% of the processing time.This performance confirms the relatively low computer burden produced by the proposed CCS-MPC algorithm.

APPENDIX A STEADY STATE OSCILLATING COMPONENTS IN THE T-SSCV VARIABLES
According to the expression shown in (8), the steady operation of the M 3 C with balanced input/output port operation [as depicted in (11)] naturally induces undesirable oscillations in the capacitor voltages.Specifically, the origin of these oscillations is directly linked with the disturbance vector d C (t) defined in (10), which is exclusively composed of the input/output port voltages/currents and the common-mode voltage.Replacing the values established in (11) is the energy oscillation vector induced by the input/output port voltages and currents exclusively, with P 1 =V 1 I 1 , P 2 =V 2 I 2 , φ 1 =φ i1 +φ v1 and φ 2 =φ i2 +φ v2 .Additionally, the following complex relations define the remaining parameters: are the input/output port currents with synchronous reference frames oriented with the input/output port voltage phase, respectively.On the other hand, the T-SSCV oscillations related to the interaction between the common-mode voltage with the input/output port currents are described by, where P 01 =V 0 I 1 , P 02 =V 0 I 2 , φ + 01 =φ 0 +φ i1 , φ - 01 =φ 0 −φ i1 , φ + 02 =φ 0 +φ i2 , and φ - 02 =φ 0 −φ i1 .

A. Power factor incidence in Steady Operation
If lossless semiconductors and elements are considered, it can be assumed that p o =0, which implies Using ( 33) into (32), the following simplification is obtained: with k v =V 1 /V 2 as the port voltages ratio.

Fig. 2 .
Fig. 2. Block diagram scheme for the proposed control strategy based on CCS-MPC.For this application the MIMO gain K e,k is a 4x8 time variant matrix.

Fig. 3 .
Fig. 3. Overall control scheme of the M 3 C.The proposed scheme is located within the Stored Energy Control group, represented by the Balancing Control-MPC block.

Fig. 7 .
Fig. 7. Dynamic ramp test from 0Hz to 45Hz output port frequency at constant output port dq-axis current references.

Fig. 12 .
Fig. 12. Experimental results with constant power demand at 49.5Hz in the output port.(a)Arm currents i b1 , i b4 with input/ output currents ir and iu.(b) Cluster output voltage v b4 with capacitor voltages v 4 C1 and v 4 C2 .

Fig. 13 .
Fig.13.Steady operation of the converter with output port grid frequency of 50Hz with q ε34 =75.

Fig. 14 .Fig. 15 .
Fig. 14.Experimental results with constant power demand at 50Hz in the output port.(a)Arm currents i b1 , i b4 with input/ output currents ir and iu.(b) Cluster output voltage v b4 with capacitor voltages v 4 C1 and v 4 C2 .

Fig. 16 .
Fig. 16.Experimental results of variable output frequency with constant power demand.Input port, output port and circulating currents are shown at (a) 45Hz and (b) 52Hz.
(d), the output cluster voltage v b4 with the capacitor voltages v 4 C1 and v 4 C2 are shown.Notice that for the results shown in Fig.17, the port currents at either side have no additional distortion and the high frequency components of the circulating currents are not present at either port.

Fig. 17 .
Fig. 17.Experimental results of variable output frequency with constant power demand.Arm currents i b1 , i b4 with input/ output currents ir and iu are shown at specific operating frequencies (a)45HZ, (b)52HZ, (c)49.5HZ.Cluster output voltage v b4 with capacitor voltages v 4 C1 and v 4 C2 are shown in (d).

Fig. 18 .
Fig. 18.Experimental results of a sudden reversal in reactive power demand with 49.9Hz in the output port grid.

TABLE I CRITICAL
OPERATING RANGES WHERE RELATIVELY LARGE LOW FREQUENCY ENERGY OSCILLATIONS COULD BE PRODUCED.

TABLE II SIMULATION
AND EXPERIMENTAL SYSTEM PARAMETERS.

TABLE III CONTROLLER
PARAMETERS FOR SIMULATION AND EXPERIMENTAL TESTS.
(12)12)into the definition of d C (t), the following T-SSCV oscillating components are defined: