An adaptive signal compensation method and device based on derivative analysis

An adaptive signal compensation method based on derivative analysis and environmental correction solves the contradiction between sensor signal response hysteresis and overshoot, as well as the problem of environmental drift. It achieves fast response, low overshoot, and high-precision signal compensation, and is suitable for temperature, pressure, humidity, and flow sensors.

CN122524169BActive Publication Date: 2026-11-03HANGZHOU PUYU TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610992234.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-11-03
Estimated Expiration
2046-07-06

AI Technical Summary

Technical Problem

Existing sensor signal compensation methods suffer from problems such as response lag and overshoot contradiction, poor hardware adaptability, and the impact of environmental condition drift on measurement accuracy. In particular, these problems lead to measurement errors and control system malfunctions when there are rapid temperature changes and fluctuations in environmental parameters.

Method used

By using an adaptive signal compensation method based on derivative analysis, the signal change rate is monitored in real time, the compensation intensity is dynamically adjusted using a monotonically decreasing function, and a comprehensive correction coefficient based on environmental operating parameters is used to achieve rapid signal response and overshoot suppression, and eliminate baseline drift caused by environmental fluctuations.

Benefits of technology

It significantly improves the response speed and stability of the sensor, reduces the overshoot amplitude, enhances measurement accuracy and hardware adaptability, and is suitable for signal processing of various sensors with first-order hysteresis characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122524169B_ABST
    Figure CN122524169B_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-adapting signal compensation method and device based on derivative analysis, compensation method includes the original measurement signal T (i) of time acquisition sensor and each environmental condition parameter;According to the deviation of each environmental condition parameter and calibration value, calculate comprehensive correction coefficient k, carry out static correction to original measurement signal, obtain after correction signal T_corrected (i)=k·T (i);The rate of change of modified signal is calculated;Based on the rate of change, according to adaptive compensation formula, calculate final compensation signal: T_com (i)=k·T (i)+τ·exp (‑α·|d (|k·T (i)|+β) / dt|) ·[d (k·T (i)) / dt], wherein τ is sensor time constant, α is gain adjustment parameter, β is constant offset, exp (·) is exponential function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial measurement and signal processing technology, specifically to an adaptive signal compensation method and device based on derivative analysis, which is suitable for real-time dynamic compensation of sensor signals with first-order hysteresis characteristics such as temperature, pressure, humidity, and flow rate. Background Technology

[0002] In industrial process control and scientific measurement, the accuracy and real-time response of sensor signals directly determine the performance of the measurement system. Taking temperature measurement as an example, armored thermocouples are widely used for temperature detection in high-temperature or harsh environments due to their robust structure and corrosion resistance. However, armored thermocouples have an inherent thermal conduction delay; that is, the temperature change of the measured medium must be conducted through the protective shell to the internal thermocouple wire sensing end, a process characterized by a time constant τ. When the measured temperature changes rapidly, the thermocouple's output signal will lag significantly behind the actual temperature, resulting in dynamic measurement errors.

[0003] To compensate for this dynamic error, traditional methods typically employ the first-order system compensation formula: T_com = T + τ·dT / dt, where T is the measured temperature, τ is the time constant, and dT / dt is the rate of temperature change. This formula, based on the assumption of a linear system, works well when the temperature changes slowly. However, direct application during rapid temperature increases can lead to severe overshoot in the compensation signal, with overshoot reaching tens of degrees Celsius, easily triggering false alarms or malfunctions in the control system.

[0004] To address the overshoot problem, existing technologies often employ the infinitesimal method, which divides the time axis into extremely short, tiny intervals. Within each interval, the system is approximated as linear, and continuous compensation is approximated by increasing the sampling frequency. This method has several significant drawbacks: First, it requires extremely high sampling frequencies, while temperature signals are not inherently high-frequency signals. Excessively high sampling frequencies not only introduce substantial high-frequency noise but also lead to wasted hardware resources and a significant increase in cost. Second, it has poor adaptability. When replacing thermocouples with different time constants, a matching sampling circuit must be redesigned. Sensors with larger time constants require even higher sampling frequencies, increasing the complexity of system development and maintenance.

[0005] Furthermore, in actual industrial applications, the sensor output signal is affected not only by its own dynamic characteristics but also by fluctuations in various environmental parameters. Taking flame temperature measurement in a hydrogen flame ionization detector as an example, changes in factors such as hydrogen flow rate, total sample gas flow rate, detector cell temperature, and injection pressure can all cause the flame temperature baseline to drift. If not corrected, this will lead to zero-point drift and a decrease in measurement accuracy.

[0006] Therefore, there is an urgent need for an adaptive signal compensation method that can balance fast response and overshoot suppression, while effectively compensating for environmental drift, without increasing the sampling frequency. Summary of the Invention

[0007] The purpose of this invention is to overcome the problems of response lag and overshoot contradiction, poor hardware adaptability, and the impact of environmental drift on measurement accuracy in existing sensor signal compensation methods. It provides an adaptive signal compensation method and device based on derivative analysis. This method monitors the rate of signal change in real time and dynamically adjusts the compensation intensity using a monotonically decreasing function. It automatically suppresses the compensation amplitude to prevent overshoot when the signal changes rapidly and automatically restores the compensation intensity to accelerate the response when the signal changes slowly. Simultaneously, by introducing a comprehensive correction coefficient based on environmental parameters, the original measurement signal is statically corrected, effectively eliminating baseline drift caused by environmental fluctuations, ultimately achieving high-precision, fast-response, and low-overshoot real-time signal compensation.

