An Analytical Method to Determine the Optimal Switching of Modular Multilevel Converter in HVDC System

The lifetime of the submodules (SMs) in a modular multilevel converter (MMC) is significantly impacted by its switching frequency. In this work, the determination of the switching frequency, to be applied to the nearest level modulation (NLM) method used in the SMs, is formulated as a linear integer optimization problem (LIOP). It is shown that there is an ideal minimum switching frequency under which all voltage constraints on the SMs are satisfied. As the loading level on the converter increases, additional switching events are generated and the solution of the LIOP is to yield the gating signals to ensure the voltage constraints are still met and the switching loss is reduced. The LIOP is approximated as a series of Lagrangian relaxation linear programming sub-problems. Each of the sub-problems is then shown to have integrality property and can be solved using the subgradient technique. The solution time is a polynomial function of the number of SMs and the number of voltage constraints in each arm of the converter. The quality of the solution is $\varepsilon $ -optimal and the corresponding gating signals for each SM are generated by a proposed two-level coordinated control scheme. The feasibility of the proposed optimization method is demonstrated through simulation study performed on a practical 201-level ±200kV/400MW MMC-HVDC system model constructed in a real-time digital simulator (RTDS) platform. Results of the simulation indicate that the tolerance on the voltage difference between any pair of SMs has to be adjusted when the MMC operates at the determined optimum switching.


I. INTRODUCTION
Modular multilevel converter (MMC) has gained increasing acceptance in high voltage direct current (HVDC) power transmission schemes [1]- [3]. MMC-HVDC has several advantages over conventional HVDC: it contributes to lower harmonic distortions, it allows independent control of real and reactive power flows on the ac side, it can achieve fast recovery after fault, it avoids the need to provide communications between converter stations for power regulation, the transmission corridor is significantly reduced when compared to HVAC transmission scheme of the same power transmission capacity, among others [3]- [5]. For these reasons, there are more than twenty installed and planned The associate editor coordinating the review of this manuscript and approving it for publication was Dragan Jovcic .
MMC-HVDC projects in China alone. For example, in order to provide alternative power supply routes for some islands in the eastern part of China, several 100-MW level pilot projects in Shantou, Zhoushan and Xiamen have been commissioned and put into successful commercial operation. Renewable energy sources, such as wind and solar power generators are also connected to terminals of these MMC-HVDC stations.
As can be seen from the literature on MMC-HVDC systems, the nearest level modulation (NLM) technique is most widely used among step-wise modulation methods [6]. Experimental and field testing results indicate that under rated power operating condition, the losses of a MMC-HVDC station are higher than those seen in conventional HVDC schemes [7]. The losses elevate the operating temperature of the converter which in turn increase the rate of reduction in the lifetime of the converter. In the MMC-HVDC scheme, the converter valve consists of series connected submodules (SMs), and the losses in the valve typically account for more than 50% of the station's total loss [8]. The switching losses within the converter valve, which include those of the IGBT, are proportional to the SM switching frequency [9]. Due to thermal safety consideration, the switching frequency should be limited to below (say) 230 Hz [10], [11]. To optimize the switching frequency in order to increase the lifetime of the power converter and at the same time, ensure acceptable MMC-HVDC performance is a challenging task and has received much research interest.
Specifically, safe MMC-HVDC operations require the voltages across the SMs to be maintained within acceptable range. A change in the current flow through an arm of the converter, due to variations in the external grid operating conditions for example, will induce variations in the SM voltages. The gating signals to the SMs, and therefore the switching frequency, may have to be adjusted to ensure the voltages will still be within the acceptable range. A converter model constructed based on the average value of the SM voltages cannot take into account the differences between the voltages of the SMs during the switching period [12]. Therefore, such a model is unsuitable for use in the determination of the optimum switching frequency. Recognizing this shortcoming, much research attention has been directed toward designing methods to balance the SM voltages. The conventional method proposed in [1], [2] requires the SM voltages and the direction of the arm current flow to be monitored. Based on their voltage levels, the SMs are sorted into order which then determines the SMs to be switched in or out in each control period. Unfortunately this may result in excessively high switching frequency. To overcome this shortcoming, Tu et al. developed a reduced switching-frequency voltage balance algorithm [13] in which the number of the SMs in the on-state will change in accordance to a reference voltage. However, the possible occurrence of SM voltage deviation within each control period has not been considered. Wang et al. proposed an alternative algorithm which involves comparing the SM voltages against pre-set upper and lower voltage thresholds [14]. Unfortunately there could be situations whereby the voltage of an SM is just within the threshold levels in one control period, and the switching in of this SM in the next control period would cause the voltage across this SM to exceed the thresholds. Ilves et al. proposed a predictive sorting algorithm, with the view to achieve a trade-off between the switching frequency and voltage ripple by evenly distributing the estimated voltage change among all the SMs [15]. Similarly, a hybrid SM voltage prediction-based method was used in [16] to reduce the switching frequency. The effectiveness of this method depends strongly on the pre-set acceptable voltage deviation limit, with the result that the conventional sorting method used in [1], [2] has to be applied when the predicted SM voltage deviation is greater than the pre-set limit. With the same objective as in [15], [16], the authors of [10] had proposed a voltage balancing method in which additional SMs will be utilized to reduce both the switching frequency and the voltage deviations. In a later work, the authors of [17] proposed an alternative voltage-balancing scheme through tracking the difference between the maximum and minimum SM voltages in the converter and from which the number of SMs to be kept in reserve to balance the voltage difference is determined. In contrast to the above approaches, Hassanpoor et al. formulated the determination of the switching sequence of the SMs as the solving of an optimization problem [18]. In order to reduce the solution time to obtain the optimum switching sequence, a heuristic method named CTBoptimized was suggested. Generally for such a combinatorial optimization problem, heuristic method can find the feasible approximation solution within a reasonable time but the quality of the solution is difficult to assess [19].
From the above discussion, it is clear there is still considerable scope in investigating SM switching scheme for the NLM-based MMC. In this aspect, the present work aims to develop an analytical approach to determine the optimum switching sequence of the MMC, while meeting pre-specified voltage constraints concurrently. The paper is organized as follows. Steady-state analysis of the MMC-HVDC system is provided in Section II. In Section III, the mathematical formulation pertaining to the optimum switching is established in the form of a linear integer optimization problem (LIOP). The optimization is to be carried out in conjunction with meeting constraints developed from voltage quality considerations. In order to reduce the computation burden, a subgradientbased Lagrangian relaxation linear programming problem is re-formulated from the LIOP. A numerical technique to determine an ε-optimal solution for each control period is developed and incorporated into a proposed two-level switching control scheme in Section IV. Section V verifies the efficacy of the proposed approach through simulation study. The main findings are then summarized in Section VI.

