Integrating Knowledge-Based and Data-Driven Approaches for TTC Assessment in Power Systems With High Renewable Penetration

Assessment of total transfer capability (TTC) is vital for determining the permissible power transfer between two areas of an interconnected power system. In the context of heightened volatility and time-variability in power system operating states after integrating high proportions of renewable energy, data-driven inferential assessment methods emerge as promising alternatives, offering faster assessment capabilities compared to knowledge-based iterative methods. However, data-driven methods typically struggle to establish reliable connections between assessment outcomes and security standards, hindering the guarantee of conservatism. A hybrid algorithm, combining knowledge-based and data-driven techniques, is proposed to accurately and efficiently assess TTC while strictly complying with pre-established security and stability constraints. Data-driven inference accelerates knowledge-based iterative processes by rapidly identifying reasonable initial values and providing adaptive step sizes, while knowledge-based analysis guides data-driven methods through offering stability margin information. This mechanism leverages the speed of data-driven methods while maintaining conservatism through knowledge-based approaches. The effectiveness of the proposed method is verified on benchmarks, including the IEEE 30-bus system and a real-world power system, which also exhibits conservatism and robustness in the face of increasing renewable energy penetration.

Integrating Knowledge-Based and Data-Driven Approaches for TTC Assessment in Power Systems With High Renewable Penetration Yuhong Zhu , Yangqing Dan , Lei Wang , Yongzhi Zhou , Member, IEEE, and Wei Wei , Member, IEEE Abstract-Assessment of total transfer capability (TTC) is vital for determining the permissible power transfer between two areas of an interconnected power system.In the context of heightened volatility and time-variability in power system operating states after integrating high proportions of renewable energy, data-driven inferential assessment methods emerge as promising alternatives, offering faster assessment capabilities compared to knowledgebased iterative methods.However, data-driven methods typically struggle to establish reliable connections between assessment outcomes and security standards, hindering the guarantee of conservatism.A hybrid algorithm, combining knowledge-based and data-driven techniques, is proposed to accurately and efficiently assess TTC while strictly complying with pre-established security and stability constraints.Data-driven inference accelerates knowledge-based iterative processes by rapidly identifying reasonable initial values and providing adaptive step sizes, while knowledge-based analysis guides data-driven methods through offering stability margin information.This mechanism leverages the speed of data-driven methods while maintaining conservatism through knowledge-based approaches.The effectiveness of the proposed method is verified on benchmarks, including the IEEE 30-bus system and a real-world power system, which also exhibits conservatism and robustness in the face of increasing renewable energy penetration.Index Terms-Total transfer capability, physics-informed deep learning, repeated power flow, knowledge-based and data-driven, transient stability constraint.

