Transmission Contingency Analysis Based on Data-Driven Equivalencing of Radial Distribution Networks Considering Uncertainties

A transmission contingency analysis (TCA) method based on data-driven equivalencing of radial DN distribution networks is proposed. First, an offline-online-combined data-driven model training method is proposed. The historical data are exploited during offline model training considering the uncertainties of loads and distributed generations to achieve partially prepared root nodal power injection functions, where root nodal voltage magnitudes are taken as arguments. After that, the real-time data of loads and DGs are used to determine all coefficients in these functions. In the proposed TCA, DNs will be equivalent to simplified models by distribution system operators (DSOs) with the data-driven method and the models will be sent to the transmission system operator (TSO). Then, TSO can complete the TCA independently. Numerical experiments show that the proposed TCA approach has similar accuracy and higher efficiency compared with the traditional global-power-flow-based TCA approach. It not only significantly reduces communication time between TSO and DSOs, but also saves calculation times, which may benefit real practice in the coordination operation of transmission-distribution-coupled systems in the future.


I. INTRODUCTION
Transmission contingency analysis (TCA) is a fundamental tool for transmission power system operations [1]. The TCA usually consists of contingency selection and contingency evaluation. Contingency selection aims to choose critical contingencies to reduce unnecessary contingency evaluation and enhance the overall efficiency of the TCA. The essence of contingency evaluation is to analyze topology and calculate power flow under given transmission contingencies and activate alarms based on analysis results. Thus, the accuracy of TCA is crucial for system security. Due to the administrative separation, transmission networks (TNs) and distribution networks (DNs) are usually managed by different system operators. TCA is usually processed by transmission system operators (TSOs) independently without interactions with The associate editor coordinating the review of this manuscript and approving it for publication was Pietro Varilone . distribution system operators (DSOs), where TNs are modeled in detail while DNs are equivalent as constant loads [2], [3]. This equivalence will not lead to a large deviation because traditional passive DNs have a small effect on TNs [2], [4]. However, due to the high penetration of distributed generations (DGs), the coupling between TNs and DNs will be significantly enhanced. The variation in the outputs of DGs and other active elements will make active DNs have much larger effect on TN power flow compared with traditional passive DNs [3].
To deal with this challenge, some researchers propose the concept of global TCA (GTCA) considering the effects of DNs on TNs in recent years. Ref. [2] proposes a masterslave-splitting-based (MSS) global power flow method, and later, [5] proposes a GTCA algorithm based on this global power flow method. Ref. [6] also implements GTCA considering the detailed modeling of solar photovoltaics. Considering that a complete GTCA usually involves a large VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ batch of power flow calculations under given contingencies, the time consumption of solving power flow and the communication delays between TSOs and DSOs significantly influence the overall efficiency of GTCA. Ref. [5] proposes several strategies to accelerate GTCA, including GTCA with DN-concerned contingency selection, DC-model-based GTCA, GTCA using DN equivalencing, etc. DN-concerned contingency selection is an important pre-treatment before analysis, and [7] presents two effective strategies to select critical contingencies. DC-model-based GTCA will accelerate power flow calculation compared, but it may also lead to imprecision. GTCA using DN equivalencing not only accelerates global power flow calculation but also decreases the communication between TSO and DSOs. However, [5] does not give a specific method for DN equivalencing. Network equivalencing or network reduction is a common approach for static power system applications, such as power flow calculation [8], [9], reliability evaluation [10], system planning [11]. In the TCA, a simple and direct method for reducing a radial DN is to simplify it as a constant load, of which the power injections are equal to the total loads in this DN. However, this method neglects the network losses in DNs and the uncertainties of DGs are not fully considered. If the sensitivity of the power injections to the voltage magnitude of DN root nodes of DNs is relatively small, this equivalent method will not lead to a significant deviation. But if this sensitivity is large, the accuracy cannot be guaranteed. With the advancement of active DNs, many PV-typed DGs exist in DNs, which will significantly enlarge this sensitivity [3]. Therefore, some novel methods for handling this circumstance are needed.
To deal with these challenges, data-driven approaches could be considered. In recent years, data-driven approaches have attracted broad attention in power system analysis and optimization. Reference [12] provides a comprehensive survey covering energy big data analytics and its security. Particularly, it discusses the data-driven schemes in the operation of smart grids. Also, some researchers have introduced datadriven approaches to handle with traditional applications in power system operations, such as state estimation [13], topology or parameter identification [14]- [16], power flow [17], optimal power flow [18], unit commitment [19], etc. However, this important technology has not been utilized in TN-DN coordinated analysis.
Thus, this paper proposes a TCA method based on datadriven equivalencing of radial DNs. The main contribution of this paper is that it i) proposes a data-driven equivalent method for describing the characteristics of DNs considering the uncertainties of DGs and loads. This equivalent method consists of offline training with historical data and online training with real-time data; ii) proposes a distributed TCA method based on the proposed data-driven equivalent method. The data exchange between TSO and DSO is designed; iii) proposes several perspectives that should be further addressed when the proposed method is applied to real-world system operations. Numerical experiments show that the proposed data-driven method can achieve high accuracy. In addition, compared with traditional TCA, the proposed TCA method significantly decreases the communication costs between TSO and DSO, and thus, it has higher efficiency.
The rest of the paper is organized as follows: Section II presents the data-driven equivalencing method of radial DNs. Section III proposes the DN-equivalencing-based TCA method. Numerical experiments demonstrate the effectiveness of the proposed method in Section IV. Discussion and extensions about the proposed method are presented in Section V. Finally, conclusions are drawn in Section VI.