II. STEADY STATE ANALYSIS OF MMC OPERATIONS A. A BRIEF DESCRIPTION OF NLM METHOD
The topologies of a three-phase MMC and the associated half-bridge SM are shown in Figure. 1. At any time, the dc-side voltage U dc can be maintained at an acceptable level through the appropriate switching on/off of the N series-connected SMs in each phase simultaneously. The switching pattern would depend on the power transfer level.
Without any loss of generality, phase ''a'' of the MMC under the inverter operating mode is considered herewith. Henceforth, the subscripts a, u and l are to indicate the respective quantities of phase a, the upper and lower arms of the MMC. Suppose the sinusoidal modulation signal is used. The number of SMs in the ''ON'' state, denoted as n u and n l of the upper and lower arms respectively, can be expressed as [20], where the function round [y] returns with the nearest integer value to y. M is the MMC voltage modulation ratio which is defined as, u vm is the peak value of the MMC ac-side phase voltage u v (t). Denote the SM rated voltage as U c0 , from (1) and (2), u v (t) can be written in the stair-case form, The dotted line is the sinusoidal reference voltage. The stair-case u v (t) will intercept the reference voltage a number of times. The corresponding electrical angle at which an intercept occurs is denoted as θ i . From (1) and (2), the total number of such intercepts N θ in one power cycle can be shown to be It can be seen from (5) that N θ increases with the product MN. The maximum value of N θ is 2N when M = 1. However, in order to maintain u v (t) to an acceptable quality level, M is typically between 0.8 and 0.9.

