Relay fault detection system and prediction method based on edge neural network

By installing a voltage and current detection module in the relay power supply circuit and embedding an edge neural network model in the microprocessor, the problem of inaccurate prediction of relay failure time in the prior art is solved, real-time prediction and timely response of relay failures are achieved.

CN119535200AInactive Publication Date: 2025-02-28NANJING UNIV OF INFORMATION SCI & TECH
View PDF 24 Cites 0 Cited by

Patent Information

Application Number
CN202510106165.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art cannot accurately and effectively analyze and predict the fault time of the relay, and traditional detection equipment has the risk of monitoring blind spots, delayed inspection, missed inspection, and false inspection, and real-time prediction and timely warning cannot be achieved.

Method used

A relay fault detection system based on edge neural network is adopted to collect data through voltage and current detection modules, and a trained relay fault prediction model is embedded in the microprocessor, and data analysis and prediction are used for long and short neural network layers and attention mechanism layers.

Benefits of technology

Real-time prediction of relay faults is realized, and instant detection and response is supported, which eliminates the latency and privacy issues of data transmission to cloud servers, and improves the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119535200A_ABST
    Figure CN119535200A_ABST
Patent Text Reader

Abstract

The invention discloses a relay fault detection system and prediction method based on an edge neural network, and belongs to the technical field of relay fault detection.The relay fault detection system comprises a voltage and current detection module, a display module, a microprocessor and an upper computer, the data is transmitted to the microprocessor; the microprocessor is embedded in a trained relay fault prediction model in the upper computer, judges the state of the relay through the received voltage and current data, carries out fault prediction, judges the state of the relay through the received voltage and current data, carries out fault prediction, and displays a prediction result in the display module. And the fault time of the relay can be predicted in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of relay fault detection, and in particular to a relay fault detection system and prediction method based on edge neural network. Background Art

[0002] Relays are widely used in industry. In power systems, relays are used for various protection and control functions, such as overcurrent protection, trip protection, and locking protection. In industrial production, relays are mainly used for mechanical equipment control and production line control. As an important infrastructure of modern society, the safety and reliability of electrical system equipment are crucial to economic stability and people's quality of life. However, when the relay faces voltage or current overload, the relay will fail, which will affect the normal use of the equipment and even cause equipment failure.

[0003] With the increase of labor costs and the complexity of industrial and civil power systems, the efficiency of regular maintenance and inspection by manpower is low and the relay status cannot be accurately judged. There are many types of traditional relay inspection and control equipment, but they are expensive, complicated to install and wire, and their maintenance work has the risk of monitoring blind spots and delayed inspection, missed inspection, and false inspection, and cannot perform accurate, timely, and effective inspections.

[0004] In addition, current traditional relay detection equipment only monitors the operating status of the relay from a real-time data perspective and cannot accurately and effectively analyze and predict the failure time of the relay, nor can it accurately provide warning alarms. Transmitting data to the cloud server for predictive processing has delays and cannot achieve real-time predictions. Summary of the invention

[0005] A first aspect of the present invention provides a relay fault detection system based on an edge neural network to solve the problem in the prior art that it is impossible to accurately and effectively analyze and predict the fault time of a relay.

[0006] A second aspect of the present invention provides a relay fault prediction method based on edge neural network.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is: A relay fault detection system based on edge neural network includes: a voltage and current detection module, a display module, a microprocessor and a host computer, wherein: The voltage and current detection module is connected to the power supply circuit of the relay, collects voltage and current data, and transmits the data to the microprocessor; the microprocessor is embedded with a trained relay fault prediction model, and the relay fault prediction model is based on an edge neural network, and judges the state of the relay through the received voltage and current data, and performs fault prediction, and displays the prediction result in the display module; The host computer is used to train the relay fault prediction model according to historical data and obtain the trained relay fault prediction model. The relay fault prediction model includes a long and short neural network layer and an attention mechanism layer. The attention mechanism layer optimizes the input data of the long and short neural network layer, and uses the gray wolf algorithm to find the optimal hyperparameter set of the long and short neural network layer. The optimal hyperparameter set includes the number of neurons, the initial learning rate and the number of training iterations.

[0008] Furthermore, the voltage and current detection module includes: an electric energy metering chip, a current sampling circuit, and a voltage sampling circuit, wherein the voltage sampling circuit and the current sampling circuit are respectively connected to the electric energy metering chip; the voltage sampling circuit includes a voltage transformer and a voltage filtering circuit, wherein the voltage transformer is used to collect the voltage signal of the monitored device, and the output end of the voltage transformer is connected to the voltage filtering circuit; the current sampling circuit includes a current transformer and a current filtering circuit, wherein the current transformer is used to collect the current signal of the monitored device, and the output end of the current transformer is connected to the current filtering circuit; the output ends of the voltage sampling circuit and the current sampling circuit are connected to the electric energy metering chip, and the collected voltage signal and current signal are sent to the electric energy metering chip after filtering; the output end of the electric energy metering chip is connected to a microprocessor, and the collected voltage signal and current signal are converted into voltage value and current value after AD sampling, and sent to the microprocessor.

