Stability comprehensive evaluation method and system for source-grid-load-storage integrated power grid

By analyzing the correlation between the equipment combination and the evaluation dimension combination of the integrated power grid (source-grid-load-storage) using the random forest model, the problem of the inability to identify weak links in stability in traditional evaluation methods is solved, and the grid can be accurately optimized and efficiently managed.

CN121481328APending Publication Date: 2026-02-06XINYANG POWER SUPPLY OF HENAN ELECTRIC POWER CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511620642.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Traditional power grid stability assessment methods cannot reveal the dynamic correlation between different equipment combinations within an integrated power grid and specific stability issues, making it difficult to provide accurate basis for optimization and coordinated control decisions.

Method used

By employing a random forest model, the correlation between equipment combinations and evaluation dimension combinations is determined by analyzing the differences in decision feature distributions among decision trees. Furthermore, the accuracy and robustness of predictions are improved through two-stage training of the random forest model.

Benefits of technology

It enables precise stability tracing of the integrated power grid (source, grid, load, and storage), identifies the equipment groups that cause stability risks, provides targeted optimization targets, and enhances the power grid's efficient monitoring and management capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121481328A_ABST
    Figure CN121481328A_ABST
Patent Text Reader

Abstract

The invention relates to the field of power grid supervision and management, in particular to a comprehensive stability evaluation method and system for a source-grid-load-storage integrated power grid, and the method comprises the steps: randomly selecting a plurality of pieces of equipment and a plurality of evaluation dimensions to form a sample and a label, training a random forest, recording the distribution difference of decision features of all decision trees in the random forest as A, when the distribution difference A is smaller than a first preset threshold value, it is judged that the selected equipment combination is associated with the selected evaluation dimension combination; retraining the random forest by using a sample formed by the associated equipment combination and the evaluation dimension combination, so that the distribution difference of decision features included among all decision trees in the random forest is greater than the distribution difference A; the retrained random forest is used for predicting the comprehensive stability of the power grid. According to the method, a valuable stability comprehensive evaluation result is provided for accurate optimization of the power grid through a big data technology, and efficient supervision and management of the source-grid-load-storage integrated power grid are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power grid supervision and management, and in particular to a stability comprehensive evaluation method and system for a source-grid-load-storage integrated power grid. BACKGROUND

[0002] With the rapid development of the "source-grid-load-storage" integrated power grid, the structure and operation mode of the power grid are becoming increasingly complex. This integrated power grid integrates distributed power sources (source), power transmission networks (grid), flexible loads (load), and energy storage systems (storage), which has improved energy utilization efficiency and system flexibility, but has also posed unprecedented challenges to the stability analysis of the power grid and the supervision, management, and optimization of the power grid.

[0003] Traditional power grid stability evaluation methods usually use big data to evaluate multiple indicators, use a fixed weight weighting method to simply stack the indicators of each evaluation dimension (such as load overload, harmonic interference, etc.), and obtain a comprehensive score. According to the comprehensive score, the "source-grid-load-storage" integrated power grid is supervised and managed. However, this method has obvious limitations: first, it cannot reveal the internal and dynamic relationship between different equipment combinations and specific stability problems within the "source-grid-load-storage". Second, the stability of the integrated power grid is the result of the mutual coupling and joint action of multiple links. The occurrence of a stability problem is often strongly related to the operation state of a few specific equipment groups, rather than all equipment. The traditional comprehensive evaluation result is like a "black box" that cannot indicate which equipment groups the weak stability link is specifically derived from, and thus it is difficult to provide valuable management decision basis for the precise optimization and collaborative control of the power grid. SUMMARY

[0004] To solve the above problems, the present application provides a stability comprehensive evaluation method and system for a source-grid-load-storage integrated power grid.

[0005] The stability comprehensive evaluation method and system for a source-grid-load-storage integrated power grid of the present application adopts the following technical solutions: One embodiment of the present application provides a stability comprehensive evaluation method for a source-grid-load-storage integrated power grid, which comprises the following steps: Collecting the operation data of each device in the power grid in each time period, and evaluating the instability of the power grid in each time period from several evaluation dimensions, respectively; Randomly selecting several devices and several evaluation dimensions, using the operation data of the selected devices in each time period as samples, and using the instability evaluated in the next time period of each time period of the selected evaluation dimensions as the label of the samples; The random forest is trained using samples and labels obtained from all time periods. The random forest consists of several decision trees, and each decision node in each decision tree describes each feature contained in the sample, which is denoted as the decision feature. The distribution difference of decision features among all decision trees in the trained random forest is denoted as A. When the distribution difference A is less than the first preset threshold, it is determined that the selected combination of devices is related to the selected combination of evaluation dimensions. The random forest is retrained using samples composed of associated device combinations and evaluation dimension combinations. When retraining the random forest, the distribution difference of decision features contained in all decision trees in the random forest is greater than the distribution difference A. The retrained random forest is used to predict the overall stability of the power grid from the combination of associated device combinations and evaluation dimensions.