B. VOLTAGE ACROSS THE SM
Although various circulating current suppressing controllers (CCSCs) have been proposed for MMC [21]- [24], there still exit harmonic components in the arm currents i x,y where x = a, b, c and y = u, l, particularly the dominant second-order harmonics. Again without any loss of generality, consider the upper arm current i a,u (t) in Figure. 1. This current contains the dc (I dc ), the fundamental (i va ) and the second-order (i aZ ,u ) harmonics components: In (6), ω, I vm and ϕ are the power frequency, the peak value of the ac phase current and the power factor angle respectively. I aZ ,u and θ are the magnitude and phase angle of the second-order harmonics current. The harmonics current is governed by the voltage difference between the arms and it circulates between the arms. i aZ ,u cannot be expressed in a closed form.
The power loss P TON of an IGBT in the on-state is given by where V CE is the forward voltage drop across the IGBT and I au,rms is the rms value of i a,u (t). In order to reduce the loss and to maintain the power quality on both the ac-and dc-sides to acceptable levels, the ratio of the rms value of the secondorder harmonics current and I au,rms should not be greater than an upper bound α: Typically α = 15% [3]- [5].
If the j th SM is in the ''ON'' state over the ith control period, the current flow i a,u (t) will induce a voltage change across this SM which is described by (9) In (9), T c is the control period of the power electronic devices controller and more shall be said about it in the next Section. U c,ij ((i−1)T c ) is the voltage at the end of the previous control period. The voltage quality of U c,ij can be kept to acceptable level if the second-order harmonics current can be suitably controlled.

III. SM SWITCHING FREQUENCY OPTIMIZATION A. PROBLEM FORMULATION
The main objective of achieving the optimum switching is to maximize the lifetime of the SM. The lifetime can be expressed in terms of the number of thermal cycles (N f ) the SM has undergone before the SM fails to function. N f is significantly impacted by the average junction temperature of the IGBT, which in turn has certain non-linear relationships with the power losses generated in the SM. Among the various power losses, the IGBT switching loss is proportional to the switching frequency [9], [10]. Therefore, it would be most desirable if the switching frequency can be reduced while at the same time, the dc and ac voltage qualities can be maintained to acceptable levels. This would lead to a decrease in the switching loss and the IGBT junction temperature, and the lifetime of the SM can be expected to increase. Unlike the heuristic voltage balance approaches proposed in [13], [18], the present work propose to establish the mathematical framework under which the switching frequency can be optimized. Consider one arm of the MMC station. Let N sw denotes the total number of switching in all the SMs in the arm, within the period T N of one power cycle. If N sw is to be minimized, then the objective function reflecting this design aim can be written as In (10), x i,j is an integer variable: it has the value of ''1'' if the j th SM in the i th control period is in the ''ON'' state. Conversely, x 0,j is the initial state of the j th SM. Clearly the minimum value of the objective function depends on the combinations of x i,j . Note that there are NT N /T c such integer variables in one power cycle. The design task becomes one of solving a combinatorial optimization problem.
With any SM switching pattern, however, it is also necessary to ensure the harmonic distortion level of u v (t) meets with stipulated quality standards while the SMs are more fully utilized. In order to do so, it is derived in [21] that the control period T c should be selected to satisfy the bounds If 1/T c is less than the upper bound, the voltage reference in Figure 2 will change by more than one level in some control periods. Thus at least two SMs will change their states. On the other hand, if 1/T c is less than the lower bound, there will not be enough voltage levels to approximate the reference voltage such that some of the SMs may not change their states even in one power cycle. Equation (10) indicates that N sw is obtained by summing up the number of changes in the ON/OFF states of all the SMs in all the control periods within the power cycle. Unlike all heuristic methods reported in the literatures, the objective function (10) provides a quantitative measure of the focus of the design study: that the number of switching is to be minimized.
Although the function (10) is nonlinear and nondifferentiable, (10) can be transformed into a linear form through the introduction of an additional N TN /T c binary integer variables x i,j+N , as follows: where x i,j+N satisfies, Equation (13) can in turn be expressed as linear equations (14) and (15): In the i th control period and in view of (1), the objective function must satisfy the linear equality constraint If the control period T c is sufficiently short, the number of SMs in the ON-state (n u,i ) may not change until the electrical angle θ i shown in Figure 2 changes in the next control period. However, as shown by (9), as the current flow through an SM changes, the voltage across the SM will vary. In response to this, the gating signals to the SM will have to be adjusted in order to avoid excessive levels of voltage imbalance and circulating current. Therefore, the individual value of x i,j may have to change within a control period. A closer analysis is therefore warranted, as follows.
Consider firstly the voltage U c,ij across the j th SM in the i th control period. If the SM is in the ON-state, i.e., x i,j = 1, then U c,ij will differ from that of the previous control period. Based on (9) and noting that the control period T c is typically very short, the difference in the voltage across the SM over two consecutive control periods can be approximated by the constant coefficient c i given by (17): Denote the initial voltage across the j th SM as U c,1j (0). From (17), U c,ij is then given by It has been shown in [18] that U c,ij will be within acceptable level if U c,ij does not deviate from its rated value U c0 by more than the amount dU c,0 , [3]. Substituting (18) into (19), the linear voltage inequality constraint (19) can be expressed in terms of x i,j as follows: Henceforth, x i,j are termed the binary integer decision variables because different sequence of gating signals will cause U c,ij to deviate from its rated value in varied ways. The deviations will impact the amount of the circulating current flow between the SMs. Indeed, the constraint (8) VOLUME 9, 2021 alluded to earlier is to reflect the need to restraint the level of the circulating current.
Therefore in this work, it is proposed that in order to impose a limit on the magnitude of the circulating current, the difference in the voltages across any two SMs in the i th control period shall be kept to within the tolerance β Uc0 , i.e., As will be illustrated in Section V, the choice of the value of β will depend on the power transfer level through the MMC. Under light power transfer condition, larger value of β can be selected.
Substituting (18) into (22), the voltage difference constraint (22) can be expressed in terms of the integer decision variables x i,j as, The above derivation allows the problem formulation to be stated mathematically as follows: the determination of the optimum switching of the SMs involves solving a linear integer optimization problem (LIOP). It can be seen from (10) and (12) that there are 2NT N /T c binary integer decision variables x i,j which must meet the T N /T c linear equality constraints given by (16), as well as the (4 + N (N − 1)) NT N /T c linear inequality constraints given by (14), (15), (20), (21), (23) and (24).
As far as the authors are aware, this is a new approach to determine the optimum switching of a MMC-HVDC system in which practical operational constraints on the circulating current and SM voltage level have also been taken into consideration.