[0009] Furthermore, the microprocessor and the host computer both include a preprocessing module, the preprocessing module in the microprocessor performs data preprocessing on the real-time collected data, and the preprocessing module in the host computer performs data preprocessing on the historical data, and the preprocessing includes: Filter the data to remove invalid data: If the voltage or current , the relay has failed and the data is considered invalid. is the maximum voltage threshold of the relay fault and is the maximum critical value of the current of the relay failure; Apply the formula to the filtered data Normalization is performed, where for , It indicates the minimum critical value of voltage or current; The normalized data is filtered using the Kalman filter algorithm.

[0010] Furthermore, the normalized data is filtered using a Kalman filter algorithm, including: The normalized voltage and current data from the previous historical data or real-time data are used as the benchmark, and the formula Estimate the next voltage and current data, where for Voltage data or current data of historical data, is the state transfer matrix, is the control input vector, Indicates the current data collection times. represents estimated voltage data or current data; According to the formula Calculate the covariance matrix of the voltage data or current data collected next time, where for The covariance matrix of the voltage data or current data, is the covariance matrix of the observation noise, is the transpose of the state transfer matrix; According to the formula Calculate the Kalman gain and substitute it into the formula In the process, the voltage data and current data are updated, where: is the state observation matrix, is the transpose of the state observation matrix, is the error matrix, is the measured value, is the posterior estimate; According to the formula Update the covariance matrix of voltage data and current data, where is the identity matrix; Repeat the above filtering process until the most stable voltage and current data are obtained.

[0011] Furthermore, the preprocessing further comprises: The K-means clustering algorithm is used to aggregate the filtered data and put similar data in the same cluster, including: Divide the voltage data or current data into Group, and select Initial cluster centers ; According to the formula Calculate the distance from each set of voltage data or current data to the cluster center, where Indicates Group voltage data or current data, Indicates Cluster centers, Indicates The first properties, Indicates The cluster center Attributes; Compare the distances from each set of voltage data or current data to each cluster center in turn, and assign each set of voltage data or current data to the cluster with the closest distance. Cluster and the initial center point of the cluster; According to the formula , recalculate the new center point of each cluster, where Indicates The number of groups of voltage data or current data in a cluster, Indicates The first Group voltage data or current data, Indicates The first Group voltage data or current data; Represents the new center point; repeat the above clustering process until the new center point coincides with the initial center point.

[0012] Furthermore, the host computer uses the preprocessed data to train and test the relay fault prediction model to obtain a trained relay fault prediction model, including: The preprocessed historical data is used as samples to divide the training set and test set, with a division ratio of 7:3. The input size of each sample is ,in is the dimension of the input layer, set to 4, The dimension of the input feature vector is set to 4; The four-dimensional data in the training set As the input of the long and short neural network layer, the output is processed by the long and short neural network layer ; The output of the long-short time neural network layer is used as the input of the attention mechanism layer, using the formula Normalize the input data to get , and perform weighted summation on the input data to get the output ,in, is the initial input data, is the mean value of the data, is the standard deviation of the data, is the normalized data value; The output of the attention mechanism layer As the input of the long and short neural network layers in the next cycle, we get , and so on; The Grey Wolf Algorithm seeks the optimal hyperparameter set of the long and short neural network layers, uses the optimal hyperparameter set to build a relay fault prediction model, trains in the training set until the optimal relay fault prediction model is obtained at the end of the iteration; and tests in the test set.

[0013] Another aspect of the present invention further provides a relay fault prediction method based on edge neural network, comprising: Perform data preprocessing on historical data, build a relay fault prediction model, use the preprocessed historical data to train and test the relay fault prediction model to obtain the optimal relay fault prediction model; and use the optimal relay fault prediction model to predict relay faults on the preprocessed real-time collected data; The data preprocessing process for historical data is the same as the preprocessing process for real-time data, including: Filter the data to remove invalid data: If the voltage or current , the relay has failed and the data is considered invalid. is the maximum voltage threshold of the relay fault and is the maximum critical value of the current of the relay failure; Apply the formula to the filtered data Normalization is performed, where for , It indicates the minimum critical value of voltage or current; The normalized data is filtered using the Kalman filter algorithm; The K-means clustering algorithm is used to aggregate the filtered data and put similar data in the same cluster, including: Divide the voltage data or current data into Group, and select Initial cluster centers ; According to the formula Calculate the distance from each set of voltage data or current data to the cluster center, where Indicates Group voltage data or current data, Indicates Cluster centers, Indicates The first properties, Indicates The cluster center Attributes; Compare the distances from each set of voltage data or current data to each cluster center in turn, and assign each set of voltage data or current data to the cluster with the closest distance. Cluster , and get the initial center point; According to the formula , recalculate the new center point of each cluster, where Indicates The number of groups of voltage data or current data in a cluster, Indicates The first Group voltage data or current data, Indicates The first Group voltage data or current data; represents the new center point; Repeat the above clustering process until the new center point coincides with the initial center point.