[0006] Preferably, the distribution difference of decision features among all decision trees in the trained random forest is denoted as A, and the specific steps include the following: All decision features contained in any decision tree constitute a feature set; when the intersection-union ratio between the feature sets of any two decision trees is greater than the threshold th1, the two decision trees are marked as a pair of target decision trees; th1 is a preset value; Encode all decision features in the decision tree into a set of vectors, calculate the minimum difference between the two vector sets obtained in any pair of target decision trees, and denote it as the first difference; the mean of the first differences of all target decision trees is denoted as the distribution difference A.

[0007] Preferably, the step of retraining the random forest using samples composed of associated device combinations and evaluation dimension combinations, wherein the distribution difference of decision features contained in all decision trees in the random forest is greater than the distribution difference A, includes the following specific steps: All samples and labels formed by each group of associated device combinations and evaluation dimension combinations are used as a dataset. The random forest is retrained using this dataset. During the retraining of the random forest, after each decision tree is generated, it is designated as the target decision tree, and each decision tree generated before the target decision tree is designated as a reference decision tree. For the first difference between the vector sets corresponding to the target decision tree and the reference decision tree, if the mean of the first difference between the target decision tree and all reference decision trees is greater than the distribution difference A, the target decision tree is retained; otherwise, the target decision tree is not retained.

[0008] Preferably, the retrained random forest is used to predict the overall stability of the power grid from the combination of associated device combinations and evaluation dimensions, and includes the following specific steps: Each evaluation dimension is assigned a weight. For any set of related equipment combinations and evaluation dimension combinations, during the real-time operation of the power grid, after each time period, the operating data of all equipment in the equipment combination in the most recent time period is obtained. This operating data is then input into the retrained random forest, and the instability of the power grid in each evaluation dimension of the evaluation dimension combination in the next time period is output, which is simply referred to as the predicted instability. The weights of all evaluation dimensions in the evaluation dimension combination are normalized to obtain the first weight of each evaluation dimension. The predicted stability of all evaluation dimensions in the evaluation dimension combination is weighted and summed using the first weights of all evaluation dimensions in the evaluation dimension combination to obtain the comprehensive stability corresponding to any set of related equipment combinations and evaluation dimension combinations; the predicted stability is negatively correlated with the predicted instability.

[0009] Preferably, the specific steps for encoding all decision features in the decision tree into a vector set are as follows: In any decision tree, for any path from the root node to each leaf node, the decision features of all decision nodes along that path constitute a decision sequence; all paths from the root node to all leaf nodes correspond to several decision sequences; each decision sequence is encoded into a vector using the word2Vec algorithm; the vectors corresponding to all decision sequences constitute the vector set of any decision tree.

[0010] Preferably, the specific steps for calculating the minimum difference between the two vector sets obtained from any pair of target decision trees, denoted as the first difference, are as follows: For any two vector sets obtained from a pair of target decision trees, the vectors in the two vector sets are matched using the KM algorithm, so that the matched pairs of vectors have the maximum cosine similarity. Calculate the mean of the cosine similarity of the vectors of all matching pairs, where the first difference is negatively correlated with the mean.

[0011] Preferably, the specific steps for evaluating the instability of the power grid in each time period from several evaluation dimensions are as follows: The aforementioned assessment dimensions include: load overload, three-phase imbalance, harmonic interference, and power grid equipment failure; The instability under the evaluation dimension corresponding to overload is obtained by the ratio of the average active power to the rated power in each time period; the instability under the evaluation dimension corresponding to three-phase imbalance refers to the average of the three-phase imbalance at several sampling points in the power grid; the instability under the evaluation dimension corresponding to harmonic interference is obtained by the ratio of the average harmonic current to the average fundamental current; the instability under the evaluation dimension corresponding to power grid equipment failure is obtained by the ratio of the number of equipment failures to the number of equipment.

[0012] Preferably, the steps after obtaining the overall stability are as follows: For the overall stability obtained by the device combination and evaluation dimension combination associated with all groups, each device in the device combination with an overall stability less than the preset warning threshold is marked as an abnormal device; after a preset time, the number of times each device is marked as an abnormal device is counted; the devices marked as abnormal devices the most times are given a warning.

