Cloud-edge collaborative smart power grid fault processing method, device and equipment and storage medium

Through the cloud-edge collaboration smart grid fault treatment method, recurrent neural network analyzes grid fault data, solves the problem of untimely and low accuracy of grid fault analysis, improves fault detection efficiency and accuracy, and enhances the self-healing ability of the grid .

CN119202790AInactive Publication Date: 2024-12-27HUBEI JINGLI ELECTRIC POWER GRP CO LTD +1

Patent Information

Application Number
CN202411283917.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing power grid fault analysis technology has problems such as untimely failures and low analysis accuracy. The traditional centralized data acquisition and analysis response speed is slow, and information islands and resource utilization are insufficient.

Method used

Using cloud-edge collaboration smart grid fault treatment method, by collecting grid fault data and parameter time series, establishing a recursive neural network (RNN) model, predicting and analyzing fault types and levels, combining cloud computing and edge computing technology to achieve real-time Monitoring and decision making.

Benefits of technology

It significantly improves the efficiency and accuracy of fault detection, reduces false alarms and missed reports, enhances the self-healing ability and flexibility of the power grid, and supports the safe and stable operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202790A_ABST
    Figure CN119202790A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud-side collaborative smart grid fault processing method, device and equipment and a storage medium, and belongs to the technical field of grid fault analysis, and the method comprises the steps: reading historical data, obtaining grid fault data, and obtaining grid parameters, the parameter time sequence is formed by power grid parameters at multiple time points, an analysis module is established, a recurrent neural network (RNN) is established according to the power grid fault data and the power grid parameters, the input of the recurrent neural network (RNN) is the parameter time sequence, and the input of the recurrent neural network (RNN) is the parameter time sequence; the output of the recurrent neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels, and the power grid fault analysis scheme based on the RNN neural network can significantly improve the efficiency and accuracy of fault detection, and provides powerful support for safe and stable operation of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power grid fault analysis, and specifically relates to a cloud-edge collaborative smart grid fault processing method, device, equipment and storage medium. Background Art

[0002] With the rapid development of smart grid technology, the reliability and stability of power systems have become increasingly important. Smart grids integrate advanced information communication and automation technologies to achieve real-time monitoring, control and management of power systems. However, the power grid still faces various faults and emergencies during operation, which not only affect the stability of power supply, but also may cause serious damage to equipment and users. Therefore, timely and effective fault handling methods are particularly critical.

[0003] Traditional power grid fault handling methods mainly rely on centralized data collection and analysis, which has problems such as slow response, information islands, and insufficient resource utilization. With the development of cloud computing and edge computing technologies, cloud-edge collaborative fault handling methods have gradually become a new solution. Cloud computing provides powerful data storage and processing capabilities, while edge computing can perform real-time analysis and decision-making close to the data source, significantly improving the speed of fault detection and response.

[0004] In the application scenario of smart grid, cloud-edge collaboration can realize rapid data collection, real-time analysis and intelligent decision-making. Edge devices can monitor the operation status of the power grid in real time, identify faults in time and perform preliminary processing, while the cloud is responsible for more complex data analysis and long-term fault prediction. This collaborative mode not only improves the efficiency of fault handling, but also enhances the self-healing ability and flexibility of the system. Summary of the invention

[0005] In order to solve the current technical problems of untimely analysis of power grid faults and low analysis accuracy, the present invention provides a cloud-edge collaborative smart grid fault processing method, device, equipment and storage medium.

[0006] First aspect

[0007] The present invention provides a cloud-edge collaborative smart grid fault processing method, comprising:

[0008] Collect grid fault data, including fault time, grid fault type and fault level, where the fault level is at least related to the apparent power of the line corresponding to the fault point. Multiple fault types are defined, such as short circuit, ground fault, overload, etc. Specifically, two-phase short circuit fault, three-phase short circuit fault, single-phase ground fault, two-phase ground fault, overload fault, etc. may be included.

[0009] Furthermore, the fault level is defined, and the fault severity is divided into mild, moderate and severe based on the line apparent power. By introducing the line apparent power, the scale of the line can be roughly characterized, which can effectively expand the data set and improve the accuracy of the training model.

[0010] In the fault analysis of power grid, the changes of voltage, current and frequency can generally be analyzed. For example, a short circuit fault usually causes a sharp increase in current and a drop in voltage. For example, the symmetrical component method can be used to analyze unbalanced faults (such as three-phase short circuits). By collecting historical fault data of the power grid and the corresponding power grid parameters, a data set for training a recurrent neural network (RNN) can be formed.

[0011] Furthermore, the cloud-edge collaborative smart grid fault handling method includes obtaining the time series of grid parameters, constructing a time window, and collecting grid parameters at multiple time points before the fault occurs, including: voltage (V), current (I), power (P), frequency (Hz), line impedance (Z), and harmonic components (H). Among them, sensors for obtaining grid parameters can be set at different nodes of the grid, such as substations, converters, or other grid line transfer and bifurcation nodes.

[0012] An analysis module is established, and a recursive neural network (RNN) is established based on the power grid fault data and the power grid parameters, wherein the input of the recursive neural network (RNN) is the parameter time series, and the output of the recursive neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels.

