Control Strategy Based on Arm-Level Control for Output and Circulating Current of MMC in Stationary Reference Frame

: This paper proposed a control method for output and circulating currents of modular multilevel converter (MMC). The output and circulating current are controlled with the help of arm currents, which contain DC, fundamental frequency, and double frequency components. The arm current is transformed into a stationary reference frame (SRF) to isolate the DC and AC components. The AC component is controlled with a conventional proportional resonant (PR) controller, while the DC component is controlled by a proportional controller. The effective control of the upper arm and lower arm ultimately controls the output current so that it delivers the required power to the grid and circulating current in such a way that the second harmonic component is completely vanished leaving behind only the DC component. Comparative results of leg-level control based on PR controller are included in the paper to show the effectiveness of the proposed control scheme. A three-phase, ﬁve-level MMC is developed in MATLAB/Simulink to verify the effectiveness of the proposed control method.


Introduction
Recently, MMC has gained significant attention due to its use in high voltage direct current (HVDC) transmission systems [1], traction power supplies [2], static synchronous compensators (STATCOMs) [3,4], medium voltage drives [5][6][7], and offshore wind energy system [8]. The use of MMC in such a wide domain became possible due to its attractive property of scalability in terms of voltage levels, modularity, low harmonic distortion, low stress on devices, and high efficiency [1][2][3][4][5][6][7][8][9]. Besides these attractive features, MMC also faces some challenges. One of them is the flow of large magnitude circulating current in its phase legs. Circulating current is a negative sequence with a double frequency, which has no effect on the output current of MMC. However, an unsuppressed circulating current will result in a high RMS arm current and will eventually cause power loss and put additional stress on the devices. The second is the regulation of submodule (SM) capacitor voltage, which is mandatory for the stable operation of MMC. The control of output current is also important to ensure the proper delivery of active and reactive power.
In the literature, various control strategies have been proposed to overcome these challenges. The cascaded control scheme proposed by Hagiwara and Akagi [10] is mostly adopted. This control scheme is the interconnection of several control loops with phaseshifted pulse width modulation (PS-PWM) to control output current, circulating current, and capacitor voltage of MMC. However, the second harmonic component in the circulating current is not suppressed efficiently. Synchronous reference frame based dq control is proposed in [11] using proportional-integral (PI) regulators. Although PI regulator provides high gain at zero frequency, interconversion between different frames increases the computational burden and small error in the transformation between frames, which can lead to large error. In [12], the authors proposed a PR controller for the control of circulating and output current. For circulating current, a multi-resonant controller is used for second harmonics suppression. However, the leg-level control results in a slow response and a high settling time. Apart from these controllers, different model predictive control (MPC) approaches are also adopted for controlling MMC in [13][14][15][16][17][18]. Nowadays, MPC is highly adopted in power converter control, but the computational burden and complex mathematical calculation of conventional MPC may not always be practical. Different approaches of sliding mode control (SMC) are discussed in [19,20], which use different loops for controlling output and circulating current. The SMC is normally subjected to chattering issues.
A feedback linearization technique is applied to MMC in [21]; after linearizing the plant, conventional controllers are used. Although after linearization, controller design and tuning become easy, mathematical derivation and implementation are not trivial. Backstepping algorithm [22], adaptive controllers [23], optimization-based control [24], and repetitive controllers [25] are proposed for controlling the parameters of MMC, specifically circulating current. The control strategies in previous work are mostly composed of two different loops for controlling circulating and output currents of MMC. The tuning of the different controllers for both loops is a laborious task. Moreover, few researchers have worked on arm-level control of MMC. In [26,27], the authors have proposed a control strategy based on arm current control. The control is carried out in a synchronous reference frame, which involves different frame transformations that increase the computation burden.
In this paper, we have proposed a control method for controlling the circulating and output current of MMC. This novel control scheme is based on arm current control. The upper and lower arm currents are independently controlled, which will assure the control of output current and suppression of circulating current harmonics by choosing a proper reference. The controller used in the upper arm and lower arm has the same characteristics. It makes the tuning of the controller easy. The same tuning parameters can be used for the upper arm controller and lower arm controller.
In order to achieve the control goal, the arm currents are transformed into SRF and decomposed into αβγ components. Due to the presence of fundamental frequency and second harmonic component, the αβ-components are controlled by a proportional resonant controller tuned at those frequencies, while the γ-component is controlled through a proportional controller. Moreover, the capacitor voltage of MMC is regulated with the help of a conventional sorting algorithm. The proposed control scheme is compared with the leg-level control scheme to show its effectiveness. The promising results of the proposed strategy show that the controller's settling time is low due to its fast response, and the circulating current is effectively controlled to eliminate the AC components, only leaving behind the desired DC component.
The rest of the paper is organized as follows. In Section 2, the configuration, operation, and mathematical model of the system are given in detail. Section 3 sums up the designed control. The results are discussed in Section 4. The conclusion of our work is presented in Section 5.

