Robustly Cooperative Control of Transient Stability for Power System Considering Wind Power and Load Uncertainty by Distribution Preserving Graph Representation Learning (DPG)

: Aiming at the inﬂuence of wind power and load uncertainty on the transient stability of a power system under low carbon mode, this paper ﬁrst proposes a collaborative preventive and emergency control model of transient stability by distribution preserving graph representation learning (DPG). Second, the uncertainty set of wind power output and load demand is studied, and the mathematical form of the two-stage robust transient stability collaborative control model is proposed. Then, the latest artiﬁcial intelligence technology is embedded into the global optimization algorithm of the model so as to further improve the solving efﬁciency of the algorithm. Finally, based on the developed improved two-stage robust optimization framework, an effective collaborative control method for transient stability is developed. The transient stability prediction and control system developed in this project is not only conducive to large-scale wind power grid connection but also expected to make academic contributions to development of power system transient stability and practical simulation veriﬁcation.


Introduction
Power systems are undergoing a major "de-carbonization" transition from fossil fuels to alternative energy sources, and this dramatic change will drive the whole socioeconomic development system into low-carbon mode [1]. The transition to a low-carbon power system requires a significant increase in renewable energy. However, because of the intermittent and uncertain nature of alternative energy, new energy generation will more easily lead to great pressure on stability and reliability of modern power systems [2]. The randomness and dynamic complexity of wind power output have a great effect on the transient stability of a power system. For example, in the power failure in South Australia in 2016, a wind turbine tripped due to continuous voltage interference, which caused power failure of the whole system [3].
Transient stability represents the ability of generators to maintain synchronization in a power system after contingencies, which is the most popular stability rule [4]. In practice, in order to enhance transient stability, control strategies can be divided into preventive control (PC) and emergency control (EC) according to the different implementation time.
Preventive control, such as optimal scheduling of generator sets, aims to prepare the system before unexpected events occur. Emergency control, such as load shedding, is to try to avoid loss of synchronization of a power system after contingencies [5].
The existing classical transient stability research is mainly focused on simulation models. Furthermore, the time domain simulation (TDS) method based on engineering experience has been widely applied in industries [6][7][8]. This method has the disadvantage of a large amount of computation. Another method is to terminate time-domain simulation in advance and determine the criteria for premature termination according to the characteristics of transient stability [9]. However, these rules are only enhanced on the basis of direct methods for transient stability analysis [10,11] including instantaneous energy function (TEF) method [12,13], extended equal area criterion (EEAC) method [14], and trajectory concave-convex method (TCC) [15].
Artificial-intelligence-based algorithms have also been used for transient stability forecasting. In [16], the authors developed an improved decision tree (DE) for dynamic test by synchronous phasors. In the literature [17], lasso regression (LR) was applied to forecast stability interval. In [18], voltage, speed, and power angle of generator were used by support vector machine (SVM) to forecast transient stability index (TSI). In [19], firstorder regression was used to investigate system uncertainty variables. Extreme gradient boosting (XGBoost) and factorization machine (FM) were applied for transient stability assessment of power systems [20]. Improved SVM was used for online system assessment [21]. Further, [22] proposed a novel l deep-machine-learning-based model for power system forecasting.
In addition, artificial neural networks (ANNs) have been applied for power systems [23,24]. However, the conventional artificial intelligence algorithms are very bounded in their ability to deal with modern power systems. To overcome these problems, deep learning models have been developed and applied to many fields. For example, in the literature [25][26][27][28], stack denoising autoencoder (SDA), convolutional neural network (CNN), and reinforcement learning (RL) have been applied to transient stability prediction. However, when it comes to transient stability analysis, the performance of these conventional algorithms will be weakened because the specific topological structure of the system data and information transfer between bus nodes are ignored.
The best operation dispatch of the system before an accident can be achieved is by optimal power flow calculation considering the transient stability constraint. Therefore, optimal scheduling of the generator set in preventive control is very suitable for stability enhancement of the power system [29][30][31][32][33][34]. The probability of an accident in a power system is low in long-term operation, so the cost of preventive controls will be high. Short-term emergency controls may also be costly, but the probability of implementation is very low. Therefore, cost-effectiveness of emergency controls is also a factor to be considered. In [35], an optimized load shedding scheme is proposed to improve the transient stability and frequency/voltage stability of a power system. In [36], in order to improve the transient stability of a system, a risk-based coordination model is adopted to model generation rescheduling and emergency load reduction. However, these studies based on preventive control and emergency control cannot consider uncertainties of alternative energies, such as wind and PV. At the same time, the transient stability control model mentioned above cannot guarantee complete robustness.
From the above literature review, it is clear that the research on transient stability coordinated preventive and emergency control based on the latest artificial intelligence algorithm is still in the initial stage, and there are many theoretical and technical difficulties that have not been solved. For example, the algorithms used in the above research cannot consider the specific data of electric power system topology, node, and information transmission. In addition, some algorithms can lead to a huge amount of calculation, and transient stability forecasting by traditional machine learning methods does not address how to use the prediction results for future control. Even fewer studies have considered cooperative control to improve transient stability.
Considering that the more diversified and generalized alternative energies in a modern system will easily affect the system stability, the existing transient stability research models and optimization algorithms in the literature would not meet future requirements. How to consider both preventive and emergency control has not been well dealt with in the existing models. Some theoretical difficulties, such as global convergence of the optimization scheduling algorithm and stability and robustness of the control algorithm, are still lacking thorough study. Based on the above considerations, this paper will systematically study coordinated preventive and emergency control based on the latest artificial intelligence algorithm.
The proposed paper contributions are as follows: (1) The main theoretical innovation of this paper is that it clearly points out the significant influence of cooperative preventive control and emergency control on system stability and proposes a two-stage robust cooperative control model based on distributed preserving graph representation learning (DPG). According to the worst scenario of the model, transient stability index (TSI) and robust global optimization results can be accurately derived. This idea is obviously different from the existing studies, which only control transient stability and do not pay attention to the special results of the system. (2) The main algorithm innovation is that this paper proposes a modified column and constraint generation (C&CG) [37] method, which is the traditional C&CG framework combined with deep-learning-based transient stability constraints. This method is our original algorithm and has high theoretical value.
The rest of this paper is organized as follows. The proposed coordinated system control strategy is introduced in Section 2. The proposed mathematical framework is presented in Section 3. The solution method is presented in Section 4. The case studies are developed in Section 5, and Section 6 provides the conclusion.

