Physical constraint embedded interpretable heterogeneous sensor dynamic compensation method and device
By constructing a collaborative matrix and artificial convolution kernel, combined with multi-source physical laws and learning trajectory records, the problems of uninterpretable and traceable models in sensor dynamic compensation are solved, achieving a highly reliable and transparent dynamic compensation effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HAINAN UNIV
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-12
AI Technical Summary
Existing dynamic compensation methods for sensors are difficult to accurately characterize distortion mechanisms under complex, nonlinear, and time-varying conditions. They lack characterization and constraints on internal decision-making logic, resulting in limited compensation capabilities. Furthermore, existing interpretable artificial intelligence methods are difficult to take into account the commonalities and differences of multiple types of heterogeneous sensors within a unified framework, and cannot meet the credibility and traceability requirements of high reliability scenarios.
By constructing a collaborative matrix integrating frequency domain energy features and time domain attribution features, using artificial convolution kernels to perform physical prior initialization of TSLANT, and introducing a total loss function with multiple target loss functions for training, the training parameters are adaptively adjusted by combining the learning trajectory record and the time-frequency domain energy evolution process, thereby achieving the interpretability and credibility of the dynamic compensation model.
While ensuring accuracy, the compensation model has a transparent, reliable, and traceable decision-making mechanism, which can adapt to the differences in dynamic characteristics and physical mechanism constraints of various types of heterogeneous sensors, and improve the interpretability and engineering credibility of the sensor compensation model.
Smart Images