B. IDEAL SWITCHING FREQUENCY
Next, consider the inequality relationship The equality relationship in (25) will be satisfied only when ab ≤ 0. It therefore follows that the objective function (10) will have the lower bound shown on (26): Substituting (16) into the left hand side of (26), one obtains Equation (27) shows that the lower bound equals to the sum of the absolute values of the difference in the number of SM in the ON-state within two consecutive control periods and over one cycle of the power frequency. If the voltage inequality constraints (19) and (22) are not considered, n u,i+1 − n u,i = 0 between two θ i , and n u,i+1 − n u,i ≥ 1 if the next control period reaches a new θ i . Therefore, if the total number of θ i shown in Figure 2 is N θ , as given by (5), the ideal number of switching N sw,ideal in one power cycle will be independent of T c , viz . , Whence the ideal average switching frequency f sw of each SM is Bearing in mind the presence of the second-order harmonics current as shown in (6), this ideal switching frequency can be achieved only under certain light load conditions when the SM voltage quality is acceptable. As the power transfer level increases, however, the arm current i a,u (t) will increase too. The variation of the voltage across a SM from one control period to the next control period, denoted as c i in (17), will assume a larger value. In order to satisfy the voltage constraints (20) and (21), the SM may not be able to maintain at the ''ON'' state for as long a duration as when under the light power transfer condition. Hence, there will be additional switching events and the switching frequency will increase. A careful simulation study must be carried out to arrive at an acceptable trade-off between acceptable voltage quality and the switching frequency.
The problem formulation given in this Section has two advantages over the reported heuristic methods. First, the physical meaning of the objective function (10) is obvious. The optimum switching frequency is reached once the total number of switching is minimized, subject to the constraints pertaining to the circulating current and the SM voltage deviation. This is in contrast to the heuristic approaches where no explicit objective function has been given and hence, the solution may vary with the heuristic rules. Second, the optimal switching frequency can be evaluated analytically for both off-line and on-line applications. There are wellestablished methods to determine the optimal solution of the LIOP, for example, the optimization toolbox of MATLAB can be used. On the other hand, none of the heuristic methods can verify the generated gating signals are indeed optimal.