[0013] Optionally, a data cleaning step is also included to clean the power grid parameters, specifically including processing missing values ​​and abnormal values, marking missing values ​​so that they can be expanded in the subsequent data standardization process; prompting abnormal values, such as when the data value appears to be zero during non-fault periods or the data is significantly greater than the upper limit of the line load. By processing missing values ​​and abnormal values, data integrity and accuracy can be ensured.

[0014] Optionally, a data standardization step is also included to perform standardization processing on the power grid parameters. For example, the frequency (Hz) can be converted into a distribution with a mean of 0 and a standard deviation of 1.

[0015] Optionally, it also includes normalizing the grid parameters, such as scaling the voltage (V), current (I), and power (P) to a specific range (eg, [0, 1]).

[0016] Furthermore, the data is segmented and sequenced. The initially obtained power grid parameters include a series of time-related sequence data, but these data cannot be directly used as input for learning or processing by the recurrent neural network (RNN). Therefore, it is necessary to divide the long sequence data into shorter fixed-length subsequences to reduce the amount of information that the RNN needs to remember. The specific steps are as follows: Select an appropriate window size to divide the power grid parameter time series into multiple overlapping or non-overlapping time periods. Each time period is processed as an independent input sample, thereby reducing the long-distance dependencies that the model needs to capture.

[0017] The time series of line impedance and harmonic component parameters are filled. In the general power grid data obtained, the line impedance and harmonic component are generally not high-frequency sampling data. Therefore, when the power grid parameters are processed using the same sampling frequency, the line impedance and harmonic component parameters often have blank values ​​at certain sampling points. By using the filling technology, all sequences have the same length.

[0018] Furthermore, the above standardized and normalized data are stored in a Pandas DataFrame, and the fault type and fault level are converted into a classification format (such as one-hot encoding), where the number of RNN layers is 1-2 and the number of neurons in each layer is between 32 and 512.

[0019] The input of the recurrent neural network (RNN) is defined as the power grid parameter time series. The output of the recurrent neural network (RNN) is the probability of occurrence of the fault type and the probability of occurrence of each fault level.

[0020] Define the loss function and set a loss function suitable for multi-classification tasks, such as cross entropy loss. Cross entropy loss is a commonly used loss function that is used to evaluate the difference between the model output and the true label. Cross entropy loss measures the difference between one probability distribution and another probability distribution. In multi-classification problems, cross entropy loss can help us evaluate the similarity between the probability distribution predicted by the model (that is, the predicted probability of each category) and the actual category distribution (usually represented in one-hot encoding format).

[0021] The trained recurrent neural network (RNN) is integrated into the real-time power grid monitoring system and deployed in the cloud. The system receives power grid parameters collected by sensors at different nodes of the power grid. Based on real-time data, the recurrent neural network (RNN) monitors the power grid parameters and outputs the probability of occurrence of the fault type and the probability of occurrence of different fault levels in real time.

[0022] Further, a risk threshold k of the power grid fault type is determined, and a line where the probability of occurrence of the power grid fault type output by the recurrent neural network (RNN) is greater than the power grid parameter corresponding to k is marked as a line to be tested;

[0023] The historical load data corresponding to the line to be tested is obtained, and the minimum load operation time period is counted, and the line to be tested is shut down for detection during the minimum load time period or the frequency of obtaining power grid parameters is increased.

[0024] Furthermore, a line stop detection threshold kmax of the power grid fault type is determined; when the probability of occurrence of the power grid fault type corresponding to the line to be tested is greater than k and less than kmax, the frequency of obtaining power grid parameters for the line to be tested is increased during the minimum load time period; when the probability of occurrence of the power grid fault type corresponding to the line to be tested is greater than or equal to kmax, a line stop detection is performed on the line to be tested during the minimum load time period.

[0025] Furthermore, the frequency f of acquiring the power grid parameters is positively correlated with the cross entropy loss L.

[0026] Second aspect

[0027] The present invention provides a cloud-edge collaborative smart grid fault processing device, comprising:

[0028] A reading module, used to read historical data and obtain power grid fault data, wherein the power grid fault data includes fault time, power grid fault type and fault level, wherein the fault level is at least related to the line apparent power corresponding to the fault point;

[0029] An acquisition module, used for acquiring power grid parameters, wherein the power grid parameters include a parameter time series composed of power grid parameters at multiple time points before the fault time, wherein the power grid parameters at least include voltage (V), current (I), power (P), frequency (Hz), line impedance (Z), and harmonic component (H);

[0030] A modeling module, used to establish a recursive neural network (RNN) according to the power grid fault data and the power grid parameters, wherein the input of the recursive neural network (RNN) is the parameter time series, and the output of the recursive neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels;

[0031] A monitoring module is used to monitor the power grid parameters through the recursive neural network (RNN) and output the probability of occurrence of the fault type and the probability of occurrence of different fault levels in real time.

[0032] The third aspect

[0033] The present invention provides a computer device, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the cloud-edge collaborative smart grid fault handling method as described in the first aspect.

[0034] The fourth aspect

[0035] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the cloud-edge collaborative smart grid fault handling method as described in the first aspect is implemented.

