Transient voltage safety margin estimation method and device and computer program product

The residual-LSTM network is constructed through domain adaptive and active learning methods, and the transient voltage safety domain boundary of the power system is determined, which solves the problem of low efficiency of the transient voltage safety margin estimation of the power system in the prior art, and realizes the power Real-time assessment of system security margin.

CN119272837APending Publication Date: 2025-01-07ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411304447.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the prior art, the transient voltage safety margin of the power system cannot be efficiently estimated due to the difficulty of direct application of the evaluation model, especially when the physical significance of the data-driven model is unclear and the training complexity is high.

Method used

Using domain adaptive methods and active learning methods, multiple sets of training data are input into a network model combining residual networks and long and short-term memory networks for iterative training, a transient voltage safety evaluation model is constructed, a security domain boundary is determined, and a real-time Calculate the safety margin of the power system.

Benefits of technology

It effectively reduces the training time of the evaluation model, realizes real-time estimation of the current safety margin of the power system, and solves the problem that the evaluation model is difficult to directly apply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272837A_ABST
    Figure CN119272837A_ABST
Patent Text Reader

Abstract

The invention provides a transient voltage safety margin estimation method and device, and a computer program product, and the method comprises the steps: inputting input data in multiple groups of training data into a predetermined network model through employing a domain self-adaption method and an active learning method, and carrying out the iterative training, and obtaining a transient voltage safety evaluation model; determining a transient voltage safety domain boundary corresponding to the transient voltage safety evaluation model according to the output of the transient voltage safety evaluation model, wherein the transient voltage safety domain boundary is a set formed by sample injection power vectors when the safety probability of the transient voltage is equal to the unsafety probability; and acquiring an injection power vector of the power system in real time, and calculating the shortest distance between the injection power vector and the transient voltage safety domain boundary to obtain a safety margin. The problem that the safety margin cannot be efficiently estimated due to the fact that an evaluation model is difficult to directly apply in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of transient voltage safety technology, and in particular to a transient voltage safety margin estimation method, an estimation device, a computer-readable storage medium and a computer program product. Background Art

[0002] As the digitalization of power grids continues to deepen, technologies such as artificial intelligence and big data have provided new ideas for the safety and stability analysis of new power systems. Complex and high-dimensional power systems can rely on the powerful representation capabilities of neural networks and apply neural networks to the reliable assessment of transient voltage safety in power systems. However, given the variability and complexity of new power systems, there are many difficulties and challenges in directly applying data-driven artificial intelligence technology to the transient voltage safety assessment of power systems. First, the physical meaning of the data-driven model is unclear. For power systems with extremely high safety operation requirements, intelligent assessment models that lack interpretability are difficult to apply directly; second, data-driven models require a large number of labeled samples for training. Even so, the sample set is difficult to cover all possible operating conditions in the actual application of the system, and the model training complexity is high. Summary of the invention

[0003] The main purpose of the present application is to provide a transient voltage safety margin estimation method, estimation device, computer-readable storage medium and computer program product, so as to at least solve the problem in the prior art that the safety margin cannot be efficiently estimated because the evaluation model is difficult to directly apply.

[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for estimating a transient voltage safety margin is provided, comprising: using a domain adaptive method and an active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the training data includes input data and output data, the input data is a sample injection power vector, the output data is a sample transient voltage safety assessment result, the sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the predetermined network model is a network model combining a residual network and a long short-term memory network; determining a transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, the transient voltage safety domain boundary is a set formed by the sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; acquiring the injection power vector of the power system in real time, and calculating the shortest distance between the injection power vector and the transient voltage safety domain boundary to obtain a safety margin, and the value of the safety margin is the value corresponding to the shortest distance.

[0005] Optionally, a domain adaptive method and an active learning method are used to input input data from multiple sets of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, including: obtaining an uncalibrated data set, the uncalibrated data set is a set formed by historical operating data of the power system and simulation data, the simulation data is data obtained by mathematical modeling and simulation calculation of the power system; randomly extracting multiple samples to be calibrated from the uncalibrated data set to form a data set to be calibrated; a calibration step, calibrating the data set to be calibrated to obtain a training sample set, the training sample set includes multiple sets of the training data; a training step, inputting the input data in the training sample set into an initial assessment model for training to obtain a trained initial assessment model, the initial assessment model The model is the predetermined network model to be trained; an evaluation step, using a test sample set to evaluate the trained initial evaluation model to obtain a model accuracy; when the model accuracy does not meet the accuracy requirements, a loss function is determined based on the domain adaptive method to update the model parameters using a gradient descent method, and a plurality of samples to be calibrated are reselected from the uncalibrated data set as the data set to be calibrated, and the calibration step, the training step and the evaluation step are repeated at least once until a convergence condition is reached, the convergence condition being that the number of iterations reaches a set maximum number of iterations or the initial evaluation model after training meets the accuracy requirements, the initial evaluation model after training is determined as the transient voltage safety assessment model, and the model parameters are all parameters in the initial evaluation model.

[0006] Optionally, reselecting multiple samples to be calibrated as the data set to be calibrated includes: selecting multiple samples to be calibrated from the uncalibrated data set as the data set to be calibrated according to a sample search strategy, wherein the sample search strategy is a strategy of selecting M samples to be calibrated with the smallest uncertainty measure in the uncalibrated data set, and the uncertainty measure is the absolute value of the sample safety assessment result corresponding to the sample injection power vector.

[0007] Optionally, determining the loss function based on the domain adaptation method includes: calculating the maximum mean difference loss between the training sample set and the test sample set according to a first formula, wherein the first formula is MMD 2 (D s , D t ) is the maximum mean difference loss, φ is the transformation function used to transform the data set into the Hilbert space, D s represents the training sample set, M is the total number of training samples in the training sample set, and D i represents the characteristic value of the i-th training sample in the training sample set, D irepresents the test sample set, N is the total number of test samples in the test sample set, Represents the characteristic value of the jth test sample in the test sample set; adds the first classification loss, the second classification loss and the difference loss to obtain the loss function of the transient voltage safety assessment model, wherein the first classification loss is the classification loss of the transient voltage safety assessment model on the training sample set, the second classification loss is the product of the classification loss of the transient voltage safety assessment model on the test sample set and a first weighting coefficient, and the difference loss is the product of the maximum mean difference loss and the second weighting coefficient.

[0008] Optionally, determining the transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model includes: simplifying the transient voltage safety assessment model to obtain an evaluation function of the transient voltage safety assessment model, wherein the expression of the evaluation function is: is the evaluation function, θ c,1 and θ c,2 is a parameter in the transient voltage safety assessment model, m represents the total number of residual modules in the residual network, and u represents the sample injection power vector; when the evaluation function is 0, it is determined to be the transient voltage safety domain boundary, and the expression of the transient voltage safety domain boundary is

[0009] Optionally, calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin includes: determining a critical power vector and an objective function, wherein the expression of the critical power vector is u c =u+θ T u, u c is the critical power vector, u is the injected power vector, θ T To adjust the transpose of the vector, the expression of the objective function is Indicates that the critical power vector is located on the boundary of the transient voltage safety region, ||uu c || is the distance from the injected power vector to the critical power vector; based on the optimization algorithm, the adjustment vector is optimized so that the function value of the objective function is minimized to obtain the target critical power vector; the distance between the injected power vector and the target critical power vector is calculated to obtain the safety margin.

[0010] Optionally, after adopting domain adaptation method and active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, the method also includes: inputting the injected power vector of the power system into the transient voltage safety assessment model, and outputting a transient voltage safety assessment result; when the transient voltage safety assessment result is that the transient voltage is unsafe, issuing a prompt message, and the prompt message is used to prompt that the transient voltage of the current power system is in an unsafe state.

[0011] According to another aspect of the present application, a transient voltage safety margin estimation device is provided, the device comprising: a training unit, for inputting input data in multiple groups of training data into a predetermined network model for iterative training using a domain adaptive method and an active learning method to obtain a transient voltage safety assessment model, each group of the training data comprises input data and output data, the input data is a sample injection power vector, the output data is a sample transient voltage safety assessment result, the sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, the predetermined network model is a network model combining a residual network and a long short-term memory network; a determination unit, for determining a transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, the transient voltage safety domain boundary is a set formed by the sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; a calculation unit, for acquiring the injection power vector of the power system in real time, and calculating the shortest distance between the injection power vector and the transient voltage safety domain boundary to obtain a safety margin, the value of the safety margin being the value corresponding to the shortest distance.

[0012] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.

[0013] According to another aspect of the present application, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the methods described above is implemented.

[0014] Applying the technical solution of the present application, in a method for estimating a transient voltage safety margin, first, a domain adaptive method and an active learning method are used to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network; then, according to the output of the above transient voltage safety assessment model, the transient voltage safety domain boundary corresponding to the above transient voltage safety assessment model is determined, and the above transient voltage safety domain boundary is a set formed by the above sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; finally, the injection power vector of the power system is obtained in real time, and the shortest distance between the above injection power vector and the above transient voltage safety domain boundary is calculated to obtain the safety margin, and the value of the above safety margin is the value corresponding to the above shortest distance. This application constructs a transient voltage safety assessment model by training the residual-LSTM network through a method of efficient model training in a small sample case based on domain adaptation and active learning, which effectively reduces the training time of the assessment model; based on the transient voltage safety assessment model, the transient voltage safety domain boundary is obtained, and the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary is calculated to estimate the safety margin of the current power system in real time. This application solves the problem in the prior art that the safety margin cannot be efficiently estimated because the assessment model is difficult to directly apply. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A hardware structure block diagram of a mobile terminal for performing a transient voltage safety margin estimation method provided in an embodiment of the present application is shown;

[0016] Figure 2 A schematic flow chart of a method for estimating a transient voltage safety margin provided according to an embodiment of the present application is shown;

[0017] Figure 3 A structural diagram of a transient voltage safety assessment model based on a residual-LSTM network provided according to an embodiment of the present application is shown;

[0018] Figure 4 An active learning flow chart provided according to an embodiment of the present application is shown;

[0019] Figure 5 A structural block diagram of a transient voltage safety margin estimation device provided according to an embodiment of the present application is shown.

[0020] The above drawings include the following reference numerals:

[0021] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0026] Safety margin: The allowable value of the total uncertainty in measurement, which mainly consists of two parts: the allowable value of uncertainty of the measuring instrument and the allowable value of measurement uncertainty caused by the measurement conditions.

