Sensor diagnosis method based on correlation data prediction
By building a sensor association network and optimizing the BP neural network, using the maximum information coefficient and dot product attention mechanism, the problem of insufficient nonlinear relationship modeling and anti-interference ability in sensor diagnosis is solved, and efficient fault identification and accurate diagnosis of complex systems are achieved.
Patent Information
- Application Number
- CN202510670394.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-29
AI Technical Summary
When faced with complex systems, existing sensor fault diagnosis methods have problems such as nonlinear relationship modeling, anti-interference ability and global feature extraction, resulting in a decrease in diagnostic accuracy, especially in a variety of environments, which is difficult to identify gradient hidden faults.
By building a sensor association network, the nonlinear correlation between sensors is analyzed using the maximum information coefficient, the BP neural network is optimized by combining the dot product attention mechanism and the pollination algorithm, the correlation compensation and fault diagnosis between sensors are realized, and the feature weights are dynamically adjusted to improve diagnostic accuracy.
It significantly improves the accuracy and robustness of sensor diagnosis, can accurately identify abnormal sensors in complex systems, reduce the impact of external interference on diagnostic results, shorten response time and reduce computing resource consumption.
Smart Images

Figure CN120561534A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensor diagnosis, and in particular to a sensor diagnosis method based on correlation data prediction. Background Art
[0002] Most traditional fault diagnosis methods currently rely on data from a single sensor or consider linear relationships between sensors in isolation. These methods ignore potential nonlinearities and higher-order dependencies between sensors and lack effective compensation mechanisms for external interference. Furthermore, time series analysis alone often fails to fully capture the system's global behavioral trends, resulting in inaccurate diagnoses in complex environments and a risk of misjudgment. Consequently, existing technologies lack efficient and robust sensor fault diagnosis methods, especially in the face of changing environments and system disturbances.
[0003] Currently, commonly used sensor fault diagnosis methods can be divided into three categories: diagnostic methods based on hardware redundancy, diagnostic methods based on analytical models, and data-driven intelligent diagnostic methods. However, these methods have significant limitations when facing complex systems.
[0004] The first type of hardware redundancy approach implements cross-validation by configuring multiple groups of similar sensors. For example, a majority voting mechanism is used in triple-redundancy design to identify faulty sensors. While this approach offers intuitive physical reliability, it exponentially increases hardware costs. Furthermore, in complex systems with dense sensor networks (such as the agricultural IoT or industrial production lines), redundant configuration significantly increases deployment and maintenance difficulties. Furthermore, hardware redundancy can only detect explicit faults and lacks the ability to diagnose nonlinear coupling relationships between sensors or gradual faults (such as drift and sensitivity degradation).
[0005] The second category of model-driven methods implements fault detection by establishing a mathematical model of the system, including state estimation, parameter estimation, and equivalent space methods. Their advantage lies in their ability to leverage prior knowledge to construct residual generation mechanisms. For example, a strong tracking filter can detect constant-deviation faults in nonlinear systems by comparing model predictions with actual outputs. However, these methods rely heavily on precise mathematical models, and in practical engineering, sensor networks often face complex factors such as multivariable coupling and environmental noise, leading to cumulative modeling errors. This is particularly true in dynamic environments such as the agricultural Internet of Things, where random perturbations such as external temperature and humidity fluctuations and electromagnetic interference can cause model mismatches, leading to false positives and negative alerts. Furthermore, existing research has largely focused on linear systems, and the modeling of nonlinear, high-order dependencies remains a theoretical bottleneck.
[0006] The third type of data-driven approach uses machine learning techniques (such as support vector machines and deep neural networks) to mine fault features from historical data. For example, convolutional neural networks can classify gearbox faults by extracting multi-scale features from vibration signals, improving diagnostic accuracy compared to traditional threshold methods. However, such methods require a large amount of labeled data and consume a lot of computing resources, making it difficult to achieve real-time diagnosis. Secondly, existing methods often use single-sensor time series analysis, ignoring the spatial correlation of sensor networks. For example, the correlation features formed by adjacent sensors in agricultural environments due to shared microclimates are not effectively utilized, resulting in insufficient ability to capture global behavioral trends.
[0007] Overall, existing methods share common shortcomings in three areas: nonlinear relationship modeling, anti-interference capabilities, and global feature extraction. Hardware-based redundant design cannot resolve complex coupling between sensors, model-driven methods are limited by linear assumptions and noise sensitivity, and data-driven methods struggle to identify systemic faults due to isolated analysis of single-sensor data. These shortcomings lead to reduced diagnostic accuracy in highly variable environments and a noticeable lag in detecting gradual, hidden faults. Summary of the Invention
[0008] The purpose of the present invention is to provide a sensor diagnosis method based on correlation data prediction to improve the diagnostic accuracy of each associated sensor.
[0009] The purpose of the present invention can be achieved by the following technical solutions:
[0010] A sensor diagnosis method based on correlation data prediction includes the following steps:
[0011] Collect detection data from each sensor in the detection area in real time and perform pre-processing;
[0012] Based on the pre-processed detection data, nonlinear correlation calculation is performed to obtain the correlation strength between each sensor and construct a sensor correlation network;
[0013] Based on the sensor association network, a fault pre-assessment is performed on each sensor, and abnormal detection data is replaced with a fitting value;
[0014] The pre-processed detection data and fitting values are used as input features, and a fault diagnosis model constructed based on a sensor association network is used to diagnose each sensor, and a diagnosis result of each sensor is output.
[0015] Furthermore, the preprocessing operation includes minimum-maximum normalization, missing value filling and abnormal data replacement, wherein the missing value filling is performed by using the mean interpolation method or the median filling method, and the abnormal data replacement is performed by using the error value replacement method.
[0016] Furthermore, the nonlinear correlation calculation is performed using the maximum information coefficient method, and the step of obtaining the correlation strength between the sensors includes:
[0017] Given discrete variables X={x1,x2,...,x n} and Y={y1,y2,...,y n}, forming a scatter plot on a two-dimensional plane, where the discrete variables X and Y are the detection data of any two sensors;
[0018] Determine the upper and lower bounds of the values of X and Y, where the upper and lower bounds of X are denoted by X max 、X min , the upper and lower bounds of Y are denoted as Y max 、Y min ;
[0019] Divide the scatter plot into a grid based on the upper and lower bounds of the X and Y values to form an i×j grid, where each grid cell represents a region of X and Y variable values;
[0020] For the discrete variable X={x1,x2,...,x n} and Y={y1,y2,...,y n}, calculate the information entropy of X and Y, where the calculation expressions of information entropy are:
[0021]
[0022] Where H(X) is the information entropy of X, H(Y) is the information entropy of Y, and p(x i )、p(y i ) is the marginal probability distribution of the i-th data, b is a constant, which is 2 or e;
[0023] According to the information entropy of X and Y, the mutual information of each grid cell is calculated, where the calculation expression of the mutual information is:
[0024]
[0025] Where I(X;Y) is the mutual information value, p(x,y) is the joint probability distribution of X and Y, and p(x) and p(y) are their respective marginal probability distributions;
[0026] The mutual information of each grid unit is normalized, and the normalized result is used as the correlation strength between sensors, wherein the normalized operation expression is:
[0027]
[0028] Where MIC(X;Y) is the correlation strength, I maxis the maximum mutual information value.
[0029] Furthermore, the step of constructing the sensor association network includes:
[0030] Constructing a confusion matrix based on the correlation strength between the sensors;
[0031] A screening threshold is set, and based on the confusion matrix, corresponding sensors greater than or equal to the screening threshold are screened out, and the sensors are regrouped and merged to construct a sensor association network, wherein each group of sensors in the sensor association network represents a key node, and the relationship between the nodes is quantified by adopting the maximum information coefficient method.
[0032] Furthermore, the step of replacing abnormal detection data with fitting values includes:
[0033] Perform fault pre-assessment on each sensor, where the operational expression for the fault pre-assessment is:
[0034]
[0035] Where, is the prediction output of the previous fault pre-assessment model, is the nth fault pre-assessment model, x (n) It is the input of the nth fault pre-assessment model;
[0036] Based on the fault pre-assessment results, the detection data of sensors that have a strong correlation with the abnormal sensor are selected from the sensor association network. The abnormal detection data of the abnormal sensor is gradually replaced with the fitting value using an iterative correction mechanism to obtain the replaced abnormal data, which is expressed as:
[0037]
[0038] Where, is the theoretical normal data set after replacing the abnormal data, g() is the theoretical normal value fitting model, The detection data of the sensor having a strong correlation with the abnormal sensor;
[0039] The replaced abnormal data is input into the next fault pre-assessment model for fault pre-assessment, and the above steps are repeated for iterative evaluation, wherein the operation expression for fault pre-assessment of the replaced abnormal data is:
[0040]
[0041] Where, is the prediction output of the current fault pre-assessment, is the n+1th fault pre-assessment model.
[0042] Furthermore, the steps of constructing the fault diagnosis model based on the sensor association network include:
[0043] The multidimensional feature map output by the sensor association network is used as input, and the feature weight of each sensor is calculated based on the dot product attention mechanism, where the multidimensional features are detection data of different dimensions collected by different types of sensors, including pressure data, temperature data, and flow data;
[0044] A BP neural network is constructed and optimized using a flower pollination algorithm to obtain a fault diagnosis model based on a sensor association network, wherein the population in the flower pollination algorithm is composed of the feature weights and biases.
[0045] Furthermore, the calculation process of the feature weight of each sensor includes:
[0046] Based on the multidimensional feature map, a query vector Q, a key vector K and a value vector V are generated through three linear transformation layers respectively;
[0047] Calculate the dot product of the transposed matrix of the query vector Q and the key vector K to obtain the attention weight and form an attention weight matrix, where the attention weight is expressed as:
[0048]
[0049] Where score(q i ,k i ) is the query vector q i and key vector k i The similarity between them is calculated as follows:
[0050]
[0051] Where, α ij is the attention weight, q i is the i-th query vector, k i is the i-th key vector, b k is the dimension of the key vector;
[0052] The value vector V is weightedly summed using the attention weight to generate a context vector as the feature weight of the sensor, where the feature weight of the sensor is expressed as:
[0053]
[0054] Where c i is the feature weight of the i-th sensor, v j is the value vector corresponding to the j-th position in the input sequence.
[0055] Furthermore, the step of optimizing using the flower pollination algorithm includes:
[0056] Initialization: Initializing the parameters of the flower pollination algorithm, including step size, propagation probability, and population size, where the solution for each individual in the population is a combination of the feature weights and biases;
[0057] Pollen dispersal: Update individual positions based on the set dispersal probability, combining the local short-distance pollen dispersal mechanism and the global long-distance pollen dispersal mechanism;
[0058] Fitness evaluation: The fitness of each individual is calculated using a fitness function, and individuals of the next generation are selected based on the fitness. The square sum of the errors of the BP neural network is used as the fitness function, which is expressed as:
[0059]
[0060] Where E is the sum of squared errors, N is the number of samples, and t i is the actual output, o i Predict output for BP neural network;
[0061] Network update: adjusting the feature weights and biases of the BP neural network according to the update rules of the flower pollination algorithm, and minimizing the error function using a minimization error function;
[0062] Iterative optimization: Repeat the above-mentioned pollen dissemination, fitness evaluation and network update process, perform iterative optimization, and obtain a globally optimized BP neural network as the fault diagnosis model constructed based on the sensor association network.
[0063] Furthermore, the expression of the local short-distance pollen transmission mechanism is:
[0064]
[0065] Where, The current position of the i-th individual, ε is a random number uniformly distributed between [0,1], are the positions of two different individuals randomly selected from the population.
[0066] Furthermore, the expression of the global long-distance pollen dispersal mechanism is:
[0067]
[0068] Where, The current position of the i-th individual, l is the step length, X best is the current optimal solution, and p is the propagation probability.
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] (1) The present invention takes into account the correlation between sensors. By analyzing the potential correlation between sensors, the present invention adopts a correlation compensation strategy of replacing abnormalities with fitting values to achieve interference suppression. Compared with the traditional threshold filtering method, the interference sensitivity is significantly reduced, and the sensor data abnormalities caused by external factors are suppressed. The fault diagnosis model based on the sensor correlation network is constructed, thereby improving the diagnostic accuracy of each associated sensor.
[0071] (2) This paper assigns weights to each sensor based on a dot-product attention mechanism. In the BP neural network optimized by the flower pollination algorithm, the local and global optimization of the flower pollination algorithm are combined to break through the linear limitations of traditional model-driven methods and improve the detection sensitivity of gradual hidden faults. Compared with the linear assumptions of traditional model-driven methods and the isolated analysis of data-driven methods, this architecture achieves efficient identification of complex systemic faults through a global feature screening framework of the sensor association network, while shortening system response time and reducing computing resource consumption.
[0072] (3) This paper analyzes the correlation between sensors using the maximum information coefficient and constructs a fault diagnosis model based on this correlation. Experimental data shows that this method can significantly improve the accuracy of fault diagnosis in complex multi-sensor systems and can more accurately detect and identify abnormal sensors compared to traditional methods.
[0073] (4) The present invention performs fault pre-assessment on each sensor and replaces abnormal detection data with fitted values, achieving correlation compensation and eliminating the impact of abnormal sensor data on diagnostic results. This technology can effectively reduce misdiagnosis caused by abnormal data from a single sensor, improving the reliability and consistency of diagnostic results. In practical applications, the interference of abnormal data is effectively suppressed, reducing errors in fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 Schematic diagram of the method flow of the present invention;
[0075] Figure 2 A schematic diagram of a sensor association network according to the present invention;
[0076] Figure 3 Schematic diagram of the principle of the dot product attention mechanism of the present invention;
[0077] Figure 4 This is the validation dataset of the present invention;
[0078] Figure 5 is the total absolute error between the different abnormal conditions and the normal operating health value of the present invention;
[0079] Figure 6 This is a broken line graph of the health score after the abnormality correction process of the present invention;
[0080] Figure 7 This is a schematic diagram comparing the accuracy of the fault diagnosis model of the present invention;
[0081] Figure 8 This is a comparison chart of abnormal data and original data of the present invention. DETAILED DESCRIPTION
[0082] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0083] This embodiment provides a sensor diagnosis method based on correlation data prediction to address the shortcomings of existing technologies in nonlinear relationship modeling, anti-interference ability, and global feature extraction. By real-time monitoring of sensor health status, it can promptly detect problems such as large sensor deviation and drift, thereby ensuring sensor measurement accuracy. By using the maximum information coefficient (MIC) to analyze the potential correlation between sensors, and combining the attention mechanism and correlation compensation strategy, the accuracy and real-time performance of traditional methods in multi-sensor systems are improved, especially with strong anti-interference ability against data fluctuations caused by external interference, thereby ensuring the stability and reliability of the system. Specifically, combined with Figure 1 As shown, the method includes the following steps:
[0084] Step 1: Obtain various detection data of the sensor in the detection area and perform data cleaning.
[0085] Through minimum-maximum normalization, the dimensional differences between different sensor data are eliminated and the data are uniformly scaled to the interval [0,1] or the standard normal distribution. At the same time, techniques such as mean interpolation, median filling and error value replacement can be used to handle missing and abnormal values to further ensure the integrity and consistency of the data set.
[0086] Step 2: Calculate the correlation strength between sensors based on MIC.
[0087] Nonlinear correlation analysis is performed on cleaned sensor data. The maximum information coefficient (MIC) method is used to quantify the nonlinear and high-order dependencies between sensors. Based on the MIC, the correlation strength between sensors is calculated and mapped to edge weights of network nodes to construct a sensor association network. Specifically, the mutual information of each grid is calculated through grid division and information entropy calculation. The mutual information is maximized to evaluate the correlation between sensors. The correlation is then normalized to obtain a confusion matrix of sensor correlation coefficients, which can better measure the dependencies between sensors.
[0088] Specifically, the calculation process of the association strength in step 2 is as follows:
[0089] First, perform mesh division:
[0090] For a given discrete variable X={x1,x2,...,x n} and Y={y1,y2,...,y n}, forming a scatter plot on a two-dimensional plane. Divide the scatter plot into a grid with i columns and j rows, where each grid cell represents a region of X and Y variable values.
[0091] Boundary setting: First determine the value range of X and Y. min , X max and Y min , Y max are the minimum and maximum values of X and Y respectively.
[0092] Grid division: Divide the grid according to i and j, divide the value range of X into i equal parts, and divide the value range of Y into j equal parts, forming an i×j grid.
[0093] Secondly, calculate the information entropy:
[0094] For a random variable X=(x1,x2,...,x n ), the information entropy calculation formula is as follows:
[0095]
[0096] Then calculate the mutual information:
[0097]
[0098] Here, p(x,y) is the joint probability distribution of X and Y, and p(x) and p(y) are their respective marginal probability distributions.
[0099] Finally, the mutual information is normalized as follows:
[0100]
[0101] The normalized mutual information is used as the correlation strength between sensors.
[0102] Step 3: Build a sensor association network.
[0103] Based on the correlation analysis results of step 2, set an appropriate screening threshold, regroup and merge the sensors with strong correlation in the confusion matrix, and combine these correlation groups to build a sensor association network. Each group of sensors represents a key node in the system, and the relationship between the nodes is quantified by the maximum information coefficient. Figure 2 shown.
[0104] Step 4: Perform a preliminary evaluation of the sensor for fault diagnosis.
[0105] During the initialization phase of the fault pre-assessment model, dynamic correlation analysis is used to assess the accuracy of sensor data and identify anomalous sensors with deviating predicted values. Subsequently, other sensor datasets with strong correlations with the anomalous sensor are selected and a theoretical normal value fitting model is constructed based on the dynamic correlation characteristics between multiple sensors. A stepwise iterative correction mechanism replaces the anomalous data with the fitted value, thus mitigating the shortcomings of traditional methods such as linear interpolation, moving average, or regression prediction, which are susceptible to sudden changes in values and interference from historical data. During the compensation process, the dynamic trends of the associated sensor group are continuously monitored, and compensation parameters are adjusted through closed-loop feedback to dynamically suppress the impact of sensor data anomalies on fault diagnosis results. For example, when the measured value of sensor A exceeds the threshold, a theoretical normal value fitting model is constructed by calling the real-time data of its associated sensors B, C, and D to generate A's theoretical fitted value. Simultaneously, A's original data is also used in the cross-evaluation of B, C, and D. A is marked as anomalous, and its actual score and predicted value are recorded. In subsequent fault diagnosis, A's original abnormal information is retained for problem location, while the fitted value A' is used to replace the anomalous value as a feature input, eliminating the interference of the abnormal data on the evaluation of other sensors and improving diagnostic accuracy. The core of this method is to achieve adaptive generation of compensation values by establishing a dynamic correlation model, rather than relying on fixed historical data or single-dimensional statistical features for anomaly correction.
[0106] The core idea of the above-mentioned association compensation can be expressed by the following formula:
[0107] Build a fault pre-assessment model to predict abnormalities and pre-assess faults for each sensor:
[0108]
[0109] Abnormal data is gradually replaced based on the normal data of other sensors to optimize the diagnosis results. Abnormal sensor data replacement:
[0110]
[0111] The inputs to the next fault prediction model are:
[0112]
[0113] in, is the prediction output of the previous fault pre-assessment model, is the theoretical normal data set after replacing abnormal data, represents the nth model, is the detection data of the sensor that has a strong correlation with the abnormal sensor, and g() is the theoretical normal value fitting model.
[0114] This step enables anomaly detection based on the mutual prediction mechanism between associated sensors. By inputting the replaced abnormal data into the next fault pre-assessment model for pre-assessment, the replaced data is theoretically normal data, which reduces the interference of this abnormal value on the evaluation of other normal sensors. By pre-assessing in the next pre-assessment model, the above steps are repeated iteratively, and while reducing the original maximum anomaly, further evaluation is performed to determine whether there are still abnormal sensors exceeding the threshold. Step 5: Dynamically adjust the feature weights of each sensor in the fault diagnosis model built based on the sensor association network through the attention mechanism.
[0115] Combine Figure 3 As shown in the figure, the multi-dimensional features output by the sensor association network (including pressure data, temperature data, flow data and other numerical values of different dimensions and dimensions obtained by different types of sensors) are mapped as input, and the query vector Q, key vector K and value vector V are generated through three linear transformation layers respectively; the dot product of the transposed matrix of Q and K is calculated to obtain the attention weight matrix A, where the elements in A are the attention weights, and the calculation formula is:
[0116]
[0117] Where score(q i ,k i ) is the query vector q i and key vector k i The similarity between them is calculated as follows:
[0118]
[0119] Where q is the query vector, k is the key vector, and d k is the dimension of the key vector
[0120] After being normalized by the softmax function, the weighted sum is performed with V to generate a context vector. The formula for optimizing the weight of the input feature in the current fault diagnosis model is as follows:
[0121]
[0122] In addition, the dynamically weighted features are fused with the original features through residual connections to form an enhanced sensor feature vector. The fusion result is input into the convolutional layer of the fault diagnosis model for classification training, and the attention weight parameters and diagnosis model parameters are jointly optimized through the back propagation algorithm to realize the extraction of key fault features.
[0123] This step adopts a feature weighting architecture based on the dot product attention mechanism, where the dimensions of Q, K, and V are set to 1 / 8 of the number of input feature channels, and a scaling factor is introduced after the dot product calculation. By using stable gradient propagation and ultimately dynamically allocating feature weights, the fault diagnosis model's ability to discriminate potential fault modes under different working conditions is improved.
[0124] Step 6: Use the flower pollination algorithm to optimize the BP neural network (FPABP) to build a fault diagnosis model.
[0125] In this embodiment, a corresponding fault diagnosis model is constructed for each sensor. The FPABP network model is optimized using the weights and pollination algorithm described above, resulting in a fault diagnosis model capable of diagnosing the corresponding sensor. Specifically, the steps for constructing the fault diagnosis model include: first, initialization, setting the parameters of the pollination algorithm, including the step size, propagation probability, and population size. The population consists of the characteristic weights and biases of the sensor network, and the solution for each individual is represented as a combination of the weights and biases of the neural network;
[0126] The pollen dispersal process is then executed, combining the local short-distance pollen dispersal mechanism and the global long-distance pollen dispersal to update the individual position, and introducing the current optimal solution so that the candidate solutions in the solution space are dynamically adjusted during iteration. The local short-distance pollen dispersal formula is:
[0127]
[0128] The global pollination update formula for the mechanism of long-distance pollen dispersal by flight (cross-pollination) is as follows:
[0129]
[0130] Where, is the current position of the i-th individual, X best is the current optimal solution, and are the positions of two different individuals randomly selected from the population, l is the step size, p is the propagation probability, and ε is a random number uniformly distributed between [0,1], which is used to control the amplitude of the local search;
[0131] Then, based on the square sum of the errors of the BP neural network as the fitness function, the fitness value of each individual is calculated. The square sum of the difference between the actual output and the predicted output in the formula is used to evaluate the network performance. The fitness evaluation uses the fitness function of each individual represented by the square sum of the errors of the BP neural network:
[0132]
[0133] Among them, t i is the actual output, o i is the predicted output of the neural network, and N is the number of samples.
[0134] Then, the weights and biases are adjusted according to the update rules of the flower pollination algorithm, and the error function is minimized by the gradient descent method, so that the network gradually approaches the optimal solution. After multiple iterative optimizations, the globally optimized FPABP network is obtained as the fault diagnosis model.
[0135] Step 7: By integrating and evaluating the real-time detection data of all sensors in the associated sensor group, the quantitative health status indicators and failure probability of each sensor are calculated based on the corrected values after sensor weight allocation, and a multi-level threshold judgment mechanism is used to generate the corresponding alarm level signal. The comprehensive evaluation results and alarm information are output to the human-computer interaction interface and external device interface in real time.
[0136] In order to verify the effectiveness of the fault diagnosis model, this paper uses Figure 4 The data shown is collected by sensors in a certain company's station in a certain month, combined with temperature, pressure, flow, pressure difference and other data as samples for verification.
[0137] First, correlation compensation is performed on abnormal data. During the initialization phase, a fault pre-assessment model is constructed to identify abnormal data by estimating the accuracy of sensor data. The theoretical normal values of abnormal sensors are fitted using the operating data of associated sensors, and abnormal data is gradually replaced. This improves the stability and accuracy of internal system diagnosis and effectively addresses data interference in complex environments.
[0138] For the analysis of Task A2, two commonly used anomaly handling methods were selected for comparison: moving average and quartiles. By calculating the absolute difference between the normal health value and the health value of different abnormal states within the associated sensor group and summing them, the total absolute error (TAE) between the four abnormal conditions and the normal operating health value was measured. The calculation results are as follows: Figure 5 shown.
[0139] pass Figure 5 It can be concluded that the results are shown in the following table:
[0140] Table 1 Total absolute errors between different abnormal conditions and normal operating health values
[0141] Abnormal difference degree TAE Raw abnormal data 137.97 Related compensation 95.65 Moving Average 111.33 Quartiles 99.40
[0142] This shows that the device health assessment using the correlation compensation method is closest to normal operating conditions, indicating that this method has the least impact on the overall sensor network. This is because the correlation compensation method dynamically corrects abnormal data by building a sensor network, reducing interference such as sudden changes.
[0143] Draw a line graph of health under different correction methods, such as Figure 6 As shown, the advantages of the correlation compensation method can be more intuitively demonstrated. Figure 6 The following diagram shows the health score curves for normal and abnormal health scores, as well as the health score curves after processing using three anomaly correction methods. Compared to the normal health curve, the impact of abnormal data not only significantly reduces the health score of the abnormal sensor but also affects the health scores of multiple sensor points. This is because in a correlated diagnosis system, each sensor serves not only as a target for fault diagnosis but also as a basis for diagnosis of other sensors. Therefore, an abnormal sensor will lower the health scores of associated sensors.
[0144] Taking the score value of the point with index number 4 in the figure as an example, the health level is shown in the following table:
[0145] Table 2 Health score
[0146] method Health score Normal health score 99.72 Related compensation 99.70 Moving Average 98.88 Quartiles 95.98
[0147] As shown in the table above, quartile optimization and moving average optimization effectively reduce the impact of abnormal data on normal sensors, but correlation compensation performs better in anomaly correction, with the corrected score curve almost overlapping with the normal curve. This shows that, among these methods, correlation compensation can significantly reduce the interference of abnormal sensor data on other sensors.
[0148] To evaluate the predictive capabilities of the fault diagnosis model, we used a regression accuracy calculation function as the evaluation criterion. This function measures the difference between the predicted results and the actual values and calculates the relative error ratio that meets a given threshold. A value closer to 1 indicates a better model prediction.
[0149]
[0150] Data from tasks A1, A2, and A4 were selected and validated using a dataset segmentation method. A traditional single-point time series prediction model was constructed to assess the health of the same sensor task and its accuracy was calculated. The performance of the two models was evaluated by comparing their accuracy under normal system operation and under data fluctuations.
[0151] The comparison chart of the model accuracy of the normal operation of the system is as follows Figure 7 The comparison chart of the system's model prediction value and original data for abnormal values is shown in the figure below. Figure 8 As shown. For abnormal state data (similar to the presence of data jump points), the fault diagnosis model of the association prediction of this embodiment and the single-point time series prediction model are used for analysis, and the predicted values are compared with the actual data. The sensor values of different tasks in the figure are:
[0152] Table 3 Prediction results of sensor number for different tasks
[0153]
[0154] The results show that the fault diagnosis model outperformed the single-point time series prediction model in predicting transition points for tasks A1, A2, and A4, with predicted values closer to the actual data. The accuracy improved by 15.88% in task A1, 4.57% in task A2, and 16.59% in task A4. This demonstrates that the fault diagnosis model for correlation prediction in this embodiment can more accurately capture and predict data transitions by dynamically adjusting input features based on data from other sensors related to the target sensor.
[0155] In summary, the core improvements of this embodiment are as follows:
[0156] 1. Dynamic nonlinear association network:
[0157] A dynamic sensor association network is constructed through association analysis (the method in this embodiment uses the maximum information coefficient (MIC)), aiming to build a feature correlation framework with adaptability to working conditions. Compared with the traditional linear correlation coefficient, MIC fully captures the complex dependency characteristics between multi-source sensors by maximizing information entropy, such as the correlation pattern of temperature and vibration sensors and the dynamic response of pressure and flow sensors. This association network not only serves as a feature screening framework, but also analyzes abnormal changes in the relationship between sensors through a predictive model, thereby diagnosing sensor performance degradation or failure - for example, when the health assessment value of a specific sensor and other sensors deviates significantly from the model association prediction value, sensor performance degradation detection and fault location are achieved. At the same time, the dynamic update mechanism enhances adaptability to working conditions by adjusting the association weights in real time, such as strengthening the association strength of key sensors in industrial strong interference scenarios, solving the engineering problem that hardware redundancy design cannot analyze dynamic coupling relationships.
[0158] 2. Adaptive anti-interference:
[0159] Secondly, through the coordinated optimization of the association compensation strategy and the attention mechanism, a closed-loop anti-interference system is formed. When sensor values suddenly change, the association compensation algorithm is used to gradually replace abnormal data based on the real-time fitting of theoretical normal values based on the strongly correlated sensor groups in the association network, suppressing system interference. Compared with traditional threshold filtering methods, this method significantly reduces interference sensitivity and suppresses sensor data anomalies caused by external factors. At the same time, the attention mechanism dynamically weights and fuses the multi-source features of the sensor group through the weight redistribution structure, increasing the proportion of key weights and achieving efficient systemic fault identification.
[0160] 3. Global feature collaborative optimization:
[0161] A scheme integrating multi-scale feature extraction with a fault diagnosis model based on FPABP is proposed. The FPABP neural network optimizes the initial weight distribution of the neural network through a flower pollination algorithm and adjusts parameters in conjunction with global correlation moments to improve the detection sensitivity of gradual and hidden faults. Compared to the linear assumptions of traditional model-driven approaches and the isolated analysis of data-driven approaches, this architecture achieves efficient identification of complex systemic faults through a global feature screening framework within the sensor association network, while also shortening system response time and reducing computing resource consumption.
[0162] This invention achieves breakthroughs in nonlinear modeling, anti-interference and global feature extraction through the collaborative design of three major parts: dynamic correlation analysis, intelligent compensation and feature optimization. The dynamic nonlinear correlation network constructs the sensor coupling relationship based on correlation analysis, revealing the nonlinear dependency characteristics of multi-source data; the adaptive anti-interference part adopts a closed-loop compensation mechanism, and realizes adaptive correction of key data through a real-time dynamic weight strategy under strong interference conditions, significantly improving robustness; the global feature collaborative optimization architecture integrates multi-scale feature extraction and FPABP neural network, combined with the global optimization of the flower pollination algorithm and the global correlation matrix adjustment, breaking through the linear limitations of traditional model-driven methods and enhancing the sensitivity of gradual fault detection. The resulting diagnostic system performs better than traditional methods in industrial strong interference scenarios, providing an innovative solution for intelligent health monitoring of complex equipment.
[0163] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0164] It will be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention may be implemented in various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0165] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0168] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0169] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A sensor diagnosis method based on correlation data prediction, characterized in that: The following steps are involved: Collect detection data from each sensor in the detection area in real time and perform pre-processing; Based on the pre-processed detection data, nonlinear correlation calculation is performed to obtain the correlation strength between each sensor and construct a sensor correlation network; Based on the sensor association network, a fault pre-assessment is performed on each sensor, and abnormal detection data is replaced with a fitting value; The pre-processed detection data and fitting values are used as input features, and a fault diagnosis model constructed based on a sensor association network is used to diagnose each sensor, and a diagnosis result of each sensor is output.
2. A sensor diagnosis method based on correlation data prediction according to claim 1, characterized in that: The preprocessing operation includes minimum-maximum normalization, missing value filling and abnormal data replacement, wherein the missing value filling method is adopted by the mean interpolation method or the median filling method, and the abnormal data replacement method is adopted by the error value replacement method.
3. The sensor diagnosis method based on correlation data prediction according to claim 1, characterized in that: The nonlinear correlation calculation is performed using the maximum information coefficient method, and the step of obtaining the correlation strength between the sensors includes: Given discrete variables X={x1,x2,...,x n } and Y={y1,y2,...,y n }, forming a scatter plot on a two-dimensional plane, where the discrete variables X and Y are the detection data of any two sensors; Determine the upper and lower bounds of the values of X and Y, where the upper and lower bounds of X are denoted by X max 、X min , the upper and lower bounds of Y are denoted as Y max 、Y min ; Divide the scatter plot into a grid based on the upper and lower bounds of the X and Y values to form an i×j grid, where each grid cell represents a region of X and Y variable values; For the discrete variable X={x1,x2,...,x n } and Y={y1,y2,...,y n }, calculate the information entropy of X and Y, where the calculation expressions of information entropy are: Where H(X) is the information entropy of X, H(Y) is the information entropy of Y, and p(x i )、p(y i ) is the marginal probability distribution of the i-th data, b is a constant, which is 2 or e; According to the information entropy of X and Y, the mutual information of each grid cell is calculated, where the calculation expression of the mutual information is: Where I(X;Y) is the mutual information value, p(x,y) is the joint probability distribution of X and Y, and p(x) and p(y) are their respective marginal probability distributions; The mutual information of each grid unit is normalized, and the normalized result is used as the correlation strength between sensors, wherein the normalized operation expression is: Where MIC(X;Y) is the correlation strength, I max is the maximum mutual information value.
4. The sensor diagnosis method based on correlation data prediction according to claim 1, characterized in that: The steps of constructing the sensor association network include: Constructing a confusion matrix based on the correlation strength between the sensors; A screening threshold is set, and based on the confusion matrix, corresponding sensors greater than or equal to the screening threshold are screened out, and the sensors are regrouped and merged to construct a sensor association network, wherein each group of sensors in the sensor association network represents a key node, and the relationship between the nodes is quantified by adopting the maximum information coefficient method.
5. The sensor diagnosis method based on correlation data prediction according to claim 1, characterized in that: The step of replacing abnormal detection data with fitting values comprises: Perform fault pre-assessment on each sensor, where the operational expression for the fault pre-assessment is: Where, is the prediction output of the previous fault pre-assessment model, is the nth fault pre-assessment model, x (n) is the input of the nth fault pre-assessment model; Based on the fault pre-assessment results, the detection data of sensors that have a strong correlation with the abnormal sensor are selected from the sensor association network. The abnormal detection data of the abnormal sensor is gradually replaced with the fitting value using an iterative correction mechanism to obtain the replaced abnormal data, which is expressed as: Where, is the theoretical normal data set after replacing the abnormal data, g() is the theoretical normal value fitting model, The detection data of the sensor having a strong correlation with the abnormal sensor; The replaced abnormal data is input into the next fault pre-assessment model for fault pre-assessment, and the above steps are repeated for iterative evaluation, wherein the operation expression for fault pre-assessment of the replaced abnormal data is: Where, is the prediction output of the current fault pre-assessment, is the n+1th fault pre-assessment model.
6. The sensor diagnosis method based on correlation data prediction according to claim 1, characterized in that: The steps of constructing the fault diagnosis model based on the sensor association network include: The multidimensional feature map output by the sensor association network is used as input, and the feature weight of each sensor is calculated based on the dot product attention mechanism, where the multidimensional features are detection data of different dimensions collected by different types of sensors, including pressure data, temperature data, and flow data; A BP neural network is constructed and optimized using a flower pollination algorithm to obtain a fault diagnosis model based on a sensor association network, wherein the population in the flower pollination algorithm is composed of the feature weights and biases.
7. The sensor diagnosis method based on correlation data prediction according to claim 6, characterized in that: The calculation process of the feature weight of each sensor includes: Based on the multidimensional feature map, a query vector Q, a key vector K and a value vector V are generated through three linear transformation layers respectively; Calculate the dot product of the transposed matrix of the query vector Q and the key vector K to obtain the attention weight and form an attention weight matrix, where the attention weight is expressed as: Where score(q i ,k i ) is the query vector q i and key vector k i The similarity between them is calculated as follows: Where, α ij is the attention weight, score(q i ,k i ) is the query vector q i and key vector k i The similarity between i is the i-th query vector, k i is the i-th key vector, d k is the dimension of the key vector; The value vector V is weightedly summed using the attention weight to generate a context vector as the feature weight of the sensor, where the feature weight of the sensor is expressed as: Where c i is the feature weight of the i-th sensor, v j is the value vector corresponding to the j-th position in the input sequence.
8. The sensor diagnosis method based on correlation data prediction according to claim 6, characterized in that: The step of optimizing by using the flower pollination algorithm comprises: Initialization: Initializing the parameters of the flower pollination algorithm, including step size, propagation probability, and population size, where the solution for each individual in the population is a combination of the feature weights and biases; Pollen dispersal: Update individual positions based on the set dispersal probability, combining the local short-distance pollen dispersal mechanism and the global long-distance pollen dispersal mechanism; Fitness evaluation: The fitness of each individual is calculated using a fitness function, and individuals of the next generation are selected based on the fitness. The square sum of the errors of the BP neural network is used as the fitness function, which is expressed as: Where E is the sum of squared errors, N is the number of samples, and t i is the actual output, o i Predict output for BP neural network; Network update: adjusting the feature weights and biases of the BP neural network according to the update rules of the flower pollination algorithm, and minimizing the error function using a minimization error function; Iterative optimization: Repeat the above-mentioned pollen dissemination, fitness evaluation and network update process, perform iterative optimization, and obtain a globally optimized BP neural network as the fault diagnosis model constructed based on the sensor association network.
9. The sensor diagnosis method based on correlation data prediction according to claim 8, characterized in that: The expression of the local short-distance pollen dispersal mechanism is: Where, The current position of the i-th individual, ε is a random number uniformly distributed between [0,1], are the positions of two different individuals randomly selected from the population.
10. The sensor diagnosis method based on correlation data prediction according to claim 8, characterized in that: The expression of the global long-distance pollen dispersal mechanism is: Where, The current position of the i-th individual, l is the step length, X best is the current optimal solution, and p is the propagation probability.