Avoiding module capacitance over-dimensioning of Modular Multilevel Converters with constrained and unconstrained modulator-based Model Predictive Control

The power density of Modular Multilevel Converters (MMCs) is often limited by the over-dimensioning of the module capacitance value. This is common because with conventional control schemes, large voltage and energy margins must be included in the MMC design to avoid overvoltages in the module capacitors and saturation effects due to undervoltages in the module capacitors. This paper presents two Model Predictive Control methods that can reduce the necessary voltage and energy margins to a minimum and therefore increase the power density of the MMC system compared to conventionally controlled MMCs. A trade-off between computational effort and module capacitance over-dimensioning is discovered for the proposed constrained MPC. The unconstrained MPC is compared to the constrained MPC and conventional PI control using simulations. Finally, the performance of the unconstrained MPC is experimentally verified with an MMC system prototype and compared to a traditional PI control system.

Steady state trajectories of the available arm voltage (sum of all module capacitor voltages of an MMC arm) and the (requested) arm output voltage. Left: With the usually applied MMC capacitor sizing to guarantee sufficient control margins, Right: With the lowest possible capacitance value (as explained in Sect. 3 and originally derived in [4]) for compact and cost efficient MMC designs topologies for high voltage (HV) and medium voltage (MV) applications. With its many output voltage levels, the MMC can achieve low harmonic distortions even without a high switching frequency per semiconductor device. As a result, a grid filter is often not necessary and the switching losses are very low. Therefore, grid filter and cooling system do not aggravate the power density of the converter system [1].
However, because each of the MMC arms (series connection of modules) represents a single phase converter with its DC link capacitor distributed among the modules, the difference between the constant DC power and the fluctuating AC power must be buffered in the module capacitors. As a result, a major part of the total volume of typical MMC designs is caused by the volume of the module capacitors [2,3]. Therefore, the reduction of the required module capacitance value can lead to a significant reduction of the total MMC volume. In typical MMC design procedures (cf. [2,3]), a limited control performance is assumed, such that voltage margins are included and/or the capacitor voltage fluctuation is limited to a fixed value. This is pictured in the left part of Fig. 1. However, when operating the MMC with a specific power factor, one can reduce the required capacitance value until the available arm voltage (sum of all module capacitor voltages of the MMC arm) is just lower than its maximum and just higher as the requested arm output voltage [4] as shown in the right-hand side of Fig. 1. Operating an MMC with this minimum capacitance value requires a high performance control system, because the so called energy balancing must be very fast and precise to still allow appropriate transient performance without resulting in too high capacitor voltages and/or saturation effects because the available arm voltage is not high enough to track the grid and DC voltage with the output voltage of the MMC. Apart from fast energy balancing during transients/reference changes, also the AC and DC currents must be controlled and unwanted circulating currents must be avoided in steady state to keep the conduc-tion losses at a minimum. This results in a multi-input multi-output (MIMO) control problem. Therefore, the well known standard cascaded PIcontroller structure (cf. e.g. [5]) results in comparably low performance, when considering transients/ reference steps with relatively small module capacitance values. Furthermore, controller tuning is tedious, because there are couplings between many of the cascaded and parallel SISO controllers in the control system. Also, time delays due to sensing, communication and/or computation cannot be properly compensated with cascaded PI-controllers. MIMO control schemes aiming for better dynamic performance and more structured controller design/tuning were proposed in [6,7]. However, all these control schemes cannot consider the system constraints like maximum output voltage of the individual MMC arms, maximum module voltage or arm/grid/DC currents.
The control of MIMO systems with constraints is a typical application area of Model Predictive Control (MPC). MPC algorithms perform a prediction of the system's future behaviour and optimise the control input to find a trade-off between tracking the (possibly contradicting) control references and the system constraints.
For MMCs, MPC could be beneficial, as one could decrease cost, volume and weight of the MMC by minimizing the module capacitance value without loosing (transient) performance, because the controller takes the system's constraints into account. For example, the module voltages might hit their maximum value constraints in the future after a reference step. If this is predicted by the control algorithm, a counteracting circulating current can be generated, such that the AC and DC output currents are affected as little as possible by the constraint and an optimal trade off between meeting the constraints and tracking the reference can be implemented.
There have been many predictive control schemes proposed for the MMC in literature. Most of them consider the switching state of each module as the system input (direct MPC, e.g. [8][9][10]). This results in a large integer optimisation problem, such that in most cases only one prediction step is considered to not cause a too heavy computational burden. For large MMCs with high module numbers even a single prediction step can cause major computational problems. Attempts to reduce this computational burden have been proposed in [11,12]. This helps to realise longer prediction horizons for MMCs with an intermediate number of modules but still results in computational problems for MMCs with many modules and therefore also high switching frequencies.
In [13] precomputed optimised pulse patterns (OPP) are modified with an MPC algorithm (MP 3 C). However, here the MPC controls only the grid currents, while the circulating currents are controlled with Deadbeat or hysteresis controllers. The energy balancing is controlled with conventional SISO controllers. Therefore, no constraints for the arm currents and available arm voltages can be considered.
Instead of controlling the individual modules' switching states with the MPC directly, a modulator can be used. The modulator typically uses a PWM to implement a given reference voltage for the individual arms. Modulators for MMCs can be designed such that all capacitor voltages within one arm are balanced around a mean value [1] and the voltage reference is implemented at the output of the arm with only small errors as shown in [14].
With a modulator, the MMC can be modelled with an averaged model. This means that no actual switching states are considered. It is rather assumed that each MMC arm can generate a continuous output voltage. This average modelling with a modulator enables to use continuous control set (CCS) MPC algorithms known from non switched systems. Therefore, the computational burden of the MPC algorithm is independent of the number of modules and can be used in many application areas from medium voltage drive systems with few modules to HVDC converters with hundreds of modules.
In [15] MMC average model equations are linearised around the current operation point and a linear MPC algorithm based on a quadratic program (QP) is used to determine the reference voltages for the individual modulators of the MMC arms. The (linear) QP formulation allows long prediction horizons without a too heavy computational burden, as fast and efficient solving methods are available (e.g. [16][17][18]).
As shown in [19], the problem of the method proposed in [15] is the error of the prediction model that results from the linearisation which can lead to performance degradation.
There are other CCS MPC schemes for MMCs in literature, such as e.g. [20] proposing interesting concepts with particularly low computational burden, but to the author's knowledge, there is no method proposed that includes a full constraint set, such that it can be guaranteed that the MMC is operated within its physical limits. Therefore, in this paper, a periodic linear MPC (pMPC) scheme is presented that avoids large prediction errors, but includes constraints for any current and voltage of the MMC. The contributions and structure of this paper are listed in the following: In Sect. 2, a linearised periodic averaging based model of the MMC is introduced. Thereafter, a matching reference trajectory and constraint formulation are proposed leading to a quadratic problem describing the control law of a periodic MPC scheme (pMPC). The main idea of the pMPC was originally proposed in [21]. However, in this paper, the reference and constraint formulations are refined and explained in detail.
Sect. 3 introduces how to calculate the minimum required module capacitance value taking the constraint formulation of the pMPC into account. This way, it is ensured that no circulating currents occur during the steady state operation of the pMPC. In Sect. 4, the trade-off between the computational burden and the minimum required module capacitance value arising from the pMPC formulation is analysed. Sect. 5 proposes an unconstrained MPC (periodic piecewise linear quadratic regulator, pPLQR) to overcome the necessary over-dimensioning of the module capacitors as with the proposed pMPC. The main idea of the pPLQR was originally proposed in [22]. However, in this paper, the cost-function is redefined in order to exclude the reference trajectories from the offline optimisation procedure. The consequences are explained in detail throughout Sect. 5. In Sect. 6, simulation results are presented to showcase the differences of pMPC and pPLQR in comparison with a traditional PI control system. Sect. 7 presents experimental results for non-constrained MPC and PI control to verify the effectiveness of the proposed modelling and control schemes.
In short, this paper represents a refinement of [21] together with [22] and new research results, to provide a more complete and comprehensive picture of the influence of the control method on the MMC module capacitor selection.