[0013] Preferably, the specific steps for obtaining the operating data of each device are as follows: The operational data includes: the power output per second of each power generation device in each time period, the discharge power and charging power per second of each energy storage device in each time period, the power output per second of the low-voltage side of each substation in each time period, and the power output per second of each distribution cabinet in each time period. All operational data acquired by the same device in the same time period across all days are dimensionality-reduced using the PCA algorithm.

[0014] Another embodiment of the present invention provides a comprehensive stability evaluation system for an integrated power grid of source, grid, load and storage. The system includes a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor runs the computer program, it implements all the steps of the above-described comprehensive stability evaluation method for an integrated power grid of source, grid, load and storage.

[0015] The beneficial effects of the technical solution of the present invention are: This invention departs from a general overall assessment of the power grid. Instead, it trains a random forest model by randomly selecting equipment combinations and evaluation dimensions. By analyzing the distributional differences (distribution difference A) of decision features among the decision trees in the model, it scientifically determines which equipment groups have strong correlations with which stability issues. A small distribution difference A indicates a correlation between the equipment combination and the evaluation dimension combination. This provides "precise source tracing" for power grid stability problems, clearly identifying "which equipment" coordination issues lead to "which type of stability" risk. This offers invaluable and specific optimization targets for targeted optimization of the coordination between "source-grid-load-storage."

[0016] By training the random forest in two stages, this invention balances the reliability of association determination with the accuracy of the prediction model. Specifically, the first stage of training aims to determine association, where a small distributional difference A is a signal of strong association. Once association is confirmed, the second stage of retraining begins, but this time the goal is to actively increase the distributional differences between decision trees. This forces the model to learn from the data from more perspectives and using more diverse decision paths, fully exploring the deep features within the association combinations, thereby significantly improving the accuracy and robustness of the final random forest model used for prediction and ensuring the reliability of the overall stability prediction results.

[0017] In summary, by extracting and exploring the synergistic relationships among source-grid-load-storage related equipment, valuable comprehensive stability evaluation results can be provided for the precise optimization of the power grid, facilitating the efficient supervision and management of the integrated source-grid-load-storage power grid. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the steps of a comprehensive stability evaluation method for an integrated power grid (source-grid-load-storage) provided in an embodiment of the present invention. Detailed Implementation

[0020] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the stability comprehensive evaluation method and system for integrated power grids based on the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0022] The following description, in conjunction with the accompanying drawings, details the specific scheme of the comprehensive stability evaluation method and system for integrated power grids of source, grid, load, and storage provided by this invention.

[0023] Please see Figure 1The diagram illustrates a flowchart of a method for comprehensive stability evaluation of an integrated power grid (source-grid-load-storage) according to an embodiment of the present invention. The method includes the following steps: Step S101: Collect the operating data of each device in the power grid within each time period.

[0024] The integrated power grid encompasses multiple electrical devices, such as power generation equipment, energy storage equipment, substations, and load equipment. This embodiment treats each hour of the day as a time period, collecting operational data for each device within each time period during grid operation. This includes: the total power output per second for each power generation device (e.g., thermal power, photovoltaic power, wind power, etc.) within each time period; the discharge and charging power per second for each energy storage device (e.g., battery storage, flywheel storage, hydropower storage, etc.) within each time period (discharge or charging power is 0 when not in a discharging or charging state); and the power output per second on the low-voltage side of each substation within each time period. It should also be noted that due to the large number of load devices in the grid, it is impossible to collect the load data for each individual device. Therefore, for distribution cabinets that directly supply power to each power supply area, this embodiment uses the power output per second of each distribution cabinet within each time period as the load data (i.e., operational data) for the load equipment.

[0025] In other embodiments, operational data can be collected based on the specific power grid or power grid equipment; however, this embodiment will not provide specific examples.

[0026] During the historical operation of the power grid, operational data for each device was obtained at all time periods.

[0027] Furthermore, to reduce the amount of data and facilitate subsequent calculations, this embodiment reduces the dimensionality of the running data, reducing each running data point to N1 dimensions. This embodiment uses N1=10 as an example for description. Specifically: For all operational data acquired by the same device in the same time period across all days, all values ​​in each operational data constitute (or are concatenated into) a vector. The PCA algorithm is used to obtain all principal component directions of the vectors corresponding to all operational data. Each principal component direction is essentially a unit vector used to describe a distribution characteristic of the operational data, and each principal component direction corresponds to an eigenvalue used to describe the projection variance of the operational data. In this embodiment, only the N1 principal component directions with the largest eigenvalues ​​are retained. The projection of the vector corresponding to each operational data onto the N1 principal component directions is the dimensionality reduction result of each operational data.