[0014] The relay fault prediction model is trained and tested using the preprocessed historical data to obtain the optimal relay fault prediction model, including: The preprocessed historical data is used as samples to divide the training set and test set, with a division ratio of 7:3. The input size of each sample is ,in is the dimension of the input layer, set to 4, is the input feature vector dimension, set to 4; the four-dimensional data in the training set As the input of the long and short neural network layer, the output is processed by the long and short neural network layer ; The output of the long and short neural network layer is used as the input of the attention mechanism layer, using the formula Normalize the input data to get , and perform weighted summation on this data to get the output ; The output of the attention mechanism layer As the input of the long and short neural network layers in the next cycle, we get , and so on; The Grey Wolf Algorithm seeks the optimal hyperparameter set of the long and short neural network layers, uses the optimal hyperparameter set to build a relay fault prediction model, trains in the training set until the optimal relay fault prediction model is obtained at the end of the iteration; and tests in the test set.

[0015] Furthermore, the normalized data is filtered using a Kalman filter algorithm, including: The normalized voltage and current data from the previous historical data or real-time data are used as the benchmark, and the formula Estimate the next voltage and current data, where for Voltage data or current data of historical data, is the state transfer matrix, is the control input vector, Indicates the current data collection times. represents estimated voltage data or current data; According to the formula Calculate the covariance matrix of the voltage data or current data collected next time, where for The covariance matrix of the voltage data or current data, is the covariance matrix of the observation noise, is the transpose of the state transfer matrix; According to the formula Calculate the Kalman gain and substitute it into the formula In the process, the voltage data and current data are updated, where: is the state observation matrix, is the transpose of the state observation matrix, is the error matrix, is the measured value, is the posterior estimate; According to the formula Update the covariance matrix of voltage data and current data, where is the unit matrix; repeat the above filtering process until the most stable voltage data and current data are obtained.

[0016] Compared with the prior art, the present invention has the following beneficial effects: by installing sensors in the relay power supply circuit, the relay voltage and current can be detected, and a relay fault prediction model can be embedded in the microprocessor to predict the relay failure time in real time. There is no need to transmit data to the cloud server, supporting instant detection and response, and processing data locally on the device, eliminating privacy and security issues. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The overall structure block diagram of the relay fault detection system based on edge neural network of the present invention; Figure 2 It is a schematic diagram of the structure of the voltage and current detection module of the present invention. DETAILED DESCRIPTION

[0018] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0019] The present invention connects the voltage and current detection module to the relay power supply circuit to detect the voltage and current data of the relay, and predicts the relay failure time through the relay fault prediction model based on the edge neural network (At-GWO-LSTM) embedded in the microprocessor, realizing real-time monitoring and real-time prediction, which is convenient for staff to monitor at any time and more efficient; at the same time, the relay fault prediction model is embedded in the microprocessor to realize fault prediction at the edge of the device, avoiding the delay and privacy issues caused by transmitting data to the cloud server. The specific implementation plan is as follows: Combination Figure 1 A relay fault detection system based on edge neural network includes: a microprocessor and a voltage and current detection module. The voltage and current detection module is connected to the relay through a power supply circuit to detect voltage and current data. Its output end is connected to the microprocessor. The microprocessor predicts the relay fault time in real time based on the received voltage and current data through an embedded relay fault prediction model and displays it in the display module. The power module is responsible for powering the system.

[0020] The microprocessor is implemented using an STM32G474 chip, which is used to receive voltage and current data detected by a voltage and current detection module and use these data to predict faults.

[0021] The host computer is used to train the relay fault prediction model according to historical data and obtain the trained relay fault prediction model. The relay fault prediction model includes a long and short neural network layer and an attention mechanism layer. The attention mechanism layer optimizes the input data of the long and short neural network layer, and uses the gray wolf algorithm to find the optimal hyperparameter set of the long and short neural network layer. The optimal hyperparameter set includes the number of neurons, the initial learning rate and the number of training iterations.

