Limit phase difference prediction method and device based on LSTM (Long Short Term Memory) and medium

By using the LSTM model to predict the limit phase difference in the power grid simulation model, the problem of inaccurate limit phase difference estimation in the existing technology is solved, and more accurate limit phase difference prediction is achieved.

CN118657050APending Publication Date: 2024-09-17CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410737073.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In the prior art, the empirical value 180° used in estimating the system limit phase difference based on local measurement data is too conservative and cannot obtain an accurate limit phase difference estimate.

Method used

The limit phase difference prediction method based on LSTM is used to set up a three-phase short-circuit fault in the power grid simulation model, collect operating sample data under various fault types, use the dichotomy method to determine the critical instability time, and generate a limit phase difference prediction model. The LSTM model is used to predict the extreme phase difference based on electrical characteristics.

Benefits of technology

Compared with the empirical limit phase difference value of 180° used in engineering, the limit phase difference predicted by the model is more accurate and provides a more accurate estimate of the limit phase difference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657050A
    Figure CN118657050A
Patent Text Reader

Abstract

The invention discloses a limit phase difference prediction method and device based on LSTM and a medium. The method comprises the steps that a three-phase short-circuit fault is set for a line in a power grid simulation model of a specified power grid, operation sample data under various fault types are collected, and the operation sample data comprise the angle difference of the two sides of the power grid and electric quantity sample data; determining critical instability time of the multiple fault types by adopting a dichotomy according to the angle difference of the two sides of the power grid, a preset initial fault duration lower limit value and an initial fault duration upper limit value; determining a limit phase difference of the plurality of fault types according to the critical instability time; performing model training by taking the electric quantity sample data of the multiple fault types as input data of a pre-constructed training model and taking the limit phase differences under the multiple fault types as output to generate a limit phase difference prediction model; and inputting the collected to-be-predicted electric quantity data of the to-be-predicted fault into the limit phase difference prediction model, and outputting a limit phase difference prediction value of the to-be-predicted fault.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of transient power angle stability analysis of electric power systems, and more specifically, to a method, device and medium for predicting a limit phase difference based on LSTM. Background Art

[0002] The limit phase difference is an important parameter for evaluating the stability of the transient power angle of the system power grid. If the transient power angle of the system is unstable, the phase angle difference of the busbars at both ends of the AC branch of the key transmission section in the network will continue to increase, which is manifested as the critical unit being "torn" along the critical cut set. The empirical value of the limit phase difference of 180° used in the project is conservative, and the limit phase difference needs to be accurately solved for specific examples. The problem of estimating the system limit phase difference based on local measurement data is that the empirical value of the limit phase difference of 180° used in the project is too conservative and cannot obtain an accurate estimate of the limit phase difference. Summary of the invention

[0003] In view of the deficiencies in the prior art, the present invention provides a method, device and medium for predicting extreme phase difference based on LSTM.

[0004] According to one aspect of the present invention, a method for predicting a limit phase difference based on LSTM is provided, comprising:

[0005] A three-phase short circuit fault is set for the line in the power grid simulation model of the specified power grid, and operation sample data under various fault types are collected, wherein the operation sample data includes: angle difference between the two sides of the power grid and power sample data;

[0006] The dichotomy method is used to determine the critical instability time of various fault types according to the angle difference between the two sides of the power grid, the preset lower limit of initial fault duration and the upper limit of initial fault duration;

[0007] Determine the limit phase difference of multiple fault types according to the critical instability time;

[0008] The power sample data of various fault types are used as input data of the pre-built training model, and the extreme phase differences under various fault types are used as output for model training to generate an extreme phase difference prediction model;

[0009] The collected data on the amount of electricity to be predicted of the fault to be predicted is input into the extreme phase difference prediction model, and the extreme phase difference prediction value of the fault to be predicted is output.

[0010] Optionally, the electricity quantity sample data includes: positive sequence voltage, positive sequence angle, active load and reactive load from 2 cycles before the fault ends to 2 cycles after the fault ends.

[0011] Optionally, a dichotomy method is used to determine the critical instability time of multiple fault types according to the angle difference between the two sides of the power grid, a preset lower limit value of the initial fault duration, and an upper limit value of the initial fault duration, including:

[0012] Set the lower limit of initial fault duration t left and the upper limit of initial fault duration t right , where the system is in a fault duration of t left The system is stable at t right When the system becomes unstable;