Periodic MMC Model
In the following, a periodic model of the MMC is derived based on the schematic shown in Fig. 2.

Current Dynamics
The current dynamics of an MMC can be described in decoupled DC side (marked with 'e' in the following) and AC side components (marked with 'a') [5,23]. Both components have a three phase characteristic such that they can be transformed to the αβ0-frame using the Clarke-transformation. The equivalent circuit(s) of these decoupled components are shown in Fig. 3. Note, that the AC side current i a,αβ has no 0-component due to the open star point on the grid side. Nevertheless, the AC side voltage v a,αβ0 includes a zero component as it is relevant for the energy states as will be shown later. Thus, the MMC's current dynamics can be described as The voltages v e,αβ0 and v a,αβ0 , can also be expressed as without loss of generality. Here, the part v δ x,αβ0 is the voltage that is used to change the currents during transients and to account for the inductive and resistive voltage drops in steady state. This part will serve as a control input in the following.

Energy Dynamics
To model the module voltages of the MMC, only the energy stored in the module capacitors of whole MMC arms is regarded (Fig. 4), where the arm energy is ,k for the upper arm of the first phase, where v 1u,k is the capacitor voltage of the k th module. The voltage balancing among the modules within an arm is done via sorting algorithms as a part of the modulation scheme (cf. e.g. [1,14]). Note that in the following, perfect balancing of the module voltages of one MMC arm is assumed, meaning that the module voltages within each arm are practically equal.