[0022] The voltage and current detection module includes: an electric energy metering chip, a current sampling circuit and a voltage sampling circuit. The voltage sampling circuit and the current sampling circuit are respectively connected to the electric energy metering chip, and the output end of the electric energy metering chip is connected to the microprocessor. The voltage sampling circuit includes a voltage transformer and a voltage filtering circuit. The voltage transformer is used to collect the voltage signal of the monitored device. The output end of the voltage transformer is connected to the voltage filtering circuit. The current sampling circuit includes a current transformer and a current filtering circuit. The current transformer is used to collect the current signal of the monitored device. The output end of the current transformer is connected to the current filtering circuit. The output ends of the voltage sampling circuit and the current sampling circuit are connected to the electric energy metering chip, and the collected voltage signal and current signal are sent to the electric energy metering chip after filtering. The output end of the electric energy metering chip is connected to the microprocessor, and the collected voltage signal and current signal are converted into voltage value and current value after AD sampling, and sent to the microprocessor.

[0023] The voltage transformer uses ZMPT107 sensor; the current transformer uses ZMPT107 sensor.

[0024] The energy metering chip uses the HT7036 chip, which obtains the voltage and current values ​​of relay 3 by performing a series of operations such as squaring, square rooting, and digital filtering on the sampled values ​​of voltage and current. The HT7036 chip integrates 6 second-order digital-to-analog converters (ADCs), which can convert analog signals into digital signals and measure three voltages and three currents at the same time. When the input signal has an effective value of 500mV to 1mV, the error of its effective value is less than 0.2%.

[0025] Combination Figure 2As shown, the voltage and current detection module detects the voltage and current of the relay power supply circuit. The relay is connected to the A terminal and N terminal of the voltage and current detection module through the live wire segment JP1 and the neutral wire terminal JP2 respectively. After protecting the A terminal resistor R1, the voltage value is sampled by the voltage transformer PT1, and the current transformer CT1 samples the current value in the relay path. The voltage filter circuit U1 is composed of resistors R2, R3, R4, capacitors C1 and C2. The resistor R2 is connected in parallel with the secondary side of the current transformer CT1. The first end of the resistor R2 is connected to the first end of the resistor R3, the second end of the resistor R3 is connected to the first end of the capacitor C1 and the output terminal V1P, the second end of the capacitor C1 is connected to the first end of the capacitor C2 and grounded, the second end of the capacitor C2 is connected to the output terminal V1N, the second end of the resistor R2 is connected to the first end of the resistor R4 and grounded, the second end of the resistor R4 is connected to the second end of the capacitor C2, and the current filter circuit U2 is composed of resistors R5, R6, R7, R8 and The capacitor C3 and the capacitor C4 are composed of a first end of a resistor R6 and a first end of a resistor R7, wherein the first end of the resistor R6 and the second end of the resistor R7 are connected in series, and are respectively connected to the two ends of the current transformer CT1 through the second end of the resistor R6 and the second end of the resistor R7, the second end of the resistor R6 is connected to the first end of the resistor R5, the second end of the resistor R5 is connected to the first end of the capacitor C3 and the output V2P, the second end of the resistor R7 is connected to the first end of the resistor R8, the second end of the resistor R8 is connected to the first end of the capacitor C4 and the output V2N, the second end of the capacitor C4 is connected to the second end of the capacitor C3, and the first end of the resistor R7 is connected to the second end of the capacitor C3 and grounded. The output ends of the voltage transformer PT1 and the current transformer CT1 are respectively connected to the electric energy metering chip through the filter circuit.

[0026] The microprocessor and the host computer both include a preprocessing module. The preprocessing module in the microprocessor performs data preprocessing on the real-time collected data, and the preprocessing module in the host computer performs data preprocessing on the historical data. The preprocessing includes: extracting features from the data to obtain current and voltage , filter the data and remove invalid data; normalize the filtered data and scale the data to a specified range; filter the normalized data to reduce the impact of noise; aggregate the filtered data and put similar data in the same cluster; The data is filtered to remove invalid data: if the voltage or current , the relay has failed and the data is considered invalid. Maximum voltage for relay failure, is the maximum critical value of the current of the relay fault. Different types of relays have different voltage and fault critical values, which can be measured through experiments; Determine whether it is invalid data. If so, filter it out as filtered data. If not, normalize the filtered data and scale the data to a specified range. , Current Data Utilization Formula Processing is performed to eliminate the interference between different dimensions and ensure the numerical consistency of each data. for ; Indicates the minimum critical value of voltage or current.

