Dynamic environment compensation TDC displacement sensor calibration method and system
By integrating an environmental sensing module and a dynamic compensation model, multi-dimensional environmental data is collected in real time for weighted compensation, and parameters are updated online. This solves the accuracy and stability problems of TDC displacement sensors in complex environments, and realizes adaptive environmental compensation and intelligent calibration.
Patent Information
- Application Number
- CN202511649872.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-17
AI Technical Summary
Existing TDC displacement sensors have difficulty guaranteeing measurement accuracy and stability in complex and variable environments. Traditional compensation methods ignore humidity and vibration interference, and static compensation models cannot adapt to dynamic environmental changes, resulting in inaccurate measurement results and poor reliability.
By integrating an environmental sensing module to collect temperature, humidity, and vibration intensity data in real time, a dynamic compensation model is used to perform multi-parameter fusion and weighted compensation, and online calibration is performed when conditions are met to update model parameters and achieve adaptive environmental compensation.
It significantly improves the measurement accuracy and stability of the sensor in complex environments, has online self-calibration and self-diagnosis capabilities, enhances the reliability and availability of the system, and automatically updates model parameters to adapt to environmental changes.
Smart Images

Figure CN121541176A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of TDC displacement sensor calibration scheme design technology, specifically to a TDC displacement sensor calibration method and system with dynamic environmental compensation. Background Technology
[0002] Time-to-digital converter (TDC) displacement sensors, characterized by their high precision and high resolution, are widely used in industrial automation, precision measurement, and robotics. Their basic principle is to calculate distance by measuring the time of flight of ultrasonic or laser signals. However, the measurement accuracy of these sensors is highly susceptible to interference from the working environment. Traditional technologies primarily focus on the impact of temperature changes on the speed of sound or light, employing fixed temperature compensation coefficients for correction. This single compensation method has significant limitations: firstly, it ignores the coupling effect of humidity changes on the speed of sound propagation, as well as the interference of mechanical vibration on the sensor's stability and signal reception quality; secondly, static compensation models cannot adapt to dynamic and rapid fluctuations in environmental parameters, leading to poor compensation performance or even introducing additional errors under complex operating conditions; furthermore, sensor calibration is typically performed in ideal laboratory environments, and its parameters are prone to failure in real, variable application scenarios, with a lack of effective means for online calibration during use. Therefore, existing TDC displacement sensors struggle to guarantee the reliability and long-term stability of their measurement results when facing complex and variable environmental factors, limiting their application in high-end equipment and harsh environments.
[0003] Therefore, the existing technology still needs further development. Summary of the Invention
[0004] The purpose of this invention is to overcome the above-mentioned technical deficiencies and provide a dynamic environmental compensation TDC displacement sensor calibration method and system to solve the problems existing in the prior art.
[0005] To achieve the above-mentioned technical objectives, according to a first aspect of the present invention, the present invention provides a calibration method for a TDC displacement sensor with dynamic environmental compensation, comprising: S1. Acquire raw measurement data from the TDC displacement sensor in real time, and simultaneously collect environmental parameter data including at least temperature, humidity and vibration intensity; S2. Based on the environmental parameter data, the state compensation amount corresponding to the current environment is calculated through a dynamic compensation model; S3. Correct the original measurement data using the state compensation amount, and output the displacement measurement value after environmental compensation; S4. When the preset conditions are met, start the online calibration process to update the parameters of the dynamic compensation model.
[0006] Specifically, in S1, the synchronous acquisition is achieved through an environmental sensing module integrated with a TDC displacement sensor, which includes a temperature and humidity sensor and a vibration sensor.
[0007] Specifically, the vibration intensity data collected by the environmental sensing module is used to identify the mechanical vibration state of the sensor and select different compensation strategies according to different vibration states.
[0008] Specifically, in S2, the dynamic compensation model is a weighted compensation model based on multivariate parameter fusion, which assigns different weight factors according to the contribution of each environmental parameter to the measurement accuracy.
[0009] Specifically, the weighting factors can be adaptively adjusted based on historical measurement data and environmental change trends.
[0010] Specifically, the dynamic compensation model also introduces a nonlinear compensation term to handle the nonlinear relationship between environmental parameters and measurement errors.
[0011] Specifically, in S4, the preset conditions include at least one of the following: system power-on initialization, environmental parameter changes exceeding a set threshold, receiving an external calibration command, or reaching a preset periodic calibration time point.
[0012] Specifically, the online calibration process includes: collecting TDC measurement data and environmental parameters under multiple sets of different environmental combinations under a known reference displacement, and fitting the latest parameters of the dynamic compensation model through regression analysis.
[0013] Specifically, it also includes step S5: monitoring the working status of the environmental perception module, and when abnormal data is detected, initiating a degradation compensation strategy or issuing a fault alarm.
[0014] According to a second aspect of the present invention, a dynamic environmental compensation TDC displacement sensor calibration system is provided, comprising: The data acquisition module is used to acquire raw measurement data and environmental parameter data of TDC in real time; The dynamic compensation model processing module is used to calculate the state compensation amount based on environmental parameter data using a dynamic compensation model. The data correction module is used to correct the original measurement data using state compensation and output the final displacement value. The online calibration control module is used to initiate the online calibration process and update the parameters of the dynamic compensation model when certain conditions are met.
[0015] Beneficial effects: The TDC displacement sensor calibration method and system with dynamic environmental compensation provided by this invention brings multiple significant benefits through the synergistic innovation of multi-dimensional environmental perception, intelligent algorithm fusion, and online self-calibration. The most core benefit lies in achieving a technological leap from single static compensation to multi-dimensional dynamic adaptive compensation. By simultaneously sensing multiple environmental parameters such as temperature, humidity, and vibration, and constructing a fusion compensation model based on adaptive adjustment of weighting factors, the system can accurately capture and quantify the combined influence of various factors on measurement errors, thereby performing more accurate and comprehensive corrections and significantly improving the accuracy and stability of the sensor in complex and non-stationary environments. Secondly, this invention endows the sensor with intelligent online self-calibration and self-diagnosis capabilities. During operation, the system can automatically trigger the calibration process based on environmental changes, updating model parameters to ensure that the compensation effect always matches the current environment and sensor state, effectively overcoming the performance degradation problem caused by fixed calibration parameters in traditional methods. Simultaneously, the system can also monitor the health status of its own sensing units and initiate degradation strategies or alarms in case of anomalies, greatly enhancing the reliability and availability of the system. In summary, this invention not only solves the problem of ensuring accuracy in complex environments, but also promotes the development of displacement sensors towards intelligence, high reliability, and self-maintenance, and has significant industrial application value. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the TDC displacement sensor calibration method for dynamic environmental compensation provided in a specific embodiment of the present invention. Figure 2 This is a schematic diagram of the system composition of the TDC displacement sensor calibration system with dynamic environmental compensation provided in a specific embodiment of the present invention. Detailed Implementation
[0017] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Based on the embodiments in this application, other similar embodiments obtained by those skilled in the art without creative effort should all fall within the scope of protection of this application. Furthermore, directional terms mentioned in the following embodiments, such as "up," "down," "left," and "right," are only for reference to the directions in the accompanying drawings; therefore, the directional terms used are for illustrative purposes and not for limiting the invention.
[0018] The present invention will be further described below with reference to the accompanying drawings and preferred embodiments.
[0019] Please see Figure 1 This invention provides a calibration method for a TDC displacement sensor with dynamic environmental compensation, comprising: S1. Acquire raw measurement data from the TDC displacement sensor in real time, and simultaneously collect environmental parameter data including at least temperature, humidity and vibration intensity.
[0020] It should be further explained that real-time synchronous acquisition is crucial in step S1, ensuring the time consistency between environmental parameters and measurement data and avoiding compensation errors caused by time asynchrony. The TDC displacement sensor measures flight time or phase difference based on the time-to-digital conversion principle, and its raw data is susceptible to environmental interference. The dynamic compensation model in step S2 is the core, calculating a correction amount based on real-time environmental data. This model can be an analytical model based on physical principles or a data-driven fitting model. Step S3 applies the compensation amount to the raw data, directly outputting more accurate results. The online calibration process in step S4 enables the system to have self-learning capabilities, adapting to sensor aging or long-term drift of environmental characteristics. The preferred environmental parameter sampling frequency is 10Hz to 100Hz, which effectively captures temperature, humidity, and vibration changes in typical industrial environments without placing excessive computational burden on the processing unit. The beneficial effect of this method is that it achieves a leap from passive fixed compensation to active dynamic adaptation. Through a closed-loop "measurement-compensation-calibration" mechanism, it significantly improves the long-term measurement accuracy and stability of the sensor in complex and variable environments.
[0021] Specifically, in S1, the synchronous acquisition is achieved through an environmental sensing module integrated with a TDC displacement sensor, which includes a temperature and humidity sensor and a vibration sensor.
[0022] It should be further explained that integrated packaging refers to encapsulating a temperature and humidity sensor (such as the digital sensor SHT35), a vibration sensor (such as a MEMS accelerometer), and the TDC ranging core (such as a circuit based on the TDC-GP22 chip) together in a single housing. This physical tight integration ensures a high degree of consistency between the microenvironment in which the environmental sensing unit and the measurement core are located, avoiding the problem that the measured environmental parameters cannot accurately reflect the environmental conditions affecting the TDC core due to separation of installation positions. A triaxial accelerometer is preferred as the vibration sensor to obtain vibration intensity in three orthogonal directions. All sensors are connected to a microcontroller (such as the STM32G4 series) via internal PCB traces for data reading and synchronization. Its benefits include providing the hardware foundation for high-precision synchronous acquisition, reducing system error sources at the physical level, and improving the reliability and consistency of the entire compensation system.
[0023] Specifically, the vibration intensity data collected by the environmental sensing module is used to identify the mechanical vibration state of the sensor and select different compensation strategies according to different vibration states.
[0024] It should be further explained that vibration states can be roughly divided into "no / weak vibration," "continuous steady vibration," and "severe impact vibration." For example, the state can be classified by calculating the effective value (RMS) of the vibration signal: when RMS < 0.1g, it is considered no / weak vibration; when 0.1g ≤ RMS < 0.5g, it is considered continuous steady vibration; and when RMS ≥ 0.5g, it is considered severe impact vibration. This threshold is chosen because 0.1g is the upper limit of background vibration in common industrial equipment, and 0.5g usually means strong impact or abnormal vibration. Different strategies are adopted for different states: under weak vibration, no additional vibration compensation may be needed or only basic high-pass filtering may be enabled; under steady vibration, a dynamic filtering algorithm based on vibration frequency and amplitude is enabled; under severe impact, the data can be judged as unreliable, and the measurement result can be directly discarded or an increased uncertainty flag can be output. Its beneficial effect is that it realizes intelligent hierarchical compensation, avoids the introduction of noise by over-compensation in calm environments, and effectively protects the system output from severe pollution under strong vibration, thus optimizing the overall performance of the system under different operating conditions.
[0025] S2. Based on the environmental parameter data, the state compensation amount corresponding to the current environment is calculated through a dynamic compensation model.
[0026] Specifically, in S2, the dynamic compensation model is a weighted compensation model based on multivariate parameter fusion, which assigns different weight factors according to the contribution of each environmental parameter to the measurement accuracy.
[0027] It should be further explained that this model can be expressed as a weighted sum function: ΔC = w_T f_T(T)+w_H f_H(H)+w_V In the formula f_V(V), ΔC is the calculated total compensation amount (in microseconds or picoseconds, consistent with the TDC output unit); w_T, w_H, and w_V are the weighting factors for temperature (T), humidity (H), and vibration intensity (V), respectively, and are dimensionless; f_T(T), f_H(H), and f_V(V) are the compensation functions for temperature, humidity, and vibration intensity, respectively, with the same output unit as ΔC. These compensation functions can be linear functions, polynomials, or lookup tables. The weighting factors reflect the degree of influence of different environmental factors on the error under the current environment. Its beneficial effect is that it provides a flexible and interpretable compensation framework. By adjusting the weights, it can adapt to the dominant environmental interference factors in different application scenarios, enhancing the universality of the method.
[0028] Specifically, the weighting factors can be adaptively adjusted based on historical measurement data and environmental change trends.
[0029] It should be further explained that one implementation method is as follows: the system continuously records the values of various environmental parameters and their rates of change (derivatives) within a time window (e.g., the most recent 5 minutes). If the rate of change of a certain parameter is consistently significantly higher than that of other parameters (e.g., the temperature rate of change reaches 0.5°C / min, while the humidity rate of change is only 1%RH / min), the system automatically increases the weight factor w_T of that parameter (temperature in this case), because rapidly changing environmental factors are likely to be the main source of current measurement error. Weight adjustment can be based on a predefined rule base or a simple gradient descent method, with the goal of minimizing the fluctuation (variance) of recent measurement data for online optimization. Its beneficial effect is that it enables the compensation model to possess an environmentally aware "attention mechanism," dynamically focusing on the most significant environmental disturbances, thereby maintaining excellent compensation performance even in non-stationary environments and improving the system's intelligence level.
[0030] Specifically, the dynamic compensation model also introduces a nonlinear compensation term to handle the nonlinear relationship between environmental parameters and measurement errors.
[0031] S3. The original measurement data is corrected using the state compensation amount, and the displacement measurement value after environmental compensation is output.
[0032] It should be further noted that nonlinear compensation terms can incorporate cross terms or higher-order terms. For example, the extended formula is: ΔC = w_T f_T(T)+w_H f_H(H)+w_V f_V(V)+w_{TH} f_T(T) f_H(H)+w_{T^2} [f_T(T)]^2+…, where w_{TH} is the weight of the temperature and humidity cross term, and w_{T^2} is the weight of the temperature square term. This is because the influence of environmental factors on TDC measurement errors is often not independent. For example, the combined effect of high temperature and high humidity may be much greater than the sum of their individual effects (synergistic effect), exhibiting strong nonlinearity. Introducing these terms can more accurately fit complex real-world physical phenomena. Its beneficial effect is that it significantly improves the accuracy of the compensation model under extreme or complex environmental combinations, overcomes the potential underfitting problem of simple linear weighted models, and makes the compensation effect closer to the true physical laws.
[0033] S4. When the preset conditions are met, start the online calibration process to update the parameters in the dynamic compensation model.
[0034] Specifically, in S4, the preset conditions include at least one of the following: system power-on initialization, environmental parameter changes exceeding a set threshold, receiving an external calibration command, or reaching a preset periodic calibration time point.
[0035] It should be further explained that calibration is performed during system power-on initialization to ensure operation from a known good state. Calibration is triggered when environmental parameters change beyond thresholds (e.g., temperature change exceeding 10°C, humidity change exceeding 20%RH) because the original model parameters may no longer be optimal under the new environment and need to be updated. Receiving external commands allows users to force calibration, providing flexibility. Periodic calibration (e.g., every 24 hours) is an effective means of combating long-term slow drift. These conditions together constitute a comprehensive triggering strategy, the beneficial effect of which is to ensure that the dynamic compensation model can track the evolution of the system's own characteristics and the external environment in a timely manner, always maintaining optimal compensation performance and achieving accuracy maintenance throughout its entire lifecycle.
[0036] Specifically, the online calibration process includes: collecting TDC measurement data and environmental parameters under multiple sets of different environmental combinations under a known reference displacement, and fitting the latest parameters of the dynamic compensation model through regression analysis.
[0037] It should be further noted that this process typically needs to be carried out under controlled conditions. For example, in a laboratory setting or after installation, the sensor is aligned with a target plate at a fixed distance (the reference displacement L_ref is known). Then, environmental changes are actively or passively awaited (such as temperature cycling), or small environmental changes are created using the system's own environmental control unit (such as a small heater). N sets of data (N≥20, to ensure statistical significance) are collected: each set includes the original distance L_meas_i measured by the TDC and the corresponding environmental parameter vector [T_i,H_i,V_i]. The measurement error is E_i=L_meas_i-L_ref. Subsequently, with the environmental parameters as independent variables and the measurement error E as the dependent variable, multiple linear regression or nonlinear least squares method is used to fit the functional form and parameters (such as weights w, polynomial coefficients) in the dynamic compensation model. Its beneficial effect is that it provides a practical and automated method for updating model parameters, requiring no manual intervention or sensor disassembly, greatly reducing the difficulty and cost of later maintenance.
[0038] Specifically, it also includes step S5: monitoring the working status of the environmental perception module, and when abnormal data is detected, initiating a degradation compensation strategy or issuing a fault alarm.
[0039] It should be further explained that the monitoring of the environmental sensing module's operating status includes: checking whether sensor data is within a reasonable range (e.g., temperature -40°C to 125°C), whether the data remains unchanged for a long time (freezing), or whether there is a logical conflict with other sensor data (e.g., severe vibration but a sudden jump in temperature reading). Once an abnormality is detected in the data from an environmental sensor, a degradation strategy is initiated: for example, if the humidity sensor fails, the compensation model no longer uses the humidity parameter and compensates only based on temperature and vibration, while outputting a status flag indicating "degraded operation". If multiple sensors fail, it can revert to a fixed default compensation value or directly output the original data and issue an alarm. Its beneficial effect is that it adds fault tolerance to the system, preventing severe deterioration of output results due to faults in the compensation system itself, and even providing relatively accurate measurement values in the event of partial damage, greatly improving the robustness and availability of the entire sensor system.
[0040] Please see Figure 2 The present invention provides another embodiment, which provides a dynamic environmental compensation TDC displacement sensor calibration system, the dynamic environmental compensation TDC displacement sensor calibration system comprising: Data acquisition module 100 is used to acquire raw TDC measurement data and environmental parameter data in real time; The dynamic compensation model processing module 200 is used to calculate the state compensation amount based on environmental parameter data through a dynamic compensation model. The data correction module 300 is used to correct the original measurement data using the state compensation amount and output the final displacement value. The online calibration control module 400 is used to initiate the online calibration process and update the parameters of the dynamic compensation model when certain conditions are met.
[0041] It should be further noted that the data acquisition module includes the necessary analog / digital interface circuitry (such as SPI, I2C) to read data from each sensor. The dynamic compensation model processing module and data correction module are typically implemented using software algorithms within an embedded microcontroller (MCU) or digital signal processor (DSP). The online calibration control module is also implemented using software logic, responsible for monitoring trigger conditions and managing the calibration process. All these modules can be integrated onto the same PCB and packaged together with the TDC core circuitry and environmental sensing sensors. The advantage is that it provides a highly integrated, hardware-software co-working solution, transforming innovative methods into mass-producible physical products, enabling high-performance dynamic environmental compensation capabilities to be easily applied to various practical displacement measurement scenarios.
[0042] In a preferred embodiment, this application also provides an electronic device, the electronic device comprising: The computer device includes a memory and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, implement the TDC displacement sensor calibration method with dynamic environmental compensation. The computer device can be broadly categorized as a server, terminal, or any other electronic device with the necessary computing and / or processing capabilities. In one embodiment, the computer device may include a processor, memory, network interface, communication interface, etc., connected via a system bus. The processor of the computer device can be used to provide the necessary computing, processing, and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and internal memory. The non-volatile storage medium may store an operating system, computer programs, etc. The internal memory can provide an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface and communication interface of the computer device can be used to connect and communicate with external devices via a network. When the computer program is executed by the processor, it performs the steps of the method of the present invention.
[0043] This invention can be implemented as a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the steps of the methods of embodiments of the invention to be performed. In one embodiment, the computer program is distributed across multiple network-coupled computer devices or processors, such that the computer program is stored, accessed, and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be executed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be executed by one or more computer devices or processors, and one or more other method steps / operations may be executed by one or more other computer devices or processors. One or more computer devices or processors may execute a single method step / operation, or execute two or more method steps / operations.
[0044] Those skilled in the art will understand that the method steps of this invention can be performed by a computer program instructing related hardware, such as a computer device or processor, to perform the steps of this invention when executed. Depending on the context, any references herein to memory, storage, databases, or other media may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid-state drive, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.
[0045] The technical features described above can be combined arbitrarily. Although not all possible combinations of these technical features are described, any combination of these technical features should be considered to be covered by this specification, provided that such combination does not contain contradictions.
[0046] The specific embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention. Any other corresponding changes and modifications made in accordance with the technical concept of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A dynamic environment compensated TDC displacement sensor calibration method, characterized by, Comprising the following steps: S1. Real-time acquisition of TDC displacement sensor raw measurement data, and synchronous collection of environmental parameter data including at least temperature, humidity and vibration intensity; S2. Based on the environmental parameter data, the state compensation amount corresponding to the current environment is calculated through a dynamic compensation model; S3. The original measurement data is corrected using the state compensation amount, and the displacement measurement value after environmental compensation is output; S4. When the preset condition is met, start the online calibration process to update the parameters of the dynamic compensation model.
2. The method of claim 1, wherein, In S1, the synchronous collection is realized through an environment perception module integrated with the TDC displacement sensor, which contains a temperature and humidity sensor and a vibration sensor.
3. The method of claim 2, wherein, The vibration intensity data collected by the environment perception module is used to identify the mechanical vibration state of the sensor, and different compensation strategies are selected according to different vibration states.
4. The method of claim 1, wherein, In S2, the dynamic compensation model is a weighted compensation model based on multi-parameter fusion, which allocates different weight factors according to the contribution of each environmental parameter to the measurement accuracy.
5. The method of claim 4, wherein, The weight factor can be adaptively adjusted according to historical measurement data and environmental change trend.
6. The method of claim 5, wherein, The dynamic compensation model also introduces a nonlinear compensation term to handle the nonlinear relationship between environmental parameters and measurement errors.
7. The method of claim 1, wherein, In S4, the preset condition includes at least one of the following: system power initialization, environmental parameter change exceeding the set threshold, receiving external calibration instruction, or reaching the preset periodic calibration time point.
8. The method of claim 7, wherein, The online calibration process includes: under the known reference displacement, collecting multiple sets of TDC measurement data and environmental parameters under different environmental combinations, and fitting the latest parameters of the dynamic compensation model through regression analysis.
9. The method of claim 1, wherein, It also includes step S5: monitoring the working state of the environment perception module, and starting the degradation compensation strategy or issuing a fault alarm when data anomalies are detected.
10. A dynamic environmental compensated TDC displacement sensor calibration system for implementing the method according to any one of claims 1-9, characterized by Comprising: A data acquisition module for real-time acquisition of TDC raw measurement data and environmental parameter data; A dynamic compensation model processing module for calculating the state compensation amount based on the environmental parameter data through a dynamic compensation model; A data correction module for correcting the original measurement data using the state compensation amount to output the final displacement value; An online calibration control module for starting the online calibration process to update the parameters of the dynamic compensation model when the condition is met.