K
The energy dynamics in the individual arms (cf. Fig. 4) can be found by the product of the arm output voltage v x y and the arm current i x y , such that dw dt where w = [w 1u , w 2u , w 3u , w 1l , w 2l , w 3l ] T is the vector of arm energies in abc coordinates, K −1 αβ0 is the inverse Clarke transformation matrix and i a,αβ0 = [i a,αβ , 0] T .
For the energy dynamics one can now neglect the part v δ x,αβ0 of the MMC voltages (cf. 4). As a result, a multiplication of the control inputs v δ x,αβ0 with the current states i e,αβ0 and i a,αβ is avoided and a linear system description is obtained. This assumption does not lead to a large modelling error, because the neglected parts of v a,αβ0 and v e,αβ0 are small compared to the grid and DC voltage values. For the following it is assumed Evaluating (5) with (6) and (7) leads to the linearised energy dynamics: Note that the grid voltage v g,αβ0 is changing over time and thus A w is dependent on the grid angle ϕ g = ω g t. This change is well known throughout the grid period, such that A w (ϕ g ) is known a priori.

Complete Model and Discretisation
Finally, the MMC can be modelled with where 0 is a matrix of zeros. To use the model as a MPC prediction model, it is discretised using the exact zero order hold (ZOH) discretization method. Note, that due to the time variance of A w , the model needs to be discretised for each and every grid angle With ZOH, it is assumed that A w (ϕ g ) is constant over the sampling interval T s . In the real world, this is not true, as ϕ g and therefore v g are continuously changing throughout the sampling interval. To avoid modelling errors, an effective grid voltage v eff g,k is introduced, representing the average value of the grid voltage over sampling period k, such that (10) is used within (8) to find A w before applying ZOH discretisation for each ϕ g,k throughout the grid period on (9), such that results as the discrete time prediction model.

State Constraints
The physical constraints in an MMC are the maximum arm current i arm,max and grid current value i a,max , as well as the maximum module voltage and therefore the arm energy value C 2N · (N · v C,max ) 2 . Based on the previously derived model, the constraints can be formulated as In the following, the formulation is boiled down to its properties important for the QP formulation and classification: Current Constraints: Both, arm current (12) and grid current (13) constraints are depending on the e and a currents only. As the matrix K αβ0 is constant over time, they can be expressed as where K c,c ∈ R 18×5 and i c ∈ R 18×1 , because every arm and grid current have two constraints each and i k is of dimension five. Energy Constraints: The energy constraints are simple box constraints on the energy states. They can be written as where K c,w ∈ R 6×6 and w c ∈ R 6×1 , because every energy state has one constraint and w k is of dimension six. The lower constraint of the energy states is implemented as an input constraint in the following. Summarizing all these expressions, one can state Note that all matrices are constant over the whole grid period/for every grid angle.

