Magnetostriction liquid level meter temperature compensation method and system based on support vector machine

The temperature change of the magnetostrictive level meter is nonlinearly modeled and compensated in real time by the support vector machine regression model, which solves the influence of ambient temperature on the measurement accuracy and improves the measurement stability and accuracy of the magnetostrictive level meter in complex temperature environments.

CN120651322APending Publication Date: 2025-09-16SHANGHAI SODILONG AUTOMATION CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510750799.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Ambient temperature changes have a significant impact on the measurement accuracy and reliability of magnetostrictive level sensors, especially within the industrial operating range of -20°C to +85°C. Traditional linear compensation methods are difficult to adapt to the complex and changing nonlinear temperature drift phenomenon.

Method used

The support vector machine regression model (SVM) is used to perform nonlinear modeling of temperature changes. The original pulse number and ambient temperature obtained by the magnetostrictive level meter are used for real-time compensation to correct the measurement results and improve the measurement accuracy and robustness.

Benefits of technology

It effectively reduces measurement errors under high and low temperature conditions, improves the robustness and reliability of magnetostrictive sensors in harsh environments, adapts to sensor consistency compensation in different batches and environments, and has good generalization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120651322A_ABST
    Figure CN120651322A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetostriction liquid level meter temperature compensation method and system based on a support vector machine. The method comprises the steps that the currently captured original pulse number is obtained through a magnetostriction liquid level meter; the current environment temperature is detected in real time through a high-precision temperature sensor in the magnetostrictive liquid level meter; taking the original pulse number and the current environment temperature as input features, sending the input features to a pre-trained support vector machine regression model (SVM), and outputting a displacement error prediction value in the current temperature environment; and correcting the original measurement result according to the error prediction value to obtain a real pulse measurement value after temperature compensation. The system comprises a time-to-digital conversion chip, a temperature chip temperature measurement module, a support vector machine reasoning module, a pulse compensation module and a distance calculation module. According to the method, nonlinear modeling can be carried out on measurement errors caused by environment temperature changes, so that the liquid level measurement result is dynamically corrected, and the overall robustness and precision of a measurement system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of liquid level measurement technology for industrial control, and is used to improve the accuracy and reliability of liquid level measurement equipment under different temperature ranges, and particularly relates to a temperature compensation method and system for a magnetostrictive liquid level gauge based on a support vector machine. Background Art

[0002] As a high-precision, high-reliability non-contact measurement device, magnetostrictive level sensors are widely used in industries such as petrochemicals, electricity, metallurgy, and food. The operating principle is based on the Mandela effect, which measures the liquid level by calculating the time difference between the excitation pulse and the return signal to determine the position of the float. However, in actual applications, changes in ambient temperature can significantly affect the sensor's measurement accuracy. Specifically:

[0003] (1) Thermal expansion and contraction of materials: Magnetostrictive waveguide wires will expand or contract at different temperatures, causing slight changes in the mechanical wave propagation path, which in turn affects the accuracy of displacement measurement;

[0004] (2) Changes in electronic component performance: Temperature changes can cause fluctuations in the characteristics of electronic components inside the sensor (such as resistors, capacitors, ADC converters, etc.), resulting in a decrease in signal amplification and comparator conversion accuracy;

[0005] (3) Significant nonlinear temperature drift effect: Especially in the industrial operating range of -20℃ to +85℃, the temperature drift phenomenon exhibits significant nonlinear characteristics. Traditional linear compensation or table lookup methods are difficult to adapt to complex and changing application scenarios.

[0006] Therefore, it is necessary to introduce an algorithm that can adapt to nonlinear changes and has strong generalization ability to effectively model and compensate for temperature drift, so as to improve the measurement stability of magnetostrictive level gauges in complex temperature environments. Summary of the Invention

