Early warning method and system for power failure induced by extreme weather based on spatio-temporal data

By combining the ConvLstm depth spatiotemporal residual network and LightGBM algorithm, we process meteorological spatiotemporal data and other influencing factors, we build a power system trip warning model, and solve the single-dimensional problem of power system trip prediction in the existing technology, and realize the situation of extreme weather. The grid operation risk assessment and early warning have improved the grid's disaster resilience.

CN119167260APending Publication Date: 2024-12-20CHINA SOUTHERN POWER GRID COMPANY

Patent Information

Application Number
CN202411238716.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing technology can only predict power system tripping from a single dimension of time or space, and fail to fully explore the correlation between meteorological factors, distribution lines and equipment, geographical environment and time data, resulting in a risk situation for power grid operation in extreme weather. Inadequate assessment ability.

Method used

Using the combination of ConvLstm depth spatiotemporal residual network and LightGBM algorithm, we can collect and preprocess meteorological spatiotemporal data and other influencing factors to build an early warning model, predict meteorological characteristics and early warning of power system tripping events, and use SMOTE-NC-NCL mixed resampling The method handles imbalanced data and enhances the model recognition ability.

Benefits of technology

It realizes an accurate warning of tripping of power systems in extreme weather, enhances the power grid's disaster resistance in extreme weather, avoids the separation of space-time information, and improves the accuracy and comprehensiveness of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167260A_ABST
    Figure CN119167260A_ABST
Patent Text Reader

Abstract

The invention provides a spatio-temporal data-based early warning method and a spatio-temporal data-based early warning system for an extreme weather-induced power failure, and aims to accurately and timely predict and warn possible influences and failures of an extreme weather event on a power system so as to improve the reliability and the toughness of the power system. The method comprises the following steps: firstly, collecting spatio-temporal data and other influence factors observed by a meteorological station, including but not limited to meteorological data, power grid structure and operation data, geographical and time data and the like; secondly, a ConvLstm-based deep space-time residual network is utilized to fuse space-time data and external factors to realize time-space two-dimensional prediction of meteorological characteristics, and an SMOTE-NC-NCL mixed sampling method is adopted to relieve data imbalance; afterwards, a complex relation between an extreme weather event and a power system fault is finally predicted and identified by using a LightGBM algorithm, early warning information is provided for a power grid in time, an electric power company is assisted to make a quick response and a decision, and the stability of power grid operation is ensured. Therefore, economic loss is reduced and social public safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system stability, and more specifically, to an early warning method and system for power failures induced by extreme weather based on spatiotemporal data. Background Art

[0002] In southern China, extreme weather events such as typhoons, heavy rains, droughts, icing of transmission lines and extreme heat have had a serious impact on the power grid and electricity supply. These weather conditions may cause transmission line breakage, tower collapse, equipment failure and overload, resulting in power system tripping and power supply difficulties.

[0003] In summer, high temperatures and droughts may cause water to dry up in hydropower stations, while in winter, severe ice may cover power transmission lines in some mountainous areas. In addition, continued high temperatures may increase the load on air conditioning systems and cooling equipment, leading to a surge in electricity demand. Extreme weather conditions may also cause power equipment failures, including damage to substations, transformers and cables. According to statistics, power grid failures caused by meteorological disasters have accounted for more than 60% of total failures.

[0004] In recent years, the probability of extreme weather events has increased significantly, and the scope and degree of impact of various extreme weather disasters on the power grid have further intensified. At the same time, with the rapid development of the power system and the access of various new energy sources, the operation mode of the power grid has become increasingly complex. The personal experience of the dispatcher alone is not enough to ensure the stable operation of the power system. At present, the power grid lacks efficient information processing technology after obtaining the original multi-dimensional meteorological information data. The existing technology can only predict the tripping of the power system from a single dimension of time or space, and fails to fully explore the correlation between meteorological factors, distribution lines and equipment, geographical environment and time data and the operation status of the power grid. It fails to quickly and accurately identify whether a power tripping event will occur in extreme meteorological events and pre-correction control in advance, and the ability to assess the risk situation of power grid operation under extreme weather is insufficient. Summary of the invention

[0005] The present invention is mainly aimed at the above-mentioned background technology. The existing technology can only predict the tripping of the power system from a single dimension of time or space, and fails to fully explore the correlation between meteorological factors, distribution lines and equipment, geographical environment and time data and the operation status of the power grid. The present invention provides an extreme weather-induced power failure early warning method and system based on spatiotemporal data. The method combines meteorological spatiotemporal data, geographical environment and time data to train the ConvLstm deep spatiotemporal residual network to predict meteorological characteristics in time and space dimensions, and uses the LightGBM algorithm to warn the tripping of the power system under extreme weather according to the predicted meteorological characteristics and other factors, avoiding the fragmentation of spatiotemporal attribute information. The method mainly includes the following steps:

[0006] S1: Collect spatiotemporal data of meteorological observations and other influencing factors at specified time intervals at meteorological stations in the power grid area;

[0007] S2: preprocess the data in step S1 and divide it into a training set and a test set;

[0008] S3: Build a deep spatiotemporal residual network based on ConvLstm, define the loss function and optimizer, define the learning rate parameters, use the preprocessed data in S2 to perform multiple iterative training of the model, retain the best model structure and parameters after testing, and finally obtain the meteorological factor prediction results of a certain area at a certain time in the future;

[0009] S4: Perform the SMOTE-NC-NCL hybrid resampling method on the imbalanced data to obtain balanced training samples;

[0010] S5: Build a power system tripping warning model under extreme weather conditions based on LightGBM, define hyperparameters such as the maximum number of boxes, learning rate, and decision tree depth, and iteratively train the model using the new data set in S4. After the model is stable, evaluate the model with the test set data and retain the best model and parameters.

[0011] S6: The spatiotemporal data observed by the weather station are preprocessed in S2 and input into the deep spatiotemporal residual network based on ConvLstm to obtain the predicted meteorological data. Combined with other influencing factors, the predicted meteorological data is input into the power system tripping warning model under extreme weather conditions based on LightGBM to predict whether a tripping event will occur in the power system in a certain area at a certain time.

[0012] The step S1 is to collect the meteorological observation spatiotemporal data and other influencing factors at the specified time intervals of the meteorological stations in the power grid area, and the step S1 is further as follows:

[0013] S1.1: Collect meteorological observation data every 60 minutes in the past ten years from the power and meteorological multi-source database of the power grid area, divide the target area geographically into 256*256 grids, and then collect meteorological observation data every 60 minutes for the grid.

[0014] S1.2: Simultaneously obtain the geographical features of the target area at the same time, other influencing factors of the power grid status information and time information, and whether a tripping event occurs in the power system at the current time.

[0015] The step S2 preprocesses the data in step S1 and divides it into a training set and a test set. The step S2 further comprises:

[0016] S2.1: Divide the dataset into two sets, training set and test set, perform necessary transformations on the data, and encode categorical variables.

[0017] S2.2: Clean the data, remove missing and abnormal data from the collection, and normalize the data.

[0018] The step S3 is to construct a deep spatiotemporal residual network based on ConvLstm, and the step S3 is further:

[0019] S3.1: The preprocessed data in S2 are divided into the current group, the nearest group and the distant group according to the proximity to the prediction time, and the meteorological factors and geographical environment in their respective raster data are respectively sent to the spatiotemporal residual network with the same structure.

[0020] S3.2: The spatiotemporal residual networks of the three groups have the same structure, which contains L residual units. The residual unit consists of Relu activation function, ConvLstm and residual. The current group, the nearest group and the distant group data are output through this structure respectively. c , X p , X q .

[0021] S3.3: The time information in S1 is stored in a vector of length 6, where the first 4 values ​​are the seasons, the 5th value indicates whether it is a weekend, and the 6th value indicates the time of day (hour). The output is X after two fully connected layers. Ext .

[0022] S3.4: Fuse the output results of the three spatiotemporal residual networks in S3.2. The specific fusion formula is as follows:

[0023]

[0024] Where X Res is the output obtained by fusion of three spatiotemporal residual networks, W c , W q , W p is a learnable parameter, Multiply the corresponding positions of two matrices.

[0025] S3.5: X Res With X Ext Perform addition fusion and apply tanh activation function to the result of addition to control the output of the final network to the interval [-1,1], which is the predicted value of the meteorological factor at time t. The specific fusion formula and tanh calculation formula are as follows:

[0026]

[0027] S3.6: Select mean square error as the loss function and adaptive matrix estimation Adam as the optimizer to help the model iterative convergence by minimizing the mean square error between the predicted meteorological factor matrix and the real meteorological factor matrix. Finally, the meteorological factor prediction result of a certain area at a certain time in the future is obtained. The specific mean square error calculation formula is as follows:

[0028]

[0029] in The meteorological factor at time t is the value predicted by the model, X t is the true value of the meteorological factor at time t.

[0030] The step S4 performs mixed resampling on the imbalanced data set, and the step S4 is further as follows:

[0031] S4.1: Perform mixed resampling on the training set obtained in S2, set the target ratio of minority class to majority class in the new data for SMOTE-NC-NCL mixed resampling, and calculate the number of samples to be added and removed for mixed resampling. The specific calculation formula is as follows:

[0032] N = round[(k 1 ·n 0 )-(k 0 ·n 1 )]

[0033] Where n 0 ,n 1 Represents the number of majority and minority classes in the original unbalanced data, k 0 , k 1 is the proportion of majority class and minority class in the new data set, k 0 +k 1 =1, round means rounding to the nearest integer.

[0034] S4.2: Perform SMOTE-NC oversampling on the minority class sample set. s =[x s1 ,x s2 ,…,x sn ], X si =[x si1 ,x si2 ,…,x sim ,…,x sin ] T is the i-th (i=1,2,…,n) minority class sample instance, x si1 ,x si2 ,…,x sim For x i The m continuous numerical feature values ​​of xsi(m+1) ,x si(m+2) ,…,x sin is the nm discrete feature attributes. First, calculate all continuous numerical features x si1 ,s si2 ,…,x sim The median of the standard deviation of is denoted as Med. Then find x based on the nearest neighbor calculation si Finally, the random linear interpolation method is used for continuous features and discrete features respectively, and the mode of discrete features in the neighboring samples is selected to construct the N new data calculated in S4.1. Specifically, the minority class x is calculated si and x sj The distance formula and linear interpolation formula are as follows:

[0035]

[0036] Where d is x si and x sj The number of discrete feature differences between them, according to this formula, we get 5 neighboring samples of the minority class

[0037]

[0038] where x si =(x si1 ,x si2 ,…,x sim ) T , rand(0,1) represents a random number in the interval (0,1). for Random points in .

[0039] S4.3: Perform NCL under-sampling operation on the new sample set obtained after S4.2 operation, and use the same distance calculation method as S4.2 to obtain 3 neighboring samples. When the sample belongs to the majority class and there are more than 2 minority classes among the 3 neighboring samples, remove the sample. When the sample belongs to the minority class and there are more than 2 majority classes among the 3 neighboring samples, remove the majority class of the neighboring samples to obtain a balanced training set.

[0040] The step S5 is to construct the power system tripping warning model under extreme weather conditions of LightGBM, and the step S5 is further as follows:

[0041] S5.1: Set the initial prediction value and calculate the logarithmic probability of the data label for the new training set obtained in S4 as the initial prediction value of all samples, that is, the prediction result of the first tree.

[0042] S5.2: Define the loss function as a logarithmic loss function. For a given sample set, the prediction probability is obtained through decision tree prediction and sigmoid activation. The specific loss function calculation formula is:

[0043]

[0044] where y i is the true label of sample i (0 or 1), F(x i ) is the decision tree for data x i The model then calculates the negative gradient of the loss function for each data point. For the i-th sample, the specific negative gradient calculation formula is:

[0045]

[0046] in is the probability of the final prediction being the positive class, r m,i is the negative gradient corresponding to the i-th sample of the m-th tree, that is, the residual, which is used as the target of the next decision tree learning for this sample.

[0047] S5.3: Perform gradient-based unilateral sampling. Sort the samples in descending order according to the gradient calculated in S5.2. Keep the large gradient samples of the first a*100%, randomly sample the small gradients of b*100%, and finally enlarge the small gradient samples. Get a new data set.

[0048] S5.4: Build and learn the decision tree based on the new data set obtained in S5.3. Each sample label becomes the gradient value of the sample. Use histogram statistics and set the number of boxes to find the optimal split point of the feature. Traverse each feature and its histogram and calculate the reduction of the sum of square errors of the left and right subsets relative to the current node, and select the best split node with the greatest benefit.

[0049] S5.5: Use the leaf-based growth strategy, select the leaf that can bring the greatest gain for splitting each time, and continue splitting until the maximum depth of the tree is reached or the sample labels on the nodes are consistent, and then get a new decision tree.

[0050] S5.6: Assign parameters to each leaf node in the new decision tree obtained in S5.5 to fit the residual. The specific calculation formula is as follows:

[0051]

[0052] where c m,j The jth leaf node of the mth tree is the best residual fitting value, x i is the sample in the leaf node of the tree, r m,i is the negative gradient corresponding to the i-th sample of the m-th tree, yi is the true label of sample i.

[0053] S5.7: Update the predicted value of each data point, multiply the new decision tree output of each sample in S5.6 by the learning rate and add it to the previous predicted value, and activate it with the sigmoid function to get the new predicted probability. Repeat steps S5.2 to S5.7, and iterate the model continuously until the loss function size is no longer significantly reduced or the maximum number of training rounds is reached.

