A Method and Apparatus for Constructing the Oscillation Stability Region of Power Systems Based on Random Forest

By constructing the oscillation stability region of the power system using the random forest algorithm, selecting appropriate variables, and training a classifier using training and test sets, the problems of large computational load and difficult boundary search in existing technologies are solved, and efficient and accurate oscillation stability region construction is achieved.

CN116316688BActive Publication Date: 2026-11-10CHINA SOUTHERN POWER GRID COMPANY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310162283.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2026-11-10
Estimated Expiration
2043-02-22

AI Technical Summary

Technical Problem

Existing methods for constructing the stability domain of power system oscillations suffer from high computational complexity, an exponential increase in the number of solution points as the number of influencing variables increases, difficulty in boundary search, low computational efficiency, complex operation, narrow applicability, and low accuracy.

Method used

The random forest algorithm is used to select variables for the power system oscillation stability region, train a classifier using the training set to construct the power system oscillation stability region, and calculate the accuracy of the classifier on the test set until the preset effective conditions are met, thus obtaining the final power system oscillation stability region.

Benefits of technology

It realizes the construction of power system oscillation stability domain with wide applicability, small computational load, simple operation, high computational efficiency and high accuracy, and solves the problems of large computational load, difficult boundary search, complex operation, narrow applicability and low accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116316688B_ABST
    Figure CN116316688B_ABST
Patent Text Reader

Abstract

This application relates to a method and apparatus for constructing a power system oscillation stability domain based on random forest. The method includes: selecting variables for the power system oscillation stability domain; taking points within the space formed by the variables to obtain a dataset for power system oscillation analysis, and dividing the dataset into a training set and a test set; using a random forest algorithm to train a classifier using the training set, and constructing the power system oscillation stability domain based on the classifier; calculating the classifier accuracy on the test set until a preset effective condition is met, thus obtaining the final power system oscillation stability domain. This solves the problems of the point-by-point calculation method for constructing a power system oscillation stability domain, where the computational load is large and the number of solution points increases exponentially with the number of variables, and the boundary search method for constructing the oscillation stability domain, where boundary search is difficult, computational efficiency is low, operation is complex, applicability is narrow, and accuracy is low when the number of influencing variables increases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system stability analysis technology, and in particular to a method and apparatus for constructing a power system oscillation stability domain based on random forest. Background Technology

[0002] New energy power units are gradually replacing traditional thermal power units and becoming the main source of energy supply. However, these units primarily connect to the power grid via power electronic equipment, which may interact with the grid, potentially causing electromagnetic oscillations that could compromise the safe and stable operation of the power system. Therefore, it is necessary to assess the oscillation risk of the power system. Since the actual operating conditions of a power system are constantly changing, assessing its oscillation risk requires analyzing its oscillation stability across the entire operating range. This necessitates the development of a method for constructing an oscillation stability domain to obtain the system's oscillation stability conditions throughout its entire operating range.

[0003] In related technologies, most existing stability domain analysis methods are point-by-point methods, which obtain the oscillation stability domain by taking points in step sizes within the possible operating range and solving the system oscillation stability under the corresponding operating conditions at each point. Another commonly used method for constructing the oscillation stability domain is to search for the boundary of the oscillation stability domain.

[0004] However, in related technologies, the oscillation stability domain of the power system is neglected. When the number of influencing variables increases, the amount of computation becomes large, the number of solution points increases exponentially with the number of variables, and searching for the boundary of the oscillation stability domain increases the difficulty of the search, reduces the computational efficiency, is complicated to operate, has a narrow range of applicability, and has low accuracy, which urgently needs to be improved. Summary of the Invention

[0005] This application provides a method and apparatus for constructing the oscillation stability domain of a power system based on random forest, in order to solve the problems of large computational load and exponential growth of the number of solution points when the number of influencing variables increases in the point-by-point calculation method for constructing the oscillation stability domain of a power system, as well as the problems of difficult boundary search, low computational efficiency, complex operation, narrow applicability and low accuracy in the boundary search method for constructing the oscillation stability domain by searching the boundary when the number of influencing variables increases.