I. INTRODUCTION
T OTAL transfer capability (TTC) represents a critical metric for operators to guarantee both the security and economic efficiency of complex power systems [1], which, when the base case flow and the appropriate transmission margin are subtracted, equals the available transfer capability (ATC).Considering the increasing scale of power systems and the high penetration of renewable energies, it is of great significance to quickly assess TTC under time-varying operating conditions, in order to allow system operators to make informed decisions and prevent overloads or other operational issues that could lead to blackouts or other disruptions [2].Various time-varying operating conditions need to be considered in the assessment of TTC in modern power systems, including system topology changes (line switching), unit startups or shutdowns, source-load fluctuations (exacerbated by a high proportion of renewable energies), etc.Additionally, multiple safety constraints must be respected, including static voltage stability, line thermal limits, and transient stability [3], [4].The extensive deployment of renewable energies presents new challenges for TTC assessment due to the fluctuation of wind and photovoltaic power, as well as the complex dynamic characteristics of power electronic equipment.
Conventional methods prioritize evaluating TTC under specific operating conditions.In a given power flow case, both continuous power flow (CPF) methods and repeated power flow (RPF) methods [5], [6], [7], [8] regulate generation and load power by gradually increasing a common factor to increase power flow on the flowgates.Preset security and stability constraints are then checked for each iteration of power growth to calculate TTC.These methods offer the advantage of conveniently considering various control and regulation methods of modern power systems, and they can also handle various stability constraints with ease.However, because of the extensive number of simulations required, the low computational efficiency remains a significant limitation.On this basis, some linearization methods have been introduced in [9], [10], [11] to further expedite TTC assessments by simplifying the nonlinear constraints or equations, albeit potentially compromising the accuracy of the assessment results.
Various optimal power flow (OPF) methods have also been proposed for TTC assessment [12], [13], [14], [15], where the security constrained OPF is typically employed to maximize power transfer between the source and the sink areas.The OPFbased TTC assessment method offers advantages over CPF and RPF methods because it can leverage advanced solution technologies [16], [17], [18], resulting in faster calculation speeds.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
Despite the fact that the TTC definition incorporates stability constraints for a set of postulated contingencies, few OPF-based methods consider the power system dynamic behavior within the time frame of transient stability.This typically stems from the complexities encountered when incorporating differential equations and renewable energy volatility into optimization procedures, and addressing this issue may require additional assumptions or simplifications [19], [20].
A common drawback exists in conventional deterministic methods: their evaluation results only represent a snapshot of a specific operating condition.To address uncertainties arising from renewable energies and human activities, these methods must evaluate TTC for each feasible operating condition, requiring extensive computing resources.Various methods have been proposed to address uncertainties in TTC calculations more effectively, including Monte Carlo simulation [21], analytical approaches [22], and approximate methods [23], [24].Despite notable progress achieved through these probabilistic techniques, achieving a high-quality balance between accuracy and efficiency remains a challenge.More specifically, simulationbased methods rely heavily on substantial computational time, while analytical methods may suffer from decreased accuracy due to numerous assumptions.
The rapid development of deep learning has provided novel approaches for producing high-quality solutions to TTC assessment problems.These methods explicitly construct a mapping relationship from system operating conditions to TTC indicators in a data-driven manner, which is frequently implemented by deep neural networks that utilize numerous intermediate layers and neurons to implicitly incorporate various safety and stability constraints.To be more specific, a neural network solution methodology is proposed in [25] to calculate TTC that accounts for variations in line, generator, and load conditions.Considering the complexity and diversity of operating conditions in actual power systems, appropriate preprocessing of high-dimensional input features, such as the random forest technique [26], heuristic feature selection method [27], fast correlation-based filter [28], principal component analysis [29], and two-stage clustering method [30], can significantly improve accuracy and enhance generalization ability.Furthermore, the authors in [31] present a nonparametric-analytics-based TTC estimator, which is trained off-line with the data-driven group Lasso regression-based scheme and can assess TTC immediately once real-time measurements are available.Authors in [32] extend data-driven TTC assessment to multiple transmission interfaces, where causality-based multi-task neural networks are employed to take the causal relevance into account and the Peter-Clark algorithm is performed to find the causality relationship between multiple assessment tasks.Ref. [30] introduces interpretability analysis based on first-order control variable sensitivity, in order to explain the internal mechanism of the deep TTC evaluation networks.Stacking multiple machine models has also been proven in [33] to be an effective way to evaluate TTC.With the real-time assessment results implemented by machine learning methods, deep reinforcement learning-based optimal control strategies are proposed in [34] for securing system stability.The literature above capitalizes on the nonlinear, robust, and computationally efficient capabilities of neural networks to align with the results of OPF or RPF, accomplishing high-quality TTC assessment within mere milliseconds [35].
Although data-driven methods offer promising solutions, critical drawbacks have made the power industry reluctant to adopt them, especially for real-time control and safety-critical protection applications.These drawbacks include: 1) The predicted TTC values of neural networks are inevitably prone to fitting and generalization errors.In contrast to RPF and OPF, purely data-driven TTC assessments cannot guarantee conservative results, which may lead to unforeseen failures.2) The increased penetration of renewable energies necessitates TTC assessment that can adapt to more stringent security and stability constraints.Hybrid dynamical systems can have vastly different internal mechanisms.This complexity makes it challenging to accurately evaluate these systems with purely data-driven methods.3) The black-box nature of neural network models makes it difficult to interpret the correlations between data-driven TTC assessment results and their definitions.
Motivated by the extensive success of physics-informed deep learning in the field of power systems [36], a hybrid method that combines knowledge-based and data-driven approaches is proposed to address the challenges mentioned earlier.In general, various security and stability constraints essential for TTC evaluation can be seamlessly incorporated into knowledge-based models, while neural networks excel in providing rapid inference outcomes.This study demonstrates an effective framework that integrates these two approaches, yielding physically plausible TTC assessment results with reduced computational demands.
In response to the challenges faced by purely data-driven methods in TTC assessment, the primary contributions of this paper can be summarized as follows: 1) An integrated framework for efficient TTC assessment is developed, wherein data-driven and knowledge-based approaches reciprocally utilize each other's outputs as inputs.This guarantees compliance with pre-established security and stability constraints while preserving high computational speed.2) A physics-informed deep neural network architecture is designed to provide initial values and adaptive iteration step sizes for TTC assessment, contributing to two key aspects: r Increasing robustness across various renewable energy penetration levels, owing to the utilization of physical model outputs as neural network inputs.
r Enhancing interpretability by imposing physical mean- ing on intermediate outputs of neurons.The remainder of the paper is structured as follows.Section II introduces the formulation, motivation, and the framework of the proposed fast TTC assessment method.Section III presents the algorithm of the proposed method and introduces the implementation.Then, case studies are presented in Section IV, followed by the conclusions in Section V.