[0028] It should be noted that the above dimensionality reduction results are based on the operational data collected during the historical operation of the power grid. When the same device collects new operational data in the same time period in subsequent days, the dimensionality reduction result of the new operational data is also the projection of the operational data onto the above N1 principal component directions.

[0029] PCA is a well-known technology, and this embodiment will not further describe the above principles.

[0030] For ease of explanation, the running data mentioned later in this embodiment refers to the dimensionality reduction results described above.

[0031] Step S102: Evaluate the instability of the power grid in each time period from several evaluation dimensions.

[0032] The aforementioned assessment dimensions include: load overload, three-phase imbalance, harmonic interference, and power grid equipment failure.

[0033] In the historical operation of the power grid, this embodiment evaluates the instability of the power grid from all evaluation dimensions.

[0034] As an example, the method for obtaining instability under the evaluation dimension of overload is as follows: Some overload sampling points are artificially set in the power grid. The average active power is obtained at each overload sampling point for each time period. The ratio of the average active power to the rated power at the overload sampling point is calculated. The average of the ratios obtained from all overload sampling points in the same time period is taken as the instability.

[0035] As an example, the method for obtaining instability under the three-phase imbalance assessment dimension is as follows: In the power grid, some three-phase imbalance sampling points are artificially set up. At each three-phase imbalance sampling point, the three-phase imbalance degree is obtained every second within each time period. The average value of all three-phase imbalance degrees obtained by all three-phase imbalance sampling points within the same time period is taken as the instability. The calculation method of three-phase imbalance degree is a well-known technology, and will not be described in detail in this embodiment.

[0036] As an example, the method for obtaining instability under the evaluation dimension of harmonic interference is as follows: Harmonic interference sampling points are artificially set up in the power grid. Harmonic currents are acquired at each sampling point for each time period. The ratio of the mean harmonic current to the mean fundamental current is calculated. The mean of these ratios from all harmonic interference sampling points within the same time period is taken as the instability. This embodiment uses instantaneous reactive power technology to acquire both harmonic and fundamental currents.

[0037] As an example, the method for obtaining instability under the assessment dimension of power grid equipment failure is as follows: In the entire power grid, all important power equipment is manually marked, and the number of times all important power equipment fails in each time period is obtained. The ratio of this number to the number of important power equipment is denoted as the instability.

[0038] In other embodiments, more evaluation dimensions can be set, such as power factor, voltage fluctuation and other evaluation dimensions, to evaluate the instability of the power grid. This embodiment will not give examples of each of them.

[0039] Step S103: Randomly select several devices and several evaluation dimensions. Use the operating data of the selected devices in each time period as samples, and use the instability evaluated by the selected evaluation dimensions in the next time period as the label of the sample. Train a random forest using samples and labels obtained from all time periods.

[0040] When conducting a comprehensive assessment of the stability or instability of a power grid, the conventional approach is to assign weights to each assessment dimension and then sum the results of all dimensions to obtain a comprehensive assessment of the grid's stability or instability. However, this approach can only assess the overall state of the power grid based on historical data. A crucial aspect of an integrated power grid (source-grid-load-storage) system is coordinating and optimizing the relationships between these elements based on the comprehensive stability assessment results, thereby ensuring the grid's continued stability. The comprehensive stability assessment results obtained through conventional methods cannot reflect these relationships, nor can they be used for optimization.

[0041] The difference between this embodiment and conventional practices lies in that it analyzes the relationship between the operation of relevant equipment in the power generation, grid, load and storage system and the power grid stability under different evaluation dimensions to deeply explore and extract the coordination relationship between the power generation, grid, load and storage system, thereby providing valuable comprehensive stability evaluation results for power grid optimization.

[0042] Specifically, in this embodiment, several devices and several evaluation dimensions are randomly selected. The operating data of the selected devices in each time period are used as samples, and the instability evaluated by the selected evaluation dimensions in the next time period is used as the label of the sample.

[0043] In other embodiments, the instabilities obtained in each time period under the selected evaluation dimension can be appended to the corresponding operational data, and then the appended operational data can be used as a sample.

[0044] In this embodiment, the number of selected devices does not exceed 70% of the total number of devices, and the number of selected evaluation dimensions does not exceed 60% of the total number of evaluation dimensions. However, the number of selected devices and the number of evaluation dimensions are not limited based on these conditions.