[0006] The first aspect of this application provides a method for constructing a power system oscillation stability region based on random forest, comprising the following steps: selecting variables for the power system oscillation stability region; taking points within the space formed by the variables to obtain a dataset for power system oscillation analysis, and dividing the dataset into a training set and a test set; using a random forest algorithm to train a classifier using the training set, and constructing the power system oscillation stability region based on the classifier; and calculating the accuracy of the classifier on the test set until a preset effective condition is met to obtain the final power system oscillation stability region.

[0007] Optionally, in one embodiment of this application, the variables of the power system oscillation stability domain include key variables of power system operation and variables that affect power system oscillation. The key variables of power system operation include active and reactive power output from power plants and generator terminal voltages. The variables that affect power system oscillation include line length, series compensation degree, and number of generating units in operation.

[0008] Optionally, in one embodiment of this application, the step of employing a random forest algorithm, training a classifier using the training set, and constructing the power system oscillation stability domain based on the classifier includes: obtaining multiple sets of samples by resampling based on the training set; for each set of samples, training multiple decision tree models using a decision tree algorithm; voting on the output results of each decision tree model, and taking the output result with the highest percentage as the final output result, wherein the trained multiple decision tree models constitute the random forest classifier; and obtaining stable and unstable points in the injection space by selecting points at equal intervals, so that the region between the stable and unstable points constitutes the boundary of the stability domain, and the region formed by the stable points is the power system oscillation stability domain.

[0009] Optionally, in one embodiment of this application, the step of calculating the accuracy of the classifier on the test set until a preset valid condition is met to obtain the final power system oscillation stability domain includes: substituting each group of data in the test set into the trained classifier, calculating the accuracy, and if the accuracy reaches a preset threshold, determining that the power system oscillation stability domain is valid.

[0010] A second aspect of this application provides a device for constructing a power system oscillation stability domain based on random forest, comprising: a selection module for selecting variables for the power system oscillation stability domain; a first acquisition module for taking points within the space formed by the variables to acquire a dataset for power system oscillation analysis, and dividing the dataset into a training set and a test set; a construction module for training a classifier using the training set with a random forest algorithm, and constructing the power system oscillation stability domain based on the classifier; and a second acquisition module for calculating the accuracy of the classifier on the test set until a preset effective condition is met, thereby obtaining the final power system oscillation stability domain.

[0011] Optionally, in one embodiment of this application, the variables of the power system oscillation stability domain include key variables of power system operation and variables that affect power system oscillation. The key variables of power system operation include active and reactive power output from power plants and generator terminal voltages. The variables that affect power system oscillation include line length, series compensation degree, and number of generating units in operation.

[0012] Optionally, in one embodiment of this application, the construction module includes: a first acquisition unit, used to obtain multiple sets of samples based on the training set by resampling; a second acquisition unit, used to train multiple decision tree models for each set of samples using a decision tree algorithm; a control unit, used to vote on the output results of each decision tree model and take the output result with the highest percentage as the final output result, wherein the trained multiple decision tree models constitute a random forest classifier; and a third acquisition unit, used to select points at equal intervals to obtain each stable point and unstable point in the injection space, so that the region between the stable points and the unstable points constitutes the boundary of the stable region, and the region formed by the stable points is the power system oscillation stable region.

[0013] Optionally, in one embodiment of this application, the second acquisition module includes: a determination unit, used to substitute each group of data in the test set into the trained classifier, calculate the accuracy, and if the accuracy reaches a preset threshold, determine that the power system oscillation stability domain is valid.

[0014] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for constructing a power system oscillation stability domain based on random forest as described in the above embodiments.

[0015] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for constructing a power system oscillation stability domain based on random forest.