MMC Configuration, Operation, and Modeling
The configuration of MMC is composed of upper arms and lower arms, as depicted in Figure 1a. The upper and lower arm combinedly form a phase leg. Moreover, the arm of MMC is composed of N submodules, which are connected in series with arm inductor L u,l , and the series equivalent resistor R u,l . The SM has a half-bridge configuration, consists of two switches (S 1 , S 2 ), and storage capacitor C, as depicted in Figure 1b. The values of the different parameters of MMC are given in Table 1. These SMs are either inserted or bypassed with the operation of switches (S 1 , S 2 ). The output of these submodules combinedly gives the output voltage of MMC. With S 1 turned on and S 2 turned off, the SM capacitor will insert in the current path, and the SM capacitor is bypassed by turning on S 2 and turning off S 1 . However, turning off both switches will result in the blocking of SM. This condition is used during fault to divert current to an antiparallel diode, which has a higher current carrying capability than transistors. By appropriately applying switching signal to these switches, the arm voltage can be varied between zero and the sum of all SM voltages, i.e., 0 ≤ e u,l ≤ v Σ cu,l  The mathematical model of MMC is derived from the phase equivalent circuit given in Figure 2. When Kirchhoff's voltage law is applied to the upper and lower loop, it will result in (1a) and (1b) [28,29]. As the SMs are composed of capacitors and a combination of switches (S 1 , S 2 ), its dynamics are modeled as Moreover, the relationship between different currents is derived by applying Kirchhoff's current law. The resulting currents are given as follows: The summation and subtraction of (3a) and (3b) give the output current and circulating current.
The circulating current is composed of a DC component and different harmonic components. It can be represented by a general expression as i ch,j is an undesirable component that is composed of different harmonic components given as follows:

Control Design
The differential voltage equations of the upper arm (1a) and lower arm (1b) are transformed into the Laplace domain, as given below. These equations indicate the dynamic response of MMC arm currents.
Equations (7a) and (7b) show that e u,j and e l,j are the only available variable for control of the upper-arm and lower-arm currents. The upper-arm and lower-arm voltages are manipulated to achieve the desired response of circulating current and output current with a regulated SM capacitor voltage.
The control objectives in this paper are to control output current to ensure the delivery of desired active and reactive power to the grid and regulating circulating current such that it tracks DC current reference and eliminates its second harmonic components. These objectives are achieved by implementing a control algorithm in SRF (αβγ). The three-phase arm current (i abc u,l ) is transformed into i αβγ u,l . Unlike the balance system, here, the gamma γ component is not zero. It represents the DC current flowing in each arm on MMC. By Clark transformation [30], upper arm and lower arm currents i abc u,l will decompose to their respective αβγ components i αβγ u,l , as given below.
The values of arm currents in (8c) are substituted with (3a) and (3b). By supposing positive sequence and output current i oa = I cos ωt and second harmonic current i 2a = I 2 cos(2ωt), (8c) is calculated for upper-arm currents as Similarly, the lower-arm current is represented in SRF as Generally, the arm current can be represented as Equation (10) shows that the arm current is a function of all three (αβγ) components of SRF.
The circulating current can be represented in SRF as Equation (11) shows that if the αβγ components of the upper-arm and lower-arm currents are kept 180 • apart, i.e., i αβ,u = −i αβ,l , we can eliminate the AC component of the circulating current, which will result in only a DC component.
For finding mathematical relation of the circulating current in SRF substitute (12a), (12b) in (11), and adding the same components, we obtain The right sides of (13a) and (13b) are expanded by using basic trigonometric identity given as The result obtained from (13) is substituted in (11); hence, the different components of circulating current in SRF are represented as The circulating current will remain only with the DC component given as Equation (16) confirms that by choosing a proper reference for the upper arm and lower arm, and the αβ component of circulating current can be eliminated. The only component that remained behind is γ component, which is the desired DC component of circulating current.
Similarly, the output current is calculated by putting the supposed value of the upper arm and lower arm current from (12a) and (12b) to (4a), which gives Equations (14a) and (14b) are used to simplify (17a) and (17b). The result is given as Equation (18) shows that the output current is only composed of a fundamental frequency component. The output current is equal to two times of upper arm current, i.e., i o,αβ = 2i αβ,u . The output current is represented as From (16) and (19), we have concluded that by choosing proper references for the upper arm and lower arm current, the circulating current can be forced to track DC reference by eliminating double frequency AC component, while output current can be set to deliver require power to a connected grid. It will not affect the output current.