IV. OPTIMAL SWITCHING CONTROL SCHEME A. DETERMINATION OF THE OPTIMAL SWITCHING
Section III provides sufficient information from which a mathematical framework can be developed to determine the optimal switching of the MMC, in the form of the optimal x i,j . A series of gating signals are generated for i a,u (t) based on the determined x i,j . However, numerical optimization techniques, such as the branch-and-bound (B&B) method, have exponential time complexity and in this instance, can only be used for the off-line planning and analysis studies of the MMC-HVDC system. As pointed out in Section I, heuristic methods have been widely used to determine the switching strategy for on-line applications [19], although it is unclear if the determined switching strategy is indeed optimum. Faced with these dilemma, various endeavors have been made in the past few decades to obtain the approximate optimal solution for such combinatorial problem. Among the possible numerical techniques to determine the approximate optimal solution to the LIOP such as the linear relaxation method [25], random rounding method [26] and Chvátal-Gomory cutting plane method [27], the subgradient method based on Lagrangian relaxation is simple, robust and can be readily applied [28], [29]. Most importantly, subgradient method has a solid theoretical foundation and that the nearoptimal or feasible solution for the LIOP can be obtained in polynomial time.
For the MMC-HVDC system, the gating signals for the IGBT must be generated within one control period. Unfortunately, the computational burden of the formulated LIOP (10) is such that this is not possible, based on the current state of development of digital signal processing technology, if the calculation window is as large as one power cycle. An effective approach adopted in the present work to reduce the calculation time is to divide the original LIOP into T N /T c integer programming (IP) sub-problems. Such divide and conquer approach has also been widely used in the field of online management systems. Based on the problem formulation discussed in Section III, the optimal solution for each of the IP problem can be found but in order to further accelerate the calculation, the IP problem is reformulated into one in which an approximate optimum solution can be found. The main challenge lies in the integrality property of the approximate solution. This approach and the issue of integrality of the solution are dealt with next, as follows.
Let the optimal solution for each of the IP problems be N IP . The IP problem can be approximated by relaxing the binary decision variables to a real value between 0 and 1. For the i th control period, this approximation can be represented as a linear programming (LP) problem for which the optimal solution is N LP : In the LP problem, X = (x 1 , . . . , x 2N ) T , F = (O 1×N , I 1×N ) where O and I represent the zero and identity matrices respectively. Matrices A, B, G and H are obtained from the constraints discussed in Section III. The details are shown in the Appendix. LP could provide a lower bound solution for the IP problem [25]. If N LP = N IP , there will be an integrality gap between the LP and IP solutions. Some rounding methods have to be used to round off the fractional element in the decision variables X to a proper integer. This may increase the complexity of the computational process. To mitigate this, it is proposed the constraints (31) be added to (30) with the introduction of a non-negative Lagrangian multiplier vector . The Lagrangian relaxation linear programming (LRLP) problem is thus obtained from the LP problem (30) It is shown in the Appendix that G is a total unimodular matrix. This special mathematical structure indicates that all the decision variables for (33) will be integers and the derived LRLP problem will have the integrality property.

B. SUBGRADIENT SOLUTION TECHNIQUE FOR THE LRLP PROBLEM
As the term (AX-B) in (33) is not differentiable when the number of SMs in the ON-state changes, the subgradient search technique described in [30] can be used to determine the optimal solution of the LRLP. Again, taking the upper arm of phase a as an example, this calculation process involves the following 5 steps: Step one: In each control period, the arm current i a,u (t) and the corresponding SM voltages U c,ij (t) are monitored. According to the ac reference voltage, the number of n u can be calculated from (1). In addition, the initial Lagrangian multiplier vector (0) in (33) is set to 0.
Step two: Based on (17), all the SM voltages at the end of this control period U c,ij (t + T c ) can be estimated: If any pair of the predicted SM voltages does not satisfy the voltage difference tolerance constraint (22), the SM which has the higher voltage will be switched off if the SM is charging. Conversely, the SM with the lower voltage will be switched off if it is discharging. The corresponding equality constraints, expressed in the form shown in the Appendix as (A.9) and (A.10) will be added to (33).
Step three: At the k th iteration, solve the LRLP problem (33). The solutions N LRLP (k) and X (k) are stored. S(k) = AX-B is then a subgradient vector.
Step four: If every element of S(k) is 0 or if k reaches the pre-set iteration limit, the optimal or ε-optimal solution is found from the minimum N LRLP among all the k stored N LRLP values. This is because N LRLP does not decrease monotonously with k [25]. The first N values of X corresponding to the minimum N LRLP will be used as the gating signals sent to the SMs. VOLUME 9, 2021 Step five: If every element of S(k) is not 0 or if k has not reached the iteration limit, update the Lagrangian multiplier vector , using the general updating equation provided in [25] (k + 1) = max(O, 2 (k)S(k)) (35) Return to Step three. The flow chart showing the above five steps is included on Figure 3. Compared to the heuristic methods reported in the literatures, the above subgradient solution approach is based on a theoretical analysis of finding an optimal or ε-optimal solution of the original IP problem. Although it is essentially a first order optimization method, a near-optimal solution for the LRLP problem can be found after a few iterations. If l pairs of the SM voltage differences are greater than the pre-set tolerance βU dc0 , the subgradient method will involve up to O (2kN(2N+1+l)) arithmetic operations [31]. This polynomial time approach will permit the real-time application of the generated switching signals for the SMs, as shown next.

