Inverse Application of Artificial Intelligence for the Control of Power Converters

This article proposes a novel application method, inverse application of artificial intelligence (IAAI) for the control of power electronic converter systems. The proposed method can give the desired control coefficients/references in a simple way because, compared to conventional methods, IAAI only relies on a data-driven process with no need for an optimization process or substantial derivations. Noting that the IAAI approach uses artificial intelligence to provide feasible coefficients/references for the power converter control, rather than building a new controller. After illustrating the IAAI concept, a conventional application method of artificial neural network is discussed, an optimization-based design. Then, a two-source-converter microgrid case is studied to choose the best droop coefficients via the optimization-based approach. After that, the proposed IAAI method is employed for the same microgrid case to quickly find good droop coefficients. Furthermore, the IAAI method is applied to a modular multilevel converter (MMC) case, extending the MMC operation region under unbalanced grid faults. In the MMC case, both simulation and experimental online tests validate the operation, feasibility, and practicality of IAAI.

AI applications in the power electronics domain, particular interests include the design and optimization of components, fault diagnosis, preventive maintenance, reliability analysis, and control strategies [3], [4], [5].
AI can be implemented using predefined rules; but in most cases, AI relies on machine learning (ML) algorithms to perform specific AI tasks via a model training process. ML algorithms can learn the rules/relations from training data and improve the trained models automatically through experience. Therefore, the largest use of AI in power electronics is with ML. Other applicable AI methods include expert systems, fuzzy logic, and metaheuristic methods [3]. To distinguish ML from the metaheuristic search algorithms, Gao et al. [6] proposed a simple algorithm categorization that comprises the search algorithm and the surrogate algorithm. This article will only focus on the AI applications using ML algorithms. However, the general inverse thinking of the proposed AI application would also apply to other AI algorithms.
In [3], an overview of AI applications for power electronic systems was given where more than 500 publications were reviewed. All the related applications were generally categorized into three distinctive life-cycle phases of power electronic systems: design and optimization, control, and maintenance. According to the statistical Sankey diagram of AI applications in the three life-cycle phases (see Fig. 3 in [3]), ML-based classification was nearly all used for the maintenance of power electronic systems, rarely for the control; Instead, regression and optimization techniques are used for the control phase. Different ML classification methods have already been applied in the control of power electronic converter systems, for example, support vector machine [7], [8], [9] and neural network (NN) pattern recognition [10], [11]. In this article, a novel application of AI/ML is proposed, which can generally fit with both regression and classification techniques; additionally, this idea does not require an optimization process.
ML algorithms can be categorized into three main groups: supervised learning, unsupervised learning, and reinforcement learning [2], [3], [5]. According to the statistics in [3], usage of supervised learning is 91% of all ML applications for power electronics applications. Therefore, supervised learning is the main approach for ML applications in this area. In particular, the most popular implementation of such methods is based on artificial NNs (ANNs), which share some principles with biological neurons in brains [5], [12]. The main three classes 0885-8993 © 2022 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
of ANN are feedforward, convolutional, and recurrent NN [2], [5]. Among them, feedforward ANN is the simplest and it is a universal function approximator with strong generalization capability [13]. Therefore, this study will mainly investigate the inverse application (IA) method of feedforward ANNs. Different from the recurrent NN, which stores past outputs as a part of inputs, the proposed IA method directly swops places of the inputs/outputs in the original system. After ANN training, the trained ANN can smoothly provide the desired coefficient or reference for the power converter control. Advanced control methods for power electronic converters in distributed generation systems and microgrids were reviewed in [14]. The control methods can be divided into model-based and data-based strategies. The first category, model-based control, considers state feedback control, sliding mode control, and model predictive control. Examples of the other category, databased control, are ANN and fuzzy control, which are explicitly designed by using the available input/output data to do the functional approximation for system control. It is important to highlight that the key role of this article is not using ANN to approximate/imitate a power system controller, but to provide suitable parameters (e.g., ratios, references) for the system control. By running multiple simulations to collect data, this role can be achieved by the inversely designed ANN(s).
The most commonly used approach of AI applications in power electronic systems is training ANNs offline as the surrogate models, for instance, weighting factor tuning [4], optimal design for reliability [12], [15], ANN imitation controller [10], [11], [16], [17], [18], [19], and open-switch fault diagnosis [20]. The training data can be collected either from the real systems or from a model of the actual plant. After training and validation, the surrogate models can be applied online, providing desired outputs when given suitable inputs in the operation of real systems. As the ANN surrogate only involves basic algebraic operations, the process of output generation is extremely fast. Therefore, when searching for the optimal design of the studied system, an exhaustive algorithm can be used to do the optimization based on the trained ANN(s) [12], [15], the so-called optimization-based design process [21].
Most of the existed studies train the surrogate models just following the original input-output relations in power electronic systems. In contrast, this article proposes a novel application idea, the inverse application of artificial intelligence (IAAI) method, by swopping the input-output locations (see Section III). This method can find the optimal design (or desired parameters) through a trained surrogate model but without the conventional optimization process, which should be much easier to implement. This is the main motivation for the research of this article. Another motivation is that it provides a good way for other similar control parameter recognition problems, not limited to the control of power converters.
This article is organized as follows. The conventional optimization-based design using ANN is illustrated in Section II. Then, in Section III, the proposed IAAI method is introduced and compared to the inverse function concept. Based on that, three control cases of power converter systems are elaborated one by one for the method validation, in Sections IV, V, and VI, respectively. The first case is using the conventional optimization-based design approach while the other two are based on the proposed IAAI approach.