[0016] This application embodiment can select variables for the power system oscillation stability region. Based on the oscillation stability analysis method, the power system oscillation stability region is defined. Based on the acquired power system oscillation analysis dataset and the random forest algorithm, the power system oscillation stability region is constructed, ensuring wide applicability, low computational load, simple operation, improved computational efficiency, and high accuracy. Therefore, it solves the problems of the point-by-point calculation method for constructing the power system oscillation stability region, where the computational load is large and the number of solution points increases exponentially with the number of variables, and the boundary search method for constructing the oscillation stability region, where boundary search is difficult, computational efficiency is low, operation is complex, applicability is narrow, and accuracy is low when the number of influencing variables increases.

[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0019] Figure 1 This is a flowchart illustrating a method for constructing the oscillation stability region of a power system based on random forest, according to an embodiment of this application.

[0020] Figure 2 This is a flowchart of the random forest algorithm for constructing the oscillation stability region of a power system according to an embodiment of this application;

[0021] Figure 3 This is a flowchart of a method for constructing a power system oscillation stability region based on random forest according to an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of a power system oscillation stability domain construction device based on random forest, according to an embodiment of this application.

[0023] Figure 5 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0024] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0025] The following describes a method and apparatus for constructing a power system oscillation stability domain based on random forest, according to embodiments of the present application, with reference to the accompanying drawings. Addressing the issues raised in the background section regarding point-by-point calculation methods for constructing power system oscillation stability domains, such as the large computational load and exponential growth in the number of solution points as the number of influencing variables increases, and the difficulty of boundary search methods for constructing oscillation stability domains with increasing influencing variables, resulting in low computational efficiency, complex operation, narrow applicability, and low accuracy, this application provides a method for constructing a power system oscillation stability domain based on random forest. In this method, variables for the power system oscillation stability domain can be selected, the power system oscillation stability domain is defined according to the oscillation stability analysis method, and the power system oscillation stability domain is constructed based on the acquired power system oscillation analysis dataset and the random forest algorithm. This method ensures wide applicability, low computational load, simple operation, improved computational efficiency, and high accuracy. This solves the problems in the method of constructing the oscillation stability domain of power system by point-by-point calculation, where the amount of calculation is large and the number of solution points increases exponentially with the increase of variables, and in the method of constructing the oscillation stability domain by searching the boundary, where the boundary search is difficult, the calculation efficiency is low, the operation is complicated, the applicability is narrow, and the accuracy is low when the number of influencing variables increases.

[0026] Specifically, Figure 1 This is a flowchart illustrating a method for constructing a power system oscillation stability domain based on random forest, as provided in an embodiment of this application.

[0027] like Figure 1 As shown, the method for constructing the oscillation stability domain of a power system based on random forest includes the following steps:

[0028] In step S101, the variables for the power system oscillation stability region are selected.

[0029] In actual implementation, this application embodiment selects variables for the power system oscillation stability domain to ensure oscillation stability analysis, providing a basis for subsequent dataset acquisition, and defining the power system oscillation stability domain in a more targeted manner, thereby improving computational efficiency.

[0030] Optionally, in one embodiment of this application, the variables in the power system oscillation stability domain include key variables of power system operation and variables that affect power system oscillation. The key variables of power system operation include active and reactive power output from power plants and generator terminal voltages, while the variables that affect power system oscillation include line length, series compensation degree, and number of generating units in operation.

[0031] As one possible implementation method, the embodiments of this application may select, but are not limited to, variables in the power system oscillation stability domain, such as key variables of power system operation and variables that have an impact on power system oscillation. Variables in a fixed stability domain may also be selected. Key variables of power system operation in the embodiments of this application include, but are not limited to, active and reactive power output from power plants and generator terminal voltages. Variables that have a certain impact on power system oscillations include, but are not limited to, line length, series compensation degree, and number of generating units in operation.