[0013] Determine whether the condition t is met left <t right If it does not hold, determine t N =t left =t right , the cycle ends, where h is the critical instability time;

[0014] If the conditions are met, then t mid =(t left +t right ) / 2, if the fault duration is t mid If the system is stable, then set t left =t mid , otherwise set t right =t mid , re-judge whether the conditions are met.

[0015] Optionally, the structure of the training model includes:

[0016] Input layer and output layer: The input is a characteristic sequence of a set of electrical quantity sample data with time characteristics, and the output is the extreme phase difference.

[0017] LSTM layer: Use multiple layers of LSTM, each layer contains 64 neurons, add a dropout layer between each LSTM layer, set the dropout probability to 0.5, and add an L2 regularization term to limit the size of the LSTM weight of each layer;

[0018] Hidden layer: There is another hidden layer after the LSTM layer. The hidden layer consists of a fully connected layer and an activation function. The fully connected layer contains 128 or 64 neurons, and the activation function is ReLU.

[0019] Loss function and optimizer: The loss function is the cross entropy loss function, and the Adam optimizer is used for training.

[0020] According to another aspect of the present invention, there is provided a device for predicting a limit phase difference based on LSTM, comprising:

[0021] A collection module is used to set a three-phase short circuit fault on the line in the power grid simulation model of the specified power grid, and collect operation sample data under various fault types, wherein the operation sample data includes: angle difference between the two sides of the power grid and power sample data;

[0022] The first determination module is used to determine the critical instability time of multiple fault types by using a dichotomy method according to the angle difference between the two sides of the power grid, a preset lower limit value of the initial fault duration and an upper limit value of the initial fault duration;

[0023] A second determination module is used to determine the limit phase difference of multiple fault types according to the critical instability time;

[0024] A generation module is used to use the power sample data of various fault types as input data of a pre-built training model, use the extreme phase differences under various fault types as output for model training, and generate an extreme phase difference prediction model;

[0025] The prediction module is used to input the collected predicted electrical quantity data of the predicted fault into the extreme phase difference prediction model, and output the extreme phase difference prediction value of the predicted fault.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.

[0027] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.

[0028] Therefore, the present invention proposes a method for predicting the extreme phase difference based on LSTM, which uses LSTM to predict the extreme phase difference according to electrical characteristics. A large number of samples are generated in a simulation environment, and the extreme phase difference of each sample is obtained using the binary critical method. The LSTM model is trained to estimate the extreme phase difference. Compared with the extreme phase difference empirical value of 180° used in engineering, the extreme phase difference predicted by the model of the present invention is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:

[0030] Figure 1 It is a flowchart of a method for predicting a limit phase difference based on LSTM provided by an exemplary embodiment of the present invention;

[0031] Figure 2is a curve diagram of the angle difference between the two sides provided by an exemplary embodiment of the present invention;

[0032] Figure 3 is a flow chart of obtaining critical instability time provided by an exemplary embodiment of the present invention;

[0033] Figure 4 is a training model network structure diagram provided by an exemplary embodiment of the present invention;

[0034] Figure 5 is a power grid system diagram provided by an exemplary embodiment of the present invention;

[0035] Figure 6 is a limit phase difference distribution diagram provided by an exemplary embodiment of the present invention;

[0036] Figure 7 It is a structural schematic diagram of a limit phase difference prediction device based on LSTM provided by an exemplary embodiment of the present invention;

[0037] Figure 8 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0038] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.

[0039] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0040] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0041] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

[0042] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0043] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.

[0044] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0045] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0046] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0047] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0048] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0049] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0050] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0051] Exemplary Methods

[0052] Figure 1 FIG. 1 is a flow chart of a method for predicting a limit phase difference based on LSTM provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the LSTM-based extreme phase difference prediction method 100 includes the following steps:

[0053] Step 101, setting a three-phase short circuit fault on a line in a power grid simulation model of a designated power grid, and collecting operation sample data under various fault types, wherein the operation sample data includes: angle difference between two sides of the power grid and power sample data;

[0054] Step 102, using a dichotomy method to determine critical instability times of multiple fault types according to the angle difference between the two sides of the power grid, a preset lower limit value of initial fault duration, and an upper limit value of initial fault duration;

[0055] Step 103, determining the limit phase differences of multiple fault types according to the critical instability time;

[0056] Step 104, using the power sample data of various fault types as input data of a pre-built training model, using the extreme phase differences under various fault types as output for model training, and generating an extreme phase difference prediction model;