[0027] As introduced in the background technology, the physical meaning of the data-driven model in the prior art is unclear. For power systems with extremely high safety operation requirements, the intelligent evaluation model that lacks explainability is difficult to apply directly. In order to solve the problem in the prior art that the safety margin cannot be efficiently estimated due to the difficulty in directly applying the evaluation model, the embodiments of the present application provide a transient voltage safety margin estimation method, estimation device, computer-readable storage medium and computer program product.

[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a transient voltage safety margin estimation method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the transient voltage safety margin estimation method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0031] In this embodiment, a method for estimating a transient voltage safety margin running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] Figure 2 FIG. 1 is a flow chart of a method for estimating a transient voltage safety margin according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0033] Step S201, using a domain adaptive method and an active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network;

[0034] Specifically, the residual-LSTM network can be used as the main structure of the transient voltage safety assessment model to realize the transient voltage safety of the online assessment system and derive the transient voltage safety domain boundary described by the assessment model. The structure of the assessment model based on the residual-LSTM network is as follows: Figure 3 Specifically, domain adaptation method and active learning method are used to input the input data in multiple sets of training data into the predetermined network model for iterative training, and finally a transient voltage safety assessment model is obtained. Assume that the input of the assessment model is u, which represents the injected power vector of the power system, that is, the system operating point defined in the injected power space. The transient voltage safety assessment result corresponding to the current injected power vector obtained based on the assessment model, the actual safety situation of the power system is y, and the actual output calibration for the classification problem is generally represented by one-hot encoding, [0, 1] represents unsafe, and [1, 0] represents safe. The above model can be trained using supervised learning. At this time, the training data includes a set of injected power vectors u defined in the injected power space, and a set of label values ​​y reflecting stability or instability represented by the corresponding one-hot encoding. Training for transient voltage safety assessment can be carried out using a variety of methods, such as gradient descent, stochastic gradient descent, or batch gradient descent.

[0035] Step S202, determining the transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal;

[0036] Specifically, the set formed by the above sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal is determined as the transient voltage safety region boundary, that is, Represents the evaluation function of the transient voltage safety assessment model.

[0037] Step S203, obtaining the injected power vector of the power system in real time, and calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

[0038] Specifically, based on the transient voltage safety domain boundary characterized by the transient voltage safety assessment model, the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary characterized by the transient voltage safety assessment model can be calculated, which is the safety margin.

[0039] In this embodiment, first, a domain adaptive method and an active learning method are used to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network; then, according to the output of the above transient voltage safety assessment model, the transient voltage safety domain boundary corresponding to the above transient voltage safety assessment model is determined, and the above transient voltage safety domain boundary is the set formed by the above sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; finally, the injection power vector of the power system is obtained in real time, and the shortest distance between the above injection power vector and the above transient voltage safety domain boundary is calculated to obtain the safety margin. This application constructs a transient voltage safety assessment model by training the residual-LSTM network through a method of efficient model training in a small sample case based on domain adaptation and active learning, which effectively reduces the training time of the assessment model; based on the transient voltage safety assessment model, the transient voltage safety domain boundary is obtained, and the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary is calculated to estimate the safety margin of the current power system in real time. This application solves the problem in the prior art that the safety margin cannot be efficiently estimated because the assessment model is difficult to directly apply.

[0040] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for estimating the transient voltage safety margin of the present application will be described in detail below in conjunction with specific embodiments.