[0054] S5.8: After the model training is stable, input the test set data into the model and evaluate the performance of the model based on the binary classification mixing matrix. Save the model structure and parameters with better results as the target for system model loading.

[0055] Compared with the existing research, the present invention has the following advantages:

[0056] 1. The present invention uses the SMOTE-NC-NCL hybrid resampling method to reasonably improve the data imbalance problem of the power system tripping events that account for a small proportion, so that the LightGBM model's recognition ability for minority classes is further enhanced.

[0057] 2. The present invention proposes a meteorological factor prediction method based on the ConvLstm deep spatiotemporal residual network, which combines meteorological spatiotemporal data, geographical environment and time data to realize the prediction of meteorological factors in a certain area at a certain time.

[0058] 3. The ConvLstm-based deep spatiotemporal residual network adopted in the present invention can take into account the spatiotemporal attributes of the data, avoid the fragmentation of the spatiotemporal attributes, and make the prediction results more accurate and comprehensive.

[0059] 4. The present invention predicts the tripping of power systems under extreme weather conditions based on the LightGBM model, explores the correlation between meteorological factors, distribution lines and equipment, geographical environment and the operating status of the power grid, provides timely early warning information for the power grid, assists power companies in making quick responses and decisions, and enhances the power grid's disaster resistance before extreme weather. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a workflow diagram of an extreme weather-induced power failure early warning method and system based on spatiotemporal data.

[0061] Figure 2 It is a flow chart of oversampling mixed with resampling.

[0062] Figure 3 It is a flow chart of undersampling with mixed resampling.

[0063] Figure 4This is a schematic diagram of the spatiotemporal residual network structure based on ConvLstm.

[0064] Figure 5 It is a schematic diagram of the residual unit based on ConvLstm.

[0065] Figure 6 This is a flowchart for training a power system tripping warning model under extreme weather conditions based on LightGBM. Specific implementation plan

[0066] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the examples described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0067] The first aspect of the present invention provides a method and system for early warning of power failures induced by extreme weather based on spatiotemporal data, the working process of which is as follows: Figure 1 As shown, it includes the following steps:

[0068] S1: Collect spatiotemporal data of meteorological observations and other influencing factors at specified time intervals at meteorological stations in the power grid area;

[0069] S2: preprocess the data in step S1 and divide it into a training set and a test set;

[0070] S3: Build a deep spatiotemporal residual network based on ConvLstm, define the loss function and optimizer, define the learning rate parameters, use the preprocessed data in S2 to perform multiple iterations of model training, retain the best model structure and parameters after testing, and finally obtain the meteorological factor prediction results for a certain area at a certain time in the future. The spatiotemporal residual network structure and residual unit structure of ConvLstm are as follows: Figure 4 and Figure 5 As shown;

[0071] S4: Perform the SMOTE-NC-NCL hybrid resampling method on the imbalanced data to obtain balanced training samples, which includes oversampling the minority class in the training set and undersampling the majority class. The flowchart and steps of oversampling and undersampling are as follows: Figure 2 and Figure 3 As shown;

[0072] S5: Build a power system tripping warning model under extreme weather conditions based on LightGBM, define hyperparameters such as the maximum number of boxes, learning rate, and decision tree depth, use the new data set in S4 to iteratively train the model, and after the model is stable, use the test set data to evaluate the model, retain the best model and parameters, and build a flowchart of the LightGBM model as follows: Figure 6 As shown;

[0073] S6: The spatiotemporal data observed by the weather station are preprocessed in S2 and input into the deep spatiotemporal residual network based on ConvLstm to obtain the predicted meteorological data. Combined with other influencing factors, the predicted meteorological data is input into the power system tripping warning model under extreme weather conditions based on LightGBM to predict whether a tripping event will occur in the power system in a certain area at a certain time.

[0074] Step S1 collects the spatiotemporal data of meteorological observations in the power grid area and other influencing factors including:

[0075] S1.1: Collect meteorological observation data (wind speed, rainfall, temperature, humidity, and extreme weather types) every 60 minutes in the past ten years from the power and meteorological multi-source database of the power grid area, divide the target area geographically into 256*256 grids, and then collect meteorological observation data every 60 minutes for the grid.

[0076] S1.2: Simultaneously obtain the geographical features (altitude, vegetation volume), grid status information (line operation time, number of faults) and time information (season, whether it is the weekend, time of the day (hour)) of the target area at the same time, other influencing factors, and whether a tripping event occurs in the power system at the current time.

