A method for LVDT sensor accuracy correction based on machine learning
Through machine learning methods, the LVDT sensor accuracy error prediction model is constructed by combining wavelet packet decomposition and KMEANS algorithm to identify and compensate disturbance sources in real time, solving the accuracy correction problem of LVDT sensors in dynamic disturbance environments, and improving its anti-interference ability and measurement accuracy under complex operating conditions.
Patent Information
- Application Number
- CN202510776830.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-06-11
AI Technical Summary
The prior art is difficult to correct the accuracy of the LVDT sensor in real time in a dynamic disturbance environment, resulting in measurement errors and nonlinear distortion, affecting its application in high-precision measurement scenarios.
Using a machine learning-based method, a sensor accuracy error prediction model is constructed through multi-level wavelet packet decomposition, KMEANS algorithm and interference feature labels, and the disturbance sources are identified and compensated in real time to achieve accuracy correction.
It effectively improves the anti-interference ability of LVDT sensors under complex operating conditions, eliminates nonlinear distortion and zero-point drift, ensures high stability and accuracy, and is suitable for intelligent manufacturing and precision control.
Smart Images

Figure CN120296372B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of LVDT sensors, and in particular to a method for calibrating LVDT sensor accuracy based on machine learning. Background Art
[0002] In fields such as industrial automation, aerospace, and precision machining, linear variable differential transformer (LVDT) sensors are widely used for real-time displacement and position measurement due to their high precision, long life, and strong anti-interference capabilities. With the growing demand for intelligent manufacturing and precision control, LVDT sensors must maintain stable output under complex operating conditions such as high-frequency vibration, multi-axis disturbances, and electromagnetic noise. This places higher demands on the sensors' dynamic accuracy and anti-interference capabilities. However, existing technologies generally use static calibration or fixed filter-based error compensation methods, which are difficult to adapt to the real-time accuracy correction requirements under dynamic disturbance environments. With the increasing complexity of application scenarios, such as strong vibration, electromagnetic noise interference, and drastic temperature fluctuations in industrial sites, the measurement accuracy of LVDT sensors is easily affected by various disturbance sources, resulting in nonlinear distortion, zero drift, and amplitude deviation in the output signal, which seriously restricts their reliable application in high-precision measurement scenarios.
[0003] The existing technology suppresses high-frequency noise through low-pass filtering, which is difficult to adapt to the real-time precision correction requirements in dynamic disturbance environments, resulting in insufficient error prediction accuracy in dynamic disturbance environments. Summary of the Invention
[0004] In response to the shortcomings of the existing technology, the present invention provides an LVDT sensor accuracy correction method based on machine learning, which solves the problem that the existing technology suppresses high-frequency noise through low-pass filtering, is difficult to adapt to the real-time accuracy correction requirements in dynamic disturbance environments, and leads to insufficient error prediction accuracy in dynamic disturbance environments.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for LVDT sensor accuracy correction based on machine learning, comprising the following steps:
[0006] Step S1: obtaining an LVDT sensor disturbance data set by adding different disturbance sources to the LVDT sensor, wherein the LVDT sensor disturbance data set includes: an LVDT sensor response signal and disturbance source parameters;
[0007] Step S2: Decompose the LVDT sensor response signal in terms of frequency through a multi-level wavelet packet decomposition algorithm to obtain a wavelet coefficient sequence of the sub-bands of the LVDT sensor response signal, and calculate the sub-band energy index through the wavelet coefficient sequence; calculate the sub-band energy entropy by calculating the entropy value of the sub-band energy index; calculate the energy concentration index by combining the maximum value of the sub-band energy index and the sub-band energy entropy;
[0008] Step S3: Perform peak analysis on the wavelet coefficient sequence to obtain the sub-band peak factor; calculate the sub-band comprehensive peak index by combining the sub-band peak factor and the sub-band energy index; obtain the LVDT response signal feature by combining the sub-band comprehensive peak index and the energy concentration index;
[0009] Step S4: Cluster the LVDT response signal features through the KMEANS algorithm to obtain response signal clustering clusters, and statistically analyze the disturbance source parameters of each clustering cluster in the response signal clustering clusters to obtain the interference feature labels of the clustering clusters;
[0010] Step S5: Construct a sensor accuracy error prediction model corresponding to the interference feature label according to the interference feature label; collect the LVDT original measurement signal in real time, calculate the LVDT response signal feature of the LVDT original measurement signal, input the LVDT response signal feature into the response signal clustering clusters to obtain the interference feature label of the LVDT original measurement signal; then input the LVDT original measurement signal into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the signal error result of the LVDT;
[0011] Step S6: Calculate the correction result of the LVDT signal by combining the LVDT response signal feature of the LVDT original measurement signal and the signal error result of the LVDT, so as to realize the accuracy correction of the LVDT sensor.
[0012] Preferably, the process of decomposing the LVDT sensor response signal in terms of frequency through a multi-level wavelet packet decomposition algorithm to obtain a wavelet coefficient sequence of the sub-bands of the LVDT sensor response signal, and calculating the sub-band energy index through the wavelet coefficient sequence includes the following specific steps:
[0013] Through the low-pass filtering and high-pass filtering of the multi-level wavelet transform, take the LVDT sensor response signal x[n] as the original input of the 0th layer of the multi-level wavelet transform, where 0 < n < N, and N is the total number of sampling points of the LVDT sensor response signal;
[0014] The low-frequency coefficient of the Lth layer of decomposition is:
[0015] ;
[0016] Indicates the value of the low-frequency coefficient at the jth position after the Lth layer decomposition of the LVDT sensor response signal, where j is the position index of the low-frequency coefficient after the Lth layer decomposition, 0 j< , Indicates the nth sampling point of the LVDT sensor response signal, N is the total number of sampling points of the LVDT sensor response signal, represents the low-pass filter coefficient, Represents the low-frequency coefficient of the L-1 layer;
[0017] The high-frequency coefficients of the L-th layer decomposition are:
[0018] ;
[0019] Indicates the value of the high-frequency coefficient at the jth position after the Lth layer decomposition of the LVDT sensor response signal, where j is the position index of the high-frequency coefficient after the Lth layer decomposition, 0 j< , Indicates the nth sampling point of the LVDT sensor response signal, N is the total number of sampling points of the LVDT sensor response signal, represents the high-pass filter coefficient, Represents the high-frequency coefficients of the L-1 layer
[0020] Continue to decompose the coefficients of each layer, and finally get wavelet coefficient sequence of sub-bands ={ , },i=1,2,... , where L is the number of layers;
[0021] Then the energy index of each sub-band is:
[0022] ;
[0023] in, is the energy index of the ith sub-band, N represents the total number of sampling points of the LVDT sensor response signal, represents the wavelet coefficient sequence of the ith sub-band, n is the index of the nth value in the wavelet coefficient sequence of the sub-band, Indicates the total number of sub-bands generated when the number of decomposition levels is L, where L is the number of decomposition levels.
[0024] Preferably, the step of calculating the entropy value of the sub-band energy index to obtain the sub-band energy entropy comprises the following steps:
[0025] The entropy of the sub-band energy index is calculated by calculating the entropy value of the sub-band energy index to obtain the sub-band energy entropy:
[0026] ;
[0027] Among them, H is the sub-band energy entropy, Indicates the total number of sub-bands generated when the number of decomposition layers is L, where L is the number of decomposition layers. is the energy index of the i-th sub-band.
[0028] Preferably, the step of calculating the energy concentration index by combining the maximum value of the sub-band energy index and the sub-band energy entropy comprises the following steps:
[0029] The energy concentration index is calculated by combining the maximum value of the sub-band energy index and the sub-band energy entropy:
[0030] ;
[0031] in, is the energy concentration index, H is the sub-band energy entropy, Indicates the maximum value of the sub-band energy index, and max() is the maximum value function.
[0032] Preferably, the step of performing peak analysis on the wavelet coefficient sequence to obtain the sub-band peak factor comprises the following specific steps:
[0033] The peak value of the sub-band is obtained by performing peak analysis on the wavelet coefficient sequence of the LVDT sensor response signal sub-band, and the wavelet coefficient sequence of each sub-band is Perform wavelet reconstruction to obtain the reconstructed signal sequence of the sub-band , represents the reconstructed signal of the i-th sub-band;
[0034] Perform peak analysis on the reconstructed signal sequence of the i-th sub-band to obtain the sub-band peak factor:
[0035] ;
[0036] in, is the peak factor of the ith sub-band, represents the reconstructed signal sequence of the i-th sub-band, N represents the total number of sampling points of the reconstructed signal sequence, and n is the index of the n-th value in the wavelet coefficient sequence of the i-th sub-band.
[0037] Preferably, the calculating of the sub-band comprehensive peak index by combining the sub-band peak factor and the sub-band energy index comprises the following specific steps:
[0038] By combining the sub-band peak factor and the sub-band energy index, the sub-band comprehensive peak index is calculated:
[0039] ;
[0040] Among them, Q is the sub-band comprehensive peak index, L is the number of layers, i represents the index of the i-th sub-band, is the peak factor of the ith sub-band, is the energy index of the i-th sub-band.
[0041] Preferably, the method of obtaining the LVDT response signal characteristics by combining the sub-band comprehensive peak index and the energy concentration index comprises the following specific steps:
[0042] By combining the sub-band comprehensive peak index and energy concentration index, the LVDT response signal characteristic T is obtained, T=[ ,Q], where is the energy concentration index, and Q is the comprehensive peak index.
[0043] Preferably, the construction of the sensor accuracy error prediction model corresponding to the interference feature label includes the following specific steps:
[0044] Interference feature label The corresponding sensor accuracy error prediction model structure includes: input layer, convolution module, fully connected regression layer, fully connected layer, and output layer;
[0045] The input layer receives the LVDT sensor response signal and standard displacement input;
[0046] Convolution module: First layer convolution: uses one-dimensional convolution operation, configures 64 convolution kernels with a width of 3, a stride of 1, and an activation function of ReLU. After the input passes through the convolution, a 64-channel feature map is generated. Residual connection: After the second layer of convolution, a skip connection is introduced to directly add the output of the first layer of convolution to the output of the second layer;
[0047] Recurrent module: Bidirectional LSTM layer: uses a bidirectional long short-term memory network with 32 hidden units in each direction to capture the temporal dependencies of the signal. Fully connected regression layer: flattens the temporal features output by the LSTM layer into a one-dimensional vector.
[0048] Fully connected layer: Mapping features through a two-layer fully connected network. The first layer has 256 neurons, ReLU activation function, and Dropout is added to prevent overfitting. The output layer is a linear neuron that directly regresses the prediction error value Δy.
[0049] Output layer: The output layer directly generates error prediction values in millimeters, which are aligned with the sensor range;
[0050] The loss function is:
[0051] ;
[0052] in, is the loss function of the sensor accuracy error prediction model, N represents the total number of signal sampling points, n represents the nth signal sampling point, It represents the error value between the predicted LVDT sensor response signal and the nth sampling point of the standard displacement. Indicates the error between the actual LVDT sensor response signal and the nth sampling point of the standard displacement.
[0053] Preferably, the step of inputting the LVDT original measurement signal into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the LVDT signal error result comprises the following specific steps:
[0054] Input the LVDT original measurement signal into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the LVDT signal error result:
[0055] ;
[0056] in, It indicates the error value between the predicted LVDT original measurement signal input and the nth sampling point of the standard displacement. Indicates that the interference feature label is Sensor accuracy error prediction model, Represents the original measurement signal of the LVDT, and n represents the nth sampling point of the signal.
[0057] Preferably, the method of calculating the correction result of the LVDT signal by combining the LVDT response signal characteristics of the LVDT original measurement signal and the LVDT signal error result comprises the following specific steps:
[0058] By combining the original measurement output of the LVDT and the signal error result of the LVDT, the correction result of the LVDT signal is obtained:
[0059] ;
[0060] in, Indicates the correction result of the nth sampling point of the LVDT signal, n represents the nth sampling point of the signal, Indicates the value of the nth sampling point of the original measurement output of the LVDT. It indicates the error value between the predicted LVDT original measurement signal input and the nth sampling point of the standard displacement. The interference characteristic label of the original LVDT measurement signal is And the energy concentration index in the response signal characteristics is The dynamic weight coefficient of is the interference feature label, is the energy concentration index of the original measurement output of the LVDT, is the attenuation factor, which controls the compensation amount along with the original measurement output of LVDT The decay rate.
[0061] Beneficial effects
[0062] The present invention provides a method for LVDT sensor accuracy correction based on machine learning. It has the following beneficial effects:
[0063] (1) By combining the maximum value of the sub-band energy index and the sub-band energy entropy to calculate the energy concentration index, the concentration of the signal energy distribution and the complexity of the disturbance can be comprehensively quantified. This method can not only accurately identify the dominant disturbance frequency band, but also evaluate the uniformity of the energy distribution through the entropy value, thereby distinguishing between single interference and complex interference scenarios. For example, the combination of a high energy index and a low entropy value indicates that the signal is dominated by a single strong disturbance, while a low energy index and a high entropy value reflect complex multi-source interference. This provides a key basis for the targeted construction of the subsequent error model and effectively improves the robustness of the disturbance feature extraction.
[0064] (2) By combining the sub-band peak factor and the sub-band energy index to calculate the comprehensive peak index, the problem of transient impact features being easily interfered with by low-energy noise in traditional methods is solved. The peak factor captures the instantaneous impact strength of the signal within the frequency band, while the energy index gives it weight, suppressing the noise interference of non-dominant frequency bands. For example, significant peaks in high-energy frequency bands can be strengthened as key features, while random spikes in low-energy frequency bands are weakened, thereby significantly improving the sensitivity and recognition accuracy of core interference features such as impact and harmonic distortion, avoiding misjudgment and missed detection.
[0065] (3) By combining the response signal characteristics of the LVDT original measurement signal with the real-time predicted signal error results, accurate error compensation is achieved in a dynamic disturbance environment. Its core advantage is that: through the dynamic weight coefficient and nonlinear attenuation factor, the system can adaptively adjust the compensation strength according to the interference type and energy distribution characteristics - strengthening the correction to eliminate systematic deviations under strong dominant interference, and suppressing the risk of overcompensation in weak dispersed interference, which not only solves the over-compensation or under-compensation problem of traditional linear correction, but also avoids the secondary distortion of high-amplitude signals; secondly, this method accurately distinguishes multi-source interference such as periodic vibration and random noise through frequency band energy analysis and cluster label recognition, and optimizes the compensation strategy in a targeted manner, significantly improving the sensor's anti-interference ability under complex working conditions such as multi-axis vibration and electromagnetic noise; finally, through the closed-loop mechanism of real-time error prediction and dynamic correction, errors such as nonlinear distortion and zero drift are effectively eliminated, ensuring the high stability and measurement accuracy of the LVDT signal, and providing a highly reliable data foundation for scenarios such as intelligent manufacturing and precision control. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0067] Figure 1 This is a flowchart of the steps of the LVDT sensor accuracy correction method based on machine learning proposed by the present invention;
[0068] Figure 2 A hierarchical diagram of the steps of the LVDT sensor accuracy correction method based on machine learning proposed in this invention; DETAILED DESCRIPTION
[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0070] See also Figure 1-2 The present invention provides a technical solution: a LVDT sensor accuracy correction method based on machine learning.
[0071] Step S1: obtaining an LVDT sensor disturbance data set by adding different disturbance sources to the LVDT sensor, wherein the LVDT sensor disturbance data set includes an LVDT sensor response signal and disturbance source parameters.
[0072] The specific steps to construct a disturbance dataset by applying different disturbance sources to the LVDT sensor are as follows:
[0073] Build a disturbance experiment platform with multi-parameter control capabilities. This platform must support precise control of physical disturbances such as vibration frequency, amplitude, direction, and random pulses. Rigidly fix the LVDT sensor to the platform surface to ensure that its output signal only reflects the disturbance characteristics applied by the platform and avoids interference from other environmental noise. Preset multiple sets of disturbance conditions, including but not limited to low-frequency and high-frequency sinusoidal vibration, periodic shocks of varying amplitudes, vibration excitation in multiple directions (such as axial and radial), and random pulse sequences. For each set of conditions, clearly record the parameters of the disturbance source, such as key indicators such as vibration frequency, amplitude, azimuth, pulse intensity, and timing.
[0074] During the data acquisition phase, a multi-channel synchronous sampling system records the LVDT sensor response signal and the disturbance parameters generated by the platform in real time. During the acquisition process, strict timestamp alignment is required to ensure that each sensor response sample forms a one-to-one mapping relationship with the corresponding disturbance parameter. For example, when applying a 10Hz sinusoidal vibration, the system synchronously records the LVDT's continuous output curve for the entire vibration cycle, annotating its parameters such as frequency and amplitude. For random pulse scenarios, it is necessary to capture the transient response signal of the pulse event and correlate the pulse intensity with the triggering time information.
[0075] Finally, the collected raw data is structured and preprocessed. The data storage format must include the LVDT sensor response signal, a disturbance type classification label such as "axial 5Hz sinusoidal vibration," and a specific disturbance parameter numerical matrix. At the same time, data cleaning is performed to remove invalid samples caused by transient sensor saturation or abnormal platform jitter to ensure the integrity and consistency of the dataset. The structured dataset formed in this step not only contains the dynamic response characteristics of the sensor under disturbance but also fully preserves the physical characteristics of the disturbance source, providing a highly reliable data foundation for subsequent interference pattern analysis, feature encoding, and error modeling.
[0076] Step S2: performing frequency decomposition on the LVDT sensor response signal using a multi-level wavelet packet decomposition algorithm to obtain a wavelet coefficient sequence of a sub-band of the LVDT sensor response signal, and calculating a sub-band energy index using the wavelet coefficient sequence; performing entropy calculation on the sub-band energy index to obtain a sub-band energy entropy; and calculating an energy concentration index by combining the maximum value of the sub-band energy index and the sub-band energy entropy.
[0077] The frequency decomposition of the LVDT sensor response signal is performed by a multi-level wavelet packet decomposition algorithm, and the sub-band energy index is calculated. The specific steps are as follows: First, preprocess the original signal of the sensor, such as removing the DC bias, to eliminate the influence of zero drift; then select an appropriate wavelet basis, such as the db4 wavelet, and determine the decomposition level, and decompose the signal layer by layer into low-frequency and high-frequency components, forming a tree structure containing sub-bands, and each sub-band corresponds to a unique frequency range, such as 0 - 625 Hz, 625 - 1250 Hz, etc.; then extract the wavelet packet coefficients of each sub-band, and obtain the sub-band energy index by calculating the sum of the squares of the coefficients, which reflects the total signal energy within this frequency band; finally, obtain the energy indices of all sub-bands, providing a quantitative basis for subsequent analysis of the energy distribution characteristics of each frequency band.
[0078] Through the low-pass filtering and high-pass filtering of the multi-level wavelet transform, the LVDT sensor response signal x[n] is used as the original input of the 0th layer of the multi-level wavelet transform, where 0 < n < N, and N is the total number of sampling points of the LVDT sensor response signal;
[0079] The low-frequency coefficient of the Lth layer of decomposition is:
[0080] ;
[0081] represents the value of the low-frequency coefficient of the LVDT sensor response signal at the jth position after the Lth layer of decomposition, where j is the position index of the low-frequency coefficient after the Lth layer of decomposition, 0 j < , represents the nth sampling point of the LVDT sensor response signal, N is the total number of sampling points of the LVDT sensor response signal, represents the low-pass filter coefficient, represents the low-frequency coefficient of the (L - 1)th layer.
[0082] The high-frequency coefficient of the Lth layer of decomposition is:
[0083] ;
[0084] represents the value of the high-frequency coefficient of the LVDT sensor response signal at the jth position after the Lth layer of decomposition, where j is the position index of the high-frequency coefficient after the Lth layer of decomposition, 0 j < , represents the nth sampling point of the LVDT sensor response signal, N is the total number of sampling points of the LVDT sensor response signal, represents the high-pass filter coefficient, represents the high-frequency coefficient of the (L - 1)th layer.
[0085] Continue to decompose the coefficients of each layer, and finally get wavelet coefficient sequence of sub-bands ={ , },i=1,2,... , where L is the number of layers.
[0086] Then the energy index of each sub-band is:
[0087] ;
[0088] in, is the energy index of the ith sub-band, N represents the total number of samples of the LVDT sensor response signal, represents the wavelet coefficient sequence of the ith sub-band, n is the index of the nth value in the wavelet coefficient sequence of the sub-band, Indicates the total number of sub-bands generated when the number of decomposition levels is L, where L is the number of decomposition levels.
[0089] The entropy of the sub-band energy index is calculated by calculating the entropy value of the sub-band energy index to obtain the sub-band energy entropy:
[0090] ;
[0091] Among them, H is the sub-band energy entropy, Indicates the total number of sub-bands generated when the number of decomposition layers is L, where L is the number of decomposition layers. is the energy index of the i-th sub-band.
[0092] The energy concentration index is calculated by combining the maximum value of the sub-band energy index and the sub-band energy entropy:
[0093] ;
[0094] in, is the energy concentration index, H is the sub-band energy entropy, Indicates the maximum value of the sub-band energy index, and max() is the maximum value function.
[0095] The energy concentration index, calculated by combining the maximum sub-band energy index and the sub-band energy entropy, effectively reflects the signal distribution across different frequency components. The maximum sub-band energy index represents the energy intensity of the LVDT sensor response signal within a specific frequency band and can reveal the significance of the disturbance within that frequency band. The sub-band energy entropy measures the uniformity of the energy distribution within that frequency band. Higher entropy values indicate a more dispersed signal energy distribution and a more complex system disturbance. Conversely, lower entropy values indicate a more concentrated energy distribution and a simpler system disturbance. By combining the maximum sub-band energy index and the sub-band energy entropy to calculate the energy concentration index, a comprehensive assessment of the impact and complexity of the disturbance source on the signal can be made. If a frequency band has a high energy index and a low energy entropy, the signal in that band is relatively concentrated and has a single frequency component with a clear disturbance signature. Conversely, a low energy index indicates that the signal is subject to multiple complex disturbances. The energy concentration index not only helps identify the primary disturbance source but also assesses signal stability, providing a more accurate basis for subsequent error correction and interference model construction.
[0096] Step S3: Obtain a sub-band peak factor by performing peak analysis on the wavelet coefficient sequence; calculate a sub-band comprehensive peak index by combining the sub-band peak factor and the sub-band energy index; and obtain an LVDT response signal characteristic by combining the sub-band comprehensive peak index and the energy concentration index.
[0097] The peak factor of the sub-band is obtained by performing peak analysis on the wavelet coefficient sequence of the LVDT sensor response signal sub-band. Perform wavelet reconstruction to obtain the reconstructed signal sequence of the sub-band , represents the reconstructed signal of the i-th sub-band.
[0098] Perform peak analysis on the reconstructed signal sequence of the i-th sub-band to obtain the sub-band peak factor:
[0099] ;
[0100] in, is the peak factor of the ith sub-band, represents the reconstructed signal sequence of the ith sub-band, N represents the total number of samples of the reconstructed signal sequence, and n is the index of the nth value in the wavelet coefficient sequence of the ith sub-band.
[0101] By combining the sub-band peak factor and the sub-band energy index, the sub-band comprehensive peak index is calculated:
[0102] ;
[0103] Among them, Q is the sub-band comprehensive peak index, L is the number of layers, i represents the index of the i-th sub-band, is the peak factor of the ith sub-band, is the energy index of the i-th sub-band.
[0104] It should be noted that the sub-band comprehensive peak index is calculated by combining the sub-band peak factor and the sub-band energy index. The sub-band peak factor reflects the instantaneous impact intensity of the signal in a specific frequency band, while the sub-band energy index reflects the contribution of the frequency band to the overall energy of the signal. The combination of the two can construct a composite evaluation index that has both feature sensitivity and frequency band importance. It can not only suppress the interference of accidental impacts in low-energy frequency bands through the energy index and avoid misjudging noise spikes as valid features, but also use the energy weight to enhance the impact feature expression of high-energy dominant frequency bands, significantly improving the ability to identify core fault features.
[0105] By combining the sub-band comprehensive peak index and energy concentration index, the LVDT response signal characteristic T is obtained, T=[ ,Q], where is the energy concentration index, and Q is the comprehensive peak index.
[0106] It should be noted that by combining the sub-band composite peak index and the energy concentration index, the LVDT sensor response signal is characterized. The sub-band composite peak index reflects the location and intensity of the main peaks within each frequency band, thereby capturing the main energy distribution of the signal within different frequency ranges. The energy concentration index measures the concentration of the signal energy distribution within a specific frequency band, revealing the local characteristics of the signal, particularly the concentration of high-energy areas. By combining the sub-band composite peak index and the energy concentration index, the composite peak index can identify significant features in the signal, such as strong interference or sudden changes, while the energy concentration index reveals the signal's stability and spectral distribution pattern. This combination not only improves the overall understanding of the signal's nature but also effectively distinguishes different types of signals and interference patterns, playing a vital role in subsequent interference identification, error prediction, and signal optimization.
[0107] Step S4: Clustering the LVDT response signal features using the KMEANS algorithm to obtain response signal clusters, and performing statistical analysis on the disturbance source parameters of each cluster in the response signal clusters to obtain the interference feature labels of the clusters.
[0108] The LVDT response signal features disturbed by different groups of disturbance source parameters are combined into an LVDT response signal feature set. The LVDT response signal feature set is Z-score standardized so that the mean of each feature is 0 and the variance is 1, avoiding the influence of magnitude differences on the clustering results.
[0109] The LVDT response signal feature set is clustered using the KMEANS algorithm. The optimal number of clusters is determined to be k by the elbow rule. The KMEANS algorithm is used to initialize the cluster centers. The specific steps are: randomly initialize k cluster centers and enter the iterative process. For each sample in the LVDT response signal feature set, the sample is assigned to the nearest cluster center based on the distance between its feature vector and the current cluster center. The Euclidean distance is usually used to measure the distance between the sample and the center of mass. All samples are assigned to a cluster based on the distance to the nearest center of mass. After the assignment is completed, the center of mass of each cluster is recalculated. The position of the cluster center is the average position of all samples in the cluster, and the updated center of mass becomes the reference for the next round of iteration. Continue iterating until the change in the cluster center is small enough or the preset number of iterations is reached.
[0110] After the KMEANS algorithm is iterated, the response signal clusters are obtained, and k clusters of the response signal clusters are obtained: , ,..., , represents the kth response signal cluster.
[0111] It should be noted that each cluster represents a class of LVDT sensor response signals with similar characteristics.
[0112] By performing statistical analysis on the disturbance source parameters in each cluster of the response signal cluster, the interference feature label of the cluster is obtained:
[0113] For each cluster in the response signal cluster, the disturbance source parameters corresponding to all samples in the cluster are extracted, including the original experimental setting parameters such as vibration frequency, amplitude, direction (such as X-axis or Z-axis), and disturbance type (sinusoidal or random pulse).
[0114] Frequency statistics are performed on the disturbance parameters of each cluster, and the distribution ratio of each parameter (frequency, amplitude, direction, and type) is calculated. Based on the statistical results, the dominant parameter combination in each cluster is determined. For example, if 90% of the samples in a cluster are "X-axis direction, 5Hz, sinusoidal vibration," the interference signature label for the response signal cluster is "X-5Hz-sine." If the parameter distribution is more dispersed, such as over a wide frequency range, the most frequently occurring parameters are combined. For example, if the most frequent direction in a cluster is the X-axis, the most frequent vibration is 10Hz, and the most frequent amplitude type is sinusoidal vibration, the interference signature label for the response signal cluster is "X-10-sine."
[0115] Finally, , ,..., , k clusters add corresponding interference feature labels: , ,..., , Represents the interference feature label of the k-th cluster.
[0116] Step S5: Based on the interference feature label, a sensor accuracy error prediction model corresponding to the interference feature label is constructed; the LVDT original measurement signal is collected in real time, the LVDT response signal feature of the LVDT original measurement signal is calculated, and the LVDT response signal feature is input into the response signal cluster to obtain the interference feature label of the LVDT original measurement signal; and the LVDT original measurement signal is input into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the LVDT signal error result.
[0117] According to the interference feature label, a sensor accuracy error prediction model corresponding to the interference feature label is constructed, and a set of sensor accuracy error prediction models for different interference types are constructed. Each model adopts the same network structure framework, using a residual enhanced convolutional cyclic hybrid network to take into account both local feature extraction capabilities and time series modeling capabilities. For each type of interference feature label, the corresponding LVDT sensor response signal and the standard displacement input are used as the input and output pairs of supervised learning to train and generate the corresponding sensor accuracy error prediction model. All models constitute an error prediction model library, and are accompanied by an interference feature label index. The structural design of the model library is scalable and combinable: when new interference types are discovered subsequently, new sub-models can be formed through additional training and dynamically mounted into the model library.
[0118] Interference feature label The corresponding sensor accuracy error prediction model structure includes: input layer, convolution module, fully connected regression layer, loop connection layer, and output layer.
[0119] The input layer receives the LVDT sensor response signal and standard displacement input.
[0120] It should be noted that the standard displacement input is a real displacement value obtained by a high-precision displacement sensor or a calibration device.
[0121] Convolution module: The first layer of convolution: uses a one-dimensional convolution operation, configures 64 convolution kernels with a width of 3, a stride of 1, and an activation function of ReLU. After the input passes through the convolution, a 64-channel feature map is generated to capture local fluctuations of the signal (such as pulses and harmonic components). Residual connection: A jump connection is introduced after the second layer of convolution, and the output of the first layer of convolution is directly added to the output of the second layer. The specific implementation is: If the dimensions of the input and output do not match, the number of input channels is adjusted through 1×1 convolution. The residual structure alleviates the gradient vanishing problem and enhances the stability of deep network training. Maximum pooling: The pooling window size is 2, the stride is 2, and the feature map length is compressed to , reducing computational complexity.
[0122] Recurrent Module: Bidirectional LSTM layer: This layer uses a bidirectional long short-term memory network with 32 hidden units in each direction to capture the temporal dependencies of the signal. For example, the forward LSTM learns historical information, while the backward LSTM learns future context, ultimately concatenating the bidirectional outputs.
[0123] Fully connected regression layer: Feature flattening, flattening the time series features output by the LSTM layer into a one-dimensional vector.
[0124] Fully connected layer: Features are mapped through a two-layer fully connected network. The first layer has 256 neurons (ReLU activation) and dropout (dropout rate 0.3) is added to prevent overfitting; the output layer has 1 linear neuron, which directly regresses the prediction error value Δy.
[0125] Output layer: The output layer directly generates error prediction values in millimeters, aligned with the sensor range. For example, the prediction error range can be set to Δy∈[−0.5,0.5]mm.
[0126] The loss function is:
[0127] ;
[0128] in, is the loss function of the sensor accuracy error prediction model, N represents the total number of signal sampling points, n represents the nth signal sampling point, It represents the error value between the predicted LVDT sensor response signal and the nth sampling point of the standard displacement. Indicates the error between the actual LVDT sensor response signal and the nth sampling point of the standard displacement.
[0129] Collect the LVDT raw measurement signal in real time and calculate the LVDT response signal characteristics. The calculation of the LVDT response signal characteristics is the same as step S2 to step S3. Input the LVDT response signal characteristics into the response signal cluster, assign the LVDT raw measurement signal to the nearest cluster, and obtain the interference feature label corresponding to the cluster.
[0130] Then, the original LVDT measurement signal is input into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the LVDT signal error result:
[0131] ;
[0132] in, It indicates the error value between the predicted LVDT original measurement signal input and the nth sampling point of the standard displacement. Indicates that the interference feature label is Sensor accuracy error prediction model, Represents the original measurement signal of the LVDT, and n represents the nth sampling point of the signal.
[0133] Step S6: By combining the LVDT response signal characteristics of the LVDT original measurement signal and the LVDT signal error result, a correction result of the LVDT signal is calculated to achieve accuracy correction of the LVDT sensor.
[0134] By combining the original measurement output of the LVDT and the signal error result of the LVDT, the correction result of the LVDT signal is obtained:
[0135] ;
[0136] in, Indicates the correction result of the nth sampling point of the LVDT signal, n represents the nth sampling point of the signal, Indicates the value of the nth sampling point of the original measurement output of the LVDT. It indicates the error value between the predicted LVDT original measurement signal input and the nth sampling point of the standard displacement. The interference characteristic label of the original LVDT measurement signal is And the energy concentration index in the response signal characteristics is The dynamic weight coefficient of is the interference feature label, is the energy concentration index of the original measurement output of the LVDT, is the attenuation factor, which controls the compensation amount along with the original measurement output of LVDT The decay rate.
[0137] It should be noted that The interference characteristic label of the original LVDT measurement signal is And the energy concentration index in the response signal characteristics is The dynamic weight coefficient of Indicates a strong dominant interference if A higher value indicates that the interference is clear and the energy is significant. It will be adjusted up to 1.2 to enhance the compensation and eliminate the systematic error. If the value is medium (energy is partially concentrated), Maintain a standard value (such as 1.0) to balance the correction strength and stability. Indicates weak distracting interference (such as background noise), even if Medium or low values (energy dispersion), It will be adjusted down (e.g. 0.8) to avoid amplifying noise due to overcompensation.
[0138] By combining the energy concentration index in the LVDT's raw measurement signal and its response signal characteristics with real-time error prediction, the system can dynamically identify interference types and quantify their impact on the signal, thereby achieving precise error compensation. By analyzing frequency band energy distribution and transient impact characteristics, it can distinguish between different interference sources such as periodic vibration and random noise, and adjust the compensation strategy accordingly to avoid over- or under-compensation problems caused by traditional linear correction. Secondly, the introduction of a nonlinear attenuation mechanism not only strengthens correction efforts under strong interference to eliminate systematic deviations, but also suppresses the risk of secondary distortion in high-amplitude signals, ensuring a stable signal dynamic range.
[0139] This paper proposes a machine learning-based LVDT sensor accuracy correction method. By integrating multi-level frequency band analysis, clustering modeling, and dynamic error prediction techniques, it achieves high-precision, real-time correction of sensor signals in complex disturbance environments. This method innovatively constructs composite features such as the energy concentration index and the integrated peak index. Combining KMEANS clustering with a residual-enhanced neural network model, it dynamically correlates signal characteristics with disturbance types, significantly improving the LVDT sensor's anti-interference capability and measurement accuracy in dynamic disturbance scenarios.
[0140] By combining the maximum value of the sub-band energy index and the sub-band energy entropy to calculate the energy concentration index, the concentration of the signal energy distribution and the complexity of the disturbance can be comprehensively quantified. This method not only accurately identifies the dominant disturbance frequency band, but also evaluates the uniformity of the energy distribution through entropy, thereby distinguishing between single interference and complex interference scenarios. For example, a high energy index combined with a low entropy value indicates that the signal is dominated by a single strong disturbance, while a low energy index combined with a high entropy value reflects complex multi-source interference. This provides a key basis for the targeted construction of the subsequent error model and effectively improves the robustness of disturbance feature extraction.
[0141] By combining the sub-band peak factor and sub-band energy index to calculate a comprehensive peak index, this approach addresses the vulnerability of transient impulse features to low-energy noise interference in traditional methods. The peak factor captures the instantaneous impulse strength of the signal within the band, while the energy index weights it, suppressing noise interference in non-dominant bands. For example, significant peaks in high-energy bands can be enhanced as key features, while random spikes in low-energy bands are weakened. This significantly improves the sensitivity and identification accuracy of core interference features (such as impulses and harmonic distortion), avoiding false positives and missed detections.
[0142] This paper achieves precise error compensation in dynamic disturbance environments by combining the response signal characteristics of the LVDT raw measurement signal with the real-time predicted signal error results. Its core advantage lies in: through dynamic weight coefficients and nonlinear attenuation factors, the system can adaptively adjust the compensation strength according to the interference type and energy distribution characteristics. This method strengthens the correction to eliminate systematic deviations under strong dominant interference, while suppressing the risk of overcompensation under weak dispersed interference. This not only solves the over-compensation or under-compensation problem of traditional linear correction, but also avoids secondary distortion of high-amplitude signals. Secondly, through frequency band energy analysis and cluster label recognition, this method accurately distinguishes multiple sources of interference such as periodic vibration and random noise, and optimizes the compensation strategy in a targeted manner, significantly improving the sensor's anti-interference ability under complex working conditions (such as multi-axis vibration and electromagnetic noise). Finally, through a closed-loop mechanism of real-time error prediction and dynamic correction, errors such as nonlinear distortion and zero drift are effectively eliminated, ensuring the high stability and measurement accuracy of the LVDT signal, and providing a highly reliable data foundation for scenarios such as intelligent manufacturing and precision control.
[0143] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include," "comprise," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations. The phrase "includes an element defined by..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.
[0144] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for LVDT sensor accuracy correction based on machine learning, characterized by: It includes the following steps: Step S1: By adding different disturbance sources to the LVDT sensor, an LVDT sensor disturbance dataset is obtained. The LVDT sensor disturbance dataset includes: the LVDT sensor response signal and the disturbance source parameters; Step S2: The LVDT sensor response signal is decomposed in frequency by the multi-level wavelet packet decomposition algorithm to obtain the wavelet coefficient sequence of the sub-bands of the LVDT sensor response signal, and the sub-band energy index is calculated through the wavelet coefficient sequence; by calculating the entropy value of the sub-band energy index, the sub-band energy entropy is obtained; by combining the maximum value of the sub-band energy index and the sub-band energy entropy, the energy concentration index is calculated; Step S3: By performing peak analysis on the wavelet coefficient sequence, the sub-band peak factor is obtained; by combining the sub-band peak factor and the sub-band energy index, the sub-band comprehensive peak index is calculated; by combining the sub-band comprehensive peak index and the energy concentration index, the LVDT response signal feature is obtained; Step S4: The LVDT response signal features are clustered by the KMEANS algorithm to obtain the response signal clustering clusters, and the disturbance source parameters of each clustering cluster in the response signal clustering clusters are statistically analyzed to obtain the interference feature labels of the clustering clusters; Step S5: According to the interference feature labels, a sensor accuracy error prediction model corresponding to the interference feature labels is constructed; the LVDT original measurement signal is collected in real time, the LVDT response signal features of the LVDT original measurement signal are calculated, and the LVDT response signal features are input into the response signal clustering clusters to obtain the interference feature labels of the LVDT original measurement signal; then the LVDT original measurement signal is input into the sensor accuracy error prediction model corresponding to the interference feature labels to obtain the signal error result of the LVDT; Step S6: By combining the LVDT response signal features of the LVDT original measurement signal and the signal error result of the LVDT, the correction result of the LVDT signal is calculated to achieve the accuracy correction of the LVDT sensor; The step of calculating the sub-band energy entropy by calculating the entropy value of the sub-band energy index includes the following steps: ; Among them, H is the sub-band energy entropy, Indicates the total number of sub-bands generated when the number of decomposition layers is L, where L is the number of decomposition layers. is the energy index of the i-th sub-band; The step of calculating the energy concentration index by combining the maximum value of the sub-band energy index and the sub-band energy entropy includes the following steps: The energy concentration index is calculated by combining the maximum value of the sub-band energy index and the sub-band energy entropy: ; in, is the energy concentration index, H is the sub-band energy entropy, Indicates the maximum value of the sub-band energy index, and max() is the maximum value function.
2. The LVDT sensor accuracy correction method based on machine learning according to claim 1, characterized in that: The step of decomposing the LVDT sensor response signal in frequency by the multi-level wavelet packet decomposition algorithm to obtain the wavelet coefficient sequence of the sub-bands of the LVDT sensor response signal and calculating the sub-band energy index through the wavelet coefficient sequence includes the following specific steps: Through the low-pass filtering and high-pass filtering of the multi-level wavelet transform, the LVDT sensor response signal x[n] is used as the original input of the 0th layer of the multi-level wavelet transform, where 0 < n < N, and N is the total number of sampling points of the LVDT sensor response signal; The low-frequency coefficient of the Lth layer decomposition is: ; Indicates the value of the low-frequency coefficient at the jth position after the Lth layer decomposition of the LVDT sensor response signal, where j is the position index of the low-frequency coefficient after the Lth layer decomposition, 0 j< , Indicates the nth sampling point of the LVDT sensor response signal, N is the total number of sampling points of the LVDT sensor response signal, represents the low-pass filter coefficient, Represents the low-frequency coefficient of the L-1 layer; The high-frequency coefficient of the Lth layer decomposition is: ; Indicates the value of the high-frequency coefficient at the jth position after the Lth layer decomposition of the LVDT sensor response signal, where j is the position index of the high-frequency coefficient after the Lth layer decomposition, 0 j< , Indicates the nth sampling point of the LVDT sensor response signal, N is the total number of sampling points of the LVDT sensor response signal, represents the high-pass filter coefficient, Represents the high-frequency coefficient of the L-1 layer; Continue to decompose the coefficients of each layer, and finally get wavelet coefficient sequence of sub-bands ={ , },i=1,2,... , where L is the number of layers; Then the energy index of each sub-band is: ; in, is the energy index of the ith sub-band, N is the total number of sampling points of the LVDT sensor response signal, represents the wavelet coefficient sequence of the ith sub-band, n is the index of the nth value in the wavelet coefficient sequence of the sub-band, Indicates the total number of sub-bands generated when the number of decomposition levels is L, where L is the number of decomposition levels.
3. The LVDT sensor accuracy correction method based on machine learning according to claim 2, characterized in that: The method of obtaining the sub-band peak factor by performing peak analysis on the wavelet coefficient sequence includes the following specific steps: The peak value of the sub-band is obtained by performing peak analysis on the wavelet coefficient sequence of the LVDT sensor response signal sub-band, and the wavelet coefficient sequence of each sub-band is Perform wavelet reconstruction to obtain the reconstructed signal sequence of the sub-band , represents the reconstructed signal of the i-th sub-band; Perform peak analysis on the reconstructed signal sequence of the i-th sub-band to obtain the sub-band peak factor: ; in, is the peak factor of the ith sub-band, represents the reconstructed signal sequence of the i-th sub-band, N represents the total number of sampling points of the reconstructed signal sequence, and n is the index of the n-th value in the wavelet coefficient sequence of the i-th sub-band.
4. The LVDT sensor accuracy correction method based on machine learning according to claim 3, characterized in that: The step of calculating the sub-band comprehensive peak index by combining the sub-band peak factor and the sub-band energy index comprises the following specific steps: By combining the sub-band peak factor and the sub-band energy index, the sub-band comprehensive peak index is calculated: ; Among them, Q is the sub-band comprehensive peak index, L is the number of layers, i represents the index of the i-th sub-band, is the peak factor of the ith sub-band, is the energy index of the i-th sub-band.
5. The LVDT sensor accuracy correction method based on machine learning according to claim 4, characterized in that: The method of obtaining the LVDT response signal characteristics by combining the sub-band comprehensive peak index and the energy concentration index includes the following specific steps: By combining the sub-band comprehensive peak index and energy concentration index, the LVDT response signal characteristic T is obtained, T=[ ,Q], where is the energy concentration index, and Q is the comprehensive peak index.
6. The LVDT sensor accuracy correction method based on machine learning according to claim 5, characterized in that: The construction of the sensor accuracy error prediction model corresponding to the interference feature label includes the following specific steps: Interference feature label The corresponding sensor accuracy error prediction model structure includes: input layer, convolution module, fully connected regression layer, fully connected layer, and output layer; The input layer receives the LVDT sensor response signal and standard displacement input; Convolution module: First layer convolution: uses one-dimensional convolution operation, configures 64 convolution kernels with a width of 3, a stride of 1, and an activation function of ReLU. After the input passes through the convolution, a 64-channel feature map is generated. Residual connection: After the second layer of convolution, a skip connection is introduced to directly add the output of the first layer of convolution to the output of the second layer; Recurrent module: Bidirectional LSTM layer: uses a bidirectional long short-term memory network with 32 hidden units in each direction to capture the temporal dependencies of the signal. Fully connected regression layer: flattens the temporal features output by the LSTM layer into a one-dimensional vector. Fully connected layer: Mapping features through a two-layer fully connected network. The first layer has 256 neurons, ReLU activation function, and Dropout is added to prevent overfitting. The output layer is a linear neuron that directly regresses the prediction error value Δy. Output layer: The output layer directly generates error prediction values in millimeters, which are aligned with the sensor range; The loss function is: ; in, is the loss function of the sensor accuracy error prediction model, N represents the total number of signal sampling points, n represents the nth signal sampling point, It represents the error value between the predicted LVDT sensor response signal and the nth sampling point of the standard displacement. Indicates the error between the actual LVDT sensor response signal and the nth sampling point of the standard displacement.
7. The LVDT sensor accuracy correction method based on machine learning according to claim 6, characterized in that: The step of inputting the LVDT original measurement signal into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the LVDT signal error result includes the following specific steps: Input the LVDT original measurement signal into the sensor accuracy error prediction model corresponding to the interference feature label to obtain the LVDT signal error result: ; in, It indicates the error value between the predicted LVDT original measurement signal input and the nth sampling point of the standard displacement. Indicates that the interference feature label is Sensor accuracy error prediction model, Represents the original measurement signal of the LVDT, and n represents the nth sampling point of the signal.
8. The LVDT sensor accuracy correction method based on machine learning according to claim 7, characterized in that: The method of calculating the correction result of the LVDT signal by combining the LVDT response signal characteristics of the LVDT original measurement signal and the LVDT signal error result includes the following specific steps: By combining the original measurement output of the LVDT and the signal error result of the LVDT, the correction result of the LVDT signal is obtained: ; in, Indicates the correction result of the nth sampling point of the LVDT signal, n represents the nth sampling point of the signal, Indicates the value of the nth sampling point of the original measurement output of the LVDT. It indicates the error value between the predicted LVDT original measurement signal input and the nth sampling point of the standard displacement. The interference characteristic label of the original LVDT measurement signal is And the energy concentration index in the response signal characteristics is The dynamic weight coefficient of is the interference feature label, is the energy concentration index of the original measurement output of the LVDT, is the attenuation factor, which controls the compensation amount along with the original measurement output of LVDT The decay rate.
Citation Information
Patent Citations
Defect detection method and system for integrated circuit manufacturing
CN119986338A
Power supply switching control optimization method and system
CN120049599A