[0032] In this embodiment, x1, x2, ..., x can be selected from the variables that have a greater impact and greater change in this embodiment. n Used to define the stable region:

[0033]

[0034] Where R is the stability region, x is the system parameter, and Eigv(x) is the set of all eigenvalues ​​of the power system under system parameter x. When the real part of all eigenvalues ​​is less than 0, the system is stable, and the corresponding parameter x is within the stability region, S1~S n Let the variables be x1 to x2 respectively. n The range of values ​​for .

[0035] The embodiments of this application can determine the variables of the power system oscillation stability region, which facilitates the definition of the power system oscillation stability region.

[0036] In step S102, points are selected within the space formed by the variables to obtain a dataset for power system oscillation analysis, and the dataset is divided into a training set and a test set.

[0037] In some embodiments, points can be selected within the space formed by the variables of the power system oscillation stability domain to obtain a dataset for power system oscillation analysis. Each set of data in the dataset can be written as a mapping form of (x, y), where x is the system parameter in the variables of the selected power system oscillation stability domain, and y is the system oscillation stability under parameter x. In the embodiments of this application, the oscillation stability y can be transformed into a 0-1 variable, with 0 representing unstable and 1 representing stable. The oscillation stability can be determined by whether the real part of all system eigenvalues ​​in the variables of the selected power system oscillation stability domain is less than 0.

[0038] Randomly select points within the stable region injection space to obtain the system parameters x1 to x for each set of data. m .

[0039] R = {x = (x1, x2, ..., x...} n |x1∈S1,...,x n ∈S n}

[0040] For each set of system parameters xi The oscillation stability y of the system under this set of parameters is analyzed using either the eigenvalue method or the impedance method. i This yields a dataset for power system oscillation analysis. In this embodiment, the dataset can be divided into a training set and a test set at a certain ratio (e.g., 3:1). The training set is used to train the classification model, while the test set is used to test the accuracy of the obtained classification model.

[0041] This application embodiment can take points within the space formed by variables to obtain a dataset for power system oscillation analysis, and divide the dataset into a training set and a test set, thereby avoiding the problem of extremely large computational load when the number of input variables increases, as in traditional point-by-point calculation methods and oscillation stability domain boundary search methods, and reducing the computational load.

[0042] In step S103, the random forest algorithm is used to train a classifier using the training set, and the oscillation stability domain of the power system is constructed based on the classifier.

[0043] In actual implementation, the embodiments of this application can use the random forest algorithm to obtain a classifier based on the dataset, ensuring that the oscillation stability of the corresponding system can be obtained by inputting the values ​​of certain variables. The classifier is trained using the training set, and the oscillation stability domain of the power system is constructed based on the classifier. Therefore, it is applicable to the construction of various continuous oscillation stability domains, with a wide range of applications. Moreover, the random forest algorithm can be directly called, making the operation simple.

[0044] Optionally, in one embodiment of this application, a random forest algorithm is used to train a classifier using a training set, and a power system oscillation stability domain is constructed based on the classifier. This includes: obtaining multiple sets of samples by resampling based on the training set; for each set of samples, training multiple decision tree models using a decision tree algorithm; voting on the output results of each decision tree model, and taking the output result with the highest percentage as the final output result, wherein the trained multiple decision tree models constitute a random forest classifier; and obtaining stable and unstable points in the injection space by selecting points at equal intervals, so that the region between the stable and unstable points constitutes the boundary of the stability domain, and the region formed by the stable points is the power system oscillation stability domain.

[0045] In some embodiments of this application, firstly, the training set is resampled to obtain multiple sets of samples, such as sample 1, sample 2, ..., sample n; then, for each set of samples, a decision tree model is trained using a decision tree algorithm, such as decision tree 1, decision tree 2, ..., decision tree n; finally, the output results of each decision tree model are voted on, and the final result is determined by the vote, with the output result having the highest percentage being taken as the final output result. The trained multiple decision tree models constitute a random forest classifier. In this embodiment, points are selected at equal intervals to obtain stable and unstable points within the injection space. The regions where stable and unstable points are checked constitute the boundary of the stability region, and the region formed by the stable points is the power system oscillation stability region. By directly calling the random forest algorithm, the simplicity of the operation is ensured.