Two-Stage Robust Optimization Model
Two-stage robust optimization algorithm has been proven to be a valid method to handle uncertainty and robustness. This method has been widely used in economic dispatch considering uncertainty and economic dispatch with fault constraints [38][39][40]. At the same time, when uncertainty is considered, the two-stage robust optimization algorithm also shows good robustness in operation of microgrids [41][42][43].
Therefore, as shown in Figure 1, aiming at transient instability of the system considering uncertain wind output and demand load, this paper proposes a collaborative control optimization method. The strategy is modeled as an adjustable robust optimization framework with distributed preserving graph representation learning (DPG)-based transient stability constraint. In the first stage, BESS construction is optimized before the contingences. In the second stage, the decisions are generation scheduling and load shedding after the contingences in the worst cases of wind generation and load changes. In order to solve this proposed model, a novel solution method that constructs the stability constraint in the columns and constraint generation algorithm framework is researched.

Uncertainty Set Modelling
It is considered that the fluctuation range of wind generation and load power can be described as the uncertainty sets: Here, u W(t) and u L (t) are the uncertain variables of wind generation and load. u max W (t) and ∆u max L are the maximum fluctuation range of wind power output and load.

Transient Stability Index (TSI) Prediction Algorithm Based on Distribution Preserving Graph Representation Learning (DPG)
In distribution network analysis, distribution network is usually abstracted as a graph model for the convenience of subsequent analysis. The power grid contains a variety of power equipment, such as bus bars, lines, transformers, generators, loads, switches, etc. In the process of power grid modeling, the objects are all kinds of physical equipment of the power system, such as lines, transformers, generators, etc. The system modeling can be described in Figure 2. In the task scenario of this paper, an undirected graph model can be constructed by selecting the configuration variable as the node in the graph and the lines connected between each configuration variable as the edge in the graph.