A. Formulation
TTC is defined as the amount of electric power that can be transferred over the interconnected transmission network in a Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
reliable manner while meeting a specific set of pre-and postcontingency system conditions [2].This paper involves rapid assessment of TTC without considering transmission reliability margin (TRM) [12].In this way, TTC is only related to the current system operating conditions and predefined pre-and post-contingency system conditions.This can be mathematically formulated as an optimization problem, frequently represented as: maximize T (x, y, p) (1) subject to where T (x, y, p) is the power transmitted through the concerned flowgate, x represents the state variables in the power system, such as generator angle δ, rotational speed ω, and so forth; y denotes operating variables, including bus voltage magnitude V , load demand P D , power generation P G , among others; p signifies the power system network structure, determined by components like lines and transformers.Equations ( 2) and ( 3) are differential algebraic equations depicting the system's physical characteristics.Constraint (4) embodies the system's steady-state constraint, encompassing generator output constraint, line thermal constraint, voltage amplitude constraint, and so on.Constraint (5) expresses the system's dynamic constraint, taking into account dynamic aspects like generator swing and renewable energy unit control switching.Finally, Ω represents a set of possible operational scenarios.

B. Involved Security Constraints
Considering that system reactive power typically balances locally and frequency stability relies on global balance, TTC assessment in this paper excludes voltage and frequency stability constraints under large disturbances, as TTC primarily concerns active power transmission between regions.We consider the following constraints, including 1) voltage amplitude constraints, 2) generator power constraints, 3) static voltage stability constraints, 4) thermal stability constraints, and 5) transient stability constraints.The behaviors of power electronic equipment, including high/low voltage ride-through, crowbar action, and chopper action, are also considered, as analyzed through electromechanical transient simulation.Checks for dynamic stability and static stability are collectively referred to as security checks.The static voltage stability margin, thermal stability margin, transient stability margin, and voltage margin are denoted by the indicators K p , K th , K tr , and K v , respectively.These margins can be calculated using the formulas provided in the Appendix.

C. Motivation and Framework
Handling constraints related to transient processes with optimization-based methods is challenging, because a large number of differential algebraic equations are involved.Both CPF and RPF utilize a shared transfer increment factor λ to modify the transfer in the specified direction [8].This is represented by the equations: where k G and k D represent the change rates of generators and loads, respectively, λ = 0 indicates the base operation case, and the superscript (0) indicates the initial value of the corresponding physical quantity.It should be noted that formula ( 7) is only carried out for thermal power units here, as renewable energy and nuclear power are generally regarded as non-regulable resources.
RPF incrementally adjusts λ according to the predetermined step size Δλ, then successively conducts power flow calculations and time-domain simulations to examine the steady-state and dynamic constraints, thereby identifying the largest λ that meets the safety requirements [12].However, performing rolling TTC assessment with RPF or CPF may prove challenging due to the difficulty of completion within a constrained time frame, such as a 15-minute interval.
Presently, deep learning-based approaches primarily estimate TTC directly through data-driven techniques.Although these methods surpass others in calculation speed, they lack alignment with power industry guidelines, such as the current Code on Security and Stability for Power Systems in China.This paper proposes a three-stage method that combines both dataand mechanism-driven techniques, as depicted in Fig. 1.The fundamental concept of the proposed approach consists of three critical steps: 1) applying data-driven techniques to determine λ, thereby enabling rapid transfer of the initial operating state; 2) implementing a mechanism-based security assessment to validate the transferred operating state, thereby calculating the stability margins and ensuring the conservativeness of the solutions; and 3) estimating the iteration step size Δλ using data-driven techniques, grounded on the margins ascertained in the preceding step.Steps 2) and 3) alternately iterate, serving as inputs for each other.

III. THE PROPOSED METHODOLOGY
To enhance interpretability, robustness, and to ensure conservatism under fluctuating operating conditions, a TTC assessment method that integrates knowledge-based and data-driven approaches is proposed.Section III-A presents the data preparation, followed by a description of the three stages in detail in Section III-B.Subsequently, Section III-C introduces the training process, and Section III-D outlines the comprehensive algorithm.