Input Constraints
Additionally, the output voltages of the individual MMC arms are limited due to the available arm voltage v Σ x y or arm energy w x y respectively, as it cannot be higher than v Σ x y and not lower than zero (with half-bridge modules). Therefore, the control input is constrained by the energy states in the previously derived model: Note that if full-bridge modules are used, the lower bound of zero can be replaced by − 2N C · w . The square root on the right-hand side of (18) represents a non-linearity, which needs to be approximated to gain a linear constraint representation. The approximation has to be valid in a certain range of w x y to cover the whole reasonable operating range of the MMC. The upper limit of this range is given by the module voltage constraint (14). The lower limit is chosen somewhat lower (e.g. 30 %) than the lowest energy level W min expected in the steady state, such that the approximation range is where W min can be evaluated based on the equations for the energy reference presented in Sect. ???.As shown in Fig. 5, the actual constraint can be approximated by a number of straight lines. Each line v Σ m is given as v Σ m = a m · w + b m resulting in a linear expression for the square root. Of course this approximation also results in an error. As shown in Fig. 5b, the error decreases with an increasing number of approximation lines. The approximated constraint for the output voltage of arm x y is written as Note that an arbitrarily accurate approximation of the square root is possible for largeM a . However, each line represents six additional linear constraints (the MMC has six arms) when it comes to the formulation of the optimisation problem, such that one should not exceed a reasonable number of approximation lines (cf. Sect. 4).
Proceeding with the description of the input constraints, the continuous time expressions given in (18) must be represented in discrete time. Therefore, it is important to note that the arm output voltages v x y do not represent the inputs u x y in the context of the optimisation problem directly, because v x y also includes the time varying grid voltage v g (ϕ g,k ) as well as the DC voltage v dc . In the following, the resulting formulation for the input constraints are defined for the upper and the lower arm of phase 1. In this case, the arm output voltages are defined as To ensure that the requested controller outputs v δ e,αβ0,k and v δ a,αβ0,k can be implemented with the available arm voltage, v g,a (ϕ g,k ) must represent the worst case grid voltage value in abc-coordinates 8 Avoiding module capacitance over-dimensioning of Modular Multilevel Converters with constrained and. . . within sampling period k that has to be synthesized by the respective MMC arm. Therefore, are defined to represent the maximum and minimum grid voltage within sampling interval k. The lower input constraints for phase 1 are therefore given with For the upper input constraints, as shown in Fig. 6, it depends on the slope of the available arm voltage if the current or next step of the arm energy/available arm voltage must be considered: When the available arm voltage is increasing, the current step k (red line) represents the lowest value of the actual continuous available arm voltage trajectory (blue line). In this case, the upper input constraints are given with When the available arm voltage is decreasing, the next step k +1 (yellow line) represents the lowest value of the actual continuous available arm voltage trajectory (blue line). This changes the upper input con- Now, the constraints can be formulated for all three phases using a matrix notation. This is omitted here for space reasons.
Furthermore, each input constraint can be replaced by N f constraints representing the system at a higher sampling frequency N f /T s , such that each control input u k is constraint by N f expressions per MMC arm. This way, the control sampling frequency can be low, while a precise constraint formulation is enabled. Of course, this comes at the price of N p · 12 · (N f − 1) · M a additional constraints in the optimisation problem. However, the number of decision variables is not increased.
The model of the MMC sampled with the N f times higher sampling frequency is defined in the same manner as given in (9) while the ZOH discretization is done with the same principle of the mean grid voltage value as described in (10). The exact formulation is omitted here for space reasons. Note that N f > 1 is only possible, if the switching/carrier frequency as defined by the modulator is at least N f /T s . Otherwise, the output voltage of the MMC arm can not be changed during the sampling interval T s of the MPC.
All in all, the input constraints can be summarized with These linear constraints represent a (time variant) coupling constraint between the inputs u k and the energy states w k .

Reference Values
For the MPC formulation, the state (x ref,k ) and input references (u ref,k ) are essential to achieve the desired control performance because these references guide the MMC to the ideal steady-state trajectory. In the following only active power transfer will be regarded. Nevertheless, all presented concepts also comply with (additional) reactive power transfer as well.
With a given DC voltage V dc and grid voltage amplitude V g as well as a reference output power P ref , the steady-state references for all state variables of the MMC can be calculated. As a starting point, the continuous current references are induced by power relations as where ω g is the grid angular frequency. Also, the control inputs have a steady state reference value that is based on the reference currents and the MMC's impedance values. The input reference represents the voltage that is required to drive the AC and DC currents through the impedances of the MMC and the grid. It can be derived with the equivalent circuit shown in Fig. 3 and is given by Fig. 3b).
The continuous energy references can be computed with the equations given in [4]. An example of energy variation for the upper arm of the first phase is (28) where m = 2V g /V dc . The full energy references can be stated as where v Σ dc is the DC offset of the available arm voltage.
As a consequence of the above equations, the state and input references are obtained by sampling the continuous references as

Quadratic Program (QP)
In the following it will be shown how to formulate the MPC law as a quadratic program (QP). QPs with linear constraints have general properties that make them comparably simple to solve. The discretization of (9) with the help of (10) leads to where x k is the state vector, u k is the control input vector and A d and B d are the time-varying discrete time model matrices depending on the grid angle ϕ g,k .
The MPC control law to obtain the optimal control input sequence U k can therefore be written as ..,u k+N p −1 ] T is the future input vector, N p is the prediction horizon and ϕ g,k+l = ϕ g,k + l · T s ω g is the predicted grid angle.
The optimisation problem resulting with (32) has a quadratic cost function with all linear constraints. Note, that due to the dependence of the system matrices on the grid angle, the QP is time variant. However, because each and every grid angle occurs periodically, the number of possible QPs is limited to 2π ω g T s . 10 Avoiding module capacitance over-dimensioning of Modular Multilevel Converters with constrained and. . .