[0077] Step S2 preprocesses the data in step S1 and divides it into a training set and a test set, including:

[0078] S2.1: Divide the data set into two sets: training set and test set, perform necessary transformations on the data, and encode categorical variables. Use One-hot to convert extreme weather types, seasons, and whether it is a weekend into numerical values.

[0079] S2.2: Clean the data, remove missing and abnormal data from the collection, and normalize wind speed, rainfall, temperature, humidity, altitude, vegetation volume, and line operation time in grid units so that features with different value ranges play the same role.

[0080] Step S3 is the construction of a deep spatiotemporal residual network based on ConvLstm, including:

[0081] S3.1: The pre-processed data of S2 is divided into a current group, a nearest group and a distant group according to the proximity to the prediction time, and the meteorological factors and geographical environment in the respective grid data are respectively sent to the spatiotemporal residual network with the same structure. Specifically, the three groups in the present invention are divided by hour, day and week respectively.

[0082] S3.2: The three groups of spatiotemporal residual networks have the same structure, which contains L residual units. The residual unit consists of a Relu activation function, a ConvLstm and a residual. The specific spatiotemporal residual network and residual unit structure are as follows Figure 4 and Figure 5 The current group, the nearest group and the distant group data are output through this structure respectively as X c , X p , X q .

[0083] S3.3: The time information in S1 is stored in a vector of length 6, where the first 4 values ​​are the seasons, the 5th value indicates whether it is a weekend, and the 6th value indicates the time of day (hour). The output is X after two fully connected layers. Ext .

[0084] S3.4: Fuse the output results of the three spatiotemporal residual networks in S3.2. The specific fusion formula is as follows:

[0085]

[0086] Where X Res is the output obtained by fusion of three spatiotemporal residual networks, W c , W q , W p is a learnable parameter, Multiply the corresponding positions of two matrices.

[0087] S3.5: X Res With X Ext Perform addition fusion and apply tanh activation function to the result of addition to control the output of the final network to the interval [-1,1], which is the predicted value of the meteorological factor at time t. The specific fusion formula and tanh calculation formula are as follows:

[0088]

[0089] S3.6: Select mean square error as loss function and adaptive matrix estimation Adam as optimizer. Specifically, the learning rate of the present invention is set to 0.001, beat1=0.9, beat2=0.99, eps=1e-8, and the mean square error between the predicted meteorological factor matrix and the real meteorological factor matrix is ​​minimized to help the model iterative convergence. Finally, the meteorological factor prediction result of a certain area at a certain time in the future is obtained. The specific mean square error calculation formula is as follows:

[0090]

[0091] in The meteorological factor at time t is the value predicted by the model, X t is the true value of the meteorological factor at time t.

[0092] Step S4 performs mixed resampling on the imbalanced data set, including:

[0093] S4.1: Perform mixed resampling on the training set obtained in S2, set the target ratio of minority class to majority class in the new data for SMOTE-NC-NCL mixed resampling, and calculate the number of samples to be added and removed for mixed resampling. The specific calculation formula is as follows:

[0094] N = round[(k 1 ·n 0 )-(k 0 ·n 1 )]

[0095] Where n 0 ,n 1 Represents the number of majority and minority classes in the original unbalanced data, k 0 , k 1 is the proportion of majority class and minority class in the new data set, k 0 +k 1 =1, round means rounding to the nearest integer. Specifically, in the present invention, the number of original majority class samples and minority class samples =. Set k 1 =0.4. After calculation, we get the data N that needs to be added and deleted =

[0096] S4.2: Perform SMOTE-NC oversampling on the minority class sample set. s =[x s1 ,x s2 ,…,x sn ], X si =[x si1 ,x si2 ,…,x sim ,…,x sin ] Tis the i-th (i=1,2,…,n) minority class sample instance, x si1 ,x si2 ,…,x sim For x i The m continuous numerical feature values ​​of x si(m+1) ,x si(m+2) ,…,x sin is the nm discrete feature attributes. First, calculate all continuous numerical features x si1 ,x si2 ,…,x sim The median of the standard deviation of is denoted as Med. Then find x based on the nearest neighbor calculation si Finally, the random linear interpolation method is used for continuous features and discrete features respectively, and the mode of discrete features in the neighboring samples is selected to construct the N new data calculated in S4.1. Specifically, the minority class x is calculated si and x sj The distance formula and linear interpolation formula are as follows:

[0097]

[0098] Where d is x si and x sj The number of discrete feature differences between them, according to this formula, we get 5 neighboring samples of the minority class

[0099]