[0041] In order to improve the generalization of the actual complex and variable power system when the training sample set is limited, in an optional implementation, the above step S201 includes:

[0042] Step S2011, obtaining an uncalibrated data set, wherein the uncalibrated data set is a set of historical operation data of the power system and simulation data, wherein the simulation data is data obtained by mathematical modeling and simulation calculation of the power system;

[0043] Step S2012, randomly extracting a plurality of samples to be calibrated from the uncalibrated data set to form a data set to be calibrated;

[0044] Step S2013, a calibration step, calibrating the above-mentioned data set to be calibrated to obtain a training sample set, wherein the above-mentioned training sample set includes multiple groups of the above-mentioned training data;

[0045] Step S2014, a training step, inputting the input data in the training sample set into the initial evaluation model for training to obtain a trained initial evaluation model, wherein the initial evaluation model is the predetermined network model to be trained;

[0046] Step S2015, an evaluation step, using a test sample set to evaluate the trained initial evaluation model to obtain the model accuracy;

[0047] Step S2016, when the accuracy of the above-mentioned model does not meet the accuracy requirements, determine the loss function based on the above-mentioned domain adaptive method, use the gradient descent method to update the model parameters, and re-select multiple above-mentioned samples to be calibrated from the above-mentioned uncalibrated data set as the above-mentioned data set to be calibrated, repeat the above-mentioned calibration step, the above-mentioned training step and the above-mentioned evaluation step at least once until the convergence condition is reached, the above-mentioned convergence condition is that the number of iterations reaches the set maximum number of iterations or the above-mentioned initial evaluation model after the above-mentioned training meets the above-mentioned accuracy requirements, the above-mentioned initial evaluation model after training is determined as the above-mentioned transient voltage safety assessment model, and the above-mentioned model parameters are all parameters in the above-mentioned initial evaluation model.

[0048] In the above embodiment, the transient voltage safety assessment model based on the residual network residual-LSTM network uses actual power system data or simulation data as training samples. Due to the large scale of the actual power system, the training sample set is difficult to cover all possible operating conditions of the system, making it difficult to apply the model to actual situations and the generalization performance is low. Figure 3 As shown in the figure, active learning is a method to improve model performance by selecting the most valuable samples for calibration. The basic idea is to start learning from a small number of initial calibration sample sets, select the most valuable samples for calibration through sample search strategies, update model parameters, and then conduct the next round of search and training, iterating in a cycle. Through active learning, the generalization ability of the transient voltage security assessment model for actual complex and variable power systems can be improved when the training samples are limited. By repeatedly iteratively updating model parameters and selecting new samples for training, the dependence on training samples can be reduced, and the generalization ability of the model in complex and variable systems can be improved. When the number of iterations reaches the set maximum number of iterations or the above initial assessment model after the above training meets the above accuracy requirements, the active learning ends. When updating the parameters of the assessment model, the domain adaptive method is used to obtain the loss function, and then it is updated based on the gradient descent method.

[0049] In order to improve the training efficiency of the transient voltage safety assessment model, in an optional implementation manner, the above step S2016 includes:

[0050] Step S20161, select multiple samples to be calibrated from the uncalibrated data set as the data set to be calibrated according to the sample search strategy, the sample search strategy is a strategy for selecting M samples to be calibrated with the smallest uncertainty measure in the uncalibrated data set, and the uncertainty measure is the absolute value of the sample safety assessment result corresponding to the sample injection power vector.

[0051] In the above embodiment, the key to active learning lies in the sample search strategy. Transient voltage safety assessment is a binary classification problem. Sample uncertainty can be selected as the sample search strategy, where the uncertainty of the sample can be regarded as the credibility of the result obtained by the sample based on the current transient voltage safety assessment model. Samples located near the boundary of the transient voltage safety domain usually have higher uncertainty because they may vary between safe and unsafe. Therefore, the distance from the sample to the boundary of the safety assessment model can be used as a measure of uncertainty. The smaller the distance, the higher the uncertainty. However, during the training process, directly using distance as an uncertainty measure may result in excessive computational effort because complex optimization calculations are required each time a sample is searched. In order to improve training efficiency, it is possible to directly calculate the power vector corresponding to each injected power vector. As an uncertainty measure, the closer the value is to 0, the closer the injected power vector is to the safety boundary. Therefore, each update of the training sample set can be done by directly searching The smallest M uncalibrated samples are used as the above-mentioned data set to be calibrated and sent to the simulation software for calibration. Figure 4 The active learning flowchart shown in the figure selects the first M uncalibrated samples with the largest uncertainty from the uncalibrated dataset as the dataset to be calibrated based on the latest evaluation model, and enters the next model iterative training.

[0052] In order to improve the generalization ability of the transient voltage safety assessment model, in an optional implementation manner, the above step S2016 further includes:

[0053] Step S20162, calculating the maximum mean difference loss between the training sample set and the test sample set according to the first formula, the first formula is: MMD 2 (D s , D t ) is the maximum mean difference loss mentioned above, φ is the transformation function used to transform the data set into the Hilbert space, D s represents the above training sample set, M is the total number of training samples in the above training sample set, represents the characteristic value of the i-th training sample in the training sample set, D i represents the above test sample set, N is the total number of test samples in the above test sample set, represents the characteristic value of the jth test sample in the test sample set;

[0054] Step S20163, adding the first classification loss, the second classification loss and the difference loss to obtain the above-mentioned loss function of the above-mentioned transient voltage safety assessment model, the above-mentioned first classification loss is the classification loss of the above-mentioned transient voltage safety assessment model on the above-mentioned training sample set, the above-mentioned second classification loss is the product of the classification loss of the above-mentioned transient voltage safety assessment model on the above-mentioned test sample set and the first weighting coefficient, and the above-mentioned difference loss is the product of the above-mentioned maximum mean difference loss and the second weighting coefficient.

[0055] In the above embodiment, in order to further improve the generalization ability of the transient voltage safety assessment model, the features of the uncalibrated samples after the model changes can be aligned with the feature distribution of the training sample set through a domain adaptation method, thereby reducing the feature distribution deviation between the training sample set and the test sample set, and improving the adaptability of the transient voltage safety assessment model to uncalibrated samples, thereby improving the generalization of the transient voltage safety assessment model. A domain adaptation method based on the maximum mean difference index is used to make the feature distribution of the training sample set and the test sample set as consistent as possible. The maximum mean difference index is mainly used to measure the distance between two distributions in the Hilbert space. When the distribution is represented by a data set, the maximum mean difference index (Maximum Mean Discrepancy, MMD) representing the distance between the training sample set and the test sample set is as follows. The difference in feature distribution between the training sample set and the test sample set is measured by the MMD indicator, and the MMD loss is added to the loss function. The generalization performance of the model can be further improved by combining the domain adaptation method and the active learning strategy. Active learning is used to select a small number of key samples in the test sample set for calibration, and combined with MMD loss for training, which can make full use of the unlabeled and labeled samples in the actual test system to improve the performance of the model. At this time, the overall loss function of the model is in To evaluate the model In the training sample set D s Classification loss on MMD 2 (D S , D t ) is the MMD loss that characterizes the distribution deviation between the training sample set features and the test sample set features, α2 is the weighting coefficient of the MMD loss, To evaluate the model The classification loss of a small number of calibrated test sample sets selected by active learning, α1 is the weighting coefficient of this classification loss. The evaluation model is trained based on the above loss function, so that the features of the training sample set and the test sample set extracted in the neural network evaluation model are aligned as much as possible on the basis of ensuring the accuracy of the training sample set sample evaluation, thereby improving the adaptability of the evaluation model on the actual system. By setting the weighting coefficient, the model's learning of a small number of labeled test samples is strengthened, and the performance of the model on the uncalibrated test sample set is improved.