[0036] Compared with the prior art, the present invention has at least the following beneficial technical effects:

[0037] In the present invention, time series data can be processed by a model based on RNN (recursive neural network). RNN can improve the accuracy of fault type identification and reduce false alarms and missed alarms by learning the temporal relationship in historical data. The power grid fault analysis scheme based on RNN neural network, combined with the probability of occurrence of fault types and the output of different fault levels, can significantly improve the efficiency and accuracy of fault detection, and provide strong support for the safe and stable operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The preferred implementation modes will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.

[0039] Figure 1 It is a flow chart of a cloud-edge collaborative smart grid fault handling method provided by the present invention.

[0040] Figure 2 It is a structural schematic diagram of a cloud-edge collaborative smart grid fault handling device provided by the present invention.

[0041] Figure 3 It is a structural schematic diagram of a computer device provided by the present invention. DETAILED DESCRIPTION

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0043] In order to simplify the drawings, only the parts related to the invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".

[0044] It should be further understood that the term “and / or” used in the present specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0045] In this document, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection. It can be a mechanical connection or an electrical connection. It can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0046] In addition, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0047] Example 1

[0048] In one embodiment, the reference specification Figure 1 , showing a flow chart of a cloud-edge collaborative smart grid fault handling method provided by the present invention. Figure 2 , showing a structural schematic diagram of a cloud-edge collaborative smart grid fault handling method provided by the present invention.

[0049] The present invention provides a cloud-edge collaborative smart grid fault processing method, comprising:

[0050] S1: Collecting grid fault data, including fault time, grid fault type and fault level, wherein the fault level is at least related to the apparent power of the line corresponding to the fault point. Among them, multiple fault types are defined, such as short circuit, ground fault, overload, etc. Specifically, two-phase short circuit fault, three-phase short circuit fault, single-phase ground fault, two-phase ground fault, overload fault, etc. may be included.

[0051] Furthermore, the fault level is defined, and the fault severity is divided into mild, moderate and severe based on the line apparent power. By introducing the line apparent power, the scale of the line can be roughly characterized, which can effectively expand the data set and improve the accuracy of the training model.

[0052] In the fault analysis of power grid, the changes of voltage, current and frequency can generally be analyzed. For example, a short circuit fault usually causes a sharp increase in current and a drop in voltage. For example, the symmetrical component method can be used to analyze unbalanced faults (such as three-phase short circuits). By collecting historical fault data of the power grid and the corresponding power grid parameters, a data set for training a recurrent neural network (RNN) can be formed.

[0053] S2: The cloud-edge collaborative smart grid fault handling method includes obtaining the time series of grid parameters, constructing a time window, and collecting grid parameters at multiple time points before the fault occurs, including: voltage (V), current (I), power (P), frequency (Hz), line impedance (Z), and harmonic components (H). Among them, sensors for obtaining grid parameters can be set at different nodes of the grid, such as substations, converters, or other grid line transfer and bifurcation nodes.

[0054] S3: Establish an analysis module, and establish a recursive neural network (RNN) based on the power grid fault data and the power grid parameters, wherein the input of the recursive neural network (RNN) is the parameter time series, and the output of the recursive neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels.

[0055] Long-term dependency is a common challenge when processing sequence data. Long-term dependency means that the model needs to learn the relationship between elements that are far apart in the input sequence. Traditional RNN (recurrent neural network) models are prone to gradient vanishing or gradient exploding problems when processing long sequences, which makes the model unable to effectively capture long-term dependent information. Therefore, it is necessary to preprocess the data to make the recurrent neural network (RNN) have higher accuracy and performance.

[0056] Optionally, a data cleaning step is also included to clean the power grid parameters, specifically including processing missing values ​​and abnormal values, marking missing values ​​so that they can be expanded in the subsequent data standardization process; prompting abnormal values, such as when the data value appears to be zero during non-fault periods or the data is significantly greater than the upper limit of the line load. By processing missing values ​​and abnormal values, data integrity and accuracy can be ensured.

[0057] Optionally, a data standardization step is also included to standardize the power grid parameters so that each parameter is on the same scale, which is conducive to model training. For example, the frequency (Hz) can be converted into a distribution with a mean of 0 and a standard deviation of 1.

[0058] Optionally, it also includes normalizing the grid parameters, scaling the voltage (V), current (I), and power (P) to a specific range (for example, [0, 1]). This processing can easily unify the scale of the grid, thereby providing better support for fault severity classification.

[0059] Furthermore, the data is segmented and sequenced. The initially obtained power grid parameters include a series of time-related sequence data, but these data cannot be directly used as input for learning or processing by the recurrent neural network (RNN). Therefore, it is necessary to divide the long sequence data into shorter fixed-length subsequences to reduce the amount of information that the RNN needs to remember. The specific steps are as follows: Select an appropriate window size to divide the power grid parameter time series into multiple overlapping or non-overlapping time periods. Each time period is processed as an independent input sample, thereby reducing the long-distance dependencies that the model needs to capture.

[0060] The time series of line impedance and harmonic component parameters are filled. In the general power grid data obtained, the line impedance and harmonic component are generally not high-frequency sampling data. Therefore, when the power grid parameters are processed using the same sampling frequency, the line impedance and harmonic component parameters often have blank values ​​at certain sampling points. By using the filling technology, all sequences have the same length.