Originalarbeit
Summarizing the resulting properties of the QP there are 17 · N p variables (6 inputs and 11 states, sparse formulation [24]) 11 · N p equality constraints (6 + 12M a N f + 18 + 6) · N p inequality constraints (cf. 17,25) Note that before solving the QP, the computation, sensing and communication delays must be compensated as explained in [22,25].

Minimum Required Module Capacitance Value
When using the proposed pMPC formulation, there are some consequences for the MMC design arising. These consequences mainly arise from the formulation of the input constraints (cf. Fig. 6). Fig. 7 Comparison of the voltage margin with different control sampling frequencies for active power transfer of an exemplary MMC parameter set. The proposed input constraint formulation results in a necessary margin between the steady state trajectories of the available arm voltage and the requested arm output voltage First, as depicted in Fig. 7 for an exemplary MMC dataset, the voltage margin between the discretised requested and available arm voltage changes with the sampling frequency of the pMPC. For 1/T s = 1 kH z (upper part of Fig. 7), the voltage margin between t = 8 ms and 9 ms is zero and the maximum of the discretised available arm voltage trajectory is just equal to the maximum allowed available arm voltage. This means, that the minimum required module capacitance is selected for this particular sampling frequency. For higher sampling frequencies as shown on the lower part of Fig. 7, a voltage margin between the steady state trajectories of the discretised available arm voltage and the requested arm output voltage results. Therefore, the module capacitance could be reduced while achieving a similar control performance as with the lower sampling frequency.
Second, the linearisation of the square root relation between arm energy and available arm voltage given in (19) influences the way that the MPC can picture the available arm voltage to constrain the maximum controller output voltage. As shown in Fig. 5, there is an error that results in a lower value for the available arm voltage than actually present in the MMC module capacitors. The consequences are also depicted in Fig. 7, where the blue line represents the actual available arm voltage trajectory and the yellow and red line represent the MPC's interpretation after the linearisation: The discretised values are always lower or equal the actual value.
Both, the timely discretisation as well as the square root approximation result in the necessity to over-dimension the module capacitance values.
In the following, a procedure how to determine the minimum required module capacitance value for the proposed MPC formulation is described. As presented in [4], the minimum required module capacitance value C is based on the minimization of the average arm energy, if the maximum available arm voltage k max · V dc and the number of MMC modules per arm N are fixed. The average arm energy is given by This means, that k dc needs to be minimized. The expression must be true, where v 1u (t) is the arm output voltage and e 1u (t) is the change in energy stored in the module capacitors of arm 1u (cf. Fig. 4). One does now search for the minimum k dc that fulfils (34). Note that in contrast to the equations given in [4], v 1u (t) also depends on the output power of the MMC, because the voltage drop across the arm and grid inductors must be considered as well. Additionally, the semiconduc-tor voltage drop is also included as described in [14]. Therefore, with (27), v 1u (t) is given by for the upper arm of the first phase, where V f,sc is the fixed semiconductor voltage drop (forward voltage) and R sc the resistive voltage drop of the arms semiconductors (cf. [14] for details).

Considering the Sampling Frequency
As described before, the MPC does not consider v 1u (t) to be continuous but sampled with the MPC sampling time T s . Within a sampling step, always the maximum value v d,1u (t) of v 1u (t) must be considered, such that  Fig. 9. The sudden changes in v 1u (t ) and v d,1u (t ) are due to the change of the arm current sign and the resulting inversion of the semiconductor voltage drop Note that this is a continuous expression in the general case, because the sampling intervals do not necessarily need to be synchronized with the grid period and therefore the sampling instance can be at any t (and not only at specific t = kT s ) 1 . In Fig. 8 the resulting v d,1u (t) along with v 1u (t) is shown for both power flow directions.
Replacing v 1u (t) in (34) with (36) and solving for k dc yields where k max = N · V C ,max /V dc . k dc,1 refers to the input constraint depending on w k . As shown in (24) and Fig. 6, w k+1 also needs to be considered with another input constraint. Therefore Note that this expression cannot be solved for k dc directly, because the (ΔE 1u,max − e 1u (t)) in the nominator will result in k dc → ∞, due to ΔE 1u,max = max ∀t e 1u (t). Therefore, k dc,min from (38) is used as a starting point for increasing k dc in (41) step by step until both are fulfilled. Thereafter, (39) is evaluated for this k dc to find the minimum module capacitance value that complies with the MPC formulation and a specific T s and M a . In Fig. 8 the resulting waveforms for N a = 2 are plotted for both power flow directions.