[0056] In order to achieve online evaluation of transient voltage safety of the power system to improve the safety of the power system, in an optional implementation manner, the above step S202 includes:

[0057] Step S2021, simplifying the transient voltage safety assessment model to obtain an assessment function of the transient voltage safety assessment model. The expression of the assessment function is: is the above evaluation function, θ c,1 and θ c,2 is a parameter in the above transient voltage safety assessment model, m represents the total number of residual modules in the residual network, and u represents the above sample injection power vector;

[0058] Step S2022: when the evaluation function is 0, the transient voltage safety region boundary is determined. The expression of the transient voltage safety region boundary is:

[0059] In the above embodiment, assuming that the number of residual modules in the residual-LSTM network of the transient voltage safety assessment model is m, and a single-layer fully connected LSTM connection mode is adopted in the module, the mathematical expression corresponding to the transient voltage safety assessment model based on the residual network residual-LSTM network is: In the formula, θ 1,1 ,θ 1,2 ,θ 2,1 ,θ 2,2 ,…,θ m,1 ,θ m,2 ,θ s,1 ,θ s,2 is the model parameter, u is the input of the model, i.e. the injected power vector of the system, The transient voltage safety assessment result predicted by the transient voltage safety assessment model. For the classification problem, the actual output calibration is generally represented by one-hot encoding, where [0, 1] represents unsafe and [1, 0] represents safe. They represent the probabilities of safe and unsafe prediction results respectively. When the probabilities of safe prediction and unsafe prediction are equal, that is, At this time, the corresponding injection power vector is located on the safety boundary. Considering the above formula The soffmax function in y s It has been normalized to 0-1, y s The relative size of the two values ​​in already contains the probability information of the predicted category. Therefore, based on the aforementioned residual-LSTM network evaluation model, a new security evaluation function is obtained by simplification: as follows: in, is given by θ c,1 With θ c,2 parameterized function. Consider all In the case of , the analytical expression of the transient voltage safety margin is

[0060] In order to efficiently solve the safety margin, in an optional implementation manner, the above step S203 includes:

[0061] Step S2031, determine the critical power vector and the objective function. The expression of the critical power vector is u c =u+θ T u, u c is the critical power vector, u is the injected power vector, θ T To adjust the transpose of the vector, the expression of the above objective function is Indicates that the critical power vector is located on the boundary of the transient voltage safety region, ||uu c || is the distance from the above-mentioned injected power vector to the above-mentioned critical power vector;

[0062] Step S2032, optimizing the adjustment vector based on an optimization algorithm so that the function value of the objective function is minimized, and obtaining a target critical power vector;

[0063] Step S2033, calculating the distance between the injection power vector and the target critical power vector to obtain the safety margin.

[0064] In the above embodiment, the current power vector injected into the power system is solved to the transient voltage safety region boundary obtained. By adjusting the current injected power vector u of the power system, the critical power vector on the boundary surface of the transient voltage safety domain in the high-dimensional space is obtained, and the critical power vector u with the minimum distance from the current injected power vector u is searched. c At this time, the injected power vector u of the power system and the critical power vector u c The distance between the injected power vector u and the transient voltage safety domain boundary is Considering the physical meaning of the injected power space, the distance obtained by the above solution is the safety margin of the injected power vector u. According to the above solution process, the problem of solving the safety margin can be equivalent to an optimization problem in the injected power space. Specifically, since the critical power vector u c The injected power vector u is a high-dimensional vector corresponding to the injected power space, so the critical power vector u c It can be expressed as a first-order function of the injected power vector u. The variable θ is introduced to adjust u, and θ is the decision variable of the optimization problem. By adjusting u by adjusting the variable θ, the adjusted critical power vector u can be obtained. c , as shown below c =u+θ T u. For each power system, the critical power corresponding to the current power vector injected. Vector point u c In order to find the minimum distance from the current injected power vector u to the transient voltage safety region boundary, it is necessary to determine the objective function of the minimized optimization problem: Among them, the first term of the objective function is the critical safety term. By minimizing this term, the adjusted u c On the boundary surface of the transient voltage safety region characterized by the transient voltage safety assessment model, the second term ||uu c || is the critical power vector u of the power system currently injected into the transient voltage safety region boundary surface c The distance between the adjusted u c The closest vector to the critical power vector on the boundary surface of the transient voltage safety region from the injected power vector is obtained. The parameter θ is optimized based on the above objective function through an optimization algorithm, such as stochastic gradient descent. When the objective function value is minimized, the nearest critical power vector u corresponding to the current injected power vector u is obtained. c , the distance between the two is the safety margin based on the transient voltage safety assessment model to describe the boundary of the transient voltage safety domain. The above safety margin can be used to understand how much the power vector injected into the power system changes at least, and the result of the transient voltage safety assessment model will change. In addition, the obtained safety margin can also be used to guide subsequent preventive control.

[0065] In order to facilitate the dispatcher to timely understand the transient voltage state of the power system and take timely measures to ensure the safe and stable operation of the power system, in an optional implementation manner, after the above step S201, the method further includes:

[0066] Step S301, inputting the injected power vector of the power system into the transient voltage safety assessment model, and outputting a transient voltage safety assessment result;

[0067] Step S302: When the transient voltage safety assessment result is that the transient voltage is unsafe, a prompt message is issued, wherein the prompt message is used to prompt that the transient voltage of the current power system is in an unsafe state.

[0068] In the above embodiment, the input of the transient voltage safety assessment model is the injection power vector, and the output is the transient voltage safety assessment result corresponding to the above injection power vector. When the above transient voltage safety assessment result is that the above transient voltage is unsafe, a prompt message is sent to the dispatcher, so that the dispatcher can timely understand the transient voltage status of the power system and take timely measures to ensure the safe and stable operation of the power system.

[0069] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0070] The embodiment of the present application also provides an estimation device for transient voltage safety margin. It should be noted that the estimation device for transient voltage safety margin of the embodiment of the present application can be used to execute the estimation method for transient voltage safety margin provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0071] The following is an introduction to the transient voltage safety margin estimation device provided in an embodiment of the present application.