II. ANN PRINCIPLES AND OPTIMIZATION-BASED DESIGN USING ANN
This section briefly introduces the fundamentals of feedforward ANN. Then, the conventional optimization-based design using ANN will be considered.

A. Feedforward ANN
Feedforward ANN is selected as the desired surrogate model in this work. Although feedforward ANN is the simplest type of ANN devised, it can demonstrate an excellent regression ability for the input-output mapping. Unlike the functional fitting (e.g., polynomial, exponential), users of feedforward ANN do not need to specify any function for this relationship mapping. It has been applied to various electrical engineering problems, from the optimal design for reliability of power electronic converters [12], [15] to the permanent-magnet motor performance correction [22], [23].
As shown in Fig. 1, a basic feedforward ANN comprises an input layer (x, marked in red), one or more hidden layers (h, marked in green), and an output layer (o, marked in red). Each layer has one or several artificial neurons, which receive and process signal(s) from predecessor neurons, after that neurons pass the processed data to the next layer.
In a layer l (hidden layer or output layer), to calculate the output of a certain neuron n l i , the outputs of all the neurons p l−1 j in Layer l − 1 (j = [1..N l−1 ] , N l−1 denotes the neuron number of Layer l − 1) are multiplied with given weights ω l ij and then the bias b l i is added. The result is further processed through an activation (propagation) function f σ that usually takes the form of a sigmoid function, i.e., f σ (A) = 1/(1 + e −A ), to generate the output p l i . This output then becomes one of the inputs for the next layer, l + 1, and the same procedure is repeated to calculate the output of other neurons in layer l. In Layer 1 (input layer), p 1 i takes the form of inputs through the neuron n 1 i . On the other side, Layer L (output layer) typically uses the linear activation function to integrate signal(s) of Layer L − 1 for the desired output data p L i . In summary, the complete signal flow of ANN can be described as follows.
1) Layer 1 where x i are the inputs.
2) Layers l = 2, ..L − 1 (hidden) where o i are the outputs. Therefore, from inputs to outputs, feedforward ANN only involves mathematical calculations. Neuron numbers in input/output layers are determined by the training dataset, but the hidden-layer neuron numbers can be set as a developer for a good regression performance [4], [20]. Moreover, such a general nonlinear model can approximate any given input-output function with arbitrary precision [13]. Its excellent generalization ability ensures that the trained ANN surrogate can replace the original detailed system to smoothly perform the desired tasks.

B. Optimization-Based Design Using ANN
As shown in Fig. 2(a), the optimization-based design process is conventionally illustrated by three parts: optimization engine, objective function, and detailed analysis [21]. The optimization engine is depicted at the outer level because its computational algorithm is operated on the design variables and the objective function (during all the optimization generations). The detailed analysis is the modeling basis to calculate the desired objective values and check the optimization constraints.
By using ANN, a data-driven approach, the mapping from variables to objectives can be explicitly represented by a trained ANN; thus, there is no need for substantial derivations in the original analysis module. However, in some cases, the raw data may need to be preprocessed before the ANN training. Furthermore, as mentioned, evaluation of ANN is generally very computationally light; Due to that, an exhaustive algorithm can be used as the optimization engine, which can also efficiently output the optimal design.
As shown in Fig. 2(b), after training the ANN surrogate model(s), many design points can be sampled with very small steps in the design space. Then, their corresponding outputs can be quickly generated via the trained ANNs. Among these input/output pairs, the optimal min/max design will be easily obtained by sorting the obtained objective values. Therefore, in a conventional way, the role of ANN model is to replace the original system and efficiently generate the objective values for an optimization problem.

III. IA OF ARTIFICIAL INTELLIGENCE
Based on the conventional application method of ANN, this section will introduce the proposed IA method of ANN. Furthermore, the differences and connections between IAAI and the inverse function will be discussed.