Uncertainty Set Modelling
It is considered that the fluctuation range of wind generation and load power can be described as the uncertainty sets: Here,

Transient Stability Index (TSI) Prediction Algorithm Based on Distribution Preserving Graph Representation Learning (DPG)
In distribution network analysis, distribution network is usually abstracted as a graph model for the convenience of subsequent analysis. The power grid contains a variety of power equipment, such as bus bars, lines, transformers, generators, loads, switches, etc. In the process of power grid modeling, the objects are all kinds of physical equipment of the power system, such as lines, transformers, generators, etc. The system modeling can be described in Figure 2. In the task scenario of this paper, an undirected graph model can be constructed by selecting the configuration variable as the node in the graph and the lines connected between each configuration variable as the edge in the graph.
In Figure 2, each node represents a bus with transient stability index (TSI) information and the node attribute is TSI sequence data. Each bus is connected by a line. The graph model can be used as an abstraction of the real power grid, which can facilitate subsequent tasks. Considering the special system topology and distribution information of bus nodes, a graph neural network (GNN) model embedded with distribution preserving learning sentation will be helpful to obtain a more accurate prediction and significantly improve the computational efficiency while maintaining high accuracy. By means of DPG, we can determine the relationship between TSI and power system operation characteristics so as to ensure the transient stability of the model under coordinated control. TSI based for generator rotor angle is selected to describe system stability or fault severity, and TSI is defined as follows [44][45][46]: where max δ Δ represents the maximum angle difference of the power system. When TSI > 0, the system is treated as transient stable, including critical stable; otherwise, the system becomes unstable.

Mathematical Formulation
Coordinated control model is developed in our paper. A transient stability constrained optimization model of cooperative preventive control and emergency control is an adaptive robust problem where the BESS investment plan is chosen in the prevention stage before the contingence. In the lower stage, the contingence is considered. If a con- In Figure 2, each node represents a bus with transient stability index (TSI) information and the node attribute is TSI sequence data. Each bus is connected by a line. The graph model can be used as an abstraction of the real power grid, which can facilitate subsequent tasks. Considering the special system topology and distribution information of bus nodes, a graph neural network (GNN) model embedded with distribution preserving learning (DPL), which is distribution preserving graph representation learning (DPG), is developed. The pooling operation of DPG can accurately learn and describe the representation of the entire node distribution (determination of the system state). The final representation will be helpful to obtain a more accurate prediction and significantly improve the computational efficiency while maintaining high accuracy. By means of DPG, we can determine the TSI based for generator rotor angle is selected to describe system stability or fault severity, and TSI is defined as follows [44][45][46]: where ∆δ max represents the maximum angle difference of the power system. When TSI > 0, the system is treated as transient stable, including critical stable; otherwise, the system becomes unstable.

Mathematical Formulation
Coordinated control model is developed in our paper. A transient stability constrained optimization model of cooperative preventive control and emergency control is an adaptive robust problem where the BESS investment plan is chosen in the prevention stage before the contingence. In the lower stage, the contingence is considered. If a construction plan of BESS can meet the fluctuation deviation of wind power output and load under the contingence, the system can measure against all other scenarios.
Subject to: Energies 2023, 16, 2413 Equation (3) tries to minimize the construction cost of BESS in the preventive control stage and the system operation and load shedding cost under the worst-case scenario of wind energy and load in the emergency control stage. Constraint (4) represents the budget constraints for the BESS investments. The 0/1 variables in Constraint (5) are used to show whether a BESS construction is undertaken in a node (e.g., 1 means a construction is chosen). Constraint (6) is the node power balance equation that represents DC power flow at the preventive control state. Constraint (7) is the branch power flow limit equation. Constraint (8) presents the power output limits. Unit climbing constraint equation is described in Constraint (9). Constraint (10) denotes the emergency load shedding limits at the emergency control state. Constraint (11) limits phase angles of transmission lines. Constraint (12) describes the charge and discharge stage of the BESS except for the initial time. Constraint (13) presents the BESS state of charge in the first time step. Constraint (14) means that the final BESS state of charge is equal to the initial BESS state of charge. Constraint (15) provides the BESS minimum and maximum capacity. Constraint (16) and (17) describe the BESS charge and discharge rate limits, respectively. Constraint (18) limits the load shedding budget. Constraint (19) and (20) mean that the wind energy and load are equal to the values of uncertain variables corresponding to each time period. Equation (21) is the developed transient stability constraint.