[0027] The normalized data is filtered to reduce the influence of noise. The Kalman filter is used to filter the normalized data. The specific steps are as follows: The normalized voltage and current data from the previous historical data or real-time data are used as the benchmark, and the formula Estimate the next voltage and current data, where for Voltage data or current data of historical data, is the state transfer matrix, is the control input vector, Indicates the current data collection times. represents estimated voltage data or current data; According to the formula Calculate the covariance matrix of the voltage data or current data collected next time, where for The covariance matrix of the voltage data or current data, is the covariance matrix of the observation noise, is the transpose of the state transfer matrix; According to the formula Calculate the Kalman gain and substitute it into the formula In the process, the voltage data and current data are updated, where: is the state observation matrix, is the transpose of the state observation matrix, is the error matrix, is the measured value, is the posterior estimate; According to the formula Update the covariance matrix of voltage data and current data, where is the identity matrix; Repeat the above filtering process until the most stable voltage and current data are obtained.

[0028] Aggregate the filtered data and put similar data in the same cluster using the K-means clustering algorithm. The specific process is as follows: Assign data points to divide voltage data or current data into Group, and select Initial cluster centers ; According to the formula Calculate the distance from each set of voltage data or current data to the cluster center, where Indicates Group voltage data or current data, Indicates Cluster centers, Indicates The first properties, Indicates The cluster center Attributes; Compare the distances from each set of voltage data or current data to each cluster center in turn, perform secondary distribution, and distribute each set of voltage data or current data to the cluster with the closest distance. Cluster , and the initial center point of the cluster; According to the formula , recalculate the new center point of each cluster and update the cluster center, where Indicates The number of groups of voltage data or current data in a cluster, Indicates The first Group voltage data or current data, Indicates The first Group voltage data or current data; represents the new center point; Repeat the above clustering process until the new center point Coincident with the initial center point, and finally output the preprocessing result.

[0029] The present invention significantly reduces the complexity of data by filtering out invalid data. The data filtering standard in the present invention is calibrated by performing multiple critical fault experiments on relays. Normalization can convert dimensional quantities into dimensionless quantities and normalize the data to the same order of magnitude to solve the comparability problem between data, so that the subsequent K-means clustering algorithm converges to the optimal solution more quickly. The present invention uses the formula Normalize, the normalized data range is [0, 1]. It is ideal to use Kalman filtering in a continuously changing system. It has the advantages of small memory usage and high speed, so it is suitable for the present invention. The present invention uses Kalman filtering to filter the noise in the data, reduce disturbances, improve the effect of subsequent processing steps and the accuracy of fault prediction. K-means clustering algorithm is an unsupervised clustering learning algorithm that can divide data with high similarity into the same cluster, thereby solving the imbalance problem between data. The present invention uses K-means clustering algorithm to put similar data in the same cluster, thereby improving the efficiency of subsequent model training.

[0030] The relay fault prediction model uses the preprocessed historical data to train and test the fault prediction model to obtain a trained relay fault prediction model, which specifically includes: Dataset division: The preprocessed historical data is used as samples to divide the training set and test set, with a division ratio of 7:3. The input size of each sample is ,in is the dimension of the input layer, set to 4, Then it is the input feature vector dimension, which is set to 4; The four-dimensional data in the training set As the input of the long and short neural network layer, the output is processed by the long and short neural network layer ; The output of the long and short neural network layer is used as the input of the attention mechanism layer, using the formula Normalize the input data to get , and perform weighted summation on this data to get the output ; The output of the attention mechanism layer As the input of the long and short neural network layers in the next cycle, we get , and so on; The Grey Wolf Algorithm finds the optimal hyperparameter set of the long and short neural network layers, builds a relay fault prediction model, and trains it in the training set until the optimal relay fault prediction model is obtained at the end of the iteration; After the iteration, the optimal relay fault prediction model is obtained and tested in the test set.

[0031] The gray wolf algorithm is used to optimize the long and short neural network layers, wherein the gray wolf algorithm achieves the optimization purpose by simulating the predation behavior of gray wolf groups in the animal kingdom. In the present invention, the gray wolf algorithm simulates the behavior of finding the optimal hyperparameters of the long and short neural network layers as the predation behavior of wolves, takes the parameters as the position of the gray wolf, and takes the performance of the long and short neural network layers as the fitness value. Its mathematical model is ,in, represents the distance between the individual and the prey, To update the location of the gray wolf, is the current iteration algebra, For the location of the prey, and is the coefficient, is the position of the gray wolf. After the gray wolf surrounds the prey, the gray wolf individuals will attack the prey. The attack is usually commanded by the three wolves with the best fitness. The mathematical model is: ,in, , and Indicates the distance between the three wolves with the best fitness and other individuals, , and Indicates the current positions of the three wolves with the best fitness. , and is a random number, is the current position of all wolves except the three wolves with the best fitness. Finally, the best hunting position of the gray wolf is obtained by the formula to be sure.