[0046] Optionally, in one embodiment of this application, the accuracy of the classifier is calculated on the test set until a preset valid condition is met to obtain the final power system oscillation stability domain. This includes: substituting each set of data in the test set into the trained classifier, calculating the accuracy, and if the accuracy reaches a preset threshold, determining that the power system oscillation stability domain is valid.

[0047] In actual implementation, the embodiments of this application can substitute each group of data in the test set into the trained classifier, calculate the accuracy, and when the accuracy reaches a certain threshold, such as an accuracy of 95% or more, determine that the power system oscillation stability domain is effective, thereby verifying the effectiveness of the constructed stability domain on the validation set and ensuring the high accuracy of the method.

[0048] It should be noted that the preset threshold can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.

[0049] In step S104, the accuracy of the classifier is calculated on the test set until the preset effective condition is met, and the final power system oscillation stability domain is obtained.

[0050] In other embodiments, the data from each group in the test set can be substituted into the trained classifier to calculate the accuracy until a certain effective condition is met. For example, when the accuracy reaches 95% or more, it indicates that the accuracy is high. At this point, the obtained stability region is considered to be effective, and the final power system oscillation stability region can be obtained.

[0051] The embodiments of this application can obtain the final power system oscillation stability domain by calculating the accuracy of the classifier on the test set. By verifying it on the test set, high accuracy is guaranteed and computational efficiency is improved.

[0052] Specifically, it can be combined with Figure 2 and Figure 3As shown, the working principle of the power system oscillation stability domain construction method based on random forest in this application is explained in detail with a specific embodiment.

[0053] like Figure 2 As shown in the figure, the embodiment of this application is a flowchart of the random forest algorithm. First, the training set is resampled to obtain multiple sets of samples, such as sample 1, sample 2, ... sample n; then, for each set of samples, a decision tree model is trained by the decision tree algorithm, such as decision tree 1, decision tree 2, ... decision tree n; finally, the output results of each decision tree model are voted on, and the one with the highest percentage of each output result is the final output result.

[0054] Next, as Figure 3 As shown, embodiments of this application may include the following steps:

[0055] Step S301: Select variables for the power system oscillation stability region. In this embodiment, variables for the power system oscillation stability region can be selected, including key variables for power system operation and variables that influence power system oscillations.

[0056] Step S302: Obtain the dataset for power system oscillation analysis. In this embodiment, a large number of points can be taken within the space formed by the variables to obtain the dataset for power system oscillation analysis, and then divided into a training set and a test set.

[0057] Step S303: Construct the oscillation stability region using the random forest algorithm. In this embodiment, the random forest algorithm can be used to construct the oscillation stability region of the power system by training a classifier based on the training set.

[0058] Step S304: Verify the effectiveness of the constructed stability region on the test set. In this embodiment, the accuracy of the classifier can be calculated on the test set to verify the effectiveness of the constructed stability region.

[0059] The method for constructing the power system oscillation stability region based on random forest proposed in this application allows for the selection of variables for the power system oscillation stability region. Based on the oscillation stability analysis method, the power system oscillation stability region is defined. Using the acquired power system oscillation analysis dataset and the random forest algorithm, the power system oscillation stability region is constructed, ensuring wide applicability, low computational complexity, simple operation, improved computational efficiency, and high accuracy. This solves the problems of the point-by-point calculation method for constructing the power system oscillation stability region, where the computational complexity increases exponentially with the number of variables, and the boundary search method for constructing the oscillation stability region suffers from difficulties, low computational efficiency, complex operation, narrow applicability, and low accuracy when the number of influencing variables increases.