Compact Matrix Form
Normally, an adaptive robust optimization model can be solved by C&CG method. However, this paper proposed a novel coordinated preventive and emergency control framework with transient stability constraint. As a result, the traditional C&CG method cannot be directly used. This paper investigated an improved C&CG algorithm that can solve the modified two-stage proposed model.
The compact form of the coordinated transient stability control model can be represented as below: min where x and y are the requirement variables and the detailed form can be denoted as follows: where the requirement variable of the first stage is x and the requirement variables of the second stage are u and y. The minimum problem of the inner layer is equivalent to objective Equation (3), which represents the minimum system operation budget. The expressions of x and y are shown in Equation (23). Ω(x, u) is the feasible zone of requirement variable y, and the detailed expression can be described as follows:  (4) and (5). Equation (25) represents inequality constraints in the developed adjustable robust model, including Equations (7)-(11) and (16)- (18). Equation (26) represents equality constraints in the proposed model, including Equations (6), (12)- (14), (19), and (20). Equation (27) corresponds to Equation (15). Equation (28) shows that, in the proposed model, the values of wind energy and load are the corresponding uncertain values in each time period. Λ1, λ2, λ3, λ4, and λ5 are the dual variables corresponding to each constraint in the lower stage.

Model Framework Reformulation
In terms of the developed adaptive optimization model, column constraint generation algorithm (C&CG) is used to solve the proposed problem. After decomposition of Equation (22), the main problem can be written as: where j is the current iteration; yl is the solution of the subproblem after the lth loop. u * l is the value of variable u in the worst contingence achieved after the lth loop.
The subproblem can be expressed as follows: The Equation (22) can be converted into the following dual problem: The developed model is finally decoupled into the main problem corresponding to Formulas (29)-(36) and sub-problem corresponding to Formulas (38)-(40) with mixed integer linear form. However, the researched coordinated control model includes transient stability constraint. As a result, the model cannot be directly solved by traditional C&CG method. Therefore, we proposed a novel solution that combines the original C&CG method with transient stability assessment to solve the developed model. The process of the improved solution algorithm is as follows: (1) Given the values of a group of uncertain variables as the initial worst contingence, set the operational cost lower limit LB = −∞, the upper bound UB = +∞, corresponding to the final dispatch scheme, and the iteration number k = 1; (2) Solve the main problem formulas (29)- (36) according to the worst contingence u * 1 , and obtain the solution (x * k , η * k ), where the objective equation value of the main problem is taken as the new lower limit LB = c T 1 x + η; (3) Substitute the obtained main problem solution x * k into Equations (38)- (40), solve the subproblem, obtain the value of the objective equation f * k (x * k ) of the subproblem, the value of the corresponding uncertainty variable u in the worst contingency, which is u * k+1 , and the second stage variable value of load shedding, which is y * k ; (4) If the system is unstable with the load shedding amount, add the DPG-based transient stability constraint to the subproblem and solve it again until the system is stable; (5) Update the upper limit UB = min {UB, f * k (x * k )}, The convergence threshold is ε, If UB − LB ≤ ε, then stop the loop and return solutions x * k and y * k ; otherwise, add variable y k+1 and the following constraints to the master problem: (6) Set k = k + 1; go to step 2 until the method meets the condition of the convergence.
The flowchart of the developed novel solution algorithm including the original C&CG method with transient stability constraints is shown in Figure 3.