[0032] The present invention uses the Gray Wolf Algorithm to find the optimal hyperparameter set of the long and short neural network layers, thereby optimizing the number of neurons, the initial learning rate, and the number of training iterations of the long and short neural network layers. The number of neural units in the long and short neural network layers directly determines the fitting ability of the model, the number of iterations determines the training effect, and the initial learning rate affects the convergence speed. Usually, the above parameters are adjusted manually, which will lead to greater randomness. Therefore, the present invention uses the Gray Wolf Algorithm to optimize the parameters of the long and short neural network layers, thereby improving the prediction accuracy.

[0033] The relay fault prediction model based on edge neural network (At-GWO-LSTM) established by the present invention predicts the precise fault time of the relay through voltage data and current data. Since there are various types of relays on the current market, and the critical data of different types are different, the fault prediction of different types of relays can be uniformly adopted by the present invention, and different prediction calibration standards can be constructed, and the corresponding network model can be used for prediction.

[0034] The relay fault prediction model based on edge neural network (At-GWO-LSTM) of the present invention performs historical data preprocessing and model training process in the host computer, compresses and optimizes it through AI model optimizer, and further embeds it into the microprocessor; the present invention does not need to transmit data to the cloud server, supports instant detection and response, and processes data locally on the device, eliminating privacy and security issues.

[0035] The present invention also provides a relay fault prediction method based on edge neural network, comprising: Perform data preprocessing on historical data, build a relay fault prediction model, use the preprocessed historical data to train and test the relay fault prediction model to obtain the optimal relay fault prediction model; and use the optimal relay fault prediction model to predict relay faults on the preprocessed real-time collected data; The data preprocessing process for historical data is the same as the preprocessing process for real-time data, including: Filter the data to remove invalid data: If the voltage or current , the relay has failed and the data is considered invalid. is the maximum voltage threshold of the relay fault and is the maximum critical value of the current of the relay failure; Apply the formula to the filtered data Normalization is performed, where for , It indicates the minimum critical value of voltage or current; The normalized data is filtered using the Kalman filter algorithm; The K-means clustering algorithm is used to aggregate the filtered data and put similar data in the same cluster, including: Divide the voltage data or current data into Group, and select Initial cluster centers ; According to the formula Calculate the distance from each set of voltage data or current data to the cluster center, where Indicates Group voltage data or current data, Indicates Cluster centers, Indicates The first properties, Indicates The cluster center Attributes; Compare the distances from each set of voltage data or current data to each cluster center in turn, and assign each set of voltage data or current data to the cluster with the closest distance. Cluster , and get the initial center point; According to the formula , recalculate the new center point of each cluster, where Indicates The number of groups of voltage data or current data in a cluster, Indicates The first Group voltage data or current data, Indicates The first Group voltage data or current data; represents the new center point; Repeat the above clustering process until the new center point coincides with the initial center point.

[0036] The relay fault prediction model is trained and tested using the preprocessed historical data to obtain the optimal relay fault prediction model, including: The preprocessed historical data is used as samples to divide the training set and test set, with a division ratio of 7:3. The input size of each sample is ,in is the dimension of the input layer, set to 4, is the input feature vector dimension, set to 4; the four-dimensional data in the training set As the input of the long and short neural network layer, the output is processed by the long and short neural network layer ; The output of the long and short neural network layer is used as the input of the attention mechanism layer, using the formula Normalize the input data to get , and perform weighted summation on this data to get the output ; The output of the attention mechanism layer As the input of the long and short neural network layers in the next cycle, we get , and so on; The Grey Wolf Algorithm seeks the optimal hyperparameter set of the long and short neural network layers, uses the optimal hyperparameter set to build a relay fault prediction model, trains in the training set until the optimal relay fault prediction model is obtained at the end of the iteration; and tests in the test set.

[0037] The Kalman filter algorithm is used to filter the normalized data, including: The normalized voltage and current data from the previous historical data or real-time data are used as the benchmark, and the formula Estimate the next voltage and current data, where for Voltage data or current data of historical data, is the state transfer matrix, is the control input vector, Indicates the current data collection times. represents estimated voltage data or current data; According to the formula Calculate the covariance matrix of the voltage data or current data collected next time, where for The covariance matrix of the voltage data or current data, is the covariance matrix of the observation noise, is the transpose of the state transfer matrix; According to the formula Calculate the Kalman gain and substitute it into the formula In the process, the voltage data and current data are updated, where: is the state observation matrix, is the transpose of the state observation matrix, is the error matrix, is the measured value, is the posterior estimate; According to the formula Update the covariance matrix of voltage data and current data, where is the identity matrix; Repeat the above filtering process until the most stable voltage and current data are obtained.

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