II. DATA-DRIVEN EQUIVALENCING OF RADIAL DNs
This section introduces a data-driven method to establish a DN equivalent model. Subsection A presents the general framework. Subsection B presents some basic assumptions for the proposed method. Subsection C and Subsection D respectively present the offline training part and the online one.

A. GENERAL FRAMEWORK
As mentioned in [5], the influences of DNs are significantly important to achieve accurate TCA results. Global-powerflow-based TCA is presented in this reference. However, a series of global power flow calculation is needed in the TCA. Thus, a large number of alternating iterations between TSO and DSO cost much communication time.
Therefore, the basic idea of this paper is to establish an equivalent model for radial DNs. To be more specific, as shown in FIGURE 1, the power injections are represented as functions of root nodal voltage magnitude of DNs, active and reactive power of loads in DNs, and active and reactive power of DGs in DNs.
where U B represents the root nodal voltage magnitude.  To achieve the functions shown in (1), an offlineonline-combined framework is proposed, as shown in FIGURE 2. Two steps are included in this framework. The first step is to train an offline model under a given network topology with historical data. The uncertainties of loads and DGs are considered in this step. The second step is to train an online model under a set of determined loads and generations of DGs, based on the offline model achieved in the first step.

B. BASIC ASSUMPTIONS
With the advancement of DNs, various loads and generations are accessed into DNs. In this paper, without losing generality, some assumptions are established.
i) Flexible loads: the active power and reactive power of DN loads are both modeled as the sum of a forecasted value and a zero-mean fluctuation (normal distribution).
. ii) DGs: it is assumed that all DGs in DNs are under PQ-typed or PV-typed control. The active power generations of DGs are modeled as an interval.
Here, if the inverters of DGs are under PV-control, the reactive power of DGs will also vary with random variables. If the inverters of DGs are under PQ-control, it is assumed that the reactive power of DGs remains constant.
iii) The structure of DNs is radial and there are no other active elements in DNs except for the flexible loads and DGs. First, for each set of historical data, the relationship between power injections at the root node and root nodal voltage magnitude could be trained. To be more specific, setting different root nodal voltage magnitudes U B will bring out different power injections P B and Q B , f t and g t could be achieved with polynomial fitting as shown in (4).
where a t,i and b t,i are fitting coefficients. n and m are the order of polynomials. Usually, the higher the order of polynomials is, the more accuracy the fitting is. However, higher order usually requires more data and time to train the model and may also lead to over-fitting problems. According to Bayesian information criterion and a batch of numerical experiments, the setting of n = 3 and m = 2 is enough to guarantee the accuracy of the fitting, since the correlation coefficient is larger than 0.99 under this setting while n > 3 or m > 2 will not significantly increase the correlation coefficient. A simple and direct method is to sample U B uniformly in [U B ,Ū B ], where U B andŪ B are the lower and upper limits of U B . Thus, the sampling points are where S is the number of sampling points. Different sets of loads and generations will bring out different sets of a t,i and b t,i . Numerical experiments demonstrate that there is a potential relationship between a t,3 and a t,2 , a t, 3 and a t,1 , as well as b t,2 and b t,1 . Thus, as shown in FIGURE 3, f sub 2 , f sub 1 , and g sub 1 can be obtained by the polynomial fitting.
a 1 = f sub 1 (a 3 ) = u 1,2 a 2 3 + u 1,1 a 3 + u 1,0 Here, also as shown in FIGURE 3, the final output of offline model training includes u 2,2 , u 2,1 , u 2,0 , u 1,2 , u 1,1 , u 1,0 , v 1,2 , v 1,1 , v 1,0 , while a 3 , a 0 , b 2 , b 0 are undetermined coefficients, which will be achieved in the online model training. In summary, the uncertainties of loads and generations are included in the historical data. The essence of the offline model training is to achieve 'partially prepared' power injection functions given network topology.
They are generally applicable when the uncertainties satisfy the assumptions presented in Subsection B. x and U B y respectively to achieve Then, a 3 , a 0 , b 2 , b 0 could be solved with (10). Note that there are two roots for a 3 , a 0 , b 2 , b 0 since (10a) and (10b) are quadratic equations. Select the appropriate roots as their final solutions. Then, calculate (6)-(8) to achieve other coefficients. Thus, the final DN equivalent model is obtained.