[0007] In response to the shortcomings or deficiencies of the above-mentioned prior art, the technical problem to be solved by this application is to provide a temperature compensation method and system for a magnetostrictive liquid level gauge based on a support vector machine. This application can perform nonlinear modeling of the measurement errors caused by ambient temperature changes, thereby dynamically correcting the liquid level measurement results and improving the overall robustness and accuracy of the measurement system.

[0008] To solve the above technical problems, this application is implemented through the following technical solutions:

[0009] On the one hand, this application proposes a temperature compensation method for a magnetostrictive level gauge based on a support vector machine, including:

[0010] Obtain the number of raw pulses currently captured through the magnetostrictive level meter;

[0011] The current ambient temperature is detected in real time by a high-precision temperature sensor inside the magnetostrictive liquid level gauge;

[0012] The original pulse number and the current ambient temperature are used as input features and sent to a pre-trained support vector machine regression model (SVM), which outputs the displacement error prediction value under the current temperature environment;

[0013] The original measurement result is corrected according to the displacement error prediction value to obtain a true pulse measurement value after temperature compensation.

[0014] The support vector machine regression model (SVM) uses temperature and original pulse number as input and outputs liquid level pulse counting error;

[0015] The real pulse measurement value can be obtained by compensating the original pulse number with the new pulse counting error;

[0016] The actual pulse measurement value is converted into the corresponding time and then multiplied by the specific wave speed to obtain the final liquid level distance.

[0017] Further optionally, the support vector machine regression model (SVM) adopts a radial basis kernel function (RBF), and the optimal values ​​of its penalty coefficient C and kernel width γ are determined through cross-validation.

[0018] Further optionally, the support vector machine regression model (SVM) is deployed in an embedded microcontroller.

[0019] Further optionally, the embedded microcontroller performs online inference by table lookup plus interpolation or model compression method to achieve real-time temperature compensation of the measurement data.

[0020] On the other hand, the present application also proposes a temperature compensation system for a magnetostrictive liquid level gauge based on a support vector machine, comprising:

[0021] A time-to-digital conversion chip that collects pulse count signals from a magnetostrictive level gauge;

[0022] Temperature chip temperature measurement module, used to collect the current temperature of the high-precision temperature sensor;

[0023] A support vector machine inference module is used to take the original pulse number and the current ambient temperature as input features, send them to a pre-trained support vector machine regression model (SVM), and output a displacement error prediction value under the current temperature environment;

[0024] a pulse compensation module, which corrects the original measurement result according to the error prediction value;

[0025] and a distance calculation module for outputting a temperature-compensated true pulse measurement value.

[0026] Further optionally, the support vector machine reasoning module predicts the error value through a support vector machine regression model (SVM) constructed by preset parameters, and integrates the SVM into the embedded microcontroller.

[0027] Further optionally, the support vector machine regression model (SVM) uses temperature and original pulse number as input and outputs liquid level pulse counting error;

[0028] The real pulse measurement value can be obtained by compensating the original pulse number with the new pulse counting error;

[0029] The actual pulse measurement value is converted into the corresponding time and then multiplied by the specific wave speed to obtain the final liquid level distance.

[0030] Further optionally, the support vector machine regression model (SVM) adopts a radial basis kernel function (RBF), and the optimal values ​​of its penalty coefficient C and kernel width γ are determined through cross-validation.

[0031] Further optionally, the system is suitable for industrial environments within the range of -20°C to +85°C.

[0032] Compared with the existing technology, this application has the following technical effects:

[0033] This application establishes a nonlinear temperature compensation model through the SVM algorithm, effectively improving the accuracy of temperature drift compensation; the kernel function of the SVM algorithm in this application has good generalization ability and can adapt to the consistency compensation of sensors in different batches and different working environments; the compensation algorithm in this application can be embedded in a microcontroller (MCU), has a fast response, and is suitable for real-time compensation needs; the SVM in this application can significantly reduce measurement errors under high and low temperature conditions, and improve the robustness and reliability of magnetostrictive sensors in harsh environments; this application can be applied to a variety of magnetostrictive sensor models, and deployment only requires data collection and retraining of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0035] Figure 1 : Flowchart of the temperature compensation system of the magnetostrictive liquid level gauge supporting vector machine according to one embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] In one embodiment of the present application, a temperature compensation method for a magnetostrictive level gauge based on a support vector machine includes:

[0038] Obtain the number of raw pulses currently captured through the magnetostrictive level meter;

[0039] The current ambient temperature is detected in real time by a high-precision temperature sensor inside the magnetostrictive liquid level gauge;

[0040] The original pulse number and the current ambient temperature are used as input features and sent to a pre-trained support vector machine regression model (SVM), which outputs the displacement error prediction value under the current temperature environment;

[0041] The original measurement result is corrected according to the displacement error prediction value to obtain a true pulse measurement value after temperature compensation.

[0042] The support vector machine regression model (SVM) uses temperature and original pulse number as input and outputs liquid level pulse counting error;

[0043] The real pulse measurement value can be obtained by compensating the original pulse number with the new pulse counting error;

[0044] The actual pulse measurement value is converted into the corresponding time and then multiplied by the specific wave speed to obtain the final liquid level distance.

[0045] Specifically, during the temperature acquisition process, a high-precision temperature detection chip integrated inside the magnetostrictive liquid level sensor is used to monitor the current ambient temperature value T of the sensor in real time.

[0046] The above data collection and modeling include:

[0047] Use professional temperature chamber equipment to uniformly collect the number of pulses N captured inside the magnetostrictive liquid level sensor at every 1°C between -20°C and 80°C. means,i The corresponding real temperature value T i ;

[0048] Calculate the difference between the current temperature and the normal temperature of 26℃ and construct a training set (T i ,N means,i )->ΔN i , where ΔN i =Nmeans,i -N means,26 This is the error in the sensor's internal pulse capture caused by the temperature drift between the current temperature and the normal temperature of 26°C.

[0049] Use the support vector regression algorithm to train the sample data and fit the nonlinear temperature compensation model:

[0050] ΔN=f(T i ,N means,i )

[0051] Furthermore, in the above-mentioned process of compensating the original pulse number with the new pulse counting error to obtain the true pulse measurement value, the following steps are performed: obtaining the current temperature T captured by the temperature sensor inside the sensor and the original pulse number N obtained by the pulse capture of the microcontroller at room temperature (26°C) means,26 ;

[0052] Input(T i , N means,i ) into the trained SVM model to obtain the pulse compensation value ΔN i ;

[0053] The number of pulses N obtained in real time means,i Perform compensation correction to obtain the final real number of pulses:

[0054] N means,i =L means,26 +ΔN i

[0055] Furthermore, in this embodiment, the support vector machine regression model (SVM) adopts a radial basis kernel function (RBF), and the optimal values ​​of its penalty coefficient C and kernel width γ are determined through cross-validation.

[0056] The support vector machine regression model (SVM) is deployed in an embedded microcontroller; it can also be implemented on an external embedded controller through serial port communication, and has good portability and real-time performance.

[0057] The embedded microcontroller performs online reasoning through table lookup plus interpolation or model compression method to achieve real-time temperature compensation of measurement data.

[0058] In another embodiment, Figure 1 As shown in FIG, the temperature compensation system of the magnetostrictive liquid level gauge based on the support vector machine includes:

[0059] A time-to-digital conversion chip that collects pulse count signals from a magnetostrictive level gauge;

[0060] Temperature chip temperature measurement module, used to collect the current temperature of the high-precision temperature sensor;

[0061] A support vector machine inference module is used to take the original pulse number and the current ambient temperature as input features, send them to a pre-trained support vector machine regression model (SVM), and output a displacement error prediction value under the current temperature environment;

[0062] a pulse compensation module, which corrects the original measurement result according to the error prediction value;

[0063] and a distance calculation module for outputting a temperature-compensated true pulse measurement value.