[0008] In a first aspect, the present invention provides an adaptive signal compensation method based on derivative analysis, comprising the following steps:

[0009] The raw measurement signal T(i) from the sensor is acquired in real time, where i represents the sampling time;

[0010] Collect at least one environmental condition parameter that affects the measurement baseline, and calculate the comprehensive correction coefficient k based on the deviation of each environmental condition parameter from its respective calibration value;

[0011] The original measurement signal T(i) is corrected using the comprehensive correction coefficient k to obtain the corrected signal T_corrected(i) = k·T(i);

[0012] Calculate the rate of change dT_corrected / dt of the corrected signal T_corrected(i) at the current time.

[0013] Based on the rate of change dT_corrected / dt, the final compensation signal T_com(i) is calculated according to the following adaptive compensation formula:

[0014] T_com(i)=T_corrected(i)+τ·f(|dT_corrected / dt|)·(dT_corrected / dt)

[0015] Where τ is the time constant of the sensor, and f(|dT_corrected / dt|) is a monotonically decreasing function with the absolute value of the rate of change |dT_corrected / dt| as the independent variable. This function reduces the compensation intensity to suppress overshoot when the rate of change increases, and restores the compensation intensity to speed up the response when the rate of change decreases.

[0016] Preferably, the monotonically decreasing function f(|dT_corrected / dt|) adopts an exponential decay form:

[0017] f(|dT_corrected / dt|)=exp(-α·|dT_corrected / dt|)

[0018] Where α is the normal gain adjustment parameter, and exp(·) is an exponential function with the natural constant e as the base.

[0019] Preferably, the original measurement signal is a temperature signal, and the sensor is a thermocouple; the environmental operating parameters include at least one of hydrogen flow rate, total sample gas flow rate, detector cell temperature, and injection pressure.

[0020] Preferably, the calculation of the comprehensive correction coefficient k specifically includes:

[0021] Calculate the branch influence coefficients for each environmental condition parameter;

[0022] The comprehensive correction coefficient k is obtained by linearly combining the influence coefficients of each branch.

[0023] Preferably, the branch influence coefficients include hydrogen flow rate influence coefficient a, total flow rate influence coefficient b, detector temperature influence coefficient c, and injection pressure influence coefficient d. Each branch influence coefficient is calculated based on the deviation between the real-time value and the calibration value of the corresponding environmental operating condition parameter, as well as the compensation coefficient determined through experimental calibration.

[0024] Preferably, 1. The formula for calculating the comprehensive correction coefficient k is:

[0025] k=1 / [1+λ1·a+λ2·b+λ3·c+λ4·d+C0]

[0026] Wherein, λ1, λ2, λ3, and λ4 are the weighting coefficients of the influence coefficients of each branch, and C0 is a constant term. The weighting coefficients and constant term are determined by calibration using multi-condition experimental data.

[0027] Preferably, the calculation of the comprehensive correction coefficient k adopts a multivariate polynomial fitting method, taking the deviation values ​​of each environmental condition parameter as independent variables, constructing a polynomial model containing first-order terms, second-order terms and interaction terms, and calculating k after determining the coefficients of each term through fitting experimental data.

[0028] Preferably, the adaptive compensation formula further includes a constant offset β, and the complete compensation formula is:

[0029] T_com(i)=k·T(i)+τ·exp(-α·|d(|k·T(i)|+β) / dt|)·[d(k·T(i)) / dt]

[0030] Here, β is a constant determined through experimental calibration, used to adjust the behavior of the derivative term near zero and avoid compensation jitter caused by small fluctuations.

[0031] Preferably, after calculating the final compensated signal, a signal post-processing step is also included: performing moving average processing and / or first-order low-pass filtering processing on the final compensated signal.

[0032] Secondly, the present invention also provides an adaptive signal compensation device based on derivative analysis, the device comprising:

[0033] The signal acquisition module is used to acquire raw measurement signals from the sensor and environmental operating parameters in real time.

[0034] The environmental correction module is used to calculate the comprehensive correction coefficient k based on the deviation between the environmental operating parameters and the calibration values, and to correct the original measurement signal to obtain the corrected signal.

[0035] The derivative calculation module is used to calculate the rate of change of the corrected signal;

[0036] An adaptive compensation module is used to execute the method of the first aspect to generate the final compensation signal;

[0037] The output module is used to output the final compensation signal.

[0038] The adaptive signal compensation method and apparatus based on derivative analysis of the present invention have the following beneficial effects:

[0039] This invention significantly improves response speed and stability. Through derivative analysis, it dynamically adjusts the compensation intensity, automatically suppressing the compensation amplitude during periods of rapid signal change, effectively avoiding the severe overshoot problem common in traditional first-order compensation methods. During periods of slow signal change, it automatically restores the compensation intensity, ensuring a response acceleration effect comparable to first-order compensation. This invention reduces overshoot by approximately 95% without sacrificing response speed, achieving a balance between response speed and signal stability.

[0040] The invention offers strong hardware adaptability and reduces system costs. By adjusting the gain parameter α, it can flexibly adapt to sensors with different time constants τ, eliminating the need to redesign the sampling circuit or increase the sampling frequency when replacing sensors. For sensors with large time constants, stable dynamic compensation can be achieved on the same hardware platform simply by adjusting the α value appropriately. This effectively avoids the dependence of the infinitesimal method on high sampling frequencies, saving hardware resources and development costs, and improving the system's versatility and maintainability.