[0061] Specifically, the specific filling method for line impedance and harmonic component parameters is: detect the blank value between two adjacent non-zero values ​​in the time series, interpolate the blank value, make the data points between the two non-zero values ​​form a collinear point together, and modify the blank value to the data value corresponding to the collinear point in the time series. By processing the blank value in this way, the non-high-frequency data can be aligned with other power grid parameters in the time series, thereby facilitating the training of the model and improving the performance of the model.

[0062] Furthermore, the above standardized and normalized data are stored in a Pandas DataFrame, and the fault type and fault level are converted into a classification format (such as one-hot encoding), where the number of RNN layers is 1-2 and the number of neurons in each layer is between 32 and 512.

[0063] The input of the recurrent neural network (RNN) is defined as the power grid parameter time series. The output of the recurrent neural network (RNN) is the probability of occurrence of the fault type and the probability of occurrence of each fault level.

[0064] Divide the collected power grid parameter time series into training set and test set, using 70% as training set and 30% as test set.

[0065] Define the loss function and set a loss function suitable for multi-classification tasks, such as cross entropy loss. Cross entropy loss is a commonly used loss function that is used to evaluate the difference between the model output and the true label. Cross entropy loss measures the difference between one probability distribution and another probability distribution. In multi-classification problems, cross entropy loss can help us evaluate the similarity between the probability distribution predicted by the model (that is, the predicted probability of each category) and the actual category distribution (usually represented in one-hot encoding format).

[0066] Assume that the output of the recurrent neural network (RNN) is a vector z = [z1, z2, …, z C ], where (C) is the number of categories.

[0067] Use the Softmax function to convert the output of the model into a probability distribution:

[0068]

[0069] Here, P(y=i|z) represents the conditional probability that a sample belongs to category (i) given an input feature vector (z). This value is the model's confidence that the sample belongs to category (i). zi represents the (i)th element in the category output by the model. It is the raw scores obtained by the last layer of the neural network (usually a fully connected layer), which are used to calculate the predicted probability of each category; This is the sum of all the category outputs after exponential operation, where (C) is the total number of categories, and this sum is used to normalize the probability of each category so that the sum of all the categories is 1. This ensures that the model outputs a valid probability distribution. j is an index that indicates the category that is currently being summed. It traverses all possible categories, from category 1 to category (C).

[0070] Through Softmax, we can get the probability of each category:

[0071] p=[P(y=1|z),P(y=2|z),…,P(y=C|z)]

[0072] The power grid fault type (y) is converted into a one-hot encoding. If there are three categories: short circuit, ground fault, and overload, and the true category of the sample is category 2, its one-hot encoding is represented as:

[0073] y=[0,1,0]

[0074] Calculate the cross entropy loss, specifically:

[0075]

[0076] Among them, (yi) is the value in the one-hot encoding (0 or 1), and P(y=i|z) is the probability predicted by the model. For a given sample, this term will only affect the loss when (yi=1).

[0077] The logits output is obtained through a recurrent neural network (RNN), and Softmax is applied to convert logits into probability distribution. The true label is further converted into a one-hot encoding, and the cross-entropy loss formula is used to calculate the difference between the model output and the true label. By introducing the cross-entropy loss, not only the correctness of the prediction is considered, but also the confidence of the prediction, thereby driving the model to learn in a better direction.

[0078] Select the SGD (Stochastic Gradient Descent) optimization algorithm to optimize the RNN, and set hyperparameters such as the learning rate. The learning rate is one of the most critical hyperparameters. Set the initial learning rate range to (10-3) to (10-5). After running 3 epochs, halve the learning rate. This means that the entire training data set is completely used by the model for one forward propagation and back propagation process.

[0079] Model training, use the training set to iteratively train the RNN, monitor the loss and accuracy during training, and evaluate the model performance on the test set, including accuracy and recall indicators.

[0080] Precision is the ratio of correctly predicted samples to all samples. Recall is the ratio of samples that are correctly predicted as positive among all samples that are actually positive. If there are 85 positive samples in reality and the model predicts 80 of them as positive (75 of them are true positive samples and 5 are false negative samples), then the recall is:

[0081]

[0082] The performance of the recursive neural network (RNN) analysis model in identifying different fault types and fault levels is analyzed through the confusion matrix. The confusion matrix can intuitively display the classification effect of the model and reveal possible problems with the model in specific categories.

[0083] Use confusion in machine learning libraries such as scikit-learn matrix Function to generate the confusion matrix, which is presented in the form of a two-dimensional table, where the rows represent the true categories and the columns represent the predicted categories, where:

[0084] True Positives (TP): On the diagonal, the number of samples that the model correctly predicts to be in the positive class.

[0085] False Positives (FP): The number of examples in the off-diagonal prediction columns where the model incorrectly predicted the negative class as positive.

[0086] True Negatives (TN): The number of examples in the off-diagonal rows outside the diagonal that the model correctly predicts to be negative.

[0087] False Negatives (FN): The number of examples in the off-diagonal true rows where the model incorrectly predicted the positive class as negative.

[0088]