A. IAAI Method
ANN is based on a nonparametric function approximation model in supervised learning, purely mathematic. There is no requirement for ANN inputs and outputs. Moreover, the user does not need to specify the relationship between the predictors (input data) and responses (output data) with a predetermined regression function. This flexibility is the theoretical basis of the proposed IAAI method.
In Section II, the ANN built for conventional optimizationbased design follows the original input/output relations in the studied system. However, the fact is that the desired optimal design (obtained via optimization) locates at the input layer of ANN, i.e., the logic direction of optimization-based design is from outputs to inputs [see Fig. 2 Inspired by this fact, this article proposes to swop the locations of original inputs/outputs and build ANN(s) mapping from outputs to inputs, as shown in Fig. 3. There may be no physical or electrical meaning in this mapping but, after data collection and ANN training, the desired parameters in the studied system (e.g., ratios, references) can be directly obtained by giving just one feasible combination of original outputs (i.e., ANN inputs), without an optimization process. Therefore, the proposed IAAI method should be easier than the conventional optimization-based design approach because it deletes the optimization engine. Moreover, it has the potential to discover unknown ways to address real problems. Noting that, the proposed IAAI model is data-based, independent with the original system and the conventional approach. Therefore, the used ANN structure in IAAI method is flexible, can be totally different from that of conventional approach.
In Section V, the proposed IAAI method will be used to give a desired droop-coefficient design for the current sharing; furthermore, in Section VI, an inversely designed ANN is trained to provide feasible injecting current references for the offline/online converter control operation.

B. Comparison With Inverse Function
In mathematics, an inverse function is a function that "reverses" another function. Not all functions have inverse functions. Those that do are called invertible. For a function f: X → Y to have an inverse, it must have the property that for every y in Y, there is exactly one x in X such that f(x) = y. This property ensures that a function g: Y → X exists with the necessary relationship with f.
Regarding the original input/output relation as a function f: X → Y, then, both the IAAI model and inverse function can provide X with a given Y. However, there is no limit for training an IAAI model while inverse function does not always exist for f. In addition, if an inverse function exists, it should be theoretically and deterministically unique. Namely, given Y, only one X can be obtained. In contrast, as the AI model training starts from random values, the outputs of the trained IAAI model may vary after different training attempts.
Therefore, the proposed IAAI model is much more flexible and easier to be generalized than the inverse function concept. The following contents will discuss three different cases of power converters. The conventional optimization-based design approach will be used in Case Study I (see Section IV), whereas the proposed IAAI method will be applied to the other two cases.

IV. CASE STUDY I-OPTIMIZATION-BASED DESIGN FOR CURRENT SHARING
In Sections IV and V, two different application methods of ANN will be discussed and compared. They are both used for  the optimal droop coefficient design in a multisource dc microgrid system. This section will start with a two-source islanded microgrid system using the conventional optimization-based design method. The system diagram is shown in Fig. 4. G 1 and G 2 represent the two-generation sources for this microgrid. Each of them is feeding to an active rectifier (AR), which is parallel connected to the shared dc bus via a cable. This bus then supplies power to a simple linear load. Two ARs are controlled using the voltage-mode droop control scheme for current sharing between them. The following two sections will first introduce the used droop control method and then discuss how to use the ANN-based optimization to choose the best control coefficients for this microgrid system.

A. Analysis of the Conventional Droop Control Method
The voltage-mode droop control scheme is shown in Fig. 5. The control structure is basically cascaded. It is made up of an inner loop for current control and outer loops for flux weakening and dc-link current control. The flux weakening control is employed to prevent the machine from operating above the base speed. The droop controller is responsible for the regulation of the dc-link current. The d and q axis reference currents supplied to the current controller are generated from the flux-weakening and dc-link controller, respectively. Furthermore, vector control is employed to decouple the machine, thus, making it easy to independently control the torque and flux. A detailed analysis about the control structure and design can be found in [24]. In this scheme, the measured branch output dc current I dc,i is used to generate the reference voltage V * dc,i , and this is expressed as follows: where i = 12 is the number of subsystems, V * dc is the rated dc bus voltage (270 V in this article), V * dc,i is the calculated reference voltage for each subsystem converter, I dc,i is the output current of each converter in the system, and k d,i is the droop coefficient. The current sharing ratio among the two sources in steady state is as expressed in (5), provided the effect of cable impedance on load sharing is ignored The droop coefficients k d,i of the converters are typically chosen to be proportional to the generators ratings to ensure an accurate current sharing, based on the assumption that the same nominal voltage V * dc is applied to each of the droop characteristics.
When the voltage drop on the cable (in Fig. 4) is put into consideration and the voltage control dynamics are ignored, the steady-state dc bus voltage can be expressed as where V b is the main dc voltage, and R i is the resistance of the individual cable connecting the ith source to the bus. Hence, the current sharing among the sources, assuming they are supplying together can be expressed as Obviously, the cable resistance and droop gain will affect the power sharing ratio of the sources in steady states. By increasing the droop gain or cable resistance, the power output of the sources will be decreased. Furthermore, when the droop gain and cable resistance are similar, the accuracy of the power sharing among the sources will be degraded due to the existence of the cable resistance.
Generally, two approaches are commonly used in to realize accurate load sharing. In the first approach, the droop coefficient is increased much higher than the cable resistance (k d,i R i ) such that the influence of the cable resistance on accurate load sharing becomes negligible. However, this will lead to poor voltage regulation and may affect the system's stability [25] and power quality [26]. Also, in low-voltage dc microgrids (for example power systems on-board aircraft), the cable resistance cannot be simply ignored [25], [27]. This is because the line impedance in the low voltage dc microgrid is predominantly resistive.
In the second approach, the droop coefficient of the converters is compensated based on the estimated line resistance connecting the parallel-connected converters to the dc bus as can be found  [27]. This control method works in the same way as a virtual negative resistance to cancel the effect of the unequal cable resistance on accurate current sharing through compensation. However, the cable resistance is required for the compensation method, which is usually hard to obtain for real applications. The ANN-based optimization can provide an effective way to get the optimal design of droop coefficients without knowing the resistance, as follows.

B. ANN-Based Optimization
Based on the optimization-based design approach (discussed in Section II-B), an NN can be trained mapping from coefficients to the output dc currents, for this two-source current sharing problem. Therefore, the ANN represents the following relation: Based on the nominal value of k d,i , a range can be preassumed for every droop coefficient for this optimization, for example, ±10%. Then, to collect the ANN training data, the data points can be evenly sampled in this design space followed by getting the corresponding outputs (I dc,i ) via the detailed simulation. Using the training data, the desired ANN can be trained offline, i.e., updating the internal weights (ω) and bias (b) of ANN. Therefore, following the original input-output relation in the system, the trained ANN can predict two output currents when given the combination of two droop coefficients. Since the ANN is very computationally light, after training, the exhaustive algorithm can be used for optimization. Namely, sample many design points in the design space then generate all the output currents via ANN. Based on that, the optimal design, which has the minimum difference of the two output currents, can be quickly found.

C. Optimization Results
First, the detailed simulation model of the dc microgrid shown in Fig. 4 was developed in MATLAB/Simulink. The electrical power system and line parameter used for the simulation are as shown in Table I.
The design space and the sampling step of the droop coefficient used for data generation and optimization are presented in Table II. Based on the sampling step for the data generation, a total of 961 combinations of the droop coefficient was used as inputs to the detailed simulation model. Hence, for every combination of the droop coefficient, the detailed simulation model is run and the output current of the converters are recorded.
The data generated are then used to train the ANN model. The ANN was trained using the train command in MATLAB, which is a part of Deep Learning Toolbox [28]. The training performance was evaluated using the root-mean-square error (RMSE). The calculated RMSE was 0.025944 A and 0.021272 A for I dc,1 and I dc,2 , respectively.
In the optimization stage, the trained ANN model was used to evaluate 724 201 (based on the sampling step shown in Table II) combinations of droop coefficients by predicting their corresponding output dc currents. Thereafter, the optimal droop coefficient combination, which will yield the desired accurate current sharing between the converters, was obtained as k opt dc,1 = 0.2459 and k opt dc,1 = 0.2189 (in a few seconds). The obtained optimal droop coefficients are then used in the detailed simulation model to evaluate the performance of the conventional droop control method. As shown in Fig. 6, the optimal droop coefficient can enhance the current sharing performance of the conventional droop control method, with I dc,1 = 48.72 A and I dc,2 = 48.74 A.

D. Discussion
Even though in this two-source microgrid case, the ANNbased optimization approach can provide a good droop coefficient design to achieve accurate current sharing without knowing the corresponding subsystem cable resistance, this optimization approach would become quite complicated for the cases with three or more sources. The reason is that the number of output currents will be 3+, which makes it difficult to set the two or more optimization objectives for the ideal current sharing. Regarding multiobjective optimization, it is a common sense that all the objectives should be integrated into one to determine the optimal design; However, the integrated function, as well as the weights of different objectives, bring a new complexity to the optimization problem.
To address the aforementioned problems, the proposed IAAI can provide an excellent way to find the optimal droop coefficient design, because this IAAI method does not need an optimization process and it is feasible for the microgrid case with an arbitrary number of sources, as below.

V. CASE STUDY II-IAAI METHOD FOR CURRENT SHARING
In this section, the proposed IAAI method will be employed to easily find the best design, which can achieve accurate current sharing for a multisource microgrid. Based on the two-source case in the last section, this section will elaborate on a threesource case using IAAI but note that the proposed method can be easily generalized for the system with four or more sources.

A. IAAI-Based NN Design
As discussed in Section III, the IAAI method swops the original locations of inputs and outputs from the studied system to train the neural net. Therefore, in this three-source currentsharing case, the ANN will be designed to map from the output dc currents to the droop coefficients, as shown in Fig. 7. The designed ANN represents the following relation: Similar to the Case Study I, the collection process of training data can just be running the multiple simulations for the evenly distributed samples. After getting the coefficient sample data and the corresponding dc current data via simulations, they should be processed following (9) to train the desired ANN. After the ANN training, instead of using the exhaustive algorithm to do an optimization, an intersection-based approach will be employed to directly give the optimal coefficient design via the trained ANN, see below.

B. Intersection-Based Approach
In this three-source case, most of the parameters are the same as the aforementioned two-source case, including the nominal droop gains, k d,i design range, C i , C b , line impedance of two sources, etc. The impedance values of the additional (third) line are given in Table III. Besides, the droop control scheme is also the same as in the aforementioned case. In this section, the data distribution of the dc current samples will be analyzed to give a desired current-sharing value, which will then be feedforward to the trained ANN. The theoretical basis is that, in general, the shared current value should be just one desired value for all the output currents. Therefore, according to the collected three-dimensional current data, an intersection can be generated as the feasible design range for the current sharing value. Any value out of this range would be unfeasible for current sharing in this specific system. After getting this intersection, the middle point will be chosen as the final desired current sharing value.
All the output current values of data samples are depicted in Fig. 8 Fig. 8. To generate a feasible range for every output current, first get the maximum value of three lower boundaries, which is 29.593 A (from I dc,1 , as shown by orange dotted lines in Fig. 8); Then, get the minimum value of three upper boundaries, which is 34.2424 A (from I dc,2 , as shown by blue dotted lines in Fig. 8). Based on these two values, the feasible design range (intersection) can be given as [29.593, 34.2424]. Since it is for the current sharing application, this feasible range is for all the output currents (I dc,1 , I dc,2 , and I dc,3 ), not just for a specific one. Therefore, the corresponding three-dimensional feasible range for the current sharing can be confirmed using this feasible range, which is demonstrated by a red solid line in Fig. 8. Finally, choose the middle point of this intersection (marked by a red star) as the final shared current value of all the three sources, which is 31.9177 A.

C. IAAI Design Result and Validation
To train the proposed ANN in (9), samples were evenly collected in the 3-D design space, where eleven values were sampled for each k d,i . Therefore, the number of design points in the training dataset is 11 3  Finally, to validate the obtained k d design, they were input to the three-source microgrid system; after simulation, the obtained dc currents are I dc,1 = 31.94 A, I dc,2 = 31.92 A, and I dc,3 = 31.90 A, as shown in Fig. 9. A good current sharing has been achieved.

D. Discussion and Robustness Study
Compared with Case Study I, which uses the conventional optimization-based approach, in this section, the IAAI approach provides an easier way for the optimal droop coefficient design. After ANN training, the optimal design can be found based on just one I dc design point, rather than doing an optimization using hundreds of points. In addition, the IAAI approach can be easily  generalized to the microgrid case with 3+ sources, whereas, for the optimization-based approach, it will be hard to balance the increasing number of objectives.
It is worth noting that, as discussed in [29], the intersectionbased approach can find almost the same optimal coefficients with the line droop compensator method (see the work in [27]), which is based on the subsystem cable resistance. In contrast, the intersection-based approach just analyses the sample data distribution thus, it does not need to know the cable resistance beforehand, which would be very hard to estimate in a real microgrid system.
To further validate the proposed IAAI approach, a robustness study was undertaken based on changing the MG line resistance and inductance. Based on the aforementioned case, three different groups of parameters were considered, which are as follows.
1) A huge difference (doubled) in the system line resistances R 1 = 6 mΩ, R 2 = 60 mΩ, R 3 = 30 mΩ, and inductance of three cables stay unchanged. 2) Resistance of three cables is not changing but inductance is doubled, i.e., L 1 = 2 μH, L 2 20 μH, and L 3 = 10 μH. 3) A small difference in the system cable resistance, R 1 = 5 mΩ, R 2 = 34 mΩ, and R 3 = 10 mΩ, with inductance unchanged. Following the same IAAI approach, after setting each parameter group, 1331 data were newly collected to train new ANNs. Finally, the optimal k d designs can be found via the trained ANNs when given the desired I dc values (using the aforementioned intersection-based analysis).
The following optimal k d is obtained for each of the case studies: 1) k d, 1  As summarized by Table IV, the proposed IAAI method works very well for all these three situations. It can be observed from the results in the Group 1 that, despite the huge difference in the cable resistance, the proposed approach can still find the optimal k d to yield desired current sharing. As shown in Group 2, the same current sharing and optimal droop coefficient are obtained even though the cable inductance is doubled, making the proposed method robust to the inductance changes.

