*5.3. The Results of TTC Fast Calculation*

In this section, the proposed method is testified and compared with other methods, such as the TSC-OPF method [9], the sensitivity-based method [19], the repeated power flow (RPF) method [20], and the direct data-driven method [21]. These methods are summarized in Table 3. M1 is to directly incorporate the DAEs into the optimization problem by adopting the implicit integration rule. M2 uses trajectory sensitivity to achieve TTC calculation. M3 gets the TTC by gradually increasing the generator power base on the initial state and repeatedly calculating the power flow until a certain constraint is about to be violated. And, M5 applies NNs to learn the mapping between system state variables and TTC values. Moreover, to manifest the superiority of our methods, we have advanced experiments under single- and multi-contingency conditions, of which the outcomes are respectively visualized in Figure 4a,b.

**Table 3.** Different methods and pre-contingencies for TTC calculation.

**Figure 4.** The results of TTC calculation under four different methods: (**a**) Single contingency; (**b**) Multi contingencies.

Figure 4 shows the TTC values calculated by the applied methods under 100 unseen scenarios. The samples are sorted according to the ascending order of the TTC value calculated by M1 to facilitate viewing, and the histogram shows the error between the TTC values calculated by M1 and M4. Taking Figure 4b as an example, the TTC error of M4 is within the acceptable range of [0, 0.5 p.u.], and the average error is 0.1019 p.u. The TTC average errors of M2 and M3 are 0.2308 p.u. and 0.3547 p.u., respectively. Obviously, the TTC value calculated by M4 has the smallest error among several comparison methods. It illustrates that the proposed learning-aided OPF based method can calculate the TTC value more accurately than the RPF and sensitivity-based method. This is because M4, like M1, is modeled based on TSCOPF, which can better describe the system state and has better fidelity than M2 and M3. In addition, it can search the extreme operating point more accurately.

Furthermore, to verify the accuracy of the proposed method, it is compared with the direct data-driven approach (symbol as M5). M5 takes the TTC calculated by M1 as the sample label. Then, it utilizes the DBN model to learn the implicit relationship between the input feature **X** and the target feature **Y**TTC and forms a mapping. Figure 5 shows the comparison results of M4 and M5 when the TTC calculated by M1 is used as the reference value. It can be found that M4 has a smaller average relative error, 0.1019 p.u., than M5, which is 0.3297 p.u., in 100 test samples. It means the proposed method has better fidelity than direct data-driven methods.

**Figure 5.** The results of TTC calculation under four different methods: (**a**) M4 compared with M1; (**b**) M5 compared with M1.

In addition, time-domain simulations are performed for each test sample to verify that the operation obtained when calculating the TTC value satisfies the TSCs. The post -fault transient trajectory of rotor angle differences between the individual generators is recorded. The result of a typical sample is shown in Figure 6, where Figure 6a is the transient trajectories after sample initial power flow calculation. Then, utilize the proposed method to calculate the TTC of this sample, and a new operating condition, whose transient trajectories are shown in Figure 6b, can be obtained. It can be observed that the curves have apparent fluctuations. The angle difference between Gen34 (the generator on bus 34) and Gen39 (the generator on bus 39) has the most significant change and is close to the set stability threshold, 180 degrees. It means that the system is operating at its TS boundary at this time. In addition, Figure 6b illustrates that DBN can accurately estimate TSI, and the sensitivity of transient stability margin can help OPF find boundaries of the system. It demonstrates that the learning-aided model can follow the TSCs effectively when it calculates the TTC. Furthermore, the learning-aided model can help the TSCOPF accurately find the most extreme operating condition.

**Figure 6.** The post-fault transient trajectories of rotor angle differences of the test sample: (**a**) the trajectories after sample initial power flow calculation; (**b**) after TTC calculation.