[0057] Step 105 , input the collected data of the electric quantity to be predicted of the fault to be predicted into the extreme phase difference prediction model, and output the extreme phase difference prediction value of the fault to be predicted.

[0058] Specifically, for the estimation problem of the system limit phase difference based on local measurement data, when the limit phase difference empirical value of 180° used in engineering is too conservative, the present invention uses LSTM to predict the limit phase difference according to electrical characteristics. A large number of samples are generated in a simulation environment, and the limit phase difference of each sample is obtained using the binary critical method. The LSTM model is trained to estimate the limit phase difference.

[0059] The present invention establishes an extreme phase difference prediction model based on LSTM, which is mainly divided into two steps. First, a large number of sample data are generated using the dichotomy method, and then a training model is designed for training and testing.

[0060] Step 1: Data generation method based on dichotomy

[0061] A three-phase short circuit fault is set for the line, and the data set is constructed in batches by changing the system load level, fault line, fault location and fault duration. By fixing the system load level, fault line and fault location, the fault duration is set using a binary method. The specific operation is to set the lower limit of the fault duration t left and the upper limit t right , when the fault duration is t left The system is in a stable state when the fault duration is t right The system is in an unstable state at [t left ,t right ] there is a critical instability time t N , as attached Figure 2 As shown, when the system fault duration is less than t N When the system fault duration is greater than or equal to t N When the system is unstable, the line is broken. The limit phase difference at this time is Figure 2 The highest point on the y-axis corresponding to the curve in the left figure.

[0062] Find the critical instability time t N The method is dichotomy, the specific process is as follows Figure 3 shown.

[0063] 1. Set the initial lower limit value t left and the upper limit t right , requiring the system to be fault-tolerant for a duration of t left The system is stable at t right The system becomes unstable.

[0064] 2. Determine whether t left <t right , if it holds, go to the next step. Otherwise, find t N =t left =t right , the loop ends.

[0065] 3. Find t mid =(t left +t right ) / 2, if the fault duration is t mid If the system is stable, then set t mid =t left, otherwise set t mid =t right . Go back to step 2.

[0066] I got t N That is, the extreme phase difference is obtained and used as the output of the sample. The input of the sample is the grid time series feature sequence. For each node, the positive sequence voltage, positive sequence angle, active load, and reactive load from 2 cycles before the end of the fault to 2 cycles after the end of the fault are selected. For each line, the active power and reactive power from 2 cycles before the end of the fault to 2 cycles after the end of the fault are selected as the input features of the grid. The input and output constitute a complete training sample.

[0067] Step 2: Model design based on LSTM:

[0068] After constructing a large number of labeled samples, the model network structure is designed. Since the extracted features are power grid time series features, the LSTM network is selected to form the model network structure. The network structure is shown in the attached figure. Figure 4 As shown:

[0069] Its specific composition is as follows:

[0070] (1) Input layer and output layer: The input is a set of feature sequences with time characteristics, and the output is the extreme phase difference.

[0071] (2) LSTM layer: A multi-layer LSTM is used, with each layer containing 64 neurons. A dropout layer is added between each LSTM layer, and the dropout probability is set to 0.5 to avoid overfitting. An L2 regularization term is also added to limit the size of the weight to avoid overfitting.

[0072] (3) Hidden layer: There is another hidden layer after the LSTM layer. The hidden layer consists of a fully connected layer and an activation function. The fully connected layer contains 128 or 64 neurons, and the activation function is ReLU.

[0073] (4) Loss function and optimizer: The cross entropy loss function is used and the Adam optimizer is used for training.

[0074] In one embodiment of the present application, a power grid system diagram is shown in the attached Figure 5 As shown in Figure 1, a three-phase short circuit fault is set on the (BusA-1, BusB-1, 1) line, and a large number of samples are obtained through the binary method. Through observation, it is found that the system is mainly torn at the (BusA-1, BusB-1, 2) line. Through statistics, it is found that the extreme phase difference distribution of this line is as shown in the attached figure. Figure 6As shown in Figure 1, the extreme phase difference of most samples is distributed between 90 and 115 degrees, so training and testing are carried out on this line. The model is trained for 1000 rounds and tested on the test set, and the results are shown in Table 1.

[0075] Table 1 Test model table

[0076]

