LightGBM-based static voltage stability margin calculation method and system
Through the static voltage stability margin calculation method based on LightGBM, the problems of low calculation efficiency and model overfitting of the traditional continuous flow method are solved, and the rapid and accurate prediction and real-time monitoring of the stable state of the power grid are achieved.
Patent Information
- Application Number
- CN202411621679.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-11
AI Technical Summary
The traditional continuous flow method has problems such as large time consumption, difficulty in setting step lengths and overfitting of the model when calculating the static voltage stability margin, making it difficult to cope with the complexity of the new power system.
The static voltage stability margin calculation method based on LightGBM is adopted, and the initial operating status information of the power grid is obtained, and the training data is generated using the continuous flow algorithm, and the LightGBM model is optimized and the online prediction is used.
It realizes rapid and accurate prediction and real-time monitoring of the voltage stable state of the power grid, and improves the support capabilities of power system operation and optimization.
Smart Images

Figure CN119602274A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of static voltage stability margin calculation, and in particular to a static voltage stability margin calculation method and system based on LightGBM. Background Art
[0002] The traditional continuous power flow method requires multiple rounds of iterations, which consumes a lot of time during operation, thus affecting the real-time monitoring of the voltage collapse point in the system. In addition, it is difficult to set the step size of the continuous power flow method. Setting the step size too small will lead to too many iterations. Setting the step size too large may cause the voltage collapse point to be skipped during the iteration, thus causing the solution to deviate or even diverge. The more advanced gradient boosting decision tree (GBDT) algorithm uses the approximate gradient used to update the model after the sample generates the tree model, which is estimated based on the same set of data points in the current model. This estimation method will cause the model to overfit. In addition, GBDT and extreme gradient boosting (XGBoost) will traverse and calculate each eigenvalue of the data in each prediction process to obtain the gain and then achieve pre-sorting. This algorithm greatly increases the complexity and operation time of the algorithm, and it is difficult to cope with the increasing number of grid-connected units and complex solution objects in new power systems. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a static voltage stability margin calculation method and system based on LightGBM.
[0004] The technical solution adopted by the present invention is:
[0005] On the one hand, an embodiment of the present invention provides a static voltage stability margin calculation method based on LightGBM, the method comprising the following steps:
[0006] Obtaining initial operation status information of the power grid;
[0007] Obtaining training data according to the initial operating state information and the continuous power flow algorithm;
[0008] Perform optimization training according to the training data to obtain a LightGBM model;
[0009] According to the LightGBM model, an online predicted static voltage stability margin is obtained.
[0010] Furthermore, the obtaining of the initial operation status information of the power grid comprises the following steps:
[0011] Obtaining base state operating parameters of the power grid; the base state operating parameters include reference active power, reactive power and reference voltage;
[0012] Analyze the base state operation parameters and select load increase mode information;
[0013] Set random number;
[0014] Initial parameters of the power grid are initialized according to the load increase mode information and the random number to obtain initial operation state information.
[0015] Further, obtaining training data according to the initial operating state information and the continuous power flow algorithm comprises the following steps:
[0016] Inputting the initial operating state information of different base state operating parameters into a continuous power flow algorithm to determine a static voltage stability margin obtained by continuous power flow calculation;
[0017] Using the static voltage stability margin and power flow section characteristic information obtained by the continuous power flow calculation as training data;
[0018] The power flow section characteristic information includes load, voltage amplitude, and phase angle.
[0019] Furthermore, the inputting of the initial operation state information of different base state operation parameters into a continuous power flow algorithm to determine the static voltage stability margin obtained by continuous power flow calculation comprises the following steps:
[0020] Inputting the initial operation state information of different base state operation parameters into a continuous power flow algorithm to obtain a parameterized power flow equation;
[0021] According to the power flow equation, obtaining a power flow solution;
[0022] According to the power flow solution, the predicted value is corrected using the Newton method or the quasi-Newton method to determine the static voltage stability margin obtained by the continuous power flow calculation.
[0023] Furthermore, the optimization training is performed according to the training data to obtain the LightGBM model, comprising the following steps:
[0024] According to the training data, a number of tidal flow sections are selected for modeling to obtain modeling data;
[0025] According to the modeling data, using a mutually exclusive feature bundling algorithm to reduce mutually exclusive feature dimensions to obtain feature data;
[0026] Discretizing the characteristic data to obtain gain data;
[0027] Use the gradient-based single-side sampling algorithm to obtain large gradient samples;
[0028] Training is performed according to the gain data and the large gradient samples to obtain a LightGBM model.
[0029] Furthermore, obtaining the online predicted static voltage stability margin according to the LightGBM model comprises the following steps:
[0030] Acquiring monitoring operation data; the monitoring operation data is acquired by a synchronized phasor measurement device;
[0031] The monitoring operation data is input into the LightGBM model to obtain an online predicted static voltage stability margin.
[0032] Furthermore, the static voltage stability margin calculation method based on LightGBM also includes the following steps:
[0033] According to the prediction results of the LightGBM model and the current static voltage stability margin of the power grid, assess whether the power grid is close to the critical point of voltage collapse, and obtain voltage stability assessment information;
[0034] Improvement measure information is obtained based on the voltage stability evaluation information.
[0035] On the other hand, an embodiment of the present invention also provides a static voltage stability margin calculation system based on LightGBM, the system comprising:
[0036] The first module is used to obtain the initial operation status information of the power grid;
[0037] The second module is used to obtain training data according to the initial operation state information and the continuous power flow algorithm;
[0038] The third module is used to perform optimization training according to the training data to obtain a LightGBM model;
[0039] The fourth module is used to obtain the online predicted static voltage stability margin according to the LightGBM model.
[0040] On the other hand, an embodiment of the present invention also provides a static voltage stability margin calculation device based on LightGBM, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the static voltage stability margin calculation method based on LightGBM as described above is implemented.
[0041] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the static voltage stability margin calculation method based on LightGBM as described above.
[0042] The embodiments of the present application include at least the following beneficial effects: The present application provides a method and system for calculating the static voltage stability margin based on LightGBM. The present invention obtains the initial operating state information of the power grid; obtains training data based on the initial operating state information and the continuous power flow algorithm; performs optimization training based on the training data to obtain the LightGBM model; obtains the online predicted static voltage stability margin based on the LightGBM model. The present invention can accurately predict and monitor the voltage stability state of the power grid in real time, providing strong support for the operation and optimization of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of a static voltage stability margin calculation method based on LightGBM provided in an embodiment of the present invention;
[0044] Figure 2 It is a schematic diagram of the overall concept provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0046] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0047] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0049] The present invention proposes a static voltage stability margin calculation method based on the LightGBM algorithm. The Histogram algorithm applied by LightGBM can discretize continuous floating-point eigenvalues into multiple "buckets" to form a histogram with a width of k. In the process of traversing the data, it is only necessary to calculate the gain k times to determine the optimal splitting point, which improves the calculation speed. In addition, LightGBM abandons the traditional level-wise decision tree growth strategy and adopts a more efficient Leaf-wise strategy, that is, the one with the highest split gain is selected from all leaf nodes for splitting, thereby avoiding the computational redundancy caused by the level-wise splitting of each leaf. At the same time, after solving the VSM model, LightGBM can provide the weight of the influence of the power flow section data on the static voltage stability margin VSM value, which helps to provide guidance for the timely adjustment of the voltage stability strategy.
[0050] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0051] On the one hand, the embodiment of the present invention provides a static voltage stability margin calculation method based on LightGBM, referring to Figure 1 , the method comprises the following steps:
[0052] S100, obtaining initial operation status information of the power grid;
[0053] S200, obtaining training data according to the initial operation state information and the continuous power flow algorithm;
[0054] S300, optimize the training according to the training data to obtain the LightGBM model;
[0055] S400. According to the LightGBM model, the online predicted static voltage stability margin is obtained.
[0056] The embodiment of the present invention discloses step S100 of acquiring initial operation status information of a power grid, including the following steps:
[0057] S110, obtaining base state operation parameters of the power grid; the base state operation parameters include reference active power, reactive power and reference voltage;
[0058] S120, analyzing base state operation parameters and selecting load increase mode information;
[0059] S130, setting a random number;
[0060] S140. Initialize initial parameters of the power grid according to the load increase mode information and the random number to obtain initial operation status information.
[0061] The embodiment of the present invention discloses that step S200 obtains training data according to the initial operation state information and the continuous power flow algorithm, including the following steps:
[0062] S210, inputting initial operation state information of different base state operation parameters into a continuous power flow algorithm to determine a static voltage stability margin obtained by continuous power flow calculation;
[0063] S220, using the static voltage stability margin and power flow section characteristic information obtained by continuous power flow calculation as training data;
[0064] S230. The power flow section characteristic information includes load, voltage amplitude, and phase angle.
[0065] The embodiment of the present invention discloses that in step S210, initial operation state information of different base state operation parameters is input into a continuous power flow algorithm to determine a static voltage stability margin obtained by continuous power flow calculation, including the following steps:
[0066] S211, inputting the initial operation state information of different base state operation parameters into the continuous power flow algorithm to obtain a parameterized power flow equation;
[0067] S212, obtaining a tidal current solution according to a tidal current equation;
[0068] S213. According to the power flow solution, the predicted value is corrected using the Newton method or the quasi-Newton method to determine the static voltage stability margin obtained by the continuous power flow calculation.
[0069] The embodiment of the present invention discloses step S300, which performs optimization training according to training data to obtain a LightGBM model, including the following steps:
[0070] S310, selecting a number of tidal flow sections for modeling based on the training data to obtain modeling data;
[0071] S320, according to the modeling data, using a mutually exclusive feature bundling algorithm to reduce mutually exclusive feature dimensions to obtain feature data;
[0072] S330, discretizing the characteristic data to obtain gain data;
[0073] S340, using a gradient-based single-side sampling algorithm to obtain a large gradient sample;
[0074] S350. Train according to the gain data and large gradient samples to obtain the LightGBM model.
[0075] The embodiment of the present invention discloses that step S400 obtains the online predicted static voltage stability margin according to the LightGBM model, including the following steps:
[0076] S410, obtaining monitoring operation data; the monitoring operation data is obtained by a synchronized phasor measurement device;
[0077] S420, input the monitoring operation data into the LightGBM model to obtain the online predicted static voltage stability margin.
[0078] The static voltage stability margin calculation method based on LightGBM disclosed in the embodiment of the present invention also includes the following steps:
[0079] S500, based on the prediction results of the LightGBM model and the current static voltage stability margin of the power grid, evaluates whether the power grid is close to the critical point of voltage collapse and obtains voltage stability evaluation information;
[0080] S600: Obtain improvement measure information based on the voltage stability evaluation information.
[0081] As an optional implementation, the execution steps of the present invention can be summarized into the following main stages, from initializing the grid state to real-time grid stability prediction and optimization improvement. The specific steps are as follows:
[0082] 1. Randomly initialize the initial operation state of the power grid
[0083] 1. Analyze the base-state operation status of the power grid: First, analyze the base-state operation parameters of the power grid, including the base active power, reactive power and base voltage, etc. These are the basis for system stability analysis.
[0084] 2. Select the load increase method: Select the appropriate load increase method to simulate different situations of grid load and generator growth. For example, you can set the load growth rate to be consistent, or the load increase in a certain area. The way the load changes will affect the results of subsequent power flow calculations.
[0085] 3. Random initialization: Initialize the initial parameters of the power grid by introducing random numbers (e.g. 0.2) to generate multiple different initial states, which will serve as inputs for subsequent calculations.
[0086] 2. Continuous Power Flow Algorithm
[0087] 1. Introduce parameterized power flow equation: Analyze the steady-state changes of the power system under different operating conditions through the continuous power flow algorithm. The power flow equation takes into account the load changes of the power grid and can predict the stability of the power grid.
[0088] 2. Tangent method iterative solution: Use the tangent method to predict the next flow point. During the iteration process, select the flow section with the largest change as the continuous parameter to predict the next state of the power grid.
[0089] 3. Jacobian matrix expansion and iteration: Jacobian matrix expansion and iteration method are used for calculation, and the predicted value is corrected by Newton method or quasi-Newton method, and finally the voltage collapse point is obtained to determine the static voltage stability margin (VSM).
[0090] 3. Training LightGBM model
[0091] 1. Data preparation: The static voltage stability margin (VSM) and power flow section characteristics (such as load, voltage amplitude, phase angle, etc.) obtained by continuous power flow calculation are used as training data, and the first 10-15 power flow sections are selected for modeling.
[0092] 2. Training data division: The collected data is divided into training set and test set in a ratio of 9:1 for training and evaluation of the LightGBM model.
[0093] 3. LightGBM model training: Optimize the LightGBM model through the following techniques:
[0094] Exclusive Feature Bundling (EFB): Reduce feature dimensions and improve computational efficiency.
[0095] Histogram algorithm: discretizes feature data and finds the best splitting point by calculating the splitting gain.
[0096] Gradient-based Single Side Sampling (GOSS): retains samples with large gradients and discards samples with small gradients to improve training efficiency.
[0097] Leaf-Wise growth strategy: optimizes the growth of the decision tree by finding the node with the largest gain to split.
[0098] 4. Model evaluation and optimization: Use mean squared error (MSE) and mean absolute percentage error (MAPE) to evaluate the accuracy of the model, and adjust model parameters (such as learning rate, split depth, etc.) to improve accuracy.
[0099] 4. Importing real-time data of power grid into model prediction
[0100] 1. Synchronous phasor measurement (PMU): Real-time operation data of the power grid is obtained through real-time monitoring equipment such as PMU.
[0101] 2. Real-time input model prediction: Input real-time data into the trained LightGBM model to perform real-time prediction of the static voltage stability margin (VSM) and evaluate the current voltage stability of the power grid.
[0102] 5. Selection of measures to maintain voltage stability
[0103] 1. Evaluate voltage stability: Based on the model's prediction results and the grid's current static voltage stability margin, assess whether the grid is close to the critical point of voltage collapse.
[0104] 2. Propose targeted improvement measures: According to the influence weight of each power flow characteristic output by the model, propose targeted improvement measures. For example, if reactive power has the greatest impact on VSM, you can consider improving reactive power by optimizing the grid structure, increasing spare capacity, shortening electrical distance, etc. to ensure voltage stability.
[0105] On the other hand, an embodiment of the present invention also provides a static voltage stability margin calculation system based on LightGBM, the system comprising:
[0106] The first module is used to obtain the initial operation status information of the power grid;
[0107] The second module is used to obtain training data according to the initial operation state information and the continuous power flow algorithm;
[0108] The third module is used to optimize the training according to the training data to obtain the LightGBM model;
[0109] The fourth module is used to obtain the online predicted static voltage stability margin according to the LightGBM model.
[0110] As an optional implementation, the present invention aims to randomly set the initial operating state of the power system, and import the data into the continuous power flow algorithm to calculate the static voltage stability margin VSM of the system, and at the same time obtain the relevant information of the power flow section generated in each iteration process, such as phase angle, voltage amplitude and load, etc., and then use the data of multiple power flow calculations as the initial data to divide the training set and the test set to train the LightGBM model, establish the relationship between the current operating state of the power grid and the static voltage stability margin VSM, and output the power flow section feature weights, and then adjust the optimization parameters to improve the accuracy of the model, and finally input the real-time data of the power grid into the trained LightGBM model, so as to make real-time predictions on the static voltage stability margin, and propose targeted improvement measures for voltage stability through the output power flow feature weights. The overall idea is as follows Figure 2 shown.
[0111] The specific steps are as follows:
[0112] Step 1) Randomly initialize the initial operation state of the power grid
[0113] First, the base state of the selected power grid needs to be analyzed, including the benchmark active power, benchmark reactive power, benchmark voltage, etc. Secondly, the load increase method needs to be selected. In the actual power grid operation, the different growth directions of loads and generators will affect the static voltage stability margin calculated by the continuous power flow method. Possible directions include the same load growth rate for the entire system and balanced by all generators, the load in a certain area increases at the same rate and is balanced by the generators at the balancing node, etc. The appropriate direction needs to be selected according to the different analysis nodes. Random initialization is as follows:
[0114] C j =C i ×(100%±δ)(1)
[0115] Where: C j are randomly initialized grid operation parameters; C i is the grid base state operating parameter; δ is a random number with a value of ±0.2.
[0116] Step 2) Continuous Power Flow Algorithm
[0117] The continuous power flow algorithm analyzes the steady-state changes of the power system by introducing parameters. The parameterized power flow equation is as follows:
[0118] f(C j ,λ)=0(2)
[0119] Where: C j is the randomly initialized grid operation parameter; λ is the parameter that reflects the system load state and satisfies
[0120] 0≤λ≤λ lim (3)
[0121] Where: lim It is the parameter of the extreme load state.
[0122] The continuous flow method predicts the next flow point by the tangent method. Differentiating both sides of equation (2) and converting it into a matrix form yields:
[0123]
[0124] Due to the introduction of λ, the number of equations is less than the number to be solved, so it is necessary to expand the Jacobian matrix and specify a component in the tangent vector as ±1. This component is called a continuous parameter, and equation (4) can be rewritten as:
[0125]
[0126] Where: e n is a row vector whose elements are all 0 except the elements corresponding to the continuous parameters which are 1.
[0127] When predicting for the first time, set λ as a continuous parameter, and its corresponding tangent vector is 1. For subsequent prediction of continuous parameters, the state variable with the largest change rate of the power flow section should be selected as the continuous parameter, and the sign is determined by its change slope. After solving the tangent vector, the next power flow solution can be predicted. After solving the power flow solution, the predicted value needs to be corrected back to the actual value of the power flow using the Newton method or the quasi-Newton method. After continuous iteration of the above steps, the critical point of the PV curve, that is, the voltage collapse point, can be obtained, and the static voltage stability margin VSM can be calculated.
[0128] In the present invention, the initial operation state of the power grid with different base state parameters in step 1 is input into the continuous power flow method, so as to obtain multiple power flow sections and the static voltage stability margin VSM of the power grid from the initial state to the voltage collapse point.
[0129] Step 3) Train the LightGBM model
[0130] For each initial state of continuous power flow calculation, only the first 10-15 power flow sections are selected to simulate the real-time operation state of the power grid, and the parameters important for evaluating voltage stability are selected, including system load, voltage amplitude, phase angle, etc. The static voltage stability margin obtained by continuous power flow calculation is used as the LightGBM iteration target. The initial data obtained above is divided into training set and test set according to 9:1. The LightGBM model training process includes:
[0131] (1) The exclusive feature bundling algorithm (EFB) is used to reduce the dimensions of mutually exclusive features without losing information, reduce the occurrence of 0 in the features, and improve the efficiency of calculation.
[0132] (2) Use the Histogram algorithm to discretize the feature data bundles processed by EFB into a histogram with k "buckets", and calculate the feature gradient and sample quantity of each "bucket". When splitting, traverse the k "buckets" to calculate the gain and find the optimal split point. The gain calculation formula is as follows:
[0133]
[0134] Where: G is the gain; L is the sum of the gradients of the "buckets" to the left of the split point; m L is the number of samples on the left side of the split point; R is the sum of the gradients of the “buckets” on the right side of the split point; m R is the sum of the gradients of the “buckets” to the right of the split point; F is the sum of the gradients of the parent nodes; m F is the number of parent node samples.
[0135] (3) Using the gradient-based single-side sampling algorithm (GOSS), the gradient is regarded as an important indicator to measure the degree of sample learning. For samples with small gradients, they have been fitted with a small error and do not need to be trained further; however, samples with large gradients often have underfitting problems, and these samples need to be trained further. Therefore, GOSS sorts samples according to the size of the gradient, retains all samples with large gradients, retains several samples with small gradients, and discards other samples with small gradients, thereby improving the overall computational efficiency.
[0136] (4) Using the Leaf-Wise decision tree growth strategy, we search for the node with the largest splitting gain from the leaf nodes at the same depth, instead of splitting all leaf nodes in XGBoost and GBDT, to improve the calculation speed. In addition, in order to prevent overfitting caused by too deep a depth, we can limit the number of splits.
[0137] After training, LightGBM can form a nonlinear relationship between the static voltage stability margin VSM and the power flow section characteristics, and give the weight of each feature on VSM. The training and test accuracy of the model can be evaluated using mean square error (MSE), mean absolute percentage error (MAPE), etc. The model can be optimized by adjusting parameters such as learning rate, split depth, and number of leaves.
[0138] Step 4) Import real-time grid data into model prediction
[0139] Thanks to the widespread use of synchronized phasor measurement units (PMUs), the real-time operation status of the power grid can be dynamically monitored. By importing the monitored data into the fully trained LightGBM model, the real-time static voltage stability margin VSM of the power grid can be efficiently and accurately evaluated.
[0140] Step 5) Selection of measures to maintain voltage stability
[0141] After LightGBM predicts the static voltage stability margin of the current grid operation status, it can evaluate the current static voltage stability status according to the "Power System Safety and Stability Calculation Specification GB / T 40581-2021" and "Southern Power Grid Safety and Stability Calculation Analysis Guidelines Q / CSG1107005-2022". At the same time, the model can also output the influence weights of each power flow feature. When the VSM approaches the critical point of collapse, the factors with higher weights can be targeted to improve the current grid operation stability. If reactive power has the greatest impact on VSM, reactive power can be increased by strengthening the grid structure, shortening the electrical distance, and leaving rotating standby for conventional units to avoid voltage instability.
[0142] The static voltage stability margin calculation method based on the LightGBM algorithm proposed in the present invention first trains the model with the help of the power flow section data and the static voltage stability margin generated by the continuous power flow algorithm, and then injects the real-time data of the power grid into the established model, thereby realizing the real-time evaluation of the static voltage stability margin of the current power grid, so as to detect the risk of voltage instability in time, and can propose targeted improvement measures through the power flow section parameter influence weights output by the model. The LightGBM model can effectively avoid the slow calculation speed problem faced by the traditional continuous power flow method in the increasingly complex new power system through the Histogram algorithm, the gradient-based single-sided sampling algorithm (GOSS), the Leaf-Wise decision tree growth strategy and the mutually exclusive feature bundling algorithm (EFB), and can also further improve the calculation efficiency and speed based on the gradient boosting decision tree, neural network, etc., without losing the prediction accuracy.
[0143] The key technical points of the present invention are:
[0144] 1. The adopted LightGBM algorithm can effectively avoid the slow computing speed problem faced by the traditional continuous power flow method in the increasingly complex new power system, and can also further improve the computing efficiency and speed based on the gradient boosting decision tree, neural network, etc. without losing the prediction accuracy.
[0145] 2. The LightGBM algorithm can output the predicted static voltage stability margin while outputting the weight of each flow section parameter's influence on it, which can provide improvement guidance for targeted improvement of voltage stability.
[0146] On the other hand, an embodiment of the present invention also provides a static voltage stability margin calculation device based on LightGBM, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the static voltage stability margin calculation method based on LightGBM as described above.
[0147] The static voltage stability margin calculation device based on LightGBM of an embodiment of the present invention includes a memory and a processor.
[0148] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0149] The memory may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. Among them, ROM can store static data or instructions required by the processor or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0150] The memory stores executable codes, and when the executable codes are processed by the processor, the processor can execute part or all of the methods described above.
[0151] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the static voltage stability margin calculation method based on LightGBM as described above.
[0152] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0153] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. The static voltage stability margin calculation method based on LightGBM is characterized by: The method comprises the following steps: Obtaining initial operation status information of the power grid; Obtaining training data according to the initial operating state information and the continuous power flow algorithm; Perform optimization training according to the training data to obtain a LightGBM model; According to the LightGBM model, an online predicted static voltage stability margin is obtained.
2. The method according to claim 1, characterized in that The obtaining of the initial operation status information of the power grid comprises the following steps: Obtaining base state operating parameters of the power grid; the base state operating parameters include reference active power, reactive power and reference voltage; Analyze the base state operation parameters and select load increase mode information; Set random number; Initial parameters of the power grid are initialized according to the load increase mode information and the random number to obtain initial operation state information.
3. The method according to claim 1, characterized in that The obtaining of training data according to the initial operation state information and the continuous power flow algorithm comprises the following steps: Inputting the initial operating state information of different base state operating parameters into a continuous power flow algorithm to determine a static voltage stability margin obtained by continuous power flow calculation; Using the static voltage stability margin and power flow section characteristic information obtained by the continuous power flow calculation as training data; The power flow section characteristic information includes load, voltage amplitude, and phase angle.
4. The method according to claim 3, characterized in that The step of inputting the initial operation state information of different base state operation parameters into a continuous power flow algorithm to determine a static voltage stability margin obtained by continuous power flow calculation comprises the following steps: Inputting the initial operation state information of different base state operation parameters into a continuous power flow algorithm to obtain a parameterized power flow equation; According to the power flow equation, obtaining a power flow solution; According to the power flow solution, the predicted value is corrected using the Newton method or the quasi-Newton method to determine the static voltage stability margin obtained by the continuous power flow calculation.
5. The method according to claim 1, characterized in that The optimization training is performed according to the training data to obtain the LightGBM model, including the following steps: According to the training data, a number of tidal flow sections are selected for modeling to obtain modeling data; According to the modeling data, using a mutually exclusive feature bundling algorithm to reduce mutually exclusive feature dimensions to obtain feature data; Discretizing the characteristic data to obtain gain data; Use the gradient-based single-side sampling algorithm to obtain large gradient samples; Training is performed according to the gain data and the large gradient samples to obtain a LightGBM model.
6. The method according to claim 1, characterized in that The method of obtaining the online predicted static voltage stability margin according to the LightGBM model comprises the following steps: Acquiring monitoring operation data; the monitoring operation data is acquired by a synchronized phasor measurement device; The monitoring operation data is input into the LightGBM model to obtain an online predicted static voltage stability margin.
7. The method according to claim 1, characterized in that The method further comprises the following steps: According to the prediction results of the LightGBM model and the current static voltage stability margin of the power grid, assess whether the power grid is close to the critical point of voltage collapse, and obtain voltage stability assessment information; Improvement measure information is obtained based on the voltage stability evaluation information.
8. The static voltage stability margin calculation system based on LightGBM is characterized by: The system comprises: The first module is used to obtain the initial operation status information of the power grid; The second module is used to obtain training data according to the initial operation state information and the continuous power flow algorithm; The third module is used to perform optimization training according to the training data to obtain a LightGBM model; The fourth module is used to obtain the online predicted static voltage stability margin according to the LightGBM model.
9. A static voltage stability margin calculation device based on LightGBM, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the static voltage stability margin calculation method based on LightGBM as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the static voltage stability margin calculation method based on LightGBM as described in any one of claims 1 to 7.