A. Data Preparation
To produce the training dataset, a fundamental operating scenario for the specific power system under investigation is constructed to determine P (0) Di , and Here, subscript i represents physical quantities corresponding to bus-i.Compared with the sampling strategy in literature [30], this paper refines the sampling rules for renewable energy and nuclear power units, and limits the output of conventional units so as not to exceed the installed capacity.Specific details can be found in the Appendix.

B. Description of Three Stages 1) Rapid Transfer Increment Using Physics-Informed Neural Networks:
In stage 1, a neural network model named "M 1 " is utilized to estimate an appropriate initial factor λ and implement a rapid transition of operation states, the architecture of which is illustrated in Fig. 2. We enhance the M 1 model by incorporating power system physics through the addition of hidden layers characterized by physical margins (static voltage stability margin, thermal stability margin, transient stability margin, voltage margin) to the decoder.These margins are supervised and adjusted based on actual values obtained from electromechanical transient simulations during the training process, thereby refining the model's trainable parameters.
The input of M 1 is a collection of state variable series, operating variables, and topological structures.State variables series include δ and ω, which are related to system dynamic stability.Operating variables are represented as a node feature matrix, where Q G denotes the reactive power of the generator at bus-i, Q D denotes the demand reactive power at bus-i, and θ denotes the phase angle.Here, the subscript y i denotes the ith row of y.The network topology p is represented by the adjacency matrix A, where A ij = 1 denotes that bus-i and bus-j are connected, A ij = 0 denotes the opposite.Here, A ij represents the element in row i and column j of matrix A.
Let M 1 (•) be the affine function of model M 1 , M 1 sequentially predicts four stability margins and the value of λ, which can be expressed as: where M (1) 1 and M (2) 1 are the two substructures of the model respectively, { Kp , Kth , Ktr , Kv } are the intermediate physical outputs denoting the predicted values of {K p , K th , K tr , K v }, φ 1 and φ 2 denote the trainable weights in M 1 , and λ denotes the predicted transfer increment factor.M 1 imposes physical meaning (i.e., four security stability margins) on the outputs of neurons in the hidden layers, to which a specific update policy is also imposed.This alleviates the black-box nature of neural networks and improves model interpretability by comparing predicted margins with true margins.
To enhance readability, it is possible to consolidate formulas (10)- (11) into: Graph attention-based (GAT) blocks with weights φ 1 encode inputs and thereby predict stability margins for specific task, which is shown to be an effective method in our previous work [37].GATs employ the attention mechanism to focus on relevant elements while preserving the dimensionality of the input features, which can be expressed as: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.if count == 0 then 7: where y and H are the input and output of GAT, f σ (•) is the activation function of GAT layer; K head is the number of multi-head attention mechanism; W k is the corresponding weight matrix, which is also a trainable parameter; e k ij is the corresponding attention coefficient, which can be calculated by formula (15); α k ij is the corresponding normalized attention coefficient; and Attention(•), LReLU(•) are attention mechanism and LeakyReLU nonlinear function respectively.Here, the subscript H i denotes the ith row of H The decoder with weights φ 2 integrates the intermediate physical variables with the original input and gives the prediction of the transfer increment factor λ.
2) Mechanism-Based Security Checks: Let x , y denote the state and operation variables after the transfer increment, respectively.The anticipated static and dynamic fault sets are denoted as F s and F d , respectively.In stage 2, the mechanism-based security checks are conducted by performing quasi-steady-state power flow calculations and electromechanical transient simulations on the operating conditions and anticipated faults to obtain the actual values of multiple stability margin indicators.The security checks can be regarded as a function SC(x , y , p), which is detailed in Algorithm 1.Consistent with the RPF method, the proposed method conveniently accommodates high-order faults by adding them to the preset fault set (F s or F d ).
3) Adaptive Incremental Step Using Physics-Informed Neural Networks: In stage 3, the data-driven neural network model named "M 2 " adaptively determines the transfer incremental step by comprehensively considering multiple stability margin indicators and operating states, as illustrated in Fig. 2. We also enhance the M 2 model by incorporating power system physics through employing four physical margins obtained from the electromechanical transient simulation as inputs of the decoder, thereby guiding the inference process.Let M 2 (•) be the affine function of model M 2 , and denote the trainable weights of M 2 as φ 3 .This process can be expressed as: (16) where K p , K th , K v , K tr are provided by mechanism-based security checks accomplished in stage 2.
Here, other than feeding the unprocessed measurement data data (e.g., operation variables) to M 2 , four stability margins provided by physical models also serve as the input feature, because they are more discriminative and recognizable.
The changes in the system state variable before the disturbance are typically ignored [30], [32], [35], and thus the expressions ( 12)-( 16) of models M 1 and M 2 degenerate to: where state variables x before the disturbance are treated as constants.It is a common assumption used in [25], [26], [27], [30].