[0060] Next, referring to the accompanying drawings, a device for constructing a power system oscillation stability domain based on random forest, according to an embodiment of this application, is described.

[0061] Figure 4 This is a schematic diagram of the structure of the power system oscillation stability domain construction device based on random forest according to an embodiment of this application.

[0062] like Figure 4 As shown, the random forest-based power system oscillation stability domain construction device 10 includes: a selection module 100, a first acquisition module 200, a construction module 300, and a second acquisition module 400.

[0063] Specifically, module 100 is used to select variables for the power system oscillation stability domain.

[0064] The first acquisition module 200 is used to select points in the space formed by the variables, acquire a dataset for power system oscillation analysis, and divide the dataset into a training set and a test set.

[0065] Module 300 is used to train a classifier using the training set and construct the oscillation stability domain of the power system based on the random forest algorithm.

[0066] The second acquisition module 400 is used to calculate the accuracy of the classifier on the test set until a preset effective condition is met, and then obtain the final power system oscillation stability domain.

[0067] Optionally, in one embodiment of this application, the variables in the power system oscillation stability domain include key variables of power system operation and variables that affect power system oscillation. The key variables of power system operation include active and reactive power output from power plants and generator terminal voltages, while the variables that affect power system oscillation include line length, series compensation degree, and number of generating units in operation.

[0068] Optionally, in one embodiment of this application, the construction module 300 includes: a first acquisition unit, a second acquisition unit, a control unit, and a third acquisition unit.

[0069] The first acquisition unit is used to obtain multiple sets of samples based on the training set by resampling.

[0070] The second acquisition unit is used to train multiple decision tree models for each group of samples using a decision tree algorithm.

[0071] The control unit is used to vote on the output of each decision tree model and select the output with the highest percentage as the final output. The trained decision tree models together constitute the random forest classifier.

[0072] The third acquisition unit is used to obtain each stable point and unstable point in the injection space by selecting points at equal intervals. The region between the stable points and unstable points constitutes the boundary of the stable domain, and the region formed by the stable points is the power system oscillation stable domain.

[0073] Optionally, in one embodiment of this application, the second acquisition module includes a determination unit.

[0074] The determination unit is used to substitute each group of data in the test set into the trained classifier, calculate the accuracy, and if the accuracy reaches a preset threshold, the power system oscillation stability domain is determined to be valid.

[0075] It should be noted that the foregoing explanation of the embodiment of the power system oscillation stability domain construction method based on random forest also applies to the power system oscillation stability domain construction device based on random forest in this embodiment, and will not be repeated here.

[0076] According to the random forest-based power system oscillation stability domain construction device proposed in this application, the device allows selection of variables for the power system oscillation stability domain. Based on the oscillation stability analysis method, the power system oscillation stability domain is defined. Based on the acquired power system oscillation analysis dataset and the random forest algorithm, the power system oscillation stability domain is constructed, ensuring wide applicability, low computational complexity, simple operation, improved computational efficiency, and high accuracy. This solves the problems of large computational load and exponential growth in the number of solution points as the number of influencing variables increases in the point-by-point calculation method for constructing the power system oscillation stability domain, as well as the difficulties in boundary search, low computational efficiency, complex operation, narrow applicability, and low accuracy in the boundary search method for constructing the oscillation stability domain as the number of influencing variables increases.

[0077] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0078] The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.

[0079] When processor 502 executes the program, it implements the method for constructing the power system oscillation stability domain based on random forest provided in the above embodiments.

[0080] Furthermore, electronic devices also include:

[0081] Communication interface 503 is used for communication between memory 501 and processor 502.

[0082] The memory 501 is used to store computer programs that can run on the processor 502.

[0083] The memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0084] If the memory 501, processor 502, and communication interface 503 are implemented independently, then the communication interface 503, memory 501, and processor 502 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0085] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.

[0086] Processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0087] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for constructing a power system oscillation stability domain based on random forest.

