Urban power grid fault early warning method and system based on anticipated fault set
Through phased model prediction and dynamic update methods based on the expected fault set, the problem of low accuracy of power grid fault prediction in the prior art is solved, and accurate prediction and efficient emergency response of power grid faults in various disasters are achieved.
Patent Information
- Application Number
- CN202411775698.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art has poor accuracy in predicting power grid faults under various disasters and cannot be applied to complex power grid operating environments.
A urban power grid fault warning method based on the expected set of failures is proposed. Through phased model prediction, dynamic update and global risk assessment, the prediction uncertainty is reduced and the accuracy and real-timeness of fault prediction are improved.
Accurate fault prediction in a variety of disaster scenarios is achieved, the accuracy and real-time nature of power grid fault warning is improved, and the emergency response efficiency of power grid is enhanced.
Smart Images

Figure CN119757951A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power grid fault early warning, and in particular to a method and system for early warning of urban power grid faults based on a set of anticipated faults. Background Art
[0002] With the increasing demand for electricity, the requirements for reliable operation of urban power grids are also getting higher and higher. In the operation of modern power systems, facing the impact of various extreme weather conditions, timely warning and effective response measures are crucial. Therefore, when meteorological disasters occur, it is necessary to warn of possible failures in the power grid.
[0003] When predicting power grid faults in related technologies, the prediction model is generally trained based on historical data, and real-time meteorological data is input into the prediction model to predict the current possible faults by comparing it with historical disaster data. However, in actual applications, due to the complex operating environment of the power grid, environmental factors and power grid operating status are highly time-varying, and the prediction schemes in the above-mentioned related technologies have poor accuracy of prediction results and cannot be applied to fault prediction under various disasters. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the first purpose of this application is to propose a method for urban power grid fault warning based on an anticipated fault set. This method reduces the uncertainty of prediction through staged model prediction. Combined with the dynamic update of the prediction model and the anticipated fault set, it can achieve accurate fault prediction in a variety of disaster scenarios, thereby improving the accuracy and real-time performance of power grid fault warning and improving the emergency response efficiency of the power grid.
[0006] The second object of the present application is to propose an urban power grid fault early warning system based on a set of anticipated faults;
[0007] A third object of the present application is to provide a non-transitory computer-readable storage medium.
[0008] To achieve the above-mentioned purpose, the first aspect of the present application is to propose a method for early warning of urban power grid faults based on a set of expected faults, the method comprising the following steps:
[0009] Pre-train the corresponding prediction models for different disaster types, and combine meteorological data and real-time monitoring data and operation data of the urban power grid system to determine the current disaster type of the power grid. In the model training process, multiple key features are selected as training data for different disaster types through the RFECV algorithm;
[0010] Calling a target prediction model corresponding to the current disaster type to preliminarily predict whether a power grid failure will occur, and after determining that a failure will occur, preliminarily predicting the type of failure through the target prediction model;
[0011] Based on the results of the preliminary prediction, the hyperparameters of the target prediction model are optimized through the parameter adjustment tool, and when multiple disasters occur together, a global risk assessment of the power grid is conducted through the expected fault set, and disaster warning is issued according to the assessment results;
[0012] Based on real-time data streams, the optimized target prediction model is dynamically updated through online learning algorithms and model parameter adaptive adjustment algorithms, and fault prediction and risk assessment are re-performed based on the dynamically updated target prediction model.
[0013] Optionally, in one embodiment of the present application, determining the current disaster type of the power grid includes: analyzing the current climate background of the power grid based on meteorological data and historical disaster data; acquiring the real-time monitoring data and real-time operating parameters of the power grid through a real-time monitoring system of the power grid, and combining the real-time monitoring data and the real-time operating parameters of the power grid with the climate background to determine the current disaster type.
[0014] Optionally, in one embodiment of the present application, the selecting multiple key features by the RFECV algorithm for different disaster types includes: under each disaster type, screening out multiple key features by the optimization formula of the RFECV algorithm, wherein the optimization formula of the RFECV algorithm is represented by the following formula:
[0015]
[0016] Among them, F is the candidate feature set, CV error (F) is the error value in cross validation, k is the number of folds in cross validation;
[0017] The feature importance of each of the key features is calculated, wherein the feature importance is used to represent the influence of the key feature on fault prediction.
[0018] Optionally, in one embodiment of the present application, the optimizing the hyperparameters of the target prediction model through the parameter adjusting tool includes: according to the disaster characteristics of the current disaster type, minimizing the loss function of the target prediction model through the Optuna parameter adjusting tool to search for the optimal hyperparameter combination, wherein the loss function includes the result of the preliminary prediction; after optimizing the hyperparameters of the target prediction model through the parameter adjusting tool, it also includes: dynamically adjusting the target prediction model according to the multiple key features and the optimal hyperparameter combination, and re-predicting whether the power grid will fail and the type of failure that will occur through the adjusted target prediction model.
[0019] Optionally, in one embodiment of the present application, the global risk assessment of the power grid through the anticipated fault set includes: identifying high-risk areas of the power grid under various disaster scenarios through the anticipated fault set; and performing disaster warning according to the assessment results includes: increasing the protection priority of the high-risk areas, adjusting the power generation strategy and transmission strategy related to the high-risk areas, and adjusting the deployment of power grid operation and maintenance emergency resources.
[0020] Optionally, in one embodiment of the present application, before the optimized target prediction model is dynamically updated through the online learning algorithm and the model parameter adaptive adjustment algorithm, it also includes: preprocessing the real-time data streams from multiple sources and converting them into a data format suitable for online model updates; calculating the similarity between the current meteorological data and the historical meteorological data, and triggering the dynamic update of the prediction model when the similarity exceeds a preset threshold.
[0021] Optionally, in one embodiment of the present application, dynamically updating the optimized target prediction model by using an online learning algorithm and a model parameter adaptive adjustment algorithm includes:
[0022] The adjustment direction of the parameters of the target prediction model is determined by the loss function; based on the adjustment direction, the weight parameters of the target prediction model are updated according to the corresponding data in each time step, wherein the weight parameters are updated by the following formula:
[0023]
[0024] Among them, θ t represents the model parameters at the current time step, θ t+1 represents the model parameters for the next time step, η is the learning rate, Indicates that the input data x t and label y t The gradient of the loss function L on ;
[0025] Combining the context information of the current disaster type, historical fault data and current environmental conditions, the momentum method is used to dynamically optimize the updated model parameters.
[0026] Optionally, in one embodiment of the present application, the dynamically updating the optimized target prediction model through the online learning algorithm and the model parameter adaptive adjustment algorithm also includes: in the process of updating the parameters of the target prediction model, real-time evaluation of the prediction accuracy of the model; and judging whether to trigger the model annealing mechanism according to the change of the prediction accuracy.
[0027] To achieve the above-mentioned purpose, the second aspect of the present application further proposes a city power grid fault early warning system based on a predicted fault set, comprising the following modules:
[0028] The judgment module is used to pre-train the corresponding prediction models for different disaster types, and combine the meteorological data and the real-time monitoring data and operation data of the urban power grid system to judge the current disaster type of the power grid. In the model training process, multiple key features are selected as training data for different disaster types through the RFECV algorithm;
[0029] A preliminary prediction module, used to call a target prediction model corresponding to the current disaster type to preliminarily predict whether a power grid failure will occur, and after determining that a failure will occur, to preliminarily predict the type of failure through the target prediction model;
[0030] An optimization module is used to optimize the hyperparameters of the target prediction model through a parameter adjustment tool based on the results of the preliminary prediction, and to conduct a global risk assessment of the power grid through a set of expected faults when multiple disasters occur together, and to issue a disaster warning based on the assessment results;
[0031] The final prediction module is used to dynamically update the optimized target prediction model based on real-time data streams through online learning algorithms and model parameter adaptive adjustment algorithms, and re-perform fault prediction and risk assessment based on the dynamically updated target prediction model.
[0032] In order to implement the above-mentioned embodiments, the third aspect embodiment of the present application also proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the urban power grid fault warning method based on the expected fault set in the above-mentioned first aspect embodiment is implemented.
[0033] The technical solution provided by the embodiment of the present application brings at least the following beneficial effects: the present application reduces the uncertainty of prediction through staged model prediction, making the fault classification result more accurate, thereby providing more accurate information for power grid emergency response. In addition, by judging the disaster type and dynamically adjusting the model parameters in combination with real-time data, it can adapt to the changing meteorological conditions and complex power grid operation environment. The present application adopts a staged disaster type identification, fault type classification and dynamic disaster assessment strategy, and realizes accurate fault prediction through dynamic model training and parameter adaptive adjustment before the fault occurs. In addition, the present application introduces a dynamic online learning and model annealing mechanism to ensure the prediction stability and emergency response efficiency of the model in multi-disaster scenarios, thereby significantly improving the risk prevention ability and overall resilience of the power grid under extreme climatic conditions. Thus, by organically combining these dynamic update strategies with the traditional expected fault scenario set, a more complete fault warning and emergency handling solution is provided. The early warning model can perform real-time updates and risk predictions for various disaster types such as typhoons, heavy rains and extreme cold, and generate an expected fault scenario set based on the coupling effect of multiple disasters. This scenario set can provide a more comprehensive decision-making basis for power grid dispatching, take protective measures before disasters occur, and significantly improve the power grid's disaster resistance and recovery speed. As a result, this application improves the accuracy and real-time nature of power grid fault warnings, and provides a guarantee for the stable operation of the power grid in extreme weather.
[0034] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0036] Figure 1 A flow chart of a method for early warning of urban power grid faults based on a set of anticipated faults proposed in an embodiment of the present application;
[0037] Figure 2 A flowchart of a method for dynamically updating prediction model parameters proposed in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of the structure of a city power grid fault warning system based on a set of anticipated faults proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0039] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0040] The following describes in detail a method and system for early warning of urban power grid faults based on a set of anticipated faults proposed in an embodiment of the present application with reference to the accompanying drawings.
[0041] Figure 1 A flowchart of a method for early warning of urban power grid faults based on a set of anticipated faults proposed in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0042] Step S101, pre-train corresponding prediction models for different disaster types, and combine meteorological data and real-time monitoring data and operation data of the urban power grid system to determine the current disaster type of the power grid. During the model training process, multiple key features are selected as training data for different disaster types through the RFECV algorithm.
[0043] Specifically, this step first determines the disaster background (i.e., disaster type) of the power grid through the collected meteorological data and the real-time monitoring system preset in the urban power grid, combined with the power grid operation data. The disaster type may include but is not limited to: typhoons, heavy rains, extreme cold weather and other meteorological disasters that may cause power grid failures.
[0044] In one embodiment of the present application, determining the current disaster type of the power grid includes: analyzing the current climate background of the power grid based on meteorological data and historical disaster data; acquiring real-time monitoring data and real-time operating parameters of the power grid through a real-time monitoring system of the power grid, and combining the real-time monitoring data and real-time operating parameters of the power grid with the climate background to determine the current disaster type.
[0045] Specifically, in this embodiment, meteorological data is first analyzed. The climate background of the current power grid is analyzed through the collected meteorological data and historical disaster data, wherein the meteorological data includes real-time meteorological data and historical meteorological data. For example, for typhoons, the focus is on collecting and analyzing data such as wind speed, wind direction, and air pressure; while for heavy rain and extremely cold weather, the main information is precipitation, temperature, and humidity. By analyzing these data, it is helpful to accurately determine the current disaster type, and combined with historical data, it is conducive to further predicting the possible impact on the power grid.
[0046] Then, real-time data related to meteorology and power grid operation status are obtained through the real-time monitoring system. The real-time monitoring system includes a sensor network and a monitoring system pre-installed in the power grid, through which the type and severity of the disaster can be further confirmed. Various types of sensors in the real-time monitoring system can monitor important parameters such as wind speed, precipitation and temperature in real time (i.e., real-time monitoring data). The power grid operation data includes line length, overhead length, and operating environment parameters such as wind speed and air pressure in the environment.
[0047] This embodiment combines the monitored real-time data with the previously obtained meteorological model to ensure that the judgment of the disaster type is not only based on historical data, but also based on the verification of current real-time data. This process provides accurate data support for the subsequent fault prediction model.
[0048] It should be noted that before actually carrying out power grid fault warning, the application also trains corresponding prediction models in advance according to different disaster types. The prediction model can use various neural network models according to actual needs, such as the LightGBM model, and ensure that the prediction model can identify and process failure modes under specific disasters. The trained prediction model can be multiple or one. When the same model is used, the model is trained to have the ability to make corresponding fault predictions based on different disaster input parameters.
[0049] This step improves the generalization ability of the model through accurate classification and feature screening of disasters, enabling it to more accurately predict whether the power grid will fail. In specific implementation, the corresponding prediction model is trained through data under different disaster backgrounds, so that the model can adapt to the different influencing factors of various disasters and improve the accuracy of the prediction. The input data includes power grid operating parameters and real-time meteorological data, and the key features screened out by the RFECV method are used for model training and subsequent fault prediction. This application ensures that the fault prediction results in each disaster scenario are more accurate and targeted by conducting separate training for different disaster backgrounds.
[0050] Step S102, calling a target prediction model corresponding to the current disaster type to preliminarily predict whether a power grid failure will occur, and after determining that a failure will occur, preliminarily predicting the type of failure through the target prediction model.
[0051] Specifically, according to the type of disaster that the power grid is currently in determined in the previous step, a pre-trained prediction model for the disaster type (i.e., the target prediction model) is used to predict faults under the current disaster. This step adopts a staged model prediction design. In the first prediction stage, a pre-trained prediction model for the determined current disaster type is used to predict whether the power grid will fail. Then, after confirming that the power grid has failed, the second stage of prediction is entered to classify the specific fault types. In both the first and second prediction stages, the prediction models are targeted for different disaster types to ensure that under different disaster backgrounds, whether a fault occurs and the specific fault type (for example, successful tripping and reclosing, tripping or loss of pressure, etc.) can be accurately identified.
[0052] In order to more clearly illustrate the process of implementing fault prediction through a prediction model in the present application, a rainstorm disaster is taken as an example, and an exemplary explanation is given by constructing a power system failure probability model under a rainstorm disaster.
[0053] In this embodiment, the characteristics of rainstorm weather are first analyzed. Rainstorm, also known as heavy rain or storm, refers to a precipitation phenomenon in which the rainfall reaches a specific threshold in a short period of time. The China Meteorological Administration divides rainstorms into three levels according to the precipitation within 24 hours: heavy rain (50-99.9mm), heavy rain (100-200mm) and extremely heavy rain (more than 200mm). Heavy rain often causes serious secondary disasters, such as floods and landslides, especially in low-lying areas. Heavy rain can cause waterlogging in farmland and over-saturation of soil, causing significant economic losses. According to the intensity and duration of rainfall, the rainstorm disaster warning signals are divided into four levels: blue, yellow, orange and red, representing general, heavy, severe and particularly severe disaster levels respectively.
[0054] In the case of heavy rain disasters, the fault prediction of the power system mainly focuses on the short circuit, insulation damage, line breakage and other faults caused by heavy rain on key equipment such as transmission lines and transformers. This example will use the LightGBM model combined with RFECV for feature screening, and use Optuna for hyperparameter optimization to establish a power system fault prediction model under heavy rain disasters. The following is the specific construction process of the model.
[0055] First, build the LightGBM model. Since the LightGBM model is suitable for processing a large amount of environmental data, such as multi-dimensional features of rainstorms such as rainfall intensity, duration, humidity, and line length, this embodiment uses the LightGBM model as a prediction model. Through the LightGBM model, the prediction task of power grid faults can be divided into two stages: prediction of whether a fault occurs, and classification of fault types (such as line breakage, short circuit, transformer failure, etc.).
[0056] In this model, the probability prediction formula for failure occurrence is a classification-based logistic regression loss function as shown in the following formula:
[0057]
[0058] Among them, y i A label indicating whether a failure occurred during a rainstorm disaster. is the failure probability predicted by the LightGBM model, and n is the number of labels.
[0059] For the fault type classification task, the model uses a multi-category cross entropy loss function as shown in the following formula:
[0060]
[0061] Where K is the number of fault types, y ik represents the true type label of the i-th sample, is the probability that the i-th sample belongs to type K as predicted by the model.
[0062] As mentioned above, in the model training process, this application uses the RFECV algorithm to select multiple key features as training data. RFECV is used to select features that have a greater impact on power grid fault prediction in rainstorm scenarios, namely key features. Key features in rainstorm disasters include but are not limited to: rainfall intensity, rainfall duration, humidity, line length, and transformer operation time.
[0063] In one embodiment of the present application, multiple key features are selected by the RFECV algorithm for different disaster types, including: under each disaster type, multiple key features are screened out by the optimization formula of the RFECV algorithm, wherein the optimization formula of the RFECV algorithm is represented by the following formula:
[0064]
[0065] Among them, F is the candidate feature set, CV error (F) is the error value in cross validation, k is the number of folds in cross validation;
[0066] For example, for rainstorm disasters, the key features screened by RFECV may include: (1) Rainfall intensity: Rainfall intensity directly affects the moisture of transformers and the insulation of transmission lines, increasing the risk of short circuits and failures. (2) Rainfall duration: The longer the rainstorm lasts, the higher the risk of power equipment getting wet and line load increasing. (3) Humidity: Increased humidity will aggravate the deterioration of insulation materials, leading to transformer and insulator failures. (4) Line length: Long lines have a higher failure rate during rainstorms, especially under conditions of floods or landslides caused by rainstorms. Transformer operating time: Old transformers are more likely to suffer short circuit or breakdown failures due to moisture from rainstorms.
[0067] In this embodiment, after the key features are screened, the influence of the key features is also calculated. The influence of the key features selected by RFECV features on fault prediction can be expressed by feature importance. j ) can be calculated by the following formula:
[0068]
[0069] Among them, G(F j , T i ) is the feature F j In the decision tree T i The gain in , n is the number of decision trees.
[0070] Continuing with the example of heavy rain, the main influencing characteristics and their effects under heavy rain disasters are as follows: 1) Rainfall intensity: The greater the intensity of the heavy rain, the higher the risk of power equipment getting damp and line failure. 2) Rainfall duration: Long-term heavy rain will aggravate the moisture of the equipment and increase the probability of failure. 3) Humidity: Humidity directly affects the insulation capacity of power equipment. Excessive humidity will cause insulation failure. 4) Line length: Longer lines are more likely to fail due to physical damage (such as fallen poles and broken lines) in heavy rain.
[0071] Therefore, the design of the phased model in this application makes the classification results more accurate by reducing the uncertainty of the prediction, thereby providing more accurate information for power grid emergency response.
[0072] Step S103, based on the results of the preliminary prediction, the hyperparameters of the target prediction model are optimized through the parameter adjustment tool, and when multiple disasters occur together, a global risk assessment of the power grid is performed through the expected fault set, and disaster warnings are issued according to the assessment results.
[0073] Specifically, in order to improve the accuracy of the model's fault prediction, the present application combines the preliminary prediction results obtained in step S102 to optimize the constructed prediction model in multiple dimensions, so as to ultimately form a more accurate disaster assessment mechanism. In this step, the prediction model is first optimized using a parameter adjustment tool, and dynamically adjusted according to the characteristics of different disasters.
[0074] For example, in a typhoon, wind speed, line length and substation operation time are important factors affecting failures; in a rainstorm, transformer moisture and transmission line damage are the main risk points. By optimizing the characteristics of the disaster background, the adaptability and prediction ability of the model in different scenarios can be further improved.
[0075] In one embodiment of the present application, the hyperparameters of the target prediction model are optimized through a parameter adjustment tool, including: according to the disaster characteristics of the current disaster type, the loss function of the target prediction model is minimized through the Optuna parameter adjustment tool to search for the optimal hyperparameter combination, wherein the loss function includes the results of the preliminary prediction.
[0076] Specifically, referring to the above rainstorm disaster example, in this example, in order to achieve the best prediction performance of the LightGBM model in the rainstorm disaster scenario, Optuna is used for hyperparameter optimization. The goal of optimization is to find the optimal hyperparameter combination by minimizing the model loss function. Among them, Optuna's optimization formula is as follows:
[0077]
[0078] Here, θ is a combination of LightGBM hyperparameters, including but not limited to: learning rate (learning_rate), maximum depth (max_depth), minimum number of samples of leaf nodes (min_child_samples), and number of trees (n_estimators). This optimization formula uses the y initially predicted in step S102. i and Through Optuna, search for the optimal hyperparameter combination θ * , enabling the model to more accurately predict power grid failures in rainstorm disaster scenarios.
[0079] Furthermore, in this embodiment, after optimizing the hyperparameters of the target prediction model through the parameter adjustment tool, it also includes: dynamically adjusting the target prediction model according to multiple key features and the optimal hyperparameter combination, and re-predicting whether the power grid will fail and the type of failure that will occur through the adjusted target prediction model.
[0080] Specifically, the prediction formula for the fault prediction model constructed by combining LightGBM, RFECV and Optuna technologies in this embodiment is as follows.
[0081] The probability prediction of failure is calculated by the following formula:
[0082] P(fault)=LightGBM(F selected ,θ * )
[0083] Among them, F selected is the optimal feature set selected by RFECV, θ * It is the hyperparameter combination obtained through Optuna optimization.
[0084] For the classification prediction of fault type, it is calculated by the following formula:
[0085] P(fault type-fault)=LightGBM(F selected θ * )
[0086] Through the above two formulas, after confirming that a fault has occurred, the prediction model of this embodiment can further predict the type of fault (for example, successful tripping and reclosing, tripping or pressure loss, etc.) and output the corresponding probability.
[0087] As can be seen from the above two formulas, this embodiment uses the key features and the optimal hyperparameter combination to dynamically adjust the target prediction model, and then re-predicts whether the power grid will fail and the specific type of failure. By re-judging the fault prediction after parameter optimization, the prediction accuracy is improved through iterative prediction.
[0088] Therefore, the rainstorm fault prediction model constructed by this application through LightGBM, RFECV and Optuna can predict the risk of power grid failure in real time based on the selected key features. The final fault prediction results can provide decision support for power grid operators, helping them to take protective measures before the rainstorm arrives, significantly improving the disaster resistance and recovery speed of the power grid. Through this model, the fault prediction system in the rainstorm scenario can effectively improve the accuracy of fault prediction and provide guarantee for the stable operation of the power grid in extreme weather.
[0089] Furthermore, this step also combines the fault prediction and classification results under different disaster backgrounds to form a set of expected fault scenarios. The set of expected fault scenarios includes possible fault conditions that may occur in the power grid under various extreme weather conditions, and comprehensively analyzes the impact of different disasters on the power grid. This set of scenarios provides data support for fault warning and power grid dispatch, and ensures that the power grid's early warning capabilities are more comprehensive when multiple disasters overlap.
[0090] It should be noted that in the operation of modern power systems, they may face the impact of various extreme weather conditions (for example, typhoons and rainstorms), so timely warning and effective response measures are crucial. In order to improve the risk resistance of the power grid under various extreme climate conditions, this application can conduct an in-depth analysis of the power system failure rate under different disaster scenarios, and summarize these analysis results into a set of expected failure scenarios to provide a scientific basis for the overall operation of the power grid.
[0091] As a possible implementation method, a comprehensive fault scenario analysis is performed when constructing a set of expected fault scenarios. Comprehensive fault scenario analysis is a comprehensive integration of the failure rates of power systems under different extreme weather conditions. First, through detailed modeling of disaster scenarios such as typhoons, heavy rains, and extreme cold weather, the respective failure rate model results are obtained. The failure rate of wind turbines and overhead lines in typhoon scenarios, as well as the failure rate of transformers and transmission lines in heavy rains and extreme cold weather, have all been carefully calculated and simulated.
[0092] Then, in this stage, the failure probability of power grid components in various disaster scenarios is gradually quantified and compared by combining historical data and current meteorological models. By integrating these data, a set of expected failure scenarios covering various disaster types is formed. This set of scenarios not only reflects the impact of a single disaster, but also considers the characteristics of power grid failures under the superposition of multiple disasters. By comprehensively analyzing the failure modes in these scenarios, we can find the vulnerabilities of the power system under different extreme weather conditions, and take targeted prevention and reinforcement and other early warning measures for these vulnerabilities.
[0093] In one embodiment of the present application, a global risk assessment of the power grid is performed through a set of anticipated faults, including: identifying high-risk areas of the power grid under various disaster scenarios through the set of anticipated faults.
[0094] Specifically, the application of the set of anticipated failure scenarios aims to improve the disaster resistance of the power grid and optimize the allocation of emergency resources through global risk assessment. Using this set of scenarios, we can first conduct a global risk assessment of the power grid and identify the most vulnerable links in the entire power grid that are most likely to fail under various disaster scenarios. In this way, we can more accurately predict potential high-risk areas and facilities in the power grid.
[0095] Then, disaster warnings are carried out based on the assessment results, including: increasing the protection priority of high-risk areas, adjusting the power generation and transmission strategies related to high-risk areas, and adjusting the deployment of emergency resources for grid operation and maintenance.
[0096] Specifically, when the present embodiment is actually applied, the anticipated fault scenario set can help power system operators develop more accurate emergency plans. When a disaster is imminent, high-risk areas can be given priority protection based on the data in the scenario set, and the scheduling strategies for power generation and transmission can be adjusted to avoid or reduce the occurrence of large-scale power outages. In addition, the scenario set can also be used to guide the rational deployment of emergency resources. For example, when it is predicted that a particular area may face serious damage to power facilities in a typhoon or heavy rain, the operator can arrange for repair personnel and equipment to enter the area in advance so that power supply can be quickly restored after the disaster occurs.
[0097] In addition, the set of anticipated fault scenarios can also serve as an important reference tool for long-term planning of power systems. When expanding the power grid, updating or renovating equipment, priority can be given to reinforcing or upgrading vulnerable links based on the risk analysis results provided by the scenario set, thereby enhancing the stability and resilience of the power system under future extreme weather conditions.
[0098] Step S104, based on the real-time data stream, dynamically update the optimized target prediction model through an online learning algorithm and a model parameter adaptive adjustment algorithm, and re-perform fault prediction and risk assessment based on the dynamically updated target prediction model.
[0099] Specifically, this step dynamically updates the model training and disaster assessment mechanism, that is, dynamically trains the prediction model based on real-time data streams and establishes an assessment mechanism. By introducing online learning and model parameter adaptive adjustment technology, the model parameters are updated in real time at different stages of the disaster, such as when a disaster is about to occur, to ensure that the model can accurately predict the risk of failure under complex and changing climate conditions. Then, the prediction model after the dynamic parameter update can return to the above steps, iterate the fault prediction, and perform corresponding power grid fault warnings in real time according to the updated fault prediction results by updating the expected fault set and other methods.
[0100] The dynamically updated model training and disaster assessment mechanism of this application is described in detail below. Traditional fault prediction models are usually statically trained based on historical data. After the model is built, the parameters and feature selection of the model remain unchanged. The main limitation of this static training method is that once the model is built, it cannot adapt to the ever-changing dynamic characteristics of the power grid operating environment, especially under extreme weather conditions, where environmental factors and power grid operating conditions are highly non-stationary and time-varying. In order to improve the accuracy of power grid fault prediction and emergency response capabilities, it is necessary to introduce a dynamically updated model training and disaster assessment mechanism.
[0101] To this end, this application proposes a dynamic training and evaluation mechanism based on real-time data stream. By introducing online learning and model parameter adaptive adjustment technology, the model parameters are updated in real time when a disaster occurs, ensuring that the model can accurately predict failure risks under complex and changeable climate conditions.
[0102] As a possible implementation method, in order to realize the dynamically updated model structure, this application proposes an online training framework based on streaming data processing. The framework adopts the following key technologies:
[0103] First, real-time data collection and preprocessing. By accessing multiple data streams, including meteorological data, transmission line operation data, historical fault data, and power grid equipment status data, the changes in meteorological conditions and power grid operation status are monitored in real time. These data will be de-noised, standardized, and feature extracted by the real-time preprocessing module and converted into a data format suitable for online model updates.
[0104] Second, online learning algorithms. Online learning algorithms (such as SGD and Adagrad based on gradient updates) can update parameters according to newly arrived data in each time step, avoiding the high computational cost of retraining the model every time it is updated. The core of online learning is to update the model weights through the following formula:
[0105]
[0106] Among them, θ t represents the model parameters at the current time step, θ t+1 represents the model parameters for the next time step, η is the learning rate, Indicates that the input data x t and label y t The gradient of the loss function L on .
[0107] Third, the parameter adaptive adjustment module. This module introduces the contextual information of the disaster scenario (for example, the changing trend of wind speed, precipitation and temperature in meteorological data within a period) and historical failure modes, and then dynamically adjusts the weights and parameters of the model according to the current environmental conditions. Parameter adjustment is dynamically optimized based on the momentum method, which can be calculated by the following formula:
[0108]
[0109] θ t+1 =θ t -υ t+1
[0110] Among them, γ is the momentum coefficient, which usually takes values between [0, 1], and υ tis the momentum term at step t, which is used to accelerate convergence.
[0111] Fourth, model annealing mechanism. When faced with high-noise real-time data streams, the weights and feature selection of the prediction model may be interfered with by abnormal data. Therefore, this application introduces a model annealing mechanism. When the new data features deviate significantly from the historical data features, a temperature parameter is used. Specifically, it can be calculated using the following formula:
[0112]
[0113] Among them, Δx is the deviation between the current data characteristics and the historical data characteristics, and T is the annealing temperature, which is used to control the sensitivity of the prediction model to the data.
[0114] In order to more clearly illustrate the implementation process of the present application for dynamically updating the target prediction model, the following is an explanation of the dynamic training process of the prediction model. The dynamic training process is divided into the following stages.
[0115] In one embodiment of the present application, before dynamically updating the optimized target prediction model through an online learning algorithm and a model parameter adaptive adjustment algorithm, it also includes: preprocessing real-time data streams from multiple sources and converting them into a data format suitable for online model updates; calculating the similarity between current meteorological data and historical meteorological data, and triggering dynamic updating of the prediction model when the similarity exceeds a preset threshold.
[0116] Specifically, this embodiment includes a data collection and environmental state identification stage, and a model state judgment stage in context. In the data collection and environmental state identification stage, the current meteorological conditions (such as wind speed, wind direction, rainfall, temperature, etc.) and the operating parameters of the power grid (such as transmission line voltage, current, frequency, etc.) are collected in real time through meteorological stations, monitoring sensors and power grid operation monitoring systems. Then, these data are analyzed in time series to identify the current environmental state (such as disaster level, weather change trend, etc.). And preprocessing is performed through the first technology in the above example (real-time data collection and preprocessing).
[0117] In the context-based model status judgment stage, the similarity between the current meteorological data and the historical data pattern is analyzed to determine whether the model needs to be updated. If the current meteorological conditions are highly similar to the historical ones, the original model optimized by the parameter adjustment tool is used for prediction; otherwise, the dynamic update mode is entered. The indicators for model status judgment mainly include the abnormal volatility of meteorological data (for example, the coefficient of variation of wind speed) and the deviation of historical fault patterns. The deviation can be calculated using the following formula:
[0118]
[0119] Among them, when the calculated deviation exceeds the set threshold, the model update mechanism is triggered.
[0120] In the process of dynamically updating the optimized target prediction model through the online learning algorithm and the model parameter adaptive adjustment algorithm, in order to more clearly illustrate the updating process of the present application, an updating method proposed in an embodiment is exemplified below.
[0121] Figure 2 A flowchart of a method for dynamically updating prediction model parameters proposed in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0122] Step S201, determining the adjustment direction of the parameters of the target prediction model through the loss function.
[0123] Specifically, step S201 and step S202 are parameter update stages based on online learning algorithms. When it is determined that the prediction model needs to update parameters, an online learning algorithm is introduced to update the model parameters based on the data in the most recent time window. The model update process uses the minimized cross entropy loss function or Hinge Loss function to guide the adjustment direction of the model parameters. The adjustment direction can be determined by the following formula:
[0124]
[0125] Among them, y i is the true label of the i-th sample, p i is the probability that the model predicts that the sample is a fault, and n is the number of samples.
[0126] Step S202, based on the adjustment direction, updating the weight parameters of the target prediction model according to the corresponding data in each time step.
[0127] Specifically, according to the determined adjustment direction, that is, the loss function L, the weight parameters of the target prediction model are updated according to the corresponding data in each time step through the formula in the second technology (online learning algorithm) in the above example.
[0128] Step S203 , combining the context information of the current disaster type, historical fault data and current environmental conditions, dynamically optimize the updated model parameters using the momentum method.
[0129] Specifically, this step is the disaster scenario adaptation stage. In this stage, specific adaptive models are established for different disaster scenarios (typhoons, heavy rains, and extremely cold weather). During the dynamic update process, the most relevant feature set and parameter combination are automatically selected according to the current scenario type. For example, in a typhoon scenario, more attention is paid to changes in wind speed and line length; in a heavy rain scenario, the focus is on analyzing the correlation between rainfall and substation location. The third technology in the above example (parameter adaptive adjustment technology) can be used for dynamic updates.
[0130] In one embodiment of the present application, the optimized target prediction model is dynamically updated through an online learning algorithm and a model parameter adaptive adjustment algorithm, and also includes: in the process of updating the parameters of the target prediction model, real-time evaluation of the prediction accuracy of the model; judging whether to trigger the model annealing mechanism based on the change in the prediction accuracy.
[0131] Specifically, this embodiment is the model online evaluation and model annealing stage. During the model update process, the system will evaluate the prediction accuracy and stability of the model in real time to prevent the drastic fluctuations in model performance caused by the introduction of new data. When the model accuracy drops significantly in a short period of time, the model annealing mechanism is triggered to appropriately weaken the impact of the current data on the model parameter update and restore the stability of the model. The specific model annealing process can be performed with reference to the fourth technology (model annealing technology) in the above example.
[0132] In summary, the urban power grid fault warning method based on the expected fault set of the embodiment of the present application reduces the uncertainty of the prediction through staged model prediction, making the fault classification result more accurate, thereby providing more accurate information for the power grid emergency response. In addition, by judging the disaster type and dynamically adjusting the model parameters in combination with real-time data, it can adapt to the changing meteorological conditions and complex power grid operation environment. The method adopts a staged disaster type identification, fault type classification and dynamic disaster assessment strategy, and realizes accurate fault prediction through dynamic model training and parameter adaptive adjustment before the fault occurs. In addition, the method introduces dynamic online learning and model annealing mechanisms to ensure the prediction stability and emergency response efficiency of the model in multi-disaster scenarios, thereby significantly improving the risk prevention ability and overall resilience of the power grid under extreme climatic conditions. Therefore, by organically combining these dynamic update strategies with the traditional expected fault scenario set, the method provides a more complete fault warning and emergency response solution. The early warning model can perform real-time updates and risk predictions for various disaster types such as typhoons, heavy rains and extreme cold, and generate an expected fault scenario set based on the coupling effect of multiple disasters. This scenario set can provide a more comprehensive decision-making basis for power grid dispatching, take protective measures before disasters occur, and significantly improve the power grid's disaster resistance and recovery speed. As a result, this method improves the accuracy and real-time nature of power grid fault warnings, and provides a guarantee for the stable operation of the power grid in extreme weather.
[0133] In order to implement the above embodiment, the present application also proposes a city power grid fault early warning system based on a set of expected faults. Figure 3 A schematic diagram of the structure of a city power grid fault early warning system based on a predicted fault set proposed in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device includes a judgment module 100, a preliminary prediction module 200, an optimization module 300 and a final prediction module 400.
[0134] Among them, the judgment module 100 is used to pre-train corresponding prediction models for different disaster types, and combine meteorological data and real-time monitoring data and operation data of the urban power grid system to determine the current disaster type of the power grid. During the model training process, multiple key features are selected as training data for different disaster types through the RFECV algorithm.
[0135] The preliminary prediction module 200 is used to call the target prediction model corresponding to the current disaster type to preliminarily predict whether the power grid will fail, and after determining that a failure will occur, preliminarily predict the type of failure through the target prediction model.
[0136] The optimization module 300 is used to optimize the hyperparameters of the target prediction model through the parameter adjustment tool based on the results of the preliminary prediction, and to conduct a global risk assessment of the power grid through the expected fault set when multiple disasters occur simultaneously, and to issue disaster warnings based on the assessment results.
[0137] The final prediction module 400 is used to dynamically update the optimized target prediction model based on the real-time data stream through an online learning algorithm and a model parameter adaptive adjustment algorithm, and re-perform fault prediction and risk assessment based on the dynamically updated target prediction model.
[0138] It should be noted that the above explanation of the embodiment of the urban power grid fault early warning method based on the expected fault set is also applicable to the system of this embodiment, and the implementation principle is the same, which will not be repeated here.
[0139] In summary, the urban power grid fault warning system based on the expected fault set of the embodiment of the present application reduces the uncertainty of the prediction through staged model prediction, making the fault classification result more accurate, thereby providing more accurate information for the power grid emergency response. In addition, by judging the type of disaster and dynamically adjusting the model parameters in combination with real-time data, it can adapt to the changing meteorological conditions and complex power grid operating environment. Thus, by organically combining the dynamic update strategy with the traditional expected fault scenario set, a more complete fault warning and emergency handling solution is provided. This scenario set can provide a more comprehensive decision-making basis for power grid dispatching, take protective measures before the disaster strikes, and significantly improve the disaster resistance and recovery speed of the power grid. As a result, the system improves the accuracy and real-time performance of power grid fault warnings, and provides a guarantee for the stable operation of the power grid in extreme weather.
[0140] In order to implement the above embodiments, the present application also proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the urban power grid fault warning method based on the expected fault set as described in any one of the above-mentioned first aspect embodiments.
[0141] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0142] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0143] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0144] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0145] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0146] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0147] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0148] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for early warning of urban power grid faults based on a set of expected faults, characterized in that: The following steps are involved: Pre-train the corresponding prediction models for different disaster types, and combine meteorological data and real-time monitoring data and operation data of the urban power grid system to determine the current disaster type of the power grid. In the model training process, multiple key features are selected as training data for different disaster types through the RFECV algorithm; Calling a target prediction model corresponding to the current disaster type to preliminarily predict whether a power grid failure will occur, and after determining that a failure will occur, preliminarily predicting the type of failure through the target prediction model; Based on the results of the preliminary prediction, the hyperparameters of the target prediction model are optimized through the parameter adjustment tool, and when multiple disasters occur together, a global risk assessment of the power grid is conducted through the expected fault set, and disaster warning is issued according to the assessment results; Based on real-time data streams, the optimized target prediction model is dynamically updated through online learning algorithms and model parameter adaptive adjustment algorithms, and fault prediction and risk assessment are re-performed based on the dynamically updated target prediction model.
2. The method according to claim 1, characterized in that: The determining of the current disaster type of the power grid includes: Analyze the current climate background of the power grid based on meteorological data and historical disaster data; The real-time monitoring data and the real-time operation parameters of the power grid are acquired through the real-time monitoring system of the power grid, and the real-time monitoring data and the real-time operation parameters of the power grid are combined with the climate background to determine the current disaster type.
3. The method according to claim 1, characterized in that The RFECV algorithm is used to select multiple key features for different disaster types, including: Under each disaster type, multiple key features are screened out through the optimization formula of the RFECV algorithm, wherein the optimization formula of the RFECV algorithm is represented by the following formula: Among them, F is the candidate feature set, CV error (F) is the error value in cross validation, k is the number of cross validation folds; The feature importance of each of the key features is calculated, wherein the feature importance is used to represent the influence of the key feature on fault prediction.
4. The method according to claim 1, characterized in that: Optimizing the hyperparameters of the target prediction model by using a parameter adjustment tool includes: According to the disaster characteristics of the current disaster type, the loss function of the target prediction model is minimized by the Optuna parameter adjustment tool to search for the optimal hyperparameter combination, wherein the loss function includes the result of the preliminary prediction; After the hyperparameters of the target prediction model are optimized by the parameter adjustment tool, the method further includes: The target prediction model is dynamically adjusted according to the multiple key features and the optimal hyperparameter combination, and the adjusted target prediction model is used to re-predict whether a power grid failure will occur and the type of failure that will occur.
5. The method according to claim 1, characterized in that The global risk assessment of the power grid through the expected fault set includes: Identifying high-risk areas of the power grid under various disaster scenarios through the expected fault set; The disaster warning according to the assessment results includes: Increase the protection priority of the high-risk areas, adjust the power generation and transmission strategies related to the high-risk areas, and adjust the deployment of power grid operation and maintenance emergency resources.
6. The method according to claim 1, characterized in that Before dynamically updating the optimized target prediction model by the online learning algorithm and the model parameter adaptive adjustment algorithm, the method further includes: Preprocess real-time data streams from multiple sources and convert them into data formats suitable for online model updates; The similarity between the current meteorological data and the historical meteorological data is calculated, and when the similarity exceeds a preset threshold, a dynamic update of the prediction model is triggered.
7. The method according to claim 6, characterized in that The method of dynamically updating the optimized target prediction model by using an online learning algorithm and a model parameter adaptive adjustment algorithm includes: Determining the adjustment direction of the parameters of the target prediction model through the loss function; Based on the adjustment direction, the weight parameters of the target prediction model are updated according to the corresponding data in each time step, wherein the weight parameters are updated by the following formula: Among them, θ t represents the model parameters at the current time step, θ t+1 represents the model parameters for the next time step, η is the learning rate, Indicates that the input data x t and label y t The gradient of the loss function L on ; Combining the context information of the current disaster type, historical fault data and current environmental conditions, the momentum method is used to dynamically optimize the updated model parameters.
8. The method according to claim 7, characterized in that The dynamically updating the optimized target prediction model by the online learning algorithm and the model parameter adaptive adjustment algorithm also includes: During the process of updating the parameters of the target prediction model, the prediction accuracy of the model is evaluated in real time; Whether to trigger the model annealing mechanism is determined according to the change in the prediction accuracy.
9. A city power grid fault early warning system based on a set of expected faults, characterized in that: Includes the following modules: The judgment module is used to pre-train the corresponding prediction models for different disaster types, and combine the meteorological data and the real-time monitoring data and operation data of the urban power grid system to judge the current disaster type of the power grid. In the model training process, multiple key features are selected as training data for different disaster types through the RFECV algorithm; A preliminary prediction module, used to call a target prediction model corresponding to the current disaster type to preliminarily predict whether a power grid failure will occur, and after determining that a failure will occur, to preliminarily predict the type of failure through the target prediction model; An optimization module is used to optimize the hyperparameters of the target prediction model through a parameter adjustment tool based on the results of the preliminary prediction, and to conduct a global risk assessment of the power grid through a set of expected faults when multiple disasters occur together, and to issue a disaster warning based on the assessment results; The final prediction module is used to dynamically update the optimized target prediction model based on real-time data streams through online learning algorithms and model parameter adaptive adjustment algorithms, and re-perform fault prediction and risk assessment based on the dynamically updated target prediction model.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, an urban power grid fault early warning method based on an expected fault set as described in any one of claims 1 to 8 is implemented.