[0100] where x si =(x si1 ,x si2 ,…,x sim ) T , rand(0,1) represents a random number in the interval (0,1). for Random points in .

[0101] S4.3: Perform NCL under-sampling operation on the new sample set obtained after S4.2 operation, and use the same distance calculation method as S4.2 to obtain 3 neighboring samples. When the sample belongs to the majority class and there are more than 2 minority classes among the 3 neighboring samples, remove the sample. When the sample belongs to the minority class and there are more than 2 majority classes among the 3 neighboring samples, remove the majority class of the neighboring samples to obtain a balanced training set.

[0102] Step S5 is the construction steps of the LightGBM power system tripping warning model under extreme weather conditions, including:

[0103] S5.1: Set the initial prediction value. Calculate the logarithmic probability of the data label for the new training set obtained in S4 and convert it through the sigmoid function as the initial prediction value of all samples, that is, the prediction result of the first tree. The specific formula for calculating the initial prediction value is:

[0104]

[0105] Wherein p is the probability of a tripping event, and the initial prediction value of the present invention is calculated to be.

[0106] S5.2: Define the loss function as a logarithmic loss function. For a given sample set, the prediction probability is obtained through decision tree prediction and sigmoid activation. The specific loss function calculation formula is:

[0107]

[0108] where y i is the true label of sample i (0 or 1), F(x i ) is the decision tree for data x i The model then calculates the negative gradient of the loss function for each data point. For the i-th sample, the specific negative gradient calculation formula is:

[0109]

[0110] in is the probability of the final prediction being the positive class, r m,i is the negative gradient corresponding to the i-th sample of the m-th tree, that is, the residual, which is used as the target of the next decision tree learning for this sample.

[0111] S5.3: Perform gradient-based unilateral sampling. Sort the samples in descending order according to the gradient calculated in S5.2. Keep the large gradient samples of the first a*100%, randomly sample the small gradients of b*100%, and finally enlarge the small gradient samples. Get a new data set.

[0112] S5.4: According to the new data set obtained in S5.3, the decision tree is constructed and learned. Each sample label becomes the gradient value of the sample. Histogram statistics are used to set the number of boxes to find the optimal split point of the feature. Each feature and its histogram are traversed and the sum of the square errors of the left and right subsets is calculated relative to the current node. The optimal partition node with the greatest benefit is selected. The specific maximum number of boxes of the present invention is.

[0113] S5.5: Adopt the leaf-based growth strategy, select the leaf that can bring the greatest gain for splitting each time, and continue splitting until the maximum depth of the tree is reached or the sample labels on the nodes are consistent, and then obtain a new decision tree. Specifically, the maximum depth of the decision tree of the present invention is.

[0114] S5.6: Assign parameters to each leaf node in the new decision tree obtained in S5.5 to fit the residual. The specific calculation formula is as follows:

[0115]

[0116] where c m,j The jth leaf node of the mth tree is the best residual fitting value, x i is the sample in the leaf node of the tree, r m,i is the negative gradient corresponding to the i-th sample of the m-th tree, y i is the true label of sample i.

[0117] S5.7: Update the predicted value result of each data point, multiply the new decision tree output of each sample in S5.6 by the learning rate and add it to the previous predicted value to obtain a new predicted probability after activation by the sigmoid function. Repeat steps S5.2 to S5.7, and continuously iterate the model until the loss function size is no longer significantly reduced or the maximum training round is reached. The specific learning rate of the present invention is set to, and the maximum training round is.

[0118] S5.8: After the model training is stable, the data of the test set is input into the model, and the performance of the model is evaluated based on the binary classification mixed matrix. The model structure and parameters with better effects are saved as the target of system model loading. Specifically, in the present invention, the parameters of the round with the highest accuracy in the test set during the training process are saved as the model parameters loaded by the power fault warning system.

[0119] The extreme weather-induced power failure early warning method and system based on spatiotemporal data provided by the present invention are of great significance for improving the operational stability of the Southern Power Grid and the disaster resistance of the power grid under extreme weather conditions.