Case Studies
The proposed coordinated transient stability control model is illustrated on the modified IEEE 30 and 39 bus system [47]. To build the data-driven model proposed in

Case Studies
The proposed coordinated transient stability control model is illustrated on the modified IEEE 30 and 39 bus system [47]. To build the data-driven model proposed in this paper, data under various transient scenarios are needed for training. However, the probability of fault scenarios in actual operation is very low, and it is difficult to collect data under various transient fault scenarios. Therefore, MATPOWER [48] and Power System Analysis Toolbox (PSAT) [49] are used for simulation. The improved IEEE 30 and 39 bus system are adopted. On the basis of the original IEEE 30 bus system, a wind power plant model based on PSAT software package and equivalent to multiple doubly fed wind turbines is added at bus node 17, and the same wind power model is added at bus 32 of IEEE 39 bus system.

Construction of the Training Dataset
The developed two-stage robust optimization framework is implemented on the improved IEEE 30 system. The test system includes 6 generators, 41 transmission lines, and 21 system loads. Select 10 lines from all lines of the benchmark system as the predicted fault lines; set the single-phase short circuit fault to form the predicted fault set. The predicted fault sets are shown in Tables 1 and 2.  The power generation is set to fluctuate within 90-110%. A thousand kinds of generator active power outputs are generated by Latin Hypercube sampling, and the system load active power and reactive power fluctuate with the change in the total active power output of the generator. The 1000 kinds of generator active power outputs and 10 expected fault lines in the expected fault set are combined to form 10,000 kinds of expected fault data. PSAT is used for time domain simulation calculation of the expected fault data, and the fault removal time is set as 0.1 s and the total simulation time as 20 s. The corresponding TSI is solved. The output of each generator corresponds to 10 TSIs, and the smallest TSI among the 10 TSIs is selected. Together with the output of this generator, 1000 sample data are formed for training the deep-learning-based transient stability predictor.

Transient Stability Predictor
The 1200-sample dataset was divided into a 960-sample training dataset and a 240-sample test dataset. The transient stability predictor was trained using the training set, and the accuracy of the model was verified by the test set.
As illustrated in Figure 4, considering the bus nodes as the vertices and the lines as the edges, we can transform the power node system into a graph neural network structure. Then, we use the GNN (graph neural networks) and ReLU (rectified linear unit) to obtain the information for the bus nodes. According to the learned node characteristics, such as active power, reactive power, voltage, and phase angle, we apply the proposed DPG model to describe the information distribution among bus nodes so as to learn the information graphic representation used to describe the state of the power system. Finally, the obtained representations can be used as inputs to common prediction models to realize transient stability analysis.
tor, 1000 sample data are formed for training the deep-learning-based transient stability predictor.

Transient Stability Predictor
The 1200-sample dataset was divided into a 960-sample training dataset and a 240-sample test dataset. The transient stability predictor was trained using the training set, and the accuracy of the model was verified by the test set.
As illustrated in Figure 4, considering the bus nodes as the vertices and the lines as the edges, we can transform the power node system into a graph neural network structure. Then, we use the GNN (graph neural networks) and ReLU (rectified linear unit) to obtain the information for the bus nodes. According to the learned node characteristics, such as active power, reactive power, voltage, and phase angle, we apply the proposed DPG model to describe the information distribution among bus nodes so as to learn the information graphic representation used to describe the state of the power system. Finally, the obtained representations can be used as inputs to common prediction models to realize transient stability analysis. In order to verify the effectiveness of the proposed DPG method [50], we conducted a comparative simulation test with six different popular machine learning algorithms. In addition, different precision indexes, such as accuracy, F1 score, and true negative rate (TNR), were used to measure performance.
From Table 3, we can see that the developed distribution preserving graph representation learning (DPG) algorithm performs best for all the forecasting precision indexes. The main reason is that the proposed DPG method considers the topology of power system data structures as the main consideration, which can significantly improve the computation effectiveness.  In order to verify the effectiveness of the proposed DPG method [50], we conducted a comparative simulation test with six different popular machine learning algorithms. In addition, different precision indexes, such as accuracy, F1 score, and true negative rate (TNR), were used to measure performance.
From Table 3, we can see that the developed distribution preserving graph representation learning (DPG) algorithm performs best for all the forecasting precision indexes. The main reason is that the proposed DPG method considers the topology of power system data structures as the main consideration, which can significantly improve the computation effectiveness.