Reference Generation
The important step in this control algorithm is to generate a proper reference for arm currents so that it will deliver desired active and reactive power to the grid along with the regulation of circulating current to its DC reference value. The references for i ul,αβ and i ul,γ are generated from reference power delivered by the converter. From p-q theory in [30], the power in SRF is given as The references for upper arm currents are achieved by taking the inverse of the matrix as i * γ is DC current component, which is circulating in each arm. It is equal to I dc 3 , while v γ is DC link voltage, which is equal to v dc . p * r is equal to p * + p loss . If the losses are ignored, then these terms can be used interchangeably. The reference of the upper arm current is generated from (21). While the reference of lower arm current is set such that it has a 180 • phase shift with the reference of upper arm current.
The term i * ul,αβ will combinedly control the output active and reactive power of MMC. However, the i * ul,γ is responsible for power transfer from the DC port to the AC port. In reference generation, p * and q * can be any real values, but the terminal voltage v j is sensed and passed through a Second Order Generalized Integrator-Phase Locked Loop (SOGI-PLL), as the output voltage of MMC is composed of different harmonics components. In order to achieve a good reference for better control performance, the positive sequence of the output voltage is extracted using the SOGI quadrature signal generator (QSG) [31]. The structure of SOGI is depicted in Figure 3.
where q is 90 • lagging phase shift operator, i.e., q = e −j π 2 . The value of k is set to √ 2 2 . The SOGI-QSG generates the direct and in-quadrature components for the input vector. These signals are used to calculate the positive sequence of the respective input signal. Equation (21) is used to calculate pure sinusoidal reference current for the upper arm, and Equation (22) is used to generate a reference for the lower arm.
Keeping in view the nature of currents as given in (9a) and (9b), a PR controller is used for controlling αβ-component, while γ-component is controlled using a proportional controller. Hence, the control law is designed as Equations (25a) and (25b) represent the control input to the plant. The insertion indices signal for both arms is achieved by dividing the control signal by V d 2 and is fed to PS-PWM to generate a gating signal for MMC. The reference output voltage is given as Finally, the reference signals for the upper arm and lower arm are as follows: The modulation and carrier signal is depicted in Figure 4.

Proportional Resonant Controller
PR controller is a good choice for reference tracking in a stationary frame. PI controller provides infinite gain at DC frequency, which eliminates the steady-state error. Similarly, the PR controller provides infinite gain at a specific frequency (ω) for eliminating steadystate error [32]. The transfer function of the PR controller is given as where k p is the proportional gain, while k rh is a resonant gain for h resonant term. The k p play a critical role in controller design as it decides the bandwidth, gain and phase margin of the system. The k rh shifts the response magnitude vertically without affecting the bandwidth of the controller. As shown in (9a) and (9b), the arm current is composed of a fundamental frequency component as well as its second harmonic component, the controller is tuned at these two frequencies to achieve a desired control input signal. The transfer function for the controller is achieved by expanding (28) for n = 2, since we are dealing with the fundamental frequency and its second component. The bode diagram for resulted PR controller is given in Figure 5, which shows high gain at fundamental as well as double frequency. The structure of the controller is depicted in Figure 6a, and its mathematical form is given as  Equation (29) shows the mathematical expression of the PR controller, which is implemented for controlling the output and circulating current of MMC.
The resonant part of the controller is implemented with second-order generalize integrator (SOGI), as depicted in Figure 6b.