Computational Burden
In the following, equations resembling the computational effort of the QP solver for online embedded MPC implementations as published by Patrinos et al. [26] are applied on the presented pMPC. Patrinos et al. describe the numeric complexity (number of arithmetic operations) of the presented solver's main steps. Therefore, an evaluation of the required floating-point operations (FLOPs) is comparably simple. It is assumed that the number of required/sufficient solver iterations to reach a predefined termination criterion is independent of the number of constraints and the prediction horizon. The resulting number of FLOPs per time is used as a parameter for the computational burden in the following. As stated in [26], the number of FLOPS per iteration N op is where, n x is the number of states, n u is the number of inputs and m s is the number of linear, polytopic stateinput constraints per prediction step. The number of operations per time (given in FLOPs/s) is therefore For the presented pMPC, the number of states and inputs is fixed to n x = 11 and n u = 6. The number of state-input constraints per prediction step is where M a is the number of approximation lines for the square root approximation as given in (19) and N f is the number of oversampling steps for the input constraints.
Note that the actual computational burden required to solve a QP heavily depends on the used solver algorithm, the solver accuracy etc. However, to point out the general trend, the evaluation of a single solver should serve well.

Pareto Front
The presented relationship between the number of constraints per prediction step as well as the sampling time on the one hand and the required module capacitance value on the other hand results in a Pareto front. It represents the trade-off between computational burden and module capacitor volume.
In Fig. 9 this pareto front is plotted for the prototype system parameters as given in Table 1. Sampling frequencies from 1 to 2 kHz are considered and the constraint implementation is varied by choosing different M a and N f ∈ {1,...5}. The prediction horizon Fig. 9 Computational burden and required module capacitance with the proposed pMPC formulation for different sampling frequencies and formulations of the input constraints (varying M a and N f ). The system parameters are given in Table 1. A circle stands for N f = 1, a plus means that N f ≥ 2, the size of the markers (circle or plus) is anti-proportional to M a . The circle marked with * e.g. represents f s = 1 kHz, M a = 2 and N f = 1. The arrows represent the trends when increasing the sampling frequency (black), the number of approximations lines M a (brown) or the oversampling frequency N f (yellow) is kept at 3 for any sampling frequencies. This is verified with simulations. The best trade-offs in the lower computational burden range are achieved with M a = 2 and N f ∈ {1,...,5} for a sampling frequency of 1 kHz, as depicted with the arrows in the figure. An increase in the sampling frequency is not very efficient to reduce the required module capacitance.
The steady state trajectories for both power flow directions and M a = 2, N f = 1 (marked with * in Fig. 9) are given in Fig. 8.

Periodic Piecewise Linear Quadratic Regulator (pPLQR)
As pointed out in the previous section, the increased calculation time and therefore the rather low achievable sampling frequency of the proposed online MPC scheme lead to the necessity to over dimension the module capacitors. If a control scheme with similar energy balancing performance could work without online optimisations, the increased module capacitance can also be used to implement a certain voltage/energy reserve (cf. Fig. 7) that makes the consideration of constraints unnecessary. This massively simplifies the real time implementation without major drawbacks in the (transient) control performance. Therefore, in the following the periodic piecewise linear quadratic regulator (pPLQR) is introduced and evaluated with simulations and experimental results.

Offline optimisation procedure
The cost function and therefore also the basic optimisation problem to be solved for the pPLQR is the same as the one stated for the pMPC in (32). For easy reading it is repeated in the following s.t.
Note that this optimisation problem has equality constraints only. Therefore, it can be solved analytically as a function of the initial state x k+0 just as it is done for the classical LQR problem with time invariant system matrices A d and B d . The only difference is that the problem has to be solved for different angles ϕ g throughout the grid period.
The equality constraints in (44b) can be expressed in the so called condensed form dependent on the initial state x k . This compiles to . . .
where U k are the future control inputs and X k is the future state vector. Note that S k and T k are simplified notations to avoid writing S(ϕ g,k ) and T (ϕ g,k ) in the following. Solving (44) requires the state and input references. However, they are not known when optimising offline. Therefore, one formulates the cost function for the control errors e x,k = x k − x ref (ϕ g,k ) and e u,k = u k − u ref (ϕ g,k ), such that If it is assumed that the change in the state and input references matches with the system dynamics, one can state that (45) also holds for the vector of control errors. This results in and E x,k = [e x,k+1 ,...,e x,k+N p ]. Therefore, results for the cost function, where Q L = diag(Q,···,Q) ∈ R 11·N p ×11·N p and R L = diag(R,···,R) ∈ R 6·N p ×6·N p are large weighting matrices. The control inputs over the complete prediction horizon can be calculated by The control inputs for the next step u k are therefore As a result, only the reference values for the measured grid angle ϕ g,k , a matrix vector multiplication and some additions have to be computed online, while the cost function is the same as with the pMPC.