C. Neural Networks Training Process
In model M 1 , weights φ 1 are trained using multi-task learning and are then frozen in the subsequent process.φ 2 are trained using single-target supervised learning by minimizing the following loss function: where λ max is obtained by RPF.Model M 2 is trained using supervised learning, by performing gradient descent until the loss function converges: where lr denotes the learning rate, and is updated with a "warmup" mechanism [38].

D. The Proposed TTC Assessment Algorithm
The proposed hybrid knowledge-based and data-dirven TTC calculation method is shown in Algorithm 2. The data-driven while Transfer power increasement with formulas ( 7)-( 9) 10: Update operation state (x t , y t , p t ) 11: K p , K th , K v , K tr = SC(x t , y t , p t ) 12: end while 13: T T C = T (x t , y t , p t ) 14: return T T C 15: end function component provides improved initial values for iterations and an adaptive step size, which significantly accelerates the iterative process of the knowledge-based component.The knowledgebased component performs precise checks and provides sufficient margin knowledge to the data-driven component, ensuring that the calculation results are conservative.

IV. CASE STUDIES
In this section, we evaluate the proposed method through benchmarks that encompass the IEEE 30-bus system and a real-world power system.All experiments are conducted on a computing platform using a NVIDIA GeForce RTX 3080 Ti 16 GB GPU and a 12th Gen Intel(R) Core(TM) i7-12700F.Experiments involving deep learning are implemented in Python with the Tensorflow 2.10.0 module.

A. Test on the IEEE 30-Bus System 1) Data Description:
The proposed methodology is implemented on the IEEE 30-bus system for testing purposes, encompassing 6 generators, 21 loads, and 41 transmission lines.In order to adapt to the research scenario, the generator at bus-2 is transformed into a renewable energy unit (non-adjustable), and the generator at bus-27 is transformed into a nuclear power unit (constant power and non-adjustable).The system is segmented into three areas, with the partition illustrated in Fig. 3.The TTC from areas 1 and 3 to area 2 is examined.
TTC is the maximum value of power that can be transferred without violating any limits.Depending on the different limits, TTC can be expressed as T T C = min{T T C p , T T C th ,  T T C tr , T T C v }, where T T C p , T T C th , T T C tr , T T C v represent the TTC when considering solely static voltage stability, thermal stability, transient stability, voltage limits, respectively.A total of 63,000 samples are obtained by the method described in Section covering 14 N -1 line faults and 6 transient stability constraints.
The study first investigates the constraints that are initially breached as the transmission power increases under different operating conditions.To offer a more comprehensible representation, two factors indicative of the load and generation levels in the sink area (Area 2) are employed to project system operating states onto a two-dimensional plane.Subsequently, TTC of various system operating states are calculated through RPF, considering a single constraint, and the test results are shown in Fig. 4. It is evident that under varying operating conditions, the constraint that is initially violated differs.For instance, when the power generation level in the sink area is 1.0 pu and the load level is 0.5 pu, transient stability is the primary concern.As power generation or load levels increase, voltage limits and line overcurrent emerge as the most prominent issues.This implies that ignoring transient stability constraints may result in an excessively optimistic TTC.
It should be emphasized that, although the mathematical form of the rotor angle stability margin does not change, it is still affected by the dynamic characteristics of power electronics, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.such as low voltage ride-through and CHOPPER protection.This process can be effectively captured by using the state variables of power electronic devices as inputs to the data-driven model and by modeling control strategies in mechanism-based electromechanical transient simulations.
2) Superiority of Physics-Informed Neural Networks: A unified model M 1 , detailed in Section III-B, is employed to accomplish multiple tasks.We customize the hyperparameters of the model for the 30-bus system, which are given in the Appendix.The model has a total of 4,240,081 shared weights (φ 1 ) and 262,400 specific weights (φ 2 ).The entire sample is partitioned into a training set and a test set, using an 85:15 ratio.
Purely data-driven methods [25], [26], [28], [35] and a purely knowledge-based method (default increment step Δλ = 1.0) are used as baselines, and the RPF-based method with Δλ = 0.1 is regarded as the ground truth.The test results of the proposed model are shown in Fig. 5.It can be observed that the performance of the proposed method on the test set has an advantage over the existing methods.Specifically, the maximum error of the proposed method in 7200 test samples is only 2.5%, while in some methods it reaches more than 18%.In addition, the proposed method has similar and excellent performance in both the training set and test set, indicating a stronger generalization ability.
The impact of physics-informed mechanisms on the accuracy of TTC assessments is further demonstrated in the Appendix.The results show that the physics-informed mechanism alone leads to a significant improvement in the accuracy of the fit, even without introducing safety and stability checks.
3) Conservatism: Using data-driven fitting methods, such as neural networks, inevitably has errors, including fitting errors and generalization errors.Nonetheless, in TTC evaluation, an overly optimistic evaluation result means that the system's operating conditions may violate the preset safety and stability constraints, thereby increasing the risk of the system.Employing data-driven fitting methods, such as neural networks, inherently introduces errors, including fitting and generalization Fig. 6.Test results on the test dataset of 7200 samples.Stacked bar charts depict the count of safety limit violations in the TTC, while the accompanying table to the right presents the statistical error in comparison to the RPF results.
errors.Nonetheless, in TTC evaluation, an overly optimistic assessment implies that the system's operating conditions may breach pre-established safety and stability constraints, consequently elevating the system's risk.This paper advocates for a knowledge-based approach to verify data-driven evaluation outcomes and employs an iterative method to guarantee the conservativeness of these results.The effectiveness of the proposed method is verified on the test dataset.TTC obtained through various methods are assessed using electromechanical transient simulations to determine if they satisfy the preset security and stability conditions, and subsequently compared to the values derived from RPF to evaluate their accuracy.The test results are shown in Fig. 6.It can be observed that although the fitting result of the neural network has high accuracy, its conservatism cannot be guaranteed.Notably, 40-50% of the evaluation results violated at least one security constraint.The proposed method ensures the conservatism of the evaluation results by introducing knowledge-based correction and calibration.