[0045] For the selected devices and evaluation dimensions, the samples and labels obtained over all time periods are compiled into a dataset. A random forest is trained using this dataset.

[0046] The input to this random forest is the data contained in the sample (i.e., the operating data of the selected devices in each time period), and the output is the instability of the next time period (specifically, the instability under the evaluation dimensions contained in the labels). The function of the random forest is to predict the instability of some evaluation dimensions in the next time period based on the operating data of some devices in previous time periods.

[0047] The basic principle of random forest is: (1) Randomly select some samples with replacement from the dataset to form a training subset. Then, randomly select a feature subset from all the features of the samples (that is, the distribution features represented by the N1 principal component directions in step S101), and then use the training subset and the feature subset to generate a decision tree (in this embodiment, a CART decision tree is used).

[0048] (2) Repeat the process in (1) to generate multiple decision trees. These multiple decision trees constitute the random forest model. The random forest model obtains the output result of the random forest model through the collective decision of multiple decision trees.

[0049] Since random forest is a well-known technology, further details of the above principles will not be elaborated in this embodiment.

[0050] It should also be noted that for each decision node in the generated decision tree, each decision node corresponds to a feature in the feature subset (that is, the distribution feature represented by one of the principal component directions in the N1 principal component directions mentioned in step S101), which is denoted as the decision feature in this embodiment.

[0051] Decision trees are also a well-known technology, and will not be described in detail in this embodiment.

[0052] Step S104: The distribution difference of decision features contained in all decision trees in the trained random forest is denoted as A. When the distribution difference A is less than the first preset threshold, it is determined that the selected device combination is related to the selected evaluation dimension combination.

[0053] For a trained random forest, the decision features contained in each decision tree exhibit a tree-like distribution. This distribution describes a feasible prediction method for a subset of samples in the dataset when predicting instability. The distribution difference A of the decision features contained in all decision trees describes the differences in the prediction methods used by different samples in the dataset when predicting instability.

[0054] A larger distribution difference A indicates that different samples use different prediction methods to predict instability. In other words, if one set of samples is used to predict instability, a significant change in the prediction method is needed when switching to another set of samples. This further suggests a weak correlation between the samples and labels in the dataset, making it impossible to use a unified and deterministic prediction method for instability prediction. Conversely, a smaller distribution difference A indicates that different samples use the same or similar prediction methods to predict instability. This further suggests a strong correlation between the samples and labels in the dataset, allowing for the use of a unified prediction method for instability prediction across any set of samples.

[0055] As an example, methods for obtaining distribution differences A include: For any decision tree, all decision features contained in the decision tree constitute a feature set. The intersection-union ratio (IUR) (the ratio of the number of elements in the intersection to the number of elements in the union) is calculated between the feature sets of any two decision trees. Any two decision trees with an IUR greater than a threshold th1 are labeled as a pair of target decision trees. This embodiment uses th1=0.5 as an example, and its preferred value range is (0, 0.7).

[0056] In any decision tree, for any path from the root node to each leaf node, the decision features of all decision nodes along that path constitute a decision sequence. All paths from the root node to all leaf nodes correspond to multiple decision sequences. This embodiment uses the word2Vec algorithm to encode each decision sequence into a vector; other embodiments may also use one-hot encoding to encode each decision sequence into a vector; the vectors corresponding to all decision sequences constitute the vector set of any decision tree.

[0057] For any two vector sets obtained from a pair of target decision trees, the vectors in these two vector sets are matched using the KM algorithm. The purpose of the KM algorithm is to match two vectors from two different vector sets into a pair, and to maximize the cosine similarity of the two vectors in each matching pair.

[0058] The KM matching algorithm is well-known and will not be described in detail in this embodiment.

[0059] Let x be the mean of the cosine similarity of the vectors of all matching pairs, and let exp(-x) be the first difference between any pair of target decision trees, representing the minimum difference between any pair of target decision trees. The larger x is, the greater the similarity between the target decision trees in the prediction process, that is, the smaller the first difference between the target decision trees; exp() represents the exponential function with the natural constant as the base.

[0060] The mean of the first differences for all target decision trees is denoted as the distribution difference A.

[0061] It should be noted that the vector set needs to be processed as follows before using the KM algorithm for matching: This embodiment takes into account that different vectors may have different dimensions; for any two decision trees that need to calculate the first difference, this embodiment obtains the maximum length of all decision sequences in all decision sequences of these two decision trees, denoted as L0; The tails of all decision sequences in both decision trees are padded so that the length of all decision sequences is equal to L0. Then, the word2Vec algorithm or one-hot encoding technique is used to encode all decision sequences into vectors, forming two vector sets for calculating the first difference. Any two vectors in these two sets have the same dimension.