Generators Active Power Outputs Analysis
The DPG-based transient stability predictor is embedded into the two-stage robust optimization to control the outputs of transient unstable generators. In terms of IEEE 30 and 39 bus system, generators' outputs before and after collaborative control are shown in Tables 4 and 5, respectively.  From Tables 4 and 5, the average generators power outputs decreased after the coordinated transient stability control. It is also worth mentioning that the total operation cost also dropped because of the decreased power outputs.

Transient Stability Index (TSI) Analysis
Finally, PSAT was used to verify the collaborative control strategy, and the timedomain simulation method was used to calculate the TSI before and after the collaborative control under each expected fault. The TSI pairs before and after the collaborative control of the IEEE 30 and 39 test systems were shown in Tables 5 and 6, respectively. As can be seen from Tables 6 and 7, the faults that are transient unstable before collaborative control become transient stable after collaborative control, while the faults that are transient stable before collaborative control remain transient stable. It also can be seen that TSIs are slightly improved, which can indicate that the coordinated control strategy also appropriately increases the system transient stability margin for the full fault set.  Table 8 shows two contingency scenarios for different fault lines of IEEE 39 bus system. We perform scenario 1 and scenario 2 for the simulation, and the generator rotor angles and voltages are shown in the following figures.  6 show the power angle curves before and after collaborative control of the IEEE 39 system under single-phase short circuit fault of the lines (bus 25 to bus 26; bus 26 to bus 29); it is clear that the benchmark test system is unstable since the collaborative transient stability control is not performed. However, the system changed to stable after the collaborative control.   ; it is clear that the benchmark test system is unstable since the collaborative transient stability control is not performed. However, the system changed to stable after the collaborative control.   Figures 7 and 8 show the voltage curves before and after collaborative control of the IEEE 39 bus system under single-phase short circuit fault of the line (bus 25 to bus 26; bus 26 to bus 29); the test system is unstable since the collaborative transient stability control is not carried out. However, the system changed to stable after the collaborative control. The voltage curves further validate the effectiveness of the proposed collaborative transient stability

Conclusions
In this paper, distribution preserving graph representation learning (DPG) and two-stage robust optimization framework were introduced into a transient stability cooperative control model and a deep-learning-driven improved algorithm for transient stability coordinated control of power systems was proposed. The proposed improved algorithm includes a set of transient stability predictors based on DPG and accurately fits the mapping relationship between generator outputs and transient stability index (TSI) by the training method of "unsupervised pre-training-parameter optimization". Different from conventional artificial intelligence algorithms, this paper embedded the trained transient stability predictor as a "black-box constraint" into the iterative optimization process of two-stage robust optimization. A data-driven optimization technique for the cooperative control strategy of generation rescheduling and load shedding with the goal of controlling cost minimization was proposed in this paper.
This research work developed a novel approach for transient stability collaborative control. It also provides reference for embedding similar power system stability rules into corresponding control models.

Conclusions
In this paper, distribution preserving graph representation learning (DPG) and two-stage robust optimization framework were introduced into a transient stability cooperative control model and a deep-learning-driven improved algorithm for transient stability coordinated control of power systems was proposed. The proposed improved algorithm includes a set of transient stability predictors based on DPG and accurately fits the mapping relationship between generator outputs and transient stability index (TSI) by the training method of "unsupervised pre-training-parameter optimization". Different from conventional artificial intelligence algorithms, this paper embedded the trained transient stability predictor as a "black-box constraint" into the iterative optimization process of two-stage robust optimization. A data-driven optimization technique for the cooperative control strategy of generation rescheduling and load shedding with the goal of controlling cost minimization was proposed in this paper.
This research work developed a novel approach for transient stability collaborative control. It also provides reference for embedding similar power system stability rules into corresponding control models.