Comparison of Control Performance of pMPC, pPLQR and PI
In the following, the control performance of the proposed pMPC and pPLQR controllers are compared with the classical cascaded PI controller as described in [5]. Therefore, all three controllers have been implemented in a Matlab/Simulink simulation using PLECS blockset to model the MMC. To save simulation time and to exclude the PWM non-idealities from the controller comparison, an averaged model of the MMC as proposed and evaluated in [27] has been implemented. Therefore, no current ripple can be observed in the simulation results presented in this section.

Parameters
The MMC parameters for the comparison study are listed in Table 1, apart from the module capacitance value C . In order to achieve a fair comparison, C is optimised with the procedure given in Sect. 3 for the sampling frequency of the pMPC ( f s = 1 kHz, N a = 2, N f = 1). The resulting capacitance value is scaled by 1.02 to gain a little control margin. This leads to The factor k dc (representing the average arm energy reference) however, is optimised for each sampling frequency separately.
Because there are no constraints with pPLQR and PI, the sampling time for the module capacitance selection is zero and no square root approximation is necessary, such that the minimum required module capacitance is C min,cont. = 141.92 μF, such that C ≈ 1.17·C min,cont. . Therefore, the module capacitance used in the simulations is 17 % larger, than it needs to be according to the design rules presented in Sect. 3 given that T s = 0. This can be used as a control margin.

Tuning
The tuning of both the pMPC and the pPLQR is summarized in Table 2. To achieve a simple performance comparison, the DC current is chosen as the main output, such that it needs to be penalized with the biggest factor. For the pMPC, this factor can be almost arbitrarily high, because the physical constraints are handled within the control algorithm. For the pPLQR, it needs to be reduced, to avoid the saturation of the requested arm voltages. Furthermore, the weighting factor for the AC currents, needs to be increased in order to not exceed the maximum grid current.
Another important point is the selection of the energy weighting factors: Here, the pPLQR needs to be tuned comparably aggressive, such that very fast energy balancing is achieved and saturation of the requested arm voltage as well as exceeding the maximum available arm voltage limit are avoided. With the pMPC, the saturation as well as the maximum available arm voltage limit are handled with constraints. Therefore, the energy weighting factor can be chosen much lower than with the pPLQR.  The pMPC achieves very fast control of the DC current. The power inversion in both directions takes approximately 2 ms despite the very low control margins in both voltage and energy. The very fast DC current settling is partly based on the use of the AC currents for the energy balancing task. Here, current spikes are to be observed during the transients. However, these spikes are limited to the maximum allowed grid current (1.5 times the nominal grid current). Fig. 11 pictures the simulation results with the pPLQR. Here, the reference step is replaced with a ramp to avoid saturation of the requested arm voltages. The ramp is implemented, such that the reference is inverted within 3 ms. The total power inversion takes approximately 10 ms thus half a grid period. The available arm voltages are well within their limits and almost perfect energy reference tracking is achieved. Also the pPLQR uses the AC currents for the energy balancing. However, it was tuned to not exceed the maximum grid current. If the resulting current spikes should be avoided, the AC current weighting factor would have to be increased.  Simulation results for a ramp change from negative to positive power transfer with the cascaded PI controller from [5]. For labels of the plotted data refer to Fig. 10 Fig. 13 Comparison of the achieved power inversion speed with pMPC, pPLQR and cascaded PI, as pictured in Figs. 10, 11 and 12 already. The reference is shown as a dashed line for every control scheme. Note that due to the low sampling frequency and the computation delay, the reference step for the pMPC is delayed by almost 2 ms  Fig. 12 pictures the simulation results with the cascaded PI controller from [5] (or more precisely the model based variant from [28]). Here, the reference step is also replaced with a ramp for the same reasons as for the pPLQR. However, because of the slow energy balancing, the ramp had to be implemented to inverse the rated power reference within 20 ms. Note that the available arm voltages still exceed their limits after the transient such that the ramp would have to be slowed down even more.
The transient response time with respect to the DC current inversion is compared in Fig. 13 again to highlight the very good transient control performance of the proposed pMPC and pPLQR.
For all considered controllers, the steady-state tracking performance is excellent. Circulating currents are well suppressed as soon as the arm energies are close to their reference. The pMPC however suffers from its rather low sampling frequency, such that the AC currents are more distorted than with the fast sampling pPLQR and PI controllers.
As a conclusion, one can state that to achieve the fastest transient performance achieving power inversions in the millisecond range or faster, one needs to consider the pMPC controller if excessive over-dimensioning of the module capacitors should be avoided. If power inversions need to be performed in less than a grid period, the pPLQR is the best choice for the same required module capacitance value. Because the implementation effort for the pPLQR is comparable with the cascaded PI-scheme, there is no reason to pick the PI even for systems with very low transient requirements.