[0120] Finally, it should be noted that the above-mentioned embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above-mentioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A warning method and system for extreme weather-induced power failures based on spatiotemporal data, It is characterized in that The following steps are involved: S1: Collect spatiotemporal data of meteorological observations and other influencing factors at specified time intervals at meteorological stations in the power grid area; S2: preprocess the data in step S1 and divide it into a training set and a test set; S3: Build a deep spatiotemporal residual network based on ConvLstm, define the loss function and optimizer, define the learning rate parameters, use the preprocessed data in S2 to perform multiple iterative training of the model, retain the best model structure and parameters after testing, and finally obtain the meteorological factor prediction results of a certain area at a certain time in the future; S4: Perform the SMOTE-NC-NCL hybrid resampling method on the imbalanced data to obtain balanced training samples; S5: Build a power system tripping warning model under extreme weather conditions based on LightGBM, define hyperparameters such as the maximum number of boxes, learning rate, and decision tree depth, and iteratively train the model using the new data set in S4. After the model is stable, evaluate the model with the test set data and retain the best model and parameters. S6: The spatiotemporal data observed by the meteorological station are preprocessed in S2 and input into the deep spatiotemporal residual network based on ConvLstm to obtain the predicted meteorological data. Combined with other influencing factors, the predicted meteorological data is input into the power system tripping warning model under extreme weather conditions based on LightGBM to predict whether a tripping event will occur in the power system in a certain area at a certain time.

2. The method according to claim 1, Features: Step S1 is to collect the spatiotemporal data of meteorological observations and other influencing factors at a specified time interval of the meteorological station in the power grid area, and the step S1 is further as follows: S1.1: Collect meteorological observation data every 60 minutes in the past ten years from the power and meteorological multi-source database of the power grid area, divide the target area geographically into 256*256 grids, and then collect meteorological observation data every 60 minutes for the grid. S1.2: Simultaneously obtain the geographical features of the target area at the same time, other influencing factors of the power grid status information and time information, and whether a tripping event occurs in the power system at the current time.

3. The method according to claim 1, Features: Step S2 preprocesses the data in step S1 and divides it into a training set and a test set. Step S2 further comprises: S2.1: Divide the dataset into two sets, training set and test set, perform necessary transformations on the data, and encode categorical variables. S2.2: Clean the data, remove missing and abnormal data from the collection, and normalize the data.

4. The method according to claim 1, Features: Step S3 is the construction of a deep spatiotemporal residual network based on ConvLstm, and the step S3 is further as follows: S3.1: The preprocessed data of S2 are divided into the current group, the nearest group and the distant group according to the proximity to the prediction time, and the meteorological factors and geographical environment in their respective raster data are respectively sent to the spatiotemporal residual network with the same structure. S3.2: The spatiotemporal residual networks of the three groups have the same structure, which contains L residual units. The residual unit consists of Relu activation function, ConvLstm and residual. The current group, the nearest group and the distant group data are output through this structure respectively. c , X p , X q . S3.3: The time information in S1 is stored in a vector of length 6, where the first 4 values ​​are the seasons, the 5th value indicates whether it is a weekend, and the 6th value indicates the time of day (hour). The output is X after two fully connected layers. Ext . S3.4: Fuse the output results of the three spatiotemporal residual networks in S3.

2. The specific fusion formula is as follows: Where X Res is the output obtained by fusion of three spatiotemporal residual networks, W c , W q , W p is a learnable parameter, and ° is the multiplication of the corresponding positions of the two matrices. S3.5: X Res With X Ext Perform addition fusion and apply tanh activation function to the result of addition to control the output of the final network to the interval [-1,1], which is the predicted value of the meteorological factor at time t. The specific fusion formula and tanh calculation formula are as follows: S3.6: Select mean square error as the loss function and adaptive matrix estimation Adam as the optimizer to help the model iterative convergence by minimizing the mean square error between the predicted meteorological factor matrix and the real meteorological factor matrix. Finally, the meteorological factor prediction result of a certain area at a certain time in the future is obtained. The specific mean square error calculation formula is as follows: in The meteorological factor at time t is the value predicted by the model, X t is the true value of the meteorological factor at time t.

5. The method according to claim 1, Features: Step S4 performs mixed resampling on the imbalanced data set, and the step S4 is further as follows: S4.1: Perform mixed resampling on the training set obtained in S2, set the target ratio of minority class to majority class in the new data for SMOTE-NC-NCL mixed resampling, and calculate the number of samples to be added and removed for mixed resampling. The specific calculation formula is as follows: N=round[(k 1 ·n 0 )-(k 0 ·n 1 )] Where n 0 ,n 1 Represents the number of majority and minority classes in the original unbalanced data, k 0 , k 1 is the proportion of majority class and minority class in the new data set, k 0 +k 1 =1, round means rounding to the nearest integer. S4.2: Perform SMOTE-NC oversampling on the minority class sample set. s =[x s1 ,x s2 ,…,x sn ], X si =[x si1 ,x si2 ,…,x sim ,…,x sin ] T is the i-th (i=1,2,…,n) minority class sample instance, x si1 ,x si2 ,…,x sim For x i The m continuous numerical feature values ​​of s si(m+1) ,x si(m+2) ,…,x sin is the nm discrete feature attributes. First, calculate all continuous numerical features x si1 ,x si2 ,…,x sim The median of the standard deviation of is denoted as Med. Then find x based on the nearest neighbor calculation si Finally, the random linear interpolation method is used for continuous features and discrete features respectively, and the mode of discrete features in the neighboring samples is selected to construct the N new data calculated in S4.