[0062] The method for filling the tail of the decision sequence is as follows: since each decision sequence contains decision features (i.e., the unit vector corresponding to the principal component direction as described in step S101), it is filled with a zero vector with the same dimension as the decision features.

[0063] At this point, after randomly selecting several devices and several evaluation dimensions in steps S103 to S104, the distribution difference A among the decision trees in the trained random forest is obtained. Steps S103 to S104 are executed again; each time steps S103 to S104 are executed, several devices and several evaluation dimensions are selected, and the distribution difference A corresponding to the trained random forest is calculated. When the distribution difference A is less than a first preset threshold, it is determined that the devices selected in this execution are associated with the selected evaluation dimensions, that is, a set of associated device combinations and evaluation dimension combinations has been selected. After traversing all the combination methods of devices and evaluation dimensions, the repeated execution stops.

[0064] Thus, the device combinations and evaluation dimension combinations associated with all groups have been obtained. This embodiment is described using a first preset threshold of 0.4 as an example, and its preferred value range is [0.1, 1].

[0065] In other embodiments, the above process is optimized as follows: (1) The purpose of training the random forest in this embodiment is to obtain the associated combination of devices and evaluation dimensions, without focusing on the accuracy of the random forest training results. Based on this, other embodiments set the number of layers of each decision tree to be relatively small, and the number of decision trees contained in the random forest to be relatively large. For example, the number of layers of each decision tree is equal to 8, and the preferred value range is 6~10. The number of decision trees is set to 60, and the preferred value range is 40~80.

[0066] (2) To reduce computational load, in other embodiments, when performing step S103, the number of selected devices is set to 60% (rounded up) of the total number of devices, and the number of selected evaluation dimensions is set to 40% (rounded up) of the total number of evaluation dimensions. Additionally, the maximum number of times steps S103 to S104 are repeated is set to 100. Specifically, when the obtained associated device combinations and evaluation dimension combinations are less than two, the maximum number of repetitions increases by 50.

[0067] Step S105: Retrain the random forest using samples composed of associated device combinations and evaluation dimension combinations. When retraining the random forest, the distribution difference of decision features contained in all decision trees in the random forest is greater than the distribution difference A.

[0068] In the above process, for each group of related equipment combinations and evaluation dimension combinations, the equipment in the equipment combination from sources such as source, grid, load and storage cooperate with each other. The instability evaluation results of these equipment in the evaluation dimension combination can reliably reflect the cooperation situation.

[0069] Based on this, for each set of associated device combinations and evaluation dimension combinations, the random forest is retrained using these samples and labels. During retraining, the distributional differences of the decision features contained in all decision trees within the random forest are greater than the distributional difference A.

[0070] When retraining the random forest, the distribution difference of decision features among all decision trees in the random forest is greater than the distribution difference A. The purpose is that a smaller distribution difference among decision trees in the random forest trained in step S104 indicates that different samples use the same or similar prediction methods when predicting instability. This can be used to determine whether the device combination and evaluation dimension combination are related. However, the random forest trained in step S104 does not focus on its accuracy. In this step, when it is determined that the device combination and evaluation dimension combination are related, it is necessary to further ensure the accuracy of the trained random forest. At this point, if different samples use the same or similar prediction methods when predicting instability, the random forest cannot be fully trained from multiple perspectives and using multiple prediction methods, which is detrimental to improving the accuracy of the random forest. Therefore, when retraining a random forest based on the associated combination of devices and evaluation dimensions, making the distribution difference of decision features contained in all decision trees greater than the distribution difference A helps to mine sample features from multiple perspectives and using multiple prediction methods composed of multiple decision feature combinations, thereby increasing the accuracy of the random forest and avoiding the problem of inaccurate predictions caused by the small distribution difference (i.e., distribution difference A) between decision trees in the random forest trained in step S104.

[0071] As an example, a random forest is retrained using samples composed of associated devices and evaluation dimensions. During retraining, the distributional differences of decision features among all decision trees in the random forest are greater than the distributional difference A. The methods include: The samples and labels consisting of each group of associated devices and evaluation dimensions are re-constructed as a dataset. When retraining the random forest using this dataset, after each decision tree is generated, it is designated as the target decision tree, and each decision tree generated before the target decision tree is designated as a reference decision tree. The first difference between the vector sets corresponding to the target decision tree and the reference decision tree is obtained (see step S104 for details). If the mean of the first difference between the target decision tree and all reference decision trees is greater than the distribution difference A, the target decision tree is retained; otherwise, the target decision tree is not retained.