Experimental Verification of pPLQR and PI
In this section, experimental results obtained with a 12 module MMC prototype are presented. The MMC parameters are listed in Table 1.
The PWM was implemented as proposed in [14] in order to eliminate potential disturbances as far as possible. The communication between the Cyclone V SoC based central controller and the modules is implemented using the SyCCo-Bus [29].

Tuning
The tuning parameters for the pPLQR are given in Table 3. Here, in contrast to the tuning used in Sect. 6, the AC currents are considered to be more important. Therefore their weighting factor is chosen comparably high, whereas the weighting factor for the DC current is chosen rather low. The tuning of the PI controller has been conducted as suggested in [5].

Results and Discussion
Fig. 14 and Fig. 15 picture the measurement results for a power inversion from negative to positive power transfer with the pPLQR and the cascaded PI controller.
During the transients, both pPLQR and PI controller must be given a ramp when changing the current reference, because the MMC would trip otherwise. The shown ramp speed of 600 A/ms is the fastest that was possible for the PI without saturation. The maximum available module voltage was however exceeded. This was allowed to emphasize the difference in energy balancing performance to the pPLQR. The ramp speed for the pPLQR was possible to increase up to 6000 A/ms, so ten times faster than with the PI, before the max. allowed module voltage was exceeded during the transient.
Both controllers show good tracking performance in steady state. However, the pPLQR has a slight tracking error in the AC current. Concerning the circulating References are shown as dashed lines. An index k means that the shown line represents the sampled values as used by the controller, in contrast to x(t ) representing the continuous time measurement data of x currents in steady state, the pPLQR performs better than the PI, especially for positive DC currents.

Conclusion
During the design procedure of an MMC, usually a control margin is added between the maximum requested arm voltage and the minimum available arm voltage. Furthermore, the rated trajectory of the available arm voltage is designed to have some margin, before it reaches its maximum allowed value (cf. Fig. 1). These margins are implemented with the module capacitance that provides additional energy storage. Reducing or even omitting the margins can save volume, weight and cost in future MMC implementations.
However, the low control margins place high requirements on the MMC's control scheme, because the arm energies must stay close to their references even during transients, such as reference steps. Otherwise, the maximum allowed available arm voltage and therefore also the maximum module voltage could be exceeded. Furthermore, saturation effects could arise, because the available arm voltage is not high enough Fig. 15 Experimental results for a ramp change from negative to positive power transfer with the cascaded PI controller from [5]. For labels of the plotted data refer to Fig. 14 to implement the arm output voltage requested by the controller, which would result in a loss of controllability. In this paper, high performance control of MMCs has been identified as an enabler to reduce the required module capacitance value to a minimum. Therefore, MMC designs with a low module capacitance value become feasible.
To ensure the save operation of the MMC within its physical limits despite the very low module capacitance values and therefore control margins, control schemes that consider the system constraints are considered to be the best option. The pMPC scheme introduced in this chapter features such a complete constraint set in a linear quadratic problem (QP) formulation. As typical for MPC schemes, the downside of the pMPC is its real-time implementation. Because a numeric optimisation problem has to be solved in every sampling step, high sampling frequencies beyond 2 kHz are not reasonable to implement. In combination with the specific input constraint formulation, the module capacitors must be over-designed in order to avoid circulating currents in steady state. A procedure how to properly choose the minimum module capacitance value has been introduced. Simulation results show that the pMPC provides excellent transient and steady state control performance. Power inversions in the millisecond range are possible. Therefore, the pMPC is the method of choice for very fast transient performance without heavily overdimensioning the module capacitors. 18 Avoiding module capacitance over-dimensioning of Modular Multilevel Converters with constrained and. . .

K
Because the proposed pMPC requires some additional module capacitance compared to the absolute minimum value, this additional energy buffer can be used to gain some control margin for controllers that do not consider the system constraints. Therefore, the pPLQR controller is proposed. It is based on the same cost-function and prediction model as the pMPC, but can be run with a much higher sampling frequency, because no online optimisation must be conducted. Simulation and experimental results show that the pPLQR is a good alternative to the pMPC, if power inversions in less than a grid period are fast enough for the target application. Therefore, the pPLQR can be used to operate MMCs with very low module capacitances due to its excellent energy balancing performance. The pPLQR is simple to implement on embedded hardware platforms, such that it can replace traditional cascaded PI controllers.