[0072] Figure 5 is a structural block diagram of a transient voltage safety margin estimation device according to an embodiment of the present application. Figure 5 As shown, the device comprises:

[0073] The training unit 10 is used to input the input data in the multiple sets of training data into the predetermined network model for iterative training by adopting the domain adaptive method and the active learning method to obtain the transient voltage safety assessment model, wherein each set of the above training data includes input data and output data, the above input data is the sample injection power vector, the above output data is the sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is the transient voltage is safe or the transient voltage is unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network;

[0074] Specifically, the residual-LSTM network can be used as the main structure of the transient voltage safety assessment model to realize the transient voltage safety of the online assessment system and derive the transient voltage safety domain boundary described by the assessment model. The structure of the assessment model based on the residual-LSTM network is as follows: Figure 3 Specifically, domain adaptation method and active learning method are used to input the input data in multiple sets of training data into the predetermined network model for iterative training, and finally a transient voltage safety assessment model is obtained. Assume that the input of the assessment model is u, which represents the injected power vector of the power system, that is, the system operating point defined in the injected power space. The transient voltage safety assessment result corresponding to the current injected power vector obtained based on the assessment model, the actual safety situation of the power system is y, and the actual output calibration for the classification problem is generally represented by one-hot encoding, [0, 1] represents unsafe, and [1, 0] represents safe. The above model can be trained using supervised learning. At this time, the training data includes a set of injected power vectors u defined in the injected power space, and a set of label values ​​y reflecting stability or instability represented by the corresponding one-hot encoding. Training for transient voltage safety assessment can be carried out using a variety of methods, such as gradient descent, stochastic gradient descent, or batch gradient descent.

[0075] A determination unit 20, configured to determine a transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to an output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal;

[0076] Specifically, the set formed by the above sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal is determined as the transient voltage safety region boundary, that is, Represents the evaluation function of the transient voltage safety assessment model.

[0077] The calculation unit 30 is used to obtain the injected power vector of the power system in real time, and calculate the shortest distance between the injected power vector and the boundary of the transient voltage safety domain to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

[0078] Specifically, based on the transient voltage safety domain boundary characterized by the transient voltage safety assessment model, the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary characterized by the transient voltage safety assessment model can be calculated, which is the safety margin.

[0079] In this embodiment, a training unit is used to input input data from multiple groups of training data into a predetermined network model for iterative training using a domain adaptive method and an active learning method to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network; a determination unit is used to determine the transient voltage safety domain boundary corresponding to the above transient voltage safety assessment model according to the output of the above transient voltage safety assessment model, the above transient voltage safety domain boundary is the set formed by the above sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; a calculation unit is used to obtain the injection power vector of the power system in real time, and calculate the shortest distance between the above injection power vector and the above transient voltage safety domain boundary to obtain a safety margin. This application constructs a transient voltage safety assessment model by training the residual-LSTM network through a method of efficient model training in a small sample case based on domain adaptation and active learning, which effectively reduces the training time of the assessment model; based on the transient voltage safety assessment model, the transient voltage safety domain boundary is obtained, and the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary is calculated to estimate the safety margin of the current power system in real time. This application solves the problem in the prior art that the safety margin cannot be efficiently estimated because the assessment model is difficult to directly apply.

[0080] In order to improve the generalization of the actual complex and variable power system under the condition of limited training sample set, in an optional implementation, the training unit includes:

[0081] An acquisition module is used to acquire an uncalibrated data set, where the uncalibrated data set is a collection of historical operation data of the power system and simulation data, where the simulation data is data obtained by mathematical modeling and simulation calculation of the power system;

[0082] A selection module randomly extracts a plurality of samples to be calibrated from the uncalibrated data set to form a data set to be calibrated;

[0083] A calibration module is used to execute a calibration step to calibrate the above-mentioned data set to be calibrated to obtain a training sample set, wherein the above-mentioned training sample set includes multiple groups of the above-mentioned training data;

[0084] A training module, used to execute the training step, input the input data in the training sample set into the initial evaluation model for training, and obtain the trained initial evaluation model, wherein the initial evaluation model is the predetermined network model to be trained;

[0085] An evaluation module is used to perform an evaluation step, and use a test sample set to evaluate the trained initial evaluation model to obtain the model accuracy;

[0086] A repetitive module, when the accuracy of the above-mentioned model does not meet the accuracy requirements, determines the loss function based on the above-mentioned domain adaptive method, updates the model parameters using the gradient descent method, and reselects multiple samples to be calibrated from the above-mentioned uncalibrated data set as the above-mentioned data set to be calibrated, repeats the above-mentioned calibration step, the above-mentioned training step and the above-mentioned evaluation step at least once until the convergence condition is reached, the above-mentioned convergence condition is that the number of iterations reaches the set maximum number of iterations or the above-mentioned initial evaluation model after the above-mentioned training meets the above-mentioned accuracy requirements, the above-mentioned initial evaluation model after training is determined as the above-mentioned transient voltage safety assessment model, and the above-mentioned model parameters are all parameters in the above-mentioned initial evaluation model.

[0087] In the above embodiment, the transient voltage safety assessment model based on the residual network residual-LSTM network uses actual power system data or simulation data as training samples. Due to the large scale of the actual power system, the training sample set is difficult to cover all possible operating conditions of the system, making it difficult to apply the model to actual situations and the generalization performance is low. Figure 3 As shown in the figure, active learning is a method to improve model performance by selecting the most valuable samples for calibration. The basic idea is to start learning from a small number of initial calibration sample sets, select the most valuable samples for calibration through sample search strategies, update model parameters, and then conduct the next round of search and training, iterating in a cycle. Through active learning, the generalization ability of the transient voltage security assessment model for actual complex and variable power systems can be improved when the training samples are limited. By repeatedly iteratively updating model parameters and selecting new samples for training, the dependence on training samples can be reduced, and the generalization ability of the model in complex and variable systems can be improved. When the number of iterations reaches the set maximum number of iterations or the above initial assessment model after the above training meets the above accuracy requirements, the active learning ends. When updating the parameters of the assessment model, the domain adaptive method is used to obtain the loss function, and then it is updated based on the gradient descent method.

[0088] In order to improve the training efficiency of the transient voltage safety assessment model, in an optional implementation manner, the above-mentioned repetitive module includes:

[0089] A submodule is selected, and a plurality of the above-mentioned samples to be calibrated are selected from the above-mentioned uncalibrated data set as the above-mentioned data set to be calibrated according to the sample search strategy. The above-mentioned sample search strategy is a strategy for selecting M samples to be calibrated with the smallest uncertainty measure in the above-mentioned uncalibrated data set, and the above-mentioned uncertainty measure is the absolute value of the sample safety assessment result corresponding to the above-mentioned sample injection power vector.