Claims

1. A relay fault detection system based on edge neural network, characterized in that: include: Voltage and current detection module, display module, microprocessor and host computer, among which, The voltage and current detection module is connected to the power supply circuit of the relay, collects voltage and current data, and transmits the data to the microprocessor; the microprocessor is embedded with a trained relay fault prediction model, and the relay fault prediction model is based on an edge neural network, and judges the state of the relay through the received voltage and current data, and performs fault prediction, and displays the prediction result in the display module; The host computer is used to train the relay fault prediction model according to historical data and obtain the trained relay fault prediction model. The relay fault prediction model includes a long and short neural network layer and an attention mechanism layer. The attention mechanism layer optimizes the input data of the long and short neural network layer, and uses the gray wolf algorithm to find the optimal hyperparameter set of the long and short neural network layer. The optimal hyperparameter set includes the number of neurons, the initial learning rate and the number of training iterations.

2. A relay fault detection system based on edge neural network according to claim 1, characterized in that: The voltage and current detection module includes: an electric energy metering chip, a current sampling circuit, and a voltage sampling circuit. The voltage sampling circuit and the current sampling circuit are respectively connected to the electric energy metering chip; the voltage sampling circuit includes a voltage transformer and a voltage filtering circuit. The voltage transformer is used to collect the voltage signal of the monitored device. The output end of the voltage transformer is connected to the voltage filtering circuit. The current sampling circuit includes a current transformer and a current filtering circuit. The current transformer is used to collect the current signal of the monitored device. The output end of the current transformer is connected to the current filtering circuit; the output ends of the voltage sampling circuit and the current sampling circuit are connected to the electric energy metering chip, and the collected voltage signal and current signal are sent to the electric energy metering chip after filtering; the output end of the electric energy metering chip is connected to a microprocessor, and the collected voltage signal and current signal are converted into voltage value and current value after AD sampling, and sent to the microprocessor.

3. A relay fault detection system based on edge neural network according to claim 1, characterized in that: The microprocessor and the host computer both include a preprocessing module. The preprocessing module in the microprocessor performs data preprocessing on the real-time collected data, and the preprocessing module in the host computer performs data preprocessing on the historical data. The preprocessing includes: Filter the data to remove invalid data: If the voltage or current , the relay has failed and the data is considered invalid. is the maximum voltage threshold of the relay fault and is the maximum critical value of the current of the relay failure; Apply the formula to the filtered data Normalization is performed, where for , It indicates the minimum critical value of voltage or current; The normalized data is filtered using the Kalman filter algorithm.

4. A relay fault detection system based on edge neural network according to claim 3, characterized in that: The Kalman filter algorithm is used to filter the normalized data, including: The normalized voltage and current data from the previous historical data or real-time data are used as the benchmark, and the formula Estimate the next voltage and current data, where for Voltage data or current data of historical data, is the state transfer matrix, is the control input vector, Indicates the current data collection times. represents estimated voltage data or current data; According to the formula Calculate the covariance matrix of the voltage data or current data collected next time, where for The covariance matrix of the voltage data or current data, is the covariance matrix of the observation noise, is the transpose of the state transfer matrix; According to the formula Calculate the Kalman gain and substitute it into the formula In the process, the voltage data and current data are updated, where: is the state observation matrix, is the transpose of the state observation matrix, is the error matrix, is the measured value, is the posterior estimate; According to the formula Update the covariance matrix of voltage data and current data, where is the identity matrix; Repeat the above filtering process until the most stable voltage and current data are obtained.

5. A relay fault detection system based on edge neural network according to claim 4, characterized in that: The preprocessing also includes aggregating the filtered data using a K-means clustering algorithm to place similar data in the same cluster, including: Divide the voltage data or current data into Group, and select Initial cluster centers ; According to the formula Calculate the distance from each set of voltage data or current data to the cluster center, where Indicates Group voltage data or current data, Indicates Cluster centers, Indicates The first properties, Indicates The cluster center Attributes; Compare the distances from each set of voltage data or current data to each cluster center in turn, and assign each set of voltage data or current data to the cluster with the closest distance. Cluster and the initial center point of the cluster; According to the formula , recalculate the new center point of each cluster, where Indicates The number of groups of voltage data or current data in a cluster, Indicates The first Group voltage data or current data, Indicates The first Group voltage data or current data; represents the new center point; Repeat the above clustering process until the new center point coincides with the initial center point.

6. A relay fault detection system based on edge neural network according to claim 4, characterized in that: The host computer uses the preprocessed data to train and test the relay fault prediction model to obtain a trained relay fault prediction model, including: The preprocessed historical data is used as samples to divide the training set and test set, with a division ratio of 7:

