Non-contact liquid level measurement method and device fusing attitude information
By fusing attitude information, the tilt angle of the equipment is calculated using an attitude sensor and combined with a liquid level sensor for high-precision liquid level calculation. This solves the error problem caused by equipment tilt in the existing technology and realizes high-precision liquid level detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- E SURFING IOT CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-05-12
AI Technical Summary
Existing non-contact liquid level detection technologies suffer from insufficient accuracy, operational difficulties, large errors due to equipment tilting, and environmental interference in high-value liquid containers, making it impossible to achieve high-precision liquid level measurement.
By fusing attitude information, the tilt angle of the equipment is calculated in real time using attitude sensors, and the tilt angle is incorporated into the liquid level algorithm. Combined with the liquid level sensor, high-precision liquid level calculation is performed, and attitude data is provided to guide operators in adjusting the attitude of the equipment.
It achieves high-precision and robust liquid level detection, reduces errors caused by equipment tilt, and improves measurement accuracy and ease of operation.
Smart Images

Figure CN122015997A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-contact liquid level measurement technology, and particularly relates to a non-contact liquid level measurement method and device that integrates attitude information. Background Technology
[0002] In the management of high-value liquids (such as base liquor, petroleum, and chemicals), accurate measurement of the liquid level within containers is a crucial operational step. Taking the liquor industry as an example, liquid level measurement is integrated into all aspects of inventory asset management, process and quality control, automated production efficiency improvement, and safety risk prevention. Unlike traditional manual methods that involve opening the container and inserting a ruler or measuring rod, the mainstream technology currently focused on in the industry has gradually shifted towards non-contact, non-destructive testing. This method offers significant advantages in measurement accuracy, operational efficiency, and protection against liquor contamination.
[0003] Currently, non-contact liquid level detection technologies mainly include laser liquid level detection, ultrasonic liquid level detection, and radar wave liquid level detection. The core technologies in these common solutions are essentially based on the time-of-flight ranging principle. Among them: Laser ranging calculates the target distance by measuring the round-trip time of a laser beam using a transmitting and receiving device. This method lacks penetration through materials such as canvas, wood, and ceramic, therefore it typically needs to be placed inside the container, increasing maintenance costs and posing a risk of liquid contamination. Under direct sunlight, the typical accuracy at close range is approximately ±2mm to 5mm, with the absolute error increasing with distance. Furthermore, factors such as differences in liquid transparency and color, and liquid surface fluctuations can cause reading jumps and signal loss.
[0004] Ultrasonic ranging uses ultrasonic waves as a carrier to calculate distance by measuring the round-trip propagation time. This technology has penetrating power, but it is easily affected by environmental temperature and humidity, and is sensitive to factors such as steam and pressure. Its detection accuracy is usually 0.25%-0.5% of full scale. Taking a common ton-sized jar (about 1.5m high) in the liquor industry as an example, the maximum measurement error is about 8mm.
[0005] Millimeter-wave radar ranging utilizes the propagation characteristics of high-frequency electromagnetic waves to calculate distance through time delay or phase change. This technology features millimeter-level accuracy (theoretically ±1mm), the ability to penetrate most non-metallic materials, and high robustness in harsh environments (such as those affected by temperature and humidity). It enables truly non-contact liquid level detection, accurately measuring while avoiding contamination of the measured liquid.
[0006] In engineering applications, level gauges are typically used by operators who fix them above the container to continuously monitor the level, or by briefly placing a handheld device above the container lid for mobile, rapid inventory checks. Uneven surfaces of the container opening and lid, improperly level installation of the equipment, and tilting during placement can cause an angle between the core sensor and the vertical direction (normal) of the liquid surface. This can degrade the accuracy of level detection from millimeters to centimeters, and in severe cases, multipath interference can produce erroneous data. Such results are unacceptable in high-value liquid industries (such as the liquor industry, producing brands like Moutai and Wuliangye).
[0007] Currently available non-contact level gauges typically rely on a single sensor for level detection. Some manufacturers equip the device with a physical bubble level to assist operators in adjusting the device's orientation. This method has the following problems: 1. Bubble levels are mostly used for "rough leveling" in daily life, and their accuracy is insufficient for high-precision scenarios; 2. To achieve multi-directional horizontal recognition, the bubble level needs to be installed on the upper surface of the equipment, which limits its application scenarios (if the container height is ≥1.5m, there are height requirements for the operator). 3. The physical display method is easily overlooked in actual operation; 4. Difficult to operate; when the equipment is placed on the surface to be tested, some environmental factors may make it difficult to adjust it to achieve a high level of horizontal performance. 5. It does not participate in the calculation. The detected level information is only used for manual identification and adjustment and does not participate in the final liquid level calculation, so it cannot provide support for high-precision measurement.
[0008] Therefore, the abnormal operation and decreased accuracy caused by the tilted placement of the equipment have not been effectively resolved. Summary of the Invention
[0009] In view of the shortcomings of the prior art, the purpose of the invention is to provide a non-contact liquid level measurement method and device that integrates attitude information. The method obtains the attitude data of the device under test in real time through attitude sensor, calculates the tilt angle of the device under test relative to the horizontal plane by solving the attitude data of the device under test, and integrates the tilt angle into the liquid level algorithm to achieve high-precision liquid level fusion calculation, thereby achieving robust and high-precision liquid level detection effect.
[0010] A first aspect of the present invention provides a non-contact liquid level measurement method that integrates attitude information, comprising: The device under test is placed on a horizontal surface, and the attitude sensor collects the attitude data of the device under test in real time, and the display unit displays the attitude data. The attitude data of the device under test are used to calculate the tilt angle of the device under test relative to the horizontal plane. Determine the magnitude of the tilt angle compared to the preset tilt angle threshold; If the judgment result is that the tilt angle is less than the preset tilt angle threshold, determine whether the liquid level sensor is triggered. When the judgment result indicates that the liquid level sensor is triggered, the liquid level sensor collects the liquid level data of the device under test; The liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane are used to perform liquid level fusion calculation to obtain the vertical liquid level, which is then displayed by the display unit.
[0011] Furthermore, in the aforementioned non-contact liquid level measurement method that integrates attitude information, attitude calculation is performed on the attitude data of the device under test to obtain the tilt angle of the device under test relative to the horizontal plane, including: Calculate the initial attitude angle based on the accelerometer data in the attitude data of the device under test; The attitude is calculated by integrating the gyroscope data in the attitude data of the device under test. The attitude sensor calculation algorithm calculates the tilt angle of the device under test relative to the horizontal plane in real time based on the initial attitude angle and attitude.
[0012] Furthermore, the aforementioned non-contact liquid level measurement method incorporating attitude information also includes: When the judgment result is that the tilt angle is greater than or equal to the preset tilt angle threshold, an alarm is triggered and an alarm message is displayed; The alarm message indicates that the tilt angle of the device under test is greater than or equal to a preset tilt angle threshold.
[0013] Furthermore, the aforementioned non-contact liquid level measurement method incorporating attitude information also includes: When the judgment result is that the liquid level sensor is not triggered, the tilt angle of the device under test relative to the horizontal plane is displayed in real time.
[0014] Furthermore, the aforementioned non-contact liquid level measurement method incorporating attitude information also includes: Before the attitude sensor acquires the attitude data of the device under test in real time, the attitude sensor is corrected for zero bias. Before acquiring liquid level data from the device under test, the liquid level sensor is zero-biased. The attitude sensor collects the attitude data of the device under test in real time and then filters the attitude data of the device under test. After the liquid level sensor collects the liquid level data of the device under test, it performs filtering processing on the liquid level data of the device under test.
[0015] Furthermore, in the aforementioned non-contact liquid level measurement method that integrates attitude information, the triggering method of the liquid level sensor includes: periodic triggering or manual triggering.
[0016] Furthermore, in the aforementioned non-contact liquid level measurement method that integrates attitude information, the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane are fused to calculate the vertical liquid level, which is obtained by the following formula: Where h represents the distance between the test point of the device under test and the liquid surface, as measured by the liquid level sensor. Indicates vertical liquid level. This indicates the pitch angle of the device under test relative to the horizontal plane. This indicates the roll angle of the device under test relative to the horizontal plane.
[0017] A second aspect of the present invention also proposes a non-contact liquid level measurement device that integrates attitude information, comprising: an attitude sensor, a display unit, a central processing unit, a liquid level sensor, and a power supply unit. Attitude sensors are used to acquire attitude data of a device under test placed on a horizontal surface in real time. The central processing unit is used to perform attitude calculation on the attitude data of the device under test, obtain the tilt angle of the device under test relative to the horizontal plane, and determine the size of the tilt angle compared with the preset tilt angle threshold; when the determination result is that the tilt angle is less than the preset tilt angle threshold, it determines whether the liquid level sensor is triggered. The liquid level sensor is used to collect liquid level data of the device under test when the judgment result indicates that the liquid level sensor is triggered. The central processing unit is also used to perform liquid level fusion calculation on the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane to obtain the vertical liquid level; The display unit is used to display attitude data and vertical liquid level; The power supply unit provides power to the attitude sensor, display unit, central processing unit, and level sensor.
[0018] A third aspect of the present invention also provides an electronic device comprising: a processor and a memory; The processor executes any of the above non-contact liquid level measurement methods that fuse attitude information by calling programs or instructions stored in memory.
[0019] In a fourth aspect, the present invention also provides a computer-readable storage medium storing a program or instructions that cause a computer to execute a non-contact liquid level measurement method incorporating attitude information as described above.
[0020] The beneficial effects of the present invention are as follows: The present invention obtains the attitude data of the device under test in real time by using an attitude sensor, calculates the tilt angle of the device under test relative to the horizontal plane by solving the attitude data of the device under test, incorporates the tilt angle into the liquid level algorithm to achieve high-precision liquid level fusion calculation, thereby achieving a robust and high-precision liquid level detection effect. At the same time, the attitude data of the device under test is displayed in real time to guide the operator to correct the attitude of the device under test and avoid abnormal actions. Attached Figure Description
[0021] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.
[0022] Figure 1 This is a schematic diagram of a non-contact liquid level measurement method that integrates attitude information, provided by an embodiment of the present invention. Figure 2 A schematic diagram illustrating a method for calculating the tilt angle of a device under test relative to a horizontal plane, provided by an embodiment of the present invention; Figure 3 This is a schematic diagram of a non-contact liquid level measuring device that integrates attitude information, provided in an embodiment of the present invention. Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. 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 scope of protection of the present invention.
[0024] Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts disclosed in this invention.
[0025] In the description of this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "installed," "connected," and "linked" should be interpreted broadly; for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with some aspects of the invention as detailed in the appended claims.
[0027] This invention proposes a non-contact liquid level measurement method, device, electronic device, and storage medium that integrates attitude information. The attitude data of the device under test is obtained in real time by using an attitude sensor. The tilt angle of the device under test relative to the horizontal plane is obtained by solving the attitude data of the device under test. The tilt angle is incorporated into the liquid level algorithm to achieve high-precision liquid level fusion calculation, thereby achieving robust and high-precision liquid level detection effect.
[0028] Before introducing the embodiments of the present invention, the technical terms involved in the present invention will be introduced first.
[0029] 1. Attitude sensor: Also commonly known as a motion sensor or IMU (Inertial Measurement Unit), it is an electronic device that detects the attitude angle and motion of an object in three-dimensional space by fusing data from multiple sources such as gyroscopes, accelerometers, and magnetometers.
[0030] 2. Time-of-flight ranging principle: By measuring the "flight time" of a "wave" or "pulse" from the transmission point to the target point and back to the receiving point, the physical distance between the transmission point and the target point is estimated using this time and the speed of the wave.
[0031] 3. Base liquor: refers to the raw liquor produced during the brewing process that has not yet been blended or packaged. It is the core semi-finished asset of liquor production enterprises.
[0032] 4. Multipath interference: Electromagnetic multipath interference refers to the phenomenon where wireless signals, after propagating through multiple different paths from the transmitter to the receiver, are superimposed. Due to the differences in arrival time, phase, and intensity of each signal, the received signal may be enhanced, weakened, or distorted.
[0033] Method Implementation Examples In a first aspect, the present invention proposes a non-contact liquid level measurement method that integrates attitude information, combined with Figure 1 It includes six steps, S1 to S6: S1: Place the device under test on a horizontal surface. The attitude sensor collects the attitude data of the device under test in real time, and the display unit displays the attitude data.
[0034] Specifically, in this embodiment of the invention, the device under test is a device that holds liquids such as base wine, petroleum and chemicals. Here, the device under test has been calibrated at the factory in a laboratory quantitative environment for its attitude and liquid level. The attitude sensor is integrated into the device under test to collect the attitude data of the device under test in real time, and the attitude data of the device under test is displayed in real time through the display unit.
[0035] For example: In the sightseeing cellar of a baijiu (Chinese liquor) cellar, there are several standard jars of liquor, sealed with plastic film and plastic lids. The base liquor ceramic jar numbered T207 is selected as the test device. The base liquor ceramic jar numbered T207 is placed on a horizontal office table. The sealing material is removed, and the distance from the mouth of the jar to the liquid surface is measured to be 805mm using a physical liquid level gauge. The sealing material is restored, and the jar is left to stand for about 10 minutes until the liquid surface is stable. The attitude sensor is integrated on the base liquor ceramic jar numbered T207 to collect the attitude data of the test device in real time, and the attitude data of the base liquor ceramic jar numbered T207 is displayed in real time through the display unit.
[0036] S2: Perform attitude calculation on the attitude data of the device under test to obtain the tilt angle of the device under test relative to the horizontal plane.
[0037] Specifically, in this embodiment of the invention, the attitude sensor calculation algorithm running in the central processing unit calculates the attitude data of the device under test to obtain the tilt angle of the device under test relative to the horizontal plane.
[0038] For example: The attitude sensor calculation algorithm running in the central processing unit calculates the attitude data of the base wine jar numbered T207 and obtains that the tilt angle of the base wine jar numbered T207 relative to the horizontal plane is 5°.
[0039] S3: Determine the difference between the tilt angle and the preset tilt angle threshold.
[0040] Specifically, in this embodiment of the invention, the central processing unit determines the size of the tilt angle and the preset tilt angle threshold. The size of the preset tilt angle threshold can be flexibly set according to specific circumstances, such as 10°, 15°, etc., and is not intended to limit the scope of protection of this invention.
[0041] For example: The central processing unit determines the magnitude of the tilt angle of 5° and the preset tilt angle threshold of 15°.
[0042] S4: When the judgment result is that the tilt angle is less than the preset tilt angle threshold, determine whether the liquid level sensor is triggered.
[0043] Specifically, in this embodiment of the invention, when the determination result is that the tilt angle is less than the preset tilt angle threshold, since the triggering method of the liquid level sensor includes manual triggering and periodic triggering, and is not triggered in real time, the central processing unit determines whether the liquid level sensor has been triggered.
[0044] For example: when the tilt angle is 5° less than the preset tilt angle threshold of 15°, the central processing unit determines whether the liquid level sensor is triggered.
[0045] S5: When the judgment result is that the liquid level sensor is triggered, the liquid level sensor collects the liquid level data of the device under test.
[0046] Specifically, in this embodiment of the invention, when the judgment result is triggered by the liquid level sensor, the liquid level sensor is integrated into the device under test to collect the liquid level data of the device under test.
[0047] For example: The liquid level sensor is integrated into the ceramic jar of base liquor, numbered T207, and collects the distance from the mouth of the jar to the liquid surface, which is 816 mm.
[0048] S6: The vertical liquid level is obtained by fusing the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane, and the display unit displays the vertical liquid level.
[0049] Specifically, in this embodiment of the invention, the liquid level fusion calculation algorithm running in the central processing unit calculates the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane to obtain the vertical liquid level, which is then displayed by the display unit.
[0050] For example: The liquid level fusion calculation algorithm running in the central processing unit calculates the liquid level data of 816mm for the base wine ceramic jar numbered T207 and the tilt angle of 5° of the base wine ceramic jar numbered T207 relative to the horizontal plane to obtain the vertical liquid level of 808mm, and displays the vertical liquid level of 808mm through the display unit.
[0051] It should be understood that the hardware system involved in the above method includes: attitude sensor, liquid level sensor, central processing unit and display unit. It also provides power to attitude sensor, liquid level sensor, central processing unit and display unit through power supply unit to maintain the safe and stable operation of hardware system.
[0052] Furthermore, in the aforementioned non-contact liquid level measurement method that integrates attitude information, attitude calculation is performed on the attitude data of the device under test to obtain the tilt angle of the device under test relative to the horizontal plane, combined with... Figure 2It includes three steps, S21 to S23: S21: Calculate the initial attitude angle based on the accelerometer data in the attitude data of the device under test; S22: Calculate the attitude based on the integration of gyroscope data in the attitude data of the device under test; S23: The attitude sensor calculation algorithm calculates the tilt angle of the device under test relative to the horizontal plane in real time based on the initial attitude angle and attitude.
[0053] Specifically, in this embodiment of the invention, the accelerometer in the attitude sensor collects accelerometer data from the device under test and calculates the initial attitude angle based on the accelerometer data. The gyroscope in the attitude sensor collects gyroscope data and integrates the gyroscope data to obtain the attitude. The attitude sensor calculation algorithm running in the central processing unit calculates the tilt angle of the device under test relative to the horizontal plane in real time based on the initial attitude angle and the attitude.
[0054] The attitude sensor calculation algorithm calculates the tilt angle of the device under test relative to the horizontal plane in real time based on the initial attitude angle and the attitude. The steps are represented by the following 9 steps: <1. Definition of Coordinate System> Navigation coordinate system (n-system): Northeast-Universe (ENU) Carrier coordinate system (b-frame): Front right lower (FRD) Euler angles definition: ZYX order (yaw) -Pitch -Roll ) <2. Derivation of the rotation matrix> Rotation matrix Transform the navigation coordinate system (n-frame) vector to the vehicle coordinate system (b-frame): Basic rotation matrices: Calculate the product: <3. Accelerometer Measurement Equation Accelerometer measures specific force : Gravity vector in navigation coordinate system: The gravity vector in the carrier coordinate system: static conditions ,but: Therefore, the relationship between the accelerometer output and the attitude angle is expressed as: 4. Calculate the tilt angle (static) using the accelerometer. Step 4.1: Calculate the pitch angle Value range: Step 4.2: Calculate the roll angle Divide the two equations: Using the four quadrants arctangent: Value range: Static solution results: <5. Gyroscope Measurement Equations> The gyroscope measures the component of the angular velocity of the carrier relative to the navigation coordinate system in the carrier coordinate system: in, Represents the roll angular velocity (around) axis), Represents pitch angular velocity (around) axis); Indicates yaw rate (around) axis).
[0055] 6. Euler angle kinematic equations Relationship between Euler's angular rate and angular velocity: Expand: 7. Discrete-time integration (gyroscope attitude prediction) Sampling interval Using the first-order Euler integral: enter: (Current angular velocity) (Previous moment's posture) Output: (Attitude prediction at the current moment) Gyroscope prediction results: 8. Complementary Filtering Fusion Accelerometers provide accurate tilt angles at low frequencies, while gyroscopes provide high-frequency responses; the two complement each other to filter and obtain the final attitude.
[0056] Step 8.1: Calculate the accelerometer tilt angle Step 8.2: Calculate the gyroscope tilt angle (obtained by integrating the fused results from the previous time step). in and Using the formula in Section 7, angular velocity This indicates the current reading of the gyroscope.
[0057] Step 8.3: Complementary Filtering Fusion <9. Final output of tilt angle calculation result: in, (Weighting coefficient, close to 1 for gyroscope) Sampling interval (seconds), actually used is 0.01 seconds (100Hz sampling rate). .
[0058] For example: The attitude sensor calculation algorithm running in the central processing unit calculates in real time, based on the initial attitude angle and attitude, that the tilt angle of the base wine jar numbered T207 relative to the horizontal plane is 6°.
[0059] Furthermore, the aforementioned non-contact liquid level measurement method incorporating attitude information also includes: When the judgment result is that the tilt angle is greater than or equal to the preset tilt angle threshold, an alarm is triggered and an alarm message is displayed; The alarm message indicates that the tilt angle of the device under test is greater than or equal to a preset tilt angle threshold.
[0060] Specifically, in this embodiment of the invention, when the judgment result is that the tilt angle is greater than or equal to the preset tilt angle threshold, an alarm is triggered and an alarm message is displayed. Here, the alarm message can be displayed in a highlighted manner, indicating that the tilt angle of the device under test is greater than or equal to the preset tilt angle threshold. Thus, the operator can correct the attitude of the device under test based on the content of the alarm message and prevent abnormal operations from generating erroneous data.
[0061] For example: when the judgment result is that the tilt angle of 17° is greater than or equal to the preset tilt angle threshold of 15°, the display unit is black when it is displaying normally, and the alarm information is displayed in red. The alarm information is that the tilt angle of the base wine jar numbered T207 is greater than or equal to the preset tilt angle threshold of 15°. The operator can correct the posture of the device under test according to the alarm information and prevent abnormal operation from generating erroneous data.
[0062] Furthermore, the aforementioned non-contact liquid level measurement method incorporating attitude information also includes: When the judgment result is that the liquid level sensor is not triggered, the tilt angle of the device under test relative to the horizontal plane is displayed in real time.
[0063] Specifically, in this embodiment of the invention, since the liquid level sensor is triggered by manual triggering and periodic triggering, and is not triggered in real time, the central processing unit determines whether the liquid level sensor is triggered. When the determination result is that the liquid level sensor is not triggered, the display unit displays the tilt angle of the device under test relative to the horizontal plane in real time. Thus, the operator can correct the posture of the device under test and avoid abnormal actions in real time according to the display result.
[0064] For example: when the judgment result is that the liquid level sensor is not triggered, the display unit displays the tilt angle of the base wine ceramic jar numbered T207 relative to the horizontal plane in real time. It should be understood that the tilt angle of the base wine ceramic jar numbered T207 relative to the horizontal plane changes in real time, so that the operator can correct the posture of the device under test and avoid abnormal actions in real time according to the display result.
[0065] Furthermore, the aforementioned non-contact liquid level measurement method incorporating attitude information also includes: Before the attitude sensor acquires the attitude data of the device under test in real time, the attitude sensor is corrected for zero bias. Before acquiring liquid level data from the device under test, the liquid level sensor is zero-biased. The attitude sensor collects the attitude data of the device under test in real time and then filters the attitude data of the device under test. After the liquid level sensor collects the liquid level data of the device under test, it performs filtering processing on the liquid level data of the device under test.
[0066] Specifically, in this embodiment of the invention, before the attitude sensor acquires the attitude data of the device under test in real time, it can be horizontally allowed to rest for a few seconds to perform zero-bias correction. Before the level sensor acquires the level data of the device under test, it can be adjusted through the interface to perform zero-bias correction, thereby improving the accuracy of the acquired attitude data and level data, and further improving the accuracy of level measurement. The attitude data of the device under test is processed by Kalman filtering and other techniques to suppress noise data interference, and the level data of the device under test is processed by Kalman filtering and other techniques to suppress noise data interference, further improving the accuracy of level measurement.
[0067] Furthermore, in the aforementioned non-contact liquid level measurement method that integrates attitude information, the triggering method of the liquid level sensor includes: periodic triggering or manual triggering.
[0068] Specifically, in this embodiment of the invention, the attitude sensor maintains high-frequency real-time sampling to capture detailed dynamics of the device under test, and the liquid level sensor can perform periodic sampling, such as once per hour or manually triggered at any time.
[0069] Furthermore, in the aforementioned non-contact liquid level measurement method that integrates attitude information, the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane are fused to calculate the vertical liquid level, which is obtained by the following formula: Where h represents the distance between the test point of the device under test and the liquid surface, as measured by the liquid level sensor. Indicates vertical liquid level. This indicates the pitch angle of the device under test relative to the horizontal plane. This indicates the roll angle of the device under test relative to the horizontal plane.
[0070] Device Examples A second aspect of the invention also proposes a non-contact liquid level measurement device that integrates attitude information, combined with... Figure 3 It includes: an attitude sensor 31, a central processing unit 32, a liquid level sensor 33, a display unit 34, and a power supply unit 35. The attitude sensor 31 is used to acquire attitude data of the device under test placed on a horizontal surface in real time.
[0071] Specifically, in this embodiment of the invention, the device under test is a device that holds liquids such as base wine, petroleum and chemicals. Here, the device under test has been calibrated at the factory in a laboratory quantitative environment for its attitude and liquid level. The attitude sensor 31 is integrated into the device under test to collect the attitude data of the device under test in real time.
[0072] For example: In the sightseeing cellar of a baijiu (Chinese liquor) cellar, there are several standard jars of liquor, sealed with plastic film and plastic lids. The base liquor ceramic jar numbered T207 is selected as the device to be tested. The base liquor ceramic jar numbered T207 is placed on a horizontal office table. The sealing material is removed, and the distance from the mouth of the jar to the liquid surface is measured to be 805mm using a physical liquid level gauge. The sealing material is restored, and the jar is left to stand for about 10 minutes until the liquid surface is stable. The attitude sensor is integrated into the base liquor ceramic jar numbered T207 to collect the attitude data of the device to be tested in real time.
[0073] The central processing unit 32 is used to perform attitude calculation on the attitude data of the device under test, obtain the tilt angle of the device under test relative to the horizontal plane, and determine the size of the tilt angle and the preset tilt angle threshold. When the determination result is that the tilt angle is less than the preset tilt angle threshold, it determines whether the liquid level sensor is triggered.
[0074] Specifically, in this embodiment of the invention, the central processing unit calculates the tilt angle of the device under test relative to the horizontal plane by processing the attitude data of the device under test, and determines the size of the tilt angle compared with a preset tilt angle threshold. The size of the preset tilt angle threshold can be flexibly set according to specific circumstances, such as 10°, 15°, etc. When the determination result is that the tilt angle is less than the preset tilt angle threshold, since the triggering method of the liquid level sensor includes manual triggering and periodic triggering, and is not triggered in real time, the central processing unit determines whether the liquid level sensor has been triggered.
[0075] For example: The central processing unit calculates the attitude data of the base wine ceramic jar numbered T207 and finds that the tilt angle of the base wine ceramic jar numbered T207 relative to the horizontal plane is 5°. The central processing unit judges the size of the tilt angle 5° and the preset tilt angle threshold 15°. The judgment result is that the tilt angle 5° is less than the preset tilt angle threshold 15°, and then determines whether the liquid level sensor is triggered.
[0076] The liquid level sensor 33 is used to collect liquid level data of the device under test when the judgment result is that the liquid level sensor is triggered.
[0077] Specifically, in this embodiment of the invention, when the judgment result is triggered by the liquid level sensor, the liquid level sensor 33 is integrated into the device under test to collect the liquid level data of the device under test.
[0078] For example: The liquid level sensor is integrated into the ceramic jar of base liquor, numbered T207, and collects the distance from the mouth of the jar to the liquid surface, which is 816 mm.
[0079] The central processing unit 32 is also used to perform liquid level fusion calculation on the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane to obtain the vertical liquid level.
[0080] Specifically, in this embodiment of the invention, the central processing unit 32 performs liquid level fusion calculation on the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane to obtain the vertical liquid level.
[0081] For example: The central processing unit calculates the liquid level data of 816mm for the base wine ceramic jar numbered T207 and the vertical liquid level of 808mm by the tilt angle of 5° of the base wine ceramic jar numbered T207 relative to the horizontal plane.
[0082] Display unit 34 is used to display attitude data and vertical liquid level.
[0083] Specifically, in this embodiment of the invention, the display unit 34 displays the attitude data of the device under test, such as the display unit displaying the attitude data of the base wine ceramic jar numbered T207 in real time; the display unit 34 displays the vertical liquid level, such as the display unit displaying a vertical liquid level of 808mm.
[0084] The power supply unit 35 is used to provide power to the attitude sensor 31, the central processing unit 32, the liquid level sensor 33 and the display unit 34.
[0085] A third aspect of the present invention also provides an electronic device comprising: a processor and a memory; The processor executes any of the above non-contact liquid level measurement methods that fuse attitude information by calling programs or instructions stored in memory.
[0086] In a fourth aspect, the present invention also provides a computer-readable storage medium storing a program or instructions that cause a computer to execute a non-contact liquid level measurement method incorporating attitude information as described above.
[0087] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention.
[0088] like Figure 4As shown, the electronic device includes at least one processor 401, at least one memory 402, and at least one communication interface 403. The various components of the electronic device are coupled together via a bus system 404. The communication interface 403 is used for information transmission with external devices. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 4 The general designated all buses as Bus System 404.
[0089] It is understood that the memory 402 in this embodiment can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
[0090] In some implementations, memory 402 stores elements such as executable units or data structures, or subsets thereof, or extended sets thereof: operating systems and applications.
[0091] The operating system, comprising various system programs such as the framework layer, core library layer, and driver layer, is used to implement various basic business functions and handle hardware-based tasks. The application programs, including media players and browsers, are used to implement various application functions. A program implementing any method in the non-contact liquid level measurement method integrating attitude information provided in this embodiment of the invention can be included in the application programs.
[0092] In this embodiment of the invention, the processor 401 executes the steps of various embodiments of the non-contact liquid level measurement method that integrates attitude information provided by the present invention by calling the program or instructions stored in the memory 402, specifically, the program or instructions stored in the application program.
[0093] The device under test is placed on a horizontal surface, and the attitude sensor collects the attitude data of the device under test in real time, and the display unit displays the attitude data. The attitude data of the device under test are used to calculate the tilt angle of the device under test relative to the horizontal plane. Determine the magnitude of the tilt angle compared to the preset tilt angle threshold; If the judgment result is that the tilt angle is less than the preset tilt angle threshold, determine whether the liquid level sensor is triggered. When the judgment result indicates that the liquid level sensor is triggered, the liquid level sensor collects the liquid level data of the device under test; The liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane are used to perform liquid level fusion calculation to obtain the vertical liquid level, which is then displayed by the display unit.
[0094] Any method in the non-contact liquid level measurement method that integrates attitude information provided in this embodiment of the invention can be applied to, or implemented by, the processor 401. The processor 401 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 401 or by instructions in software form. The processor 401 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor.
[0095] The steps of any method in the non-contact liquid level measurement method that integrates attitude information provided in this embodiment of the invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software units in the decoding processor. The software units can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 402, and processor 401 reads the information in memory 402 and combines it with hardware to complete the steps of the method.
[0096] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments.
[0097] Those skilled in the art will understand that the descriptions of the various embodiments have different focuses, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0098] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
[0099] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A non-contact liquid level measurement method integrating attitude information, characterized in that, include: The device under test is placed on a horizontal surface, and the attitude sensor collects the attitude data of the device under test in real time, and the display unit displays the attitude data. The attitude data of the device under test are used to calculate the tilt angle of the device under test relative to the horizontal plane. Determine the magnitude of the tilt angle compared to the preset tilt angle threshold; If the judgment result is that the tilt angle is less than the preset tilt angle threshold, determine whether the liquid level sensor is triggered. When the judgment result indicates that the liquid level sensor is triggered, the liquid level sensor collects the liquid level data of the device under test; The liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane are used to perform liquid level fusion calculation to obtain the vertical liquid level, which is then displayed by the display unit.
2. The non-contact liquid level measurement method integrating attitude information according to claim 1, characterized in that, The attitude data of the device under test is used to calculate the tilt angle of the device relative to the horizontal plane, including: Calculate the initial attitude angle based on the accelerometer data in the attitude data of the device under test; The attitude is calculated by integrating the gyroscope data in the attitude data of the device under test. The attitude sensor calculation algorithm calculates the tilt angle of the device under test relative to the horizontal plane in real time based on the initial attitude angle and attitude.
3. The non-contact liquid level measurement method incorporating attitude information according to claim 1, characterized in that, The method further includes: When the judgment result is that the tilt angle is greater than or equal to the preset tilt angle threshold, an alarm is triggered and an alarm message is displayed; The alarm message indicates that the tilt angle of the device under test is greater than or equal to a preset tilt angle threshold.
4. The non-contact liquid level measurement method integrating attitude information according to claim 1, characterized in that, The method further includes: When the judgment result is that the liquid level sensor is not triggered, the tilt angle of the device under test relative to the horizontal plane is displayed in real time.
5. The non-contact liquid level measurement method incorporating attitude information according to claim 1, characterized in that, The method further includes: Before the attitude sensor acquires the attitude data of the device under test in real time, the attitude sensor is corrected for zero bias. Before acquiring liquid level data from the device under test, the liquid level sensor is zero-biased. The attitude sensor collects the attitude data of the device under test in real time and then filters the attitude data of the device under test. After the liquid level sensor collects the liquid level data of the device under test, it performs filtering processing on the liquid level data of the device under test.
6. The non-contact liquid level measurement method incorporating attitude information according to claim 1, characterized in that, The triggering methods for liquid level sensors include: periodic triggering or manual triggering.
7. The non-contact liquid level measurement method incorporating attitude information according to claim 1, characterized in that, The vertical liquid level is obtained by fusing the liquid level data of the device under test with the tilt angle of the device relative to the horizontal plane, and is calculated using the following formula: Where h represents the distance between the test point of the device under test and the liquid surface, as measured by the liquid level sensor. Indicates vertical liquid level. This indicates the pitch angle of the device under test relative to the horizontal plane. This indicates the roll angle of the device under test relative to the horizontal plane.
8. A non-contact liquid level measuring device integrating attitude information, characterized in that, include: Attitude sensor, display unit, central processing unit, liquid level sensor, and power supply unit. Attitude sensors are used to collect attitude data of a device under test placed on a horizontal surface in real time. The central processing unit is used to perform attitude calculation on the attitude data of the device under test, obtain the tilt angle of the device under test relative to the horizontal plane, and determine the size of the tilt angle compared with the preset tilt angle threshold; when the determination result is that the tilt angle is less than the preset tilt angle threshold, it determines whether the liquid level sensor is triggered. The liquid level sensor is used to collect liquid level data of the device under test when the judgment result indicates that the liquid level sensor is triggered. The central processing unit is also used to perform liquid level fusion calculation on the liquid level data of the device under test and the tilt angle of the device under test relative to the horizontal plane to obtain the vertical liquid level; The display unit is used to display attitude data and vertical liquid level; The power supply unit provides power to the attitude sensor, display unit, central processing unit, and level sensor.
9. An electronic device, characterized in that, include: Processor and memory; The processor executes a non-contact liquid level measurement method that integrates attitude information as described in any one of claims 1 to 7 by calling the program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that cause a computer to perform a non-contact liquid level measurement method that integrates attitude information as described in any one of claims 1 to 7.