E. Stability Issue
The stability of this MG system can be verified by performing small signal stability around the MG steady-state operating point. Detailed comparative stability analysis of the droop control method and the impact of the droop coefficient have been carried out in [30]. To ensure a stable operation, the maximum value of k d,i can be given as: dc is the nominal dc voltage, P CPL is the CPL power, and R i is the cable resistance. Therefore, for the MG parameters (see Table I) used in this article and for the training data extraction, the maximum droop coefficient is 0.699. As shown in Tables II and III, the design ranges of k d,i used in this article are all much smaller than this max limit. Thus, it can be concluded that the IAAI-based k d,i design is well within the acceptable design range for a stable operation.

A. Motivation of This Case Study
The modular multilevel converter (MMC) is a promising topology for converter-based high voltage direct current (HVdc) systems because of the following pros: lower harmonics, modularity, scalability, and few harmonic filter requirements [31]. However, the ripples of the capacitor voltage in MMC will be enlarged if under unbalanced grid fault conditions. Since high capacitor voltage ripples deteriorate their lifetimes and may even cause the tripping problem, it is essential to regulate the ripples. To do that, it is a common way to inject the circulating currents with a double fundamental frequency. However, finding a proper circulating current reference under various unbalanced grids to achieve desired ripples analytically is very complicated [32], [33], [34]. The analytical frequency-domain methods [32], [34] for reducing the ripples require strong control expertise, which makes them difficult to reproduce or understood by engineers in other fields. In contrast, the proposed IAAI does not require any control or frequency-domain derivation, an easier approach.
In this section, the proposed IAAI method will be used to train an ANN, which acts as a dedicated surrogate model to provide a proper circulating current reference for the control of an MMC under unbalanced grid faults. In that way, the MMC operating region can be effectively extended. After training, the designed ANN model will be applied to simulations and an experiment rig for the validation, providing the desired circulating current reference to reduce the capacitor voltage.
In the following sections, the MMC operation principle and control will be first introduced. After that, the purpose of using ANN and the ANN design details will be given. Then, the validation results from both simulation and experiment will be presented. Finally, the MMC stability issue is discussed.  Fig. 10 shows the topology of a half-bridge submodule (SM) MMC. It is a three-phase grid-connected MMC, where each phase has two arms: upper and lower arm. Each arm is comprised of N series-connected half bridge SMs, and an arm inductor (L M ) [35]. The SM capacitor voltage is kept close to the rated dc voltage by the MMC controller. In this way, the single SM can be controlled as a voltage source by inserting or bypassing the SMs. The MMC output ac voltage can be controlled by changing the number of inserted SMs [36], [37].