[0090] In the above embodiment, the key to active learning lies in the sample search strategy. Transient voltage safety assessment is a binary classification problem. Sample uncertainty can be selected as the sample search strategy, where the uncertainty of the sample can be regarded as the credibility of the result obtained by the sample based on the current transient voltage safety assessment model. Samples located near the boundary of the transient voltage safety domain usually have higher uncertainty because they may vary between safe and unsafe. Therefore, the distance from the sample to the boundary of the safety assessment model can be used as a measure of uncertainty. The smaller the distance, the higher the uncertainty. However, during the training process, directly using distance as an uncertainty measure may result in excessive computational effort because complex optimization calculations are required each time a sample is searched. In order to improve training efficiency, it is possible to directly calculate the power vector corresponding to each injected power vector. As an uncertainty measure, the closer the value is to 0, the closer the injected power vector is to the safety boundary. Therefore, each update of the training sample set can be done by directly searching The smallest M uncalibrated samples are used as the above-mentioned data set to be calibrated and sent to the simulation software for calibration. Figure 4 The active learning flowchart shown in the figure selects the first M uncalibrated samples with the largest uncertainty from the uncalibrated dataset as the dataset to be calibrated based on the latest evaluation model, and enters the next model iterative training.

[0091] In order to improve the generalization ability of the transient voltage safety assessment model, in an optional implementation manner, the repeating module further includes:

[0092] The first calculation submodule calculates the maximum mean difference loss between the training sample set and the test sample set according to the first formula before updating the model parameters based on the gradient descent method. The first formula is: MMD 2 (D s , D t ) is the maximum mean difference loss mentioned above, φ is the transformation function used to transform the data set into the Hilbert space, D s represents the above training sample set, M is the total number of training samples in the above training sample set, represents the characteristic value of the i-th training sample in the training sample set, D t represents the above test sample set, N is the total number of test samples in the above test sample set, represents the characteristic value of the th test sample in the test sample set;

[0093] The second calculation submodule adds the first classification loss, the second classification loss and the difference loss to obtain the above-mentioned loss function of the above-mentioned transient voltage safety assessment model, the above-mentioned first classification loss is the classification loss of the above-mentioned transient voltage safety assessment model on the above-mentioned training sample set, the above-mentioned second classification loss is the product of the classification loss of the above-mentioned transient voltage safety assessment model on the above-mentioned test sample set and the first weighting coefficient, and the above-mentioned difference loss is the product of the above-mentioned maximum mean difference loss and the second weighting coefficient.

[0094] In the above embodiment, in order to further improve the generalization ability of the transient voltage safety assessment model, the features of the uncalibrated samples after the model changes can be aligned with the feature distribution of the training sample set through a domain adaptation method, thereby reducing the feature distribution deviation between the training sample set and the test sample set, and improving the adaptability of the transient voltage safety assessment model to uncalibrated samples, thereby improving the generalization of the transient voltage safety assessment model. A domain adaptation method based on the maximum mean difference index is used to make the feature distribution of the training sample set and the test sample set as consistent as possible. The maximum mean difference index is mainly used to measure the distance between two distributions in the Hilbert space. When the distribution is represented by a data set, the maximum mean difference index (Maximum Mean Discrepancy, MMD) representing the distance between the training sample set and the test sample set is as follows. The difference in feature distribution between the training sample set and the test sample set is measured by the MMD indicator, and the MMD loss is added to the loss function. The generalization performance of the model can be further improved by combining the domain adaptation method and the active learning strategy. Active learning is used to select a small number of key samples in the test sample set for calibration, and combined with MMD loss for training, which can make full use of the unlabeled and labeled samples in the actual test system to improve the performance of the model. At this time, the overall loss function of the model is in To evaluate the model In the training sample set D s Classification loss on MMD 2 (D S , D t ) is the MMD loss that characterizes the distribution deviation between the training sample set features and the test sample set features, α2 is the weighting coefficient of the MMD loss, To evaluate the model The classification loss of a small number of calibrated test sample sets selected by active learning, α1 is the weighting coefficient of this classification loss. The evaluation model is trained based on the above loss function, so that the features of the training sample set and the test sample set extracted in the neural network evaluation model are aligned as much as possible on the basis of ensuring the accuracy of the training sample set sample evaluation, thereby improving the adaptability of the evaluation model on the actual system. By setting the weighting coefficient, the model's learning of a small number of labeled test samples is strengthened, and the performance of the model on the uncalibrated test sample set is improved.

[0095] In order to achieve online evaluation of transient voltage safety of the power system to improve the safety of the power system, in an optional implementation manner, the determination unit includes:

[0096] The simplification module simplifies the above transient voltage safety assessment model to obtain the evaluation function of the above transient voltage safety assessment model. The expression of the above evaluation function is: is the above evaluation function, θ c,1 and θ c,2 is a parameter in the above transient voltage safety assessment model, m represents the total number of residual modules in the residual network, and u represents the above sample injection power vector;

[0097] The first determination module determines the transient voltage safety domain boundary when the evaluation function is 0. The expression of the transient voltage safety domain boundary is:

[0098] In the above embodiment, assuming that the number of residual modules in the residual-LSTM network of the transient voltage safety assessment model is m, and a single-layer fully connected LSTM connection mode is adopted in the module, the mathematical expression corresponding to the transient voltage safety assessment model based on the residual network residual-LSTM network is: In the formula, θ 1,1 ,θ 1,2 ,θ 2,1 ,θ 2,2 ,…,θ m,1 ,θ m,2 ,θ s,1 ,θ s,2 is the model parameter, u is the input of the model, i.e. the injected power vector of the system, The transient voltage safety assessment result predicted by the transient voltage safety assessment model. For the classification problem, the actual output calibration is generally represented by one-hot encoding, where [0, 1] represents unsafe and [1, 0] represents safe. They represent the probability of safe and unsafe prediction results respectively. When the probability of safe prediction is equal to the probability of unsafe prediction, that is, At this time, the corresponding injection power vector is located on the safety boundary. Considering the above formula The softmax function in y s It has been normalized to 0-1, y s The relative size of the two values ​​in already contains the probability information of the predicted category. Therefore, based on the aforementioned residual-LSTM network evaluation model, a new security evaluation function is obtained by simplification: as follows: in, is given by θ c,1 With θ c,2 parameterized function. Consider all In the case of , the analytical expression of the transient voltage safety margin is

[0099] In order to efficiently solve the safety margin, in an optional implementation manner, the calculation unit includes:

[0100] The second determination module determines the critical power vector and the objective function. The expression of the critical power vector is u c =u+θ T u, u c is the critical power vector, u is the injected power vector, θ T To adjust the transpose of the vector, the expression of the above objective function is Indicates that the critical power vector is located on the boundary of the transient voltage safety region, ||uu c || is the distance from the above-mentioned injected power vector to the above-mentioned critical power vector;

[0101] An optimization module optimizes the adjustment vector based on an optimization algorithm so that the function value of the objective function is minimized to obtain a target critical power vector;