C. TWO-LEVEL COORDINATED OPTIMAL SWITCHING CONTROL SCHEME
The above development permits a new two-level coordinated control strategy to generate and adjust the gating signals of the MMC-HVDC. The strategy involves control actions at the station and at the device levels of the MMC. Figure 4 shows the two-level optimal switching control scheme whereby the station-level control scheme includes the well-documented CCSC for the MMC [4], [21], [22]. The current i s and the voltage u s at the point of common coupling (PCC) in the figure can be used to track the real and reactive power references P ref and Q ref . The outer voltage control loop will generate the d-q axis reference current signals i d and i q for the inner current loop. Through the feed-forward control method, the d and q components can be decoupled and the corresponding voltage reference signal u ref can be generated. In addition, in order to eliminate the second-order harmonics circulating currents among the three phase legs of the converter station, the signal corresponding to the average arm current of each phase leg is sent to the CCSC. Similar to the inner current control loop, another voltage reference signal u cir is generated to produce the zero d and q axes reference voltage signals to eliminate the harmonic currents.
The reference signals u ref and u cir are combined to form the inputs to the ''Device-level'' control scheme. Using (1) and (2), n u and n l for each control period will be determined for the upper and lower arms of the MMC. Based on the measured arm current i x,y and the voltages U c,ij across the SMs, the LRLP block will determine the optimal X of each control period using the subgradient method. The optimal or ε-optimal gating signal X is then sent to all the SMs.
In addition, the voltage difference tolerance β must be carefully selected such that the inequality (8) will be satisfied. A straightforward method would be to adjust β on-line until the second-order harmonics current level in i x,y is acceptable. However, this is computationally expensive. Instead it is proposed that a series of off-line simulation be carried out at pre-selected power transfer levels. The purpose of these studies is to determine the maximum value of β such that the resulting second-order harmonics current satisfies (8). A look-up table (LUT) can then be constructed based on the maximum values of β obtained at these pre-selected power transfer levels. The LUT is incorporated in Figure 4 such that the maximum value of β at any given power transfer level can be determined through the interpolation of the data-set contained in the LUT. In this way, the resulting LRLP solution will yield the minimum switching frequency at the given power transfer level.

V. ILLUSTRATIVE EXAMPLES A. SYSTEM PARAMETERS
The intent of this Section is to demonstrate the proposed scheme can achieve the real-time optimal switching of the MMC-HVDC. In order to do so, a 201-level NLM-based ±200kV/400MW point-to-point MMC-HVDC project in China is studied through steady state and real-time dynamic simulations. The circuit parameters for the two identical conversion stations are listed in Table 1. The results of the simulation study presented in this Section will be those pertaining to the upper arm of phase ''a'' of the MMC, operating under the inverter mode.

B. COMPARISON OF THE STEADY STATE RESULTS USING THE B&B AND PROPOSED METHODS
Suppose the MMC-HVDC system initial power transfer level P is 250MW, the station dc bus voltage U dc and the terminal voltage U c0 of each of the SM at the initial time are maintained at the rated values. From the values of M , N and T N listed in Table 1, the acceptable range of the control period T c obtained from (11) should be between 33µs and 300µs. In the following analysis, T c is selected at the value of 100µs. As T c is short, the voltage variation coefficient c i over each control period can be evaluated using (17). Without considering the second-order harmonics in the arm current, Table 2 compares the optimal solutions of the LIOP problem obtained using the B&B method with that using the subgradient method discussed in Section IV. The iteration limit used in the latter method is set to 3. An Inter R Core TM i7-6700 CPU@3.4GHz with 16GB RAM computer was used in carrying out the steady state simulation. The simulation tool is MATLAB.
Without considering any voltage constraints and using (29), it can be readily seen that the ideal number of switching per power cycle N sw,ideal is 360, yielding the ideal switching frequency of 90 Hz. However, Table 2 shows that this lower bound can only be achieved if the voltage difference tolerance β is greater than 0.045. In fact, Table 2 shows that when β is decreased to 0.025, both optimization methods have resulted in the corresponding switching number N sw being more than 600 and the switching frequencies of over 150Hz. The consequence would be an increase in the IGBT switching loss when compared to the case of β = 0.045. N sw obtained by the subgradient method is slightly higher than the more accurate optimal solution yielded by the B&B method. This is due to the rounding effect generated in (A.12) when SMs of very similar voltage levels are rounded to the same integers. The difference in N sw is less than 3% when β = 0.025.

