A calibration method for the boundary region of a displacement sensor
Through multi-scale boundary feature extraction and dynamic segmented mixed error modeling, combined with intelligent iterative calibration processing, the boundary area compensation function is generated, which solves the problem of low measurement accuracy of the displacement sensor in the boundary area, and achieves improvement in accuracy and reliability.
Patent Information
- Application Number
- CN202510389084.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-03-31
AI Technical Summary
The existing displacement sensor calibration methods have technical bottlenecks such as large nonlinear errors and complex coupling effects in the boundary region (range 0-5% and 95-100%), resulting in low measurement accuracy and poor reliability.
Multi-scale boundary feature extraction and analysis are used to construct a dynamic segmented mixed error model, implement intelligent iterative calibration processing, generate boundary area compensation function and calibration parameters, and are used to calibrate the boundary area of the displacement sensor.
By accurately capturing the complex nonlinear characteristics of the boundary region and adaptive model optimization, the measurement accuracy of the displacement sensor in the boundary region is significantly improved, and product quality and reliability are improved.
Smart Images

Figure CN119884725B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of regional calibration, and in particular, to a calibration method for the boundary region of a displacement sensor. Background Art
[0002] A displacement sensor is a key device for measuring linear or angular displacement in fields such as automatic control, precision manufacturing, and scientific research. Its calibration accuracy directly affects the reliability and quality of downstream applications. With the development of modern industry towards intelligence and high precision, higher requirements are put forward for the accuracy of displacement sensors. Especially in high-end manufacturing fields such as precision instrument manufacturing, aerospace, and semiconductor processing, sub-micron or even nano-level measurement accuracy has become the norm. In these application scenarios, the calibration method of the displacement sensor not only relates to the accuracy of the measurement result, but also determines the performance upper limit and reliability of the overall system. Therefore, developing a high-precision and intelligent displacement sensor calibration method has important theoretical and practical value.
[0003] Currently, displacement sensor calibration technology mainly relies on uniformly distributed calibration points and a unified processing method within the full range. Traditional calibration usually uses mathematical models such as polynomial fitting or piecewise linear interpolation to process calibration data. These methods use the same mathematical model structure and parameter optimization strategy throughout the measurement range. In terms of reference standards, most calibration systems rely on a single reference standard (such as a laser interferometer or a high-precision grating scale), and usually use simple statistical methods to evaluate uncertainty. Environmental impact compensation is mostly based on a linear correction model, mainly considering the influence of temperature on the measurement result, while ignoring the combined effects of other environmental factors such as humidity, air pressure, and vibration. In data processing algorithms, existing technologies mostly use a globally unified parameter optimization method, such as the least squares method or the gradient descent method, lacking targeted processing of the error characteristics of specific regions.
[0004] Traditional displacement sensor calibration methods have obvious technical bottlenecks in the boundary region (i.e., the 0 - 5% and 95 - 100% ranges of the full scale). These include large non-linear errors and complex coupling effects. These technical problems are particularly prominent in high-precision measurement applications, severely restricting the accuracy and reliability of displacement sensors in the boundary region. Summary of the Invention
[0005] The object of the invention is to provide a calibration method for the boundary region of a displacement sensor to solve the above problems existing in the prior art.
[0006] Technical solution: A calibration method for the boundary region of a displacement sensor includes the following steps:
[0007] Obtain the original measurement data set of the displacement sensor, perform multi-scale boundary feature extraction and analysis, and obtain multi-scale feature vectors and boundary feature recognition fingerprints; wherein the original measurement data set includes measurement points in the boundary region and the intermediate region.
[0008] Based on the multi-scale feature vectors and boundary feature recognition fingerprints, construct a dynamic segmented hybrid error model to obtain a balanced error model and interval uncertainty.
[0009] Based on the balanced error model and interval uncertainty, implement intelligent iterative calibration processing to obtain a convergence optimization model.
[0010] Based on the convergence optimization model, generate a boundary region compensation function and calibration parameters to obtain a calibration parameter package for calibrating the boundary region of the displacement sensor.
[0011] Advantageous effects: By establishing a complete framework for the boundary region calibration method, the present invention solves the core problem of low measurement accuracy in the boundary region of the displacement sensor; accurately captures the complex non-linear characteristics of the boundary region, and compensates specifically through an adaptive model and iterative optimization, so that the improvement in accuracy is directly transformed into the improvement of product quality and reliability, and solves the long-standing blind spot problem in the boundary region of industrial measurement. Description of the Drawings
[0012] Figure 1 It is a step flow chart of a method for calibrating the boundary region of a displacement sensor provided by an embodiment of the present application.
[0013] Figure 2 It is a step flow chart of obtaining multi-scale feature vectors and boundary feature recognition fingerprints provided by an embodiment of the present application.
[0014] Figure 3 It is a step flow chart of calculating the scale correlation matrix provided by an embodiment of the present application.
[0015] Figure 4 It is a step flow chart of obtaining a balanced error model and interval uncertainty provided by an embodiment of the present application. Detailed Embodiments
[0016] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0017] It should be specifically noted that, for clearly showing the step flow of the present application, serial numbers are marked for each step in the specification. These serial numbers are only for the convenience of description and do not limit the execution order of the steps. In actual operation, according to the technical requirements of specific implementation scenarios, each step can be executed in a different order from that shown in the specification, and in some cases, parallel processing between steps can also be achieved.
[0018] The present invention will be described below in conjunction with preferred implementation steps. As Figure 1 shown, a calibration method for the boundary region of a displacement sensor includes the following steps:
[0019] S1. Obtain the original measurement data set of the displacement sensor, perform multi-scale boundary feature extraction and analysis, and obtain a multi-scale feature vector and a boundary feature recognition fingerprint;
[0020] Specifically, the original measurement data set of the displacement sensor includes measurement points in the boundary region and the middle region. For example, when monitoring the road surface condition of a highway, the displacement sensor is arranged at key positions on this highway. The boundary region is the part where the road surface edge contacts the guardrail, and the middle region is the main part of the road surface. Observe these data from different angles or ranges to discover the characteristics of the boundary. For example, at the macroscopic scale, analyze whether there is a tendency of the overall road surface to sink; at the microscopic scale, detect whether there are tiny cracks or protrusions in certain areas. Organize these observed characteristics to form a multi-scale feature vector, which is a digital description of these characteristics. For example, use data to represent the position and size of the cracks. The boundary feature recognition fingerprint is used to mark and distinguish which regions have particularly significant features, such as cracks at the edge or depressions in the middle region.
[0021] S2. Based on the multi-scale feature vector and the boundary feature recognition fingerprint, construct a dynamic segmented hybrid error model, and obtain a balanced error model and an interval uncertainty;
[0022] Specifically, in order to better describe the error distribution in the data, constructing a dynamic segmented hybrid error model processes the overall data in segments and uses different error models to describe according to the characteristics of different regions. Balance the errors through the dynamic model to generate an interval range that can reflect the credibility of the data.
[0023] S3. Based on the balanced error model and the interval uncertainty, implement intelligent iterative calibration processing to obtain a convergent optimization model;
[0024] Specifically, according to the balance error model and interval uncertainty, multiple adjustments are made through an intelligent iterative process. This process can be imagined as a self-learning loop, where each iteration improves based on the previous results, gradually narrowing the error range. After multiple intelligent iterations, the system will tend to be stable, that is, reach "convergence", and finally output a convergence optimization model.
[0025] S4. Based on the convergence optimization model, generate a boundary region compensation function and calibration parameters to obtain a calibration parameter package for calibrating the boundary region of the displacement sensor.
[0026] Specifically, through the convergence optimization model, two key elements are created, the compensation function and the calibration parameters; the compensation function can be used to correct the deviation of the displacement sensor in the boundary region, and the calibration parameters are a set of specific adjustment values. Finally, a calibration parameter package is obtained, which is a complete correction scheme. This calibration parameter package will be used for calibrating the boundary region of the displacement sensor to make the measurement of the sensor in the boundary region more accurate.
[0027] The boundary region usually exhibits more complex non-linear error characteristics, which are difficult to be fully characterized under the traditional uniform distribution calibration point strategy, resulting in reduced calibration accuracy. In this embodiment, by establishing a complete boundary region calibration method framework, the organic combination of multi-scale feature extraction, dynamic segmented hybrid error modeling, intelligent iterative calibration processing, and compensation function generation is realized, and the core problem of low measurement accuracy in the boundary region of the displacement sensor is solved. The traditional calibration method generally has an error of 15 - 30 μm in the boundary region, while this embodiment controls the error within the range of 2 - 5 μm, improving the measurement accuracy by more than 80%. This accuracy improvement stems from the ability to accurately capture the complex non-linear characteristics of the boundary region and perform targeted compensation through an adaptive model and iterative optimization. For fields such as high-precision automated manufacturing and precision instrument calibration, this accuracy improvement directly translates into improved product quality and reliability, solving the long-standing "blind spot" problem in industrial measurement in the boundary region.
[0028] As Figure 2 shown, according to one aspect of the present application, the steps of performing multi-scale boundary feature extraction and analysis to obtain a multi-scale feature vector and a boundary feature recognition fingerprint include:
[0029] S11. Obtain the original measurement data set and perform enhanced sampling in the boundary region to obtain enhanced data;
[0030] S12. Apply local differential transformation to the original measurement data set and the enhanced data to obtain a boundary feature spectrogram;
[0031] S13. Extract features at different scales from the boundary feature spectrogram and combine them to form a multi-scale feature vector;
[0032] S14. Calculate the scale correlation matrix based on the multi-scale feature vectors to quantify the inherent correlation between different scale features.
[0033] S15. Use the multi-scale feature vectors and the scale correlation matrix to comparatively analyze the feature differences between the boundary region and the middle region, and construct a boundary feature recognition fingerprint.
[0034] Specifically, obtain the original measurement data set D_raw of the displacement sensor, which includes the measurement points in the boundary region (0 - 5% and 95 - 100% of the range) and the middle region, and record the theoretical position value P_t and the actual measurement value P_m of each measurement point. Calculate the boundary region density value B_density, determine the minimum measurement point density in the boundary region according to the sensor type and accuracy level, and adopt an automatic density enhancement strategy to obtain high-density enhanced data D_enhanced in the boundary region. Apply local differential transformation to the original measurement data set D_raw and the enhanced data D_enhanced to map the data to the frequency-space joint domain, and obtain the boundary feature spectrogram S_boundary, which is used to capture the high-frequency micro-fluctuations ignored by traditional methods. Extract the multi-scale feature vectors F_multi from the boundary feature spectrogram S_boundary, including: extract the micro-features F_micro at a small scale (0.1% - 0.5% of the range), which characterize the small non-linearity of the sensor response; extract the local features F_local at a medium scale (0.5% - 2% of the range), which characterize the systematic error in the local region; extract the macro-features F_macro at a large scale (2% - 5% of the range), which characterize the overall boundary effect. Based on the multi-scale feature vectors F_multi, calculate the scale correlation matrix R_scale of the boundary region to quantify the inherent correlation between different scale features, and discover the cross-scale coupling effect ignored in traditional methods through this matrix. Compare and analyze the feature differences between the boundary region and the middle region, and construct a boundary feature recognition fingerprint B_fingerprint, which is used to accurately locate the starting point and change gradient of the boundary effect during subsequent modeling.
[0035] This embodiment improves the ability to capture the micro-changes in the boundary region. In practical applications, conventional sampling can only obtain 3 - 5 effective data points at the first 0.5% of the range in the boundary region, while this embodiment can obtain 15 - 20 high-quality data points, increasing the information capture density by 300%. The local differential transformation maps the data to the frequency-space joint domain, enabling the system to distinguish high-frequency micro-fluctuations with an amplitude of 0.1 - 0.2 μm that cannot be recognized by traditional methods. These high-density and high-quality feature data provide a solid foundation for subsequent modeling. Especially for sensors such as grating scales and magnetic grating scales that have high-frequency non-linear errors in the boundary region, important information ignored by traditional methods is captured, directly leading to a significant improvement in calibration accuracy.
[0036] According to one aspect of the present application, the steps of obtaining a boundary feature spectrogram and forming a multi-scale feature vector include: mapping the original measurement data set and the enhanced data to the frequency space to obtain a frequency distribution diagram; performing local feature enhancement processing on the frequency distribution diagram to obtain an enhanced spectrum; performing spatial correlation processing based on the enhanced spectrum to form a boundary feature spectrogram; extracting microscopic features at a small scale, local features at a medium scale, and macroscopic features at a large scale from the boundary feature spectrogram; and fusing the microscopic features, local features, and macroscopic features to form a multi-scale feature vector.
[0037] Specifically, mapping the original measurement data set and the enhanced data to the frequency space to obtain a frequency distribution diagram F_distribution: applying a sliding window Fourier transform STFT to the original data, with the window size being 2% of the boundary region; the window sliding step size being 0.2% of the boundary region; generating a time-frequency joint distribution diagram to characterize the frequency response characteristics at different positions. Performing local feature enhancement processing on the frequency distribution diagram F_distribution to obtain an enhanced spectrum F_enhanced: applying an adaptive band filter to enhance the frequency components unique to the boundary region; performing contrast enhancement to highlight the local features of the frequency distribution; applying a peak detection algorithm to identify the characteristic frequency points. Performing spatial correlation processing based on the enhanced spectrum F_enhanced to form a boundary feature spectrogram S_boundary: calculating the spatial autocorrelation function R_spatial(Δp) of the spectrum to characterize the spatial correlation of the spectrum features; constructing a spatial-frequency joint feature matrix J_matrix, where the element J(p, f) represents the enhanced eigenvalue of the frequency f at the position p; applying principal component analysis for dimensionality reduction to extract the main spatial-frequency modes; and reconstructing to form the boundary feature spectrogram S_boundary, retaining the main spatial-frequency coupling features. Extracting microscopic features at a small scale, local features at a medium scale, and macroscopic features at a large scale from the boundary feature spectrogram S_boundary. Fusing the microscopic features, local features, and macroscopic features to form a multi-scale feature vector.
[0038] In this embodiment, through the construction of boundary feature spectrograms and the formation technology of multi-scale feature vectors, the full-spectrum analysis of the complex characteristics of the boundary region is realized. Experiments have proved that this embodiment can capture the characteristics of three frequency bands, namely low-frequency system errors (≤1 Hz), intermediate-frequency interference (1 - 10 Hz), and high-frequency noise (>10 Hz) simultaneously, forming a complete "error fingerprint" of the boundary region. Traditional methods often only focus on a specific frequency band, resulting in incomplete calibration. For example, in the tested linear displacement sensor, the traditional method missed the fluctuation interference with an amplitude of 1.2 μm in the range of 2 - 5 Hz, while this embodiment successfully identified and compensated it later, reducing the standard deviation of the error in the boundary region by 42%. This embodiment can specifically process errors from different sources and with different characteristics, solving the problem of calibration blind spots caused by traditional single-frequency band analysis.
[0039] The error characteristics of the boundary region often show a multi-scale structure, including error components at the micro, local, and macro levels. There are complex coupling relationships between these error components at different scales, and it is difficult for traditional single-scale analysis methods to capture this cross-scale coupling effect. Therefore, as Figure 3 shown, according to one aspect of the present application, the steps of calculating the scale correlation matrix include:
[0040] S141. Decompose the multi-scale feature vector into three sub-vectors: micro feature, local feature, and macro feature;
[0041] S142. Construct a feature mapping space, project the three sub-vectors into the same reference coordinate system, and obtain the standardized micro feature, standardized local feature, and standardized macro feature;
[0042] S143. Use the sliding window technique to calculate the cross-correlation functions between the standardized micro feature, standardized local feature, and standardized macro feature, and obtain a set of cross-correlation vectors;
[0043] S144. Based on the set of cross-correlation vectors, construct a cross-correlation tensor representing the correlation relationships between different scales and positions, and perform singular value decomposition to extract cross-scale patterns;
[0044] S145. Based on the cross-scale patterns, construct a scale correlation matrix to quantify the overall correlation strength between different-scale features; calculate the eigenvalues and eigenvectors of the scale correlation matrix to obtain the correlation eigenvectors used to characterize the dominant patterns of cross-scale coupling within the boundary region.
[0045] Specifically, the multi-scale feature vector F_multi is received and decomposed into three sub-vectors: the micro feature F_micro, the local feature F_local, and the macro feature F_macro. A feature mapping space M_space is constructed, and the feature vectors of the three scales are projected onto the same reference coordinate system: a scale magnification transformation is applied to the micro feature F_micro to obtain the standardized micro feature F_micro_std; a scale reduction transformation is applied to the macro feature F_macro to obtain the standardized macro feature F_macro_std; the local feature F_local is centered to obtain the standardized local feature F_local_std. The cross-correlation function C_cross between the features of the three scales is calculated. Different from the traditional method that only calculates the simple correlation coefficient, the sliding window technique is adopted here: the window width is set to 1% of the boundary region; the window is slid within the boundary region with a step size of 0.1%; the cross-correlation values of the features of the three scales are calculated at each window position; a set of cross-correlation vectors C_vectors related to the position is obtained. Based on the set of cross-correlation vectors C_vectors, a cross-correlation tensor T_correlation is constructed. This is a three-dimensional data structure, and each element T(i, j, k) represents the correlation coefficient between scale i and scale j at position k. The singular value decomposition is performed on the cross-correlation tensor T_correlation to extract the main cross-scale modes P_modes, and these modes reveal the structured correlation patterns between the errors of different scales. Based on the cross-scale modes P_modes, a scale correlation matrix R_scale is constructed. Each element R(i, j) in the matrix quantifies the overall correlation strength between scale i and scale j, while retaining the position correlation information. Different from the traditional correlation analysis that only focuses on the features of the same scale or uses the global average correlation value, this matrix captures the complete correlation structure across scales and related to positions. The eigenvalues and eigenvectors of the scale correlation matrix R_scale are calculated to obtain the correlation eigenvector E_relation, which is used to characterize the dominant mode of cross-scale coupling within the boundary region.
[0046] This embodiment breaks through the limitation of the traditional method that regards the errors of different scales as independent components and quantifies the cross-scale coupling relationship. Experimental data shows that in the boundary region of the tested optical ruler sensor, the correlation coefficient between the micro-scale and macro-scale features is as high as 0.72, indicating that they are not independent but interact with each other. By extracting the correlation eigenvector, the system can identify and describe this cross-scale coupling mode, such as the synchronization between the micro-displacement pulse and the macro-nonlinear drift, which cannot be discovered by the traditional method. In actual calibration, after considering the cross-scale coupling effect, the peak error within the first 1% range of the full scale in the boundary region is reduced by 62%, and the root mean square error is reduced by 47%. This embodiment provides key information for accurate modeling and solves the problem of model distortion caused by ignoring cross-scale coupling in the traditional method.
[0047] According to another aspect of the present application, it further includes step S16 of calculating a scale correlation transformation index T_transform based on the multi-scale feature vector F_multi and the scale correlation matrix R_scale. Specifically:
[0048] S161: Calculate the eigenvalue decomposition of the scale correlation matrix R_scale to obtain the main eigenvalue λ_main and the corresponding eigenvector v_main;
[0049] S162: Construct a transformation mapping function M_transform: M_transform(p) = Σ[λ_i * v_i(p)], where p is a position point and i is an eigenvalue index;
[0050] S163: Apply the transformation mapping function M_transform to perform a projection transformation on the multi-scale feature vector F_multi to obtain an enhanced feature vector F_enhanced;
[0051] S164: Calculate a feature gradient vector G_feature based on the enhanced feature vector F_enhanced and the boundary feature recognition fingerprint B_fingerprint;
[0052] S165: Set an adaptive threshold T_adaptive = α * mean(|G_feature|) + β * std(G_feature) for subsequent critical turning point recognition.
[0053] Existing unified mathematical models cannot simultaneously adapt to the high-frequency micro-fluctuations in the boundary region and the stable characteristics in the middle region. Especially when using polynomial fitting, in order to avoid the Runge phenomenon's impact on the middle region, the fitting accuracy of the boundary region has to be sacrificed. Therefore, as Figure 4 shown, according to one aspect of the present application, the steps of constructing a dynamic piecewise hybrid error model to obtain a balanced error model and interval uncertainty include:
[0054] S21: Based on the multi-scale feature vector and the boundary feature recognition fingerprint, identify the set of critical turning points in the boundary region and divide the boundary region into a predetermined number of sub-intervals accordingly;
[0055] S22: Construct specific basis functions for each sub-interval to obtain an adaptive basis function library;
[0056] S23: Decompose the error response characteristics of the boundary region into multi-modal components according to the set of critical turning points, including a reference component, a system component, a random component, and a coupling component;
[0057] S24. Construct a dynamic piecewise hybrid error model based on the adaptive basis function library and multi-modal components; introduce a model complexity penalty factor into the dynamic piecewise hybrid error model to obtain a balanced error model.
[0058] S25. Calculate the interval uncertainty of the balanced error model and assign uncertainty evaluation values to each sub-interval of the model.
[0059] Specifically, based on the multi-scale feature vector F_multi and the boundary feature recognition fingerprint B_fingerprint, identify the set of key turning points T_points within the boundary region. These points divide the boundary region into multiple sub-intervals, each with relatively consistent error characteristics. Design a specific basis function set for each sub-interval and construct an adaptive basis function library B_functions: for the high-frequency micro-fluctuation interval, construct a wavelet basis function B_wavelet; for the intermediate-frequency transition interval, construct a fractional polynomial basis function B_fractional; for the low-frequency systematic error interval, construct an exponential decay basis function B_exponential. According to the set of key turning points T_points, decompose the error response characteristics of the boundary region into multi-modal components C_components, including: a reference component C_base, which reflects the basic linear response of the measurement system; a systematic component C_system, which reflects the inherent systematic deviation of the sensor; a random component C_random, which reflects the random fluctuations during the measurement process; and a coupling component C_coupling, which reflects the mutual interference between different error sources. Based on the adaptive basis function library B_functions and the multi-modal components C_components, construct a dynamic piecewise hybrid error model M_error, which can automatically select the optimal basis function combination in different sub-intervals to achieve an accurate description of the error characteristics. Introduce a model complexity penalty factor P_complexity to automatically balance the fitting accuracy and complexity of the model, avoid overfitting problems, and obtain an optimized balanced error model M_balanced. Calculate the interval uncertainty U_interval of the balanced error model M_balanced and assign uncertainty evaluation values to each sub-interval of the model for precision control in subsequent iterative calibration.
[0060] In this embodiment, by identifying key turning points and decomposing multi-modal components, the problem that a unified model is difficult to adapt to the complex characteristics of boundary regions is solved. Traditional calibration usually uses a global high-order polynomial model, which is prone to the "Runge phenomenon" in boundary regions, resulting in coexistence of overfitting and underfitting. The key turning points identified in this embodiment can accurately capture the changes in error characteristics. For example, in the tested sensors, the characteristic mutation points located at positions such as 2.5 mm and 7.5 mm are automatically identified, and these points are usually caused by the design and manufacturing characteristics of the sensors. After interval division based on these turning points, the average reduction of the fitting residual is 78%, avoiding the severe fluctuation problem of the global model in the boundary region. At the same time, the interval uncertainty evaluation provides an accurate confidence level index for subsequent optimization, enabling calibration resources to be more effectively allocated to high-uncertainty regions and improving the overall calibration efficiency.
[0061] According to one aspect of the present application, the steps of constructing specific basis functions for each sub-interval to obtain an adaptive basis function library include:
[0062] Perform characteristic analysis on the sub-intervals of the boundary region according to the set of key turning points to obtain interval characteristic classifications, including high-frequency micro-fluctuation intervals, medium-frequency transition intervals, and low-frequency system error intervals;
[0063] For high-frequency micro-fluctuation intervals, construct wavelet basis functions; for medium-frequency transition intervals, construct fractional polynomial basis functions; for low-frequency system error intervals, construct exponential decay basis functions;
[0064] Optimize the parameters of the wavelet basis functions, fractional polynomial basis functions, and exponential decay basis functions to make them most suitable for the error characteristics of the corresponding intervals to obtain an optimized set of basis functions; integrate the optimized set of basis functions into an adaptive basis function library.
[0065] In this embodiment, specific basis functions are designed for sub-intervals with different characteristics, solving the problem that a single basis function cannot adapt to different error characteristics simultaneously. In the experiment, after using wavelet basis functions in the high-frequency micro-fluctuation interval (0 - 2.5 mm), the fitting residual is reduced by 65%; after using fractional polynomial basis functions in the medium-frequency transition interval (7.5 - 15 mm), the fitting residual is reduced by 57%; after using exponential decay basis functions in the low-frequency system error interval (26 - 42 mm), the fitting residual is reduced by 42%. This "tailored" basis function design method enables the model to accurately match the error characteristics of different intervals, improving the expression ability of the model. Compared with the traditional unified polynomial model, the adaptive basis function library improves the fitting accuracy by an average of 53% with the same number of parameters, and at the same time avoids the instability of the high-order polynomial model, solving the problem of model adaptability that has long troubled the calibration of displacement sensors.
[0066] According to one aspect of the present application, the steps of decomposing the error response characteristics of the boundary region into multi-modal components include:
[0067] Perform error response analysis on the boundary region according to the set of key turning points to obtain error response characteristics; extract a reference component reflecting the basic linear response of the measurement system from the error response characteristics; combine the error response characteristics and the reference component to extract a system component reflecting the inherent system deviation of the sensor; based on the error response characteristics, the reference component and the system component, extract a random component reflecting the random fluctuations during the measurement process; analyze the interaction between the reference component, the system component and the random component to extract a coupling component reflecting the mutual interference of different error sources; integrate the reference component, the system component, the random component and the coupling component into a multi-modal component.
[0068] In this embodiment, the boundary region error is decomposed into a reference component, a system component, a random component and a coupling component, realizing the accurate identification and separation of error sources. Traditional calibration methods usually regard the error as a single source, resulting in incomplete compensation. In this embodiment, a system component with an average amplitude of 0.012 mm, a random component with a standard deviation of 0.003 mm and a coupling component with a maximum amplitude of 0.005 mm are successfully separated in the test sensor. This embodiment can adopt different compensation strategies for different error sources: perform deterministic compensation on the system component, perform statistical noise reduction on the random component, and perform cross-influence compensation on the coupling component. Experiments prove that after multi-modal decomposition, the calibration effect has a 65% improvement in stability and a 47% improvement in anti-interference ability within the temperature change range of ±10°C. This embodiment provides a basis for highly robust calibration and solves the problem of unstable calibration effect of traditional methods in complex environments.
[0069] According to another aspect of the present application, step S21 can also be: based on the enhanced feature vector F_enhanced, the feature gradient vector G_feature and the adaptive threshold T_adaptive, identify the set of key turning points T_points within the boundary region. Specifically:
[0070] S211. Calculate the set of local extreme points P_extrema of the feature gradient vector G_feature;
[0071] S212. Screen the valid extreme points based on the adaptive threshold T_adaptive to form a candidate turning point set P_candidates;
[0072] S213. Combine the spatial distribution characteristics of the boundary feature recognition fingerprint B_fingerprint to evaluate the significance score S_significance of each candidate point;
[0073] S214. Select the points whose significance scores exceed the threshold and ensure that the minimum distance between points meets the resolution requirements to finally obtain the set of key turning points T_points.
[0074] According to one aspect of the present application, the steps of implementing intelligent iterative calibration processing to obtain a convergent optimization model include:
[0075] S31. Based on the balance error model and the interval uncertainty, construct an iterative optimization objective function that considers the global accuracy and the local peak error;
[0076] S32. Allocate differentiated learning rate parameters for the error characteristics of different sub-intervals within the boundary region to form an adaptive learning rate matrix; enable the high-uncertainty intervals to obtain a more aggressive optimization strategy;
[0077] S33. Adopt the region-sensitive gradient descent algorithm, dynamically adjust the optimization step size according to the iterative optimization objective function and the adaptive learning rate matrix, and calculate the optimization gradient vector of the model parameters;
[0078] S34. Update the parameters of the balance error model based on the optimization gradient vector to obtain an iterative optimization model, and calculate the residual vector of this model;
[0079] S35. Introduce a residual resampling mechanism, and automatically generate a new set of calibration sampling points according to the distribution characteristics of the residual vector; these points are concentrated in the regions with larger residuals to achieve precise allocation of calibration resources;
[0080] S36. Use the set of calibration sampling points to obtain new measurement data and perform iterative optimization until a preset accuracy threshold or the upper limit of the number of iterations is reached to obtain a convergent optimization model.
[0081] Specifically, use the set of calibration sampling points P_calibration to obtain new measurement data, update the original measurement data set D_raw and the enhanced data D_enhanced, repeat the above steps until a preset accuracy threshold or the upper limit of the number of iterations is reached, and finally obtain the convergent optimization model M_converged.
[0082] In this embodiment, by constructing an optimization objective function that takes into account both global accuracy and local peak error, and iterative optimization based on region-sensitive gradient descent and residual resampling, a double improvement in calibration accuracy and efficiency is achieved. Traditional calibration usually adopts a fixed sampling point and a global unified optimization strategy, resulting in slow iterative convergence and being prone to falling into local optima. In the test of this embodiment, a differential learning rate is assigned to different sub-intervals through an adaptive learning rate matrix. A learning rate of 0.068 is assigned to the high-frequency micro-fluctuation interval (0 - 2.5 mm), and a learning rate of 0.025 is assigned to the low-frequency systematic error interval (42 - 50 mm), enabling a more aggressive optimization strategy for difficult regions. At the same time, the residual resampling mechanism focuses the sampling resources on regions with larger residuals. For example, after the first iteration, 8 sampling points are assigned to the range of 0 - 5 mm, while only 5 points are assigned to the range of 15 - 50 mm. This embodiment increases the calibration convergence speed by 3.2 times, compressing the 12 - 15 rounds of iteration required by the traditional method to 4 rounds to achieve the same accuracy, reducing the calibration cost and time.
[0083] According to one aspect of the present application, the steps of forming an adaptive learning rate matrix include:
[0084] Based on the balanced error model and interval uncertainty, calculate the error gradient of each sub-interval within the boundary region, representing the rate of change of error with position; combine the error gradient and interval uncertainty to calculate the optimization difficulty index of each sub-interval, quantifying the optimization difficulty and risk of the sub-interval;
[0085] Based on the optimization difficulty index, construct an initial learning rate distribution, and assign a higher initial learning rate to difficult regions; calculate the optimization interference coefficient between sub-intervals, and construct an interference matrix representing the cross-influence of parameter changes; based on the initial learning rate distribution and the interference matrix, construct an adaptive learning rate matrix, including a direct learning rate and a cross learning rate;
[0086] Apply a dynamic balance algorithm to adjust the adaptive learning rate matrix to ensure the stability of the overall optimization process.
[0087] Specifically, receive the balanced error model M_balanced and the interval uncertainty U_interval as input data. Calculate the error gradient G_error of each sub-interval within the boundary region, representing the rate of change of error with position. Different from the traditional method, here the global average gradient is not used, but the complete local gradient information is retained. Combine the error gradient G_error and the interval uncertainty U_interval to calculate the optimization difficulty index D_difficulty of each sub-interval: high-gradient regions have higher optimization difficulty; high-uncertainty regions have higher optimization risk; fuse these two factors through a non-linear combination function: D_difficulty = α·|G_error|·(1 + β·U_interval2 ), where α and β are weight coefficients, adaptively adjusted according to the sensor type. Based on the optimization difficulty index D_difficulty, an initial learning rate distribution L_initial is constructed, which is a position-related vector rather than the scalar learning rate used in traditional gradient descent: for high-difficulty regions, a higher initial learning rate is assigned to accelerate convergence; for low-difficulty regions, a lower initial learning rate is assigned to improve stability; the learning rate has a non-linear relationship with the difficulty index: L_initial(p) = L_base·[D_difficulty(p)] γ ; where L_base is the base learning rate and γ is the adjustment index. Calculate the optimization interference coefficient I_interference between sub-intervals, which characterizes the degree of influence of parameter changes in one interval on other intervals, a factor usually ignored in traditional optimization methods: for each pair of adjacent sub-intervals (i, j), calculate the cross-influence of parameter changes; construct the interference matrix I_matrix, where the element I(i, j) represents the degree of influence of interval i on interval j. Based on the interference matrix I_matrix and the initial learning rate distribution L_initial, construct the complete adaptive learning rate matrix L_rate: the diagonal element L(i, i) of the matrix is the direct learning rate of interval i, based on the initial learning rate distribution L_initial; the non-diagonal element L(i, j) represents the effective learning rate of parameter optimization in interval i on interval j after considering interference; calculation formula: L(i, j) = L(i, i)·I(i, j)·α_decay; where α_decay is the distance decay factor. Apply the dynamic balance algorithm to adjust the adaptive learning rate matrix L_rate to ensure the stability of the overall optimization process: check the distribution balance of learning rates in each interval; identify potential unstable regions; apply constraint conditions to ensure that the condition number of the learning rate matrix is within a controllable range; output the balanced adaptive learning rate matrix L_rate.
[0088] In this embodiment, by calculating the optimization difficulty index and the optimization interference coefficient between sub-intervals, the problem of low efficiency of the traditional fixed learning rate in complex error scenarios is solved. During the test, the system automatically identifies the high-difficulty characteristics of the high-gradient region (G_error = 0.015) and the high-uncertainty region (U_interval = ±0.006 mm), and assigns a higher learning rate to these regions to accelerate convergence. At the same time, the interference matrix captures the cross-influence coefficient of 0.3 - 0.5 between adjacent sub-intervals, indicating that parameter optimization is not independent but interrelated. This embodiment makes the model parameter optimization more efficient and stable, especially in the complex non-linear error scenario of the boundary region, avoiding the oscillation and divergence problems easily occurring in the traditional method. Experiments show that the adaptive learning rate matrix increases the convergence speed of parameter optimization in the boundary region by 2.8 times, while reducing the parameter oscillation amplitude by 65%, providing a more stable and reliable optimization path for the calibration process.
[0089] In another embodiment of the present application, based on the optimization difficulty index, the construction of the initial learning rate distribution can also be: determining the global base learning rate L_base based on the sensor type and the current iteration round iter_current: L_base = L_0 * (1 - Δ * iter_current / iter_max), where L_0 is the initial base learning rate, Δ is the decay factor, and iter_max is the maximum number of iterations. For each sub-interval i, determining the adaptive value of the adjustment index γ: γ(i) = γ_base * (1 + α * log(iter_max / iter_current)) * (1 - β * convergence_rate(i)), where convergence_rate(i) represents the convergence rate of interval i, determined by the reduction amplitude of the error in this interval in recent iterations; γ_base is the original adjustment index. Calculating the position-related learning rate distribution: L_initial(p) = L_base * [D_difficulty(p)] γ(i) , where p is within interval i. Applying boundary constraints to ensure that the learning rate is within a reasonable range: L_initial(p) = min(max(L_initial(p), L_min), L_max). Where L_max is the maximum learning rate and L_min is the minimum learning rate.
[0090] According to one aspect of the present application, adopting the region-sensitive gradient descent algorithm to dynamically adjust the optimization step size according to the iterative optimization objective function and the adaptive learning rate matrix, the steps of calculating the optimization gradient vector of the model parameters include:
[0091] Calculate the local gradient for each sub - interval in the boundary region according to the adaptive learning rate matrix and the iterative optimization objective function, and form a partitioned gradient set;
[0092] Based on the adaptive learning rate matrix, assign different optimization step - sizes to each sub - interval to form a variable step - size vector; according to the partitioned gradient set and the variable step - size vector, aggregate to form an overall optimized gradient vector; perform a stability check on the optimized gradient vector to prevent gradient explosion or vanishing problems, and obtain a corrected gradient vector; predict the optimization path based on the corrected gradient vector to ensure the consistency of the convergence direction, and obtain the final optimized gradient vector.
[0093] Specifically, calculate the local gradient for each sub - interval \(i\) in the boundary region: \(G_{local}(i)=\frac{\partial F_{objective}}{\partial\theta(i)}\), where \(\theta(i)\) is the model parameter vector of sub - interval \(i\); \(\frac{\partial}{\partial}\) is the partial derivative; \(F_{objective}\) is the iterative optimization objective function. Based on the adaptive learning rate matrix \(L_{rate}\), assign different optimization step - sizes to each sub - interval: \(S_{variable}(i)=\min(\max(\|G_{local}(i)\|\times L_{rate}(i, i), S_{min}), S_{max})\), where \(S_{min} = 0.001\) and \(S_{max}=0.1\) are the lower and upper limits of the step - size. According to the partitioned gradient set and the variable step - size vector, aggregate to form an overall optimized gradient vector \(G_{opt}\): \(G_{opt}(i)=G_{local}(i)\times S_{variable}(i)+\sum_{j\neq i}[G_{local}(j)\times L_{rate}(i, j)\times S_{variable}(j)]\), where the summation range is all sub - intervals \(j\neq i\). Perform a stability check on the optimized gradient vector: calculate the L2 - norm of the gradient: \(\|G_{opt}\|\) 2 ; if \(\|G_{opt}\|\) 2 \(>G_{threshold}\) (set to 5.0), then apply gradient clipping: \(G_{opt\_clipped}=G_{opt}\times(\frac{G_{threshold}}{\|G_{opt}\|})\) 2 ; if \(\|G_{opt}\|\) 2 \(<G_{min}\) (set to 0.001), then apply gradient enhancement: \(G_{opt\_enhanced}=G_{opt}\times(\frac{G_{min}}{\|G_{opt}\|})\) 2) Obtain the corrected gradient vector \(G_{corrected}\). Predict the optimized path based on the corrected gradient vector: Calculate the expected parameter after updating the current parameter \(\theta_{current}\): \(\theta_{predicted}=\theta_{current}-G_{corrected}\); Verify whether the expected parameter results in a decrease in \(F_{objective}\); If \(F_{objective}\) does not decrease, then reduce the step size and recalculate; Ensure the consistency of the convergence direction to obtain the final optimized gradient vector \(G_{final}\).
[0094] This embodiment solves the problem of poor performance of traditional gradient descent in scenarios with non-uniform error distribution. In the test sensor, the optimization complexity in different regions varies significantly. For example, the gradient norm in the interval of 0 - 2.5 mm is 0.032, which is much higher than 0.008 in the interval of 42 - 50 mm. Traditional fixed-step gradient descent will cause slow convergence in low-gradient regions or instability in high-gradient regions. This embodiment assigns an adaptive step size in the range of 0.001 - 0.1 to different regions through a variable step size vector, and prevents the problems of gradient explosion and disappearance through stability tests. Experiments prove that this embodiment reduces the optimization residual of the model parameters of traditional gradient descent by 38% and reduces the number of iterations required for convergence by 56%. Especially for the high-complexity interval within the range of 0 - 5% of the full scale at the boundary region, the optimization efficiency is improved most significantly, providing an efficient and reliable parameter optimization method for the calibration system.
[0095] According to one aspect of the present application, the steps of implementing intelligent iterative calibration processing to obtain a convergent optimization model can also be:
[0096] Based on the balanced error model and interval uncertainty, construct an iterative optimization model and analyze the difference between its predicted value and the actual measured value to obtain a residual vector; Conduct density estimation analysis on the residual vector to construct a residual probability distribution reflecting the distribution of residuals in the position domain; Based on the residual probability distribution, calculate the uncertainty entropy value related to the position to quantify the prediction uncertainty of each position; Combine the uncertainty entropy value, interval uncertainty, and residual vector to construct a sampling importance function; Based on the sampling importance function, construct a non-uniform sampling strategy to generate a candidate sampling point set; Apply information gain evaluation to the candidate sampling point set to eliminate redundant information points and obtain a calibration sampling point set; Based on the calibration sampling point set, generate a sampling execution instruction containing accurate position information and measurement parameter configuration; Conduct iterative optimization based on the sampling execution instruction until the preset accuracy threshold or the upper limit of the number of iterations is reached to obtain a convergent optimization model.
[0097] Specifically, the iterative optimization model M_iterated and the residual vector R_residual are received as input data, where the residual vector R_residual contains the difference between the model predicted value and the actual measured value. Density estimation analysis is performed on the residual vector R_residual. Different from the traditional method that directly uses the absolute value of the residual, a complete residual probability distribution P_residual is constructed here: the kernel density estimation method is used to calculate the distribution of the residual in the position domain; multiple local peaks and valleys of the residual distribution are identified; the spatial structure characteristics of the residual are captured, rather than only focusing on the numerical magnitude. Based on the residual probability distribution P_residual, the position-related uncertainty entropy value H_entropy is calculated to quantify the prediction uncertainty at each position: for regions with a wider residual distribution, a higher entropy value is assigned; for regions where the residual distribution is concentrated but deviates from zero, a relatively high entropy value is also assigned; the entropy value calculation considers two factors, the amplitude and the local change rate of the residual. A sampling importance function I_importance is constructed, combining the uncertainty entropy value H_entropy and the interval uncertainty U_interval: I_importance(p)=w 1 ·H_entropy(p)+w 2 ·U_interval(p)+ w 3 ·|R_residual(p)|, where w 1 、w 2 、w 3 are adaptive weights that are dynamically adjusted according to the iteration stage. A non-uniform sampling strategy is constructed, different from the traditional uniform encryption or simple sampling according to the residual magnitude: the cumulative importance function C_importance is calculated; the inverse function method is used to generate new sampling points from the cumulative importance function C_importance; a small random perturbation is added to avoid over-concentration of sampling points; an initial candidate sampling point set P_candidates is generated. Information gain evaluation is applied to the candidate sampling point set P_candidates, which is a step missing in traditional sampling methods: the expected information gain provided by each candidate point is calculated; points with redundant information are removed, and the point set with the maximum information gain is retained; the optimized calibration sampling point set P_calibration is output. Based on the calibration sampling point set P_calibration, a sampling execution instruction E_sampling is generated, which contains accurate position information and measurement parameter configuration for guiding the next round of calibration measurement.
[0098] In this embodiment, through density estimation analysis and information gain evaluation, the problem of low efficiency of traditional uniform sampling under limited resources is solved. In the test, the accuracy of the lower boundary region of traditional uniform sampling at 20 calibration points is ±0.008 mm, while this embodiment improves the accuracy to ±0.0022 mm at the same number of points, a 73% improvement. This is because the system can automatically identify the key features of the residual distribution and accurately allocate limited sampling resources to the positions with the highest information value. For example, after the first round of iteration, the system finds that the root mean square value of the residuals in the range of 0 - 5 mm is 0.0042 mm, much higher than 0.0009 mm in the range of 15 - 50 mm. Therefore, more sampling points are allocated to the former in the next round of iteration. The sampling importance function adjusts the dynamic weight, paying more attention to the entropy value (w 1 = 0.55) in the early iteration and more attention to the residuals (w 3 = 0.35) in the later stage, so that the sampling strategy adapts to the optimization process. This embodiment improves the calibration efficiency, reduces the sampling points by 30 - 50% while maintaining the same accuracy, and reduces the calibration cost and time.
[0099] In another embodiment of the present application, by combining the uncertainty entropy value, interval uncertainty, and residual vector, the sampling importance function can also be constructed as follows: Calculate the global convergence characteristic index of the current iteration: convergence_rate = 1 - (mean(|R_residual_current|) / mean(|R_residual_initial|)); stability_index = std(|R_residual_current|) / mean(|R_residual_current|). Dynamically adjust the weight based on the iteration characteristics: w 1 (iter) = w 1 _base * (1 - convergence_rate) 2 , paying attention to the entropy value in the early stage; w 2 (iter) = w 2 _base* (1 - stability_index), paying attention to the interval uncertainty when it is unstable; w 3 (iter) = w 3 _base *(remaining_iterations / total_iterations), paying attention to the residuals in the later stage. Calculate the comprehensive sampling importance function: I_importance(p) = w 1 (iter) * H_entropy(p) + w 2 (iter) * U_interval(p) + w3 (iter) * |R_residual(p)|. Apply normalization to ensure that the range of the importance function is within [0, 1]: I_importance_norm(p) = I_importance(p) / max(I_importance). Where R_residual_current is the residual vector of the current iteration; R_residual_initial is the initial residual vector; stability_index is the stability index; w 1 _base is the base value of the entropy weight; w 2 _base is the base value of the interval uncertainty weight; w 3 _base is the base value of the residual weight; remaining_iterations is the remaining number of iterations; total_iterations is the total number of iterations.
[0100] The existing calibration system does not pay enough attention to the dynamic response characteristics of the sensor. It only focuses on static error compensation and ignores the possible sensitivity changes of the sensor in the boundary region, resulting in additional errors in actual dynamic measurement applications. Therefore, according to one aspect of the present application, the steps of generating the boundary region compensation function and calibration parameters to obtain the calibration parameter package include:
[0101] S41. Based on the convergence optimization model, extract the error compensation coefficient sets of each sub-interval in the boundary region. These coefficients directly describe the system error characteristics of the sensor at different positions; construct a piecewise continuous compensation function, which connects the error compensations of each sub-interval through the spline interpolation method to ensure smooth transition of the compensation function within the entire range and avoid artificially introducing new discontinuity points;
[0102] S42. Calculate the derivative of the piecewise continuous compensation function to obtain the sensitivity compensation function, which is used to correct the sensitivity change of the sensor in the boundary region and solve the dynamic response problem ignored by the traditional calibration method;
[0103] S43. Combine the piecewise continuous compensation function and the sensitivity compensation function to generate a complete calibration parameter package, including static compensation parameters and dynamic response parameters, covering the calibration requirements of the sensor in different working states;
[0104] S44. Perform data compression processing on the calibration parameter package. Using wavelet transform and principal component analysis methods, extract the key features of the parameter package to generate compressed calibration parameters, reducing the storage space requirement and improving the calibration calculation efficiency.
[0105] In this embodiment, by constructing a piecewise continuous compensation function and connecting it with spline interpolation, the problem of discontinuity of the traditional compensation function at the interval boundary is solved. In the sensor test, the traditional piecewise compensation method has a jump of up to 0.003 mm at the boundary of the sub-interval (such as the 7.5 mm position), resulting in non-smooth output of the sensor. The smooth transition function of this embodiment reduces these jumps to less than 0.0001 mm, ensuring the continuity of the compensation function over the entire range. At the same time, data compression processing compresses the original calibration parameters (3.2 KB) to 0.48 KB, with a compression rate of 85%, while keeping the accuracy loss after decompression less than 1%. It can be easily stored in the internal EEPROM of the sensor, supporting the plug-and-play in-situ calibration capability and avoiding the need for additional storage devices. In addition, the real-time calculation delay of the compressed parameters is less than 0.2 ms, meeting the requirements of high-frequency control systems for real-time calibration and providing a practical and efficient calibration parameter scheme for the industrial application of displacement sensors.
[0106] According to one aspect of the present application, the steps of calculating the derivative of the piecewise continuous compensation function to obtain the sensitivity compensation function include:
[0107] Calculating the position derivative of the piecewise continuous compensation function to obtain a sensitivity change curve characterizing the spatial change of the sensor sensitivity; identifying the sensitivity mutation points in the sensitivity change curve, recording the positions and change amplitudes of these points to form a sensitivity mutation point list; dividing the range into a predetermined number of sensitivity intervals based on the sensitivity mutation point list to construct a sensitivity interval piecewise model;
[0108] Analyzing the response differences of the displacement sensor at different measurement rates, establishing a mapping relationship between the rate and the sensitivity change to form a rate-dependent model; fusing the sensitivity interval piecewise model and the rate-dependent model to generate a comprehensive sensitivity compensation function; constructing a sensitivity smooth transition mechanism to eliminate the discontinuity of the comprehensive sensitivity compensation function at the derivative level to obtain the final sensitivity compensation function.
[0109] Specifically, receive the piecewise continuous compensation function F_compensation as input, which describes the static error compensation values of the sensor at various positions. Calculate the position derivative of the piecewise continuous compensation function F_compensation to obtain the initial sensitivity change curve S_initial: Calculate the numerical derivative using the central difference method; Apply low-pass filtering to the derivative result to remove high-frequency noise; Obtain the curve characterizing the spatial change of the sensor sensitivity. Identify the sensitivity mutation points S_jumps in the sensitivity change curve S_initial, which represent the positions where the response characteristics of the sensor change significantly: Set a threshold to detect the positions where the sensitivity change rate exceeds the preset value; Record the positions and change amplitudes of these mutation points; Output the list L_jumps of sensitivity mutation points. Construct a sensitivity interval segmentation model M_sensitivity. Different from the traditional method that only considers the average sensitivity, here an independent sensitivity characterization is established for each interval: Divide the measurement range into multiple sensitivity intervals based on the list L_jumps of sensitivity mutation points; Fit a local sensitivity model for each interval; Synthesize to form a piecewise sensitivity model. Develop dynamic response characteristic analysis, which is a completely missing link in traditional static calibration: Analyze the response differences of the sensor at different rates; Establish the mapping relationship between the rate and the sensitivity change; Construct a rate-dependent model M_rate to describe the change characteristics of the sensor sensitivity with the measurement rate. Integrate the sensitivity interval segmentation model M_sensitivity and the rate-dependent model M_rate to generate a comprehensive sensitivity compensation function F_sensitivity: F_sensitivity(p, v) = M_sensitivity(p)·[1 + α(p)·v + β(p)·v 2 , where p is the position, v is the measurement rate, and α(p) and β(p) are position-dependent rate-dependent coefficients. Design a sensitivity smooth transition mechanism to ensure the continuity of sensitivity compensation at the interval boundaries: Apply a weight fusion function near the interval boundaries; Eliminate the discontinuity of the compensation function at the derivative level; Output the final continuous sensitivity compensation function F_sensitivity.
[0110] In this embodiment, by fusing position derivative calculation and rate-dependent model, the problem that traditional methods ignore dynamic response characteristics is solved. In the test sensor, the sensitivity change rate in the boundary region (0 - 5% full scale) reaches ±12%. The error of traditional static calibration increases in dynamic measurement. In this embodiment, by calculating the derivative of the compensation function, the sensitivity mutation points (such as at 2.5 mm) within the boundary region are successfully identified, and a segmented sensitivity interval model is constructed. Experiments prove that under static measurement conditions, the sensitivity change is reduced from ±12% to ±1.5%. More importantly, under the dynamic measurement condition of 10 mm / s, the sensitivity deviation is reduced from ±18% to ±2.8%, improving the dynamic measurement accuracy. The rate-dependent model M_rate establishes the mapping relationship between the measurement rate and the sensitivity change (α = -0.0012 s / mm, β = 0.00005 s 2 / mm 2 ), enabling the system to adjust the calibration parameters in real time according to the current measurement rate. This enables the sensor to maintain high precision in a variable-speed measurement environment, providing a reliable displacement measurement solution for dynamic application scenarios such as robot control and CNC machining.
[0111] According to another aspect of the present application, it further includes step S45, performing real-time calibration by applying the compressed calibration parameter C_compressed. Specifically:
[0112] S451. Design a compressed parameter decompression algorithm A_decompress for quickly restoring key calibration parameters from the compressed calibration parameter C_compressed;
[0113] S452. Develop an efficient real-time calculation engine E_realtime to integrate the decompression algorithm and the compensation function calculation;
[0114] S453. Implement the real-time calibration process for the sensor boundary region: receive the original measurement value R_measure of the sensor; determine whether the measurement value is in the boundary region; if in the boundary region, calculate the compensation value C_adjust by applying the efficient real-time calculation engine E_realtime and the compressed calibration parameter C_compressed; output the calibrated measurement value O_calibrated = R_measure + C_adjust;
[0115] S454. Construct a calibration performance monitoring module M_monitor to evaluate the calibration effect in real time and trigger adaptive optimization when necessary.
[0116] In a specific embodiment of the present application, a boundary region calibration method applied to an optical scale displacement sensor is provided. A comprehensive solution for multi-scale feature extraction and analysis, dynamic segmented hybrid error modeling, intelligent iterative calibration processing, and boundary region compensation function generation is provided for the non-linear error and sensitivity change problems existing in the optical scale within the 0-5% and 95-100% range of the measuring range.
[0117] The experimental equipment and conditions include: test equipment: JSW-5000 high-precision optical scale displacement sensor; standard instrument: Renishaw XL-80 laser interferometer (accuracy ±0.5 ppm); measuring range: 0-1000 mm; environmental conditions: temperature 23±0.5 °C, humidity 45±5%RH; processing platform: Intel i7 processor, 16GB memory, Python 3.8 programming environment. The specific process is as follows:
[0118] Step 1: Perform multi-scale boundary feature extraction and analysis. Obtain measurement data: Set the measuring range of the optical scale to 0-1000 mm; Collect measurement data at 50 mm intervals in the middle region (50-950 mm) to obtain 19 measurement points; Set non-uniform sampling strategies in the boundary regions (0-50 mm and 950-1000 mm): 0-10 mm and 990-1000 mm regions: 1 mm interval, a total of 20 points; 10-20 mm and 980-990 mm regions: 2 mm interval, a total of 10 points; 20-50 mm and 950-980 mm regions: 5 mm interval, a total of 12 points; Repeat the measurement 5 times for each measurement point, and take the average value as the actual measured value P_m of this point; Calculate the error E_raw = P_m - P_t between the theoretical value P_t and the actual measured value P_m of each measurement point; The obtained original measurement data set D_raw contains 61 measurement points, including 42 points in the boundary region and 19 points in the middle region.
[0119] Perform boundary region enhanced sampling. Based on the initial measurement, enhanced sampling is performed on the boundary region: Calculate the boundary region density value B_density = 2.5 points / mm (determined based on the sensor accuracy level); Apply high-density sampling at 0.5 mm intervals in the 0 - 5 mm and 995 - 1000 mm regions to obtain 20 additional measurement points; Apply stepped interval sampling in the 5 - 50 mm and 950 - 995 mm regions: 5 - 10 mm and 990 - 995 mm: 0.5 mm interval, a total of 20 points; 10 - 30 mm and 970 - 990 mm: 1 mm interval, a total of 40 points; 30 - 50 mm and 950 - 970 mm: 2 mm interval, a total of 20 points; Repeat the measurement 3 times for each enhanced sampling point, and take the average value as the actual measurement value of that point; Calculate the error between the theoretical value and the actual measurement value of the enhanced sampling points; The enhanced sampling obtains the D_enhanced dataset, which contains 100 additional measurement points, mainly distributed in the boundary region.
[0120] Perform local differential transformation application. Apply local differential transformation to the original measurement dataset D_raw and the enhanced data D_enhanced: Combine the original measurement dataset D_raw and the enhanced data D_enhanced to form the comprehensive dataset D_combined. Apply the short-time Fourier transform (STFT) with a sliding window to the comprehensive dataset D_combined: Set the Hanning window, and the window width is 2% of the boundary region (10 mm); The window sliding step size is 0.2% of the boundary region (1 mm); Calculate the spectrum for each window position to form the time-frequency joint distribution F_distribution. The dimension of the frequency distribution graph F_distribution is [number of position points, number of frequency points], which characterizes the frequency response characteristics at different positions.
[0121] Perform local feature enhancement and boundary feature spectrogram generation. Based on the frequency distribution graph F_distribution, perform feature enhancement: Design an adaptive frequency band enhancement filter H_filter: H_filter(f) = 1 + α * exp(-(f - f_c) 2 / (2σ 2), where \(f_c\) is the center frequency determined by the spectral peak of the boundary region, \(\alpha = 2.5\), and \(\sigma = 0.15*f_c\); Apply the adaptive band enhancement filter \(H_{filter}\) to the frequency distribution graph \(F_{distribution}\) to obtain the enhanced spectrum \(F_{enhanced}\). Perform contrast stretching on the enhanced spectrum \(F_{enhanced}\) to highlight local features: \(F_{contrast}(p, f)=(F_{enhanced}(p, f)-min(F_{enhanced})) / (max(F_{enhanced}) - min(F_{enhanced}))\). Calculate the spatial autocorrelation function to characterize the spatial correlation of spectral features: \(R_{spatial}(\Delta p)=\sum[F_{contrast}(p, f)*F_{contrast}(p + \Delta p, f)] / \sum[F_{contrast}(p, f) 2 , where \(\Delta p\) is the spatial displacement variable, and the summation range covers all frequencies \(f\). Construct the spatial-frequency joint feature matrix \(J_{matrix}\): \(J_{matrix}(p, f)=F_{contrast}(p, f)*(1 + \beta*R_{spatial}(p))\), where \(\beta = 1.5\) is the spatial correlation enhancement coefficient. Apply singular value decomposition (SVD) to the spatial-frequency joint feature matrix \(J_{matrix}\): \(J_{matrix}=U*\sum*V T ; Select the first \(k\) principal components (\(k = 10\)) for reconstruction to obtain the boundary feature spectrogram \(S_{boundary}\): \(S_{boundary}=U_k*\sum_k*V_k T , where \(U_k\), \(\sum_k\), and \(V_k\) are the submatrices of the left singular vector matrix \(U\), diagonal matrix \(\sum\), and right singular vector matrix \(V\) corresponding to the first \(k\) principal components, respectively.
[0122] Perform multi-scale feature extraction. Extract multi-scale features from the boundary feature spectrogram S_boundary: Extract small-scale microscopic features F_micro: Apply a high-pass filter (cutoff frequency 10 Hz) to extract the high-frequency components in the boundary feature spectrogram S_boundary; Calculate the root mean square value, peak value, and form factor of the high-frequency components in the range of 0.1% - 0.5% full scale (1 - 5 mm); Form the microscopic feature vector F_micro, with a dimension of [number of position points, 3]. Extract medium-scale local features F_local: Apply a band-pass filter (1 - 10 Hz) to extract the intermediate-frequency components in the boundary feature spectrogram S_boundary; Calculate the mean, standard deviation, and skewness of the intermediate-frequency components in the range of 0.5% - 2% full scale (5 - 20 mm); Form the local feature vector F_local, with a dimension of [number of position points, 3]. Extract large-scale macroscopic features F_macro: Apply a low-pass filter (cutoff frequency 1 Hz) to extract the low-frequency components in the boundary feature spectrogram S_boundary; Calculate the trend slope, curvature, and non-linearity of the low-frequency components in the range of 2% - 5% full scale (20 - 50 mm), and form the macroscopic feature vector F_macro, with a dimension of [number of position points, 3]. Fuse the three-scale features to form a multi-scale feature vector F_multi: F_multi = [F_micro, F_local, F_macro], with a dimension of [number of position points, 9].
[0123] Calculate the scale correlation matrix based on the multi-scale feature vector F_multi: Decompose the multi-scale feature vector F_multi into three sub-vectors F_micro, F_local, and F_macro. Construct the feature mapping space M_space and project the three-scale features onto the same reference coordinate system: Apply a scale magnification transformation to the micro feature F_micro: F_micro_std = F_micro * W_micro, where W_micro is the micro feature magnification weight matrix, so that the amplitude range of the micro feature F_micro is close to that of the local feature F_local; Apply a scale reduction transformation to the macro feature F_macro: F_macro_std = F_macro * W_macro, where W_macro is the macro feature reduction weight matrix; Center the local feature F_local: F_local_std = F_local - mean(F_local); Set the sliding window width to 1% (5mm) of the boundary region and the step size to 0.1% (0.5mm); Calculate the cross-correlation value at each window position p: C_micro_local(p)=correlation(F_micro_std(p-w / 2:p+w / 2), F_local_std(p-w / 2:p+w / 2)); C_local_macro(p)=correlation(F_local_std(p-w / 2:p+w / 2), F_macro_std(p-w / 2:p+w / 2)); C_micro_macro(p)=correlation(F_micro_std(p-w / 2:p+w / 2), F_macro_std(p-w / 2:p+w / 2)); where w is the window width and correlation() is the Pearson correlation coefficient calculation function. Integrate the cross-correlation values at all window positions to form the cross-correlation vector set C_vectors. Construct a three-dimensional cross-correlation tensor T_correlation with dimensions [3, 3, number of position points]: T_correlation[0, 1, p]= T_correlation[1, 0, p] = C_micro_local(p); T_correlation[1, 2, p]= T_correlation[2, 1, p] = C_local_macro(p); T_correlation[0, 2, p]= T_correlation[2, 0, p] = C_micro_macro(p); T_correlation[i, i, p]= 1.0 (auto-correlation is 1).Average the third dimension (position dimension) of the three-dimensional cross-correlation tensor \(T_{correlation}\) to obtain the scale correlation matrix \(R_{scale}\): \(R_{scale}=\text{mean}(T_{correlation}, \text{axis}=2)\), with dimensions \([3, 3]\), representing the overall correlation strength between three scales. Calculate the eigenvalue decomposition of the scale correlation matrix \(R_{scale}\): \(R_{scale}=Q*\Lambda*Q\). T , obtaining the eigenvalue vector \(\lambda\) and the eigenvector matrix \(Q\); where \(\Lambda\) is a diagonal matrix. Extract the principal eigenvector (the eigenvector corresponding to the largest eigenvalue) as the correlation eigenvector \(E_{relation}\).
[0124] Compare and analyze the feature differences between the boundary region and the middle region, and construct the boundary feature recognition fingerprint: Divide the measurement range into the boundary region (0 - 5% and 95 - 100% range) and the middle region (5 - 95% range), and calculate the mean of the multi-scale feature vectors in the boundary region and the middle region respectively: \(F_{multi\_boundary}=\text{mean}(F_{multi}[ \text{boundary region index}])\); \(F_{multi\_middle}=\text{mean}(F_{multi}[ \text{middle region index}])\); Calculate the feature difference vector: \(F_{diff}=F_{multi\_boundary}-F_{multi\_middle}\); Calculate the significance index of the feature difference, and obtain the p-value through a t-test: \(P\_values = t\_test(F_{multi}[ \text{boundary region index}], F_{multi}[ \text{middle region index}])\); Construct the boundary feature recognition fingerprint \(B\_fingerprint\): \(B\_fingerprint = F_{diff}*(1 - P\_values)\), where the element multiplication is the multiplication of corresponding elements, and \(1 - P\_values\) represents the statistical significance of the feature difference. Normalize the boundary feature recognition fingerprint \(B\_fingerprint\): \(B\_fingerprint\_norm=(B\_fingerprint - \min(B\_fingerprint)) / (\max(B\_fingerprint)-\min(B\_fingerprint))\). In this embodiment, the finally obtained normalized boundary feature recognition fingerprint \(B\_fingerprint\_norm\) is a 9-dimensional vector: \([0.92, 0.78, 0.85, 0.64, 0.53, 0.42, 0.31, 0.25, 0.18]\), and each element corresponds to the significance weighted difference value of three indicators of microscopic features, local features, and macroscopic features respectively.
[0125] Step 2: Construct a dynamic segmentation hybrid error model. Identify fingerprints based on multi-scale feature vectors and boundary features, and identify key turning points within the boundary region: Calculate the enhanced feature vector F_enhanced based on the multi-scale feature vector F_multi and the scale correlation matrix R_scale: F_enhanced = F_multi * R_scale * F_multi T , where TFor transpose; calculate the feature gradient vector G_feature: G_feature(p) =(F_enhanced(p+Δp) - F_enhanced(p-Δp)) / (2*Δp), where Δp is the position increment and is taken as 0.5mm; set the adaptive threshold T_adaptive: T_adaptive = 0.8 * mean(|G_feature|) + 1.5 * std(G_feature), and in this embodiment, T_adaptive = 0.023. Calculate the set of local extreme points of G_feature: If G_feature(p-Δp)<G_feature(p)>G_feature(p+Δp), then p is a local maximum point; if G_feature(p-Δp)>G_feature(p)<G_feature(p+Δp), then p is a local minimum point; combine all local extreme points to form the set of local extreme points P_extrema. Screen valid extreme points based on the adaptive threshold T_adaptive: P_candidates = {p ∈ P_extrema | |G_feature(p)|>T_adaptive}; calculate the significance score of each candidate point: S_significance(p)=|G_feature(p)|* B_fingerprint_norm[closest_feature_index(p)], where closest_feature_index(p) is the most significant feature index at position p. Select points whose significance scores exceed the threshold: T_points_prelim = {p ∈ P_candidates | S_significance(p)>0.015}; apply the minimum distance constraint to ensure that the distance between points is not less than 1mm: sort T_points_prelim in descending order of significance scores; select the first point to add to T_points; sequentially examine the remaining points, and if the minimum distance from the selected points is greater than 1mm, then add it to T_points. In this example, the set of key turning points T_points identified is: Lower boundary region: 2.5mm, 7.5mm, 15mm, 26mm, 42mm; Upper boundary region: 958mm, 974mm, 985mm, 992.5mm, 997.5mm.
[0126] Design specific basis functions for each sub - interval to construct an adaptive basis function library: Analyze the characteristics of sub - intervals in the boundary region according to the key turning - point set T_points: Calculate the mean error, standard deviation, frequency characteristics, etc. of each sub - interval; Classify them into high - frequency micro - fluctuation intervals, medium - frequency transition intervals, and low - frequency systematic - error intervals based on the characteristics. Classification results of sub - intervals in the lower - boundary region: 0 - 2.5mm: High - frequency micro - fluctuation interval; 2.5 - 7.5mm: High - frequency micro - fluctuation interval; 7.5 - 15mm: Medium - frequency transition interval; 15 - 26mm: Medium - frequency transition interval; 26 - 42mm: Low - frequency systematic - error interval; 42 - 50mm: Low - frequency systematic - error interval. Classification results of sub - intervals in the upper - boundary region: 950 - 958mm: Low - frequency systematic - error interval; 958 - 974mm: Low - frequency systematic - error interval; 974 - 985mm: Medium - frequency transition interval; 985 - 992.5mm: Medium - frequency transition interval; 992.5 - 997.5mm: High - frequency micro - fluctuation interval; 997.5 - 1000mm: High - frequency micro - fluctuation interval. For the high - frequency micro - fluctuation interval, design the wavelet basis function B_wavelet: B_wavelet(p; a, b, s)=a*(1 / sqrt(s))*ψ((p - b) / s), where ψ is the Morlet wavelet function, a is the amplitude parameter, b is the position parameter, and s is the scale parameter. For the medium - frequency transition interval, design the fractional - polynomial basis function B_fractional: B_fractional(p; a, b, c, α)=a / (1+(|p - b| / c) α ), where a is the amplitude parameter, b is the central - position parameter, c is the width parameter, and α is the shape parameter. For the low - frequency systematic - error interval, design the exponential - decay basis function B_exponential: B_exponential(p; a, b, λ)=a*exp(-λ*|p - b|), where a is the amplitude parameter, b is the reference - position parameter, and λ is the decay - rate parameter. Optimize the parameters of various basis functions to make them most suitable for the error characteristics of the corresponding intervals: Perform non - linear least - squares fitting on the error data of each sub - interval; Determine the optimal parameter values to minimize the fitting residuals; Form an optimized basis - function set. Integrate various optimized basis functions to form an adaptive basis - function library B_functions. In this example, the optimized wavelet - basis - function parameters for the 0 - 2.5mm high - frequency micro - fluctuation interval are: a = 0.023, b = 1.2mm, s = 0.8.
[0127] Decompose the error response characteristics of the boundary region into multimodal components: Obtain the error response characteristics E_response of the boundary region, which is the error value of the boundary region in the original measurement data; Extract the reference component C_base: Apply linear regression to the error response characteristics E_response: E(p) = k*p + b, to obtain the slope k and the intercept b, and calculate the reference component: C_base(p) = k*p + b. Calculate the initial residual: R_initial = E_response - C_base; Extract the system component C_system: Apply low-pass filtering (cutoff frequency 0.5 Hz) to the initial residual R_initial to obtain the system component C_system; Calculate the secondary residual: R_secondary = R_initial - C_system; Extract the random component C_random: Apply autocorrelation analysis to the secondary residual R_secondary to determine the random noise level; Design a Wiener filter to reduce random noise; The difference between the original residual and the filtered residual is the random component C_random. Calculate the tertiary residual: R_tertiary = R_secondary - C_random; Extract the coupling component C_coupling: R_tertiary is the coupling component C_coupling; Verify the cross-correlation of the coupling component C_coupling with the reference component C_base and the system component C_system to ensure that the cross-modal coupling effect is captured. Integrate the reference component C_base, the system component C_system, the random component C_random, and the coupling component C_coupling into the multimodal component C_components. In this example, the decomposition results of the multimodal component in the 0 - 2.5 mm interval are: C_base: 0.0015*p - 0.0002; C_system: average amplitude 0.012 mm, showing non-linear characteristics; C_random: standard deviation 0.003 mm; C_coupling: maximum amplitude 0.005 mm, mainly distributed in the 1 - 1.5 mm region.
[0128] Based on the adaptive basis function library and multi-modal components, a dynamic piecewise hybrid error model is constructed: for each sub-interval i, the most suitable basis function type is selected: for the high-frequency micro-fluctuation interval, the wavelet basis function B_wavelet is selected; for the medium-frequency transition interval, the fractional polynomial basis function B_fractional is selected; for the low-frequency systematic error interval, the exponential decay basis function B_exponential is selected. The sub-interval error model M_local(i) is constructed: M_local(i)(p) = C_base(p) + w_sys *B_selected(p; θ_sys) + w_rand * noise(p) + w_coup * B_coupling(p;θ_coup), where C_base(p) is the reference component; B_selected is the selected basis function; θ_sys is the parameter of the systematic component; noise(p) is the random noise model; B_coupling is the coupling component model function; θ_coup is the parameter of the coupling component; w_sys, w_rand, w_coup are the weights of each component. A smooth transition function S_transition is designed at the sub-interval boundary: S_transition(p; p1, p2) = 0.5 + 0.5 * tanh((p - 0.5*(p1 + p2)) / (0.1*(p2 - p1))), where p1, p2 are the boundary points of adjacent sub-intervals. All sub-interval models are integrated to form the dynamic piecewise hybrid error model M_error: M_error(p) = Σ[M_local(i)(p) * S_i(p)], where S_i(p) is the weight of the position p in the sub-interval i, calculated by the smooth transition function S_transition.
[0129] Introduce a model complexity penalty factor into the dynamic segmentation hybrid error model to obtain a balanced error model: Define the model complexity metric C_complexity: C_complexity = Σ[w_i * n_i], where w_i is the complexity weight of sub-interval i and n_i is the number of model parameters in sub-interval i. Define the optimization objective function J_objective with a penalty term: J_objective = MSE + λ * C_complexity, where MSE is the mean square error and λ is the complexity penalty coefficient. Optimize the model parameters of each sub-interval to minimize J_objective and obtain the balanced error model M_balanced. Calculate the interval uncertainty U_interval of the balanced error model M_balanced: For each sub-interval, calculate the residual between the model prediction value and the actual measurement value; calculate the standard deviation of the residuals, multiply by the coverage factor k = 2; obtain the expanded uncertainty at a 95% confidence level; allocate it to each sub-interval to form the interval uncertainty U_interval. In this example, the evaluated uncertainty values for each sub-interval in the lower boundary region are: 0 - 2.5 mm: ±0.006 mm; 2.5 - 7.5 mm: ±0.005 mm; 7.5 - 15 mm: ±0.004 mm; 15 - 26 mm: ±0.003 mm; 26 - 42 mm: ±0.002 mm; 42 - 50 mm: ±0.001 mm.
[0130] Step 3: Perform intelligent iterative calibration processing. Based on the balanced error model and the interval uncertainty, construct an iterative optimization objective function: Design the global accuracy term G_accuracy: G_accuracy = 1 / N * Σ[(M_balanced(p_i) - E_actual(p_i)) 2 , where N is the number of measurement points, p_i is the position of the measurement point, E_actual is the actual measurement error, and M_balanced is the balanced error model. Design the local peak error term L_peak: L_peak = max(|M_balanced(p) - E_actual(p)|), representing the maximum local error. Construct the comprehensive optimization objective function F_objective: F_objective = (1 - α) * G_accuracy + α * L_peak, where α is the trade-off coefficient, and in this example, α is taken as 0.3.
[0131] Design an adaptive learning rate matrix according to the error characteristics of different sub - intervals within the boundary region: Calculate the error gradient G_error of each sub - interval within the boundary region: G_error(i)=Σ[|dE_actual(p) / dp|] / length(interval i), which represents the average rate of change of error with position within interval i; Calculate the optimization difficulty index D_difficulty of each sub - interval: D_difficulty(i)=1.2 * |G_error(i)| * (1 + 1.5 * U_interval(i) 2 ), where U_interval(i) is the uncertainty of interval i; Determine the global base learning rate L_base: L_base = 0.05 * (1 - 0.2 * iter_current / iter_max), where iter_current is the current iteration round and iter_max is the maximum iteration round (set to 10). Calculate the adjustment index γ for each sub - interval: γ(i)=0.5 * (1 + 0.8 * log(iter_max / iter_current)) * (1 - 0.6 * convergence_rate(i)), where convergence_rate(i) represents the convergence rate of interval i, and the initial value is 0. Calculate the position - related initial learning rate distribution L_initial: L_initial(i)=L_base * [D_difficulty(i)] γ(i) ; Calculate the optimization interference coefficient between sub - intervals and construct the interference matrix I_matrix: I(i,j)=exp(-0.5 * (d(i,j) / σ) 2 ), where d(i,j) is the distance between the central positions of intervals i and j, and σ is the characteristic length (set to 10mm). Construct the adaptive learning rate matrix L_rate: L(i,i)=L_initial(i), and the diagonal elements are the direct learning rates; L(i,j)=L(i,i) * I(i,j) * 0.2, and the non - diagonal elements are the cross - learning rates. Apply the dynamic balance algorithm to ensure the stability of L_rate: Check whether the condition number of L_rate is less than the threshold (set to 20), and if the condition number is too large, perform regularization. In the first round of iteration, the initial learning rates of each sub - interval are: 0 - 2.5mm: 0.068; 2.5 - 7.5mm: 0.063; 7.5 - 15mm: 0.052; 15 - 26mm: 0.041; 26 - 42mm: 0.032; 42 - 50mm: 0.025.
[0132] Implement the region-sensitive gradient descent algorithm based on the adaptive learning rate matrix: In this embodiment, the optimized gradient vector for the high-frequency micro-fluctuation interval (0 - 2.5 mm) in the first round of iteration is [-0.032, 0.021, -0.015], corresponding to the update direction of the wavelet basis function parameters [a, b, s].
[0133] Update the parameters of the balance error model based on the optimized gradient vector: Update the parameters of each sub-interval model: θ_new(i) = θ_current(i) - G_final(i); where G_final(i) is the final gradient vector; Reconstruct the model using the updated parameters to obtain the iteratively optimized model M_iterated. Calculate the difference between the predicted value and the actual measured value of M_iterated to obtain the residual vector R_residual: R_residual(p) = M_iterated(p) - E_actual(p). Conduct residual analysis: Calculate the mean of the residuals: mean(R_residual); Calculate the standard deviation of the residuals: std(R_residual); Calculate the maximum residual: max(|R_residual|); Calculate the root mean square of the residuals: RMS(R_residual). After the first round of iteration, the residual statistical characteristics of the boundary region are: mean: 0.0002 mm; standard deviation: 0.0018 mm; maximum residual: 0.0045 mm; root mean square: 0.0018 mm.
[0134] Implement the residual resampling mechanism based on the distribution characteristics of the residual vector: Conduct density estimation analysis on the residual vector R_residual: Apply the kernel density estimation method (bandwidth h = 2 mm) to estimate the residual distribution to obtain the residual probability distribution function P_residual(p). Calculate the position-related uncertainty entropy value H_entropy: For each position p, calculate the standard deviation σ_local(p) of the residuals within its neighborhood (±2 mm); Calculate the local entropy value: H_entropy(p) = log(σ_local(p) * sqrt(2πe)). Combine the uncertainty entropy value, interval uncertainty, and the residual vector to construct the sampling importance function I_importance: Determine the dynamic weight: w 1 = 0.6 * (1 - convergence_rate) 2 , where convergence_rate is the overall convergence rate of the model; w 2 = 0.3 * (1 - stability_index), where stability_index is the stability index of the residual distribution; w 3= 0.1 * (remaining_iterations / total_iterations); Calculate I_importance(p) = w 1 * H_entropy(p) + w 2 * U_interval(p) + w 3 * |R_residual(p)|; Normalize: I_importance_norm(p) = I_importance(p) / max(I_importance). Design a non-uniform sampling strategy: Calculate the cumulative importance function: C_importance(p) = ∫[0, p] I_importance_norm(t) dt; Uniformly generate 30 random numbers {r_i} in the interval [0, 1]; For each r_i, solve for p_i such that C_importance(p_i) = r_i; Add a random perturbation of ±0.2 mm to obtain the candidate sampling point set P_candidates. Apply information gain evaluation to the candidate sampling point set: Define the information gain function IG(p) = H(model) - H(model|measure at p); Calculate the expected information gain E[IG(p)] for each candidate point; Sort the candidate points from high to low information gain; Select points in sequence. If the minimum distance from the selected points is greater than 0.5 mm, then add them to the final sampling point set; Finally, select 20 points to form the calibration sampling point set P_calibration. According to this embodiment, the distribution of the generated calibration sampling point set in the lower boundary region (0 - 50 mm) is as follows: High-density region (0 - 5 mm): 8 points; Medium-density region (5 - 15 mm): 7 points; Low-density region (15 - 50 mm): 5 points; The point distribution in the upper boundary region (950 - 1000 mm) is similar.
[0135] Obtain new measurement data using the calibration sampling point set and perform iterative optimization: Use the calibration sampling point set P_calibration to obtain new measurement data; update the original measurement data set D_raw and the enhanced data D_enhanced; repeat the steps of multi-scale feature extraction, dynamic segmentation model construction, and parameter optimization; calculate the performance metrics of the updated model: root mean square error of residuals RMSE; maximum absolute error MAE; uncertainty U. Check the termination condition: If RMSE < 0.001 mm or the improvement of RMSE in two consecutive rounds is less than 5% or the maximum number of iterations (10 rounds) is reached, stop the iteration and output the converged optimization model M_converged. In this embodiment, after 4 rounds of iteration, the model performance metrics reach: RMSE: 0.0009 mm; MAE: 0.0022 mm; uncertainty U: ±0.0018 mm (k = 2); meeting the termination condition, the converged optimization model M_converged is obtained.
[0136] Step 4: Construct a boundary region compensation function and generate calibration parameters. Based on the convergence optimization model M_converged, extract the error compensation coefficient sets for each sub-interval within the boundary region: Decompose the convergence optimization model M_converged into local model components M_local(i) for each sub-interval i of the lower boundary region (0 - 50 mm): Extract the basis function coefficients C_base(i) from the local model M_local(i), including: For the wavelet basis function interval: Extract the [a, b, s] parameters; for the fractional polynomial interval: Extract the [a, b, c, α] parameters; for the exponential decay interval: Extract the [a, b, λ] parameters. Perform the same operation on the upper boundary region (950 - 1000 mm). Map the basis function coefficients to the normalized error compensation domain: Design a mapping function f_map(i) for each sub-interval i; Calculate the normalized compensation coefficient: C_norm(i) = f_map(i)(C_base(i)). Apply the inverse normalization transformation to convert to the error compensation coefficients of actual physical quantities: Define the inverse normalization function g(i); Calculate the error compensation coefficient: E_coefficients(i) = g(i)(C_norm(i)). Verify the continuity at the boundaries of sub-intervals: For adjacent sub-intervals i and j, check |E_coefficients(i)(p_border) - E_coefficients(j)(p_border)| < ε, if not satisfied, apply a smooth transition function for adjustment, where p_border is the boundary position between adjacent sub-intervals i and j; ε is the continuity tolerance between the allowable error compensation coefficients. Integrate the error compensation coefficients of each sub-interval to form a complete set of error compensation coefficients E_coefficients. In this embodiment, the final error compensation coefficient for the 0 - 2.5 mm sub-interval of the lower boundary region is the wavelet basis function parameters [0.021, 1.35, 0.75].
[0137] Construct a piecewise continuous compensation function to ensure smooth transition across the entire range: Based on the error compensation coefficient set E_coefficients, calculate the compensation values for each sub-interval: For position p within sub-interval i: Comp_i(p) = Calculate the compensation value based on E_coefficients(i). Design a smooth transition function S_smooth for the sub-interval boundaries: S_smooth(p; p1, p2, w) = 0.5 - 0.5 * cos(π * (p - p1) / (p2 - p1)); if p1 ≤ p ≤ p2, otherwise 0 or 1; where p1, p2 are the transition interval boundaries and w is the transition width. Construct the piecewise continuous compensation function F_compensation: F_compensation(p) = Σ[Comp_i(p) * (1 - S_smooth(p; p_i, p_i+1, w_i)) + Comp_i+1(p) * S_smooth(p; p_i, p_i+1, w_i)], where p_i, p_i+1 are the boundaries of sub-intervals i and i+1, and w_i is the transition width. Verify the continuity of the piecewise continuous compensation function F_compensation: Calculate the left and right limits of the compensation function at the boundaries of each sub-interval; ensure that the difference is less than the precision requirement (0.0001mm).
[0138] Calculate the derivative of the compensation function to obtain the sensitivity compensation function: Calculate the position derivative of the compensation function F_compensation: S_initial(p) = dF_compensation(p) / dp; Use the central difference method: S_initial(p) = (F_compensation(p+h) - F_compensation(p-h)) / (2h), where h = 0.01mm. Apply a low-pass filter (cutoff frequency 10Hz) to the position derivative S_initial to remove high-frequency noise and obtain the smoothed sensitivity change curve S_smooth. Identify the sensitivity mutation points in the sensitivity change curve S_smooth: Set the threshold T_jump = 3 * std(dS_smooth / dp). If |dS_smooth(p) / dp| > T_jump, then p is a sensitivity mutation point; Record the mutation point position and change amplitude to form the sensitivity mutation point list L_jumps. Divide the range into multiple sensitivity intervals based on L_jumps and construct the sensitivity interval segmentation model M_sensitivity: Fit a local sensitivity model for each sensitivity interval; The lower boundary region is divided into 4 sensitivity intervals: 0 - 3mm, 3 - 10mm, 10 - 30mm, 30 - 50mm; Fit a polynomial model for each interval: S_poly(p) = a0 + a1*p + a2*p 2 + a3*p 3 , where a0 is the constant term; a1 is the coefficient of the linear term; a2 is the coefficient of the quadratic term; a3 is the coefficient of the cubic term. Analyze the response differences of the sensor at different measurement rates: Measure the standard displacement at 3 different rates (1mm / s, 5mm / s, 10mm / s); Analyze the influence of the rate on the sensitivity; Establish the mapping relationship between the rate and the sensitivity change; Construct the rate-dependent model M_rate: M_rate(v) = 1 + α*v + β*v 2 , where v is the measurement rate, α = -0.0012s / mm, β = 0.00005s 2 / mm 2 . Integrate the sensitivity interval segmentation model M_sensitivity and the rate-dependent model M_rate to generate the comprehensive sensitivity compensation function F_sensitivity: F_sensitivity(p, v) = M_sensitivity(p) * M_rate(v), where p is the position and v is the measurement rate. Design a sensitivity smooth transition mechanism: Apply cubic spline interpolation at the sensitivity interval boundaries; Ensure the continuity of the compensation function at the derivative level; Output the final continuous sensitivity compensation function F_sensitivity.
[0139] Combine the compensation function and the sensitivity compensation function to generate a complete calibration parameter package: Integrate the compensation function F_compensation and the sensitivity compensation function F_sensitivity to form the initial calibration parameters: P_initial = {F_compensation, F_sensitivity}. Uniformly sample the compensation function to generate a position-compensation value lookup table LUT_compensation: Sample at 0.1 mm intervals in the boundary region; generate a set of position points p_i and the corresponding compensation values c_i; form the lookup table: LUT_compensation = {(p_i, c_i)}. Sample the sensitivity compensation function to generate a position-rate-sensitivity lookup table LUT_sensitivity: Use a 0.5 mm interval in the position dimension; use a 1 mm / s interval in the rate dimension, with a range of 0 - 10 mm / s; generate a three-dimensional lookup table: LUT_sensitivity = {(p_i, v_j, s_ij)}, where v_j is the rate and s_ij is the sensitivity. Construct the static compensation parameter set P_static: P_static = {LUT_compensation, compensation function coefficients}; construct the dynamic response parameter set P_dynamic: P_dynamic = {LUT_sensitivity, rate-dependent coefficients, sensitivity interval boundaries}. Generate the complete calibration parameter package C_parameters: C_parameters = {P_static, P_dynamic, metadata}, where the metadata includes the calibration date, sensor information, calibration accuracy, etc.
[0140] Perform data compression processing on the calibration parameter package and achieve real-time calibration: Compress the lookup table using wavelet transform: Apply discrete wavelet transform (DWT) to the lookup table LUT_compensation, and retain the wavelet coefficients with an energy ratio exceeding 99.5%; Quantize and encode the wavelet coefficients. Apply principal component analysis to compress the sensitivity parameters: Construct a matrix for the three-dimensional lookup table LUT_sensitivity; Apply PCA for dimensionality reduction and retain the principal components with an explained variance exceeding 99%; Store the principal components and their coefficients. Generate the compressed calibration parameter C_compressed: C_compressed = {compressed static parameters, compressed dynamic parameters, decompression instructions, metadata}. In this example, the parameter compression rate reaches 85%, and the original parameter of 3.2 KB is compressed to 0.48 KB. Design a decompression algorithm A_decompress to quickly restore the parameters during real-time applications: Achieve the fast reconstruction of wavelet coefficients; Achieve the real-time projection recovery of PCA principal components. Develop an efficient real-time computing engine E_realtime: Integrate the decompression algorithm; Achieve fast interpolation calculation of compensation values; Optimize the calculation process of sensitivity adjustment. Implement the real-time calibration process for the sensor boundary region: Receive the original sensor measurement value R_measure; Determine whether the measurement value is in the boundary region; Obtain the current measurement rate v; Calculate the position compensation value c_p = LookupCompensation(R_measure); Calculate the sensitivity adjustment coefficient k_s = LookupSensitivity(R_measure, v); Output the calibrated measurement value O_calibrated = R_measure + c_p * k_s. Where LookupCompensation is the lookup function for the position compensation value; LookupSensitivity is the lookup function for the sensitivity adjustment coefficient. Construct a calibration performance monitoring module: Regularly sample the measurement values before and after calibration; Calculate the calibration effect indicators; Trigger adaptive optimization if necessary.
[0141] After the method of this embodiment is applied to the JSW-5000 type optical scale displacement sensor, the verification results of the calibration effect of the boundary region are as follows: Improvement in boundary region accuracy: Before calibration: The average error in the boundary region (0-5% range) is 0.015 mm, and the maximum error is 0.032 mm; After calibration: The average error in the boundary region is 0.002 mm, and the maximum error is 0.005 mm; Improvement in accuracy: The average error is reduced by 86.7%, and the maximum error is reduced by 84.4%. Sensitivity compensation effect: Static measurement: The sensitivity change in the boundary region is reduced from ±12% to ±1.5%; Dynamic measurement (10 mm / s): The sensitivity deviation in the boundary region is reduced from ±18% to ±2.8%. Temperature stability: Tested in the temperature range of 15-35 °C, the calibration effect is stable, and the accuracy change in the boundary region does not exceed 10%. Long-term stability: Continuous monitoring for one month, the calibration parameters are stable, and the accuracy is maintained within ±0.003 mm. Resource occupancy: The compressed calibration parameters only occupy 0.48 KB of storage space; The real-time calibration calculation delay is less than 0.2 ms, meeting the requirements of high-speed control. This embodiment verifies the effectiveness of the boundary region calibration method of the displacement sensor of the present invention in practical applications, especially its significant advantages in improving the measurement accuracy of the boundary region, improving the dynamic response characteristics, and optimizing the calibration resource allocation.
[0142] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A displacement sensor boundary area calibration method, characterized in that: The following steps are involved: Obtain the original measurement data set of the displacement sensor, perform multi-scale boundary feature extraction and analysis, and obtain multi-scale feature vectors and boundary feature recognition fingerprints; The original measurement data set includes measurement points in the boundary area and the middle area; the boundary area is the 0-5% and 95-100% range of the measurement range; Based on multi-scale feature vectors and boundary feature recognition fingerprints, a dynamic segmented mixed error model is constructed to obtain a balanced error model and interval uncertainty. Based on the balanced error model and interval uncertainty, an intelligent iterative calibration process is implemented to obtain a converged optimization model; Based on the converged optimization model, a boundary area compensation function and calibration parameters are generated to obtain a calibration parameter package for calibrating the boundary area of the displacement sensor; The steps of performing multi-scale boundary feature extraction and analysis to obtain a multi-scale feature vector and a boundary feature recognition fingerprint include: Obtain the original measurement data set and perform enhanced sampling in the boundary area to obtain enhanced data; Applying local differential transformation to the original measurement data set and the enhanced data to obtain the boundary feature spectrum; Extract features at different scales from the boundary feature spectrum and combine them to form a multi-scale feature vector; Based on the multi-scale feature vectors, the scale correlation matrix is calculated to quantify the intrinsic correlation between features at different scales; Using multi-scale feature vectors and scale correlation matrix, we compare and analyze the feature differences between the boundary area and the middle area, and construct the boundary feature recognition fingerprint; The steps of obtaining the boundary feature spectrum and forming the multi-scale feature vector include: Mapping the original measurement data set and the enhanced data into the frequency space to obtain a frequency distribution diagram; Performing local feature enhancement processing on the frequency distribution graph to obtain an enhanced spectrum; Perform spatial correlation processing based on the enhanced spectrum to form a boundary feature spectrum; Extract microscopic features at small scale, local features at medium scale and macroscopic features at large scale from the boundary feature spectrum; The microscopic features, local features and macroscopic features are integrated to form a multi-scale feature vector; The steps of implementing intelligent iterative calibration processing to obtain a converged optimization model include: Based on the balanced error model and interval uncertainty, an iterative optimization model is constructed and the difference between its predicted value and the actual measured value is analyzed to obtain the residual vector. Perform density estimation analysis on the residual vector, construct the residual probability distribution, and calculate the position-related uncertainty entropy value; Combining the uncertainty entropy value, interval uncertainty and residual vector, a sampling importance function is constructed to obtain a non-uniform sampling strategy and generate a set of candidate sampling points. Apply information gain evaluation to the candidate sampling point set, remove points with redundant information, obtain a calibration sampling point set and generate sampling execution instructions containing precise position information and measurement parameter configuration; Iterative optimization is performed based on the sampling execution instructions until a preset accuracy threshold or an upper limit of the number of iterations is reached to obtain a converged optimization model; The steps of constructing a dynamic piecewise mixed error model and obtaining a balanced error model and interval uncertainty include: Based on the multi-scale feature vector and the boundary feature recognition fingerprint, the key turning point set in the boundary area is identified, and the boundary area is divided into predetermined sub-intervals accordingly; Constructing specific basis functions for each subinterval to obtain an adaptive basis function library; According to the set of key turning points, the error response characteristics of the boundary region are decomposed into multimodal components, including reference component, system component, random component and coupling component; Based on the adaptive basis function library and multimodal components, a dynamic piecewise mixed error model is constructed and a model complexity penalty factor is introduced to obtain a balanced error model. Compute the interval uncertainty of the balanced error model and assign an uncertainty estimate to each subinterval of the model.
2. The method according to claim 1, characterized in that The steps to calculate the scale association matrix include: Decompose the multi-scale feature vector into three sub-vectors: microscopic, local and macroscopic features; Construct a feature mapping space, project the three sub-vectors into the same reference coordinate system, and obtain standardized microscopic, standardized local, and standardized macroscopic features; Using a sliding window technique, the cross-correlation functions between the normalized microscopic, normalized local, and normalized macroscopic features are calculated to obtain a set of cross-correlation vectors; Based on the cross-correlation vector set, a cross-correlation tensor representing the correlation between different scales and positions is constructed and singular value decomposition is performed to extract cross-scale patterns. Based on the cross-scale pattern, a scale correlation matrix is constructed; its eigenvalues and eigenvectors are calculated to obtain the correlation eigenvectors used to characterize the dominant mode of cross-scale coupling in the boundary area.
3. The method according to claim 1, characterized in that The steps of constructing a specific basis function for each subinterval and obtaining an adaptive basis function library include: The characteristics of the boundary area sub-intervals are analyzed according to the key turning point set, and the interval characteristics classification is obtained, including high-frequency micro-fluctuation interval, medium-frequency transition interval and low-frequency system error interval; Construct wavelet basis functions for high-frequency micro fluctuation ranges; Construct fractional polynomial basis functions for the intermediate frequency transition interval; For the low-frequency system error interval, an exponential decay basis function is constructed; The parameters of wavelet, fractional polynomial and exponential decay basis functions are optimized to make them best fit the error characteristics of the corresponding interval, and the optimized basis function set is obtained; the optimized basis function set is integrated into an adaptive basis function library.
4. The method according to claim 1, characterized in that The steps of decomposing the error response characteristics of the boundary region into multimodal components include: Perform error response analysis on the boundary area according to the key turning point set to obtain error response characteristics; Extracting a reference component reflecting the basic linear response of the measurement system from the error response characteristics; Combining the error response characteristics and the reference components, the system components reflecting the inherent system deviation of the sensor are extracted; Based on the error response characteristics, the reference component and the system component, the random component reflecting the random fluctuation in the measurement process is extracted; Analyze the interaction between the reference component, system component and random component, and extract the coupling component reflecting the mutual interference of different error sources; The reference component, system component, random component and coupling component are integrated into multimodal components.
5. The method according to claim 1, characterized in that The steps of generating a boundary area compensation function and calibration parameters and obtaining a calibration parameter package include: Based on the convergence optimization model, the error compensation coefficient set of each sub-interval in the boundary area is extracted to construct a piecewise continuous compensation function. Calculate the derivative of the piecewise continuous compensation function to obtain the sensitivity compensation function; Combining the piecewise continuous compensation function and the sensitivity compensation function, a complete calibration parameter package is generated, including static compensation parameters and dynamic response parameters; Perform data compression processing on the calibration parameter package to generate compressed calibration parameters.
6. The method according to claim 5, characterized in that The steps of calculating the derivative of the piecewise continuous compensation function and obtaining the sensitivity compensation function include: Calculate the position derivative of the piecewise continuous compensation function to obtain a sensitivity variation curve representing the spatial variation of sensor sensitivity; Identify the sensitivity mutation points in the sensitivity change curve, record their positions and change amplitudes, and form a sensitivity mutation point list; Based on the sensitivity mutation point list, the measuring range is divided into predetermined sensitivity intervals, and a sensitivity interval segmentation model is constructed; Analyze the response differences of displacement sensors at different measurement rates, establish a mapping relationship between rate and sensitivity changes, and form a rate-dependent model; The sensitivity interval segmentation model and the rate-dependent model are integrated to generate a comprehensive sensitivity compensation function; A sensitivity smooth transition mechanism is constructed to eliminate the discontinuity of the comprehensive sensitivity compensation function at the derivative level and obtain the final sensitivity compensation function.
Citation Information
Patent Citations
Forest fire point positioning method combining sky map and mobile phone image
CN116563699A
Signal pre-compensation method of digital signal generator
CN118232880A