Pressure gauge temperature data processing method based on temperature verification drift error compensation
By constructing a temperature calibration drift error compensation method, dynamically adjusting temperature drift, combining adaptive noise filtering and temperature gating mechanism, the problem of distinguishing temperature changes and fault sudden changes in pressure gauge measurement is solved, and the accuracy and adaptability of fault diagnosis are improved.
Patent Information
- Application Number
- CN202510874610.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The prior art cannot effectively distinguish temperature changes and fault sudden changes, resulting in a decrease in the accuracy of pressure gauge measurement data, and traditional methods cannot adapt to the dynamic temperature environment, affecting the accuracy of fault diagnosis.
By constructing a learnable compensation function based on temperature deviation and rate of change, combining adaptive noise filtering and temperature gating mechanism, the temperature drift compensation is dynamically adjusted, and the temperature condition masking mechanism and Bayesian correction method are used to decouple temperature drift and fault characteristics to enhance model adaptability.
Dynamic temperature drift compensation is achieved, noise interference is suppressed, fault characteristics are retained, fault prediction is improved, and the adaptability of the model is enhanced in different temperature scenarios.
Smart Images

Figure CN120372233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method for processing pressure gauge temperature data based on temperature calibration drift error compensation. Background Art
[0002] Industrial pressure gauges are widely used in various production and monitoring systems and undertake key pressure measurement tasks. However, the measurement signals of pressure sensors are easily affected by environmental temperature changes, resulting in non-linear drift of measurement data. This temperature-induced drift is often confused with the mutation signals caused by faults, thus affecting the accuracy of fault diagnosis. In practical applications, in an environment with drastic temperature changes, conventional normalization and drift compensation methods often cannot effectively separate temperature changes from fault mutations, leading to misjudgment of the model and degradation of performance. In addition, existing temperature drift compensation methods are mostly static linear transformations and cannot adapt to the dynamically changing temperature conditions in the actual environment, resulting in unsatisfactory drift compensation effects.
[0003] Patents in the prior art such as those with publication numbers CN119782759A, CN119783060A, CN119760592A, etc. have problems such as being unable to be dynamically adjusted, the noise filtering method being unable to adapt to changes in environmental temperature, not fully considering the influence of temperature changes on the extraction of time series features, thus affecting the accuracy of fault identification, and not being able to handle the influence of temperature changes on the probability of fault occurrence. Summary of the Invention
[0004] In order to solve the technical problem of temperature drift of the pressure gauge in the prior art, the present invention provides a method and system for processing pressure gauge temperature data based on temperature calibration drift error compensation.
[0005] The present invention is realized through the following technical solutions:
[0006] A method for processing pressure gauge temperature data based on temperature calibration drift error compensation includes:
[0007] S1. Data acquisition, synchronously acquiring the original pressure readings and environmental temperature time series data of the industrial pressure gauge through a pressure sensor and a thermocouple temperature sensor;
[0008] S2. Data preprocessing, including verification of temperature and pressure synchronization and outlier processing;
[0009] S3. Dynamic temperature drift compensation preprocessing, constructing a learnable compensation function based on temperature deviation and temperature change rate to achieve dynamic compensation of non-linear drift;
[0010] S4. Adaptive noise filtering and feature enhancement: Extract the frequency-domain coefficients at each scale through multi-layer discrete wavelet transform, calculate the adaptive threshold for each layer according to the temperature change rate at the current moment, perform non-linear compression processing on the wavelet coefficients in combination with the soft threshold function, and use the reconstructed wavelet basis function to inverse-transform the processed coefficients back to the time-domain signal to obtain the denoised pressure time series output;
[0011] S5. Modeling of the pressure gauge temperature data;
[0012] S6. Judgment of the stop iteration condition;
[0013] S7. Model inference.
[0014] Furthermore, the temperature and pressure synchronization verification adopts a spatio-temporal alignment method. Based on the time series characteristics of the temperature and pressure data, combined with the temperature change rate and timestamp information, the data of both are synchronously adjusted through interpolation.
[0015] Furthermore, the construction of the learnable compensation function based on temperature deviation and temperature change rate includes: Based on the difference between the original pressure reading, the real-time temperature value and the reference temperature, combined with the drift compensation bias term and the linear coefficient term, calculate the drift baseline term. Subsequently, combined with the adjustment factor that exponentially decays with the temperature change rate, adaptively adjust the compensation amount. By subtracting the calculated compensation amount from the original pressure reading, obtain the pressure compensation value after removing the temperature drift.
[0016] Furthermore, the pressure compensation value is calculated as follows:
[0017]
[0018] where is the compensated pressure value, is the original pressure reading; is the real-time temperature value; is the reference temperature; is the temperature change rate; is the drift compensation bias term; is the drift compensation linear coefficient; is the temperature mutation suppression factor.
[0019] Furthermore, the adaptive noise filtering and feature enhancement is expressed as:
[0020]
[0021] where is the denoised pressure time series signal; represents the temperature adaptive threshold of the -th layer wavelet coefficient; For reconstructing wavelet basis functions, which are used for signal reconstruction of wavelet coefficients at the th layer; is a soft threshold function; is a discrete wavelet transform operator, and outputs wavelet coefficients at the th layer; is the compensated pressure value.
[0022] Furthermore, is calculated as ; is the compensated pressure value; is the sign function.
[0023] Furthermore, the step S5 includes:
[0024] Construct a bidirectional temperature-gated recurrent network structure model, perform data processing on the core layer, perform fault feature decoupling regularization on the feature decoupling layer, perform result output on the output layer, correct the prediction probability distribution, calculate the temperature-aware cross-entropy loss function, and perform backpropagation and parameter update.
[0025] Furthermore, the fault feature decoupling regularization performed by the feature decoupling layer includes adopting a temperature-conditioned masking mechanism and dynamically adjusting the dropout probability by calculating the temperature sensitivity of the features.
[0026] Furthermore, the prediction probability distribution correction includes performing temperature-aware Bayesian correction operations through a temperature binning prior matrix.
[0027] Furthermore, the calculation method of the temperature-aware cross-entropy loss function is expressed as:
[0028]
[0029] In the formula, is the temperature-aware cross-entropy loss function; is the total number of training samples; is the one-hot encoding of the true fault category of the th sample; is the predicted probability distribution of the th sample after correction; is the KL divergence; is the fault empirical probability under temperature binning conditions; is the global fault prior probability; is the balance weight of the KL divergence penalty term; is the central value of the target temperature bin.
[0030] Compared with the prior art, the beneficial effects of the present invention are:
[0031] 1. The present invention constructs a learnable compensation function based on temperature deviation and temperature change rate, dynamically adjusts the nonlinear drift compensation caused by temperature, automatically weakens the compensation strength for the temperature mutation area, prevents the real fault characteristics from being mistakenly erased, and realizes dynamic temperature drift compensation through the exponential attenuation mechanism of the temperature change rate, avoiding the problem that traditional static linear transformation cannot distinguish between temperature changes and fault mutations.
[0032] 2. Based on the compensated pressure signal, the present invention adopts the dynamic temperature change rate to calculate the adaptive wavelet threshold, adjusts the retention degree of high-frequency signals when the temperature changes drastically, suppresses noise interference while retaining potential fault characteristics, and enhances the expression of key abnormal points by combining the soft threshold function to perform nonlinear compression on the wavelet coefficients.
[0033] 3. The present invention adopts a temperature gating mechanism, combines pressure and temperature data, and dynamically adjusts the degree of retention of historical states. It can automatically adjust the memory strategy according to changes in the temperature environment, strengthen historical memory when the temperature is stable, and strengthen the role of current input when the temperature changes drastically, thereby effectively improving the response capability to sudden failures.
[0034] 4. The present invention adopts a temperature condition mask mechanism, calculates the sensitivity of the hidden state to the real-time temperature, and dynamically adjusts the discard rate, thereby forcing the network to learn fault features that are independent of temperature. It can effectively decouple temperature drift and fault features, ensure that the network does not depend on specific temperature conditions, and enhance the adaptability of the model to different temperature scenarios.
[0035] 5. The present invention adopts a temperature-aware Bayesian correction mechanism in the cross-entropy loss function, and performs a posteriori correction under temperature conditions through the temperature binning prior matrix to further improve the accuracy of fault prediction. During the training process, the output of the model is corrected by the prior probability of the temperature range, thereby reducing the prediction error caused by temperature changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 It is a flow chart of a method for processing temperature data of a pressure gauge based on temperature calibration drift error compensation according to an embodiment of the present application;
[0038] Figures 2(a) - 2(c)is the heat map quantization evaluation results of the contrast static linear compensation, wavelet denoising and the method of the present invention according to the embodiments of the present application; Fig. 2(a) is the experimental result of the static linear compensation method, Fig. 2(b) is the experimental result of the wavelet denoising method, and Fig. 2(c) is the experimental result of the method of the present invention;
[0039] Figures 3(a) - 3(c) is the experimental result of the influence of the temperature gating mechanism on fault detection according to the embodiments of the present application; Fig. 3(a) is the temperature change curve, showing the temperature fluctuation of 25 - 50 °C in the industrial scenario, Fig. 3(b) is the temperature change rate curve, identifying the regions of rapid temperature change, and Fig. 3(c) compares the fault detection probabilities of the standard gated recurrent unit and the method of the present invention;
[0040] Figure 4 is the comparison of the cross - temperature generalization ability according to the embodiments of the present application. Detailed implementation manners
[0041] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0042] The following specific examples illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0043] It should also be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. The diagrams only show the components related to the present invention, rather than being drawn according to the number, shape and size of the components in actual implementation. The actual form, number and proportion of each component during actual implementation can be arbitrarily changed, and the component layout form may also be more complex.
[0044] Refer to Figure 1 , a pressure gauge temperature data processing method based on temperature calibration drift error compensation, comprising the following steps:
[0045] S1. Data acquisition
[0046] Synchronously collect the original pressure readings and ambient temperature time - series data of the industrial pressure gauge through a high - precision pressure sensor and a thermocouple temperature sensor;
[0047] Optionally, the sampling frequency of the pressure sensor is set to 1 kHz, and the sampling frequency of the temperature is synchronized to 1 Hz;
[0048] Optionally, if the temperature changes violently, it can be increased to 10 Hz. For example, when the temperature change amplitude exceeds 50 °C, the temperature sampling frequency is synchronized to 10 Hz;
[0049] The data acquisition duration covers the complete working cycle of the pressure gauge and typical temperature change scenarios, including stages such as equipment startup, steady-state operation, and shutdown cooling;
[0050] The data acquisition content includes the digital quantity (unit: MPa) converted by a 24-bit ADC from the original pressure analog signal, the digital quantity of the K-type thermocouple temperature (unit: °C), and a timestamp accurate to the millisecond level.
[0051] All data is transmitted to the edge computing unit in real time through the industrial bus and stored as a structured time-series data set.
[0052] Furthermore, data annotation needs to be completed synchronously during the acquisition stage. Experts manually mark the fault types, such as leakage, blockage, sensor failure, etc., and the time interval when the fault occurs according to the equipment operation log, forming a multi-class label vector, and the storage format is strictly aligned with the original data timestamp.
[0053] S2. Data preprocessing
[0054] S201. Spatiotemporal alignment of temperature-pressure data
[0055] To verify the synchronization and physical relationship between the temperature and pressure sensors, during the installation of the temperature and pressure sensors, due to different equipment layouts, there may be a certain delay or spatial temperature difference in temperature measurement. If this delay or temperature difference affects data synchronization, it is necessary to perform spatiotemporal alignment on the data.
[0056] The present invention adopts a spatiotemporal alignment method. Based on the temporal characteristics of temperature and pressure data, combined with the temperature change rate and timestamp information, the data of the two are synchronously adjusted by interpolation.
[0057] For example, assume that during the equipment startup stage, the measured value of the temperature sensor is recorded as at the timestamp , but the pressure value recorded by the pressure sensor at is . Due to a 0.2-second delay in the temperature sensor, the actual temperature value is recorded as at . From to , the temperature change rate is approximately equal to , where 24 °C is the temperature at ;
[0058] Further, the estimated temperature value at is calculated by linear interpolation ;
[0059] Further, the estimated temperature value is aligned with the pressure value at the timestamp to ensure strict temporal synchronization of the temperature-pressure data and eliminate the delay effect caused by the sensor layout.
[0060] S202. Outlier processing
[0061] The original pressure data may contain outliers caused by sensor failures or external environmental interferences, such as outliers caused by electromagnetic pulse noise, device drift, etc. The present invention adopts a robust filtering mechanism to process the abnormal fluctuations in the data through a median filter and identify and remove the significantly abnormal measurement points through an outlier detection mechanism based on the temporal trend.
[0062] Specifically, for each preset time window, the mean and standard deviation of the pressure data are calculated, and whether the data is an outlier is judged by a set threshold, and the outlier will be marked and removed.
[0063] For example, assume that within a 1-second time window, the pressure data sequence is
[0064] ,
[0065] The sampling frequency is 1 kHz, with a total of 1000 points, which is simplified to 5 points here;
[0066] Further, the mean of the pressure data within this window is calculated and the standard deviation
[0067] Further, the threshold is set to , is the mean, is the standard deviation, that is, the threshold is with a range from to ;
[0068] Then the point is within the range, but the mutation of its adjacent points exceeds 10%, and it significantly deviates from the temporal trend, so it is identified as an outlier;
[0069] Further, through the processing of the median filter, the median within the window is taken to replace the outlier point with to remove the abnormal fluctuations caused by electromagnetic pulse noise and retain the true pressure trend.
[0070] In one embodiment, the retention ability of different preprocessing methods for key fault features is quantitatively evaluated through a heat map. The vertical axis of the heat map covers six types of typical industrial faults, and the horizontal axis contains six core diagnostic features such as pressure mutation and pulse characteristics. Experiments compare static linear compensation, wavelet denoising, and the method of the present invention, and the feature retention fraction is represented by the color depth. The experimental results are as Figures 2(a) - 2(c) shown. Among them, Fig. 2(a) is the experimental result of the static linear compensation method, Fig. 2(b) is the experimental result of the wavelet denoising method, and Fig. 2(c) is the experimental result of the method of the present invention. In the static compensation method, obvious light-colored areas appear in the columns of pressure mutation and pulse characteristics, indicating that transient features are severely lost. Although the wavelet denoising method has improved, there are still patchy attenuation areas in the row of high-temperature fault types. The heat map of the method of the present invention as a whole shows a uniform dark red color, especially maintaining a high retention rate in the cross area of the sensor failure row and the pulse characteristic column, verifying that its temperature adaptive threshold mechanism can dynamically balance noise reduction and feature retention, avoiding the misdeletion of weak fault features by traditional methods when the temperature changes.
[0071] S3. Dynamic temperature drift compensation preprocessing
[0072] The original measurement data of the pressure gauge is easily interfered by changes in the ambient temperature, resulting in non-linear drift in the signal that changes with temperature. This drift masks the true fault mutation information, causing feature confusion. Traditional normalization methods usually use static linear transformation to scale the data range, and cannot dynamically separate the slow drift caused by temperature from the rapid mutation caused by faults. Therefore, it is easy to misidentify the drift as an anomaly or misidentify the true fault as normal fluctuation under the condition of drastic temperature change, resulting in a decline in model performance and misdiagnosis;
[0073] The present invention realizes dynamic compensation for the non-linear drift caused by temperature in the original pressure reading by constructing a learnable compensation function based on the temperature deviation and the temperature change rate. Specifically, first, based on the difference between the original pressure reading, the real-time temperature value, and the reference temperature, combined with the drift compensation bias term and the linear coefficient term, the drift baseline term is calculated. Then, subsequently, combined with the adjustment factor that exponentially decays with the temperature change rate, the compensation amount is adaptively adjusted, so as to weaken the compensation intensity in the temperature mutation area and prevent the misdeletion of true fault features. Then, by subtracting the calculated compensation amount from the original pressure reading, the pressure compensation value after removing the temperature drift is obtained, thereby achieving the effect of suppressing temperature interference while retaining fault features, which is expressed as:
[0074]
[0075] In the formula, is the pressure value after compensation, eliminating the baseline drift caused by temperature;
[0076] is the original pressure reading, representing the measured value of the untreated sensor;
[0077] is the real-time temperature value, which is the time-series data collected synchronously with the pressure;
[0078] is the reference temperature, taking the median of the temperatures in the training set;
[0079] is the temperature change rate, calculated by the difference between adjacent time steps, i.e., ;
[0080] is the temperature value at the previous moment;
[0081] is the drift compensation bias term, and its calculation method is obtained by optimizing and learning through training data. Specifically, the optimal value is obtained by minimizing the mean square error of the compensation residual, expressed as , during the optimization process, the initial value of the compensated pressure value is set to 0;
[0082] is the drift compensation linear coefficient, which is jointly optimized and learned with the drift compensation bias term , and the relationship between the temperature deviation and the drift amount is fitted by linear regression, expressed as ;
[0083] is the temperature mutation suppression factor, controlling the intensity of exponential decay. For example, ;
[0084] is the natural exponential function, realizing the adaptive decay when the temperature changes sharply.
[0085] It should be noted that the term represents the adaptive drift amount, where adopts an exponential form to suppress the overcompensation when the temperature changes sharply.
[0086] S4. Adaptive Noise Filtering and Feature Enhancement
[0087] Industrial pressure data is usually accompanied by frequent temperature fluctuations and non-stationary noise. These noises are irregular in the time domain. Especially during the period when the temperature changes violently, their energy is concentrated in the high-frequency part, which is easy to be confused with fault mutations. Conventional wavelet denoising or filtering methods often use fixed threshold settings, which will misdelete the high-frequency details with weak fault information when the temperature changes greatly, or leave redundant noise when the temperature is stable, making it difficult to balance the requirements of fidelity and noise reduction, resulting in the lack of robustness and discriminability of the filtering results;
[0088] Based on the compensated pressure signal, the present invention first extracts the frequency domain coefficients at each scale through multi-layer discrete wavelet transform. Then, the adaptive threshold of each layer is calculated according to the temperature change rate at the current moment. The adaptive threshold dynamically scales with the severity of the temperature, so as to retain more high-frequency details during temperature mutation. Then, the wavelet coefficients are subjected to non-linear compression processing in combination with the soft threshold function to suppress noise interference while retaining potential fault features. Then, the processed coefficients are inverse-transformed back to the time domain signal by using the reconstructed wavelet basis function to obtain the denoised pressure time series output, realizing the enhanced expression of key abnormal points and the effective weakening of background noise, which is expressed as:
[0089]
[0090] In the formula, is the denoised pressure time series signal, that is, the output after filtering and feature enhancement;
[0091] represents the temperature adaptive threshold of the -th layer wavelet coefficients, which is dynamically adjusted according to the temperature change rate, and the calculation method is expressed as ;
[0092] is the reconstructed wavelet basis function for signal reconstruction of the -th layer wavelet coefficients;
[0093] is the soft threshold function, The calculation method of is expressed as
[0094] is the discrete wavelet transform operator, which outputs the wavelet coefficients of the -th layer;
[0095] is the compensated pressure value;
[0096] is the reference threshold, taking the standard deviation of the wavelet coefficients;
[0097] is the temperature sensitive factor, which controls the sensitivity of the threshold to the temperature change rate. For example, ;
[0098] is the temperature change rate;
[0099] represents the function of taking the maximum value;
[0100] is the sign function;
[0101] The maximum value representing the temperature change rate is statistically obtained within the training set or the sliding window;
[0102] is a positive integer;
[0103] is a positive integer.
[0104] It should be noted that the core rule of the threshold adjustment mechanism is that an increase leads to a decrease, thereby achieving the retention of high-frequency details.
[0105] It should also be noted that in the term, if is greater than 0, the sign function takes the value of 1; if is equal to 0, the sign function takes the value of 0; if is less than 0, the sign function takes the value of -1.
[0106] S5. Modeling of Pressure Gauge Temperature Data
[0107] S501. Constructing the Model Structure
[0108] The model adopts a bidirectional temperature gated recurrent network structure, including:
[0109] Input layer: The input layer receives the preprocessed pressure-temperature time series pairs , where is the total number of time steps of the time series data, that is, the length of the model input sequence;
[0110] Core layer: The core layer is a 3-layer bidirectional gated recurrent network with 128 hidden units in each layer, realizing forward / backward time series feature extraction;
[0111] Feature decoupling layer: The feature decoupling layer implements temperature-conditioned mask regularization;
[0112] Output layer: The output layer is a fully connected network, using the Softmax function as the activation function to generate the probability distribution of fault categories.
[0113] The training process is supervised training. The training data uses the fault type labels annotated in the S1 stage, and is strictly aligned with the input sequence in one-hot encoding form. The batch size is set to 64.
[0114] S502. Core Layer Data Processing
[0115] Traditional gated recurrent units are unable to actively perceive the potential drift caused by temperature changes when dealing with time-series pressure data. When the temperature changes suddenly, their dependence on historical states is not adjusted at all, resulting in the model mistakenly storing the fluctuation information caused by temperature as historical patterns, which in turn interferes with the identification of current fault features. In an environment of drastic temperature changes, such an indiscriminate state update mechanism is prone to causing feature ambiguity and memory pollution, leading to a decline in the discriminative ability of the network at key nodes;
[0116] In this step, by adopting a temperature gating mechanism in the gated recurrent structure, the temperature information at the current moment is jointly encoded with the historical hidden state and the pressure signal to generate a temperature gating vector, which is used to dynamically adjust the retention degree of the historical state in the update of the current hidden state. The temperature gating vector enhances the weight of historical memory and the ability to model long-term dependencies when the temperature is stable, while actively reducing the participation degree of historical information when the temperature changes rapidly, enhancing the dominant role of the current input in the hidden state. Through the temperature gating mechanism, the model can automatically adjust the memory strategy according to the temperature environment changes, effectively enhancing the immediate response and extraction ability for sudden fault features, expressed as:
[0117]
[0118]
[0119]
[0120]
[0121]
[0122] In the formula, is the temperature gating vector, with the same dimension as the hidden state, and the output value through the Sigmoid activation function is in the interval [0, 1], controlling the fusion weight of the historical state;
[0123] is the Sigmoid activation function;
[0124] is the temperature gating weight matrix, which is a trainable parameter, learning the coupling relationship between temperature-pressure-state;
[0125] is the vector concatenation operation, connecting multiple vectors along the feature dimension;
[0126] is the hidden state at the previous moment, storing historical time-series features;
[0127] is the denoised pressure time-series signal;
[0128] is a temperature-gated bias vector and is a trainable parameter;
[0129] is an update gate vector that controls the update ratio of the historical state;
[0130] is an update gate weight matrix and is a trainable parameter;
[0131] is a reset gate vector that controls the reset degree of the historical state;
[0132] is a reset gate weight matrix and is a trainable parameter;
[0133] is a candidate hidden state, calculated based on the current input and the reset state;
[0134] is an element-wise multiplication that implements element-level operations between vectors;
[0135] is a candidate state weight matrix and is a trainable parameter;
[0136] is the hyperbolic tangent function;
[0137] is the hidden state at the current moment and serves as the output of feature extraction.
[0138] It should be noted that the temperature-gated vector takes as input the real-time temperature value and the denoised pressure time series signal , directly senses environmental changes. During the calculation process of the hidden state at the current moment, if approaches 1, it indicates strengthening historical memory when the temperature is stable. If approaches 0, it indicates focusing on the current features when the temperature changes drastically.
[0139] It should also be noted that the difference between the present invention and the standard GRU is that the state update method of the standard GRU is expressed as , while the present invention combines the temperature-gated vector as a temperature weight to achieve temperature-adaptive temporal feature extraction.
[0140] In one embodiment, as Figures 3(a) - 3(c)As shown in the figure, in order to analyze the working principle of the temperature gating mechanism, Figure 3(a) is a temperature change curve, showing the temperature fluctuation of 25-50°C in an industrial scenario, Figure 3(b) is a temperature change rate curve, marking the temperature sudden change area, and Figure 3(c) compares the fault detection probability of the standard gated cycle unit and the method of the present invention. The experiment observed at four fault points that in the temperature stable period, both methods can effectively detect faults, but in the temperature sudden change period, the detection probability of the standard method shows a significant attenuation, while the method of the present invention maintains a stable high probability, indicating that the temperature gating vector can dynamically adjust the historical memory weight, reduce the impact of outdated states when the temperature suddenly changes, and avoid the feature ambiguity problem caused by temperature interference in the traditional method.
[0141] S503, feature decoupling layer performs fault feature decoupling regularization
[0142] There is a high-order coupling relationship between pressure fault features and temperature drift. The conventional Dropout method will randomly discard some features during processing, which may cause some key fault features to be mistakenly discarded, thus affecting the model's accurate extraction and identification of fault features, and failing to effectively decouple the impact of fault features and temperature drift;
[0143] The present invention adopts a temperature condition mask mechanism to dynamically adjust the discard probability by calculating the temperature sensitivity of the feature, thereby forcing the network to learn the essential fault features that are independent of temperature. The specific steps are as follows:
[0144] 1) Temperature sensitivity calculation
[0145] By calculating the gradient matrix of the hidden state to the real-time temperature value and obtaining its Frobenius norm, we can obtain the sensitivity scalar value that characterizes the intensity of characteristic temperature dependence, which is expressed as:
[0146]
[0147] In the formula, for The scalar value of the sensitivity of the hidden state to temperature at each moment, which represents the measure of the characteristic temperature sensitivity;
[0148] Hidden state Temperature The partial derivative matrix of ;
[0149] Real-time temperature value , i.e., time series data collected synchronously with pressure;
[0150] is the Frobenius norm.
[0151] 2) Temperature condition mask generation
[0152] Dynamically scale the baseline dropout rate based on the sensitivity scalar value, generate a temperature-condition mask vector through Bernoulli sampling, and achieve a high probability of discarding high-sensitivity features, expressed as:
[0153]
[0154] In the formula, is the temperature-condition mask vector;
[0155] represents Bernoulli distribution sampling, and each element in the vector is sampled independently;
[0156] is the baseline dropout rate, for example, .
[0157] 3) Regularized feature synthesis
[0158] By fusing the original hidden state and the temperature-averaged feature vector, and using the mask vector for weighted synthesis, obtain a regularized hidden state that decouples temperature interference, forcing the network to learn the temperature-independent fault essential features, expressed as:
[0159]
[0160] In the formula, is the decoupled regularized hidden state;
[0161] represents element-wise multiplication;
[0162] is the temperature-averaged feature vector, and the calculation method is expressed as ;
[0163] is the sample set within the current temperature range;
[0164] represents the th sample's hidden state.
[0165] It should be noted that during the calculation of the decoupled regularized hidden state , dynamic dropout based on feature temperature sensitivity The term represents the dropout probability. When the feature temperature sensitivity is high, that is, is large, the dropout probability increases, forcing the network to reduce its dependence on temperature-related features. When the sensitivity is low, the original features are retained to avoid the loss of key fault features.
[0166] It should also be noted that during the calculation of the decoupled regularized hidden state , the discarded features are replaced by the temperature-averaged feature vector Instead, to maintain the stability of the feature distribution.
[0167] S504. The output layer outputs the result
[0168] The decoupled regularized hidden state is input into the fully connected classification layer to predict the fault category of the pressure gauge, and the output is normalized to a probability distribution through the Softmax function, expressed as:
[0169]
[0170] In the formula, is the weight matrix of the classification layer and is a trainable parameter;
[0171] is the bias vector of the classification layer and is a trainable parameter;
[0172] is the predicted probability distribution of the model for the th sample;
[0173] is the Softmax function.
[0174] S505. Prediction probability distribution correction
[0175] In the prediction probability distribution correction step, a temperature-aware Bayesian correction operation is performed through the temperature binning prior matrix. The specific steps are as follows:
[0176] 1) Temperature-aware Bayesian correction mechanism
[0177] By statistically analyzing the occurrence frequencies of each fault category in different temperature intervals in the training data, a temperature binning prior matrix is constructed. Specifically, first, the samples are binned based on the real-time temperature value, and all samples are divided into preset temperature binning intervals. Then, for each binning interval, the number of samples belonging to each type of fault in this interval is counted, and the relative occurrence probability of this category under the current temperature interval is calculated. This probability is an element in the temperature binning prior matrix, representing the empirical distribution of each fault type under specific temperature conditions. By constructing this prior matrix, the prior preference pattern of fault occurrence in different temperature intervals can be reflected, expressed as:
[0178]
[0179] In the formula, is the element in the th row and th column of the temperature binning prior matrix, indicating the prior probability of the th fault category occurring under the temperature binning condition, that is, the proportion of samples belonging to the binning and is the sample proportion of the th fault category;
[0180] is the total number of training samples;
[0181] The th temperature bin interval, which is preset manually, such as ;
[0182] is the indicator function;
[0183] Indicates that when the true fault category of the th sample is the th fault category, and its real-time temperature value belongs to the th temperature bin interval, the value is 1, otherwise 0;
[0184] is the real-time temperature value of the th sample, which is the time-series data collected synchronously with the pressure.
[0185] 2) Calculate the posterior correction distribution
[0186] After obtaining the temperature bin prior matrix, fuse the original fault prediction probability distribution output by the model with this prior matrix to complete the posterior correction process of temperature perception. Specifically, based on the real-time temperature value of the current input sample, determine the corresponding temperature bin interval, and extract the prior probability distribution of each fault category in this bin. Then, weight and fuse this prior probability with the logarithmic probability of the original output of the model. During the fusion process, a positive intensity factor is combined to adjust the influence degree of the prior to avoid over-strong interference with the original prediction. Then, the fused logarithmic probability is reconstituted into a valid prediction distribution after normalization as the final correction result. Through the adjustment mechanism of this posterior distribution, the model output fully refers to the historical distribution pattern under temperature conditions, reduces the misjudgment risk caused by sample distribution deviation, and realizes the improvement of the robustness of fault prediction in a temperature-sensitive environment, expressed as:
[0187]
[0188] In the formula, is the predicted probability distribution of the th sample after correction;
[0189] is the exponential function with the natural constant as the base;
[0190] is the logarithmic function, and the default base is 10;
[0191] To calibrate the intensity factor, for example, set it to ;
[0192] is the element in the -th row and -th column of the temperature binning prior matrix, indicating the prior probability of the -th fault category occurring under the temperature binning condition, that is, the sample proportion of the training data belonging to the bin and being the -th fault category;
[0193] is the bin index to which the real-time temperature value of the current sample belongs;
[0194] is the element in the -th row and -th column of the temperature binning prior matrix, indicating the prior probability of the -th fault category occurring under the temperature binning condition, that is, the sample proportion of the training data belonging to the bin and being the -th fault category;
[0195] is the total number of fault categories;
[0196] is the predicted probability distribution of the model for the -th sample.
[0197] S506. Calculate the temperature-aware cross-entropy loss function
[0198] In an industrial environment, different temperature ranges may correspond to significant differences in the fault distribution. For some fault types, the probability distribution has an offset characteristic at high or low temperatures. The traditional cross-entropy loss function ignores this conditional offset of the distribution during the training process and defaults that the sample distribution is independent and identically distributed, resulting in the model tending to overfit the frequently occurring fault categories in some temperature regions, while the recognition ability decreases in other regions, affecting the generalization performance;
[0199] The present invention adopts a penalty term based on temperature conditional probability on the basis of cross-entropy loss, which is used to constrain the model not to rely on a specific temperature environment for learning the fault type. Specifically, by dividing the training data into temperature intervals, the empirical probability distribution of faults in each interval is statistically calculated, and the difference between it and the global fault distribution is calculated. Then, this difference is used as the regularization objective to jointly train the network parameters, guiding the model to extract fault features that are stable across temperature conditions, so as to have strong discriminative ability in different temperature scenarios, significantly improving the cross-temperature generalization performance and robustness of the model. The calculation method of the loss function is expressed as:
[0200]
[0201] In the formula, is the temperature-aware cross-entropy loss function;
[0202] is the total number of training samples;
[0203] is the one-hot encoding of the true fault category of the th sample;
[0204] is the predicted probability distribution of the th sample after correction;
[0205] is the KL divergence, which is used to measure the difference between the conditional probability and the prior probability;
[0206] is the empirical probability of faults under the temperature binning condition, and the calculation method is expressed as ;
[0207] is the global fault prior probability, that is, the overall distribution of various faults in the training set;
[0208] is the balance weight of the KL divergence penalty term, for example, ;
[0209] is the central value of the target temperature bin;
[0210] is a positive integer;
[0211] is the half-width of the temperature binning interval, for example, ;
[0212] is the indicator function of fault occurrence, which takes the value of when the sample is marked as a fault, and otherwise ;
[0213] is an indicator function;
[0214] represents the temperature binning indicator function, which takes the value of when it belongs to the interval , and otherwise is . .
[0215] It should be noted that the KL divergence term penalizes the overfitting tendency of the model to a certain type of fault within a specific temperature interval, and approximates the global fault prior probability by constraining the empirical probability of the fault under the temperature binning condition, forcing the classifier to extract the fault essential features independent of temperature.
[0216] S507. Backpropagation and Parameter Update
[0217] The model optimizes the parameters through the backpropagation algorithm and uses the Adam optimizer to minimize the temperature-aware cross-entropy loss function. The training process includes the following steps:
[0218] Perform forward propagation to calculate the predicted probability distribution of the predicted output samples;
[0219] Calculate the temperature-aware cross-entropy loss function;
[0220] Perform backpropagation to update all trainable parameters, such as, , , , , the weight matrix, and , the bias vector;
[0221] Iteratively train.
[0222] S6. Judgment of the Stopping Iteration Condition
[0223] The termination criterion of the training process is that the fluctuation range of the loss function for 15 consecutive iteration times is less than 0.05, or the preset maximum number of iteration times is reached. For example, the preset maximum number of iteration times is 1000 times.
[0224] S7. Model Inference
[0225] During the deployment phase, a real-time processing path is constructed. Specifically, the original pressure-temperature flow data is input, and after sequentially performing data preprocessing, dynamic temperature drift compensation preprocessing, adaptive noise filtering, and feature enhancement processing, the obtained time series segments are input into the trained bidirectional temperature-gated recurrent network model. The output layer generates a fault probability vector, and the fault category with the highest probability value is taken as the final output result.
[0226] It should be noted that during the model inference phase, the prediction probability distribution cannot be calculated, so there is no need to perform a prediction probability distribution correction operation.
[0227] In one embodiment, as Figure 4 shown, the cross-temperature generalization ability is compared through the average precision distribution of 7 temperature intervals. The experimental results show that the traditional method shows a significant performance drop at both ends of the temperature interval (sub-zero and high temperature of 60 °C), while the bar chart of the method of the present invention presents a stable high platform, and the difference in the height of each bar is less than 5%, proving that the temperature condition masking mechanism and Bayesian correction effectively decouple the fault features and temperature interference, and solve the misjudgment problem of the traditional method at extreme temperatures.
[0228] In this embodiment, dynamic temperature drift compensation is achieved, avoiding the problem that traditional static linear transformation cannot distinguish temperature changes and fault mutations; while suppressing noise interference, potential fault features are retained, enhancing the expression of key abnormal points; effectively improving the response ability to sudden faults; effectively decoupling temperature drift and fault features, ensuring that the network does not depend on specific temperature conditions, enhancing the adaptability of the model to different temperature scenarios; improving the accuracy of fault prediction and reducing the prediction error caused by temperature changes.
[0229] The embodiments described above are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for processing pressure gauge temperature data based on temperature calibration drift error compensation, characterized in that, Including: S1. Data acquisition, synchronously acquiring the original pressure readings and ambient temperature time series data of the industrial pressure gauge through a pressure sensor and a thermocouple temperature sensor; S2. Data preprocessing, including temperature and pressure synchronization verification and outlier processing; S3. Dynamic temperature drift compensation preprocessing, constructing a learnable compensation function based on temperature deviation and temperature change rate to achieve dynamic compensation for non-linear drift; S4. Adaptive noise filtering and feature enhancement, extracting the frequency domain coefficients at each scale through multi-layer discrete wavelet transform, calculating the adaptive threshold for each layer according to the temperature change rate at the current moment, combining with the soft threshold function to perform non-linear compression processing on the wavelet coefficients, and using the reconstructed wavelet basis function to inverse-transform the processed coefficients back to the time domain signal to obtain the denoised pressure time series output; S5. Pressure gauge temperature data modeling; S6. Stopping iteration condition judgment; S7. Model inference.
2. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 1, wherein The temperature and pressure synchronization verification adopts a spatio-temporal alignment method. Based on the time series characteristics of temperature and pressure data, combined with the temperature change rate and timestamp information, the data of the two are synchronously adjusted through interpolation.
3. The temperature data processing method of the pressure gauge based on temperature calibration drift error compensation according to claim 1, characterized in that, The construction of the learnable compensation function based on temperature deviation and temperature change rate includes: based on the difference between the original pressure reading, the real-time temperature value and the reference temperature, combined with the drift compensation bias term and the linear coefficient term, calculating the drift baseline term, and then combining with the adjustment factor that exponentially decays with the temperature change rate to adaptively adjust the compensation amount. By subtracting the calculated compensation amount from the original pressure reading, the pressure compensation value after removing temperature drift is obtained.
4. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 3, characterized in that, The calculation of the pressure compensation value is as follows: ; Wherein, is the compensated pressure value, is the original pressure reading; is the real-time temperature value; is the reference temperature; is the temperature change rate; is the drift compensation offset term; is the drift compensation linear coefficient; is the temperature mutation suppression factor.
5. The temperature data processing method of the pressure gauge based on temperature calibration drift error compensation according to claim 1, wherein The adaptive noise filtering and feature enhancement is expressed as: ; In the formula, is the pressure time series signal after noise reduction; represents the temperature adaptive threshold of the -th layer wavelet coefficient; is the reconstructed wavelet basis function for signal reconstruction of the -th layer wavelet coefficient; is the soft threshold function; is the discrete wavelet transform operator, which outputs the wavelet coefficients of the -th layer; is the compensated pressure value.
6. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 5, wherein The calculation method is expressed as ; is the compensated pressure value; is the sign function.
7. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 1, characterized in that, The step S5 includes: Constructing a bidirectional temperature gated recurrent network structure model, processing data in the core layer, decoupling and regularizing fault features in the feature decoupling layer, outputting results in the output layer, correcting the prediction probability distribution, calculating the temperature-aware cross-entropy loss function, and backpropagation and parameter update.
8. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 7, wherein The decoupling and regularization of fault features in the feature decoupling layer includes adopting a temperature-conditioned mask mechanism to dynamically adjust the dropout probability by calculating the temperature sensitivity of the features.
9. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 7, characterized in that, The correction of the prediction probability distribution includes performing a temperature-aware Bayesian correction operation through a temperature binning prior matrix.
10. The method for processing pressure gauge temperature data based on temperature calibration drift error compensation according to claim 7, wherein The calculation method of the temperature-aware cross-entropy loss function is expressed as: ; Wherein, is the temperature-aware cross-entropy loss function; is the total number of training samples; is the one-hot encoding of the true fault class of the th sample; is the predicted probability distribution of the th sample after correction; is the KL divergence; is the empirical probability of faults under the temperature binning condition; is the global fault prior probability; is the balancing weight of the KL divergence penalty term; is the central value of the target temperature bin.
Citation Information
Patent Citations
A gas flow meter anomaly detection method based on machine learning
CN119760592A
Ultrasonic water meter fault prediction system based on machine learning
CN119782759A
A method for predicting errors of digital temperature and humidity instruments in workshops based on machine learning
CN119783060A
Output calibration device and method for pressure sensor
CN107941417A
Three-dimensional positioning method based on Kalman filtering algorithm and positioning system thereof
CN111854762A
Cited By
Deep learning dynamic noise reduction method for MEMS gyroscope
CN120974075A
Method, equipment and system for detecting leakproofness of anti-reflection adhesive mixing kettle
CN121185548A