B. MMC Topology and Control
The directions of the upper arm current (i uk ) and lower arm current (i lk ) are shown in Fig. 10, k denotes the ac phase. By applying Kirchhoff's voltage law to the MMC circuit, the MMC dynamic equations can be derived as follows: where V d is dc-link voltage and i d is the dc current. v cuk and v clk are the upper and lower arm voltage in phase k, respectively, i uk and i lk are the upper and lower arm currents in phase k, respectively. k = 0, 1, 2 (0 for phase A, 1 and 2 for B and C, respectively). v gk is the ac voltage from the grid side. L g is the output inductance and i sk is output current. The output current i sk and circulating current i ck can be defined as follows: Based on (14) and (15), the output current and circulating current can be controlled.
The control block diagram of the proposed method is shown in Fig. 11. The MMC controller comprises of two main parts: First, output current controller: proportional resonant (PR) controller is used in the output controller to control the output current of the MMC in grid-connected operation. This controller is conventional, and more details can be found in [36]; Second, proposed ANN and circulating current controller: When an unbalanced grid fault happens, the proposed ANN model will generate three-phase circulating current references, based on desired capacitor voltagesV cu , detected grid voltage dip factor D, and the grid fault type. Then, the circulating current controller enables the MMC to track circulating current references.
Therefore, the PR controller is used to track the output current references while the proposed ripple reduction method reduces the SM voltage ripple by injecting ac circulating current under unbalanced grid conditions. The energy controller ensures that the total amount of energy stored inside the converter can be always controllable under unbalanced grid conditions. The detailed information about the energy controllers can be found in [36] and [38].