[0041] This invention effectively suppresses environmental condition drift and improves measurement accuracy. By introducing a comprehensive correction coefficient k based on multiple environmental parameters, it can compensate for baseline drift caused by fluctuations in factors such as hydrogen flow rate, total sample gas flow rate, detector temperature, and injection pressure in real time. Experimental data shows that when operating parameters deviate significantly, the zero-point drift can reach 2.28% without correction. However, after adopting the environmental correction mechanism of this invention, the deviation between the corrected zero point and the initial calibration zero point is reduced to approximately 0.03%, resulting in a significant improvement in measurement accuracy. This correction mechanism is particularly suitable for applications in industrial settings where long-term operation and constant operating conditions are difficult to maintain.

[0042] The method of this invention has a wide range of applications. It is not only applicable to temperature signal compensation of armored thermocouples, but can also be extended to signal processing of various sensors with first-order hysteresis characteristics, such as pressure sensors, humidity sensors, and flow sensors. Its core adaptive attenuation mechanism and environmental correction mechanism are independent of the specific physical quantity type; they can be used simply by adjusting the corresponding time constant and calibration coefficients, exhibiting strong versatility and scalability.

[0043] The algorithm is simple to implement and easy to deploy in embedded systems. The operations involved in this invention are only basic algebraic operations, absolute value operations, and exponential operations, without the need for complex matrix inversion or iterative optimization processes. It can run efficiently on embedded platforms such as microcontrollers and digital signal processors with limited resources, meeting the real-time and reliability requirements of industrial environments. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating an adaptive signal compensation method based on derivative analysis provided in this application embodiment;

[0046] Figure 2 This is a schematic diagram comparing temperature signals using the compensation method;

[0047] Figure 3 This is a comparative diagram of the corrected flame temperature signal. Detailed Implementation

[0048] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0049] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.

[0050] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.

[0051] According to a first aspect of the invention, see Figure 1 , Figure 1 This is a flowchart illustrating an adaptive signal compensation method based on derivative analysis provided in an embodiment of this application. In this embodiment, the compensation method includes the following steps:

[0052] The raw measurement signal T(i) from the sensor is acquired in real time, where i represents the sampling time;

[0053] Collect at least one environmental condition parameter that affects the measurement baseline, and calculate the comprehensive correction coefficient k based on the deviation of each environmental condition parameter from its respective calibration value;

[0054] The original measurement signal T(i) is corrected using the comprehensive correction coefficient k, resulting in the corrected signal T_corrected(i) = k·T(i);

[0055] Calculate the rate of change of the corrected signal T_corrected(i) at the current time, dT_corrected / dt;

[0056] Based on the rate of change dT_corrected / dt, the final compensation signal T_com(i) is calculated according to the following adaptive compensation formula:

[0057] T_com(i)=T_corrected(i)+τ·f(|dT_corrected / dt|)·(dT_corrected / dt),

[0058] Where τ is the time constant of the sensor, and f(|dT_corrected / dt|) is a monotonically decreasing function with the absolute value of the rate of change |dT_corrected / dt| as the independent variable. This function reduces the compensation intensity to suppress overshoot when the rate of change increases, and restores the compensation intensity to speed up the response when the rate of change decreases.

[0059] The original measurement signal is a temperature signal, and the sensor can be a thermocouple.

[0060] This invention proposes an adaptive signal compensation method based on derivative analysis. The core idea is to dynamically adjust the compensation intensity using a monotonically decreasing function with the absolute value of the rate of change as the independent variable, by calculating the signal's rate of change in real time. When the signal changes rapidly, the function automatically reduces the compensation amplitude to prevent overshoot; when the signal changes slowly, the function automatically recovers to a value close to 1, fully utilizing the response acceleration effect of first-order compensation. Simultaneously, this invention introduces an environmental condition correction mechanism. By collecting environmental parameters affecting the measurement baseline and calculating a comprehensive correction coefficient k, the original measurement signal is statically corrected. The corrected signal is then substituted into the adaptive dynamic compensation stage, thereby eliminating baseline drift caused by environmental fluctuations.

[0061] The basic process is as follows: real-time acquisition of the original measurement signals of the sensor and various environmental operating parameters; calculation of the comprehensive correction coefficient k based on the deviation between the environmental operating parameters and the calibration value, and correction of the original measurement signal to obtain the corrected signal; calculation of the rate of change of the corrected signal; based on the rate of change, dynamic calculation of the compensation intensity through a monotonically decreasing function with the absolute value of the rate of change as the independent variable, and generation of the final compensation signal.

[0062] In the preferred embodiment, the monotonically decreasing function adopts an exponential decay form, and a gain adjustment parameter is introduced to adapt to sensors with different time constants. The environmental correction part can use a branch coefficient progressive correction method or a multivariate polynomial fitting method to calculate the comprehensive correction coefficient k, to adapt to application scenarios with different accuracy requirements.

[0063] In one specific embodiment, the monotonically decreasing function f(|dT_corrected / dt|) adopts an exponential decay form:

[0064] f(|dT_corrected / dt|)=exp(-α·|dT_corrected / dt|),

[0065] Where α is the normal gain adjustment parameter, and exp(·) is an exponential function with the natural constant e as the base.

[0066] Based on actual conditions, environmental operating parameters may include hydrogen flow rate, total sample gas flow rate, detector cell temperature, and injection pressure; in specific implementation, at least one of the environmental operating parameters can be selected based on actual needs / situations.

[0067] As a feasible embodiment, the four parameters included in the above-mentioned environmental operating condition parameters can each yield four branch influence coefficients, and the comprehensive correction coefficient k is calculated based on the four branch influence coefficients, specifically including:

[0068] Calculate the branch influence coefficients for each environmental condition parameter;

[0069] The influence coefficients of each branch are linearly combined to obtain the comprehensive correction coefficient k.

[0070] Among them, the branch influence coefficients include hydrogen flow rate influence coefficient a, total flow rate influence coefficient b, detector temperature influence coefficient c, and injection pressure influence coefficient d. Each branch influence coefficient is calculated based on the deviation between the real-time value and the calibration value of the corresponding environmental operating condition parameter, as well as the compensation coefficient determined through experimental calibration.

[0071] The formula for calculating the comprehensive correction coefficient k is as follows:

[0072] k=1 / [1+λ1·a+λ2·b+λ3·c+λ4·d+C0],

[0073] Wherein, λ1, λ2, λ3, and λ4 are the weighting coefficients of the influence coefficients of each branch, and C0 is a constant term. The weighting coefficients and constant term are determined by calibration using multi-condition experimental data.

[0074] It is understandable that, regarding the selection of influence coefficients for each branch, if the corresponding operating parameters are not selected, the corresponding branch influence coefficient will be zero and will not participate in the correction of the temperature signal.

[0075] As another feasible embodiment, the comprehensive correction coefficient k is calculated using a multivariate polynomial fitting method. The deviation values ​​of each environmental condition parameter are used as independent variables to construct a polynomial model containing first-order terms, second-order terms, and interaction terms. After determining the coefficients of each term through fitting experimental data, k is calculated.

[0076] This calculation method can more precisely characterize the interaction between various influencing quantities and is suitable for scenarios and needs with higher accuracy requirements.

[0077] In its implementation, this invention first acquires the original measurement signal T(i) from the sensor in real time through a signal acquisition module, where i represents the i-th sampling time. The sampling period is set according to the sensor characteristics and application requirements; for example, 0.1 seconds can be selected for temperature measurement. Simultaneously, the system also collects various environmental parameters affecting the measurement baseline. For example, in a hydrogen flame temperature detection application scenario, these parameters include hydrogen flow rate Q_H2 (mL / min), total sample gas flow rate Q_sample (L / min), detector cell temperature T_detector (°C), and injection pressure P_sample (kPa). It should be noted that the environmental correction mechanism of this invention is not limited to the above four parameters; other parameters affecting the measurement baseline can be added, deleted, or replaced depending on the specific application scenario.

[0078] The comprehensive correction coefficient k is calculated based on the deviation between the real-time values ​​and the preset calibration values ​​of various environmental operating parameters. A typical calculation method is the branch coefficient progressive correction method:

[0079] First, calculate the branch influence coefficients for each environmental parameter.

[0080] The formula for calculating the influence coefficient 'a' of hydrogen flow rate is:

[0081] a = 1 / [1 + c1·(Q_H2-Q_H2_cal) + c2], where Q_H2_cal is the calibrated value of hydrogen flow rate, and c1 and c2 are coefficients determined through experimental calibration.

[0082] The formula for calculating the total flow influence coefficient b is:

[0083] b = 1 / [1 + c3·(Q_sample - Q_sample_cal) + c4], where Q_sample_cal is the calibrated value of the sample gas flow rate.

[0084] The formula for calculating the detector temperature influence coefficient c is:

[0085] c = 1 / [1 + c5·(T_detector - T_detector_cal) + c6], where T_detector_cal is the detector temperature calibration value.

[0086] The formula for calculating the influence coefficient d of injection pressure is:

[0087] d=1 / [1+c7·(P_sample-P_sample_cal)+c8], where P_sample_cal is the injection pressure calibration value.

[0088] The calibration values ​​and coefficients c1 to c8 in the above branch coefficient calculation formulas were all obtained through laboratory multi-condition testing based on specific sensors and instrument systems.

[0089] Taking the typical operating conditions of a hydrogen flame ionization detector as an example, the specific numerical forms of each branch coefficient can be expressed as follows:

[0090] The hydrogen flow rate influence coefficient a = 1 / [1 + 0.0209 × (Q_H2 - 31.5) + 0.0026], where Q_H2 is the real-time hydrogen flow rate reading in mL / min, and the calibration value Q_H2_cal is 31.5 mL / min;

[0091] The total flow rate influence coefficient b = 1 / [1 - 0.00005 × (Q_sample - 1600) + 0.0003], where Q_sample is the real-time injection flow rate reading in mL / min, and the calibration value Q_sample_cal is 1600 mL / min;

[0092] The detector temperature influence coefficient c = 1 / [1 + 0.0009 × (T_detector - 120) + 0.0003], where T_detector is the real-time detector cell temperature reading in °C, and the calibration value T_detector_cal is 120 °C;

[0093] The injection pressure influence coefficient d = 1 / [1 - 0.0017 × (P_sample - 101) + 0.001], where P_sample is the real-time injection pressure reading in kPa, and the calibration value P_sample_cal is 101 kPa.

[0094] It should be noted that the specific numerical coefficients mentioned above (such as 0.0209, 0.00005, 0.0009, 0.0017 and the constant terms 0.0026, 0.0003, 0.001, etc.) are all derived from the fitting results of the laboratory multi-condition calibration experiment. For different models of sensors or instrument systems, the optimal coefficient values ​​can be re-determined through the corresponding calibration process.

[0095] After obtaining the influence coefficients of each branch, a, b, c, and d are linearly combined to obtain the comprehensive correction coefficient k. A typical combination formula is k = 1 / [1 + λ1·a + λ2·b + λ3·c + λ4·d + C0], where λ1 to λ4 are the weight coefficients of each branch, and C0 is a constant term. These weight coefficients and constant terms are also determined through fitting experimental data. The advantages of the above-mentioned progressive correction method for branch coefficients are low computational cost, clear physical meaning, and ease of real-time operation in embedded systems.

