A Unified Modeling Scheme of Modular Multilevel Converter for Hybrid AC/DC Power Grids

Modular multilevel converters (MMCs), as one of the core components of hybrid AC/DC power grids, become the preferred converter topology and show good developments. Urgently, a general MMC modeling scheme with good model accuracy needs to be developed to realize small-signal analyses and designs for the large-scale AC/DC power grids easily. This paper proposes a unified modeling scheme (UMS) for MMC systems in a synchronous rotating (dq) reference frame. Based on the dynamic phasor theory and with the proposed modular decouple modeling (MDM), the nonlinear state-space model of the overall MMC system can be obtained by configuring and connecting the input and output of the state-space model of each subsystem. Besides, the unified controller, modeling different control modes, normalizes the MMC systems modeling. Simultaneously, with the proposal of UMS, linearization and splicing could be uesd to develop a small-signal model of the overall MMC system directly. Therefore, the proposed model is suitable for simulating the large-scale hybrid AC/DC power grids and analyzing the stability of small-signal. Finally, the simulation results verify the accuracy and effectiveness of the proposed modeling method.


INTRODUCTION
A large number of distributed energy resources (DERs), from transmission systems to distribution networks, have been integrated into power grids to realize low-carbon energy systems. Flexible hybrid AC/DC power grids can effectively serve the grid connection and consumption of large-scale renewable energy. In particular, high-voltage direct current (HVDC) transmission technology has good application prospects in the field of renewable consumption and long-distance transmission (Liu et al., 2014;Zhu et al., 2021;Zhao and Tao, 2021); In addition, with the development of urbanization and the rapid growth of DC load, DC distribution network has attracted extensive attentions from scholars and the industry because of its flexible control (Sun et al., 2021;Xianyong et al., 2021). Modular multilevel converters (MMCs) become the preferred topology of high power converters for flexible AC/DC power grids, showing good development prospects (Trinh et al., 2016;Wang et al., 2021). Therefore, a model reflecting the general operating rules of MMC systems can provide essential guidance in studying the operation characteristics of hybrid AC/DC power grids, selecting the operational parameters of circuits, designing the controllers, and analyzing the stability of AC/ DC power grids.
The internal dynamic of MMC is very complex (Harnefors et al., 2013) due to circulating currents and internal capacitor voltages, which results in the harmonic components in the arms (Ilves et al., 2012). Therefore, compared to traditional two-level VSC systems, MMC is more challenging to model and control.
As to the MMC modeling in large-scale hybrid AC/DC power grids, the computational burden introduced by the detailed electromagnetic transient (EMT) highlights the need to develop simplified models that provide similar behaviors and dynamic responses. Because the average arm model (AAM) significantly reduces complexity while maintaining a satisfactory representation of internal dynamics (Antonopoulos et al., 2009), the average model represented by AAM is suitable for simplified simulations and analyses, and has been widely used in the design of control systems (Harnefors et al., 2013;Saad et al., 2015).
Based on the AAM approach in three-phase stationary (ABC) reference frame, Gnanarathna et al. (2011) proposed a time-varying model of MMC and Peralta et al. (2012) put forward a detailed and averaged MMC model to improve simulation speed. Although these models can improve simulation speed in large-scale system simulation. However, they are not suitable for eigenvalue analyses due to the timevariance.
Motivated by the need for studies in eigenvalue-based small-signal stability of MMC-based power grids, the modeling in the dq reference frame has been widely used for modeling MMC systems. In addition, the design of MMC's control system is usually implemented in the dq frame, making the development of the overall MMC model and its interfacing much easier. Munch et al. (2009) presented a state-space description in the dq frame for the optimal design of the controller. Vatani et al. (2015) put forward other simplified fundamental frequency models of MMC. In order to facilitate the analysis of large-scale AC/ DC power systems. Trinh et al. (2016) and Li et al. (2018) developed the simplified and reduced-order MMC models. But these models are only fit for the fundamental frequency, ignoring the high harmonic parts of the internal dynamics of the converter, such as harmonic circulating currents.
The dynamic-phasor-based modeling, which is based on the generalized average method (Sanders et al., 1990), can replace traditional modeling with time-domain (differential) equations, because the dynamic-phasor modeling is inherent time-invariance and greatly reduces the simulation time without losing accuracy. Deore et al. (2012) first applied the dynamic phasor modeling method in the MMC-HVDC system, where a state-space model with 98 states was developed. However, the model is highly complex, including many complex dynamic equations. Jamshidifar and Jovcic (2016) proposed a dynamic state-space model of MMC for analyzing small-signal dynamics and designing controllers, but control system modeling is not covered in the model. Jovcic and Jamshidifar (2015) built an average-model-based dynamic phasor model of MMC, whose electrical system and control system are coupled together, leading to the inconvenience of connecting the MMC model with both external control and DC electrical parts.
As seen from the previous analyses, the models in the ABC frame are applicable to the trial-and-error study of timedomain simulation, but these models are not suitable for the study of the eigenvalue-based small-signal stability in MMCbased power grids. Although many efforts have been made on MMC modeling in the dq frame, a general MMC modeling scheme with high model accuracy urgently needs to develop to realize small-signal analyses and designs for the large-scale AC/DC power grids easily.
This paper proposes a unified modeling scheme (UMS) for MMC systems in a synchronous (dq) reference frame for the analyses of both MMC-based system operation and smallsignal stability. The modular decouple modeling (MDM) and the unified controller modeling make MMC systems modeling more flexible and expansible to adapt to different hybrid AC/DC power grids. Besides, based on the proposed model, the small-signal model of the overall MMC system could be developed directly by linearizing and then splicing our model, which can avoid the direct derivation of the overall system matrix element. Therefore, our model is suitable for simulating the large-scale hybrid AC/DC power grids as well as studying small-signal stability. The accuracy and effectiveness of the proposed modeling method are verified by a simulation test system in MATLAB/ Simulink.