[0089] S4: Integrate the trained recurrent neural network (RNN) into the real-time power grid monitoring system and deploy it in the cloud, receive power grid parameters collected by sensors at different nodes of the power grid, monitor the power grid parameters through the recurrent neural network (RNN) based on real-time data, and output the probability of occurrence of the fault type and the probability of occurrence of different fault levels in real time.

[0090] Further, a risk threshold k of the power grid fault type is determined, and a line where the probability of occurrence of the power grid fault type output by the recurrent neural network (RNN) is greater than the power grid parameter corresponding to k is marked as a line to be tested;

[0091] The historical load data corresponding to the line to be tested is obtained, and the minimum load operation time period is counted, and the line to be tested is shut down for detection during the minimum load time period or the frequency of obtaining power grid parameters is increased.

[0092] Example 2

[0093] Corresponding to a cloud-edge collaborative smart grid fault handling method in the above specific embodiment, refer to the attached manual Figure 2 , showing a structural schematic diagram of a cloud-edge collaborative smart grid fault handling device provided by the present invention.

[0094] A reading module, used to read historical data and obtain power grid fault data, wherein the power grid fault data includes fault time, power grid fault type and fault level, wherein the fault level is at least related to the line apparent power corresponding to the fault point;

[0095] An acquisition module, used for acquiring power grid parameters, wherein the power grid parameters include a parameter time series composed of power grid parameters at multiple time points before the fault time, wherein the power grid parameters at least include voltage (V), current (I), power (P), frequency (Hz), line impedance (Z), and harmonic component (H);

[0096] A modeling module, used to establish a recursive neural network (RNN) according to the power grid fault data and the power grid parameters, wherein the input of the recursive neural network (RNN) is the parameter time series, and the output of the recursive neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels;

[0097] A monitoring module is used to monitor the power grid parameters through the recursive neural network (RNN) and output the probability of occurrence of the fault type and the probability of occurrence of different fault levels in real time.

[0098] Wherein, the reading module can be used for:

[0099] Collect grid fault data, including fault time, grid fault type and fault level, where the fault level is at least related to the apparent power of the line corresponding to the fault point. Multiple fault types are defined, such as short circuit, ground fault, overload, etc. Specifically, two-phase short circuit fault, three-phase short circuit fault, single-phase ground fault, two-phase ground fault, overload fault, etc. may be included.

[0100] Furthermore, the fault level is defined, and the fault severity is divided into mild, moderate and severe based on the line apparent power. By introducing the line apparent power, the scale of the line can be roughly characterized, which can effectively expand the data set and improve the accuracy of the training model.

[0101] In the fault analysis of power grid, the changes of voltage, current and frequency can generally be analyzed. For example, a short circuit fault usually causes a sharp increase in current and a drop in voltage. For example, the symmetrical component method can be used to analyze unbalanced faults (such as three-phase short circuits). By collecting historical fault data of the power grid and the corresponding power grid parameters, a data set for training a recurrent neural network (RNN) can be formed.

[0102] The acquisition module can be used to obtain the time series of power grid parameters, build a time window, and collect power grid parameters at multiple time points before the fault occurs, including voltage (V), current (I), power (P), frequency (Hz), line impedance (Z), and harmonic components (H). Sensors for obtaining power grid parameters can be set at different nodes of the power grid, such as substations, converters, or other power grid line transfer and bifurcation nodes.

[0103] Long-term dependency is a common challenge when processing sequence data. Long-term dependency means that the model needs to learn the relationship between elements that are far apart in the input sequence. Traditional RNN (recurrent neural network) models are prone to gradient vanishing or gradient exploding problems when processing long sequences, which makes the model unable to effectively capture long-term dependent information. Therefore, it is necessary to preprocess the data to make the recurrent neural network (RNN) have higher accuracy and performance.

[0104] The modeling module includes:

[0105] The data cleaning step cleans the power grid parameters, including processing missing values ​​and outliers, marking missing values ​​so that they can be expanded in the subsequent data standardization process; and providing prompts for outliers, such as when the data value is zero during non-fault periods or the data is significantly greater than the upper limit of the line load. By processing missing values ​​and outliers, data integrity and accuracy can be ensured.

[0106] Optionally, a data standardization step is also included to standardize the power grid parameters so that each parameter is on the same scale, which is conducive to model training. For example, the frequency (Hz) can be converted into a distribution with a mean of 0 and a standard deviation of 1.

[0107] Optionally, it also includes normalizing the grid parameters, scaling the voltage (V), current (I), and power (P) to a specific range (for example, [0, 1]). This processing can easily unify the scale of the grid, thereby providing better support for fault severity classification.

[0108] Furthermore, the data is segmented and sequenced. The initially obtained power grid parameters include a series of time-related sequence data, but these data cannot be directly used as input for learning or processing by the recurrent neural network (RNN). Therefore, it is necessary to divide the long sequence data into shorter fixed-length subsequences to reduce the amount of information that the RNN needs to remember. The specific steps are as follows: Select an appropriate window size to divide the power grid parameter time series into multiple overlapping or non-overlapping time periods. Each time period is processed as an independent input sample, thereby reducing the long-distance dependencies that the model needs to capture.

