A method for industrial instrument fault detection based on data correlation
By calculating the correlation coefficient matrix of the sensor and the reconstruction error of the LSTM model, the automatic identification of smart meter sensor faults is achieved, solving the problems of sensor status monitoring lag and low accuracy, reducing costs and the need to rely on annotated data, and providing Efficient and reliable online monitoring.
Patent Information
- Application Number
- CN202410093570.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-01-23
AI Technical Summary
Traditional smart meter systems lag in real-time status monitoring of sensors and are unable to capture and respond to sensor status anomalies in a timely manner, which affects the ability to monitor the running status of the meter in real time. In addition, deep learning models require a large amount of annotated data and have high data requirements.
An industrial instrument fault detection method based on data correlation is adopted. By calculating the correlation coefficient matrix of the sensor, the LSTM encoder and decoder are used to reconstruct the data, determine the sensor fault, and use the existing normal operation data to train the model to reduce the dependence on fault samples. .
It realizes the automatic identification and monitoring of sensor faults, reduces human resource costs and operation and maintenance complexity, provides an efficient and reliable online monitoring solution, and avoids the problems of lag and low accuracy in sensor status monitoring.
Smart Images

Figure CN118033525B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial instruments, and in particular to an industrial instrument fault detection method based on data correlation. Background Art
[0002] Traditional online monitoring methods for smart meters mainly rely on internally integrated multi-sensor data, such as current, voltage, temperature, power factor, load identification and other sensor data. Usually, based on the assumption of the stability and accuracy of each sensor data, the overall operating status of the meter is evaluated through data-driven analysis or combined with physical mechanism models. However, with the increase of usage time and the influence of external environmental factors, the sensors inside the smart meter may experience performance degradation problems such as drift, aging and even failure, which will cause deviations in the collected monitoring data and seriously affect the ability to judge the precise working status of the meter.
[0003] Currently, the real-time status monitoring function of sensors in smart meter systems on the market is not perfect, and most of them still rely on regular manual inspections and calibrations to ensure the normal operation of sensors. This lagging method cannot timely capture and respond to abnormal sensor status that occurs during the actual operation of the meter, greatly limiting the ability to effectively and real-time monitor the overall operating status of smart meters.
[0004] Of course, deep learning models are also used to determine whether a smart meter is faulty, but deep learning models require a large amount of labeled normal operation data and abnormal operation data, and have high requirements on the quantity and quality of data. Summary of the invention
[0005] The invention discloses an industrial instrument fault detection method based on data correlation, which can directly utilize existing normal operation monitoring data resources to implement automatic identification of sensor faults.
[0006] It is achieved through such a technical solution, the specific method is as follows:
[0007] Identify several sensors in the industrial instrument to be inspected;
[0008] Obtain real-time data from all sensors of the industrial instruments to be tested;
[0009] According to the real-time data, the correlation coefficient matrix between every two sensors is calculated;
[0010] The correlation coefficient matrix of real-time data is sequentially input into the LSTM encoder and LSTM decoder for reconstruction;
[0011] Determine whether the industrial instrument is faulty based on the sum of squares of the reconstruction error;
[0012] The LSTM encoder and LSTM decoder are trained by historical data of normal operation of industrial instruments.
[0013] Furthermore, the correlation coefficient matrix between every two sensors is calculated, specifically including:
[0014] Divide the time window for real-time data;
[0015] Normalize the window data;
[0016] Based on the normalized data, the correlation coefficient matrix was calculated.
[0017] Furthermore, assuming that there are n heterogeneous sensors inside the industrial instrument, each sensor generates m continuous data points in the time series, and the real-time data of all sensors of the industrial instrument to be detected is obtained, which is expressed as:
[0018]
[0019] Among them, x i,j represents the measurement value of the i-th sensor at the j-th time point, i∈{1, 2, ..., n} represents different sensors, and j∈{1, 2, ..., m} represents the corresponding time point.
[0020] Furthermore, the time window is divided into the following specific methods:
[0021] The real-time data D is divided into equal intervals according to the preset time window W to obtain the time window data set D W , assuming that each window contains w consecutive data points. Then for the i-th (i=1, 2, ..., N) time window, a new sub-dataset D can be obtained i It is expressed as:
[0022]
[0023] Among them, x j,k represents the measurement value of the j-th sensor at the k-th time point in the i-th time window, j∈{1, 2, ..., n} represents different sensors, and k∈{(i-1)w+1, (i-1)w+2, ..., iw} represents each time point in the i-th time window;
[0024] The new set of all divided window data sets can be expressed as:
[0025]
[0026] in, Contains all data subsets obtained after partitioning according to the fixed time window W.
[0027] Furthermore, the window data is normalized. The specific method is as follows:
[0028] For the data sequence of sensor j in window i Calculate the mean and standard deviation
[0029] Normalize each data point to obtain a standardized sub-dataset
[0030]
[0031] Furthermore, the correlation coefficient matrix is calculated as follows:
[0032] Based on the standardized data subset The Pearson correlation coefficient between each pair of sensors j and k within each window can be calculated:
[0033]
[0034] in, and They represent the standardized measurement values of the j-th and k-th sensors at the t-th time point in the time window i, respectively. and are the average values of all normalized measurements of the j-th and k-th sensors in time window i, respectively;
[0035] Generate Pearson correlation coefficient matrix R i :
[0036]
[0037] Get the Pearson correlation coefficient data matrix V of each pair of sensors in the entire time series collected:
[0038]
[0039] Divide the correlation coefficient matrix V by time window, and record all Pearson correlation coefficients of the i-th time window as Y i :
[0040] The Pearson correlation coefficient data matrix V can be expressed as:
[0041] Y=V=[Y1,Y2,…,Y N ].
[0042] Furthermore, the industrial instrument is judged to be faulty based on the sum of squares of the reconstruction error. The specific method is as follows:
[0043] The Pearson correlation coefficient data matrix V converted from real-time data is sequentially input into the trained LSTM encoder and LSTM decoder for reconstruction;
[0044] Calculate the sum of squares of the reconstruction error as the anomaly score a of the input sequence. The specific calculation formula is:
[0045]
[0046] The fault judgment formula is:
[0047]
[0048] Furthermore, the LSTM encoder and LSTM decoder are trained by the historical data of the normal operation of the industrial instrument. The specific method is as follows:
[0049] Given a normal data sample of length N, a multivariate correlation time series Y = [Y1, Y2, ..., Y N ], where at each time point t i Up, Y i ∈R m is an m-dimensional vector, representing the readings of m sensors at the same time;
[0050] When training the LSTM encoder, it maps the input time series Y to a vector of fixed dimension express:
[0051]
[0052] in represents the encoder at time step t i is the hidden state of the encoder, c is the number of LSTM units in the encoder hidden layer, and θ E represents the parameters of the encoder network;
[0053] When training the LSTM decoder, we use a fixed-dimensional vector H E Represents the reverse reconstruction of the time series. For the decoder, at time step t i The hidden state of is:
[0054]
[0055] in, is the predicted value Y of the previous time step i and the final state of the encoder Calculated, and θ D represents the parameters of the decoder network;
[0056] During decoding, the decoder passes through a linear layer with a weight matrix w and a bias vector b, combined with the current hidden state of the decoder To predict the target value for the next time step
[0057]
[0058] The training goal of the model is to minimize the entire training sequence set Y = [Y1, Y2, ..., Y N ]The sum of squares of reconstruction errors at all time points is minimized;
[0059] The formula for calculating the sum of squared reconstruction errors is as follows:
[0060]
[0061] Due to the adoption of the above scheme, the present invention has the following beneficial effects:
[0062] 1. Make full use of the monitoring data collected synchronously by multiple sensors inside the smart meter, and use the data correlation and deep learning algorithm between the sensors to realize the working status monitoring of each sensor;
[0063] 2. The present invention does not require large-scale hardware upgrades for existing smart meter monitoring systems, but directly utilizes existing monitoring data resources to implement automatic identification of sensor faults.
[0064] 3. Using this method, maintenance and calibration operations are only required when a specific sensor is detected to be faulty, which significantly reduces human resource costs and operation and maintenance complexity.
[0065] 4. During the training phase, the present invention only uses sensor data obtained under normal operating conditions as input, which reduces the dependence on fault sample data. It is expected to overcome the problems of sensor status monitoring lag and low accuracy in traditional monitoring methods, and provide a more efficient and reliable technical solution for online monitoring of smart meters. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings of the present invention are as follows.
[0067] Figure 1 This is a schematic diagram of the process of Example 1.
[0068] Figure 2 This is a schematic diagram of the device structure of Example 2.
[0069] Figure 3 This is a schematic diagram of the data reconstruction principle in Example 1. DETAILED DESCRIPTION
[0070] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0071] Embodiment 1:
[0072] A method for industrial instrument fault detection based on data correlation, such as Figure 1 As shown, the specific steps are as follows:
[0073] S1. Determine a number of sensors in the industrial instrument to be detected.
[0074] S2. Obtain real-time data of all sensors of the industrial instrument to be tested.
[0075] Specifically, assuming that there are n heterogeneous sensors inside the industrial instrument, each sensor generates m continuous data points in the time series, and the real-time data of all sensors of the industrial instrument to be detected is obtained, which is expressed as:
[0076]
[0077] Among them, x i,1 represents the measurement value of the i-th sensor at the j-th time point, i∈{1, 2, ..., n} represents different sensors, and j∈{1, 2, ..., m} represents the corresponding time point.
[0078] S3. Calculate the correlation coefficient matrix of every two sensors according to the real-time data, including the following steps:
[0079] S31. Divide the real-time data into time windows.
[0080] The original data set D is divided into equal intervals according to the preset time window W to obtain the time window data set D W Assume that each window contains w consecutive data points. Then for the i-th (i=1, 2, ..., N) time window, a new sub-dataset D can be obtained. i :
[0081]
[0082] Among them, x j,k represents the measurement value of the jth sensor at the kth time point, that is, in the i-th time window. j∈{1, 2, ..., n} represents different sensors, and k∈{(i-1)w+1, (i-1)w+2, ..., iw} represents each time point in the i-th time window.
[0083] Then the new set composed of all divided window data sets can be expressed as:
[0084]
[0085] in, Contains all data subsets obtained after partitioning according to the fixed time window W.
[0086] S32. Normalize the window data.
[0087] In order to better compare and process the correlations in different ranges, the sensor data in each time window is independently standardized. i , the Z-score standardization process can be expressed as:
[0088] For the data sequence of sensor j in window i First calculate the mean and standard deviation
[0089]
[0090]
[0091] Then, normalize each data point:
[0092]
[0093] Get the standardized sub-dataset
[0094]
[0095] S33. Calculate the correlation coefficient matrix based on the normalized data.
[0096] Based on the standardized data subset The Pearson correlation coefficient between each pair of sensors j and k within each window can be calculated:
[0097]
[0098] in, and They represent the standardized measurement values of the j-th and k-th sensors at the t-th time point in the time window i, respectively. and are the normalized averages of all measurements of the j-th and k-th sensors in time window i, respectively.
[0099] Through the above calculation method, the Pearson correlation coefficient matrix R of the relationship between all sensors in the i-th time window can be expressed as i :
[0100]
[0101] This forms the correlation coefficient matrix data set R for the entire time series:
[0102]
[0103] Next, for any pair of sensors, such as the jth and kth sensors, their Pearson correlation coefficients in all N time windows are extracted from these correlation coefficient matrices: Thus, the Pearson correlation coefficient time series V of sensors j and k is constructed j,k :
[0104]
[0105] Then the Pearson correlation coefficient data matrix V of each pair of sensors in the entire time series collected is obtained:
[0106]
[0107] The correlation coefficient matrix V is divided into time windows, and all Pearson correlation coefficients of the i-th time window are recorded as Yi:
[0108]
[0109] Then the Pearson correlation coefficient data matrix V can be expressed as:
[0110] Y=y=[Y1,Y2,…,Y N ].
[0111] S4. Input the correlation coefficient matrix of the real-time data into the LSTM encoder and LSTM decoder in sequence for reconstruction.
[0112] In step S4, the LSTM encoder learns a fixed-dimensional vector representation of the input time series, and the LSTM decoder uses this dimensional vector representation to reconstruct the time series based on the current hidden state and the value predicted at the previous time step. The difference between the input and the reconstructed output is the reconstruction error. During the training process, the autoencoder minimizes the reconstruction error as the objective function.
[0113] Since the data distribution of multi-sensor correlation coefficients for normal states is different from that for abnormal states, and the model only sees normal instances during training and learns to reconstruct them, when given an abnormal sequence, the model cannot reconstruct it well, resulting in a larger reconstruction error than that of normal sequences. Therefore, this method trains a codec that only learns normal data to reconstruct the time series, uses the reconstruction error to measure the anomaly, and then uses the reconstruction error of the data sequence for any future period to calculate the probability of anomaly occurring in that period.
[0114] Given a normal data sample of length N, a multivariate correlation time series Y = [Y1, Y2, ..., Y N ], where at each time point t i Up, Y i ∈R m is an m-dimensional vector representing the readings of m sensors at the same time. First, an LSTM encoder is trained to map the input time series Y to a vector of fixed dimension express:
[0115]
[0116] in represents the encoder at time step t i is the hidden state of the encoder, c is the number of LSTM units in the encoder hidden layer, and θ E Represents the parameters of the encoder network.
[0117] Then, an LSTM decoder is trained to utilize this fixed-dimensional vector H E Represents the time series to be reconstructed in reverse. For the decoder, at time step t i The hidden state of is:
[0118]
[0119] in, is the predicted value Y of the previous time step i and the final state of the encoder Calculated, and θ D Represents the parameters of the decoder network. During the decoding process, a linear layer with a weight matrix w and a bias vector b is used to combine the current hidden state of the decoder To predict the target value for the next time step
[0120]
[0121] The training objective of the model is to minimize the entire training sequence set Y = [Y1, Y2, ..., Y N ]The sum of squares of reconstruction errors at all time points:
[0122]
[0123] S5. Determine whether the industrial instrument is faulty based on the sum of squares of the reconstruction error.
[0124] In step S5, in the fault detection stage, for the subsequent multi-sensor data sequence in unknown state, the same processing method is used to obtain the correlation coefficient time series, which is input into the trained codec model for reconstruction, and the sum of squared reconstruction errors is used as the abnormality score a of the input sequence:
[0125]
[0126] When a exceeds the preset threshold τ, the sequence is considered abnormal:
[0127]
[0128] In this embodiment, if Figure 3 As shown, taking a time series of length 3 as the model input, using time point t i The value of Y i and the encoder at t i-1 Hidden state at the moment Get the encoder at t i Hidden state at the moment The encoder hidden state at the end of the input sequence is used as the initial state of the decoder The top layer of the decoder has a linear layer that calculates the output value of the last time point of the reconstructed sequence Next use and output value To get the next hidden state of the decoder Thus, all hidden states of the encoder and decoder are obtained recursively And the reconstructed sequence obtained after the input sequence is output by the model
[0129] Embodiment 2:
[0130] An industrial instrument fault detection device based on data correlation, such as Figure 2 As shown, including:
[0131] Data acquisition module: This module is connected to a variety of heterogeneous sensors built into the smart meter to receive and process monitoring data output by various sensors in real time. It uses high-performance analog / digital converters, such as TI's ADS1256, which has the characteristics of high input impedance, low bias current, and wide power supply voltage adaptability, ensuring compatibility and stability with various sensor signals in industrial environments. ADS1256 has a sampling rate of up to 2MSPS, 8-bit resolution, and low power consumption. It can accurately capture and digitize changes in weak sensor signals, meeting the needs of high-frequency real-time data acquisition in industrial applications.
[0132] Fault detection module: This module integrates advanced digital signal processors, such as TI C2000 series chips, with powerful mathematical computing capabilities and built-in floating-point unit FPU, which can efficiently perform correlation calculations and reasoning tasks based on the long short-term memory network LSTM model. Through real-time analysis and deep learning processing of the collected sensor data, this module can respond quickly when potential sensor faults are found and make judgments based on the preset threshold θ. When the reconstruction error exceeds the set threshold, the fault decision and control subsystem will immediately trigger an alarm and use the communication interface to send maintenance instructions to the control system, realizing rapid and accurate positioning and response to sensor faults.
[0133] Interface communication module: This module uses the ESP32 dual-mode wireless communication chip, supports both Wi-Fi and Bluetooth communication modes, and provides high-speed data transmission rate and energy-saving design, up to 150Mbps. With this efficient communication capability, the device can transmit sensor status information and fault alarms to the host computer, monitoring system or other remote devices in real time, allowing users to conveniently perform remote monitoring and management. High-speed data transmission performance ensures that relevant information can be delivered to relevant personnel in a timely manner when a fault occurs, thereby greatly shortening the fault response time. In addition, the threshold τ can be flexibly set through the communication interface to adapt to the fault detection standards in different industrial environments. At the same time, the device supports custom fault response strategies, automatically adjusts the alarm level and maintenance instructions according to the severity and priority of the fault, and ensures fast and accurate response measures for various fault conditions.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for industrial instrument fault detection based on data correlation, characterized in that: The specific method is as follows: Identify several sensors in the industrial instrument to be inspected; Obtain real-time data from all sensors of the industrial instruments to be tested; According to the real-time data, the correlation coefficient matrix between every two sensors is calculated; The correlation coefficient matrix of real-time data is sequentially input into the LSTM encoder and LSTM decoder for reconstruction; Determine whether the industrial instrument is faulty based on the sum of squares of the reconstruction error; The LSTM encoder and LSTM decoder are trained by historical data of normal operation of industrial instruments; The LSTM encoder and LSTM decoder are trained using historical data from the normal operation of industrial instruments. The specific method is as follows: Given a normal data sample of length N, a multivariate correlation time series Y = [Y1, Y2, ..., Y N ], where at each time point t, Y t ∈R m is an m-dimensional vector, representing the readings of m sensors at the same time; When training the LSTM encoder, it maps the input time series Y to a vector of fixed dimension express: in represents the hidden state of the encoder at time step t, c is the number of LSTM units in the encoder hidden layer, and θ E represents the parameters of the encoder network; When training the LSTM decoder, we use a fixed-dimensional vector H E Represents the time series to be reconstructed in reverse. For the decoder, its hidden state at time step t is: in, is the predicted value Y of the previous time step t and the final state of the encoder Calculated, and θ D represents the parameters of the decoder network; During decoding, the decoder passes through a linear layer with a weight matrix w and a bias vector b, combined with the current hidden state of the decoder To predict the target value for the next time step The training goal of the model is to minimize the entire training sequence set Y = [Y1, Y2, ..., Y N ]The sum of squares of reconstruction errors at all time points is minimized; The formula for calculating the sum of squared reconstruction errors is as follows: The specific method for judging whether the industrial instrument is faulty is as follows: The Pearson correlation coefficient data matrix V converted from real-time data is sequentially input into the trained LSTM encoder and LSTM decoder for reconstruction; Calculate the sum of squares of the reconstruction error as the anomaly score a of the input sequence. The specific calculation formula is: Let the preset abnormal score threshold be τ, then the fault judgment formula is:
2. The industrial instrument fault detection method based on data correlation according to claim 1, characterized in that: Calculate the correlation coefficient matrix between every two sensors, including: Divide the time window for real-time data; Normalize the window data; Based on the normalized data, the correlation coefficient matrix was calculated.
3. The industrial instrument fault detection method based on data correlation as claimed in claim 2, characterized in that: Assume that there are n heterogeneous sensors inside the industrial instrument, and each sensor generates m continuous data points in the time series. The real-time data of all sensors of the industrial instrument to be detected is obtained, which is expressed as: Among them, x i,j represents the measurement value of the i-th sensor at the j-th time point, i∈{1,2,…,n} represents different sensors, and j∈{1,2,…,m} represents the corresponding time point.