1. Specifically, the minority class x is calculated si and x sj The distance formula and linear interpolation formula are as follows: Where d is x si and x sj The number of discrete feature differences between them, according to this formula, we get 5 neighboring samples of the minority class in rand(0,1) represents a random number in the interval (0,1). for Random points in . S4.3: Perform NCL under-sampling operation on the new sample set obtained after S4.2 operation, and use the same distance calculation method as S4.2 to obtain 3 neighboring samples. When the sample belongs to the majority class and there are more than 2 minority classes among the 3 neighboring samples, remove the sample. When the sample belongs to the minority class and there are more than 2 majority classes among the 3 neighboring samples, remove the majority class of the neighboring samples to obtain a balanced training set.

6. The method according to claim 1, Features: Step S5 is the construction of the LightGBM power system tripping warning model under extreme weather conditions, and the step S5 is further as follows: S5.1: Set the initial prediction value and calculate the logarithmic probability of the data label for the new training set obtained in S4 as the initial prediction value of all samples, which is the prediction result of the first tree. S5.2: Define the loss function as a logarithmic loss function. For a given sample set, the prediction probability is obtained through decision tree prediction and sigmoid activation. The specific loss function calculation formula is: where y i is the true label of sample i (0 or 1), F(x i ) is the decision tree for data x i The model then calculates the negative gradient of the loss function for each data point. For the i-th sample, the specific negative gradient calculation formula is: in is the probability of the final prediction being the positive class, r m,i is the negative gradient corresponding to the i-th sample of the m-th tree, that is, the residual, which is used as the target of the next decision tree learning for this sample. S5.3: Perform gradient-based unilateral sampling. Sort the samples in descending order according to the gradient calculated in S5.

2. Keep the large gradient samples of the first a*100%, randomly sample the small gradients of b*100%, and finally enlarge the small gradient samples. Get a new data set. S5.4: Build and learn the decision tree based on the new data set obtained in S5.

3. Each sample label becomes the gradient value of the sample. Use histogram statistics and set the number of boxes to find the optimal split point of the feature. Traverse each feature and its histogram and calculate the reduction of the sum of square errors of the left and right subsets relative to the current node, and select the best split node with the greatest benefit. S5.5: Use the leaf-based growth strategy, select the leaf that can bring the greatest gain for splitting each time, and continue splitting until the maximum depth of the tree is reached or the sample labels on the nodes are consistent, and then get a new decision tree. S5.6: Assign parameters to each leaf node in the new decision tree obtained in S5.5 to fit the residual. The specific calculation formula is as follows: where c m,j The jth leaf node of the mth tree is the best residual fitting value, x i is the sample in the leaf node of the tree, r m,i is the negative gradient corresponding to the i-th sample of the m-th tree, y i is the true label of sample i. S5.7: Update the predicted value of each data point, multiply the new decision tree output of each sample in S5.6 by the learning rate and add it to the previous predicted value, and activate it with the sigmoid function to get the new predicted probability. Repeat steps S5.2 to S5.7, and iterate the model continuously until the loss function size is no longer significantly reduced or the maximum number of training rounds is reached. S5.8: After the model training is stable, input the test set data into the model and evaluate the performance of the model based on the binary classification mixing matrix. Save the model structure and parameters with better results as the target for system model loading.

Citation Information

Patent Citations

  • Motor-vehicle tail-gas concentration prediction method of LSTM-based deep space-time residual-network

    CN108288109A

  • Cooperative energy detection spectrum sensing method based on Lightgbm algorithm

    CN110365435A

  • Method and device for diagnosing fault sensor

    CN113091872A

  • Risk prediction and early warning method based on key elements of distribution network

    CN114997658A

  • GBDT-based integrated learning method and apparatus, and electronic device

    CN116204780A

Cited By

  • Power transmission channel abnormal condition monitoring and early warning method and system

    CN120068931A

  • Power distribution network reconstruction scheme optimization method and system based on visualization and power failure parameters

    CN120297516A

  • Distribution network transformation plan optimization method and system based on visualization and power outage parameters

    CN120297516B

  • New energy electric power meteorological prediction method and device based on multi-modal large model

    CN121031916A