B. Test on a Real-World Power System
1) Data Description: The accuracy, efficiency and scalability of the proposed algorithm are verified on a simplified power system in China.The system includes 314 buses, 502 transmission lines, 35 thermal power generators, 16 renewable energy units (including 4 offshore collection stations), a nuclear power plant and a pumped storage power plant.Under the selected base section, the total load is 22.19 GW, and the conventional power installed capacity is 29.48 GW (renewable energy accounted for 19%).Fig. 7 shows a schematic diagram of the 500 kV -buses in the system, and the collection points of offshore renewable energy units are also shown.The TTC of the transmission lines between Area N and Area S are mainly investigated in this study.The flowgate contains two 500 kV transmission lines, which are the main channel for power transmission between N and S, and the transient problem is prominent.The Area N is a coastal area with a large number of offshore renewable energy units and conventional units, and is considered as a source area.The area S has fewer generators and is regarded as a sink area.
We generate 96,000 system operation scenarios with a high proportion of renewable energies.According to the current Chinese national standard (Code on Security and Stability for Power System), the security checks in TTC calculation include 44 N − 1 faults and 11 transient faults.When gradually increasing the transmission power in the flowgates, the levels of renewable energies and nuclear power in both areas will not experience an increase.Among fault sets F s and F d , the three-phase fault in the transmission lines, generator tripping, permanent line disconnection faults, renewable energy station or energy storage disconnections from the grid, bus faults, and simultaneous double-circuit line trippings are considered.
2) Iterative Process Accelerated by the Proposed Method: We tuned the model's hyperparameters for this real-world system, which are also given in the Appendix.81,600 out of 96,000 samples are used to train models M 1 and M 2 , and the remaining 14,400 samples are used to test the performance of the proposed method.The probability density function (PDF) of the error between the calculated TTC and the actual ones is obtained through kernel density estimation during different iterations, and the results are shown in Fig. 8.It can be observed that data-driven inference accelerates the knowledge-based iterative process by quickly identifying plausible initial values and providing adaptive step sizes.Specifically, even if no iteration is performed (corresponding to 0-th iteration), the errors calculated by M 1 are already distributed between 0-250 MW.The initial value errors of the traditional RPF methods are 1000-1200 MW and 2100-4600 MW respectively.After two iterations, the TTC errors calculated by the proposed method are all less than 10 MW, while the traditional RPF methods require 12 and 26 iterations respectively.
3) Conservatism: From the actual operating conditions in 2018, three typical time periods are selected for Time-Series Production Simulation.During these time periods, the actual power and TTC of the N-S flowgates are shown in Fig. 9(a)-(c).Here, each time period lasts 6 days with a resolution of 1 h.For 144 (6 × 24) observation moments in each time period, the TTC is evaluated using the proposed method and a purely data-driven method (taking method in [35] as an example).The difference between the real TTC and the calculated TTC is recorded as the calculation error, which is drawn as a heat map and shown 8.The kernel density estimation function illustrates the estimated TTC error relative to the true value.To enhance visualization, all subplots share the same x-axis scale, while the y-axis scales differ.The integral of the kernel density estimation function with respect to TTC error consistently equals 100%.At the 0th iteration, the proposed method utilizes an initial value of λ = M 1 (x, y, A|φ 1 , φ 2 ).The dichotomous method employs half of the maximum allowed λ as the initial value, while the fixed step method uses 0. in Fig. 9(d)-(f), respectively.Three time points are selected, and their TTCs are calculated using the proposed method and the method in [35] respectively.Transient stability checks are performed on these three TTC calculation results, and the check results are shown in Fig. 9(g)-(i).
According to the data provided by the Power System Operator, the sum of the thermally stable capacity of the four transmission lines between N and S is 10.78 GW.Meanwhile, the maximum capacity allowed for actual operation is 4,700 MW, corresponding to 1.36 pu (as indicated by the red lines in Fig. 9(a)).
It can be observed that due to the inherent error of machine learning methods, the TTC results of purely data-driven evaluation cannot be determined to be conservative or aggressive.This is reflected in the fact that the estimated TTC may be greater than the real value (16:00 on March 6) or smaller than the real value (01:00 on September 15).Aggressive TTC assessment results Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.are contrary to the regulations of the current Chinese standards, because it may cause serious failures.For example, at 16:00 on March 6, if the power of the transmission section rises to the level calculated by the method in [35], it may cause serious generator instability.As a comparison, the proposed method introduces knowledge-based calibration and correction, and its TTC evaluation result are all conservative (the calculated values are smaller than the real values).Meanwhile, the evaluation results show that the calculation error of the proposed method is smaller (less than 25 MW at all times).We also observe that the TTC, when calculated based on engineering insights, can often be overly conservative, yet in certain instances, it can be aggressive (as seen at 23:00 on March 5).This variability underscores the advantages of the proposed method.
4) Robustness Against Increasing Renewable Energy Penetration: According to the regional plan, the proportion of renewable energy will reach 50% by 2030.The increase in the proportion of renewable energy will deepen the time-varying nature of the system's operating conditions.Consequently, the proposed method's robustness is tested within a 20%-50% renewable energy range.The results are illustrated in Fig. 10.
As the penetration rate of renewable energy increases, both the median and maximum evaluation errors of the purely data-driven approach exhibit an upward trend.This suggests that the robustness of strictly data-driven methods may be insufficient when the proportion of renewable energy is substantial.In contrast, the performance of the proposed method remains relatively stable across various renewable energy ratios, attributable to the incorporation of physical knowledge.
5) Interpretability Quantification: Table I compares the statistics of the errors with different methods in TTC assessment.Here, the RPF-based method with Δλ = 0.1 is also regarded as the ground truth.Neural networks with identical model structures, but without stability margins as intermediate variables or inputs, serve as contrasting examples to those with physicsinformed mechanisms.
For machine learning practitioners, model interpretability remains a relatively subjective attribute, devoid of a formal Fig. 10.Boxplots display the assessment error of TTC under varying proportions of renewable energy.The median error is denoted by the central line within the box, while the first and third quartiles correspond to the box's upper and lower edges, respectively.Whiskers extending from the box, indicate the data spread and extend to the smallest and largest data points within 1.5 times the interquartile range from the first and third quartiles, respectively.Data points beyond this range are deemed outliers.definition via rigorous mathematical expressions.In general terms, interpretability in machine learning may be regarded as "the extent to which humans can understand model decisions or prediction outcomes".
The proposed method enhances the model's interpretability by assigning physical meaning to the intermediate layers.These four stability margins possess clear physical significance, are easily comprehensible to humans, and exhibit a strong correlation with TTC results.Deviations from the ground truth (acquired through simulation methods) can quantify interpretability.Table II displays the statistical data regarding calculation errors for the four stability margins in the test dataset.It can be observed that the proposed method improves interpretability by generating evidence that is comprehensible to humans and highly consistent with the ground truth.
6) Time Complexity and Computational Speed: For a power system with N buses, it is assumed that the number of neurons used by the pure data-driven approach is also a constant multiple of N .Let h be the number of iterations required for RPF with fixed step size, and let d be the stack number of the parallel neural network in [33].For RPF, each iteration requires time-domain simulation, that is, solving differential algebraic equations.Differential algebraic equations require alternately solving algebraic equations and differential equations, which have time complexity of O(N 3 ) and O(N ) respectively.The test results show that the proposed method can complete the TTC calculation in a constant number of time steps, where the time complexity of feedforward estimation is O(N 2 ), and the complexity of security check is O(N 3 ).The numerical calculation time and theoretical time complexity of each method are summarized in Table III.It can be observed that for the real-world power system, the proposed method can achieve subminute TTC evaluation while giving accurate and conservative assessment results.