C. Unbalanced Grid Condition and the ANN Deployment
The proposed reference surrogate model is constructed by using a three-layer ANN. The number of hidden-layer neuron can be set as an algorithm developer but in this case, it is simply fixed as nine because the designed ANN can be easily trained, and the resulting ANN can give a good test performance. As shown in Fig. 12, there are four design variables in this case, whereÎ * cACa ,Î * cACb ,Î * cACc are circulating current peak value references and D is grid dip severity factor. The severity of two-phase-to-ground grid fault depends on D. The range of D is [01], where 1 means normal grid, and 0 means short circuit, more practices about D can be found in [39] and [40].
The proposed method can also easily be extended to any unbalanced grid condition. There are four types of unbalanced grid conditions [39], [40]: Two-phase-to-ground fault, three-phase-to-ground fault, single-phase-to-ground fault, and phase-to-phase short circuit fault. The vector definitions of other unbalanced grid conditions are shown in Table V. By the type of unbalanced grid condition and changing D from [0, 1], all possible fault scenarios can be covered by doing numerous parallel simulations and extracting corresponding data. This process can be significantly accelerated by paralleling the tasks using a computer cluster that contains many CPU cores. Therefore, the only limitation to extend our method to any other fault condition is computational capacity. If we have enough computational power, the data for other unbalanced fault conditions can be quickly collected. Then, new ANNs can be trained by the collected data and the circulating current reference for different unbalanced grid conditions can be calculated easily. The specifications of studied simulation and experiment systems are given in Table VI. After the data collection, following the IAAI design, the proposed ANN surrogate represents the relationship mapping from the capacitor voltage and D to the desired circulating which is shown in Fig. 12.V cua ,V cub , andV cuc mean the peak value of capacitor voltage ripple in Phases A, B, and C, respectively. It is noted that the grid dip severity factor D is not located in the ANN outputs, which is mainly because the aim of ANN design here is to provide the circulating current reference, rather than predicting the grid dip severity condition. Another important reason of regarding D as an input is that D is a crucial parameter for the unbalanced grid fault condition, which should be an essential information for the desired ANN. Therefore, this ANN design represents a feasible and practical variant of IAAI method: the ANN inputs and outputs are not necessarily swopped for all the elements, some important elements may stay in the ANN inputs, which can feedforward important (even essential) information to the desired ANN.