[0109] The time series of line impedance and harmonic component parameters are filled. In the general power grid data obtained, the line impedance and harmonic component are generally not high-frequency sampling data. Therefore, when the power grid parameters are processed using the same sampling frequency, the line impedance and harmonic component parameters often have blank values ​​at certain sampling points. By using the filling technology, all sequences have the same length.

[0110] Specifically, the specific filling method for line impedance and harmonic component parameters is: detect the blank value between two adjacent non-zero values ​​in the time series, interpolate the blank value, make the data points between the two non-zero values ​​form a collinear point together, and modify the blank value to the data value corresponding to the collinear point in the time series. By processing the blank value in this way, the non-high-frequency data can be aligned with other power grid parameters in the time series, thereby facilitating the training of the model and improving the performance of the model.

[0111] Furthermore, the above standardized and normalized data are stored in a Pandas DataFrame, and the fault type and fault level are converted into a classification format (such as one-hot encoding), where the number of RNN layers is 1-2 and the number of neurons in each layer is between 32 and 512.

[0112] The input of the recurrent neural network (RNN) is defined as the power grid parameter time series. The output of the recurrent neural network (RNN) is the probability of occurrence of the fault type and the probability of occurrence of each fault level.

[0113] Divide the collected power grid parameter time series into training set and test set, using 70% as training set and 30% as test set.

[0114] Define the loss function and set a loss function suitable for multi-classification tasks, such as cross entropy loss. Cross entropy loss is a commonly used loss function that is used to evaluate the difference between the model output and the true label. Cross entropy loss measures the difference between one probability distribution and another probability distribution. In multi-classification problems, cross entropy loss can help us evaluate the similarity between the probability distribution predicted by the model (that is, the predicted probability of each category) and the actual category distribution (usually represented in one-hot encoding format).

[0115] Assume that the output of the recurrent neural network (RNN) is a vector z = [z1, z2, …, z C ], where (C) is the number of categories.

[0116] Use the Softmax function to convert the output of the model into a probability distribution:

[0117]

[0118] Here, P(y=i|z) represents the conditional probability that a sample belongs to category (i) given an input feature vector (z). This value is the model's confidence that the sample belongs to category (i). zi represents the (i)th element in the category output by the model. It is the raw scores obtained by the last layer of the neural network (usually a fully connected layer), which are used to calculate the predicted probability of each category; This is the sum of all the category outputs after exponential operation, where (C) is the total number of categories, and this sum is used to normalize the probability of each category so that the sum of all the categories is 1. This ensures that the model outputs a valid probability distribution. j is an index that indicates the category that is currently being summed. It traverses all possible categories, from category 1 to category (C).

[0119] Through Softmax, we can get the probability of each category:

[0120] p=[P(y=1|z),P(y=2|z),…,P(y=C|z)]

[0121] Convert the power grid fault type (y) into a one-hot encoding. If there are three types: short circuit, ground fault, and overload, and the true category of the sample is category 2, then its one-hot encoding is represented as:

[0122] y=[0,1,0]

[0123] Calculate the cross entropy loss, specifically:

[0124]

[0125] Among them, (yi) is the value in the one-hot encoding (0 or 1), and P(y=i|z) is the probability predicted by the model. For a given sample, this term will only affect the loss when (yi=1).

[0126] The logits output is obtained through a recurrent neural network (RNN), and Softmax is applied to convert logits into probability distribution. The true label is further converted into a one-hot encoding, and the cross-entropy loss formula is used to calculate the difference between the model output and the true label. By introducing the cross-entropy loss, not only the correctness of the prediction is considered, but also the confidence of the prediction, thereby driving the model to learn in a better direction.

[0127] Select the SGD (Stochastic Gradient Descent) optimization algorithm to optimize the RNN, and set hyperparameters such as the learning rate. The learning rate is one of the most critical hyperparameters. Set the initial learning rate range to (10-3) to (10-5). After running 3 epochs, halve the learning rate. This means that the entire training data set is completely used by the model for one forward propagation and back propagation process.

[0128] Model training, use the training set to iteratively train the RNN, monitor the loss and accuracy during training, and evaluate the model performance on the test set, including accuracy and recall indicators.

[0129] Precision is the ratio of correctly predicted samples to all samples. Recall is the ratio of samples that are correctly predicted as positive among all samples that are actually positive. If there are 85 positive samples in reality and the model predicts 80 of them as positive (75 of them are true positive samples and 5 are false negative samples), then the recall is:

[0130]

[0131] The performance of the recursive neural network (RNN) analysis model in identifying different fault types and fault levels is analyzed through the confusion matrix. The confusion matrix can intuitively display the classification effect of the model and reveal possible problems with the model in specific categories.

[0132] Using confusion from the scikit-learn library matrix Function to generate the confusion matrix, which is presented in the form of a two-dimensional table, where the rows represent the true categories and the columns represent the predicted categories, where:

[0133] True Positives (TP): On the diagonal, the number of samples that the model correctly predicts to be in the positive class.

[0134] False Positives (FP): The number of examples in the off-diagonal prediction columns where the model incorrectly predicted the negative class as positive.

[0135] True Negatives (TN): The number of examples in the off-diagonal rows outside the diagonal that the model correctly predicts to be negative.