V. CONCLUSION
This paper presents a hybrid algorithm that combines datadriven and knowledge-based approaches for efficient TTC assessment.Within this framework, the data-driven method initially estimates the TTC value based on current operation states, which then serves as the initial value for the knowledge-based iteration.Subsequently, the knowledge-based and data-driven approaches alternate, with the former checking security through electromechanical transient simulations and providing stability margins, while the latter re-estimates TTC based on the stability margins and operating states.Numerical experiments on two test systems demonstrate the effectiveness of the proposed method, leading to the following conclusions.
1) Purely data-driven TTC estimation can result in either conservative or aggressive estimations, potentially leading to failure in meeting safety and stability requirements.The proposed TTC assessment method incorporates a knowledge-based checking mechanism, which enforces strict adherence to preset security and stability constraints, ensuring complete conservatism.
2) The data-driven method significantly accelerates the iteration-based TTC calculation process by quickly calculating the iteration initial value and adaptively giving the iteration step size.The test results on a real-world power system demonstrated that the proposed method can provide an accurate TTC within a time frame that is acceptable in engineering practice.While the proposed method offers benefits in assessing the TTC under specific regulation rules, the following challenges still require further studies.1) Since grid-following converters are currently the main form of grid connection for renewable power plants, we regard them as PQ buses during steady-state Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
calculations and as equivalent to current sources during faults.With the growing popularity of grid-forming units, TTC assessment considering grid-forming power electronic control strategies needs further study.2) Optimizing the regulation rules remains challenging.This is due to the planning problem being a mixed-integer problem, and current PINNs are incapable of managing mixed outputs comprising both discrete and continuous variables.Progress in utilizing neural networks to address mixed-integer programs could provide a solution to this challenge.3) Given that the proposed method still relies on solving nonlinear and non-convex optimization problems (like the training of neural networks), it does not guarantee a theoretically consistent convergence speed in iterations.In the worst-case scenario, where the data-driven components fail completely, the proposed method degenerates into RPF method.