[0102] The calculation module calculates the distance between the injection power vector and the target critical power vector to obtain the safety margin.

[0103] In the above embodiment, the current power vector injected into the power system is solved to the transient voltage safety region boundary obtained. By adjusting the current injected power vector u of the power system, the critical power vector on the boundary surface of the transient voltage safety domain in the high-dimensional space is obtained, and the critical power vector u with the minimum distance from the current injected power vector u is searched. c At this time, the injected power vector u of the power system and the critical power vector u c The distance between the injected power vector u and the transient voltage safety domain boundary is Considering the physical meaning of the injected power space, the distance obtained by the above solution is the safety margin of the injected power vector u. According to the above solution process, the problem of solving the safety margin can be equivalent to an optimization problem in the injected power space. Specifically, since the critical power vector u c The injected power vector u is a high-dimensional vector corresponding to the injected power space, so the critical power vector u c It can be expressed as a first-order function of the injected power vector u. The variable θ is introduced to adjust u, and θ is the decision variable of the optimization problem. By adjusting u by adjusting the variable θ, the adjusted critical power vector u can be obtained. c , as shown below c =u+θ T u. For each power system, the critical power corresponding to the current power vector injected. Vector point u c In order to find the minimum distance from the current injected power vector u to the transient voltage safety region boundary, it is necessary to determine the objective function of the minimized optimization problem: Among them, the first term of the objective function is the critical safety term. By minimizing this term, the adjusted u c On the boundary surface of the transient voltage safety region characterized by the transient voltage safety assessment model, the second term ||uu c || is the critical power vector u of the power system currently injected into the transient voltage safety region boundary surface c The distance between the adjusted u c The closest vector to the critical power vector on the boundary surface of the transient voltage safety region from the injected power vector is obtained. The parameter θ is optimized based on the above objective function through an optimization algorithm, such as stochastic gradient descent. When the objective function value is minimized, the nearest critical power vector u corresponding to the current injected power vector u is obtained. c , the distance between the two is the safety margin based on the transient voltage safety assessment model to describe the boundary of the transient voltage safety domain. The above safety margin can be used to understand how much the power vector injected into the power system changes at least, and the result of the transient voltage safety assessment model will change. In addition, the obtained safety margin can also be used to guide subsequent preventive control.

[0104] In order to facilitate the dispatcher to timely understand the transient voltage state of the power system and take timely measures to ensure the safe and stable operation of the power system, in an optional implementation manner, the device also includes:

[0105] An output unit is used to input the input data in the multiple sets of training data into a predetermined network model for iterative training by adopting an active learning method, and after obtaining a transient voltage safety assessment model, input the injected power vector of the power system into the transient voltage safety assessment model, and output a transient voltage safety assessment result;

[0106] The prompt unit is used to issue a prompt message when the transient voltage safety assessment result is that the transient voltage is unsafe, and the prompt message is used to prompt that the transient voltage of the current power system is in an unsafe state.

[0107] In the above embodiment, the input of the transient voltage safety assessment model is the injection power vector, and the output is the transient voltage safety assessment result corresponding to the above injection power vector. When the above transient voltage safety assessment result is that the above transient voltage is unsafe, a prompt message is sent to the dispatcher, so that the dispatcher can timely understand the transient voltage status of the power system and take timely measures to ensure the safe and stable operation of the power system.

[0108] The transient voltage safety margin estimation device includes a processor and a memory. The training unit, the determination unit, the calculation unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.

[0109] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of inefficient estimation of safety margins due to the difficulty in directly applying the evaluation model in the prior art can be solved by adjusting kernel parameters.

[0110] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0111] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the transient voltage safety margin estimation method.

[0112] Specifically, the estimation method of transient voltage safety margin includes:

[0113] Step S201, using a domain adaptive method and an active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network;

[0114] Step S202, determining the transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal;

[0115] Step S203, obtaining the injected power vector of the power system in real time, and calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

[0116] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the method for estimating the transient voltage safety margin is executed when the program is run.

[0117] Specifically, the estimation method of transient voltage safety margin includes:

[0118] Step S201, using a domain adaptive method and an active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network;

[0119] Step S202, determining the transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal;

[0120] Step S203, obtaining the injected power vector of the power system in real time, and calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

[0121] An embodiment of the present invention provides a transient voltage safety system, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0122] Step S201, using a domain adaptive method and an active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network;

[0123] Step S202, determining the transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal;

[0124] Step S203, obtaining the injected power vector of the power system in real time, and calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

[0125] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0126] Step S201, using a domain adaptive method and an active learning method to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, each group of the above training data includes input data and output data, the above input data is a sample injection power vector, the above output data is a sample transient voltage safety assessment result, the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network;

[0127] Step S202, determining the transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal;

[0128] Step S203, obtaining the injected power vector of the power system in real time, and calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

[0129] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0131] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0134] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0135] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0136] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0137] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0138] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0139] 1) The transient voltage safety margin estimation method of the present application firstly uses a domain adaptive method and an active learning method to input the input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, wherein each group of the above training data includes input data and output data, wherein the above input data is a sample injection power vector, and the above output data is a sample transient voltage safety assessment result, wherein the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network; then, according to the output of the above transient voltage safety assessment model, the transient voltage safety domain boundary corresponding to the above transient voltage safety assessment model is determined, and the above transient voltage safety domain boundary is a set formed by the above sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; finally, the injection power vector of the power system is obtained in real time, and the shortest distance between the above injection power vector and the above transient voltage safety domain boundary is calculated to obtain the safety margin, and the value of the above safety margin is the value corresponding to the above shortest distance. This application constructs a transient voltage safety assessment model by training the residual-LSTM network through a method of efficient model training in a small sample case based on domain adaptation and active learning, which effectively reduces the training time of the assessment model; based on the transient voltage safety assessment model, the transient voltage safety domain boundary is obtained, and the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary is calculated to estimate the safety margin of the current power system in real time. This application solves the problem in the prior art that the safety margin cannot be efficiently estimated because the assessment model is difficult to directly apply.

[0140] 2) The transient voltage safety margin estimation device of the present application includes a training unit, which is used to input the input data in multiple groups of training data into a predetermined network model for iterative training using a domain adaptive method and an active learning method to obtain a transient voltage safety assessment model, wherein each group of the above training data includes input data and output data, wherein the above input data is a sample injection power vector, and the above output data is a sample transient voltage safety assessment result, wherein the above sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the above predetermined network model is a network model combining a residual network and a long short-term memory network; a determination unit, which is used to determine the transient voltage safety domain boundary corresponding to the above transient voltage safety assessment model according to the output of the above transient voltage safety assessment model, wherein the above transient voltage safety domain boundary is the set formed by the above sample injection power vector when the safety probability of the transient voltage is equal to the unsafe probability; a calculation unit, which is used to obtain the injection power vector of the power system in real time, and calculate the shortest distance between the above injection power vector and the above transient voltage safety domain boundary to obtain the safety margin, and the value of the above safety margin is the value corresponding to the above shortest distance. This application constructs a transient voltage safety assessment model by training the residual-LSTM network through a method of efficient model training in a small sample case based on domain adaptation and active learning, which effectively reduces the training time of the assessment model; based on the transient voltage safety assessment model, the transient voltage safety domain boundary is obtained, and the shortest distance between the current injected power vector of the power system and the transient voltage safety domain boundary is calculated to estimate the safety margin of the current power system in real time. This application solves the problem in the prior art that the safety margin cannot be efficiently estimated because the assessment model is difficult to directly apply.