[0064] Among them, the magnetostrictive liquid level sensor involved in this embodiment is an existing structure: it includes a waveguide wire, an excitation circuit, a signal receiving circuit, an MCU controller, a communication module and a high-precision temperature sensor, wherein the communication module (RS485 or UART) communicates with an external data acquisition system.

[0065] In the above-mentioned time-to-digital conversion chip and temperature chip temperature measurement module, the sensor was placed in a laboratory temperature test chamber at a temperature environment of -20°C to 80°C, and the following data was collected:

[0066] Ambient temperature T i ;Number of pulses at 26 degrees Celsius means,26 ; Real-time pulse number N under different ambient temperatures means,i (Measured by GP22 high-precision time-to-digital conversion chip).

[0067] During the training process of the support vector machine inference module, the SVM regression model is implemented using Python language, and the training data is a two-tuple (T i ,N means,i ), the kernel function is rbf, and the training data is preprocessed by standardization.

[0068] In the above-mentioned pulse compensation module, the real-time temperature T and the number of captured pulses N are read during the operation of the sensor. i , input the model, obtain the error prediction value ΔN, and then perform pulse compensation:

[0069] N means,i =N means,26 +ΔL i

[0070] If the embedded system does not have a micopython interface or has limited resources, the model can be deployed on other devices and interact using the communication interface.

[0071] The support vector machine reasoning module predicts the error value through a support vector machine regression model (SVM) constructed by preset parameters and is integrated into the embedded microcontroller.

[0072] Furthermore, in this embodiment, the support vector machine regression model (SVM) uses temperature and original pulse number as input and outputs liquid level pulse counting error;

[0073] The real pulse measurement value can be obtained by compensating the original pulse number with the new pulse counting error;

[0074] The actual pulse measurement value is converted into the corresponding time and then multiplied by the specific wave speed to obtain the final liquid level distance.

[0075] The support vector machine regression model (SVM) adopts a radial basis kernel function (RBF), and the optimal values ​​of its penalty coefficient C and kernel width γ are determined through cross validation.

[0076] Furthermore, in this embodiment, the system is suitable for industrial environments within the range of -20°C to +85°C. It can adapt to nonlinear changes and has an algorithm with strong generalization capabilities, effectively modeling and compensating for temperature drift, thereby improving the measurement stability of the magnetostrictive level meter in complex temperature environments.

[0077] This application establishes a nonlinear temperature compensation model through the SVM algorithm, effectively improving the accuracy of temperature drift compensation; the kernel function of the SVM algorithm in this application has good generalization ability and can adapt to the consistency compensation of sensors in different batches and different working environments; the compensation algorithm in this application can be embedded in a microcontroller (MCU), has a fast response, and is suitable for real-time compensation needs; the SVM in this application can significantly reduce measurement errors under high and low temperature conditions, and improve the robustness and reliability of the sensor in harsh environments; this application can be applied to a variety of magnetostrictive sensor models, and only data collection and retraining of the model are required for deployment. In summary, this application has good market application prospects.

[0078] In the description of this application, unless otherwise expressly specified or limited, the terms "connected," "connect," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and can refer to internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on specific circumstances.

[0079] In this application, unless otherwise expressly specified or limited, a first feature being "above" or "below" a second feature may include the first and second features being in direct contact, or may include the first and second features being in contact not directly but through another feature between them. Moreover, a first feature being "above," "above," and "above" a second feature may include the first feature being directly above or obliquely above the second feature, or may simply mean that the first feature is higher in level than the second feature. A first feature being "below," "below," and "below" a second feature may include the first feature being directly below or obliquely below the second feature, or may simply mean that the first feature is lower in level than the second feature.

[0080] In the description of this embodiment, the terms "upper," "lower," "left," "right," and other orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely for ease of description and simplified operation. They do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first" and "second" are used solely for descriptive purposes and have no special meanings.

[0081] The above embodiments are intended only to illustrate the technical solutions of the present application and are not intended to limit the present application. The present application is described in detail with reference to the preferred embodiments. It should be understood by those skilled in the art that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application and should be included within the scope of the claims of the present application.