Figure CN122015935A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sensor technology, and in particular to a method and apparatus for dynamic compensation of interpretable heterogeneous sensors with embedded physical constraints. Background Technology
[0002] With the deepening of the national strategies of "new industrialization" and "informatization upgrading," high-end equipment fields such as aerospace are placing higher demands on high-precision and high-reliability testing and condition monitoring capabilities. Faced with engine testing, strong impacts, and wide-bandgap dynamic environments, sensor outputs often exhibit significant dynamic distortion and frequency response aberrations. To recover the true signal, traditional compensation methods based on empirical patterns or fixed filter structures have long been the standard first step in engineering practice. However, these methods typically assume that the dynamic characteristics of the sensor remain stable in both the time and frequency domains, making it difficult to accurately characterize the distortion mechanism under complex, nonlinear, and time-varying conditions, resulting in limited compensation capabilities.
[0003] In recent years, with the widespread application of deep learning technology, its powerful feature representation capabilities have been introduced into sensor dynamic compensation tasks, significantly improving compensation accuracy, frequency response recovery ability, and fitting ability for complex dynamics. However, existing research mostly focuses on optimizing metrics such as compensation accuracy and loss function convergence, generally employing randomly initialized black-box network structures, lacking characterization and constraints on internal decision-making logic. The frequency band and dynamic features on which the model performs compensation are often untraceable, leading to a lack of transparency in the compensation process and difficulty in analyzing the correlation between key features and physical mechanisms. This makes direct application difficult in scenarios with extremely high reliability and traceability requirements, such as aerospace and ship positioning. To improve the credibility and usability of models, experts have proposed Explainable Artificial Intelligence (XAI) technology, attempting to make the decision-making process of deep learning models as transparent as possible through methods such as feature importance assessment, model visualization, and rule extraction, and using the explanation results to guide model training and structural optimization.
[0004] However, current interpretable artificial intelligence methods for sensor dynamic compensation still have shortcomings in several aspects. These shortcomings are mainly reflected in the fact that interpretable analysis is mostly limited to the visualization of post-event feature saliency, the disconnect between the internal model representation and the physical mechanism of dynamic response, and the difficulty in taking into account the commonalities and differences of multiple types of heterogeneous sensors within a unified framework. Summary of the Invention
[0005] Therefore, it is necessary to provide an interpretable heterogeneous sensor dynamic compensation method and device with embedded physical constraints to address the above-mentioned technical problems, thereby improving the interpretability and reliability of the sensor compensation model.
[0006] Firstly, this application provides an interpretable dynamic compensation method for heterogeneous sensors with embedded physical constraints. The method includes:
[0007] Acquire the compensation signal and corresponding reference signal of the heterogeneous sensor, and construct a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the compensation signal and the reference signal;
[0008] Artificial convolution kernels are constructed based on the synergistic matrix, and the convolution kernels of the TSLANT adaptive spectral blocks are physically initialized using the artificial convolution kernels.
[0009] The TSLANT, after physical prior initialization, is trained by introducing physical constraints to construct a total loss containing multiple objective loss functions. The training obtains a compensation model for dynamic compensation of heterogeneous sensors. During the training process, the training parameters are adaptively adjusted based on the learning trajectory records and the time-frequency domain energy evolution process.
[0010] In one embodiment, constructing a synergistic matrix integrating frequency-domain energy features and time-domain attribution features based on the signal to be compensated and the reference signal includes:
[0011] The short-time Fourier transform is used to process the signal to be compensated and the reference signal respectively, and the spectrum of the signal to be compensated and the spectrum of the reference signal are obtained accordingly.
[0012] Based on the amplitude, phase and power spectral density deviations between the spectrum of the signal to be compensated and the reference spectrum, the error energy distribution is obtained as a frequency domain energy feature.
[0013] Attribution analysis is performed on the pre-trained compensation model based on the SHAP interpretability method to obtain the attribution weights at each time step, which are used as time-domain attribution features.
[0014] Based on prior physical knowledge, the frequency band weights corresponding to each sensor in the heterogeneous sensor are constructed.
[0015] A collaborative matrix is constructed based on frequency domain energy characteristics, time domain attribution characteristics, and frequency band weights.
[0016] In one embodiment, constructing an artificial convolutional kernel based on the synergy matrix includes:
[0017] Normalize the synergy matrix to obtain the normalized matrix and the sum of the elements of the normalized matrix;
[0018] Given an energy coverage threshold, search for the rectangular target region with the smallest area on the time-frequency plane constrained by the window size of the normalized matrix in time and frequency directions, such that the sum of the elements in the target region is not less than the product of the sum of the elements of the normalized matrix and the energy coverage threshold.
[0019] Rearrange the elements within the target region into a submatrix according to time and frequency order;
[0020] The submatrix is scaled and smoothed to obtain the convolution kernel weight matrix, which serves as the artificial convolution kernel.
[0021] In one embodiment, the total loss includes a fitting loss function, a target loss function constrained by frequency characteristics, a target loss function constrained by dynamics, and a target loss function constrained by constitutive relations.
[0022] In one embodiment, the target loss function for frequency characteristic constraints is determined based on the variance between the standard frequency response and the output frequency response; wherein the output frequency response is obtained by performing a Fourier transform on the compensation output of the compensation model.
[0023] In one embodiment, the method for constructing the target loss function of dynamic constraints includes: constructing dynamic residuals based on the compensation output of the compensation model, the first derivative and the second derivative of the compensation output, and constructing the target loss function of dynamic constraints based on the dynamic residuals.
[0024] In one embodiment, the method for constructing the target loss function constrained by constitutive relations includes: constructing constitutive residuals based on at least one parameter among the equivalent stress, equivalent strain, and temperature change of the sensor, and constructing the target loss function constrained by constitutive relations based on the constitutive residuals.
[0025] In one embodiment, the compensation model includes several convolutional layers;
[0026] Based on the learning trajectory recording and time-frequency domain energy evolution process, the training parameters are adaptively adjusted as follows:
[0027] For each convolutional layer, obtain the weight tensor of the convolutional layer during each training round to form a weight trajectory sequence. Obtain the cumulative weight change amount, which represents the degree of change of the weight tensor, based on the weight trajectory sequence. Adjust the convolutional layer or the weight of the convolutional layer based on the cumulative weight change amount.
[0028] For each training round, the time-frequency energy distribution is obtained based on the compensation output of the compensation model. The time-frequency energy distribution is aligned with the target energy distribution to obtain the correlation coefficient. The weight coefficients of each target loss function in the total loss are adjusted based on the correlation coefficient.
[0029] Secondly, this application also provides an interpretable heterogeneous sensor dynamic compensation device with embedded physical constraints. The device includes:
[0030] The data processing module is used to acquire the compensation signal and the corresponding reference signal from the heterogeneous sensor, and to construct a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the compensation signal and the reference signal.
[0031] The model building module is used to construct artificial convolution kernels based on the synergy matrix and to perform physical prior initialization of the convolution kernels of the TSLANT adaptive spectral blocks using the artificial convolution kernels.
[0032] The training module is used to train TSLANT after physical prior initialization. It introduces physical constraints to construct a total loss containing multiple objective loss functions and trains to obtain a compensation model for dynamic compensation of heterogeneous sensors.
[0033] An interpretability evaluation and feedback module is used to adaptively adjust training parameters during training based on learning trajectory records and time-frequency domain energy evolution processes.
[0034] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above-described method for dynamic compensation of interpretable heterogeneous sensors with embedded physical constraints.
[0035] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in the above-described method for dynamic compensation of interpretable heterogeneous sensors with embedded physical constraints.
[0036] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in the above-described method for interpretable heterogeneous sensor dynamic compensation with embedded physical constraints.
[0037] The aforementioned method and apparatus for interpretable dynamic compensation of heterogeneous sensors with embedded physical constraints includes the following steps: acquiring the signal to be compensated and the corresponding reference signal of the heterogeneous sensor; constructing a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the signal to be compensated and the reference signal; constructing an artificial convolution kernel based on the cooperative matrix; using the artificial convolution kernel to perform physical prior initialization of the convolution kernel of the TSLANT adaptive spectral block; training the TSLANT after physical prior initialization, introducing physical constraints to construct a total loss containing multiple objective loss functions, and training to obtain a compensation model for dynamic compensation of heterogeneous sensors; and adaptively adjusting training parameters based on learning trajectory records and time-frequency domain energy evolution processes during training. This scheme achieves interpretable representation of the dynamic features of different types of sensors in a unified time-frequency space by constructing a cooperative matrix that simultaneously represents the dynamic error distribution and the model's focus behavior. It also generates an artificial convolution kernel with clear physical meaning to replace traditional random initialization, giving the model's front-end feature extraction process a physical prior and interpretable basis. Furthermore, by introducing multi-source physical laws as constraints into network training, the evolution of convolutional kernels and intermediate features is ensured to occur only within the physically feasible domain. This fundamentally changes the black-box update method of deep compensation models, which relies entirely on data-driven approaches, and enables the compensation behavior to have a traceable mechanistic explanation. Finally, this invention constructs a learning trajectory analysis and feedback adjustment mechanism based on the relationship between "weight evolution—time-frequency energy—physical consistency." Through dynamic monitoring and adaptive adjustment of the consistency between the model's focus pattern and the physical target during training, the compensation model can achieve transparency, controllability, and diagnosability of the learning process while ensuring numerical accuracy. This significantly improves the mechanistic interpretability and engineering credibility of dynamic compensation for multiple types of sensors. Attached Figure Description
[0038] Figure 1 This is a flowchart illustrating an interpretable heterogeneous sensor dynamic compensation method with embedded physical constraints in one embodiment.
[0039] Figure 2 Construct a schematic diagram for the error energy distribution matrix;
[0040] Figure 3 A flowchart is constructed for the weight matrix based on ex post-interpretable methods and prior physical knowledge.
[0041] Figure 4 A block diagram illustrating the principle of convolution kernel initialization based on the coordination matrix;
[0042] Figure 5 Flowchart for training a dynamic compensation model constrained by multiple physical laws;
[0043] Figure 6 This diagram illustrates the calculation of cumulative weight changes during model training. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0045] Existing XAI methods can be broadly categorized into two types: post-hoc interpretable and model interpretable. Post-hoc interpretable methods typically perform attribution analysis and visualization of a given model after training. Gradient-based feature attribution methods measure feature importance by calculating the gradient or gradient integral of the output with respect to the input features, including integral gradient, DeepLIFT, layer-wise correlation propagation, and average gradient outer product. Model-independent interpretable methods estimate the importance of different input dimensions by perturbing the input or constructing local surrogate models. The Shapley regression method, building upon this, assigns class-related saliency scores to image pixels and has since been extended to time-series tasks, assigning importance weights to time points. The above methods have achieved certain results in fields such as image classification and speech recognition, but they still have limitations in sensor dynamic compensation scenarios: on the one hand, the key information of model recognition is often hidden in potential features such as dominant frequency, modal parameters, and state space coefficients, and the significance of simple time points or sampling points is difficult to reveal the true role of these potential features; on the other hand, such methods usually only give "where the model focuses", but cannot answer "why the compensation is completed in this physical mechanism", which is difficult to support the need for model interpretation in high-reliability engineering applications.
[0046] To overcome the shortcomings of ex post-hoc interpretability methods, some research has shifted towards model interpretability, attempting to explicitly introduce interpretable modules into the model structure. This includes dynamically assigning feature weights through attention mechanisms, constructing interpretable subtasks or decomposed network structures, or designing interpretability generation modules that output natural language or visual explanations consistent with the decisions. Other works have introduced physics-guided learning strategies such as artificial convolutional kernels based on physical prior knowledge and physical constraint loss functions, aiming to integrate physical laws into the network structure and training objectives to some extent. While these methods have made some progress in improving model transparency, problems remain, such as difficulty in capturing multi-level feature interactions and global decision-making logic, and the inability of physical priors to fully cover complex data patterns. Especially in the consensus compensation framework of heterogeneous sensors, multiple measurement mechanisms such as acceleration, pressure, and temperature coexist and are coupled. Sensor responses exhibit obvious common dynamic characteristics and differential mechanistic characteristics. Existing XAI methods and local physical constraint strategies struggle to simultaneously characterize the correspondence between "dynamic response mechanism – model internal representation – compensation output" within a unified framework, failing to achieve consistent and transparent expression of compensation logic across multiple sensor types.
[0047] In applications requiring high reliability (including but not limited to aerospace test measurements and transient impact testing of high-end equipment), sensor compensation errors under complex operating conditions will affect subsequent measurement evaluation and control decisions, thereby impacting the reliability of system judgments. Existing deep learning-based dynamic compensation methods exhibit black-box characteristics, making it difficult to interpret their internal feature extraction and decision-making criteria. This results in the difficulty in tracing the source of compensation errors, making it difficult to meet the requirements of verifiability and engineering credibility for compensation results in high-reliability scenarios.
[0048] To address the aforementioned issues, there is a pressing need for an interpretable modeling method that can simultaneously characterize the dynamic error structure, the internal decision-making path of the model, and the evolutionary laws of the training process. This would enable deep learning compensation models to maintain accuracy while possessing a transparent, reliable, and traceable decision-making mechanism, and to adapt to the differences in dynamic characteristics and physical constraints of various types of heterogeneous sensors.
[0049] This application provides an interpretable dynamic compensation method for heterogeneous sensors with embedded physical constraints, such as... Figure 1 As shown, it includes the following steps:
[0050] Step 101: Obtain the signal to be compensated and the corresponding reference signal of the heterogeneous sensor, and construct a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the signal to be compensated and the reference signal.
[0051] Depending on the testing scenario, the composition of heterogeneous sensors varies. For ease of understanding, this invention uses various typical transient testing sensors, such as accelerometers, pressure sensors, and thermocouples, as examples for explanation.
[0052] First, acquire the compensation signal of each sensor in the heterogeneous sensor array. and corresponding reference signal The signal to be compensated refers to a known physical quantity, precisely measured and calibrated, applied to the sensor under time-varying input conditions. The reference signal is the ideal signal that the sensor should theoretically output, perfectly matching the input, given the signal to be compensated. It serves as a benchmark for evaluating the actual output quality of the sensor. The reference signal is calculated based on the signal to be compensated and the sensor's ideal, error-free transfer function.
[0053] For each signal to be compensated and its reference signal This involves performing a time-frequency transformation on the signal, mapping the time-domain signal uniformly to the frequency-domain feature space. The signal to be compensated... The short-time Fourier transform (STFT) is used to construct the time-varying spectrum of the signal to be compensated. Its basic form can be expressed as:
[0054]
[0055] in, For time window functions, For frequency variables.
[0056] For reference signal The reference spectrum can be obtained by performing the same processing. .
[0057] By comparing the differences in amplitude, phase, and power spectral density, the distribution of dynamic error in a specific frequency band can be clearly identified, thus unifying the dynamic defects under different excitation conditions such as step and pulse as recognizable features in the frequency domain. To display the coded dynamic error in the frequency domain characteristics, rather than merely reflecting the energy distribution of the original signal, this invention further constructs an error energy distribution... On the one hand, it can be placed at time and frequency points. The amplitude difference at the point is expressed as On the other hand, the phase difference can be expressed as To facilitate the integration of amplitude and phase deviation within a unified structure, the error energy distribution defined in this invention is as follows:
[0058]
[0059] in, The value range is [0,1], reflecting the normalized dynamic error intensity of the measured signal relative to the reference signal at different times and frequencies. For accelerometers, the high-frequency band... Larger regions correspond to frequency bands with insufficient bandwidth or severe amplitude attenuation; for pressure sensors, peaks near the resonant frequency band occur at... A distinct high-value band is formed on the upper part; for thermocouples, the low- to mid-frequency band... The distribution characterizes problems such as excessively long rise time and sluggish response. Thus, dynamic defects under different excitation forms are uniformly represented as an error energy matrix on the same time-frequency plane. The construction process is as follows Figure 2 As shown.
[0060] Building upon the frequency domain feature construction, this invention further introduces a post-hoc interpretability method to perform attribution analysis on trained or pre-trained compensation models, quantifying the impact of different time slices on the compensation results. The Shapley regression (SHAP) method is used for the time series input. Each time step The contribution of each factor is statistically analyzed, and its theoretical expression can be written as:
[0061]
[0062] in, The set of features at all time steps. Not including time steps Feature subset, This is the output function of the compensation model. By sampling several feature subsets to approximate the above summation process, a one-dimensional time-domain attribution sequence can be obtained. After normalization, it can be written as:
[0063]
[0064] in This reflects the model's time-to-time performance under the current compensation task. The relative level of attention. The construction process is as follows: Figure 3 As shown.
[0065] To achieve a unified expression of physical properties and model-related behaviors, this invention uses frequency domain energy features (i.e., error energy distribution) ) and temporal attribution features (i.e., normalized temporal attribution sequences) The fusion is performed within a unified two-dimensional structure to construct a synergistic matrix. The coordination matrix can be represented as:
[0066]
[0067] in, and For balance coefficient, This is a frequency band weighting function constructed based on prior physical knowledge. For example, for an accelerometer that needs to extend its high-frequency response, it appropriately amplifies the frequency band. For pressure sensors with resonance peaks, the resonant frequency band near the resonance frequency band is considered. Suppression weights are assigned; for thermocouples, greater weights are assigned in the low-frequency region. The specific form of the above weighting function can be set according to the frequency response characteristics of the sensor and experimental calibration results. The resulting synergistic matrix... Each element All of these have clear physical meanings: they reflect both the degree of dynamic error at that time-frequency location and the model's focus on that time slice and the physical priority of that frequency band in the compensation task. In this embodiment, the collaboration matrix is not only used for interpretation and display but also serves as an intermediate representation for subsequent artificial convolution kernel generation and convolution kernel prior initialization, mapping the error mechanism and attribution features to the model structure parameters.
[0068] Step 102: Construct an artificial convolution kernel based on the synergy matrix, and use the artificial convolution kernel to perform physical prior initialization of the convolution kernel of the TSLANT adaptive spectral block.
[0069] In this process, the artificial convolution kernel weights are determined by the key time-frequency regions of the synergy matrix, creating a one-to-one, traceable correspondence between the convolution kernel response and the salient regions of the error energy / attribution weights, thus making the feature extraction process interpretable. This step is based on the synergy matrix. Artificial convolution kernels are designed to replace the original random convolution kernel parameters in the TSLANT network, thereby achieving a unified description of the compensation target and interpretability of the convolution operation mechanism.
[0070] Specifically, firstly, regarding the coordination matrix Perform normalization to obtain a normalized matrix, and calculate the sum of all elements in the normalized matrix to obtain the total weight:
[0071]
[0072] Within the preset energy coverage threshold and minimum / maximum window constraints in the time and frequency directions Below, in Search for the smallest rectangular target region on a plane that meets the preset conditions. The preset conditions are:
[0073]
[0074] target area The number of grid points on the time and frequency axes is denoted as the height of the convolution kernel. and width .
[0075] Then The elements of the synergistic matrix within the matrix are rearranged into submatrices in time-frequency order:
[0076]
[0077] Pair matrix The convolution kernel weight matrix is obtained by performing scale normalization and smoothing. Furthermore, based on the artificial convolution kernel constructed using the synergy matrix, the convolution kernels of the TSLANT adaptive spectral blocks are physically initialized prior to replace the simple random initialization method. The initialization process is as follows: Figure 4 As shown, while ensuring trainability, an initial distribution with physical meaning is provided for the convolution kernel, namely:
[0078]
[0079] During subsequent training, the convolution kernel is updated in Fine-tuning is performed on the basis of the initialization process to ensure that the convolution operation has clear physical priors and interpretable meaning from the outset, rather than being completely randomized. For different types of sensors, this invention adopts the same cooperative matrix construction process, adjusting only the dynamic calibration data, standard frequency response, and physical prior knowledge corresponding to the sensor. By using functions like these, artificial convolution kernels with consistent structure and distinguishable parameters can be generated. Furthermore, since dynamic errors have a certain degree of local stability in the time-frequency plane, initializing the convolution kernel with local sub-blocks of high-error, high-attribution regions in the co-operation matrix can make the convolution operation more sensitive to physically important time-frequency patterns in the early stages of training, which is beneficial for improving model convergence efficiency and interpretability.
[0080] Step 103: Train the TSLANT after physical prior initialization, introduce physical constraints to construct a total loss containing multiple objective loss functions, and train to obtain a compensation model for dynamic compensation of heterogeneous sensors; during the training process, adaptively adjust the training parameters based on the learning trajectory record and the time-frequency domain energy evolution process.
[0081] After completing the design of the artificial convolutional kernel based on the cooperative matrix, this invention introduces a hybrid compensation model with physical constraint embedding on the original TSLANT network structure. This explicitly couples the convolutional feature extraction process with the sensor's dynamic mechanism, frequency response characteristics, and constitutive relations, thereby achieving overall interpretable optimization of the compensation model from structure to training process. Specifically, this invention uses a time-frequency convolutional layer initialized with an artificial convolutional kernel as the front-end feature extraction module, incorporating the cooperative matrix... The model is mapped to a high-dimensional feature space through multi-scale convolution operations, and a multi-objective loss function is constructed using physical constraints to guide the model.
[0082] The parameters maintain physical consistency while meeting data fitting requirements. The overall process is as follows: Figure 5 As shown.
[0083] TSLANet consists of several convolutional layers. Assume the artificial convolutional kernel constructed in step 102 is... It was used in TSLnet's first Initialization of the convolutional layer.
[0084] Signal to be compensated The intermediate feature representation is obtained after multiple convolutions and nonlinear activation. Then, it is mapped to the compensation output through the subsequent time series modeling module. To characterize the compensation result and the reference signal To address the discrepancy between the two, this invention first defines a data fitting loss term:
[0085]
[0086] However, relying solely on the mean squared error in the time domain for training can easily lead to non-physical overfitting behavior in sensitive regions such as high frequencies and resonant bands. Therefore, this invention further introduces physical constraints from three levels: frequency response, consistency dynamics, and constitutive relations, embedding them into the training process in the form of loss terms. First, the target frequency response of the sensor and compensation system is considered. Using the compensation output Frequency response obtained by performing Fourier transform Constructing an objective loss function based on frequency characteristic constraints:
[0087]
[0088] in and These are the lower and upper limits of the frequency band of interest, respectively. This term makes the Bode plot of the compensated system approximate the nominal frequency overall. Specifically, it emphasizes high-frequency gain correction for accelerometers, resonant frequency suppression for pressure sensors, and low-frequency response acceleration for thermocouples, ensuring that the compensation behavior in the frequency domain has a clear physical direction.
[0089] Secondly, to reflect the dynamic characteristics of the sensor-mounting structure in the time domain, this invention equates the test system to a second-order mass-damped-stiffness system or a first-order inertial element. For a typical second-order system, it can be written as:
[0090]
[0091] in The equivalent mass, damping, and stiffness parameters are determined by the nominal parameters of the sensor mounting structure or experimental calibration results. The input excitation signal is used. The compensation output is then processed. and its numerical differential By performing calculations, dynamic residuals can be constructed:
[0092]
[0093] Based on this, the objective loss function for dynamic constraints is defined as follows:
[0094]
[0095] use The constraint penalizes non-physical outputs that deviate from the dynamic equations. This constraint ensures that the compensated signal evolution trajectory remains consistent with the response of the actual physical system in the time domain, avoiding non-physical oscillations or non-causal responses.
[0096] Furthermore, for sensors with significant structure-material-temperature coupling, this invention selectively constructs feature channels related to stress, strain, and temperature in the hidden layer of the compensation model, and incorporates the generalized Hooke's law and thermoelastic constitutive relations into the loss function as soft constraints. This constraint is used when the sensor or its mounting structure meets the stress-strain-temperature coupling modeling conditions, or when corresponding characterization quantities are available; otherwise, only the other two types of constraints can be used to ensure the feasibility and applicability of the solution.
[0097] For example, in the simplified one-dimensional case, it can be represented as
[0098]
[0099] in For equivalent stress, For equivalent change, For temperature changes, For elastic modulus, The coefficient of thermal expansion is given. The channel in the hidden layer feature corresponding to the above physical quantity is denoted as... Then the constitutive residual can be written as:
[0100]
[0101] Based on this, the objective loss function constrained by constitutive relations is defined as follows:
[0102]
[0103] This constraint ensures that the relationships between hidden layer features are no longer completely free numerical combinations, but rather follow the mechanisms of materials mechanics and thermodynamics to a certain extent, thereby improving the physical interpretability of the internal representation of the compensation model. Combining the above, the total loss function is constructed as follows:
[0104]
[0105] in These are the weighting coefficients for each physical constraint. This is achieved by adjusting the loss function. Gradient descent is performed, and with the convolution kernel manually initialized by the cooperating matrix, the update of the compensation model parameters aims to reduce the compensation error while being strictly constrained to physically reasonable conditions. By combining the aforementioned physical constraints with the manually initialized convolution kernel by the cooperating matrix, this invention restricts the optimization process of the convolution kernel parameters to a physically feasible domain that conforms to sensor dynamics, constitutive relations, and target frequency response. This gives the evolution trajectory of the convolution kernel and intermediate features a clear physical meaning, thereby achieving interpretability of the internal structure and training process of the compensation model, rather than relying solely on ex-post interpretable methods to explain the black-box model.
[0106] Based on the construction of a hybrid compensation model using artificial convolution kernels and physical constraints, this invention further proposes a model interpretability analysis and feedback mechanism based on learning trajectory recording and time-frequency energy evolution. This mechanism is used to characterize the parameter evolution and output feature changes of the compensation model throughout the training process and aligns it with the physical characteristic space of the sensor. This enables a visualized explanation and adaptive adjustment of the entire process of "what the compensation model has learned" and "how it evolves to a physically reasonable understanding".
[0107] Specifically, the compensation model will be the first Layer convolution weights are considered to be based on the number of iterations. Discrete time series indexed During training, within a pre-defined set of recording steps... The current weight tensor of this layer is snapshotted and stored to form a weight trajectory sequence. The aforementioned weight trajectories are stored in a log file in tensor form for subsequent statistical analysis. To quantitatively characterize the overall degree of change and update intensity of this layer during training, the cumulative weight change can be defined as follows:
[0108]
[0109] in Let Frobenius norm be represented. For artificial convolution kernels constructed from the synergy matrix... If during the training process, the corresponding layer If the performance remains within a relatively small range while the compensation performance is significantly improved, it can be determined that the physical priors contained in the convolutional kernel of that layer are reasonable, thus eliminating the need for significant structural adjustments. The network is performing more subtle corrections than a complete relearning. Conversely, if certain layers... If the frequency band of a layer is significantly larger than other layers and has no clear correlation with the frequency band corresponding to the sensor's physical characteristics, then its corresponding constraint weights can be adjusted or the manual initialization strategy for that layer can be redesigned. The calculation process is as follows: Figure 6 As shown.
[0110] In terms of output feature analysis, this invention focuses on the energy evolution of the compensation result in the time-frequency domain. Let the first... The compensation output in the next iteration is Its STFT is represented as:
[0111]
[0112] The time-frequency energy distribution is then defined as:
[0113]
[0114] By selecting several key training phases (initial phase) Mid-term stage and convergence phase ), will the corresponding Visualized as a time-frequency energy heatmap, it allows for intuitive observation of how the network gradually corrects the energy distribution during training: for accelerometers with insufficient high-frequency response, The energy in the mid-to-high frequency region will gradually increase; for pressure sensors with sharp resonance peaks, the energy peak in the resonance frequency band will gradually decrease and tend to smooth out; for thermocouples with hysteresis response, the energy in the low-frequency to mid-to-low frequency region will gradually increase as training progresses, corresponding to a shorter rise time and faster dynamic response. The above time-frequency evolution process not only reflects "what kind of compensation the network is doing", but also explains "why compensation is in line with physical intuition" from the perspective of time-frequency energy.
[0115] To quantify the consistency between the learning trajectory and the target physical characteristics, this invention also introduces a similarity index, which... Compared with the target energy distribution obtained based on theoretical models or experimental calibration Perform alignment analysis. Dynamic response for the target Through with After obtaining the spectrum using a short-time Fourier transform with the same parameter configuration, the time-frequency energy distribution is obtained by squaring the amplitude. The theoretical model of the sensor-mount structure can be used to determine the excitation. The results are obtained through simulation or by actual measurement using a high-precision reference sensor / benchmark device under conditions where dynamic errors are negligible. This invention does not limit the specific method of acquisition. The normalized correlation coefficient is defined...
[0116]
[0117] in and Given the mean of the corresponding energy distribution, we can obtain a curve that varies with the number of iterations. Changes in physical consistency curves When training is effective and physical constraints are reasonable, The overall trend should be upward or stable at a high level, indicating that the compensation output is gradually approaching the physical target model in terms of time-frequency characteristics; if there are long-term fluctuations or significant declines, it suggests that the current constraint weight configuration or artificial convolution kernel design may not match the actual physical characteristics.
[0118] Based on the above analysis of learning trajectory and time-frequency evolution, this invention further constructs a feedback adjustment mechanism: during the training process, at a preset period, [the mechanism is adjusted / adjusted]. An evaluation shall be conducted within several consecutive evaluation periods. When the level continues to decline or remains below the expected level for an extended period, it is determined that the physical consistency of the current training phase is insufficient or has degraded. In this case, frequency-constrained loss is applied. Dynamic equation constraint loss Constitutive relation constraint loss In total losses The proportion in the formula is adaptively adjusted according to the corresponding weight coefficient. This allows subsequent iterations to focus more on improving physical consistency or suppressing anomalous energy distributions in specific frequency bands. When the data remains stable and at a high level over a longer training period, some constraint weights can be appropriately reduced to avoid over-constraining the data fitting ability.
[0119] In addition, regarding the cumulative weight change For convolutional layers whose weights significantly exceed the preset reference range and whose corresponding frequency bands do not match the target physical characteristics, the regularization strength of the weights in subsequent training can be increased, or some convolutional kernel parameters can be frozen to suppress abnormal updates that deviate from the prior of the cooperating matrix. Through this closed-loop feedback of "weight evolution - time-frequency energy - physical consistency", this invention transforms the model training process from the traditional "black box optimization" to a "transparent evolution process" with clear physical references and interpretable indicators. This allows the final dynamic compensation model to not only meet the compensation requirements of multiple types of sensors in terms of numerical accuracy, but also to form a one-to-one interpretive relationship between the learning mechanism and output characteristics and the physical structure and dynamic behavior of the sensor, thereby significantly improving the reliability and acceptability of the model in engineering applications.
[0120] This invention constructs an interpretable, physically constrained deep network framework for dynamic compensation of heterogeneous sensors, mainly consisting of three layers: First, at the input and structural design level, a cooperative matrix integrating time-frequency energy features and time attribution features is constructed based on time-series data from multiple types of sensors. This explicitly represents the sensor dynamic error in a unified time-frequency feature space, and generates an artificial convolutional kernel with physical prior meaning to replace the random convolutional kernel initialization in the TSLANT network, achieving unified modeling of compensation targets for multiple types of sensors and explicit interpretability of the convolution operation mechanism. Second, at the model training and physical constraint level, a hybrid compensation network embedding multi-source physical laws is constructed around the artificial convolutional kernel driven by the cooperative matrix. Constitutive constraints such as the target frequency response, consistent dynamic equations, generalized Hooke's law, and thermoelastic constitutive relations are integrated into the training process in the form of a loss function, guiding the convolutional kernel parameters and intermediate features to evolve only within the physically feasible domain, thereby simultaneously satisfying the requirements of dynamic compensation accuracy and physical mechanism consistency. Finally, at the level of learning process analysis and feedback adjustment, a weight evolution record and time-frequency energy evolution analysis mechanism are introduced. By constructing a learning trajectory representation system of "weight change - time-frequency energy distribution - physical consistency index", the model's focus frequency band, compensation behavior and its degree of conformity with the target physical characteristics are quantitatively evaluated throughout the training process. Based on this, the physical constraint weights and network structure configuration are adaptively adjusted to achieve a transparent expression of the compensation model's decision logic and evolution path, ensuring that the obtained dynamic compensation model has high-precision compensation performance, physical mechanism consistency and interpretable reliability.
[0121] The present invention is compared with traditional sensor compensation schemes as follows:
[0122] 1. Existing dynamic compensation methods typically construct independent models for different sensors, using different time-domain, frequency-domain, or empirical methods to describe dynamic errors. This leads to inconsistent feature representations and physical meanings, making it difficult to compare and analyze the dynamic behavior of different sensors from a unified structured perspective. Due to the lack of a unified and interpretable method for describing dynamic features, the compensation mechanism exhibits fragmented characteristics, which is not conducive to revealing common dynamic laws across sensors and also limits the transparent presentation of the compensation model mechanism.
[0123] This invention constructs an interpretable feature space that can uniformly describe the dynamic error characteristics of different types of sensors through a collaborative matrix. This enables the originally fragmented dynamic features to have comparative and structured expressive capabilities, providing a common interpretive scale for the analysis of compensation mechanisms of different sensors, thereby improving the ability to understand and interpretably model cross-sensor dynamic behavior.
[0124] 2. Existing data-driven deep learning compensation methods generally lack clear physical constraints or mechanistic explanations in the structural design and parameter update processes. Their internal convolutional kernels, feature channels, and intermediate layer representations are difficult to correlate clearly with the actual dynamic behavior of the sensor. Even if the model achieves good numerical compensation results, it cannot answer the question of the source of its compensation logic, nor can it explain where and why the model focuses on specific time or frequency regions. The model's interpretability is weak and its credibility is insufficient, limiting its use in applications requiring mechanistic transparency, such as metrology and calibration.
[0125] This invention introduces multi-source physical laws as constraints, enabling the model's feature extraction and decision-making processes to have a clear logical source. This establishes an interpretable connection between the area of interest, decision basis, and the actual dynamic characteristics of the sensor, thereby avoiding the model's reliance solely on data-driven black-box learning and improving the transparency and reliability of the compensation model in engineering applications, metrological calibration, and trusted intelligent scenarios.
[0126] 3. Existing interpretable methods mostly perform attribution or visualization analysis on the results only after model training is complete, which is a "result-level interpretation." This cannot influence the model structure or training strategy in reverse, cannot provide real-time feedback on the model's learning behavior, and cannot reveal the model's focus path, feature evolution, and sources of bias during training. The lack of interpretable means covering the entire training process makes the model optimization process a black box, unable to promptly detect learning behaviors that deviate from physical laws or compensation targets, thus limiting the model's reliability, controllability, and transparency.
[0127] This invention designs a learning trajectory analysis and feedback adjustment mechanism during the training process. By characterizing the feature evolution, attention patterns and error sources in the model learning process, the training process becomes observable and interpretable. Based on this, the model's learning direction is adjusted, so that interpretability is not only reflected in the compensation results, but also runs through the model's learning path and behavior control, providing process-level assurance for the model's credibility.
[0128] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0129] Based on the same inventive concept, this application also provides a device for dynamic compensation of heterogeneous sensors with embedded physical constraints, used to implement the above-described method for dynamic compensation of heterogeneous sensors with embedded physical constraints. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the device for dynamic compensation of heterogeneous sensors with embedded physical constraints provided below can be found in the limitations of the method for dynamic compensation of heterogeneous sensors with embedded physical constraints described above, and will not be repeated here.
[0130] In one embodiment, an interpretable heterogeneous sensor dynamic compensation device with embedded physical constraints is provided, comprising:
[0131] The data processing module is used to acquire the compensation signal and the corresponding reference signal from the heterogeneous sensor, and to construct a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the compensation signal and the reference signal.
[0132] The model building module is used to construct artificial convolution kernels based on the synergy matrix and to perform physical prior initialization of the convolution kernels of the TSLANT adaptive spectral blocks using the artificial convolution kernels.
[0133] The training module is used to train TSLANT after physical prior initialization. It introduces physical constraints to construct a total loss containing multiple objective loss functions and trains to obtain a compensation model for dynamic compensation of heterogeneous sensors.
[0134] An interpretability evaluation and feedback module is used to adaptively adjust training parameters during training based on learning trajectory records and time-frequency domain energy evolution processes.
[0135] Each module in the aforementioned interpretable heterogeneous sensor dynamic compensation device with embedded physical constraints can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware within or independently of the processor in a computer device, or stored in software within the memory of a computer device, so that the processor can call and execute the operations corresponding to each module.
[0136] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in all of the above method embodiments.
[0137] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in all of the above method embodiments.
[0138] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in all of the above method embodiments.
[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0140] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0141] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0142] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A dynamic compensation method for interpretable heterogeneous sensors with embedded physical constraints, characterized in that, The method includes: Obtain the compensation signal and corresponding reference signal from the heterogeneous sensor, and construct a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the compensation signal and the reference signal; Based on the cooperative matrix, an artificial convolution kernel is constructed, and the artificial convolution kernel is used to perform physical prior initialization of the convolution kernel of the TSLANT adaptive spectral block; The TSLANT, after physical prior initialization, is trained by introducing physical constraints to construct a total loss containing multiple objective loss functions. A compensation model for dynamic compensation of the heterogeneous sensor is obtained through training. During the training process, the training parameters are adaptively adjusted based on the learning trajectory record and the time-frequency domain energy evolution process.
2. The method according to claim 1, characterized in that, The construction of the synergistic matrix integrating frequency domain energy features and time domain attribution features based on the signal to be compensated and the reference signal includes: The short-time Fourier transform is used to process the signal to be compensated and the reference signal respectively, and the spectrum of the signal to be compensated and the spectrum of the reference signal are obtained accordingly. Based on the amplitude, phase, and power spectral density deviations between the spectrum of the signal to be compensated and the reference spectrum, the error energy distribution is obtained as the frequency domain energy feature. Attribution analysis is performed on the pre-trained compensation model based on the SHAP interpretability method to obtain the attribution weights at each time step, which are used as the time-domain attribution features. Based on prior physical knowledge, the frequency band weights corresponding to each sensor in the heterogeneous sensor are constructed. The cooperative matrix is constructed based on the frequency domain energy characteristics, the time domain attribution characteristics, and the frequency band weights.
3. The method according to claim 1, characterized in that, The construction of the artificial convolution kernel based on the synergy matrix includes: The cooperative matrix is normalized to obtain the normalized matrix and the sum of its elements; Given an energy coverage threshold, search for the rectangular target region with the smallest area on the time-frequency plane constrained by the time and frequency direction window size of the normalized matrix, such that the sum of the elements in the target region is not less than the product of the sum of the elements of the normalized matrix and the energy coverage threshold. The elements within the target region are rearranged into a submatrix according to time and frequency order; The submatrix is scaled and smoothed to obtain the convolution kernel weight matrix, which serves as the artificial convolution kernel.
4. The method according to claim 1, characterized in that: The total loss includes the fitting loss function, the target loss function for frequency characteristic constraints, the target loss function for dynamic constraints, and the target loss function for constitutive relation constraints.
5. The method according to claim 4, characterized in that: The target loss function of the frequency characteristic constraint is determined based on the variance between the standard frequency response and the output frequency response; wherein the output frequency response is obtained by performing a Fourier transform on the compensation output of the compensation model.
6. The method according to claim 4, characterized in that, The method for constructing the target loss function of the dynamic constraint includes: constructing a dynamic residual based on the compensation output of the compensation model, the first derivative and the second derivative of the compensation output, and constructing the target loss function of the dynamic constraint based on the dynamic residual.
7. The method according to claim 4, characterized in that, The method for constructing the target loss function of the constitutive relation constraint includes: constructing constitutive residuals based on at least one parameter among the equivalent stress, equivalent strain, and temperature change of the sensor, and constructing the target loss function of the constitutive relation constraint based on the constitutive residuals.
8. The method according to claim 1, characterized in that, The compensation model includes several convolutional layers; The adaptive adjustment of training parameters based on learning trajectory recording and time-frequency domain energy evolution process includes: For each convolutional layer, obtain the weight tensor of the convolutional layer during each training round to form a weight trajectory sequence. Obtain the cumulative weight change amount representing the degree of change of the weight tensor based on the weight trajectory sequence. Adjust the convolutional layer or the weight of the convolutional layer based on the cumulative weight change amount. For each round of training, the time-frequency energy distribution is obtained based on the compensation output of the compensation model. The time-frequency energy distribution is aligned with the target energy distribution to obtain the correlation coefficient. The weight coefficients of each target loss function in the total loss are adjusted based on the correlation coefficient.
9. A dynamic compensation device for interpretable heterogeneous sensors with embedded physical constraints, characterized in that, The device includes: The data processing module is used to acquire the compensation signal and the corresponding reference signal of the heterogeneous sensor, and to construct a cooperative matrix integrating frequency domain energy features and time domain attribution features based on the compensation signal and the reference signal. The model building module is used to construct artificial convolution kernels based on the collaborative matrix and to perform physical prior initialization of the convolution kernels of the TSLANT adaptive spectral blocks using the artificial convolution kernels. The training module is used to train the TSLANT after physical prior initialization, introduce physical constraints to construct a total loss containing multiple objective loss functions, and train to obtain a compensation model for dynamic compensation of the heterogeneous sensor. An interpretability evaluation and feedback module is used to adaptively adjust training parameters during training based on learning trajectory records and time-frequency domain energy evolution processes.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.