[0072] In special cases where there is no reference decision tree (i.e., when the target decision tree is the first generated decision tree), the target decision tree is directly retained.

[0073] In some embodiments, when retraining the random forest, the height of each decision tree is relatively large, and the number of decision trees in the random forest is relatively small. For example, the height of each decision tree is 12, preferably ranging from 10 to 15, and the number of decision trees is set to 20, preferably ranging from 10 to 30.

[0074] Step S106: The retrained random forest is used to predict the overall stability of the power grid from the combination of associated equipment combinations and evaluation dimensions.

[0075] For all evaluation dimensions, this embodiment pre-assigns a weight to each evaluation dimension; in one example, an expert rating method is used to assign a weight to each evaluation dimension; in another example, an analytic hierarchy process is used to assign a weight to each evaluation dimension; in this embodiment, the weight of each evaluation dimension is made the same, equal to one divided by the number of evaluation dimensions.

[0076] In the above steps, a random forest was retrained for any set of associated device combinations and evaluation dimension combinations.

[0077] For any set of related equipment combinations and evaluation dimension combinations, during the real-time operation of the power grid, after each time period, the operating data of all equipment in the equipment combination in the most recent time period is obtained, the operating data is input into the retrained random forest, and the instability of the power grid in each evaluation dimension of the evaluation dimension combination in the next time period is output, which is denoted as the predicted instability.

[0078] Let any prediction instability be represented as y, and its corresponding prediction stability be represented as exp(-y).

[0079] The weights of all evaluation dimensions in the evaluation dimension combination are normalized using the softmax formula to obtain the first weight of each evaluation dimension. The predicted stability of all evaluation dimensions in the evaluation dimension combination is weighted and summed using the first weights of all evaluation dimensions to obtain the comprehensive stability corresponding to any set of related equipment combinations and evaluation dimension combinations.

[0080] Thus, after each time period, all related equipment combinations and evaluation dimension combinations will have achieved a comprehensive stability.

[0081] In one embodiment, the combination of devices with the lowest overall stability is identified. The operating state of this combination of devices may significantly affect the stability of the power grid in the next time period. An early warning is issued to relevant personnel in the power grid monitoring system to focus on monitoring the operation of these devices and prevent potential stability incidents in the power grid.

[0082] In another embodiment, when the overall stability is less than the warning threshold (e.g., less than 0.4), all devices in the corresponding device combination are marked as abnormal devices. The number of times each device is marked as abnormal within the past month is counted, and a number of devices marked as abnormal most frequently (e.g., the top 20%) are given warnings or optimized. For example, replacing them with larger capacity, higher quality devices, or optimizing their connection locations, thereby optimizing the power grid's source-grid-load-storage layout. Specific optimization methods are not the focus of this embodiment and will not be elaborated upon here.

[0083] Other embodiments provide a comprehensive stability evaluation system for an integrated power grid of source, grid, load and storage. The system includes a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor runs the computer program, it implements all the steps of all the embodiments described above.