Parameter Tuning of PR
The selection of the proper parameter of the PR controller is very crucial in stable closed-loop operation. The parameter defines the bandwidth, which determines the exponential rate of convergence of the system [28]. Hence, the value of k p is calculated by considering the bandwidth of output control. It is calculated as where b w is the desired bandwidth of the closed-loop system. A useful rule of thumb for selecting the bandwidth for the stability of the system is given as [28] b w ≤ ω s 10 where ω s and T s are angular sampling frequency and sampling time, respectively. Moreover, the resonant gain k rh is selected as where b h is resonant bandwidth. It determines the exponential rate of convergence of the resonant part, which plays a role in accurately tracking reference values. Its value must be selected as b h b w (33) More specifically, resonant bandwidth should be less than the angular frequency of the grid, as given below.
The values of PR parameters are selected based on these calculations. The value of proportional and resonant gains, bandwidth, and sampling time are given in Table 2. The generalized control structure is given in Figure 7, while the complete control scheme based on the arm-based control and comparative leg-level control is depicted in Figure 8.   The regulation of capacitor voltage is important for the proper operation of MMC. A conventional capacitor sorting algorithm is used for the regulation of capacitor voltages. The choice of switching of SM is made in such a way that SM with extreme voltages (v sm ) are chosen to prevent its deviation from the mean value. A conventional sorting algorithm in [33] is used in conjunction with nearest level control. However, in our paper, it is used in combination with PS-PWM. The algorithm requires three variables, i.e., capacitor voltage, arm currents, and insertion indices for generating desired PWM signal to regulate the capacitor voltages. The flow chart of the algorithm is depicted in Figure 9. The main cases of this conventional algorithm are given as follows: 1.
If the arm current is greater than zero, then the bypassed SM with the lowest v sm is selected for insertion since it will charge the capacitor and SM with the highest v sm is bypassed because further charging will deviate the capacitor voltage from its mean value.

2.
In the case of a negative current, the SM with the highest v sm is chosen for insertion because this will result in discharging of the capacitor, and the SM with the lowest v sm is bypassed since its insertion will completely discharge the capacitor resulting in almost zero SM capacitor voltage.