[0141] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for estimating transient voltage safety margin, characterized in that: include: A domain adaptive method and an active learning method are used to input input data in multiple groups of training data into a predetermined network model for iterative training to obtain a transient voltage safety assessment model, wherein each group of the training data includes input data and output data, the input data is a sample injection power vector, the output data is a sample transient voltage safety assessment result, the sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the predetermined network model is a network model combining a residual network and a long short-term memory network; Determining a transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to the output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and the unsafe probability of the transient voltage are equal; The injected power vector of the power system is acquired in real time, and the shortest distance between the injected power vector and the boundary of the transient voltage safety domain is calculated to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

2. The method according to claim 1, characterized in that The domain adaptation method and active learning method are used to input the input data in multiple sets of training data into the predetermined network model for iterative training to obtain a transient voltage safety assessment model, including: Acquire an uncalibrated data set, wherein the uncalibrated data set is a set formed by historical operation data of the power system and simulation data, wherein the simulation data is data obtained by mathematical modeling and simulation calculation of the power system; Randomly extracting a plurality of samples to be calibrated from the uncalibrated data set to form a data set to be calibrated; A calibration step, calibrating the data set to be calibrated to obtain a training sample set, wherein the training sample set includes multiple groups of the training data; A training step, inputting the input data in the training sample set into the initial evaluation model for training, to obtain a trained initial evaluation model, wherein the initial evaluation model is the predetermined network model to be trained; An evaluation step, using a test sample set to evaluate the trained initial evaluation model to obtain model accuracy; In the case where the model accuracy does not meet the accuracy requirements, a loss function is determined based on the domain adaptive method to update the model parameters using the gradient descent method, and a plurality of the samples to be calibrated are reselected from the uncalibrated data set as the data set to be calibrated, and the calibration step, the training step and the evaluation step are repeated at least once until a convergence condition is reached, the convergence condition being that the number of iterations reaches a set maximum number of iterations or the initial evaluation model after training meets the accuracy requirements, the initial evaluation model after training is determined as the transient voltage safety assessment model, and the model parameters are all parameters in the initial evaluation model.

3. The method according to claim 2, characterized in that Reselecting a plurality of samples to be calibrated as the data set to be calibrated includes: According to the sample search strategy, multiple samples to be calibrated are selected from the uncalibrated data set as the data set to be calibrated. The sample search strategy is a strategy for selecting M samples to be calibrated with the smallest uncertainty measure in the uncalibrated data set, and the uncertainty measure is the absolute value of the sample safety assessment result corresponding to the sample injection power vector.

4. The method according to claim 2, characterized in that: Determining a loss function based on the domain adaptation method includes: The maximum mean difference loss between the training sample set and the test sample set is calculated according to a first formula, where the first formula is: MMD 2 (D s ,D t ) is the maximum mean difference loss, φ is the transformation function used to transform the data set into the Hilbert space, D s represents the training sample set, M is the total number of training samples in the training sample set, represents the characteristic value of the i-th training sample in the training sample set, D t represents the test sample set, N is the total number of test samples in the test sample set, represents the characteristic value of the jth test sample in the test sample set; The first classification loss, the second classification loss and the difference loss are added to obtain the loss function of the transient voltage safety assessment model, wherein the first classification loss is the classification loss of the transient voltage safety assessment model on the training sample set, the second classification loss is the product of the classification loss of the transient voltage safety assessment model on the test sample set and a first weighting coefficient, and the difference loss is the product of the maximum mean difference loss and a second weighting coefficient.

5. The method according to claim 1, characterized in that Determining a transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to an output of the transient voltage safety assessment model includes: The transient voltage safety assessment model is simplified to obtain an assessment function of the transient voltage safety assessment model. The expression of the assessment function is: is the evaluation function, θ c,1 and θ c,2 is a parameter in the transient voltage safety assessment model, m represents the total number of residual modules in the residual network, and u represents the sample injection power vector; When the evaluation function is 0, it is determined to be the transient voltage safety domain boundary. The expression of the transient voltage safety domain boundary is:

6. The method according to claim 1, characterized in that Calculating the shortest distance between the injected power vector and the transient voltage safety domain boundary to obtain a safety margin includes: Determine the critical power vector and the objective function, the expression of the critical power vector is u c =u+θ T u, u c is the critical power vector, u is the injected power vector, θ T To adjust the transpose of the vector, the expression of the objective function is Indicates that the critical power vector is located on the boundary of the transient voltage safety region, ||uu c || is the distance from the injected power vector to the critical power vector; Optimizing the adjustment vector based on an optimization algorithm so that the function value of the objective function is minimized, thereby obtaining a target critical power vector; The distance between the injected power vector and the target critical power vector is calculated to obtain the safety margin.

7. The method according to any one of claims 1 to 6, characterized in that After inputting the input data in the plurality of training data sets into a predetermined network model for iterative training by adopting a domain adaptive method and an active learning method to obtain a transient voltage safety assessment model, the method further includes: Inputting the injected power vector of the power system into the transient voltage safety assessment model, and outputting the transient voltage safety assessment result; When the transient voltage safety assessment result is that the transient voltage is unsafe, a prompt message is issued, wherein the prompt message is used to prompt that the transient voltage of the current power system is in an unsafe state.

8. A transient voltage safety margin estimation device, characterized in that: The device comprises: A training unit, used for inputting input data in multiple sets of training data into a predetermined network model for iterative training by adopting a domain adaptive method and an active learning method to obtain a transient voltage safety assessment model, wherein each set of the training data includes input data and output data, the input data is a sample injection power vector, the output data is a sample transient voltage safety assessment result, the sample transient voltage safety assessment result is transient voltage safety or transient voltage unsafe, and the predetermined network model is a network model combining a residual network and a long short-term memory network; A determination unit, configured to determine a transient voltage safety domain boundary corresponding to the transient voltage safety assessment model according to an output of the transient voltage safety assessment model, wherein the transient voltage safety domain boundary is a set formed by the sample injection power vectors when the safety probability and unsafe probability of the transient voltage are equal; A calculation unit is used to obtain the injected power vector of the power system in real time, and calculate the shortest distance between the injected power vector and the boundary of the transient voltage safety domain to obtain a safety margin, wherein the value of the safety margin is the value corresponding to the shortest distance.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.