III. DN-EQUIVALENCING-BASED TCA METHOD
This section introduces the DN-equivalencing-based TCA method. Subsection A presents the DN-equivalencing-based power flow method. Then, the overall steps of this TCA method are shown in Subsection B.

A. DN-EQUIVALENCING-BASED POWER FLOW METHOD
Power flow calculation is the basis of TCA. When the online model of DNs is achieved, a DN-equivalencing-based power flow method is as follows.
Step I: Initialize the voltage magnitude of root nodes of DNs U B 0 . Set iteration count k = 0 and convergence tolerance ε.
Step II: Calculate boundary power injections P B k and Q B k with and (1a) and (1b).
Step III: Calculate TN power flow with P B k and Q B k to achieve U B k+1 .
Step IV: If U B k+1 − U B k < ε, the method converges and stops. Otherwise, let k = k + 1 and go back to Step II.
Based on the convergence analysis in [2], the above method can converge if where ∂U B T /∂Q B T represents the sensitivity of the DN root nodal voltage magnitude to the reactive power injection at this root node in TN power flow.

B. OVERALL STEPS OF DN-EQUIVALENCING-BASED TCA METHOD
The overall steps of the DN-equivalencing-based TCA method are as follows. Meanwhile, a flowchart of the TCA method is shown in FIGURE 5.
Step I: TSO generates a contingency set and sends a TCA request to all DSOs.
Step II: Each DSO trains its online model with its offline model (corresponding to its current operating mode) as well as the real-time loads and generations of DGs. Then, send the achieve online model to TSO.
Step III: Select a contingency. If this contingency does not lead to a network split, TSO calculates power flow with alternating iterations between the TN model and equivalent models of DNs as shown in Subsection A under this contingency.
Step IV: Check the system security under the selected contingency. If there is a risk (network split, nodal voltage magnitude violation, line overloading, etc.), activate an alarm to operators.
Step V: If the selected contingency is the last one in the contingency set, the TCA method finishes. Otherwise, go back to Step III. FIGURE 5 shows that the only information exchange occurs at the beginning of the TCA method. To be more specific, TSO only needs to send a TCA request to DSOs, while each DSO only needs to send its online model to the TSO. As shown in Section II, each online model consists of only 7 constants. Thus, compared with traditional GTCA, the proposed TCA method can significantly reduce communication costs between TSO and DSOs. Besides, this feature is important when the communication condition between TSO and DSOs is bad. For example, when communication delay is large or non-instantaneous interruptions occur, the traditional GTCA cannot proceed to obtain the final solutions within a proper time.

IV. NUMERICAL EXPERIMENTS
This paper constructs two cases for numerical experiments. The programs are written in MATLAB R2015a and run on the Windows 10 of 64 bits. The CPU is Intel Core i7-7700K, with 4.20GHz master frequency and 32GB memory. The maximum iteration times of the Newton method and the tolerance are set to 50 and 1e-4 p.u., respectively. Set ε = 1e-4 p.u. The historical data are generated with the Monte-Carlo method based on (2) and (3) (sampling size: 1000).    proposed method are very close to the actual characteristics of the DN. Second, TABLE 1 records the root mean square error (RMSE) and maximum absolute error (MAE) of the achieved DN equivalent curve under different values ofP D G to evaluate the generality of the proposed training method under uncertainties. It shows that, under differentP D G , the RMSE is less than 0.1MW and 0.2MVar, and the MAE is less than 0.3MW and 0.5MVar. The accuracy is acceptable in TCA. This demonstrates that the DN equivalent function achieved by the proposed offline training method has a good generality under uncertainties.

A. CASE A: ONE TSO AND ONE DSO
Third, the accuracy and efficiency of the proposed TCA method and traditional GTCA are compared in TABLE 2. Since offline model training is completed in advance, the cost of this step will not be included in the total time cost of the proposed TCA. The contingency set consists of all N-1 branch-typed contingencies which will not lead to a TABLE 2 shows that the proposed DN-equivalencing-based TCA can achieve almost the same results compared with the traditional GTCA. However, the proposed method has higher efficiency. The GTCA needs 57 alternating iterations between TSO and DSOs. However, the proposed TCA only needs to communicate once (TSO sends a request to DSOs while DSOs send their online models to TSO). The calculation time of the proposed TCA is also less than that of the GTCA, saving over 1/3 of calculation time. Second, similar to