[0136] False Negatives (FN): The number of examples in the off-diagonal true rows where the model incorrectly predicted the positive class as negative.

[0137]

[0138] The monitoring module includes integrating a trained recursive neural network (RNN) into a real-time power grid monitoring system and deploying it in the cloud, receiving power grid parameters collected by sensors at different nodes of the power grid, and performing real-time prediction and diagnosis of fault types and levels through a recursive neural network (RNN) based on real-time data.

[0139] Further, a risk threshold k of the power grid fault type is determined, and a line where the probability of occurrence of the power grid fault type output by the recurrent neural network (RNN) is greater than the power grid parameter corresponding to k is marked as a line to be tested;

[0140] The historical load data corresponding to the line to be tested is obtained, and the minimum load operation time period is counted, and the line to be tested is shut down for detection during the minimum load time period or the frequency of obtaining power grid parameters is increased.

[0141] Furthermore, a line stop detection threshold kmax of the power grid fault type is determined; when the probability of occurrence of the power grid fault type corresponding to the line to be tested is greater than k and less than kmax, the frequency of obtaining power grid parameters for the line to be tested is increased during the minimum load time period; when the probability of occurrence of the power grid fault type corresponding to the line to be tested is greater than or equal to kmax, a line stop detection is performed on the line to be tested during the minimum load time period.

[0142] Furthermore, the frequency f of acquiring the power grid parameters is positively correlated with the cross entropy loss L.

[0143] After the cross entropy loss L is calculated, the grid parameter frequency f can be calculated accordingly:

[0144]

[0145] Among them, f0 is the initial grid parameter acquisition reference frequency, M adjust To adjust the adjustment coefficient when adjusting the acquisition frequency, the reference frequency f0 can be set accordingly according to the specific initial grid parameter acquisition frequency. adjust Appropriate numerical value, e is a natural constant, C is the number of categories of the above fault types.

[0146] Combining the above formula and the cross-entropy loss L, it can be seen that when the probability of occurrence of the fault type and the probability of occurrence of different fault levels are higher, the power grid parameter acquisition frequency f is also higher; the introduction of cross-entropy loss in the recursive neural network (RNN) not only takes into account the correctness of the prediction and the confidence of the prediction, but also uses the calculation results of the cross-entropy loss in the recursive neural network (RNN) to adjust the power grid parameter acquisition frequency, which greatly simplifies the calculation complexity of adjusting the power grid parameter acquisition frequency. There is no need to redesign a complex model to calculate the adjustment of the power grid parameter acquisition frequency. On the one hand, the calculation results in the recursive neural network (RNN) are used. The model is usually deployed in the cloud. At the same time, the calculation results can be used in the edge computing to calculate the acquisition frequency f of the power grid parameters for adjustment using the above formula, which effectively improves the speed of cloud-edge collaborative computing.

[0147] Further, a risk threshold k of the power grid fault type is determined, and a line where the probability of occurrence of the power grid fault type output by the recurrent neural network (RNN) is greater than the power grid parameter corresponding to k is marked as a line to be tested;

[0148] The historical load data corresponding to the line to be tested is obtained, and the minimum load operation time period is counted, and the line to be tested is shut down for detection during the minimum load time period or the frequency of obtaining power grid parameters is increased.

[0149] Example 3

[0150] In one embodiment, the reference specification Figure 3 , showing a schematic structural diagram of a computer device provided by the present invention.

[0151] A computer device provided by the present invention includes: a memory 302, a processor 301, and a computer program stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, a cloud-edge collaborative smart grid fault handling method as described in any one of Example 1 is implemented.

[0152] The computer device may include a processor 301 and a memory 302 storing computer program instructions.

[0153] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0154] Among them, the memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 302 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 302 may be inside or outside a data processing device. In a specific embodiment, the memory 302 is a non-volatile memory. In a specific embodiment, the memory 302 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0155] The memory 302 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 301 .

[0156] The processor 301 implements any one of the cloud-edge collaborative smart grid fault handling methods in Example 1 by reading and executing computer program instructions stored in the memory 302.

[0157] In some embodiments, the computer device may further include a communication interface 303 and a bus 300. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 300 and communicate with each other.

[0158] The communication interface 303 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present invention. The communication interface 303 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0159] The bus 300 includes hardware, software or both, and couples the components of the computer device to each other. The bus 300 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 300 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infini Band interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Bus 300 may include one or more buses, where appropriate. Although embodiments of the present invention describe and illustrate a particular bus, the present invention contemplates any suitable bus or interconnect.

[0160] A computer device provided by the present invention can implement the steps and effects of the cloud-edge collaborative smart grid fault handling method in the above-mentioned embodiment 1. To avoid repetition, the present invention will not go into details.

[0161] Example 4

[0162] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the cloud-edge collaborative smart grid fault handling method as described in the first aspect is implemented.

[0163] Compared with the prior art, the present invention has at least the following beneficial technical effects:

[0164] In the present invention, time series data can be processed by a model based on RNN (recursive neural network). RNN can improve the accuracy of fault type identification and reduce false alarms and missed alarms by learning the temporal relationship in historical data. The power grid fault analysis scheme based on RNN neural network, combined with the probability of occurrence of fault types and the output of different fault levels, can significantly improve the efficiency and accuracy of fault detection, and provide strong support for the safe and stable operation of the power grid.