D. Data Collection and ANN Training
The feedback of the designed ANN is triggered when the unbalanced grid detector detects an unbalanced grid fault. After training, the ANN can give feasible circulating current references (i * cACk ) to control the SM capacitor voltages in a desired way. This experimental case takes two-phase-to-ground grid fault as an example. The vector definition of the two-phaseto-ground grid fault can be described based on [40] aŝ whereV ga_pu ,V gb_pu , andV gc_pu are per unit values of the grid voltages in Phases A, B, and C, respectively. Circulating current circulates inside the MMC without affecting the ac output currents. It only influences the internal performance of the MMC system. The circulating currents are defined as a parameter containing both dc and ac components as (13).
Regarding the training data generation, they can be extracted either from a detailed simulation or from an experimental setup. In this work, the data were collected from simulations, then the method was validated in both a high- . Therefore, the total number of data points is 5 × 7 × 7 × 7 = 1715. The output dataV cua,b,c can be then collected after each time of running the model. The paralleled simulations helped to accelerate the simulation process. In particular, a workstation with a 24-core CPU was utilized for the data collection. The overall data collection time was approximately 14 min for 2560 samples and was around 10 min for 1715 data. Based on the collected data, the ANNs were also trained using the train command in MATLAB. For the training parameters, the learning rate is set as 0.1, the training goal (RMSE) is set as 0.001, and the maximum epoch number is 500. The designed ANN can be trained in a few seconds on a standard computer. Since the training starts from random values, the training was tried ten times and the best one is picked for the following offline/online validations.

E. Simulation Results
After training, the ANN model was finally used to calculate the injected circulating current references for the MMC system under grid faults. The inputs of the ANN model are the grid dip severity factor D and safe SM capacitor voltage limit, then the outputs of the ANN are the three-phase circulating current references. In this section, the trained ANN model was compiled in the Simulink model. The simulation results of single-phaseto-ground and three-phase-to-ground are shown in Figs. 13 and 14, respectively.
Obviously, three-phase capacitor voltages are balanced under a balanced grid. In addition, the voltage is within the safe limit, as shown in Figs. 13 and 14(a1). The average ripple (peak-topeak value of capacitor voltage) is 38.72 kV, and the unbalanced degree (UD) is 0.046%. UD is defined in (18) as whereV cua,b,c is SM capacitor voltage peak value in phases A, B, and C, respectively. V avg is the average voltage of three-phase capacitor voltages. The capacitor voltages become unbalanced under singlephase-to-ground and three-phase-to-ground fault conditions, as shown in Figs. 13 and 14(b1). In those figures, only the upper arm SM capacitor voltages are shown because the upper and lower arms are symmetrical. And, the capacitor voltage balancing algorithm is applied in modulation, as shown in Fig. 11, then the SM capacitors in one arm are identical; Thus, four capacitor voltages in one arm look like only one voltage. Moreover, the capacitor voltage amplitudes exceed the limit, which are shown in Figs. 13 and 14(b1). The average ripple increases to 46.03 kV in both fault conditions. The UD increases to 1.51%.
The capacitor voltages can be effectively reduced to a safe voltage limit by the proposed IAAI method, as tested in the simulations. As shown in Fig. 13(c2), under the single-phase-toground condition, the amplitudes of injected ac circulating current components areÎ cACa = 391.8 A,Î cACb = 60.56 A, and I cACc = 60.67 A, respectively. For the three-phase-to-ground condition in Fig. 14(c2),Î cACa = 276.2 A,Î cACb = 324.3 A, andÎ cACc = 387.5 A. As a result, the average ripple turns to be 39.87 kV in both fault conditions, and the UD is both reduced to 0.59%. With the proposed method, MMC capacitor overvoltage trip can be prevented when D = 0.7.