MODELING MODULAR MULTILEVEL CONVERTER SYSTEMS WITH UNIFIED MODELING SCHEME
A three-phase model of MMC is shown in Figure 1. The MMC is assumed to be connected to an infinite power supply through a transformer. Each phase unit of the MMC comprises two bridge arms, positive (P) and negative (N). In Figure 1, when submodules (SMs) are half-bridge circuits composed of insulated gate bipolar translator (IGBT), the model of MMC is a detailed EMT (D-EMT) model; when arms in Figure 1 are equivalent to the circuits of a controlled voltage source, the model of MMC is an average EMT (AVE-EMT) model. The parameters represented by each variable in the Figure 1 are shown in Table 1.
Since the proposed UMS for MMC systems is achieved in dq frame, the model proposed in this paper can be derived by transforming the dynamic average model built in ABC frame based on Park transformation and dynamic phasor theory. First, with MDM, the overall MMC system is partitioned into five parts (specifically, they are MMC internal electrical system, DC interface system, AC system, signal sampling filter, and controller) and modeled separately. Then, by configuring and connecting the input and the output of the state-space model of each system, we can obtain the nonlinear state-space model of the overall MMC system.

Modeling in ABC Reference Frame
Since the MMC model established in this paper focuses on system operation and stability analysis without any consideration of AC or DC faults, the following assumptions are made for modeling MMC systems: 1) All three-phase components are symmetric; 2) The operations of the positive and negative arms of each phase are symmetric; 3) The modeling of a phase-locking loop (PLL) is not taken into account, because the voltage deviation of the point of common coupling (PCC) bus is diminutive during normal operation due to a relatively high ratio of short circuit of the AC system connected to MMC.
Remark 1. In order to reduce the complexity of the formula, the following formula derivation takes one phase as an example (j = A, B, C) and omits the subscript j representing three phases. According to Figure 1, the circulating current can be expressed as: and where C e is the capacitance value of the submodule.
The dynamic model of u Σ CP and u Σ CN are expressed as Eq. 3.
where i=i p −i n  For positive and negative bridge arms, the following equations can be obtained by KVL: By Eq. 4 minus Eq. 5, the dynamic equation of the circulating current can be expressed as Eq. 6.
Add Eq. 4 to Eq. 5, the dynamic equation of the AC current can be expressed as Eq. 7.
Here, in Eq. 7, e MMC is as follows.
When the three-phase voltage of AC system is symmetrical, the components of voltage, current and modulation signal are relatively simple (Jamshidifar and Jovcic, 2016), u s , u cv , u Σ CP , u Σ CN , i, i diff , m P and m N can be expressed in terms of its subcomponents as follows.
where the subscripts 0, 1, and 2 in the amplitudes (U s , U cv , M 1 , M 2 , represent the zero sequence, the fundamental-frequency, and the second-order harmonic components, respecitvely; θ = ωt (ω is the grid fundamental frequency) is a synchronized phasor angle with the grid voltage.

Modeling in dq Reference Frame
To obtain the steady-state time invariants model of MMC, we need to transform variables u s , u cv , u Σ CP , u Σ CN , i, i diff , m P and m N in ABC reference frame into dq reference frame by means of a park transformation P Park at ω. P Park and its inverse matrix P −1 Park are as follows.
Thus, u s , u cv , u Σ CP , u Σ CN , i, i diff , m P and m N in dq reference frame are expressed as follows by Eq. 12. u s u sd cos θ − u sq sin θ u cv u cvd cos θ − u cvq sin θ where the variables with subscripts d and q represent the fundamental frequency components of the corresponding variables in dq reference frame; the variables with subscripts d 2 and q 2 represent second-order harmonic components of the corresponding variables in dq reference frame; the variables with subscript 0 represent the DC components of the corresponding variables in dq reference frame.
To obtain the sub-components' dynamic equations of the variables u Σ CP , u Σ CN , i, and i diff in dq reference frame, we substitute Eq. 13 and Eq. 14 into Eq. 3, Eq. 6, Eq. 7 to derive the expression (Exp1) of Remark 2. Due to space constraints, detailed substitution processes are omitted. The substitution process contains the product term like m P u Σ CP and m N u Σ CN , which can be calculated by Eq. 15. The third-order harmonic component generated by the product term lets to more high-frequency components, but this paper does not focus on these, and the third-order harmonic component is out of consideration.
XY a + a d cos θ − a q sin θ + a d2 cos2θ + a q2 sin2θ where variables X and Y have the expressions in Eq. 16. And in Eq. 15, the coefficients a, a 0 , a d , a q , a d2 , and a q2 are as follows.
Additionally, another expression (Exp2) Finally, Exp1 and Exp2 are employed to build equations in which we let the corresponding terms equal to each other. And then we can get 10th order dynamic equations Eq. 19 of the MMC electrical system in dq reference frame as follows.
The model of MMC electrical system is sorted out into the state equation and the output equation as follows.
Remark 3. In this paper, the state variables, the system's inputs, and the system's outputs in the state equations and output equations are represented by x, u, and y, respectively. And different subsystems are represented by the different subscripts and superscripts. The subscripts AC and MMC represent the AC system connected to the MMC and the MMC system except for the AC system, respectively; the superscripts ele, int, fil, and ctrl indicate the MMC internal electrical system, DC interface, signal filter, and controller, respectively. Besides, the input u and the output y are divided into several subvectors with the superscript notation to facilitate the modular splicing of each subsystem, respectively.

Modeling the State Space Model for DC Interface
The DC interface of MMC is modeled to connect the MMC electrical system with the DC network conveniently. The DC interface of MMC is modeled as a controlled current source, whose output is i dc (i dc = 3i diff0 ). The MMC's DC side input is the DC voltage connected to the DC network nodes. For decoupling, a virtual resistor R n is introduced. As long as R n is selected large enough, the DC network and the MMC electrical system can be decoupled without affecting the modeling accuracy of the system (Pogaku et al., 2007). Besides, when a failure occurs to the DC side, the DC interface of MMC is usually connected with the current limiting reactance in series to prevent a large fault current impact. Finally, the equivalent circuit of the DC interface is shown in Figure 2. According to the equivalent circuit in Figure 2, its dynamic equation is expressed as Eq. 21.
where i dc MMC is the current of L xl ; u node is the voltage of the DC node connected to the MMC.
The model of the DC interface is sorted out into the dynamic equation and the output equation, which are expressed as follows:

Modeling the AC System
As to the modeling of AC system, a virtual resistor is also used to decouple the AC system from the MMC electrical system. The AC system in Figure 1 is reduced to the one shown in Figure 3. In Figure 3, L eq Ls+LT1 K 2 T + L T2 and R eq Rs+RT1 K 2 T + R T2 (here, R T1 and R T2 are the equivalent resistances of the primary and secondary windings of the transformer, respectively; L T1 and L T2 are the equivalent inductances of the primary and secondary windings of the transformer, respectively; L eq is equivalent inductance of AC system and R eq is equivalent resistance of AC system). According to the equivalent circuit in Figure 3, the state equation and the output equation of the AC system in dq reference frame are expressed as Eq. 23. L eq di dAC dt − R eq + R n i dAC + L eq wi qAC + R n i d + u sd K T L eq di qAC dt − R eq + R n i qAC − L eq wi dAC + R n i q + u sq K T u cvd R n p i dAC − i d ( ) where i dAC and i qAC are d-axis current and q-axis current of AC system in dq reference frame, respectively; u sd is equal to the phase voltage amplitude of the AC grid and u sq = 0 if the grid voltage directional control is adopted.
The model of AC system is sorted out as Eq. 24 .
where state variables x AC [i dAC , i qAC ] T and input variables

Modeling of The Signal Filter
The input signals of the MMC controller are the measurement signals of MMC's parameters. There is noise and interference in the actual measurement, and signals need to be filtered and then sent to the controller. Therefore, the modeling and analysis of the signal filter are required. In this paper, the first-order low-pass filter as shown in Figure 4 is used, and the dynamic equations of the filters are expressed as Eq. 25.
The model of filters is sorted out as Eq. 26. _

Modeling of the Controller
The controller plays a decisive role in the dynamic behavior of MMC. The double closed-loop vector control strategy based on dq reference frame, which is a standardized control mode of MMC, can realize the decoupling of active and reactive power. Therefore, in this paper, the controller is modeled in the dq reference frame. Since MMC usually contains multiple control modes which need to be switched with the changes of the operation state of AC/DC  power grids, this paper uses the unified modeling method for MMC's controller to simplify the modeling and realize the normalization of the controller model. Thus, remodeling the MMC systems is avoided when the MMC's control modes need to be changed, increasing the flexibility of modeling the AC/DC power grids. Different control modes can be selected in the unified model by configuring control mode variables, avoiding the inconvenience of modeling the MMC separately for different control modes. Figure 5 is the diagram of the controller using unified modeling, and Table 2 shows the configuration of the control mode variables for different MMC control modes.
In Figure 5, U dcref , U dref , P ref , and Q ref are the references of DC voltage, AC voltage, active power, and reactive power, respectively. x din , x dout , x qin , x qout , x dcsc , and x qcsc are the states of the integrators. k do p (k qo p ), k di p (k qi p ), and k dc p (k qc p ) represent the proportional coefficient of the outer loop, the inner loop and the circulating current suppression (CCS) loop in d-axis (q-axis), respectively; k do i (k Therefore, the dynamic model of the overall system is derived by connecting each subsystem according to the connection relationship of input and output. The dynamic model of the overall MMC system with the MDM is shown in Figure 6.
The MDM makes modeling MMC systems more expansible to adapt to different hybrid AC/DC power grids. For example, if one of the subsystems of the MMC systems needs to be changed, we only need to remodel the subsystem rather than the entire MMC system. Besides, due to decoupling and modularizing the MMC systems, the small-signal model of the overall MMC system could be developed directly through linearizing and splicing proposed model, which enables our model to analyze the small-signal stability of large-scale hybrid AC/DC power grids.

SIMULATION RESULTS
For purposes of validation, a simulation system is shown in Figure 7. The system consists of an AC system, an MMC, and a resistive load. To verify the accuracy and superiority of the established model, we compared the proposed model with D-EMT and AVE-EMT models by the simulation test system. Table 3 and Table 4 list the system parameters and control parameters, respectively.
Here, we set the control modes of MMC as constant DC voltage and constant reactive power, and the dynamic response under load mutation and control instruction step are compared under closed-loop control. The working condition is set as follows: at 2 s, a load with a resistance of 100 Ω is suddenly put into; at 3 s, the resistance increases from 100 Ω to 200 Ω; at 4 s, the DC voltage steps from 1 pu to 1.05 pu; at 5 s, the DC voltage steps from 1.05 pu to 1 pu.
The per-unit (pu) wapveforms of u dc , i dc , i d , i q , u cvd , and u cvq are shown in Figures 8-13. By testing the above working conditions, it can be seen from these figures that the accomplished state-space model of overall MMC system is highly consistent with the detailed electromagnetic transient model and the average electromagnetic transient model. The accuracy and validity of the proposed modeling method are verified.
In addition, Table 5 shows the comparison results of the actual simulation time of the three models. It is at least 59.8 times more efficient than the D-EMT and 4.6 times more efficient than the AVE-EMT for the same simulation conditions. Therefore, the proposed model greatly accelerates the simulation speed while obtaining high precision.

CONCLUSION
A unified modeling scheme (UMS) for MMC systems in a synchronous (dq) reference frame is proposed in this paper. A simulation test system verifies our model in MATLAB/ Simulink.
(1) The modular decouple modeling (MDM) and the unified controller modeling make modeling MMC systems more flexible and expansible to adapt to different hybrid AC/ DC power grids.
(2) The proposed model shows an accurate replication to the dynamic performance of the EMTs (D-EMT and AVE-EMT) model. (3) The proposed model greatly reduces the simulation time.
For the same simulation conditions, it is at least 59.8 times more efficient than the D-EMT and 4.6 times more efficient than the AVE-EMT. Therefore, our model is suitable for simulating the large-scale hybrid AC/DC power grids. (4) The small-signal model of the overall MMC system could be developed directly by linearizing and then splicing proposed model. Therefore, the proposed model is suitable for studying the stability of small-signal.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.