TABLE 2.
Comparison of the optimal switching solutions obtained using the B&B and proposed method AT P = 250MW and d = 0.1. Table 2 that the solution time of the subgradient method is some 18 times less than that based on the B&B method. As discussed in the Appendix, the voltage difference inequality constraints will be activated only when the voltage difference of any pair of SMs are greater than the pre-set tolerance. The approximation used in (A.5) has reduced the search space significantly in the optimization search process. This accounts for the much reduced solution time.

It is interesting to note from
From this steady state study, the subgradient method is shown to be able to generate solution of great accuracy and is computationally efficient. However, the second-order harmonics circulating currents have yet to be considered. The feasibility of the determined optimal switching scheme must be verified from the real-time dynamic simulation of the MMC-HVDC scheme, as follows.

C. REAL-TIME DYNAMIC SIMULATION OF OPTIMAL SWITCHING
In order to verify the efficacy of the on-line optimal switching control scheme discussed in Section IV, a point to point MMC-HVDC benchmark platform is constructed based on the real-time digital simulator (RTDS). Similar like the control scheme shown in Figure. 4, high performance digital processor PXI-8106 is selected as the system level controller. Field-programmable gate arrays (FPGA) PXI-7833R will sample the SM voltages and generate the optimal switching signals for each arm. The detailed platform parameters are given in Table 1. The simulation step is 100µs.
The results of dynamic simulation based on the proposed method are compared with those obtained using the heuristic CTBoptimized solution approach. CTBoptimized has the computational complexity of O(NlogN) and details of this method can be found in [18].
In this study, suppose the maximum allowable SM voltage ripple is to be kept to less than 2.5% of the SM rated voltage, that is, 50V in this example. Figure 5 shows the simulation results obtained by the CTBoptimized method whereby it can be seen from Figure 5a that the SM voltage ripple is indeed VOLUME 9, 2021 less than 50V. The figure shows that there are 8012 switching events in 10 cycles. So the average switching frequency determined using the CTBoptimized method is about 200 Hz. As the SM voltage deviation is well constrained, further harmonic analysis also confirms the level of the secondorder harmonics level in the arm current shown in Figure 5b satisfies (8). If the voltage difference tolerance β is selected as 0.025, Figure 6 shows the simulation results obtained by the proposed subgradient solution method. It can be seen from Figure 6a that the SM voltages U c are constrained to between 1950V and 2050V. The voltage ripple is also less than the stipulated limit of 2.5% in this case. The total number of switching N sw is 7376, to yield the average switching frequency of 184.4 Hz. Compared to the CTBoptimized method, although the proposed subgradient method requires a longer solution time, it does yield the optimal solution of lower switching frequency while still meeting the SM voltage and second-order harmonics current limits. The switching frequency determined using the subgradient method is higher than that obtained in the steady state study. This is because the steady-state study does not consider the presence of the second-order harmonics current, whereas by imposing the constraint in the voltage difference between the SMs through the design parameter β, the harmonic level has been restrained to the acceptable level. The voltage constraints are met and the circulating currents are reduced by the CSCC effectively. As shown in Figure 6b, the MMC ac-side current i v portrays an almost constant amplitude. Figure 7 shows the arm currents i au , the MMC ac-side current i v and the number of switching N sw obtained by the subgradient method, when the voltage difference tolerance β is 0.03, 0.045 and 0.05. The number of switchings (switching frequency) in the three cases decreases from 6017 (150.43 Hz) to 5105 (127.63 Hz). However, the arm current and the MMC ac-side current are highly distorted by the circulating current caused by the unbalanced phase leg voltages when β = 0.05. The second-order harmonics current ratio is greater than the allowable 15%.
From the dynamic simulation results, it can be concluded that by increasing β, the switching frequency and the switching losses will decrease but at the expense of an increase in the level of the second-order harmonics current. A trade-off between the two conflicting factors can be reached by adjusting β until the ratio of the second-order harmonics current to the arm current ratio is observed to be just less than the pre-specified limit α, as described by (8). For example, suppose when P = 250 MW, the maximum acceptable β was found to be 0.045 and the optimal switching frequency was about 131.85 Hz. As the power transfer level increases, the possible voltage difference between any pair of SMs will increase so that β will have to be adjusted to a smaller value. Under light power transfer conditions, on the other hand, the switching frequency can be set close to the ideal switching frequency by selecting a larger β.