B. CASE B: ONE TSO AND MULTIPLE DSOs
Besides, it is assumed that all DSOs work in a distributed manner.  Similar to TABLE 2, TABLE 4 also shows that the proposed DN-equivalencing-based TCA can achieve almost the same results compared with the traditional GTCA. However, the proposed method has higher efficiency. The GTCA needs 423 alternating iterations between TSO and DSOs. However, the proposed TCA only needs to communicate once and saves over 40s of communication time. Even if communication time is neglected, the calculation time of the proposed TCA is also less than that of the GTCA, saving around 1/3 of calculation time .  TABLE 2 and TABLE 4 show that, when the number of contingencies is large, the traditional GTCA will cost much time on communication, because more contingencies usually indicate more alternating iterations between TSO and DSOs. As a result, the time consumption of the GTCA is extremely sensitive to communication delays On the contrary, in the proposed TCA method, TSO and DSOs only need to exchange information once. Thus, its time consumption is not sensitive to communication delays. In short, the proposed TCA method has significant advantages when communication delay is long or the number of contingencies is large, compared with the GTCA.

V. DISCUSSIONS AND EXTENSIONS
This section discusses some practical issues when the proposed TCA is adopted in real-world operations.

A. CONVERGENCE IMPROVEMENT OF DN-EQUIVALENCING-BASED POWER FLOW METHOD
Similar to the MSS-based power flow method, the proposed DN-equivalencing-based power flow method may diverge if the convergence condition (11) is not satisfied. PV-typed DGs in DNs usually lead to this problem. To deal with this problem, an effective way is to apply the successive-intersectionapproximation-based power flow method to improve the convergence of the proposed method. Thus, Step IV in Section III-A is modified as Step IV': If U B k+1 − U B k < ε, the method converges and stops.
Step V': and go back to Step II. The convergence will be significantly improved since this method has a local quadratic convergence rate, as demonstrated in [3], while the MSS-based method only has a local linear convergence rate. On the other hand, a sufficient condition for the convergence of the MSS-based method is relaxed in the proof for the convergence of the successiveintersection-approximation-based method [3], so the latter method usually has a broader convergence domain.

B. ACCELERATION OF OFFLINE MODEL TRAINING
Offline model training usually does not have a high real-time requirement. However, if the scale of historical data or the scale of TN is large, offline model training will be very timeconsuming. Also, as mentioned above, the proposed offline model training is processed given a topology structure. That is to say, if the switching frequency of the topology structure is relatively high, offline model training should be accelerated to satisfy this requirement. High-performance computing techniques could be adopted in real-world operations, such as GPU-CPU heterogeneous computing, CPU-multithreading computing, fusion cluster [20], etc.

C. CONTINGENCY SELECTION
To further enhance the efficiency of TCA, selecting critical contingencies is necessary. References [5] present some techniques, such as DC-power-flow-based contingency screening, compensation method, global-power-flow-based method, etc, which could be also extended to the TCA proposed in this paper.

D. EXTENSIONS IN DNs WITH LOOPS
Sometimes, the loops exist in DNs, which may significantly influence the global power flow. DNs with loops will make data-driven equivalencing much more difficult since the voltage angle of root nodes should be considered.
Some advanced data-driven techniques may be adopted to deal with this challenge, such as neural network fitting, which will be further discussed in our future work.

VI. CONCLUSION
This paper proposes a TCA method based on data-driven equivalencing of radial DNs. An offline-online-combined approach is proposed to train DN equivalent models. Also, the uncertainties of loads and generations are considered. Through extensive demonstration in many cases, the following observations can be obtained: • The proposed data-driven equivalent method has a high accuracy, which can satisfy the requirement of the TCA.
• In the proposed data-driven equivalent method, the offline training part can achieve a general relationship under a given topology structure, which can be further trained to obtain accurate DN equivalent functions under different uncertainties. The RMSE of active and reactive power injections are usually less than 0.2MW and 0.2MVar.
• The proposed DN-equivalencing-based TCA method can achieve almost the same results as the traditional GTCA. The more important is, it significantly reduces communication time and saves around 1/3 calculation time. Some practical issues mentioned in Section V will be further studied in the future. Also, future work will extend data-driven methods to solve other TN-DN coordinated analysis, such as the coordinated optimization of TN-DN-coupled systems.