Results and Discussion
A three-phase, five-level MMC is designed in MATLAB/Simulink to verify the proposed control scheme. To verify the effectiveness of the control scheme, the reference of output current is kept at zero till 0.1 s (zero power mode), which means that the converter is not injecting active power to the grid. At t = 0.1 s, rated power is injected into the grid (rated power mode). That will change the reference output current from zero to 100 A. This large variation is created to ensure the effectiveness of the control method. Moreover, the comparative results of output current, circulating current, and SM capacitor voltage obtained from leg-level control are presented for comparison. The control scheme implemented for leg-level control and arm-level control is depicted in Figure 8. The results of different parameters subjected to step change in active power are given in Figures 10-16. Figure 10a depicts the upper-arm and lower-arm currents in SRF. The three components of the current i αβγ u,l are controlled effectively. The measure values of the arm current are tracking its desired value perfectly. With the step change in power, the reference of arm current components i αβ u,l increases from 0 A to around 50 A peak. Similarly, the DC component i γ u,l also changes from 0 A to 25 A. The controller is keeping the measured value at zero since the reference is set to zero. As the power changes from zero to rated power, the arm current also starts tracking its reference value. With the change of reference, the controller output changes quickly and continues its tracking. Figure 10b shows the control response of the leg-level control scheme. Similar to the arm level, the tracking of the controller in SRF is good. The reference value is well tracked.        Figure 11 shows the reference and measured output current obtained from arm-level control as well as from leg-level control. In Figure 11a, the upper-and lower-arm currents are combined to obtain the output current. The effective tracking of arm currents has enabled the output current to follow its reference without any error. This will assure the transfer of the required power to the grid. The quality of output current is checked by carrying out its fast Fourier transform (FFT) analysis, depicted in Figure 12. The FFT analysis shows that the THD is 2.98%, which fulfills the IEEE standard for THD. However, in Figure 11b, the response of leg-level control is presented. Although the current was effectively controlled in SRF, here, it is clearly depicted that the current response is not appreciable. The controlled current is settled after 0.25 s, and still, the steady-state error is visible by closely analyzing the figure.
The circulating current of all three-phase of MMC for both arm-level and leg-level control is depicted in Figure 13. The uncontrolled circulating current has both double frequency AC and DC components. The DC component is used to transfer power from the DC port to the AC port, while the AC component of the circulating current is completely undesirable, which has a negative impact on the converter. As shown in Figure 13a, the differential current only contains the DC component, while its AC term is eliminated. This validates the proposed control scheme. At zero injection mode, the current is zero, following its reference value, but when the mode is changed to rated power, the current is changed from zero to 25 A. As the power mode changed, the current shows some overshoot due to the sudden change in power reference. The control scheme has the ability to tackle the changes to settle the measured current on its reference value, resulting in the complete elimination of the second harmonic component. However, Figure 13b shows the circulating current obtained from the leg-level control. The current response is slow and settled around 0.25 s, while in the case of arm level, it is settled around 0.15 s. After switching the converter to rated power mode, the circulating current shows large variation in the case of leg-level control.
The arm capacitor voltage of all three phases is shown in Figure 14. Its mean value is regulated to 155 V ( V dc N ). As no power is injected into the grid at the start, the capacitors are fully charged and holding the energy. At this instant, the capacitor voltage has no ripple, and it is almost constant. Since the power mode is changed from zero to rated power, and the converter starts injecting power to the grid, the capacitor voltage is subjected to the fluctuation, which is known as ripples. Even the current reference is changed at t = 0.1 s; still, the sorting algorithm is effective by keeping constant the means values. In the case of arm-level, the mean value is constant during both zero and rated power mode, while in the case of leg-level control, at zero power, the mean value of capacitor voltage deviates more from its reference value. Additionally, in the rated-power case, the value of capacitor voltage is higher than the desired value. The better comparison and quick analysis of the performance indices are measured for both control strategies and presented in Table 3. Moreover, the computation time of both control blocks is measured. The computation time for arm level is 20.88 s and for the leg level is 83.45 s. The proposed strategy has four times less computation time than the conventional strategy. The lower value of the performance indices parameter shows a better control scheme. In the mentioned table, it is noticeable that the proposed arm-level control has resulted in a smaller value.  Furthermore, Figure 15 shows the reference and measure values of active and reactive power. The measured value is tracking their respective references. This is possible due to the proper reference generation of arm currents and the tracking ability of the controller. The reactive power reference is kept at zero, showing that the converter is only injecting the active power to the grid. However, the reference of reactive power can also be changed if there is any reactive power required in the system. Since normally, the renewable energy operators are providing only active power to the grid, which is why its reference is not changed. While taking the case of active power, the measure active power is zero till 0.1 s, which is due to the output current. As the converter enters the rated power mode, the power level rises again to its reference value. The active power takes 23.93 msec, and reactive power takes 97.867 ms to reach its steady state. It should be noted that the power results shown here are in per phase. The measures value perfectly tracks its desired value, as depicted in Figure 15.
The grid voltage and converter output voltage are depicted in Figure 16. The gird voltage is shown in Figure 16a, while Figure 16b shows the five-level converter output voltage. The converter voltage shows a constant peak in zero power mode as the capacitor holds the energy in this mode since no power is transferring to the grid. In rated power mode, this is a slight variation in peak, as it is known that capacitor voltage is prone to variation. However, in conclusion, the waveform shows the good modulation and operation of MMC based on the proposed control scheme.

Conclusions
The theoretical analysis in this paper indicates that by transforming arm current to SRF and choosing a proper reference signal, the output current can be controlled as desired, and the circulating current can also be regulated to DC value. This will cause the suppression of the second harmonic component. The theoretical finding is validated using MATLAB simulation of five-level MMC. The results show a well-regulated output signal with THD (2.86%), which fulfills the criteria of the IEEE standard, and the circulating is also free of the second harmonic component. Furthermore, the capacitor voltage is also regulated to its means value. Moreover, both upper-and lower-arm current controllers are tuned with the same value, which makes the tuning easy. The results are compared with conventional leg-level controller graphically, and its performance indices are also calculated, which show a remarkable difference.

Conflicts of Interest:
The authors declare no conflict of interest.