[0077] Therefore, the present invention proposes a method for predicting the extreme phase difference based on LSTM, which uses LSTM to predict the extreme phase difference according to electrical characteristics. A large number of samples are generated in a simulation environment, and the extreme phase difference of each sample is obtained using the binary critical method. The LSTM model is trained to estimate the extreme phase difference. Compared with the extreme phase difference empirical value of 180° used in engineering, the extreme phase difference predicted by the model of the present invention is more accurate.

[0078] Exemplary Devices

[0079] Figure 7 FIG. 1 is a schematic diagram of a structure of an LSTM-based extreme phase difference prediction device provided by an exemplary embodiment of the present invention. Figure 7 As shown, the apparatus 700 includes:

[0080] The collection module 710 is used to set a three-phase short circuit fault on the line in the power grid simulation model of the specified power grid, and collect operation sample data under various fault types, wherein the operation sample data includes: angle difference between the two sides of the power grid and power sample data;

[0081] The first determination module 720 is used to determine the critical instability time of multiple fault types according to the angle difference between the two sides of the power grid, the preset lower limit value of the initial fault duration and the upper limit value of the initial fault duration by using a dichotomy method;

[0082] A second determination module 730 is used to determine the limit phase differences of multiple fault types according to the critical instability time;

[0083] A generation module 740 is used to use the power sample data of various fault types as input data of a pre-built training model, use the extreme phase differences under various fault types as output for model training, and generate an extreme phase difference prediction model;

[0084] The prediction module 750 is used to input the collected data of the power quantity to be predicted of the fault to be predicted into the extreme phase difference prediction model, and output the extreme phase difference prediction value of the fault to be predicted.

[0085] Optionally, the electricity quantity sample data includes: positive sequence voltage, positive sequence angle, active load and reactive load from 2 cycles before the fault ends to 2 cycles after the fault ends.

[0086] Optionally, the first determining module 720 includes:

[0087] Setting submodule, used to set the lower limit of initial fault duration t left and the upper limit of initial fault duration t right , where the system is in a fault duration of t left The system is stable at t right When the system becomes unstable;

[0088] The judgment submodule is used to judge whether the condition t is met left <t right If it does not hold, determine t N =t left =t right , the cycle ends, where t N is the critical instability time;

[0089] Obtain submodule, used to obtain t if the condition is met mid =(t left +t right ) / 2, if the fault duration is t mid If the system is stable, then set t left =t mid , otherwise set t right =t mid , re-judge whether the conditions are met.

[0090] Optionally, the structure of the training model includes:

[0091] Input layer and output layer: The input is a characteristic sequence of a set of electrical quantity sample data with time characteristics, and the output is the extreme phase difference.

[0092] LSTM layer: Use multiple layers of LSTM, each layer contains 64 neurons, add a dropout layer between each LSTM layer, set the dropout probability to 0.5, and add an L2 regularization term to limit the size of the LSTM weight of each layer;

[0093] Hidden layer: There is another hidden layer after the LSTM layer. The hidden layer consists of a fully connected layer and an activation function. The fully connected layer contains 128 or 64 neurons, and the activation function is ReLU.

[0094] Loss function and optimizer: The loss function is the cross entropy loss function, and the Adam optimizer is used for training.

[0095] Exemplary Electronic Devices

[0096] Figure 8 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Figure 8 As shown, the electronic device 80 includes one or more processors 81 and a memory 82 .

[0097] The processor 81 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0098] The memory 82 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 81 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 83 and an output device 84, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0099] In addition, the input device 83 may also include, for example, a keyboard, a mouse, etc.

[0100] The output device 84 can output various information to the outside, and can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.

[0101] Of course, to simplify, Figure 8 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.

[0102] Exemplary computer program products and computer-readable storage media

[0103] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.

[0104] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0105] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0106] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0107] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.

[0108] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0109] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.

[0110] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.

[0111] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.

[0112] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A method for predicting extreme phase difference based on LSTM, characterized in that: include: A three-phase short circuit fault is set for a line in a power grid simulation model of a specified power grid, and operation sample data under various fault types are collected, wherein the operation sample data includes: angle difference between two sides of the power grid and power sample data; Using a dichotomy method, according to the angle difference between the two sides of the power grid, a preset lower limit value of the initial fault duration, and an upper limit value of the initial fault duration, critical instability times of various fault types are determined; Determining the limit phase differences of multiple fault types according to the critical instability time; The power sample data of various fault types are used as input data of a pre-built training model, and the extreme phase differences under various fault types are used as outputs for model training to generate an extreme phase difference prediction model; The collected data of the electric quantity to be predicted of the fault to be predicted is input into the extreme phase difference prediction model, and the extreme phase difference prediction value of the fault to be predicted is output.

