A method, system, device, and medium for measuring a level of a container of a pressure sensor
By using dual-sensor differential measurement and a temperature compensation model, gas phase pressure interference is eliminated and liquid density and sensor drift are corrected, thus solving the error and stability problems of liquid level measurement under drastic temperature changes and gas phase pressure fluctuations, and achieving high-precision liquid level detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUANENG POWER INT INC JINGGANGSHAN POWER PLANT
- Filing Date
- 2025-05-28
- Publication Date
- 2026-07-21
Smart Images

Figure CN120385405B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control technology, and in particular to a method, system, device and medium for measuring liquid level in a container using a pressure sensor. Background Technology
[0002] Current liquid level measurement technologies in industrial applications mainly rely on float-type, capacitive, ultrasonic / radar, and traditional pressure-type methods. Float-type and capacitive level gauges are easily affected by the density and dielectric constant of the medium, and their mechanical components are prone to wear and tear, resulting in high maintenance costs. While ultrasonic and radar technologies are non-contact measurements, they have stringent requirements on container structure (such as the smoothness of the inner wall and the height of the gas phase space) and have measurement blind spots, making them unsuitable for complex working conditions. Traditional pressure-type liquid level measurement calculates the liquid level using a bottom pressure sensor, but it does not consider the coupling effect of gas phase pressure fluctuations and temperature changes on the sensor output, leading to errors as high as 5%-10%. Especially in closed containers, gas phase pressure and temperature drift significantly interfere with the pressure sensor output, and existing technologies lack dynamic compensation mechanisms, making it difficult to achieve high-precision measurements.
[0003] As industrial automation demands increasing accuracy and stability in liquid level detection, the limitations of existing technologies are becoming increasingly apparent. For example, in scenarios with drastic temperature changes (-40℃ to 85℃), the liquid density changes directly affect the liquid level calculation, and the temperature drift characteristics of the sensor itself further exacerbate the error. Simultaneously, the superposition of gas phase pressure and liquid level pressure in a closed container makes it impossible for traditional single-sensor solutions to effectively separate the two, leading to measurement results deviating from the true value. Furthermore, the coupling effect of multiple parameters (such as temperature, pressure, and density) lacks a systematic correction model; existing technologies mostly employ single-parameter compensation or static calibration, which cannot adapt to dynamic operating conditions. These problems limit the application of liquid level measurement technology in critical fields such as energy and chemical industries, necessitating a high-precision measurement method capable of eliminating multiple interference factors in real time and achieving dynamic closed-loop compensation. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method and system for measuring container liquid level using a pressure sensor. It eliminates gas phase pressure interference through dual-sensor differential measurement, dynamically corrects liquid density and sensor temperature drift errors by combining a temperature compensation model, and achieves systematic correction of the effects of multi-parameter coupling by using a three-dimensional compensation function and dynamic calibration method. It also outputs high-precision liquid level values in real time through a closed-loop signal processing flow, solving the problems of large measurement errors and poor stability caused by temperature changes, gas phase pressure fluctuations and sensor drift in the prior art.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for measuring the liquid level in a container using a pressure sensor, comprising:
[0008] Based on sensor measurement interference, combined with a compensation model, dynamic parameter correction is achieved;
[0009] Establish a compensation function and sensor correction model based on temperature changes, and dynamically adjust parameters in real time;
[0010] Using sensors for collaborative measurement, combined with built-in measurement data, compensation calculations are completed through preset thresholds;
[0011] A dynamic calibration method is designed to eliminate errors through fixed-point calibration and coefficient correction.
[0012] Based on data processing, a closed-loop measurement process is constructed and the compensated values are output.
[0013] As a preferred embodiment of the container liquid level measurement method using the pressure sensor described in this invention, the method includes: dynamically correcting parameters based on sensor measurement interference and combining a compensation model, comprising:
[0014] Interference is measured by sensors, and parameter correction is achieved by combining temperature drift coefficient and density function.
[0015] The liquid density and sensor drift are dynamically adjusted based on a compensation model.
[0016] As a preferred embodiment of the container liquid level measurement method using the pressure sensor described in this invention, the method includes: establishing a compensation function and a sensor correction model based on temperature changes, and dynamically adjusting parameters in real time, including:
[0017] Construct a correlation model between liquid density and temperature and a framework for correcting sensor coefficients;
[0018] Density calculations and sensor drift compensation are updated synchronously based on real-time temperature data.
[0019] As a preferred embodiment of the container liquid level measurement method using the pressure sensor described in this invention, the method includes: using a sensor for collaborative measurement, combining built-in measurement data, and completing compensation calculation through a preset threshold, including:
[0020] The bottom and top sensor measurement mechanism eliminates interference and synchronously integrates sensors to collect real-time environmental parameters.
[0021] By integrating standardized acquisition, filtering, and dynamic compensation threshold matching of multi-source data;
[0022] Based on the relationship between temperature and density, a compensation calculation model is constructed to output correction values.
[0023] As a preferred embodiment of the container liquid level measurement method of the pressure sensor described in this invention, the method includes: designing a dynamic calibration method to eliminate errors through fixed-point calibration and coefficient correction, comprising:
[0024] A calibration model is established based on the state setting reference point and combined with the container structural parameters.
[0025] Dynamic compensation and correction are performed using preset structural coefficients based on real-time sensor data.
[0026] As a preferred embodiment of the container liquid level measurement method of the pressure sensor described in this invention, the method includes: constructing a closed-loop measurement process based on data processing and outputting a compensated value, including:
[0027] The signals from the sensor and temperature probe are acquired in real time by an analog-to-digital converter, and high-frequency noise interference is eliminated by digital filtering technology.
[0028] Based on a preset liquid density table and temperature drift coefficient, the temperature data is input into a three-dimensional compensation model to dynamically adjust the liquid density value. The pressure drift caused by temperature is eliminated by a sensor drift correction coefficient, and the liquid level height is calculated in real time based on the differential pressure value.
[0029] In a preferred embodiment of the container liquid level measurement method using the pressure sensor described in this invention, the dynamic adjustment of the three-dimensional compensation model includes:
[0030] Based on the real-time monitored liquid temperature, the preset density-temperature relationship is invoked to dynamically adjust the liquid density parameters and compensate for the impact of liquid volume expansion and contraction caused by temperature changes on liquid level calculation.
[0031] By using the calibrated temperature drift coefficient and combining it with temperature probe data, a quadratic function model of the sensor output pressure changing with temperature is established to correct the temperature drift error of the pressure sensor in real time.
[0032] At the zero liquid level, the reference pressure point is used to calibrate the gas phase pressure baseline value, and combined with the container structure coefficient, the gas phase pressure interference and system cumulative error are periodically corrected.
[0033] In a second aspect, the present invention provides a container liquid level measurement system with a pressure sensor, comprising:
[0034] The interference compensation module measures interference using sensors and combines it with a compensation model to achieve dynamic parameter correction.
[0035] The temperature parameter adjustment module establishes a compensation function and sensor correction model based on temperature changes, and dynamically adjusts parameters in real time.
[0036] The collaborative threshold module uses sensors to perform collaborative measurements and combines the built-in measurement data to complete compensation calculations based on preset thresholds.
[0037] The dynamic calibration module designs a dynamic calibration method to eliminate errors through fixed-point calibration and coefficient correction.
[0038] The closed-loop processing module, based on data processing, constructs a closed-loop measurement process and outputs the compensated values.
[0039] Thirdly, the present invention provides an electronic device, comprising:
[0040] Memory and processor;
[0041] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of a container liquid level measurement method using a pressure sensor.
[0042] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the container liquid level measurement method of the pressure sensor.
[0043] Compared with existing technologies, the advantages of this invention are as follows: This invention effectively eliminates the interference of gas phase pressure on liquid level detection through a dual-sensor differential measurement mechanism. Combined with a temperature compensation model, it dynamically corrects liquid density changes and sensor drift errors, significantly improving the accuracy of initial parameter calibration. By linking a three-dimensional compensation function with real-time temperature data, it synchronously adjusts density calculations and sensor drift corrections, achieving dynamic decoupling and adaptive compensation for the coupling effects of multiple parameters, enhancing measurement stability under complex operating conditions. Based on a closed-loop signal processing flow, it integrates high-precision analog-to-digital conversion, digital filtering, and dynamic calibration algorithms, ensuring real-time output of liquid level calculation results with strong anti-interference capabilities, solving the problem of accumulated errors caused by environmental fluctuations in traditional methods. Ultimately, this invention achieves a significant reduction in liquid level measurement errors and a significant improvement in long-term system stability. It can adapt to drastic temperature changes, gas phase pressure fluctuations, and multi-media scenarios, providing a highly reliable and high-precision liquid level detection solution for the industrial automation field. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the overall process of a container liquid level measurement method using a pressure sensor according to an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of the structure of a container liquid level measurement method using a pressure sensor according to an embodiment of the present invention. Detailed Implementation
[0047] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0048] Example 1, referring to Figure 1 As one embodiment of the present invention, a method for measuring the liquid level in a container using a pressure sensor is provided, comprising:
[0049] S1: Dynamic parameter correction is achieved by measuring interference from sensors and combining it with a compensation model;
[0050] S2: Establish a compensation function and sensor correction model based on temperature changes, and dynamically adjust parameters in real time;
[0051] S3: Use sensors for collaborative measurement, combine built-in measurement data, and complete compensation calculation through preset thresholds;
[0052] S4: Design a dynamic calibration method to eliminate errors through fixed-point calibration and coefficient correction;
[0053] S5: Based on data processing, construct a closed-loop measurement process and output the compensated values.
[0054] It should be noted that existing liquid level measurement technologies suffer from error accumulation and insufficient stability due to gas phase pressure interference, temperature drift, and multi-parameter coupling. Especially in closed containers or complex industrial scenarios, traditional single-sensor solutions cannot effectively separate gas phase pressure and liquid level pressure, and lack dynamic compensation mechanisms, making it difficult to adapt to the high-precision measurement requirements under drastic temperature changes and multi-media environments.
[0055] Therefore, to address the aforementioned problems of large measurement errors, weak anti-interference capabilities, and poor long-term stability, a dual-sensor differential measurement mechanism is constructed through steps S1-S5 to eliminate gas phase pressure interference. This is combined with a temperature compensation model to correct liquid density and sensor drift errors in real time. Based on a three-dimensional compensation function, the effects of multi-parameter coupling are dynamically decoupled, and compensation calculations are optimized through collaborative measurement and preset thresholds. A dynamic calibration method is designed to periodically correct system errors, and a closed-loop signal processing flow is integrated to achieve high-precision data acquisition, noise suppression, and real-time liquid level output. Ultimately, this significantly improves measurement accuracy and adaptability to complex working conditions. Figure 1As shown, the data measured by the sensor is first read, then the processor performs corresponding calculations according to the set algorithm, and then the calculated results are displayed.
[0056] Example 2, refer to Figure 2 As an embodiment of the present invention, based on the above embodiment, a method for measuring the liquid level in a container using a pressure sensor is provided.
[0057] In this embodiment, step S1, based on sensor measurement interference, combines a compensation model to achieve dynamic parameter correction. By deploying a collaborative differential measurement mechanism between a bottom pressure sensor (P1) and a top pressure sensor (P2), the difference between the total pressure measured by P1 (including liquid level pressure, gas phase pressure, and temperature drift) and the pure gas phase pressure measured by P2 is used to eliminate the interference of gas phase pressure on liquid level calculation. At the same time, a temperature probe is integrated to monitor the liquid temperature in real time. Combined with preset temperature drift coefficients (k1, k2) and a density-temperature relationship table, the sensor output drift and liquid density changes are dynamically corrected to achieve real-time compensation for temperature and pressure coupling interference, thereby completing the dynamic optimization and adjustment of liquid level parameters.
[0058] In one alternative implementation, the dynamic parameter correction based on sensor measurement interference in step S1, combined with a compensation model, can also be achieved through a distributed deployment of a multi-sensor array. That is, multiple pressure sensors are installed at the bottom and side walls of the container, and the pressure gradient characteristics between each sensor are extracted through a redundant data fusion algorithm. Combined with a temperature field distribution model, the regional interference of local gas phase pressure fluctuations and temperature drift on liquid level calculation can be dynamically corrected.
[0059] In another optional implementation, the dynamic parameter correction based on sensor measurement interference in step S1, combined with the compensation model, can also be achieved by introducing pressure signal frequency domain analysis technology, performing spectral decomposition on the pressure waveform output by the sensor, separating high-frequency noise and low-frequency interference components, and combining the temperature compensation model to adaptively filter and dynamically weight the interference signals of different frequency bands, thereby optimizing the real-time performance and anti-interference capability of liquid level parameter correction.
[0060] In this embodiment of the application, step S1, which involves dynamically correcting parameters based on sensor measurement interference and a compensation model, further includes:
[0061] The pressure sensor installed at the bottom of the container measures the total pressure, which is expressed as:
[0062] p total =ρgh+p gas +Δp temp
[0063] Where ρ represents the liquid density (kg / m³) 3 ), where g represents the acceleration due to gravity (9.80665 m / s²).2 ), h represents the liquid level height (m), p gas Δp represents the gas phase pressure (Pa). temp Indicates the temperature drift (Pa);
[0064] Liquid pressure equals density multiplied by gravitational acceleration g multiplied by the height of the liquid column h, which is ρgh. However, the total pressure at the bottom of a closed container includes not only the pressure generated by the height of the liquid column but also the pressure of the air above (the pressure in the upper space of a closed container is often higher than atmospheric pressure, especially in closed containers containing liquids that are hot and easily evaporate). Therefore, the total pressure must also include the pressure p in the upper space. gas Furthermore, the density and expansion of a liquid change significantly with temperature, so temperature compensation pressure, also known as temperature drift Δp, must be added. temp .
[0065] In this embodiment, step S2 establishes a compensation function and a sensor correction model based on temperature changes. By leveraging the nonlinear relationship between liquid density and temperature, a density compensation function containing first and second-order temperature terms is constructed. The liquid density parameters are dynamically adjusted using a preset density-temperature relationship table to compensate for the expansion or contraction of liquid volume caused by temperature changes. Simultaneously, combined with the liquid temperature data collected in real time by the temperature probe, a correction model for the pressure sensor output as a function of temperature changes is established using the calibrated sensor temperature drift coefficient (first and second-order terms). This dynamically eliminates the sensor's own temperature drift error, and the least squares method is used to optimize and calibrate the temperature correlation coefficients to ensure the model's adaptability over a wide temperature range.
[0066] In an optional implementation, the establishment of the temperature-change-based compensation function and sensor correction model in step S2 can also be achieved by introducing an ambient temperature gradient monitoring mechanism, combining the synchronous data of the container outer wall temperature sensor and the liquid internal temperature probe, constructing a multidimensional temperature field distribution model, dynamically correcting the thermal expansion effect of ambient temperature on the sensor mounting structure, and optimizing the correlation compensation parameters between liquid density and temperature drift coefficient based on thermodynamic transfer relationships.
[0067] In another optional implementation, the establishment of the temperature-based compensation function and sensor correction model in step S2 can also be achieved by using an adaptive piecewise linear approximation algorithm to divide the wide temperature range into multiple intervals, independently calibrate the density compensation coefficient and sensor temperature drift correction for different temperature intervals, and automatically match the optimal interval parameters with real-time temperature data to reduce the accumulation of nonlinear errors and reduce the computational complexity of high-order polynomials.
[0068] In this embodiment of the application, step S2, which establishes a compensation function and sensor correction model based on temperature changes and dynamically adjusts parameters in real time, further includes:
[0069] Establish a three-dimensional compensation function:
[0070] ρ(T)=ρ0[1-α(T-T0)+β(T-T0) 2 ]
[0071] Δp comp =k1ΔT+k2ΔT 2
[0072] Where ρ(T) is a compensation for the effect of temperature on liquid density; Δp comp It is the pressure compensation for the effect of final temperature on the pressure of the liquid column.
[0073] Implementation method: such as Figure 2 As shown, the bottom sensor is installed 5cm from the bottom of the container, the top sensor is installed at the top of the gas phase space, and the temperature sensor is installed close to the bottom sensor.
[0074] In the diagram: Point P1: Bottom pressure sensor, measured value is ρgh+p gas ;
[0075] P2 measurement point: Top pressure sensor, measured value is p gas ;
[0076] Temperature probe: Integrated into the P1 sensor, it monitors the liquid temperature in real time;
[0077] Liquid level height h: calculated using (P1-P2) / ρg;
[0078] Gas phase pressure elimination: achieved through differential measurement using dual sensors;
[0079] Density compensation: Temperature data is input to the ρ(T) calculation module.
[0080] In this embodiment, step S3 uses sensors for collaborative measurement. Combined with built-in measurement data, compensation calculation is completed through a preset threshold. Specifically, the "compensation calculation through a preset threshold" means that by coordinating the bottom pressure sensor and the top pressure sensor, the total pressure at the bottom of the container (including liquid static pressure and gas phase pressure) and the pure gas phase pressure at the top are collected respectively. Differential measurement is used to eliminate the interference of gas phase pressure on liquid level calculation. At the same time, the temperature probe integrated into the bottom sensor monitors the liquid temperature in real time. Combined with the preset liquid density-temperature relationship table and the sensor temperature drift coefficient threshold, the density value and drift correction amount at the current temperature are dynamically matched. Through multi-source data fusion and threshold screening mechanism, temperature compensation and error correction of pressure difference are completed, and finally, a high-precision liquid level calculation result is output.
[0081] In one optional implementation, step S3 uses sensors for collaborative measurement. Combined with built-in measurement data, compensation calculation is completed through a preset threshold. This can also be achieved through multi-location temperature gradient monitoring and adaptive threshold adjustment: Distributed temperature sensors are added to the sidewalls of the container and the middle section of the liquid surface to collect liquid temperature gradient data at different depths in real time. Combined with a preset density-temperature nonlinear relationship table, multi-region density correction coefficients are dynamically generated. At the same time, an adaptive threshold algorithm is introduced to automatically adjust the temperature drift compensation threshold range according to the rate of change of ambient temperature and the range of pressure fluctuations, thereby achieving segmented error correction and further optimizing the accuracy of liquid level calculation.
[0082] In another optional implementation, step S3 uses sensors for collaborative measurement. Combined with built-in measurement data, compensation calculation is completed through a preset threshold. This can also be achieved through a redundant sensor array and a multi-source data fusion strategy: deploy multiple pressure sensor arrays at the bottom and top of the container, and eliminate single-point measurement noise through a weighted average algorithm; synchronously integrate historical liquid level data and real-time pressure change trends to construct a dynamic threshold adjustment model, expand the compensation dimension by combining preset medium characteristic parameters (such as viscosity and dielectric constant), and filter effective signals through cross-validation of multi-source data to enhance the anti-interference capability in complex medium environments.
[0083] In this embodiment of the application, step S3 uses sensors for collaborative measurement, combines built-in measurement data, and completes compensation calculation through a preset threshold, and also includes:
[0084] Adopting a dual-sensor structure:
[0085] P1→|Bottom Sensor|→ρgh+p gas
[0086] P2→|Top Sensor|→p gas
[0087] Actual liquid level calculation formula:
[0088] h=(P1-P2) / (ρg)
[0089] We can calculate h using the pressure formula P = ρgh, i.e., h = p / ρg. As mentioned earlier, the pressure of the liquid column needs to be the total pressure minus the pressure in the upper space, so here P = P1 - P2. Finally, h = (P1 - P2) / (ρg); P1 is the total pressure measured by the sensor at the bottom of the container, and P2 is the pressure in the upper space measured by the sensor at the top.
[0090] The total pressure at the bottom of the container is determined by the liquid level; however, we only need the liquid height. Therefore, after measuring the total pressure, we need to subtract the pressure p of the gas in the upper space. gas Only by obtaining the pressure of the liquid column can the height of the liquid column, or liquid level, be calculated using the pressure formula.
[0091] In this embodiment of the application, step S4 involves designing a dynamic calibration method to eliminate errors through fixed-point calibration and coefficient correction, including:
[0092] Final compensation formula:
[0093] h=[(P1-P2)-Δp comp ] / [ρ(T)g]
[0094] The coefficients are calibrated using the least squares method:
[0095] α: Primary temperature coefficient (1 / ℃);
[0096] β: Secondary temperature coefficient (1 / ℃²);
[0097] k1, k2: Sensor temperature drift coefficients;
[0098] The effect of temperature on liquid density and expansion necessitates the introduction of temperature compensation to accurately measure the liquid level height h at different temperatures.
[0099] A calibration of the liquid zero point is performed by setting a reference pressure point:
[0100] When h = 0: p1 ref =P2+δ
[0101] Calibration formula: p gas =P2+(P1-p1) ref ) / γ
[0102] Where δ and γ are container structure coefficients; this is equivalent to setting the zero point, meaning that when the liquid level is 0, the bottom pressure P1 is not necessarily 0. The pressure P1 measured by the bottom sensor at this time is represented by p1. ref This indicates that, ideally, when the liquid level in the container is 0, the pressure at the bottom P1 should equal the pressure at the top P2, which is p. gas When the liquid level is 0, the bottom pressure P1 is not necessarily 0; this pressure should also be included in the upper space pressure p. gas It goes inside, and you need to subtract it when calculating.
[0103] In this embodiment of the application, step S5, based on data processing, constructs a closed-loop measurement process and outputs compensated values, including:
[0104] Signal processing:
[0105] P1 → 24-bit ADC sampling → Digital filtering
[0106] P2 → 24-bit ADC sampling → Digital filtering
[0107] T→|PT100 Temperature Measurement|→Table Lookup Compensation
[0108] The calculation process includes:
[0109] Read P1, P2, T;
[0110] Calculate ΔP = P1 - P2;
[0111] Temperature compensation:
[0112] ρ = Preset density table [T];
[0113] Δp comp = Temperature drift coefficient [T];
[0114] Calculate h = (ΔP - Δp) comp ) / (ρg);
[0115] Output the h value;
[0116] P1 is the pressure value measured by the pressure sensor at the bottom of the container, P2 is the pressure value measured by the pressure sensor at the top, and T is the temperature of the liquid.
[0117] ΔP is the pressure generated by the height of the liquid column, and ρ = preset density table [T] is the density value of different liquids that need to be measured on site, such as water, gasoline, acid and alkali, which is implanted in the device in advance.
[0118] In summary, this invention provides a container liquid level measurement method based on pressure sensors. It effectively separates the static pressure of the liquid level from the gas phase pressure through a dual-sensor differential measurement mechanism, and dynamically corrects liquid density changes and sensor temperature drift errors using a temperature compensation model. This solves the problems of low measurement accuracy and poor stability caused by multi-parameter coupling in traditional technologies. This invention employs a coordinated arrangement of bottom and top pressure sensors to collect total pressure and pure gas phase pressure in real time, using differential calculation to eliminate gas phase interference. An integrated temperature probe monitors the liquid temperature, and a preset density-temperature relationship table and temperature drift coefficient are used to dynamically optimize density parameters and drift correction amounts. A three-dimensional compensation function achieves adaptive decoupling and synchronous correction of multiple parameters such as temperature, pressure, and density, significantly improving anti-interference capabilities under complex operating conditions. Furthermore, a dynamic calibration method is designed, combining reference pressure point calibration and structural coefficient correction, to periodically eliminate accumulated system errors and ensure long-term measurement stability. The closed-loop signal processing flow integrates high-precision data acquisition, digital filtering, and real-time algorithms to optimize signal quality and output the compensated liquid level value.
[0119] Example 3 is an embodiment of the present invention, which provides a method for measuring the liquid level in a container using a pressure sensor. To verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculations and simulation experiments.
[0120] Parameters of a certain storage tank:
[0121] 2m in diameter, 3m in height;
[0122] Medium: Diesel oil (ρ0 = 840 kg / m³) 3 (α=0.0007 / ℃);
[0123] Temperature change: 25℃→50℃;
[0124] Actual measurement data:
[0125] P1=25230Pa, P2=11325Pa, T=50℃;
[0126] Compensation calculation:
[0127] ρ=840×(1-0.0007×25)=823.5kg / m 3 ;
[0128] Δp comp =0.05%×(50-25)×25230=315.4Pa;
[0129] h=(25230-11325-315.4) / (823.5×9.80665)=1.6839m;
[0130] The actual liquid level was 1.6900m, with an error of 0.36%.
[0131] Here, P1 is the pressure at the bottom of the container, and P2 is the pressure at the top of the container;
[0132] ρ0 is the density of diesel fuel (at a temperature of 25 degrees Celsius), and α = 0.0007 / ℃ is the temperature change coefficient of diesel fuel, which is the change in density when the temperature deviates from 25 degrees Celsius. In this example, the diesel fuel temperature is T = 50 degrees Celsius, which is equivalent to a deviation of 25 degrees Celsius from the standard temperature.
[0133] p comp It is the compensation pressure caused by the temperature deviating from the standard temperature, of which 0.05% is the temperature drift coefficient.
[0134] Example 4 illustrates a schematic scheme for a container liquid level measurement method using a pressure sensor. It should be noted that the technical solution of this pressure sensor container liquid level measurement system belongs to the same concept as the technical solution of the pressure sensor container liquid level measurement method described above. Details not described in detail in the technical solution of the pressure sensor container liquid level measurement system in this embodiment can be found in the description of the technical solution of the pressure sensor container liquid level measurement method described above.
[0135] This embodiment also provides a container liquid level measurement system with a pressure sensor, including:
[0136] The interference compensation module measures interference using sensors and combines it with a compensation model to achieve dynamic parameter correction.
[0137] The temperature parameter adjustment module establishes a compensation function and sensor correction model based on temperature changes, and dynamically adjusts parameters in real time.
[0138] The collaborative threshold module uses sensors to perform collaborative measurements and combines the built-in measurement data to complete compensation calculations based on preset thresholds.
[0139] The dynamic calibration module designs a dynamic calibration method to eliminate errors through fixed-point calibration and coefficient correction.
[0140] The closed-loop processing module, based on data processing, constructs a closed-loop measurement process and outputs the compensated values.
[0141] This embodiment also provides an electronic device suitable for measuring the liquid level of a container using a pressure sensor, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the container liquid level measurement method using a pressure sensor as proposed in the above embodiment.
[0142] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the container liquid level measurement method for implementing a pressure sensor as proposed in the above embodiments.
[0143] The storage medium proposed in this embodiment and the container liquid level measurement method for realizing pressure sensor proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0144] Based on the above description of the implementation methods, those skilled in the art will clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0145] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for measuring the liquid level in a container using a pressure sensor, characterized in that, include: Based on sensor measurement interference, combined with a compensation model, dynamic parameter correction is achieved; Establish a compensation function and sensor correction model based on temperature changes, and dynamically adjust parameters in real time; Using sensors for collaborative measurement, combined with built-in measurement data, compensation calculations are performed based on preset thresholds, including: Interference is eliminated by using bottom and top sensor measurement mechanisms, and real-time environmental parameters are collected synchronously by integrated sensors, employing a dual-sensor structure. Actual liquid level calculation formula: in, Indicates the density of the liquid. Represents gravitational acceleration. Indicates the liquid level height. It is the total pressure measured by the sensor at the bottom of the container. It is the pressure in the upper space measured by the top sensor; By integrating standardized acquisition, filtering, and dynamic compensation threshold matching of multi-source data; Based on the relationship between temperature and density, a compensation calculation model is constructed to output correction values; A dynamic calibration method is designed to eliminate errors through fixed-point calibration and coefficient correction. A calibration model is established based on the state setting reference point and combined with the container structural parameters. By using real-time sensor data and preset structural coefficients for dynamic compensation and correction, the final compensation formula is as follows: in, It is a compensation for the effect of temperature on liquid density; It is the pressure compensation for the effect of final temperature on the pressure of the liquid column; Considering the effect of temperature on liquid density and expansion, temperature compensation is introduced to accurately measure liquid level height under different temperatures. ; The liquid zero-point is calibrated by setting a reference pressure point: when hour: Calibration formula: in, This is the container structure coefficient; when the liquid level is 0, the bottom pressure... use express, Indicates gas phase pressure; Based on data processing, a closed-loop measurement process is constructed and the compensated values are output. The signals from the sensor and temperature probe are acquired in real time by an analog-to-digital converter, and high-frequency noise interference is eliminated by digital filtering technology. Based on a preset liquid density table and temperature drift coefficient, the temperature data is input into a three-dimensional compensation model to dynamically adjust the liquid density value. The pressure drift caused by temperature is eliminated by the sensor drift correction coefficient, and the liquid level height is calculated in real time based on the differential pressure value. The dynamic adjustment of the three-dimensional compensation model includes: Establish a three-dimensional compensation function: The coefficients are determined using the least squares method. This is the primary temperature coefficient; It is a second-order temperature coefficient; This refers to the sensor's temperature drift coefficient. Based on the real-time monitored liquid temperature, the preset density-temperature relationship is invoked to dynamically adjust the liquid density parameters and compensate for the impact of liquid volume expansion and contraction caused by temperature changes on liquid level calculation. By using the calibrated temperature drift coefficient and combining it with temperature probe data, a quadratic function model of the sensor output pressure changing with temperature is established to correct the temperature drift error of the pressure sensor in real time. At the zero liquid level, the reference pressure point is used to calibrate the gas phase pressure baseline value, and combined with the container structure coefficient, the gas phase pressure interference and system cumulative error are periodically corrected.
2. The container liquid level measurement method using a pressure sensor as described in claim 1, characterized in that, Based on sensor measurement interference, dynamic parameter correction is achieved by combining a compensation model, including: Interference is measured by sensors, and parameter correction is achieved by combining temperature drift coefficient and density function. The liquid density and sensor drift are dynamically adjusted based on a compensation model.
3. The container liquid level measurement method using a pressure sensor as described in claim 2, characterized in that, Establish a compensation function and sensor correction model based on temperature changes, and dynamically adjust parameters in real time, including: Construct a correlation model between liquid density and temperature and a framework for correcting sensor coefficients; Density calculations and sensor drift compensation are updated synchronously based on real-time temperature data.
4. A container liquid level measurement system using a pressure sensor, employing the method described in any one of claims 1-3, characterized in that, include: The interference compensation module measures interference using sensors and combines it with a compensation model to achieve dynamic parameter correction. The temperature parameter adjustment module establishes a compensation function and sensor correction model based on temperature changes, and dynamically adjusts parameters in real time. The collaborative threshold module uses sensors to perform collaborative measurements and combines the built-in measurement data to complete compensation calculations based on preset thresholds. The dynamic calibration module designs a dynamic calibration method to eliminate errors through fixed-point calibration and coefficient correction. The closed-loop processing module, based on data processing, constructs a closed-loop measurement process and outputs the compensated values.
5. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the container liquid level measurement method of the pressure sensor according to any one of claims 1 to 3.
6. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the container liquid level measurement method of the pressure sensor according to any one of claims 1 to 3.