[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A comprehensive stability evaluation method for integrated power grids (source-grid-load-storage), characterized in that, The method includes the following steps: The system collects operational data for each device in the power grid during each time period and evaluates the instability of the power grid during each time period from several evaluation dimensions. Randomly select several devices and several evaluation dimensions, use the operating data of the selected devices in each time period as samples, and use the instability evaluated by the selected evaluation dimensions in the next time period as the label of the samples. The random forest is trained using samples and labels obtained from all time periods. The random forest consists of several decision trees, and each decision node in each decision tree describes each feature contained in the sample, which is denoted as the decision feature. The distribution difference of decision features among all decision trees in the trained random forest is denoted as A. When the distribution difference A is less than the first preset threshold, it is determined that the selected combination of devices is related to the selected combination of evaluation dimensions. The random forest is retrained using samples composed of associated device combinations and evaluation dimension combinations. When retraining the random forest, the distribution difference of decision features contained in all decision trees in the random forest is greater than the distribution difference A. The retrained random forest is used to predict the overall stability of the power grid from the combination of associated device combinations and evaluation dimensions.

2. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 1, characterized in that, The distributional differences in decision features among all decision trees in the trained random forest are denoted as A. The specific steps involved are as follows: All decision features contained in any decision tree constitute a feature set; when the intersection-union ratio between the feature sets of any two decision trees is greater than the threshold th1, the two decision trees are marked as a pair of target decision trees; th1 is a preset value; Encode all decision features in the decision tree into a set of vectors, calculate the minimum difference between the two vector sets obtained in any pair of target decision trees, and denote it as the first difference; the mean of the first differences of all target decision trees is denoted as the distribution difference A.

3. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 2, characterized in that, The process of retraining the random forest using samples composed of associated device combinations and evaluation dimension combinations, where the distribution difference of decision features among all decision trees in the random forest is greater than the distribution difference A, includes the following specific steps: All samples and labels formed by each group of associated device combinations and evaluation dimension combinations are used as a dataset. The random forest is retrained using this dataset. During the retraining of the random forest, after each decision tree is generated, it is designated as the target decision tree, and each decision tree generated before the target decision tree is designated as a reference decision tree. For the first difference between the vector sets corresponding to the target decision tree and the reference decision tree, if the mean of the first difference between the target decision tree and all reference decision trees is greater than the distribution difference A, the target decision tree is retained; otherwise, the target decision tree is not retained.

4. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 1, characterized in that, The retrained random forest is used to predict the overall stability of the power grid from the combination of associated device combinations and evaluation dimensions, and includes the following specific steps: Each evaluation dimension is assigned a weight. For any set of related equipment combinations and evaluation dimension combinations, during the real-time operation of the power grid, after each time period, the operating data of all equipment in the equipment combination in the most recent time period is obtained. This operating data is then input into the retrained random forest, and the instability of the power grid in each evaluation dimension of the evaluation dimension combination in the next time period is output, which is simply referred to as the predicted instability. The weights of all evaluation dimensions in the evaluation dimension combination are normalized to obtain the first weight of each evaluation dimension. The predicted stability of all evaluation dimensions in the evaluation dimension combination is weighted and summed using the first weights of all evaluation dimensions in the evaluation dimension combination to obtain the comprehensive stability corresponding to any set of related equipment combinations and evaluation dimension combinations; the predicted stability is negatively correlated with the predicted instability.

5. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage systems according to claim 2, characterized in that, The specific steps involved in encoding all decision features in the decision tree into a vector set are as follows: In any decision tree, for any path from the root node to each leaf node, the decision features of all decision nodes along that path constitute a decision sequence; all paths from the root node to all leaf nodes correspond to several decision sequences; each decision sequence is encoded into a vector using the word2Vec algorithm; the vectors corresponding to all decision sequences constitute the vector set of any decision tree.

6. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 2, characterized in that, The specific steps for calculating the minimum difference between the two vector sets obtained from any pair of target decision trees, denoted as the first difference, are as follows: For any two vector sets obtained from a pair of target decision trees, the vectors in the two vector sets are matched using the KM algorithm, so that the matched pairs of vectors have the maximum cosine similarity. Calculate the mean of the cosine similarity of the vectors of all matching pairs, where the first difference is negatively correlated with the mean.

7. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 1, characterized in that, The specific steps for evaluating the instability of the power grid in each time period from several evaluation dimensions are as follows: The aforementioned evaluation dimensions include: Overload, three-phase imbalance, harmonic interference, power grid equipment failure; The instability under the evaluation dimension corresponding to overload is obtained by the ratio of the average active power to the rated power in each time period; the instability under the evaluation dimension corresponding to three-phase imbalance refers to the average of the three-phase imbalance at several sampling points in the power grid; the instability under the evaluation dimension corresponding to harmonic interference is obtained by the ratio of the average harmonic current to the average fundamental current; the instability under the evaluation dimension corresponding to power grid equipment failure is obtained by the ratio of the number of equipment failures to the number of equipment.

8. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 1, characterized in that, The steps after obtaining the overall stability are as follows: For the comprehensive stability obtained by the device combination and evaluation dimension combination associated with all groups, each device in the device combination with a comprehensive stability less than a preset warning threshold is marked as an abnormal device; after a preset time, the number of times each device is marked as an abnormal device is counted. A warning will be issued for the devices that are marked as abnormal the most times.

9. The comprehensive stability evaluation method for integrated power grids based on source-grid-load-storage as described in claim 1, characterized in that, The specific steps for obtaining the operating data of each device are as follows: The operational data includes: the power output per second of each power generation device in each time period, the discharge power and charging power per second of each energy storage device in each time period, the power output per second of the low-voltage side of each substation in each time period, and the power output per second of each distribution cabinet in each time period. All operational data acquired by the same device in the same time period across all days are dimensionality-reduced using the PCA algorithm.

10. A comprehensive stability evaluation system for an integrated power grid (source-grid-load-storage), comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that... When the processor runs the computer program, it implements all the steps of the stability comprehensive evaluation method for the integrated power grid of source, grid, load and storage as described in any one of claims 1 to 9.