[0096] In a specific implementation, the formula for calculating the comprehensive correction coefficient k can be further specified as follows:

[0097] k=1 / [1-1.27843·a-1.31565·b-0.45177·c+0.26159·d+2.77981],

[0098] The weighting coefficients (-1.27843, -1.31565, -0.45177, 0.26159) and the constant term (2.77981) were obtained by least squares regression analysis of multiple sets of operating condition deviation data obtained in the laboratory and the corresponding baseline drift.

[0099] When all environmental parameters are in the calibration state, a, b, c, and d are all 1. Substituting these values ​​into the formula, we get:

[0100] k = 1 / [1-1.27843-1.31565-0.45177+0.26159+2.77981] = 1 / 0.99555≈1.004, which is close to 1, indicating that the comprehensive correction coefficient k only produces a small adjustment to the original signal under the calibration state.

[0101] In addition to the branch coefficient method described above, this invention provides an alternative solution: calculating the comprehensive correction coefficient k using a multivariate polynomial fitting method. This method uses the deviations Δx1, Δx2, Δx3, and Δx4 of various environmental operating parameters as independent variables to construct a polynomial model containing first-order, second-order, and interaction terms. Baseline drift data under multiple combinations of operating conditions are obtained through experimental design. The coefficients of each term in the polynomial are determined using the least squares method, thereby directly calculating the value of k. This alternative solution can more precisely characterize the nonlinear interaction effects between various environmental factors and is suitable for applications and needs requiring higher accuracy.

[0102] Specifically, the formula for calculating the comprehensive correction coefficient k using the multivariate polynomial fitting method is as follows:

[0103] k=1 / [1+A1·(Δx1)²+A2·(Δx2)²+A3·(Δx3)²+A4·(Δx4)²·A 51 ·Δx1·Δx2+A6·Δx1·Δx3+A7·Δx1·Δx4·A8·Δx2·Δx3+A9·Δx2·Δx4+A 10 ·Δx3·Δx4·B1·Δx1+B2·Δx2+B3·Δx3+B4·Δx4+C],

[0104] Where Δx1=Q_sample-Q_sample_cal is the difference between the real-time value and the calibration value of the sample flow rate, in L / min;

[0105] Δx2 = T_detector - T_detector_cal, which is the difference between the real-time value and the calibrated value of the detector temperature, in °C;

[0106] Δx3 = Q_H2 - Q_H2_cal, which is the difference between the real-time value and the calibrated value of hydrogen flow rate, in mL / min;

[0107] Δx4 = P_sample - P_sample_cal, which is the difference between the real-time and calibrated injection pressure, in kPa. (A1 to A...) 10 B1 to B4 are the fitting coefficients for each quadratic term and the interaction term, and C is the constant term.

[0108] All the above fitting coefficients were obtained by measuring baseline drift under multiple combinations of different operating conditions and then performing surface fitting on the experimental data using multiple linear regression or least squares method. In practical applications, the calibrated coefficients can be pre-stored in the system memory, and the k value can be quickly obtained by simply substituting the deviation values ​​during real-time calculation.

[0109] Taking a certain type of hydrogen flame ionization detector as an example, after system calibration, the typical values ​​of the coefficients in the multivariate polynomial fitting formula are as follows:

[0110] A1 = -4.57471 × 10 -8 A2 = -3.28966 × 10 -5 A3 = -1.13217 × 10 -4 A4 = 4.84828 × 10 -4 ;

[0111] A5 = -8.29842 × 10 -5 A6 = 1.18252 × 10 -5 A7 = -1.43640 × 10 -5 A8 = -1.12948 × 10 -5 ;

[0112] A9 = 5.08252 × 10 -4 A 10 =-5.60340×10 -4 ;

[0113] B1 = -7.10654 × 10 -5 B2 = 1.82977 × 10 -4 B3=0.0223, B4=0.00177;

[0114] C=0.00232.

[0115] After adopting the above coefficients, when environmental operating parameters fluctuate, the system can directly calculate the comprehensive correction coefficient k based on the real-time collected deviation values ​​Δx1 to Δx4, thereby completing the baseline correction of the original temperature signal.

[0116] After obtaining the comprehensive correction coefficient k, the original measurement signal is corrected to obtain the corrected signal T_corrected(i)=k·T(i). This correction process essentially subtracts or compensates for the baseline drift caused by environmental fluctuations from the original signal, so that subsequent dynamic compensation can be carried out on a stable reference.

[0117] Next, calculate the rate of change of the corrected signal at the current moment. A simple and practical calculation method is as follows:

[0118] dT_corrected / dt=[T_corrected(i)-T_corrected(i-1)] / Δt, where Δt is the sampling time interval.

[0119] The sign and absolute value of the rate of change can be used to determine the current stage of a signal's change: a positive rate of change with a large absolute value indicates that the signal is in a rapid rising phase; a negative rate of change with a large absolute value indicates that the signal is in a rapid falling phase; and a rate of change with an absolute value close to zero indicates that the signal is in a stable phase.

[0120] The corrected signal and its rate of change are received, and the final compensation signal T_com(i) is generated according to the following adaptive compensation formula:

[0121] T_com(i)=T_corrected(i)+τ·f(|dT_corrected / dt|)·(dT_corrected / dt),