Fig. 4 .
Fig. 4. of various system operating states.Sub-figure (a) illustrates the TTC surface ascertained by static voltage stability, thermal stability, transient stability, and voltage limits when the power generation and load levels in the sink area change.Sub-figure (b) explicitly presents the constraints initially violated as the transfer power increases under various operating conditions, with the TTC value represented in the grayscale.

Fig. 5 .
Fig. 5. Violin plots that exhibit the distribution of errors in TTC assessment with different methods, where the absolute percentage error is used to express the difference between the estimated results and the ground truth values (RPF with Δλ = 0.1).RPF (with Δλ = 1) is not data driven and thus does not have a training set.

Fig. 7 .
Fig. 7. Modified main grid diagram of test power systems.

Fig. 9 .
Fig. 9. Time-series production simulation results are presented.Sub-figures (a)-(c) depict the actual transmission power and TTC from B to S in various time periods throughout 2018.Sub-figures (d)-(f) display the heat maps of computational errors using the proposed method and the method from [35].In sub-figures (d)-(f), the abscissa represents time (hour), and the ordinate denotes the day label (0-6).Sub-figures (g) and (h) illustrate the transient stability check for TTC using the proposed method and the method from [35].The simulation starting time for sub-figure (g) is 16:00 on March 6th, with a three-phase short-circuit fault on line CH-JZ lasting for five cycles.For sub-figure (h), the simulation begins at 20:00 on September 14th, with a three-phase short-circuit fault on line CH-MZ persisting for 5 cycles.The simulation starting time for sub-figure (i) is 20:00 on November 12th, featuring a three-phase short-circuit fault on line SJ-MZ enduring for five cycles.

TABLE I TTC
ASSESSMENT ERROR STATISTICS IN THE TEST SET

TABLE III COMPARISON
RESULTS OF THE COMPUTATIONAL COMPLEXITY