2. The method according to claim 1, characterized in that: The electric quantity sample data includes: positive sequence voltage, positive sequence angle, active load and reactive load from 2 cycles before the fault ends to 2 cycles after the fault ends.

3. The method according to claim 1, characterized in that The dichotomy method is used to determine the critical instability time of various fault types according to the angle difference between the two sides of the power grid, the preset lower limit value of the initial fault duration and the upper limit value of the initial fault duration, including: Set the lower limit of the initial fault duration t left and the upper limit of initial fault duration t right , where the system is in a fault duration of t left The system is stable at t right When the system becomes unstable; Determine whether the condition t is met left <t right If it does not hold, determine t N =t left =t right , the cycle ends, where t N is the critical instability time; If the above conditions are met, then t mid =(t left +t right ) / 2, if the fault duration is t mid If the system is stable, then set t left =t mid , otherwise set t right =t mid , re-judge whether the conditions are met.

4. The method according to claim 1, characterized in that The structure of the training model includes: Input layer and output layer: The input is a characteristic sequence of a set of electrical quantity sample data with time characteristics, and the output is the extreme phase difference. LSTM layer: Use multiple layers of LSTM, each layer contains 64 neurons, add a dropout layer between each LSTM layer, set the dropout probability to 0.5, and add an L2 regularization term to limit the size of the LSTM weight of each layer; Hidden layer: There is another hidden layer after the LSTM layer. The hidden layer consists of a fully connected layer and an activation function. The fully connected layer contains 128 or 64 neurons, and the activation function is ReLU. Loss function and optimizer: The loss function is the cross entropy loss function, and the Adam optimizer is used for training.

5. A LSTM-based extreme phase difference prediction device, characterized in that: include: A collection module is used to set a three-phase short circuit fault on a line in a power grid simulation model of a specified power grid, and collect operation sample data under various fault types, wherein the operation sample data includes: an angle difference between two sides of the power grid and a quantity sample data; A first determination module is used to determine the critical instability time of multiple fault types according to the angle difference between the two sides of the power grid, a preset lower limit value of initial fault duration and an upper limit value of initial fault duration by using a dichotomy method; A second determination module is used to determine the limit phase differences of multiple fault types according to the critical instability time; A generation module, used to use the electric quantity sample data of various fault types as input data of a pre-built training model, use the extreme phase differences under various fault types as output for model training, and generate an extreme phase difference prediction model; The prediction module is used to input the collected data on the amount of electricity to be predicted of the fault to be predicted into the extreme phase difference prediction model, and output the extreme phase difference prediction value of the fault to be predicted.

6. The device according to claim 5, characterized in that The electric quantity sample data includes: positive sequence voltage, positive sequence angle, active load and reactive load from 2 cycles before the fault ends to 2 cycles after the fault ends.

7. The device according to claim 5, characterized in that The first determination module includes: The setting submodule is used to set the lower limit value t of the initial fault duration. left and the upper limit of initial fault duration t right , where the system is in a fault duration of t left The system is stable at t right When the system becomes unstable; The judgment submodule is used to judge whether the condition t is met left <t right If it does not hold, determine t N =t left =t right , the cycle ends, where t N is the critical instability time; The submodule for obtaining t is used to obtain t if the condition is met. mid =(t left +t right ) / 2, if the fault duration is t mid If the system is stable, then set t left =t mid , otherwise set t right =t mid , re-judge whether the conditions are met.

8. The device according to claim 5, characterized in that The structure of the training model includes: Input layer and output layer: The input is a characteristic sequence of a set of electrical quantity sample data with time characteristics, and the output is the extreme phase difference. LSTM layer: Use multiple layers of LSTM, each layer contains 64 neurons, add a dropout layer between each LSTM layer, set the dropout probability to 0.5, and add an L2 regularization term to limit the size of the LSTM weight of each layer; Hidden layer: There is another hidden layer after the LSTM layer. The hidden layer consists of a fully connected layer and an activation function. The fully connected layer contains 128 or 64 neurons, and the activation function is ReLU. Loss function and optimizer: The loss function is the cross entropy loss function, and the Adam optimizer is used for training.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 4.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 4.