[0122] Where τ is the time constant of the sensor, and for thermocouples, its value is determined by factors such as the material and diameter of the thermocouple wire and the structure of the protective tube, with typical values ​​ranging from several seconds to tens of seconds. The function f(|dT_corrected / dt|) is a monotonically decreasing function with the absolute value of the rate of change as the independent variable.

[0123] In a preferred implementation, the function takes an exponentially decaying form:

[0124] f(|dT_corrected / dt|)=exp(-α·|dT_corrected / dt|),

[0125] Where α is the normal gain adjustment parameter, and exp(·) represents the exponential operation with the natural constant e as the base.

[0126] The characteristics of the exponential decay function are as follows: when |dT_corrected / dt| is small, the function value is close to 1, the compensation term is approximately equal to τ·dT_corrected / dt, and the system exhibits approximately first-order linear compensation with a fast response speed; when |dT_corrected / dt| increases, the function value decays rapidly and approaches 0, the compensation term is significantly suppressed, thus effectively preventing overshoot. The gain adjustment parameter α determines the sensitivity of the decay; the larger α is, the faster the decay and the stronger the suppression of overshoot; the smaller α is, the smoother the decay and the more significant the improvement in response speed. The value of α is determined through experimental calibration, with a typical range of 0.001 to 0.1 s / ℃. For sensors with different time constants τ, matching can be achieved by adjusting the value of α without changing hardware parameters such as the sampling frequency, greatly improving the system's adaptability and hardware reuse rate.

[0127] Taking a 1 / 16-inch armored thermocouple as an example, its time constant τ is measured to be 6.5 s, and the gain adjustment parameter α is calibrated to 0.015 s / ℃. When the temperature is in a slow rising phase, for example, when dT_corrected / dt = 0.5℃ / s, the exponential term exp(-0.015×0.5) = exp(-0.0075) ≈ 0.9925. At this time, the compensation term is approximately 6.5×0.9925×0.5 ≈ 3.23℃, and the compensation effect is close to that of traditional first-order compensation. When the temperature is in a rapid rising phase, for example, when dT_corrected / dt = 20℃ / s, the exponential term exp(-0.015×20) = exp(-0.3) ≈ 0.7408, and the compensation term is approximately 6.5×0.7408×20 ≈ 96.3℃. The compensation amount of the traditional first-order compensation is 6.5×20 = 130℃. The adaptive compensation amount of the present invention is reduced by about 26% compared with the traditional method, effectively suppressing the overshoot trend.

[0128] To further optimize compensation performance, this invention introduces a constant offset β into the adaptive compensation formula. The complete compensation formula is expressed as follows:

[0129] T_com(i)=k·T(i)+τ·exp(-α·|d(|k·T(i)|+β) / dt|)·[d(k·T(i)) / dt],

[0130] Here, β is a constant determined through experimental calibration. The main purpose of introducing β is to adjust the behavior of the derivative term near zero, avoiding unwanted jitter in the exponential decay function when the rate of change fluctuates near zero due to measurement noise or small steady-state errors, thus making the compensation transition smoother. Typical values ​​of β are usually negative numbers with small absolute values, such as around -0.1. The specific value needs to be determined experimentally in combination with the sensor noise level and system accuracy requirements.

[0131] In the aforementioned application example of a 1 / 16-inch armored thermocouple, the calibration value of β is -0.115676. When the temperature signal tends to stabilize, the change in k·T(i) is very small, and d(k·T(i)) / dt is close to zero. At this time, the value of |d(|k·T(i)|+β) / dt| is mainly affected by β, which can provide a small bias for the exponential decay term, so that the compensation term smoothly returns to zero rather than abruptly shuts off, thereby avoiding signal oscillations caused by the compensation switching effect.

[0132] After generating the compensation signal, the present invention may optionally perform signal post-processing to further improve the signal quality.

[0133] One post-processing method is moving average processing, for example, using a 5-point moving average formula:

[0134] T_smooth(i)=[T_com(i-2)+T_com(i-1)+T_com(i)+T_com(i+1)+T_com(i+2)] / 5. The moving average can effectively eliminate occasional noise spikes and extract the long-term trend of the signal.

[0135] Another post-processing method is first-order low-pass filtering, the formula is:

[0136] T_filtered(i) = γ·T_com(i) + (1-γ)·T_filtered(i-1), where γ is the filtering coefficient, ranging from 0 to 1. The smaller γ is, the stronger the filtering effect, but the greater the response lag.

[0137] Post-processing steps can be selected or used in combination depending on the actual application requirements.

[0138] It should be understood that although the above embodiments are described with thermocouple temperature measurement as the background, the method of the present invention is also applicable to the signal processing of other sensors with first-order hysteresis characteristics, such as pressure sensors, humidity sensors, and flow sensors. When applied to other types of sensors, only the symbols of physical quantities in the formula need to be replaced with the corresponding symbols of measured quantities, and the meaning of the time constant τ is changed accordingly to the first-order response time constant of the sensor. The remaining calculation steps and principles are completely the same.

[0139] According to a second aspect of the present invention, an adaptive signal compensation device based on derivative analysis is provided, the compensation device comprising:

[0140] The signal acquisition module is used to acquire raw measurement signals from the sensor and environmental operating parameters in real time.

[0141] The environmental correction module is used to calculate the comprehensive correction coefficient k based on the deviation between the environmental operating parameters and the calibration values, and to correct the original measurement signal to obtain the corrected signal.

[0142] The derivative calculation module is used to calculate the rate of change of the corrected signal.

[0143] An adaptive compensation module is used to execute the method of the first aspect to generate the final compensation signal;