[0088] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0089] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0090] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0091] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0092] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0093] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0094] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0095] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for constructing the oscillation stability region of a power system based on random forest, characterized in that, Includes the following steps: Select the variables for the oscillation stability region of the power system; Points are taken within the space formed by the variables to obtain a dataset for power system oscillation analysis. The dataset is then divided into a training set and a test set. For each set of system parameters, the oscillation stability of the system under that set of parameters is analyzed using the eigenvalue method or the impedance method, thus obtaining the dataset for power system oscillation analysis. The random forest algorithm is used to train a classifier using the training set, and the oscillation stability region of the power system is constructed based on the classifier. The accuracy of the classifier is calculated on the test set until a preset effective condition is met, thus obtaining the final power system oscillation stability domain. The method employs a random forest algorithm, trains a classifier using the training set, and constructs the oscillation stability region of the power system based on the classifier, including: Multiple sets of samples were obtained by resampling based on the training set; For each set of samples, multiple decision tree models are trained using the decision tree algorithm; The output of each decision tree model is voted on, and the output with the highest percentage is taken as the final output. The trained decision tree models constitute a random forest classifier. By selecting points at equal intervals, stable and unstable points within the injection space are obtained. The region between the stable and unstable points forms the boundary of the stable domain, and the region formed by the stable points is the oscillation stable domain of the power system. The variables in the power system oscillation stability domain include key variables of power system operation and variables that affect power system oscillation. The key variables of power system operation include active and reactive power output from power plants and generator terminal voltage. The variables that affect power system oscillation include line length, series compensation degree, and number of generating units in operation.

2. The method according to claim 1, characterized in that, The process of calculating the accuracy of the classifier on the test set until a preset effective condition is met, to obtain the final power system oscillation stability domain, includes: Substitute each set of data from the test set into the trained classifier and calculate the accuracy. If the accuracy reaches a preset threshold, the power system oscillation stability domain is determined to be valid.

3. A device for constructing a stable oscillation domain for a power system based on random forest, characterized in that, include: The selection module is used to select variables for the oscillation stability region of the power system; The first acquisition module is used to take points in the space formed by the variables, acquire a dataset for power system oscillation analysis, and divide the dataset into a training set and a test set. For each set of system parameters, the oscillation stability of the system under that set of parameters is analyzed by using the eigenvalue method or the impedance method, and the dataset for power system oscillation analysis can be obtained. A construction module is used to train a classifier using the training set with the random forest algorithm, and to construct the oscillation stability domain of the power system based on the classifier; The second acquisition module is used to calculate the accuracy of the classifier on the test set until a preset effective condition is met, and to obtain the final power system oscillation stability domain. The building module includes: The first acquisition unit is used to obtain multiple sets of samples based on the training set by resampling. The second acquisition unit is used to train multiple decision tree models for each group of samples using a decision tree algorithm. The control unit is used to vote on the output of each decision tree model and take the output with the highest percentage as the final output. The multiple trained decision tree models constitute the random forest classifier. The third acquisition unit is used to obtain each stable point and unstable point in the injection space by selecting points at equal intervals, so that the region between the stable points and unstable points constitutes the boundary of the stable domain, and the region formed by the stable points is the oscillation stable domain of the power system. The variables in the power system oscillation stability domain include key variables of power system operation and variables that affect power system oscillation. The key variables of power system operation include active and reactive power output from power plants and generator terminal voltage. The variables that affect power system oscillation include line length, series compensation degree, and number of generating units in operation.

4. The apparatus according to claim 3, characterized in that, The second acquisition module includes: The determination unit is used to substitute each group of data in the test set into the trained classifier, calculate the accuracy, and if the accuracy reaches a preset threshold, determine that the power system oscillation stability domain is valid.

5. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the method for constructing the oscillation stability domain of a power system based on random forest as described in any one of claims 1-2.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method for constructing the oscillation stability domain of a power system based on random forest as described in any one of claims 1-2.