3. The input size of each sample is ,in is the dimension of the input layer, set to 4, For the input feature vector dimension, set it to 4; The four-dimensional data in the training set As the input of the long and short neural network layer, the output is processed by the long and short neural network layer ; The output of the long-short time neural network layer is used as the input of the attention mechanism layer, using the formula Normalize the input data to get , and perform weighted summation on the input data to get the output ,in, is the initial input data, is the mean value of the data, is the standard deviation of the data, is the normalized data value; The output of the attention mechanism layer As the input of the long and short neural network layers in the next cycle, we get , and so on; The Grey Wolf Algorithm seeks the optimal hyperparameter set of the long and short neural network layers, uses the optimal hyperparameter set to build a relay fault prediction model, trains in the training set until the optimal relay fault prediction model is obtained at the end of the iteration; and tests in the test set.

7. A relay fault prediction method based on edge neural network, characterized in that: include: Perform data preprocessing on historical data, build a relay fault prediction model, use the preprocessed historical data to train and test the relay fault prediction model to obtain the optimal relay fault prediction model; and use the optimal relay fault prediction model to predict relay faults on the preprocessed real-time collected data; The data preprocessing process for historical data is the same as the preprocessing process for real-time data, including: Filter the data to remove invalid data: If the voltage or current , the relay has failed and the data is considered invalid. is the maximum voltage threshold of the relay fault and is the maximum critical value of the current of the relay failure; Apply the formula to the filtered data Normalization is performed, where for , It indicates the minimum critical value of voltage or current; The normalized data is filtered using the Kalman filter algorithm; The K-means clustering algorithm is used to aggregate the filtered data and put similar data in the same cluster, including: Divide the voltage data or current data into Group, and select Initial cluster centers ; According to the formula Calculate the distance from each set of voltage data or current data to the cluster center, where Indicates Group voltage data or current data, Indicates Cluster centers, Indicates The first properties, Indicates The cluster center Attributes; Compare the distances from each set of voltage data or current data to each cluster center in turn, and assign each set of voltage data or current data to the cluster with the closest distance. Cluster , and get the initial center point; According to the formula , recalculate the new center point of each cluster, where Indicates The number of groups of voltage data or current data in a cluster, Indicates The first Group voltage data or current data, Indicates The first Group voltage data or current data; represents the new center point; Repeat the above clustering process until the new center point coincide with the initial center point; The relay fault prediction model is trained and tested using the preprocessed historical data to obtain the optimal relay fault prediction model, including: The preprocessed historical data is used as samples to divide the training set and test set, with a division ratio of 7:

3. The input size of each sample is ,in is the dimension of the input layer, set to 4, is the input feature vector dimension, set to 4; the four-dimensional data in the training set As the input of the long and short neural network layer, the output is processed by the long and short neural network layer ; The output of the long and short neural network layer is used as the input of the attention mechanism layer, using the formula Normalize the input data to get , and perform weighted summation on this data to get the output ; The output of the attention mechanism layer As the input of the long and short neural network layers in the next cycle, we get , and so on; The Grey Wolf Algorithm seeks the optimal hyperparameter set of the long and short neural network layers, uses the optimal hyperparameter set to build a relay fault prediction model, trains in the training set until the optimal relay fault prediction model is obtained at the end of the iteration; and tests in the test set.

8. The relay fault prediction method based on edge neural network according to claim 7 is characterized in that: The Kalman filter algorithm is used to filter the normalized data, including: The normalized voltage and current data from the previous historical data or real-time data are used as the benchmark, and the formula Estimate the next voltage and current data, where for Voltage data or current data of historical data, is the state transfer matrix, is the control input vector, Indicates the current data collection times. represents estimated voltage data or current data; According to the formula Calculate the covariance matrix of the voltage data or current data collected next time, where for The covariance matrix of the voltage data or current data, is the covariance matrix of the observation noise, is the transpose of the state transfer matrix; According to the formula Calculate the Kalman gain and substitute it into the formula In the process, the voltage data and current data are updated, where: is the state observation matrix, is the transpose of the state observation matrix, is the error matrix, is the measured value, is the posterior estimate; According to the formula Update the covariance matrix of voltage data and current data, where is the unit matrix; repeat the above filtering process until the most stable voltage data and current data are obtained.

Citation Information

Patent Citations

  • Grammar error correction model based on attention sharing Transformer

    CN111859927A

  • Transformer fault diagnosis method based on improved grey wolf algorithm optimization

    CN114781573A

  • Optimal lane recommendation method based on graph neural network

    CN115630232A

  • Relay fault detection and analysis system and method based on edge calculation

    CN115982616A

  • Analysis system for non-fault phase impedance relay

    CN116482526A