[0144] The output module is used to output the final compensation signal.

[0145] The system comprises several modules: a signal acquisition module, an environmental correction module, and an output module. The signal acquisition module receives environmental parameters, calculates a comprehensive correction coefficient k based on preset calibration values ​​and coefficients, and corrects the original measurement signal. The derivative calculation module receives the corrected signal and calculates its rate of change in real time. The adaptive compensation module, the core computing unit, executes the aforementioned adaptive compensation algorithm to generate the final compensated signal. The output module outputs the compensated signal in analog or digital form for use by subsequent control or display systems.

[0146] The device can be implemented on embedded platforms such as microcontrollers, digital signal processors or field-programmable gate arrays, or it can be integrated as a software module into a host computer system.

[0147] Explanation of the algorithm mechanism of this invention:

[0148] When the temperature changes rapidly, the value of |dT / dt| is large, and the exponential term exp(-α·|dT / dt|) approaches 0. At this time, the compensation term τ·exp(-α·|dT / dt|)·(dT / dt) is significantly suppressed, avoiding overshoot due to overcompensation.

[0149] When the temperature changes slowly, the value of |dT / dt| is small, and the exponential term approaches 1. At this time, the compensation term is close to τ·dT / dt, which fully utilizes the response acceleration effect of the first-order compensation.

[0150] When the temperature stabilizes, dT / dt approaches 0, and the compensation term naturally approaches 0. The algorithm automatically exits the compensation state without the need for additional start / stop judgment logic, thus avoiding signal oscillations caused by compensation switch switching.

[0151] Regarding the calibration of the adjustment parameter α:

[0152] The parameter α determines the sensitivity of the compensation intensity decay as the rate of change increases. The larger the value of α, the faster the compensation intensity decays with the increase of |dT / dt|, and the stronger the ability to suppress overshoot, but the improvement in response speed is relatively conservative; the smaller the value of α, the more gradual the decay, and the more obvious the improvement in response speed, but the risk of overshoot increases.

[0153] For thermocouples with different time constants τ, matching can be achieved by adjusting the α value without changing the hardware sampling frequency. Generally, thermocouples with larger time constants should use larger α values. The typical range of α values ​​is 0.001 to 0.1 (unit: s / ℃), and the specific value is determined through experimental calibration.

[0154] The technical effects of the present invention are further illustrated below through two specific embodiments.

[0155] Example 1: Dynamic Compensation Test for Flame Temperature Using Armored Thermocouples

[0156] A hydrogen flame ionization detector uses a 1 / 16-inch sheathed thermocouple to measure flame temperature. The time constant τ of this thermocouple was determined to be approximately 6.5 seconds. Under standard operating conditions (all environmental parameters were at their calibration values), a step temperature rise excitation was applied to the detector, and the original temperature signal and the compensated signal using the method of this invention were recorded. The test parameters were set as follows: sampling period Δt was 0.2 seconds, gain adjustment parameter α was calibrated to 0.015 s / ℃, and constant offset β was calibrated to -0.115676. Since the environmental parameters did not shift, the overall correction coefficient k was set to 1.

[0157] See Figure 2 The test results show that the original uncompensated signal t 90 The response time is approximately 28.2 seconds; after adopting the traditional first-order compensation method, t 90 The time was shortened to approximately 1.84 seconds, but the overshoot temperature reached as high as 25.5℃; after adopting the adaptive compensation method of this invention, t 90 The response time is approximately 2.42 seconds, and the overshoot temperature is only 1.2℃. Comparative data shows that this invention reduces the overshoot amplitude by approximately 95% while essentially maintaining the acceleration effect of the first-order compensation response, achieving a balance between response speed and stability.

[0158] Example 2: Comprehensive Compensation Test for Drift under On-site Working Conditions

[0159] See Figure 3 After long-term operation, an online monitoring instrument experienced significant deviations in its operating parameters due to jet pump wear and changes in environmental conditions: the sample flow rate Q_sample decreased from the calibrated value of 1600 mL / min to 1423.8 mL / min; the sample pressure P_sample decreased from the calibrated value of 101 kPa to 89.23 kPa; the hydrogen flow rate Q_H2 shifted from the calibrated value of 31.5 mL / min to 32.15 mL / min; and the detector temperature T_detector remained at the calibrated value of 120℃. When zero gas was introduced for zero-point calibration, the instrument displayed a flame temperature of 506.47℃, representing a zero-point drift of approximately 2.28% compared to the initial zero-point calibration of 495.18℃.

[0160] The environmental correction mechanism of this invention first calculates the branch influence coefficients a, b, c, and d based on the real-time deviation values ​​of each environmental parameter. Taking the progressive correction method of branch coefficients as an example:

[0161] a=1 / [1+0.0209×(32.15-31.5)+0.0026]

[0162] =1 / [1+0.013585+0.0026]

[0163] =1 / 1.016185≈0.9841;

[0164] b=1 / [1-0.00005×(1423.8-1600)+0.0003]

[0165] =1 / [1+0.00881+0.0003]

[0166] =1 / 1.00911≈0.991;

[0167] c=1 / [1+0.0009×(120-120)+0.0003]=1 / 1.0003≈0.9997;

[0168] d=1 / [1-0.0017×(89.23-101)+0.001]=1 / [1+0.020009+0.001]

[0169] =1 / 1.021009≈0.9794.

[0170] Then, based on the formula for calculating the comprehensive correction coefficient k:

[0171] k = 1 / [1 - 1.27843 * a - 1.31565 * b - 0.45177 * c + 0.26159 * d + 2.77981], substituting the values ​​of a, b, c, and d:

[0172] k=1 / [1-1.27843×0.9841-1.31565×0.991-0.45177×0.9997+0.26159×0.9794+2.77981]

[0173] =1 / [1-1.2581-1.3038-0.4516+0.2562+2.77981]

[0174] =1 / 1.02251

[0175] ≈0.9780.

[0176] The calculated comprehensive correction coefficient k is approximately 0.9780. Substituting the k value into the complete compensation formula, and using typical values ​​for various coefficients such as α = -0.015 s / ℃, τ = 6.5 s, and β = -0.115676, the corrected zero-point temperature is calculated to be 495.33℃. This value deviates from the initial calibration zero point of 495.18℃ by only about 0.03%, effectively compensating for environmental drift and significantly improving measurement accuracy.

[0177] The calibration coefficients and weighting coefficients in the above embodiments are only shown as typical values. In actual applications, the optimal coefficient combination should be determined by designing multi-factor combination experiments and performing regression analysis on the experimental data, based on the specific sensor characteristics, instrument structure and operating range.

[0178] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0179] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0180] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0181] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. An adaptive signal compensation method based on derivative analysis, characterized in that, Includes the following steps: The raw measurement signal T(i) from the sensor is acquired in real time, where i represents the sampling time; Collect at least one environmental condition parameter that affects the measurement baseline, and calculate the comprehensive correction coefficient k based on the deviation of each environmental condition parameter from its respective calibration value; The original measurement signal T(i) is corrected using the comprehensive correction coefficient k to obtain the corrected signal T_corrected(i) = k·T(i); Calculate the rate of change dT_corrected / dt of the corrected signal T_corrected(i) at the current time. Based on the rate of change dT_corrected / dt, the final compensation signal T_com(i) is calculated according to the following adaptive compensation formula: T_com(i)=T_corrected(i)+τ·f(|dT_corrected / dt|)·(dT_corrected / dt) Where τ is the time constant of the sensor, and f(|dT_corrected / dt|) is a monotonically decreasing function with the absolute value of the rate of change |dT_corrected / dt| as the independent variable. This function reduces the compensation intensity to suppress overshoot when the absolute value of the rate of change increases, and restores the compensation intensity to speed up the response when the absolute value of the rate of change decreases.

2. The method according to claim 1, characterized in that, The monotonically decreasing function f(|dT_corrected / dt|) adopts an exponential decay form: f(|dT_corrected / dt|) = exp(-α · |dT_corrected / dt|) Where α is the normal gain adjustment parameter, and exp(·) is an exponential function with the natural constant e as the base.

3. The method according to claim 1, characterized in that, The original measurement signal is a temperature signal, and the sensor is a thermocouple; the environmental operating parameters include at least one of hydrogen flow rate, total sample gas flow rate, detector cell temperature, and injection pressure.

4. The method according to claim 3, characterized in that, The calculation of the comprehensive correction factor k specifically includes: Calculate the branch influence coefficients for each environmental condition parameter; The comprehensive correction coefficient k is obtained by linearly combining the influence coefficients of each branch.

5. The method according to claim 4, characterized in that, The branch influence coefficients include hydrogen flow rate influence coefficient a, total flow rate influence coefficient b, detector temperature influence coefficient c, and injection pressure influence coefficient d. Each branch influence coefficient is calculated based on the deviation between the real-time value and the calibration value of the corresponding environmental operating condition parameter, as well as the compensation coefficient determined through experimental calibration.

6. The method according to claim 5, characterized in that, The formula for calculating the overall correction factor k is: k = 1 / [1 + λ1·a + λ2·b + λ3·c + λ4·d + C0] Wherein, λ1, λ2, λ3, and λ4 are the weighting coefficients of the influence coefficients of each branch, and C0 is a constant term. The weighting coefficients and constant term are determined by calibration using multi-condition experimental data.

7. The method according to claim 3, characterized in that, The calculation of the comprehensive correction coefficient k adopts a multivariate polynomial fitting method, taking the deviation values ​​of each environmental condition parameter as independent variables, constructing a polynomial model containing first-order terms, second-order terms, and interaction terms, and calculating k after determining the coefficients of each term through fitting experimental data.

8. The method according to any one of claims 1 to 7, characterized in that, The adaptive compensation formula further includes a constant offset β, and the complete compensation formula is: T_com(i) = k · T(i) + τ · exp(-α · |d(|k·T(i)| + β) / dt|) · [d(k·T(i)) / dt] Here, β is a constant determined through experimental calibration, used to adjust the behavior of the derivative term near zero and avoid compensation jitter caused by small fluctuations.

9. The method according to any one of claims 1 to 7, characterized in that, After calculating the final compensated signal, a signal post-processing step is also included: performing a moving average process and / or a first-order low-pass filter on the final compensated signal.

10. An adaptive signal compensation device based on derivative analysis, characterized in that, The device includes: The signal acquisition module is used to acquire raw measurement signals from the sensor and environmental operating parameters in real time. The environmental correction module is used to calculate the comprehensive correction coefficient k based on the deviation between the environmental operating parameters and the calibration values, and to correct the original measurement signal to obtain the corrected signal. The derivative calculation module is used to calculate the rate of change of the corrected signal; An adaptive compensation module is configured to perform the method according to any one of claims 1 to 9 to generate a final compensation signal; The output module is used to output the final compensation signal.

Citation Information

Patent Citations

  • Control system and method for improving tuning stability of mass spectrum

    CN117761142A

  • Optimization control method for dynamic performance of frequency converter

    CN121813813A