D. MMC VALVE LOSSES EVALUATION
The main losses in the MMC are the IGBT turn-on and turnoff losses, and the diode turn-off losses. The total loss, which is the real power difference on the dc and ac sides of the converter valve, can be extracted from the dynamic simulation result. Consider the MMC-HVDC system operates under the light (115 MW), median (250 MW) and heavy (400 MW) power transfer conditions. The IGBT module, with data taken from [32], is assumed to operate at 125 • C junction temperature in the simulation. Table 3 summarizes the maximum allowable voltage difference tolerance β, the optimal average switching frequency f sw and the valve power losses P. The simulation results shown in Table 3 verify that the optimal switching frequency will be very close to the ideal frequency 90 Hz when β = 0.05 under the light power transfer condition. When the MMC operates under the rated 400 MW power transfer condition, β is chosen as 0.035 in order to guarantee the second-order harmonics current meets with α of 0.15 or less. The SM average switching frequency increases to 168.51 Hz. Although the switching frequency is optimized at each power condition, it is observed that the total valve loss per station is still higher than 1% of the transferred power.
For the purpose of power system operational planning, the results shown on Table 3 can be used to determine the optimum β such that the switching frequency can be minimized while the second-order harmonics current is kept to acceptable level. This will enhance the operational safety and the lifetime of the SM.

VI. CONCLUSION
Unlike existing heuristic methods, an analytical method to obtain the near-optimal switching for the NLM-based MMC-HVDC system has been proposed. The switching frequency can be optimized by solving a LIOP. Analysis shows that there will be an ideal minimum switching frequency when the power transfer level is low and there is no necessity to apply any constraints on the SM voltages in the optimization solution process. At higher power transfer level, however, the voltage difference between the SMs must be constrained to acceptable level even as the SM average switching frequency increases.
It is a time-consuming task to find an accurate optimal solution for the LIOP. In view of this, the present investigation also shows that to find the ε-optimal gating signals for a given power transfer level, the LIOP can be approximated as a series of LRLP problems which have integrality property. The integer decision variables can be generated by the subgradient method in polynomial time. The dynamic simulation results generated by the real-time digital simulator (RTDS) platform show that the voltage tolerance parameter β plays an important role in finding the optimal switching frequency. The setting value of β must be reduced when the power transfer level increases. This will necessitate higher average switching frequency in order to reduce the second-order harmonics current caused by the unbalanced phase leg voltages. Notwithstanding these encouraging findings, the impacts of the variations in the parametric values of the main circuit parameters of the MMC-HVDC system on the optimal switching frequency would be a fruitful area for future work.

APPENDIX
The inequalities (14) and (15) can be incorporated into (31) such that A and B are given by The voltage difference tolerance constraints given in (23) and (24) will be activated only when the voltage difference between any two SMs is greater than the pre-set value βU c0 . If l constraints are activated, the N (N − 1) inequality constraints in one control period can be simplified to l equalities. In (A.5), G 2 and H 2 can be written as Suppose g is an m × m submatrix of G. The determinant of g, Det(g), will be 0 if one of columns of g is selected from G 12 , G 22 and G 32 . Det(g) will be either 1 or -1 if all rows and columns of g are selected from G 21 or G 31 . Det(g) will be 0 if one of columns of g has two opposite-sign non-zero entries (1 and -1). If all rows and columns of g are selected from G 11 and G 21 , g 1j which is 1 will be the only no-zero entry in the j th column. The determinant of g can be expressed as, Det(g) = (−1) 1+j Det(I (m−1)×(m−1) ) = (−1) 1+j (A.14) Det(g) in (A.14) will be 1 or -1 when j is odd or even. From the above, the determinant of G will be 0 or ±1. That is, G is a total unimodular matrix. Therefore, only integer solutions can satisfy (A.3). The proposed LRLP problem given in (33) has integrality property.