[0165] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0166] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A cloud-edge collaborative smart grid fault handling method, characterized by: Read fault data, read historical data and obtain power grid fault data, wherein the power grid fault data includes fault time, power grid fault type and fault level, and the fault level is at least related to the line apparent power corresponding to the fault point; Acquire power grid parameters, wherein the power grid parameters include a parameter time series composed of power grid parameters at multiple time points before the fault time, wherein the power grid parameters include at least voltage, current, power, frequency, line impedance, and harmonic components; Establishing an analysis module, establishing a recursive neural network (RNN) according to the power grid fault data and the power grid parameters, wherein the input of the recursive neural network (RNN) is the parameter time series, and the output of the recursive neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels; The recurrent neural network (RNN) is used to monitor the power grid parameters and output the probability of occurrence of the fault type and the probability of occurrence of different fault levels in real time.

2. The cloud-edge collaborative smart grid fault handling method according to claim 1 is characterized in that: Before obtaining the power grid fault data, it also includes: cleaning the power grid parameters, specifically including processing missing values ​​and abnormal values, marking missing values, and prompting abnormal values, wherein the abnormal values ​​include zero values ​​in the non-fault period or data that is significantly greater than the line load upper limit.

3. The cloud-edge collaborative smart grid fault handling method according to claim 1 is characterized in that: Before obtaining the power grid fault data, the method also includes: normalizing the power grid parameters, converting the frequency into a distribution with a mean of 0 and a standard deviation of 1, and normalizing the power grid parameters, scaling the voltage, current, and power to [0, 1].

4. The cloud-edge collaborative smart grid fault handling method according to claim 1 is characterized in that: Before acquiring the power grid fault data, the method further includes: dividing the power grid parameter time series into a plurality of overlapping or non-overlapping time periods, and filling the line impedance and harmonic component parameters with the time series.

5. The cloud-edge collaborative smart grid fault handling method according to claim 1 is characterized in that: The time series filling of line impedance and harmonic component parameters specifically includes: detecting a blank value between two adjacent non-zero values ​​in the time series, interpolating the blank value so that the data points between the two non-zero values ​​form a collinear point together, and the blank value is modified to a data value corresponding to the collinear point in the time series.

6. The cloud-edge collaborative smart grid fault handling method according to claim 1 is characterized in that: The recurrent neural network (RNN) further includes: assuming that the output of the recurrent neural network (RNN) is a vector z=[z1, z2, ..., z C ], where C is the number of categories; Use the Softmax function to convert the output of the model into a probability distribution: Where P(y=i|z) represents the conditional probability that a sample belongs to category i given the input feature vector z; z i Represents the i-th element in the category output by the model, e zi is the raw score obtained by passing through the last layer of the neural network; is the sum of all category outputs after exponential operation; The power grid fault type y is converted into one-hot encoding and the cross entropy loss is calculated as follows: Among them, y i is the value in the one-hot encoding, and P(y=i|z) is the probability predicted by the model.

7. The cloud-edge collaborative smart grid fault handling method according to claim 1 is characterized in that: Determine a risk threshold k of the power grid fault type, and mark a line where the probability of occurrence of the power grid fault type output by the recurrent neural network (RNN) is greater than the power grid parameter corresponding to k as a line to be tested; The historical load data corresponding to the line to be tested is obtained, and the minimum load operation time period is counted, and the line to be tested is shut down for detection during the minimum load time period or the frequency of obtaining power grid parameters is increased.

8. A cloud-edge collaborative smart grid fault handling device, characterized in that: include: A reading module, used to read historical data and obtain power grid fault data, wherein the power grid fault data includes fault time, power grid fault type and fault level, wherein the fault level is at least related to the line apparent power corresponding to the fault point; An acquisition module, used for acquiring power grid parameters, wherein the power grid parameters include a parameter time series composed of power grid parameters at multiple time points before the fault time, wherein the power grid parameters include at least voltage, current, power, frequency, line impedance, and harmonic components; A modeling module, used to establish a recursive neural network (RNN) according to the power grid fault data and the power grid parameters, wherein the input of the recursive neural network (RNN) is the parameter time series, and the output of the recursive neural network is the probability of occurrence of the fault type and the probability of occurrence of different fault levels; A monitoring module is used to monitor the power grid parameters through the recursive neural network (RNN) and output the probability of occurrence of the fault type and the probability of occurrence of different fault levels in real time.

9. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the cloud-edge collaborative smart grid fault handling method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the cloud-edge collaborative smart grid fault handling method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fault prediction method, device and equipment and readable storage medium

    CN116125936A

  • Distribution line fault type identification method and system

    CN116400164A

  • Knowledge and twin model driven actuator key fault injection and diagnosis method

    WO2024113574A1

Cited By

  • A cross-domain collaborative analysis system and method for power equipment faults

    CN120317527B

  • Electrical cabinet remote monitoring and communication system based on Internet of Things

    CN121125805A

  • Grid fault detection system based on cloud edge cooperation

    CN121253988A