Incremental SVM (Support Vector Machine) security updating method and system for judging transient stability of power grid
By using the incremental SVM security update method, the problem of traditional power grid transient stability discrimination models being unable to adapt to complex and variable scenarios is solved, achieving efficient and accurate online discrimination and ensuring zero misjudgment and timeliness in instability scenarios.
Patent Information
- Application Number
- CN202511899246.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional power grid transient stability discrimination models are difficult to adapt to complex and ever-changing power grid scenarios, and are prone to misjudging unstable samples, failing to meet the timeliness and security requirements of online discrimination.
An incremental SVM safe update method is adopted. By integrating incremental sample screening, negative sample hard constraints and dual threshold dynamic adjustment safe update mechanism, an intelligent discrimination model that can efficiently integrate new data is constructed to ensure zero misjudgment in unstable scenarios.
This enables the model to adapt to complex and ever-changing power grid scenarios without retraining on all the data, ensuring accurate identification of unstable samples and improving the safety, reliability, and timeliness of transient stability assessment and online discrimination.
Smart Images

Figure CN121960835A_ABST
Abstract
Description
An Incremental SVM Security Update Method and System for Power Grid Transient Stability Assessment Technical Field
[0001] This invention relates to the field of power system transient stability analysis, and in particular to an incremental SVM security update method and system for determining power grid transient stability. Background Technology
[0002] With a high proportion of new energy sources such as wind and solar power being integrated into the grid, the power system is exhibiting characteristics of "low inertia and strong fluctuations," and its operation is profoundly shifting from traditional "fixed typical scenarios" to "random and variable scenarios." Against this backdrop, traditional transient stability assessment models based on offline simulations of a few typical operating modes and anticipated fault sets show a significant decrease in accuracy when faced with a constant stream of additional operating modes and unforeseen faults, making it difficult to meet the needs of real-time grid security assessment. Therefore, developing technologies capable of rapidly and accurately assessing grid transient stability is crucial for ensuring the safe operation of the system.
[0003] Data-driven transient stability assessment methods have attracted widespread attention due to their speed and online applicability. However, these methods face two major challenges in practical applications. First, unstable operating conditions are far fewer than stable operating conditions in actual power system operation. This severe sample imbalance can easily cause the classification decision boundary of machine learning models to shift towards unstable samples, resulting in missed detections of unstable samples (negative samples). Given the significant threat that missed detections of instability pose to power system security, the assessment model must possess extremely strong and near-accurate instability sample identification capabilities. Second, the continuous evolution of power grid operation modes and fault scenarios requires the discrimination model to efficiently integrate new data and adapt to new scenarios. Traditional full-data retraining methods are inefficient and cannot meet the timeliness requirements of online discrimination; while conventional incremental learning methods can improve update efficiency, they often lack effective constraints on the risk of misclassification of unstable samples, failing to meet the rigid security requirements of power systems.
[0004] In existing technologies, model-driven methods (such as time-domain simulation and extended equal-area methods) are reliable in accuracy, but their computational time is too long, failing to meet the second- or even millisecond-level response requirements for online stability assessment. Conventional data-driven methods, while having advantages in speed, have significant shortcomings in sample update efficiency and security. Therefore, how to construct an intelligent dynamic update mechanism for the discriminant model that can efficiently integrate new data and strictly ensure zero misjudgment in instability scenarios while ensuring discrimination speed has become a key direction for solving the current problem of online transient stability assessment of power grids. Summary of the Invention
[0005] The purpose of this invention is to provide an incremental SVM safe update method and system for judging power grid transient stability. By introducing a safe update mechanism that integrates incremental sample screening, negative sample hard constraints and dual threshold dynamic adjustment, it solves the problems that traditional discrimination models are difficult to adapt to complex and variable power grid scenarios and are prone to misjudgment of unstable samples, as well as the difficulty in balancing the efficiency and safety of conventional incremental learning. It achieves efficient, accurate and adaptive online discrimination of power grid transient stability while ensuring zero misjudgment in unstable scenarios.
[0006] To address the aforementioned technical problems, a first aspect of this invention provides an incremental SVM security update method for power grid transient stability assessment, comprising the following steps: performing electromechanical transient time-domain simulations on the power grid to obtain first simulation data under typical operating conditions and anticipated fault conditions, and second simulation data under additional operating conditions and additional fault conditions; generating a pre-training dataset for initial model training based on the first simulation data, and generating an incremental update dataset for subsequent model updates based on the second simulation data; constructing and training an initial SVM binary classification model for transient stability assessment based on the pre-training dataset; and incrementally learning and updating the initial SVM binary classification model using a security update mechanism based on the incremental update dataset to obtain an incrementally updated SVM model for online transient stability assessment of the power grid.
[0007] Further, the step of generating an incremental update dataset for subsequent model updates based on the second simulation data includes: determining multiple scenario combinations to be simulated according to the additional operating mode and the additional fault conditions; for each scenario combination, performing electromechanical transient time-domain simulation to obtain the raw transient response data under the scenario combination; extracting the time-series variables of the power angle, speed, terminal voltage, and electromagnetic power of all generators in the power grid, as well as the time-series variables of the voltage amplitude and phase of each substation node in the main grid, from a preset duration before the fault occurs to a preset duration after the fault is cleared from the time-series observation records in the raw transient response data of each scenario combination. The stability conclusion of the scenario combination based on the simulation trajectory determination is obtained; the observation record sequence values of all time-series variables corresponding to each scenario combination are arranged and combined in chronological order to construct a high-dimensional feature vector to characterize the complete transient dynamic process of the scenario combination; according to the stability conclusion of the scenario combination, a binary classification label is assigned to the high-dimensional feature vector, wherein the stable scenario is assigned a first-class label and the unstable scenario is assigned a second-class label; the high-dimensional feature vectors generated by each simulation scenario under all additional operating modes and additional fault conditions and assigned the binary classification label are collected to form the incremental update dataset.
[0008] Furthermore, the incremental learning and updating of the initial SVM binary classification model based on the incrementally updated dataset using a safe update mechanism includes: filtering samples in the incrementally updated dataset based on KKT conditions and hard constraints on negative samples to form a synthetic training set for this round of incremental learning; updating the model's normal vector and shift term by solving an improved SVM objective function based on the synthetic training set, wherein the improved SVM objective function implements hard constraints on negative sample classification by setting a misclassification penalty coefficient for unstable samples that is much larger than that for stable samples; setting independent first and second classification decision thresholds for stable and unstable samples respectively based on the updated model, and dynamically adjusting the first and second classification decision thresholds according to the classification performance statistics of the synthetic training set; and using the updated normal vector, shift term, and dynamically adjusted binary classification decision thresholds as the output of this round of incremental learning and updating to form the incrementally updated SVM model.
[0009] Further, the step of filtering samples in the incremental update dataset based on KKT conditions and negative sample hard constraints includes: using the current prediction model to perform initial stability category prediction for each incremental sample in the incremental update dataset; for incremental samples predicted as second-class labels, verifying whether they satisfy the condition that the discriminant function value composed of the normal vector and displacement term of the current prediction model is <-1; if not, including the incremental sample in the sample set to be used for incremental learning; for incremental samples predicted as first-class labels, determining whether the incremental sample is a potential support vector based on the KKT conditions of the support vector machine optimization problem, and including only the incremental samples determined as potential support vectors in the sample set to be used for incremental learning; merging the incremental samples predicted as second-class labels and the incremental samples predicted as first-class labels with the original support vectors in the current prediction model to jointly constitute the synthetic training set.
[0010] Further, the step of updating the model's normal vectors and displacement terms by solving the improved SVM objective function based on the synthetic training set includes: constructing the improved SVM objective function, which introduces different misclassification penalty coefficients for stable and unstable samples, and adds a zero misclassification penalty term for unstable samples; assigning preset numerical relationships to the stable sample misclassification penalty coefficient, unstable sample misclassification penalty coefficient, and unstable sample zero misclassification penalty coefficient in the improved SVM objective function, wherein the unstable sample misclassification penalty coefficient is much larger than the stable sample misclassification penalty coefficient, and the unstable sample zero misclassification penalty coefficient approaches positive infinity; using the synthetic training set as training data, solving the improved SVM objective function using a numerical optimization algorithm, and calculating a set of normal vectors and displacement terms by minimizing the improved SVM objective function, wherein the normal vectors and displacement terms simultaneously satisfy the requirements of maximum classification margin, allowing stable samples to have a certain classification error, and ensuring that unstable samples are classified correctly; and using the normal vectors and displacement terms as the update result for the core parameters of the initial SVM binary classification model.
[0011] Further, the step of dynamically adjusting the first classification decision threshold and the second classification decision threshold based on the classification performance statistics of the synthetic training set includes: initializing the first classification decision threshold to a non-negative baseline value and initializing the second classification decision threshold to a baseline value ≤-1; combining the discriminant function determined by the updated normal vector and the displacement term with the first and second classification decision thresholds to form the current dual-threshold classification rule, and classifying the samples in the synthetic training set based on the dual-threshold classification rule; obtaining the misclassification rate of unstable samples and the recall rate of stable samples generated after classifying the synthetic training set according to the current dual-threshold classification rule; if the misclassification rate of unstable samples is greater than 0, adjusting the second classification decision threshold in the direction of decreasing value to tighten the classification boundary for unstable samples; if the recall rate of stable samples is lower than the preset expected value, adjusting the first classification decision threshold in the direction of decreasing value to relax the classification boundary for stable samples and balance the overall recognition performance of the model; and using the first and second classification decision thresholds determined after adjustment as the output results of this round of dynamic adjustment.
[0012] Furthermore, the initial SVM binary classification model is expressed as: ;in, The output of the initial SVM binary classification model. It is the normal vector. This is the input vector for the initial SVM binary classification model of the power grid. For displacement terms, a binary hyperplane. Depend on and Decision; for the sample set Stability binary classification labels If the hyperplane can correctly classify the samples, then: Stable samples output +1, and unstable samples output -1.
[0013] Furthermore, the improved SVM objective function is: ;in, To ensure that the penalty coefficient for negative samples is much larger than that for positive samples, and to alleviate the class imbalance problem in the power grid transient stability discrimination samples, As an indicator function, when a negative sample is misclassified The value is 1 if the condition is met, and 0 otherwise. The discriminant values are those of the initial SVM binary classification model or the SVM model after incremental updates following retraining in the previous round. The penalty coefficient for zero misclassification of negative samples. , These are slack variables.
[0014] Furthermore, the typical operating modes include winter maximum load mode, winter minimum load mode, summer maximum load mode, summer minimum load mode, and holiday load mode; the anticipated fault conditions include single-circuit faults in all main grid lines, simultaneous double-circuit faults in some double-circuit lines on the same pole, and commutation failure faults, single-pole blocking faults, and double-pole blocking faults in the DC transmission system.
[0015] Accordingly, a second aspect of the present invention provides an incremental SVM security update system for power grid transient stability assessment. The system obtains an incrementally updated SVM model according to the aforementioned incremental SVM security update method for power grid transient stability assessment, comprising: a data acquisition module, used to acquire first simulation data of the power grid under typical operating conditions and anticipated fault conditions, and second simulation data under additional operating conditions and additional fault conditions, respectively, by performing electromechanical transient time-domain simulations on the power grid; a training set generation module, used to generate a pre-training dataset for initial model training based on the first simulation data, and an incremental update dataset for subsequent model updates based on the second simulation data; a model training module, used to construct and train an initial SVM binary classification model for transient stability assessment based on the pre-training dataset; and a model update module, used to incrementally learn and update the initial SVM binary classification model using a security update mechanism based on the incremental update dataset, obtaining an incrementally updated SVM model for online transient stability assessment of the power grid.
[0016] Accordingly, a third aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described incremental SVM security update method for power grid transient stability assessment.
[0017] Accordingly, a fourth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described incremental SVM security update method for power grid transient stability assessment.
[0018] The above-mentioned technical solutions of the embodiments of the present invention have the following beneficial technical effects: 1. By constructing a safety update mechanism with incremental sample screening, safe model parameter update, and dynamic adjustment of dual thresholds as the core, the bottleneck of traditional stability judgment models, which are difficult to adapt to the complex and ever-changing additional methods and unforeseen faults in actual power grid operation due to the solidification of training data, is effectively overcome. This enables the discrimination model to efficiently and reliably complete self-evolution and performance improvement based solely on incremental data without retraining with all data, thereby significantly broadening the applicable scenarios of the model and ensuring the timeliness of online discrimination; 2. By introducing and specifically implementing an improved SVM objective function, unstable samples are given a misjudgment penalty coefficient much larger than that of stable samples and a zero misjudgment penalty term approaching infinity, thus forcibly constructing a negative sample classification algorithm. Hard constraints fundamentally solve the problem of weak model recognition ability for instability scenarios caused by the inherent and severe class imbalance in power system transient samples. This ensures zero misjudgment of power grid instability conditions under any new scenario, greatly improving the safety and reliability of transient stability assessment. 3. By setting independent classification decision thresholds for stable and unstable samples respectively, and dynamically adjusting the two thresholds in opposite directions based on the classification performance statistics of the synthetic training set, this method creatively provides an adaptive classification boundary optimization strategy. This strategy can flexibly and intelligently adjust the recall level of positive samples while strictly ensuring that the rigid safety bottom line of negative sample recognition accuracy is not breached. Thus, it effectively balances and optimizes the overall comprehensive recognition performance of the model while ensuring safety. Attached Figure Description
[0019] Figure 1 is a flowchart of the incremental SVM security update method for power grid transient stability assessment provided in an embodiment of the present invention; Figure 2 is a block diagram of the incremental SVM security update system for power grid transient stability assessment provided in an embodiment of the present invention.
[0020] Attached diagram labels: 1. Data acquisition module, 2. Training and generation module, 3. Model training module, 4. Model update module. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0022] Referring to Figure 1, a first aspect of the present invention provides an incremental SVM security update method for judging the transient stability of a power grid, comprising the following steps: Step S100, by performing electromechanical transient time-domain simulation on the power grid, first simulation data of the power grid under typical operating mode and anticipated fault conditions, and second simulation data under additional operating mode and additional fault conditions are obtained respectively.
[0023] Specifically, the first step is to define the boundary conditions and parameters of the power grid and set up the simulation environment, such as using professional simulation software like PSD-BPA, and setting the simulation step size (e.g., 10 milliseconds) and total duration. Typical operating modes usually refer to representative load levels and generation combinations that are of long-term concern to planning and operation departments, such as five benchmark scenarios covering winter maximum and minimum load, summer maximum and minimum load, and holiday load patterns. Anticipated fault conditions refer to the set of conventional faults required to be checked in the power system safety and stability guidelines, mainly including N-1 interruption faults of all main grid lines, N-2 simultaneous faults of some important double-circuit lines on the same tower, and typical faults that may occur in high-voltage direct current transmission systems, such as commutation failure, single-pole blocking, and double-pole blocking. By combining these typical modes and anticipated faults and performing detailed electromechanical transient time-domain simulations, the first simulation data for initial modeling can be obtained. Additional operating modes refer to other possible operating states beyond the five typical modes mentioned above, such as a low-load mode (load rate of approximately 85%) or a mode with a high proportion of renewable energy generation. Additional fault conditions refer to disturbances that are more severe than expected, such as N-3 or more multiple line faults or multiple DC lines failing simultaneously. Simulating these atypical and more severe scenario combinations yields dynamic process data that constitutes the second simulation data, used for incremental updates and verification of the subsequent model.
[0024] Step 200: Generate a pre-training dataset for initial model training based on the first simulation data, and generate an incremental update dataset for subsequent model updates based on the second simulation data.
[0025] For each simulation (whether typical or additional scenarios), key transient response features need to be systematically extracted from the simulation results. These features cover the core dynamic elements of the power grid, specifically including the time-series curves of the power angle, speed, terminal voltage, and electromagnetic power of all generators in the system, as well as the time-series curves of the voltage amplitude and phase of all substation nodes in the main grid. Data extraction focuses on the period when the fault impact is most significant, typically set from a very short time before the fault occurs (e.g., 0.010 seconds) to a short period after the fault is cleared (e.g., 0.100 seconds). Within this window, samples are taken at a fixed frequency (e.g., 100 Hz) to obtain the observed sequence values of each variable. For a single simulation, the observed values of all variables of all generators and nodes at all sampling times are arranged in chronological order and concatenated to form a high-dimensional feature vector, which is used to comprehensively characterize the transient dynamic process of the power grid under that fault scenario. Simultaneously, stability is determined based on the full-duration (e.g., 5.0 seconds) power angle swing curve of the simulation: if the relative power angle difference between each generator does not exceed 180 degrees after the simulation and shows a convergence trend, it is determined to be stable, and the high-dimensional feature vector is assigned a "stable" label (e.g., +1); otherwise, it is determined to be unstable, and an "instable" label (e.g., -1) is assigned. Collecting all labeled feature vectors generated based on the first simulation data constitutes the pre-training dataset; collecting all labeled feature vectors generated based on the second simulation data constitutes the incremental update dataset.
[0026] Step S300: Based on the pre-trained dataset, construct and train an initial SVM binary classification model for transient stability determination.
[0027] First, the problem of determining the transient stability of the power grid is formalized as a standard binary classification machine learning task, where the input is the aforementioned high-dimensional feature vector, and the output is a binary stability category (stable or unstable). Support Vector Machine (SVM) is chosen as the base classifier, and its kernel function (e.g., radial basis function kernel) and initial hyperparameters are determined. Next, the pre-training dataset is randomly divided into a training subset and a validation subset in a certain ratio (e.g., 7:3). Using the training subset, the optimization problem of SVM is solved using algorithms such as sequence minimization. Essentially, this involves finding an optimal hyperplane (determined by the normal vector w and the displacement term b) that maximizes the classification margin between the two classes (stable and unstable) while minimizing classification errors. After training, the model's initial performance is evaluated using the validation subset, obtaining key indicators such as overall stability accuracy and unstable sample recognition rate. The model trained through this process serves as the starting point for subsequent incremental updates—the "initial SVM binary classification model"—possessing the ability to accurately distinguish between classes based on typical scenarios.
[0028] Step S400: Based on the incrementally updated dataset, the initial SVM binary classification model is incrementally learned and updated using a safe update mechanism to obtain the incrementally updated SVM model, which is then used to determine the online transient stability of the power grid.
[0029] The safe update mechanism is a complete process comprising three collaborative steps. The first step is incremental sample selection: upon obtaining a new incremental update dataset, not all new samples are used for retraining. Instead, the current discriminative model (initially the initial SVM model) is used to perform preliminary predictions and selection of new samples. For new samples predicted as "unstable" by the model, rigorous verification is performed. If they are found to not meet the current model's strict classification boundary conditions for unstable samples (i.e., insufficient classification confidence), they are forcibly included in the update sample set. This embodies the "hard constraint of negative samples," aiming to strictly prevent missed classifications of unstable samples from the data entry point. For new samples predicted as "stable," the KKT optimization conditions of the support vector machine are used for judgment. Only those "potential support vectors" that may affect the shape of the classification decision boundary are selected and included in the update set, thereby significantly reducing redundant data and improving update efficiency. The selected key new samples are merged with the original support vectors of the current model to form a small and refined synthetic training set.
[0030] The second step is model parameter updating based on hard constraints: using a synthetic training set as a basis, an improved SVM objective function is solved to update the model's normal vector w and displacement term b. The core of this improved function is that it sets a much larger misclassification penalty coefficient for "instable" samples than for "stable" samples, and introduces an additional extremely large "zero misclassification penalty term" that tends towards positive infinity, thus mathematically constraining the classification of unstable samples. By minimizing this objective function through a numerical optimization algorithm, the resulting new w and b can ensure that all (including newly added) unstable samples are correctly classified while maintaining the model's generalization ability (maximum margin), achieving theoretically zero misclassification of instability.
[0031] The third step is dynamic adjustment of the dual thresholds: After obtaining the updated discriminant function (defined by the new w and b), zero is not directly used as the classification threshold. To balance recognition performance under high security requirements, independent and variable classification thresholds τ1 and τ2 are set for the "stable" and "instable" categories respectively (initially τ1=0, τ2=-1). Then, using the classification performance of the synthetic training set under the new model (such as calculating the false positive rate of unstable samples and the recall rate of stable samples), these two thresholds are dynamically adjusted: if unstable samples are still found to be misclassified, τ2 is reduced (making it more negative) to tighten the instability boundary; if the recall rate of stable samples is too low, τ1 is reduced to moderately widen the stability boundary. After multiple rounds of iterative adjustments, an optimal set of thresholds is finally determined. At this point, the model parameters (w, b) and decision rules (τ1, τ2) have been updated, together forming an incrementally updated SVM model adapted to the new scenario. By deploying this model in an online system, the stability of power grid operation feature vectors acquired in real time or near real time can be quickly determined, providing decision support for dispatching and operation personnel.
[0032] The aforementioned incremental SVM security update method for power grid transient stability assessment constructs a simulation dataset covering typical and additional scenarios and designs a security update mechanism that integrates incremental sample selection, negative sample hard constraint optimization, and dual-threshold dynamic adjustment. This enables the constructed SVM discriminant model to continuously and efficiently absorb and learn transient response knowledge under new power grid operating modes and unforeseen faults without requiring full retraining on massive amounts of data. During model updates, the method rigorously ensures zero misjudgment of the critical dangerous condition of power grid instability through algorithmic hard constraints, fundamentally improving the safety and reliability of online transient stability assessment. Simultaneously, the adaptive dual-threshold adjustment strategy intelligently optimizes the accuracy of stable condition identification while maintaining a safety baseline. This results in a synergistic improvement in the accuracy, safety, and real-time performance of the discriminant model in complex and variable power grid environments, enhancing the practicality and engineering application value of data-driven online transient stability assessment technology.
[0033] Furthermore, step S200, which generates an incremental update dataset based on the second simulation data for subsequent model updates, includes: step S210, determining multiple combinations of scenarios to be simulated based on additional operating modes and additional fault conditions.
[0034] First, in addition to the five typical operating modes (winter heavy load, winter light load, summer heavy load, summer light load, and holidays), additional operating modes that the power grid may face need to be defined, such as a mid-load mode (load level approximately 85% of the rated value) or a high-proportion renewable energy generation mode (e.g., photovoltaic output reaching 120% of the rated value). Simultaneously, additional fault conditions more stringent than conventional safety checks should be defined, exceeding the severity of anticipated N-1 or simple N-2 faults. Examples include the N-3 condition where three lines on the same transmission corridor fail simultaneously, or a complex fault where two high-voltage direct current transmission lines simultaneously experience commutation failure. Then, each additional operating mode and each additional fault condition should be systematically paired and combined to form a series of "operating mode-fault" pairs. Each pair constitutes a specific combination of simulation scenarios that needs to be evaluated. For example, combining "waist load mode" with "simultaneous N-3 faults in three circuits of lines 5-6, 6-7, and 7-8" defines a specific simulation task. This process can be repeated until all combinations of additional modes and faults of interest are exhausted, thereby clarifying the full range of simulation conditions that the incrementally updated dataset needs to cover.
[0035] Step S220: For each scenario combination, perform electromechanical transient time-domain simulation to obtain the raw data of transient response under the scenario combination.
[0036] For each scenario combination determined in step S210, a corresponding detailed model needs to be established and simulation conditions set in power system simulation software (such as PSD-BPA). The simulation typically uses a detailed electromechanical transient model, setting an appropriate simulation step size (e.g., 10 milliseconds) to balance accuracy and efficiency. For each scenario, the specific location, type (e.g., three-phase short circuit), occurrence time (e.g., 0.1 seconds after simulation starts), and clearing time (e.g., 0.1 seconds after protection action) of the fault must be clearly defined. Time-domain simulation calculations are performed, with a total simulation duration sufficient to observe the long-term dynamic evolution of the system, typically lasting several seconds (e.g., 5.0 seconds). Through this simulation, the entire dynamic response of the power grid under this specific disturbance, from transient to medium-to-long-term, can be obtained. The output results are detailed trajectory data containing the rotor motion of all generators in the system and the changes in power grid electrical quantities over time. This unprocessed trajectory data constitutes the raw transient response data for that scenario and is the source for subsequent feature extraction.
[0037] Step S230: Extract the time-series variables of the power angle, speed, terminal voltage and electromagnetic power of all generators in the power grid from the transient response raw data of each scenario combination, as well as the time-series variables of the voltage amplitude and phase of each substation node in the main grid, from the preset time before the fault occurs to the preset time after the fault is cleared, and obtain the stability conclusion of the scenario combination based on the simulation trajectory determination.
[0038] First, key variables strongly correlated with transient stability patterns are selectively extracted from the massive simulation output data. These variables include four core electrical quantities of each generator in the power grid: power angle (relative to the system reference axis), speed deviation, generator terminal voltage amplitude, and electromagnetic power; and two electrical quantities of each substation node in the main grid: voltage amplitude and voltage phase angle. The extraction does not cover the entire simulation duration, but focuses on the critical time window most significantly affected by fault impacts and best reflecting the system's stability trend. This window is typically set from a very short time before the fault occurs (preset duration, e.g., 0.010 seconds) to a period after the fault is cleared (preset duration, e.g., 0.100 seconds). Within this window, each variable is discretized and sampled at a fixed high sampling frequency (e.g., 100 Hz), thus obtaining a time-ordered sequence of observation records for each variable. Meanwhile, based on the complete simulation trajectory (especially the curves showing the change of power angle of each generator over time), a transient stability criterion is applied for the final determination: if, after the simulation, the maximum power angle difference between any two generators in the system does not exceed 180 degrees and the power angle fluctuation shows a convergent trend, then the scenario is determined to be stable; conversely, if the power angle difference continues to increase or exceeds 180 degrees, then it is determined to be unstable. This stability conclusion will serve as the final truth label for the scenario sample.
[0039] Step S240: Arrange and combine the observation record sequence values of all time series variables corresponding to each scene combination in chronological order to construct a high-dimensional feature vector to characterize the complete transient dynamic process of the scene combination.
[0040] For a simulation scenario, we have obtained observations of M variables (e.g., 10 generators × 4 variables + 39 nodes × 2 variables = 98 variables) at N consecutive sampling times (e.g., sampling at 100 Hz within a 0.11-second time window, resulting in 11 time points). First, we arrange the N time-series observations of each variable into a row vector according to their chronological order. Then, we concatenate all the row vectors of the M variables according to a predefined, fixed variable order (e.g., sorted by generator number and node number) to form a very long row vector. The dimension of this row vector is equal to M multiplied by N (e.g., 98 × 11 = 1078), encapsulating the complete evolution information of the core electromechanical and electrical state of the entire power grid within a short period before and after the fault impact, in a time-space order. This long vector is the high-dimensional feature vector, serving as the digital fingerprint of the transient dynamic process in this simulation scenario, and will become the input to the subsequent SVM classification model.
[0041] Step S250: Based on the stability conclusion of the scene combination, assign a binary classification label to the high-dimensional feature vector, where stable scenes are assigned the first type label and unstable scenes are assigned the second type label.
[0042] The labeling is directly derived from the stability conclusions drawn from the full-time simulation trajectory in step S230. This is a rigorous binarization process: if the scene is determined to be stable, its corresponding feature vector is assigned a category label representing "stable," i.e., the first category label, which is usually defined as "+1" numerically. If the scene is determined to be unstable, it is assigned a category label representing "unstable," i.e., the second category label, which is usually defined as "-1" numerically. Here, "+1" and "-1" are not only symbols, but also have clear meanings in the subsequent mathematical expression of the SVM model, used to distinguish samples on both sides of the classification hyperplane. Thus, each scene is transformed from a "run-failure" combination into a data pair sample of "feature vector-classification label."
[0043] Step S260: Collect all the high-dimensional feature vectors with binary classification labels generated by each simulation scenario under all additional running modes and additional fault conditions to form an incremental update dataset.
[0044] Iterates through all the additional operating modes and additional fault condition combinations determined in step S210. For each combination, through the processing in steps S220 to S250, a corresponding high-dimensional feature vector sample with a clear stability label (+1 or -1) has been generated. These samples from different severe scenarios are collected together and arranged sequentially or randomly to form a structured dataset. This dataset may contain hundreds of samples, with an imbalance between stable and unstable samples, reflecting the rarity of unstable operating conditions in actual power grids. The final sample set is the incremental update dataset. This dataset is independent of the pre-trained dataset consisting of typical scenarios and is specifically used to simulate newly emerging and unknown operating and fault conditions in reality after the initial model training. It tests, updates, and enhances the deployed initial SVM discriminative model, enabling it to learn discriminative knowledge to cope with more complex and severe operating conditions.
[0045] Furthermore, step S300 involves incrementally learning and updating the initial SVM binary classification model based on the incrementally updated dataset using a safe update mechanism, including: step S310, where samples in the incrementally updated dataset are selected based on KKT conditions and negative sample hard constraints to form a synthetic training set for this round of incremental learning.
[0046] In practice, the incremental update dataset is typically divided into several batches for sequential processing. For each batch of new samples, the currently deployed discriminative model (which is the initial SVM binary classification model in this first update) is used to perform a preliminary stability category prediction. This prediction classifies each new sample into two categories: "predicted stable" or "predicted unstable." Subsequently, a differentiated screening strategy is implemented. For all new samples predicted as unstable (i.e., the second-class label), a strict "negative sample hard constraint" verification is performed: the function value of the sample under the current model's decision function is calculated, and it is checked whether it meets the strict condition of "function value less than -1." If it meets the condition, it indicates that the current model has a high confidence level in classifying the unstable sample and the boundary is clear, so it can be temporarily excluded from the update. If it does not meet the condition, it indicates that the current model's judgment of the unstable sample is not firm enough or there is a risk of misjudgment, and it must be forcibly included in the sample set to be updated. This is the key data entry point to ensure the "zero missed judgment of instability" safety principle. On the other hand, for all new samples predicted to be stable (i.e., labeled in the first class), the Karush-Kuhn-Tucker (KKT) conditions of support vector machine optimization theory are applied: the product of its label and decision function value is calculated. If the product is less than or equal to 1, the sample is located within the classification margin or is exactly a support vector, belonging to the "potential support vector" that may change the model's decision boundary, and is retained in the update set; otherwise, the sample is far from the classification boundary and has little impact on the model update, and is removed to reduce computational redundancy. Finally, all new samples retained in this round through the above two screening strategies are merged with the original support vectors in the current model (these vectors define the existing classification boundary) to form a streamlined but information-rich synthetic training set, which serves as the basis for subsequent model parameter retraining.
[0047] Step S320: Based on the synthetic training set, the normal vector and displacement term of the model are updated by solving the improved SVM objective function. The improved SVM objective function implements a hard constraint for negative sample classification by setting a misclassification penalty coefficient for unstable samples that is much larger than that for stable samples.
[0048] Using a filtered synthetic training set, the internal parameters of the SVM model, namely the normal vector w and the displacement term b, are updated by solving a specially designed optimization problem. The improved SVM objective function, based on the standard SVM's goal of maximizing the classification margin, undergoes key modifications to address the core requirements of severely imbalanced sample classes and zero tolerance for misclassification of instability in power grid transient stability assessment. The main improvement lies in the penalty imposed on classification errors: the function sets different misclassification penalty coefficients, denoted as C1 and C2, for stable and unstable samples respectively, and mandates that C2 is much larger than C1 (e.g., setting C1=1, C2=100). This means that during optimization, the cost (penalty) of misclassifying an unstable sample as stable is much higher than the cost of misclassifying a stable sample as unstable. More importantly, the objective function introduces an additional "zero misclassification penalty term" specifically for unstable samples. This term contains a very large penalty coefficient λ (theoretically approaching positive infinity) and an indicator function that takes a value of 1 when any unstable sample is misclassified. This design mathematically constitutes a hard constraint on the classification of unstable samples. Because the optimization algorithm, in order to minimize the overall objective function, is forced to drive the classification slack variables of all unstable samples to zero, it essentially mandates that all unstable samples must be correctly classified on the correct side of the decision hyperplane. Numerical algorithms such as sequential minimum optimization are used to solve the optimization problem involving the improved objective function and the sample data and labels in the synthetic training set, ultimately yielding a new set of normal vectors w. new and displacement term b new This set of parameters defines a new classification hyperplane that, while maximizing the margin and allowing for some classification flexibility in stable samples, strictly guarantees the correct classification of all (including newly added) unstable samples.
[0049] Step S330: Based on the updated model, set independent first classification decision thresholds and second classification decision thresholds for stable samples and unstable samples respectively, and dynamically adjust the first classification decision thresholds and second classification decision thresholds according to the classification performance statistics of the synthetic training set.
[0050] Obtained from the new parameter (w) new , b newAfter defining the discriminant function, the classification decision rules are optimized to improve overall discriminant performance while ensuring safety. Standard SVM uses "zero" as the classification threshold for the discriminant function value. To more finely control the balance between the two types of errors, this method abandons a single threshold and introduces a dual-threshold decision mechanism. Independent classification thresholds are set for stable and unstable samples, denoted as the first classification decision threshold τ1 (for determining stability) and the second classification decision threshold τ2 (for determining instability), initialized with τ1 = 0 and τ2 = -1. Based on this, the classification rule is formed: if the discriminant function value is greater than or equal to τ1, it is classified as stable; if it is less than or equal to τ2, it is classified as unstable; if it is between τ2 and τ1, it is a fuzzy region requiring rejection or further analysis. Next, a synthetic training set (whose true labels are known) is used to evaluate and adjust these thresholds. The feature vectors of the synthetic training set are input into the updated discriminant function, the function value for each sample is calculated, and then the current dual thresholds (τ1, τ2) are applied for classification, and the classification results are statistically analyzed. Key performance indicators include: the false positive rate (FN) of unstable samples (the proportion of truly unstable samples that are incorrectly classified as stable) and the recall rate of stable samples (the proportion of truly stable samples that are correctly classified as stable). Dynamic adjustments are made based on statistical results: if the false positive rate of unstable samples is greater than zero, it indicates that the discrimination of instability is not strict enough. Therefore, τ2 is adjusted in a decreasing direction (e.g., making τ2 = τ2 - 0.1) to tighten the classification boundary of the unstable category, making the conditions for classifying it as unstable more stringent, thereby further reducing the risk of missed instability cases. If the recall rate of stable samples is lower than the preset expected level (e.g., 80%), it indicates that the discrimination of stability is too strict. Therefore, τ1 is adjusted in a decreasing direction (e.g., making τ1 = τ1 - 0.1), which means relaxing the classification boundary of the stable category, allowing more samples to be classified as stable, thereby improving the recognition rate of stable samples. This adjustment process can be iterated several times on the current synthetic training set until the recall rate of stable samples reaches an optimal balance point under the hard constraint of a zero (or an acceptablely low) false positive rate for instability.
[0051] In step S340, the updated normal vector, displacement term, and dynamically adjusted dual-classification decision threshold are used together as the output of this round of incremental learning and updating to form the incrementally updated SVM model.
[0052] After optimization in step S320, the core classification hyperplane parameters of the model—the updated normal vector w—were obtained. new And displacement term b. After performance-oriented iterative adjustment in step S330, a set of optimal first classification decision thresholds τ was determined. 1_opt Second classification decision threshold τ 2_opt At this point, all key outputs of this incremental update are ready. The final SVM model after the incremental update is not solely composed of (w) new , bnew It is not defined as a single entity, but rather a complex system consisting of a "core discriminant function" and a "dual-threshold decision rule." Specifically, the model comprises three core components: firstly, based on w... new and b new The constructed linear discriminant function f(x) = w new T ×x + b new First, it maps the input high-dimensional feature vector x to a real value; second, it uses a pair of dynamically adjusted and optimized decision thresholds τ. 1_opt and τ 2_opt Finally, there is the decision logic that combines the first two: if f(x) ≥ τ 1_opt If f(x) ≤ τ, then the output is "stable" (+1); if f(x) ≤ τ, the output is "stable". 2_opt If the output is "unstable" (-1), then the output is "unstable". This new model incorporates new knowledge learned from the current incremental update dataset (reflected in w). new , b new It also inherits the intelligent decision-making mechanism that ensures safety and balance performance (reflected in τ). 1_opt , τ 2_opt (In the middle). It will be used to replace the old model, receive real-time or near-real-time data from the power grid online and perform transient stability assessment. At the same time, it will also serve as the "current prediction model" referred to in step S310 when the next round of incremental updates occurs, laying the foundation for continuous model evolution.
[0053] Through the complete incremental safety update process constructed in steps S310 to S340, an efficient, reliable, and secure online evolution mechanism for transient stability discrimination models is realized. This mechanism first uses intelligent screening based on KKT conditions and hard constraints to accurately extract samples with critical impact on model boundary correction from massive amounts of new scenario data, significantly improving the computational efficiency and relevance of incremental learning. Furthermore, by solving an improved SVM objective function incorporating asymmetric penalties and zero-false-judgment hard constraints, the algorithm ensures that the updated model strictly and correctly classifies all instability samples, fundamentally meeting the rigid requirement of zero missed detections of dangerous operating conditions in power system safety assessment. Finally, by introducing and dynamically optimizing a dual-threshold decision rule independent of the classification hyperplane, this mechanism can flexibly adjust the model's sensitivity to stable operating conditions while maintaining the safety red line of instability false-judgment rate, thus intelligently balancing the overall discrimination performance of the model. In summary, this secure update mechanism enables the SVM discriminant model to continuously, quickly, and safely adapt to the complex and ever-changing operating modes and unforeseen faults of the power grid without full retraining. It achieves a balance between discrimination accuracy, update efficiency, and operational safety, significantly enhancing the practicality and reliability of the transient stability online discrimination system.
[0054] Furthermore, step S310 involves filtering samples in the incremental update dataset based on KKT conditions and negative sample hard constraints, including: step S311, using the current prediction model to perform an initial stability category prediction for each incremental sample in the incremental update dataset.
[0055] The "current prediction model" mentioned here refers to the initial SVM binary classification model trained based on a typical scene during the first incremental update; in subsequent updates, it refers to the incrementally updated SVM model obtained after the previous update. During operation, each high-dimensional feature vector (representing a new scene) from the incremental update dataset is sequentially input into the current prediction model. The discriminant function within the model (based on the normal vector w)... current and displacement term b current (Definition) will compute a real value f(x) = w for each input sample. current T ×x + b current Subsequently, the model judges the real value according to its current decision rule (usually comparing f(x) with 0, or with a pair of thresholds determined in the previous round), and outputs a discrete category prediction result: if it is determined to be stable, it is labeled as the first category (e.g., value +1); if it is determined to be unstable, it is labeled as the second category (e.g., value -1). This round of prediction is not the final judgment; its core purpose is to provide a basis for subsequent differentiated screening strategies, initially dividing the new sample stream into two camps: "samples considered stable by the model" and "samples considered unstable by the model," thereby guiding subsequent steps to adopt different processing logics.
[0056] Step S312: For incremental samples predicted as second-class labels, verify whether they satisfy the condition that the discriminant function value composed of the normal vector and displacement term of the current prediction model is <-1. If not, the incremental sample is included in the sample set to be used for incremental learning.
[0057] For each incremental sample predicted as a second-class label (i.e., unstable), a more rigorous review is required, going beyond simply accepting the initial class label. The review criterion is a mathematical condition based on the concept of classification margin in SVM theory: calculating the specific function value f(x) of the sample under the current model's discriminant function and verifying that it is strictly less than -1. In standard linearly separable SVMs, for all negative-class (unstable) samples, the optimal solution requires f(x) ≤ -1, where samples equal to -1 are called support vectors, defining the classification boundary. The requirement of "less than -1" here represents a stricter safety margin consideration. If this condition is not met (i.e., f(x) >= -1), it means that the unstable sample is too close to the classification boundary constructed by the current model, or even located on the wrong side of the boundary or within the margin band. The current model has low confidence in its discrimination, posing a high risk of being missed or misclassified as stable. According to the absolute safety principle of "zero misclassification for instability," such high-risk unstable samples must be captured and used to correct the model, forcibly included in the sample set to be used for incremental learning. Conversely, if f(x) < -1, it indicates that the current model can clearly and decisively classify the sample as unstable, and the classification boundary is clear. In this case, the sample has relatively little value for this model update and can be temporarily excluded from the update set, thereby reducing redundant calculations to some extent.
[0058] Step S313: For incremental samples predicted as the first type of label, determine whether the incremental sample is a potential support vector based on the KKT conditions of the support vector machine optimization problem, and only include incremental samples determined as potential support vectors in the sample set to be used for incremental learning.
[0059] This step handles new samples initially predicted as "stable" by the model. The core objective of its selection strategy is to improve update efficiency by focusing on samples that are truly likely to change the model's decision boundary. After SVM training, the key to determining the position of its classification hyperplane is a small subset of samples called "support vectors." In incremental learning, not all newly emerging stable samples can become new support vectors or influence the existing boundary. Therefore, the KKT (Karush-Kuhn-Tucker) conditions of the SVM optimization problem solution are used for discrimination. Specifically, for a sample predicted as a Class I label (stable), its true label (known as +1) is multiplied by its current model discriminant function value f(x), i.e., (+1) × f(x) = f(x). The KKT criterion for whether a sample is within the "margin" or becomes a support vector is: the product value ≤ 1. If f(x) ≤ 1, it means that the function value of the stable sample is no greater than 1, possibly located within the classification margin (f(x) < 1) or exactly on the boundary where the support vector is located (f(x) = 1). These samples are called "potential support vectors" because they are near the classification boundary. Once added to the training set, they are likely to participate in defining the new classification hyperplane during re-optimization, thus effectively adjusting the model's decision boundary to adapt to the new data distribution. Therefore, only stable samples that meet this condition are included in the set to be updated. If f(x) > 1, it indicates that the sample is far from the classification boundary, the current model is very confident in its classification, and even if added to the training set, its impact on the final optimization solution is negligible, so it is discarded. This strategy greatly reduces the number of stable samples used for updates, achieving high efficiency in incremental learning.
[0060] Step S314: The incremental samples selected in steps S312 and S313 are merged with the original support vectors in the current prediction model to form a synthetic training set.
[0061] After rigorous safety screening in step S312 and efficiency screening in step S313, two sets of key new samples were obtained from this batch of incremental update data: one set is high-risk unstable samples (predicted unstable samples that do not satisfy f(x) < -1), and the other set is potential support vector stable samples (predicted stable samples that satisfy f(x) ≤ 1). However, training with only these new samples may cause the model to "forget" important knowledge learned previously, especially those that define the existing classification boundary. Therefore, the original support vectors in the current prediction model must also be considered. These original support vectors are the extreme sample points that determine the position of the current classification hyperplane, which are retained by the model after the last (or initial) training. They are extracted from the model and combined with the two types of new samples obtained in this screening to form a unified synthetic training set. This synthetic training set is representative in its composition: it includes new samples that may expose the defects or risks of the current model (especially those unstable samples that may be misclassified), new samples that may drive the evolution of the boundary (potential support vectors), and also retains the core skeleton that defines the boundary of the existing model (original support vectors). This design ensures that the incremental learning process is coherent and efficient, and that existing correct judgment abilities are retained to the greatest extent possible while incorporating new knowledge.
[0062] Through the incremental sample screening strategy comprised of the above four steps, this method lays a solid foundation for safe and efficient incremental updates at the data level. This strategy achieves rapid triage of new samples through preliminary prediction and applies differentiated, refined screening rules to samples with different risk attributes: For predicted unstable samples, hard constraint verification based on rigorous mathematical conditions is performed to ensure that any unstable conditions with a risk of misjudgment are captured and used for model correction without omission, thus building a "zero misjudgment" safety line at the data entry point; for predicted stable samples, KKT conditions are used for intelligent identification, selecting only those potential support vectors located near the classification boundary that may affect the model structure. This significantly eliminates redundant samples that contribute little to boundary adjustment while ensuring the effectiveness of model updates, significantly improving the computational efficiency and resource utilization of incremental learning. Finally, by organically combining the selected key new samples with the original support vectors carrying historical knowledge, a highly condensed synthetic training set is constructed. This set contains all the information necessary to drive the safe evolution of the model with a minimal data size, enabling the subsequent model re-optimization process to be carried out quickly and with focus. It achieves a significant optimization of incremental learning efficiency while strictly ensuring the safety of discrimination, and provides an efficient data processing paradigm for the continuous, rapid and reliable adaptation of discrimination models in complex power grid environments.
[0063] Furthermore, in step S320, based on the synthetic training set, the normal vector and displacement term of the model are updated by solving the improved SVM objective function, including: step S321, constructing the improved SVM objective function, the improved SVM objective function introduces different misjudgment penalty coefficients for stable samples and unstable samples respectively, and adds a zero misjudgment penalty term for unstable samples.
[0064] The standard Support Vector Machine (SVM) binary classification model aims to maximize the classification margin while minimizing the classification error (using a slack variable ξ) across all samples using a uniform penalty parameter C. i (Measurement). However, in the scenario of power grid transient stability discrimination, unstable samples are extremely rare and their misjudgment consequences are extremely severe, which is fundamentally different from the misjudgment costs of a large number of stable samples. To characterize this difference, the improved SVM objective function constructed in this invention first decomposes the unified penalty coefficient into two independent coefficients: a stable sample misjudgment penalty coefficient C1 and an unstable sample misjudgment penalty coefficient C2, thereby allowing different intensities of penalties to be imposed on the misjudgments of the two types of samples during the optimization process. More importantly, in order to mathematically enforce the absolute safety goal of "zero instability misjudgment", the improved function adds an additional zero-misjudgment penalty term to the penalty part for unstable samples. This term contains a large penalty coefficient λ and an indicator function I(·), which is activated only when an unstable sample is misjudged (taking a value of 1). Therefore, the complete improved objective function consists of four parts: a regularization term (semi-normal vector norm squared) controlling model complexity, a relaxation penalty sum weighted by C1 for stable samples, a relaxation penalty sum weighted by C2 for unstable samples, and a zero-misclassification penalty term weighted by λ for unstable samples. This structure provides a mathematical framework for subsequently controlling the flexibility (for stable samples) and rigidity (for unstable samples) of classification behavior precisely through parameter configuration.
[0065] Step S322: Assign preset numerical relationships to the stable sample misjudgment penalty coefficient, unstable sample misjudgment penalty coefficient, and unstable sample zero misjudgment penalty coefficient in the improved SVM objective function, wherein the unstable sample misjudgment penalty coefficient is much larger than the stable sample misjudgment penalty coefficient, and the unstable sample zero misjudgment penalty coefficient approaches positive infinity.
[0066] In practice, these coefficients need to be explicitly assigned values. First, the misjudgment penalty coefficient C1 for stable samples is set to a basic reference value, such as 1. Second, the misjudgment penalty coefficient C2 for unstable samples is set to a value much larger than C1, such as 100. This setting ( This means that in the objective function, the cost of misclassifying an unstable sample as stable is a hundred times greater than the cost of misclassifying a stable sample as unstable. This forces the optimization algorithm to prioritize correcting classification errors of unstable samples when making trade-offs, thus effectively combating the tendency for the classification decision boundary to shift towards the majority class (stable samples) due to severe imbalance in sample classes. Finally, and most importantly, the zero-misclassification penalty coefficient λ for unstable samples is set to a very large number that approaches positive infinity, such as 10 to the power of 6. Since λ is multiplied by the indicator function I(·), if any unstable sample in the training set is misclassified, this term will produce an extremely large value, making the entire objective function value unacceptable. To minimize the objective function, the optimization solver will be forced to find a solution space where the indicator function I(·) for all unstable samples is zero, thus mathematically enforcing the hard constraint that "all unstable samples must be correctly classified." In actual numerical calculations, "approaching positive infinity" is usually manifested as a sufficiently large specific value (such as 1e). 6 Its effect is sufficient to make the objective function value of any solution containing instability misjudgment much larger than that of a solution without misjudgment, thus achieving an equivalent hard constraint.
[0067] Step S323: Using the synthetic training set as training data, a numerical optimization algorithm is used to solve the objective function of the improved SVM. By minimizing the objective function of the improved SVM, a set of normal vectors and displacement terms are calculated. The normal vectors and displacement terms simultaneously satisfy the requirements of maximum classification margin, allow stable samples to have a certain classification error, and ensure that unstable samples are classified correctly.
[0068] The synthetic training set obtained in the previous steps is used as the input training samples. This synthetic training set is a refined dataset that integrates high-risk new unstable samples, key new stable samples, and historical core support vectors. The optimization problem is defined as: minimizing the improved SVM objective function constructed in step S321 and parameterized in step S322, while satisfying the standard linear constraint of SVM (i.e., the difference between the label of each sample and its discriminant function value is adjusted by slack variables). Efficient numerical optimization algorithms specifically designed for solving SVMs, such as Sequential Minimum Optimization (SMO), are used to iteratively solve this convex quadratic programming problem. The algorithm's task is to find an optimal set of normal vectors w, displacement terms b, and corresponding slack variables ξ for each sample. i This allows the objective function value to reach a global or local minimum. Due to the special construction of the objective function, this minimization process automatically coordinates multiple competing sub-objectives: minimizing the regularization term to pursue the maximum classification margin for better generalization; minimizing the C1-weighted term to allow stable samples to have some classification error, meaning that some stable samples can fall within the margin or even be slightly misclassified (slack variable ξ). i>0), which provides the necessary flexibility to deal with noise and model uncertainty; while by minimizing the term jointly controlled by the maximum value C2 and λ, it is absolutely guaranteed that all unstable samples are classified correctly. This means that the algorithm must find the slack variable ξ that makes all unstable samples slack. i The solution approaches zero and the indicator function I(·) is zero. Finally, the algorithm converges and outputs a specific set of numerical solutions, i.e., the updated normal vector w. new and displacement term b new This defines a new, more secure classification hyperplane in a high-dimensional feature space.
[0069] Step S324: Use the normal vector and displacement term as the update result for the core parameters of the initial SVM binary classification model.
[0070] After rigorous numerical optimization in step S323, we obtained the direct product of this round of incremental learning: a new set of model intrinsic parameters, namely the calculated normal vector w. new and displacement term b new This set of parameters is the mathematical representation of the improved objective function when it reaches optimal equilibrium on the current synthetic training set. It fully encodes the model's latest knowledge learned from both new and old key samples regarding how to distinguish between transient stability and instability. In the context of incremental updates, this set of parameters is formally designated as an update and replacement of the core discrimination logic of the original initial SVM binary classification model (or its subsequent incremental update version). Specifically, in subsequent online discrimination or model storage, the old parameters (w... current , b current ) will be this new (w new , b new The discriminant function of the model, which is covered by ) becomes f. new (x) = w new T ×x + b new This new function incorporates rules learned from the newly added data to more safely handle complex new scenarios (especially those prone to misjudgment and instability). Therefore, w new and b new It is not only an optimization algorithm output, but also the final manifestation of the entire security update mechanism at the model knowledge level, providing an updated and solid mathematical core for the model to be put into online application and to perform highly reliable stability judgment.
[0071] Through the parameter update mechanism based on the improved objective function constructed in steps S321 to S324, this invention ensures the safety orientation of the incremental learning process from the root of the optimization problem. This mechanism, by designing a customized objective function that integrates asymmetric penalties and hard mathematical constraints, successfully transforms the absolute requirement of "zero misjudgment of unstable conditions" in the safe operation of power systems into an optimization condition that must be strictly satisfied in the training of machine learning models. By configuring a misjudgment penalty coefficient for unstable samples that is much larger than that for stable samples, and introducing a zero-misjudgment penalty term that theoretically tends towards infinity, this mechanism forces the optimization solver at the algorithm level to prioritize and absolutely guarantee the correct classification of all unstable samples. This ensures that the finally obtained updated model parameters not only pursue good generalization performance (maximum margin) and reasonable fault tolerance for stable samples in a statistical sense, but also rigorously guarantee mathematically that the output of the discriminant function for all known unstable samples falls within the correct decision region. Therefore, this mechanism provides an indispensable safety algorithm kernel for the transient stability discrimination model in the process of absorbing new knowledge and adapting to new scenarios, fundamentally improving the reliability and credibility of the online discrimination system, and realizing the unity between the performance improvement of the machine learning model and the rigid constraints of power grid safety.
[0072] Furthermore, based on the classification performance statistics of the synthetic training set, the first classification decision threshold and the second classification decision threshold are dynamically adjusted, including: step S331, initializing the first classification decision threshold to a non-negative baseline value, and initializing the second classification decision threshold to a baseline value ≤-1.
[0073] The classification decision threshold is the critical value used to make the final judgment on the output value of the discriminant function. Considering that in a standard linearly separable SVM, for all stable samples (label +1), the theoretical optimal solution requires a discriminant function value ≥ +1; for all unstable samples (label -1), the discriminant function value ≤ -1 is required. Samples equal to ±1 are the support vectors, defining the boundary of the classification margin. Therefore, a natural initialization strategy is to set the first classification decision threshold τ1, used to determine whether a sample is stable, to a non-negative baseline value, usually initialized directly to 0. This is equivalent to using the classification hyperplane itself as the initial judgment threshold for stability. Simultaneously, the second classification decision threshold τ2, used to determine whether a sample is unstable, is set to a baseline value less than or equal to -1, usually initialized to -1. This corresponds to using the boundary where the unstable class support vectors are located as the initial judgment threshold for instability. This initialization ensures that the initial decision rule is consistent with the theoretical optimal boundary of the model after a safe update (given by w). new and b new (Definition) Maintaining logical consistency provides a clear and interpretable starting point for subsequent performance-based fine-tuning.
[0074] Step S332: Combine the updated normal vector and the discriminant function determined by the displacement term with the first classification decision threshold and the second classification decision threshold to form the current dual-threshold classification rule, and classify and discriminate the samples in the synthetic training set based on the dual-threshold classification rule.
[0075] After integrating the updated model parameters and the initial thresholds, an executable classification decision logic is formed, and this logic is used to evaluate known samples to obtain performance feedback. First, the updated normal vector w obtained in step S323 is used. new and displacement term b new A new discriminant function f is constructed. new (x) = w new T ×x + b new This function maps any input feature vector x to a real value. Then, this discriminant function is compared with the currently set first classification decision threshold τ. 1_current Second classification decision threshold τ 2_current Combining these, a set of dual-threshold classification rules is formed. This rule is defined as follows: for an input sample x, if its discriminant function value f... new (x) ≥ τ 1_current If f is stable, then the sample is considered stable (output +1); if f new (x) ≤ τ 2_current If f new The value of (x) is between τ 2_current and τ 1_current If the value falls between these two values, the sample falls into the ambiguous region of "reject judgment" or "further analysis required." Next, this rule is applied to every sample in the synthetic training set. Since the true label (stable +1 or unstable -1) of each sample in the synthetic training set is known, a classification process can be performed once: calculate f for each sample. new The (x) value is used to give the predicted label based on the current double threshold rule, and the predicted result is compared with the true label.
[0076] Step S333: Obtain the misclassification rate of unstable samples and the recall rate of stable samples after classifying the synthetic training set according to the current dual-threshold classification rule.
[0077] Based on the classification results of step S332, detailed performance statistics were performed. First, the False Negative Rate (FNR) for unstable samples was calculated. Specifically, it is the proportion of samples in the synthetic training set whose true label is unstable (-1) that were incorrectly classified as stable (+1) by the current dual-threshold rule. This metric directly measures the model's risk of missing dangerous operating conditions, and its target value should be zero, which is the bottom line for ensuring power grid safety. Second, the Recall for Stable Samples was calculated. Specifically, it is the proportion of samples in the synthetic training set whose true label is stable (+1) that were correctly classified as stable (+1). This metric reflects the model's ability to identify normal stable operating conditions. A higher recall rate means the model can effectively reduce false alarms for stable operating conditions, increasing operators' confidence in the classification results. Obtaining these two metrics provides a clear data-driven basis for the next step of targeted threshold adjustments.
[0078] Step S334: If the misclassification rate of unstable samples is greater than 0, adjust the second classification decision threshold in the direction of decreasing value to tighten the classification boundary for unstable samples.
[0079] If the false positive rate of the unstable samples obtained in step S333 is greater than 0, it means that even after updating the model parameters based on hard constraints, at the currently set threshold τ2, at least one known unstable sample is still missed by the system (i.e., its discriminant function value f). new (x)>τ 2_current (The conditions for being judged as unstable have not been met). This is unacceptable for power grid safety. Therefore, corrective measures must be taken immediately: adjust the second classification decision threshold τ2 in the direction of decreasing value. For example, τ2... 2_current The threshold was adjusted from -1 to -1.1, tightening the classification boundary for unstable samples. Reducing τ² means that a sample's discriminant function value must reach a more negative (smaller) level to be classified as unstable. This makes the threshold for "instability" more stringent, forcing more samples with larger discriminant function values (i.e., closer to the stable side) to no longer be easily classified as stable. This reclassifies unstable samples that were previously missed due to excessively high thresholds (not negative enough) into the unstable category. The direct purpose is to eliminate misclassification of unstable samples and ensure a safety margin.
[0080] Step S335: If the recall rate of stable samples is lower than the preset expected value, the first classification decision threshold is adjusted in the direction of decreasing value to relax the classification boundary of stable samples and balance the overall recognition performance of the model.
[0081] In power system operation, besides absolute safety, it is also necessary to determine that the system has high operating efficiency to avoid unnecessary alarms for a large number of stable operating conditions. If the stable sample recall rate obtained in step S333 is lower than the preset expected value (e.g., lower than 80% or a level set based on operating experience), it indicates that the current model's judgment of stable operating conditions is too strict, causing many samples that should be judged as stable to be excluded due to their discriminant function value f. new (x) is below the current τ1 threshold and is therefore rejected by the system or misclassified as an ambiguous / unstable state. To improve the recognition ability of stable samples, the first classification decision threshold τ1 needs to be adjusted in the direction of decreasing value. For example, τ1 can be adjusted... 1_current The value was adjusted from 0 to -0.1. The physical meaning of this adjustment is to relax the classification boundary for stable samples. Reducing τ1 means that the threshold for the discriminant function value required for a sample to be classified as stable is lowered. This allows more samples with relatively small discriminant function values (i.e., close to the instability side but essentially still belonging to the stable cluster) to meet the "stable" judgment condition and thus be correctly identified as stable. This adjustment effectively improves the recall rate of stable samples without affecting the tightened instability boundary (τ2), thereby balancing the overall recognition performance of the model while maintaining a safe boundary, and improving user experience and system usability.
[0082] Step S336: The first classification decision threshold and the second classification decision threshold determined after the adjustments in steps S334 and S335 are used as the output results of this round of dynamic adjustment.
[0083] After one or more iterations of steps S334 and S335 (for example, first adjust τ2 based on the false positive rate, then adjust τ1 based on the recall rate, and then re-evaluate the performance, repeating this process until the predetermined performance target is met or the iteration limit is reached), a new set of threshold values will be obtained: the adjusted first classification decision threshold τ. 1_adjusted and the adjusted second classification decision threshold τ 2_adjusted This set of thresholds represents a balance point that optimally reconciles the conflicting objectives of "zero false positives" (safety goal) and "high stable recall" (performance goal) on the synthetic training set under the current model parameters. It is related to the updated normal vector w output in step S323. new and displacement term b new They have equal status and together constitute a complete and deployable discriminative logic. Therefore, τ 1_adjusted and τ 2_adjusted This has been officially confirmed as the final output for this round of dynamic threshold adjustment. It will be used in conjunction with w. new and b new Together, they are passed to the final model integration step as the final result of this round of incremental learning at the decision rule level, and used to build or update the online discrimination system.
[0084] The dual-threshold dynamic adjustment mechanism defined in steps S331 to S336 provides an adaptive and refined decision boundary optimization capability for the transient stability discrimination model. This mechanism decouples the sensitivity of discriminating between unstable and stable samples by expanding a single decision point into two independent and separately adjustable thresholds. Based on real-time performance feedback from the synthetic training set, the mechanism can automatically and directionally adjust the thresholds: when a risk of instability and missed detection is detected, the negative class threshold is immediately tightened to eliminate the safety hazard; when the recognition rate of stable samples is found to be insufficient, the positive class threshold is correspondingly relaxed to improve model efficiency. Mathematically, this process is equivalent to dynamically and asymmetrically moving two parallel decision hyperplanes in the feature space, thereby flexibly scaling the width and position of the classification region without changing the orientation of the core classification hyperplane (determined by w and b). The ultimate effect is that, while strictly ensuring that the model's inherent classification ability after hard constraint updates is absolutely safe for unstable samples (theoretically zero misclassification) and is truly reflected in the final decision output, the model's correct recognition rate for stable operating conditions is maximized and improved. Thus, an optimal balance is achieved between safety, accuracy and usability for the current data distribution, significantly enhancing the overall performance and reliability of the model after incremental updates in actual online discrimination.
[0085] Furthermore, the initial SVM binary classification model is represented as: .
[0086] in, The output of the initial SVM binary classification model. It is the normal vector. This is the input vector for the initial SVM binary classification model of the power grid. For displacement terms, a binary hyperplane. Depend on and Decide.
[0087] For sample set Stability binary classification labels If the hyperplane can correctly classify the samples, then: .
[0088] Stable samples output +1, and unstable samples output -1.
[0089] Furthermore, the SVM objective function is improved as follows: .
[0090] in, To ensure that the penalty coefficient for negative samples is much larger than that for positive samples, and to alleviate the class imbalance problem in the power grid transient stability discrimination samples, As an indicator function, when a negative sample is misclassified The value is 1 if the condition is met, and 0 otherwise. The discriminant values are those of the initial SVM binary classification model or the SVM model after incremental updates following retraining in the previous round. The penalty coefficient for zero misclassification of negative samples. , These are slack variables.
[0091] The IEEE-39-bus standard test system is used as the object of calculation and analysis. This system includes 10 generators, 39 nodes, and 46 transmission lines, with a rated voltage level of 345kV and a system base power of 100MVA. It can simulate the transient operating characteristics of an AC power grid. Furthermore, PSD-BPA is used for power system transient simulation, with a simulation step size of 10ms and a fault simulation duration of 5.0s (fault occurs 0.1s, the fault continues for another 0.1s, and the simulation continues for 4.8s after the fault is cleared).
[0092] Based on the aforementioned simulation platform and parameter settings, to construct a data-driven transient stability discrimination model, it is necessary to first generate sample data covering typical and severe scenarios. In this embodiment, based on the actual operation planning and safety verification requirements of the power grid, a large number of electromechanical transient time-domain simulations were systematically performed by setting different load levels, new energy output, and fault combinations to obtain the basic data necessary for model training and updates.
[0093] First, 1) Typical operating modes and anticipated faults (source of pre-training dataset): covering five modes: heavy winter (105% of rated load), light winter (70%), heavy summer (100%), light summer (65%), and holidays (55%). The anticipated faults include N-1 faults of all main grid lines (such as single-phase grounding faults of 46 lines including lines 1-2 and 3-4, with a fault clearing time of 0.1s), N-2 faults of double-circuit lines on the same pole (such as simultaneous short circuits of lines 10-11 and 10-12), DC commutation failure, and single-pole blocking faults (±500kV DC system connected to node 28), generating a total of 1200 sets of simulation scenarios.
[0094] 2) Additional operating modes and additional faults (source of incremental update dataset): Additional operating modes are mid-load mode (85% of rated value) and new energy large-scale generation mode (photovoltaic output 120% of rated value); additional faults include N-3 fault (simultaneous faults of lines 5-6, 6-7, and 7-8) and simultaneous commutation failure of dual-circuit DC. Combining typical and additional operating modes, 400 new simulation scenarios are generated (of which 220 are stable and 180 are unstable).
[0095] 3) Feature extraction and dataset labeling: Transient response features were collected from 0.010s before the fault occurred to 0.100s after the fault was cleared, including the power angles of the 10 generators. ), speed ( Terminal voltage () ), electromagnetic power ( ), and the voltage amplitude of 39 nodes ( Phase () Each variable was sampled at a frequency of 100Hz, yielding 11 observation values at each time point, forming an input vector of 11×(4×10+2×39)=1298 dimensions. Stability was determined by time-domain simulation of the power angle curve (a power angle difference ≤180° and convergence indicates stability, marked as +1; otherwise, instability is indicated as -1), ultimately resulting in 1200 pre-trained datasets and 400 incremental update datasets.
[0096] Secondly, after obtaining the structured pre-trained dataset and the incrementally updated dataset, the construction of the machine learning model can begin. In this embodiment, the problem of online determination of power grid transient stability is formalized as a binary classification pattern recognition task. Support vector machines, which are suitable for handling high-dimensional and nonlinear problems, are selected as the basic classifier. By learning the features of stable and unstable modes from historical typical data, a benchmark model with preliminary discrimination ability is established.
[0097] 1) Model parameter initialization: The transient stability discrimination is modeled as a binary classification problem. An SVM model is constructed using the RBF kernel function, and the kernel function parameters are... Set the initial penalty coefficient to 0.01. The model expression is: ;in, It is a 1298-dimensional normal vector. For displacement terms, Let be the input vector extracted in the previous step, and sign(·) be the sign function. The output +1 indicates stability and -1 indicates instability.
[0098] 2) Model Training and Validation: The pre-training dataset was divided into a training set (840 groups) and a validation set (360 groups) in a 7:3 ratio. The optimization problem was solved using the commonly used SMO algorithm to make the classification hyperplane ( , )satisfy: That is, a stable sample outputs +1, and an unstable sample outputs -1.
[0099] After training, the accuracy rate of stability determination on the validation set reached 92.5%, and the accuracy rate of unstable sample identification was 89%, resulting in a preliminary SVM pre-trained model M0.
[0100] Furthermore, while the initial SVM model performs well in typical scenarios, an effective model update mechanism must be introduced to enable it to continuously adapt to atypical operating conditions and more severe faults in the power grid. This invention designs and implements an incremental learning process that integrates sample selection, safety constraints, and decision optimization. This process can efficiently correct and enhance existing models using new data while ensuring zero misjudgments in key instability scenarios.
[0101] 1) Incremental Sample Screening (based on KKT conditions and hard constraints on negative samples): ① New Sample Input: Import the incremental update dataset in batches, with each batch containing 50 samples, and use model M0 to predict the class; ② Negative Sample Screening: For samples predicted as negative, i.e., samples predicted as unstable, verify whether they meet the following conditions. If the conditions are not met, the samples are forcibly included in the incremental update sample set. In this embodiment, all 180 unstable samples were included; ③ Positive sample screening: For samples predicted to be positive, i.e., samples predicted to be stable, KKT conditions are used to determine which samples meet the criteria. Potential support vectors (68 groups selected from 220 positive samples); ④ Update set determination: After each batch of selection, an incremental update set of 248 groups is formed, containing "180 unstable samples + 68 positive samples". The model is retrained using the selected sample set to update... and .
[0102] 2) Negative Sample Hard Constraint Optimization: The model parameters are updated using an improved SVM objective function, which is: ;set up =100 ( ), negative sample zero misclassification penalty coefficient =10 6 (Negative sample zero misjudgment penalty coefficient) As an indicator function, when a negative sample is misclassified ( The objective function sets the value to 1 when updating the discriminant value of a pre-trained model or an SVM model retrained in the previous round, and sets it to 0 otherwise. This objective function forces the negative samples to be evaluated. →0, to implement constraints: (Instability sample).
[0103] 3) Dynamic adjustment of dual thresholds: Given that and Since positive and negative samples are treated differently, dynamic thresholds are introduced for positive and negative samples respectively during the classification stage. and : In the formula: and Two thresholds can be dynamically adjusted based on the positive sample recall requirement, ensuring that the accuracy of negative samples is maintained without excessively sacrificing the recognition accuracy of positive samples. The adaptive update steps for the positive and negative sample thresholds are as follows: ① Initial threshold setting: ② Threshold update logic: After each batch of training, the misclassification rate is calculated. If the negative sample misclassification rate FN>0, then... (In this embodiment, the initial FN = 3%, after adjustment) If the positive sample recall rate is <80%, then (In this embodiment, the recall rate is 73%, after adjustment) ); ③ Model Update: The filtered incremental sample set (248 groups from the previous step) is fused with the support vectors (120 groups) of the pre-trained model M0. The model is then retrained by improving the objective function to obtain the updated model M1, whose parameters are: , That is, the decision function is: .
[0104] Finally, after completing the incremental security update of the model, the discrimination performance of the updated model in the new scenario must be objectively evaluated to verify the effectiveness of the proposed method. This embodiment uses reserved incremental update test data to comprehensively compare the performance indicators of the model before and after the update from multiple dimensions such as overall accuracy, unstable sample recognition rate, and stable sample recall rate, thereby quantitatively illustrating the actual effect of the method of the present invention in improving model adaptability and ensuring security.
[0105] Performance verification of the updated model: Model M1 was validated using the reserved test set of the incremental update dataset. The results showed that the overall stability accuracy reached 97.5%, which is about 5 percentage points higher than the pre-trained model M0. Among them, the instability sample identification accuracy was 100%, and the positive sample recall rate was increased to 85%, fully achieving the goal of "zero misjudgment in unstable scenarios" for incremental SVM safe update.
[0106] Accordingly, referring to Figure 2, a second aspect of the present invention provides an incremental SVM security update system for power grid transient stability assessment. The incrementally updated SVM model is obtained according to the above-mentioned incremental SVM security update method for power grid transient stability assessment. The system includes: a data acquisition module 1, which is used to acquire first simulation data of the power grid under typical operating mode and expected fault conditions, and second simulation data under additional operating mode and additional fault conditions by performing electromechanical transient time-domain simulation of the power grid.
[0107] Training set generation module 2 is used to generate a pre-training dataset for initial model training based on the first simulation data, and to generate an incremental update dataset for subsequent model updates based on the second simulation data.
[0108] Model training module 3 is used to build and train an initial SVM binary classification model for transient stability discrimination based on the pre-trained dataset.
[0109] Model update module 4 is used to incrementally learn and update the initial SVM binary classification model based on the incrementally updated dataset and adopt a safe update mechanism to obtain the incrementally updated SVM model, and then perform online transient stability judgment on the power grid.
[0110] Accordingly, a third aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described incremental SVM security update method for power grid transient stability assessment.
[0111] Accordingly, a fourth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described incremental SVM security update method for power grid transient stability assessment.
[0112] This invention aims to protect an incremental SVM security update method and system for power grid transient stability assessment, which has the following advantages: 1. By constructing a security update mechanism centered on incremental sample screening, model parameter security update, and dual-threshold dynamic adjustment, it effectively overcomes the bottleneck of traditional stability assessment models, which are difficult to adapt to the complex and ever-changing additional methods and unforeseen faults in actual power grid operation due to the solidification of training data. It enables the assessment model to efficiently and reliably complete self-evolution and performance improvement based solely on incremental data without retraining with all data, thereby significantly broadening the applicable scenarios of the model and ensuring the timeliness of online assessment; 2. By introducing and specifically implementing an improved SVM objective function, it assigns a misjudgment penalty coefficient much larger than that of stable samples and a near-infinite zero misjudgment penalty term to unstable samples, forcing the algorithm to... A hard constraint for negative sample classification was constructed, fundamentally solving the problem of weak model recognition ability for instability scenarios caused by the inherent and severe class imbalance in power system transient samples. This ensures zero misjudgment of power grid instability conditions under any new scenario, greatly improving the safety and reliability of transient stability assessment. 3. By setting independent classification decision thresholds for stable and unstable samples respectively, and dynamically adjusting the two thresholds in opposite directions based on the classification performance statistics of the synthetic training set, this method creatively provides an adaptive classification boundary optimization strategy. This strategy can flexibly and intelligently adjust the recall level of positive samples while strictly ensuring that the rigid safety bottom line of negative sample recognition accuracy is not breached, thereby effectively balancing and optimizing the overall comprehensive recognition performance of the model while ensuring safety.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for incremental SVM security update for power grid transient stability assessment, characterized in that, The process includes the following steps: by performing electromechanical transient time-domain simulation on the power grid, first simulation data of the power grid under typical operating conditions and anticipated fault conditions, and second simulation data under additional operating conditions and additional fault conditions are obtained respectively; A pre-training dataset for initial model training is generated based on the first simulation data, and an incremental update dataset for subsequent model updates is generated based on the second simulation data. Based on the pre-trained dataset, an initial SVM binary classification model for transient stability determination is constructed and trained; based on the incrementally updated dataset, a safe update mechanism is used to incrementally learn and update the initial SVM binary classification model to obtain the incrementally updated SVM model, which is then used for online transient stability determination of the power grid.
2. The incremental SVM security update method for power grid transient stability assessment according to claim 1, characterized in that, The step of generating an incremental update dataset for subsequent model updates based on the second simulation data includes: determining multiple scenario combinations to be simulated according to the additional operating mode and the additional fault conditions; for each scenario combination, performing electromechanical transient time-domain simulation to obtain the raw transient response data under the scenario combination; extracting the time-series variables of the power angle, speed, terminal voltage, and electromagnetic power of all generators in the power grid, as well as the time-series variables of the voltage amplitude and phase of each substation node in the main grid, from a preset duration before the fault occurs to a preset duration after the fault is cleared from the raw transient response data of each scenario combination, and obtaining the observation record sequence values. Based on the stability conclusion of the scenario combination determined by the simulation trajectory; the observed record sequence values of all time-series variables corresponding to each scenario combination are arranged and combined in chronological order to construct a high-dimensional feature vector representing the complete transient dynamic process of the scenario combination; according to the stability conclusion of the scenario combination, a binary classification label is assigned to the high-dimensional feature vector, wherein stable scenarios are assigned a first-class label and unstable scenarios are assigned a second-class label; the high-dimensional feature vectors generated by each simulation scenario under all additional operating modes and additional fault conditions, which have been assigned the binary classification label, are collected to form the incremental update dataset.
3. The incremental SVM security update method for power grid transient stability assessment according to claim 1, characterized in that, The incremental learning and updating of the initial SVM binary classification model based on the incrementally updated dataset, using a safe update mechanism, includes: filtering samples in the incrementally updated dataset based on KKT conditions and hard constraints on negative samples to form a synthetic training set for this round of incremental learning; updating the model's normal vector and shift term by solving an improved SVM objective function based on the synthetic training set, wherein the improved SVM objective function implements hard constraints on negative sample classification by setting a misclassification penalty coefficient for unstable samples that is much larger than that for stable samples; setting independent first and second classification decision thresholds for stable and unstable samples respectively based on the updated model, and dynamically adjusting the first and second classification decision thresholds according to the classification performance statistics of the synthetic training set; and using the updated normal vector, shift term, and dynamically adjusted binary classification decision thresholds as the output of this round of incremental learning and updating to form the incrementally updated SVM model.
4. The incremental SVM security update method for power grid transient stability assessment according to claim 3, characterized in that, The step of filtering samples in the incremental update dataset based on KKT conditions and negative sample hard constraints includes: using the current prediction model to perform initial stability category prediction for each incremental sample in the incremental update dataset; for incremental samples predicted as second-class labels, verifying whether they satisfy the condition that the discriminant function value composed of the normal vector and displacement term of the current prediction model is <-1; if not, including the incremental sample in the sample set to be used for incremental learning; for incremental samples predicted as first-class labels, determining whether the incremental sample is a potential support vector based on the KKT conditions of the support vector machine optimization problem, and including only the incremental samples determined as potential support vectors in the sample set to be used for incremental learning; merging the incremental samples predicted as second-class labels and the incremental samples predicted as first-class labels with the original support vectors in the current prediction model to jointly constitute the synthetic training set.
5. The incremental SVM security update method for power grid transient stability assessment according to claim 3, characterized in that, The step of updating the model's normal vectors and displacement terms by solving an improved SVM objective function based on the synthetic training set includes: constructing the improved SVM objective function, which introduces different misclassification penalty coefficients for stable and unstable samples, and adds a zero misclassification penalty term for unstable samples; assigning preset numerical relationships to the stable sample misclassification penalty coefficient, unstable sample misclassification penalty coefficient, and unstable sample zero misclassification penalty coefficient in the improved SVM objective function, wherein the unstable sample misclassification penalty coefficient is much larger than the stable sample misclassification penalty coefficient, and the unstable sample zero misclassification penalty coefficient approaches positive infinity; using the synthetic training set as training data, solving the improved SVM objective function using a numerical optimization algorithm, and calculating a set of normal vectors and displacement terms by minimizing the improved SVM objective function, wherein the normal vectors and displacement terms simultaneously satisfy the requirements of maximum classification margin, allowing a certain classification error for stable samples, and ensuring correct classification for unstable samples; and using the normal vectors and displacement terms as the update results for the core parameters of the initial SVM binary classification model.
6. The incremental SVM security update method for power grid transient stability assessment according to claim 3, characterized in that, The step of dynamically adjusting the first classification decision threshold and the second classification decision threshold based on the classification performance statistics of the synthetic training set includes: initializing the first classification decision threshold to a non-negative baseline value and initializing the second classification decision threshold to a baseline value ≤-1; combining the discriminant function determined by the updated normal vector and the displacement term with the first and second classification decision thresholds to form the current dual-threshold classification rule, and classifying the samples in the synthetic training set based on the dual-threshold classification rule; obtaining the misclassification rate of unstable samples and the recall rate of stable samples after classifying the synthetic training set according to the current dual-threshold classification rule; if the misclassification rate of unstable samples is greater than 0, adjusting the second classification decision threshold in the direction of decreasing value to tighten the classification boundary for unstable samples; if the recall rate of stable samples is lower than a preset expected value, adjusting the first classification decision threshold in the direction of decreasing value to widen the classification boundary for stable samples and balance the overall recognition performance of the model; and using the adjusted first classification decision threshold and second classification decision threshold as the output results of this round of dynamic adjustment.
7. The incremental SVM security update method for power grid transient stability assessment according to claim 3, characterized in that, The initial SVM binary classification model is represented as follows: ;in, The output of the initial SVM binary classification model. It is the normal vector. This is the input vector for the initial SVM binary classification model of the power grid. For displacement terms, a binary hyperplane. Depend on and Decision; for the sample set Stability binary classification labels If the hyperplane can correctly classify the samples, then: Stable samples output +1, and unstable samples output -1.
8. The incremental SVM security update method for power grid transient stability assessment according to claim 7, characterized in that, The objective function of the improved SVM is: ;in, To ensure that the penalty coefficient for negative samples is much larger than that for positive samples, and to alleviate the class imbalance problem in the power grid transient stability discrimination samples, As an indicator function, when a negative sample is misclassified The value is 1 if the condition is met, and 0 otherwise. The discriminant values are those of the initial SVM binary classification model or the SVM model after incremental updates following retraining in the previous round. The penalty coefficient for zero misclassification of negative samples. , These are slack variables.
9. The incremental SVM security update method for power grid transient stability assessment according to any one of claims 1-8, characterized in that, The typical operating modes include winter maximum load mode, winter minimum load mode, summer maximum load mode, summer minimum load mode, and holiday load mode; the anticipated fault conditions include single-circuit faults in all main grid lines, simultaneous double-circuit faults in some double-circuit lines on the same pole, and commutation failure faults, single-pole blocking faults, and double-pole blocking faults in the DC transmission system.
10. An incremental SVM security update system for power grid transient stability assessment, characterized in that, The incremental SVM secure update method for power grid transient stability assessment according to any one of claims 1-9, comprising: a data acquisition module, used to acquire first simulation data of the power grid under typical operating conditions and anticipated fault conditions, and second simulation data under additional operating conditions and additional fault conditions, respectively, by performing electromechanical transient time-domain simulation of the power grid; a training set generation module, used to generate a pre-training dataset for initial model training based on the first simulation data, and an incremental update dataset for subsequent model updates based on the second simulation data; a model training module, used to construct and train an initial SVM binary classification model for transient stability assessment based on the pre-training dataset; and a model update module, used to incrementally learn and update the initial SVM binary classification model using a secure update mechanism based on the incremental update dataset, to obtain the incrementally updated SVM model, and to perform online transient stability assessment of the power grid.