F. Experimental Results
In the experimental rig, the trained ANN model was finally used to calculate the injected circulating current references for the MMC system under two-phase-to-ground grid faults. The same with aforementioned simulation cases, the inputs of the ANN model are the grid dip severity factor D and safe SM capacitor voltage limit, then the outputs of the ANN are the threephase circulating current references. The trained ANN model was compiled in the Simulink model. This model can both be applied in the PLECS Blockset software (for offline simulation) and the dSPACE DS1006 platform (for real-time control).
In this study, the experiment is carried out in a scaled-down three-phase grid-connected MMC setup with four half-bridge SMs per arm. The MMC controller is implemented in DS1006 from dSPACE. The specifications of the experimental setup are   Table VI. Note that, the value of arm resistance and grid inductance are usually very small thus ignored here. As mentioned, the data points for experiments were collected from a detailed simulation model using the same parameters with the laboratory setup. In this way, the data extraction time was greatly saved. Test results are shown in Fig. 15 and the photo of MMC experimental setup is given as Fig. 16.
Obviously, three-phase capacitor voltages are balanced under a balanced grid. In addition, the voltage is within the safe limit, as shown in Fig. 15(a1). The average ripple is 6.5 V, and the UD is 0.18%. Similar with the aforementioned simulation results, the capacitor voltages become unbalanced under two-phaseto-ground faults, as shown in Fig. 15(a1), (b1), and (c1). The capacitor voltage amplitudes exceed the limit under the fault condition, which is shown in Fig. 15(b1). The average ripple increases to 7.3 V. The UD increases to 1.112%.
The proposed method can effectively reduce the capacitor voltages to a safe voltage limit in the experiment, as shown in Fig. 15(c1). The amplitudes of injected ac circulating current components areÎ cACa = 0.51 A,Î cACb = 1.13 A, and  I cACc = 1.29 A, respectively. The average ripple here is 6.5 V, and the UD is reduced to 0.5%. With the proposed method, MMC capacitor overvoltage trip can be prevented when D = 0.5.

G. Stability Issue
The MMC controller structure of this article is widely used in many applications, such as HVdc and medium voltage dc network. The stability issue has been well researched by many papers [41], [42]. The only difference is that, in our case, the circulating current referenceÎ * cAC is given by the proposed ANN. To ensure the stability of the system, theÎ * cAC max limit should be applied. This limit is determined by the IGBT current rating of MMC [41]. As shown in aforementioned ANN part, theÎ * cAC range for data collection is [0, 400] A for simulation and [0.3, 1.5] A for the experiment, which are well selected for specific systems. In addition, the sameÎ * cAC max limit is also applied during the real-time operations, which can prevent any possible large references given by ANN. Based on that, the system stability is ensured.

VII. CONCLUSION
This article proposes a novel concept for the AI application, which swops the locations of original system inputs and outputs for the AI model training (named as inverse application of artificial intelligence, IAAI). Compared to the conventional optimization-based method, the proposed IAAI method can achieve a fast coefficient/reference selection for the control of power converters, without an optimization process.
In the case study, two different control cases are given to show the validation of this method. One is for the droop coefficient design, which aims at the current sharing in a microgrid, the other is for the operating region extension of MMC under unbalanced grid faults. Both AI models can achieve the desired performance based on the proposed IA concept. It is found that, compared with the conventional methods, the IAAI method turns out to be simple and efficient because there is no need for an extra optimization process or substantial derivations in this data-driven model-free approach.
The proposed ANN IA method is model-free and data-based, which does not require the model analysis or derivations. However, it is worth noting that, before collecting data, the design space as well as the operation region of the studied problem should be well confirmed, according to the stability issue or other factors. The inputs/outputs of ANN usually need a selection process. Moreover, if the topic to be addressed is super large, a possible way is dividing it into several subtopics, by using ML classification techniques.
One of the most important future studies is to look at the interpretation potential of IAAI, which is currently model-free and uninterpretable in this article. In addition, IAAI can be generalized to other power converted-based topologies, where the parameter selection/recognition is crucial to the system control and operation.