Claims

1. A temperature compensation method for a magnetostrictive level gauge based on a support vector machine is characterized in that: include: Obtain the number of raw pulses currently captured through the magnetostrictive level meter; The current ambient temperature is detected in real time by a high-precision temperature sensor inside the magnetostrictive liquid level gauge; The original pulse number and the current ambient temperature are used as input features and sent to a pre-trained support vector machine regression model (SVM), which outputs the displacement error prediction value under the current temperature environment; The original measurement result is corrected according to the displacement error prediction value to obtain a true pulse measurement value after temperature compensation.

2. The temperature compensation method for a magnetostrictive liquid level gauge based on a support vector machine according to claim 1, characterized in that: The support vector machine regression model (SVM) uses temperature and original pulse number as input and outputs liquid level pulse counting error; The real pulse measurement value can be obtained by compensating the original pulse number with the new pulse counting error; The actual pulse measurement value is converted into the corresponding time and then multiplied by the specific wave speed to obtain the final liquid level distance.

3. The temperature compensation method for a magnetostrictive liquid level gauge based on a support vector machine according to claim 1, characterized in that: The support vector machine regression model (SVM) adopts a radial basis kernel function (RBF), and the optimal values ​​of its penalty coefficient C and kernel width γ are determined through cross validation.

4. The method for temperature compensation of a magnetostrictive liquid level gauge based on a support vector machine according to any one of claims 1 to 3, characterized in that: The support vector machine regression model (SVM) is deployed in an embedded microcontroller.

5. The temperature compensation method for a magnetostrictive liquid level gauge based on a support vector machine according to claim 4, characterized in that: The embedded microcontroller performs online reasoning through table lookup plus interpolation or model compression method to achieve real-time temperature compensation of measurement data.

6. The temperature compensation system of magnetostrictive liquid level gauge based on support vector machine is characterized by: include: A time-to-digital conversion chip that collects pulse count signals from a magnetostrictive level gauge; Temperature chip temperature measurement module, used to collect the current temperature of the high-precision temperature sensor; A support vector machine inference module is used to take the original pulse number and the current ambient temperature as input features, send them to a pre-trained support vector machine regression model (SVM), and output a displacement error prediction value under the current temperature environment; a pulse compensation module, which corrects the original measurement result according to the error prediction value; and a distance calculation module for outputting a temperature-compensated true pulse measurement value.

7. The magnetostrictive liquid level gauge temperature compensation system based on support vector machine according to claim 6, characterized in that: The support vector machine reasoning module predicts the error value through a support vector machine regression model (SVM) constructed by preset parameters and is integrated into the embedded microcontroller.

8. The temperature compensation system of magnetostrictive liquid level gauge based on support vector machine according to claim 7, characterized in that: The support vector machine regression model (SVM) uses temperature and original pulse number as input and outputs liquid level pulse counting error; The real pulse measurement value can be obtained by compensating the original pulse number with the new pulse counting error; The actual pulse measurement value is converted into the corresponding time and then multiplied by the specific wave speed to obtain the final liquid level distance.

9. The magnetostrictive liquid level gauge temperature compensation system based on support vector machine according to claim 7 or 8, characterized in that: The support vector machine regression model (SVM) adopts a radial basis kernel function (RBF), and the optimal values ​​of its penalty coefficient C and kernel width γ are determined through cross validation.

10. The magnetostrictive liquid level gauge temperature compensation system based on support vector machine according to any one of claims 6 to 8, characterized in that: The system is suitable for industrial environments within the range of -20°C to +85°C.

Citation Information

Cited By

  • Multi-sensor-based automatic feeding control method and system for electrophoresis line of automobile parts

    CN121348757A

  • Automatic feeding control method and system for automotive parts electrophoresis line based on multiple sensors

    CN121348757B

  • Wide-range magnetostriction crack meter based on machine self-learning

    CN121474982A