Water level measurement correction method for electronic water gauge and electronic water gauge
Through three-axis accelerometer detection and automatic calibration, the accuracy problem caused by the inclination of the electronic water ruler is solved, and high-precision and low-maintenance water level measurement is achieved, simplifying the installation process and improving data reliability.
Patent Information
- Application Number
- CN202411430108.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2024-12-10
AI Technical Summary
Existing electronic water rulers are prone to tilt when installed, resulting in inaccurate electrode spacing, affecting water level measurement accuracy, and requiring regular calibration to increase maintenance costs and complexity.
A three-axis accelerometer is used to detect the inclination angle of the water ruler in real time, and automatically correct the water level measurement data through tilt matrix calculation and data compensation to ensure that the measurement accuracy is not affected by tilt.
High-precision water level measurement in tilt conditions simplifies the installation process, reduces maintenance requirements, and improves anti-interference capabilities, providing more accurate and reliable data.
Smart Images

Figure CN119104133A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electronic water gauges, and in particular to a water level measurement and correction method for electronic water gauges and the electronic water gauge. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] The electrode type electronic water gauge is a device that uses an advanced processor chip as a controller. By measuring the water level of the electrode to obtain data, it has the advantage of being able to monitor the water level continuously for a long time. It can be used to monitor the water level in water conservancy projects such as rivers, lakes, reservoirs, hydropower stations, irrigation areas and water transfer. It can also be used to monitor the water level in municipal projects such as tap water, urban sewage treatment, and urban road waterlogging. However, if the ordinary electrode type water gauge is installed at an angle or tilted during use, the electrode spacing may be inaccurate, thereby affecting the accuracy of the water level measurement. In addition, the tilted installation will increase the difficulty of maintenance and calibration because it is necessary to ensure that the horizontal and vertical positions of the electrodes are accurate.
[0004] At present, the electronic water gauges used in the market have the following problems:
[0005] (1) The problem of water gauge tilt is not considered: In practical applications, electronic water gauges are usually used to monitor water level changes, such as in reservoirs, rivers, sewage treatment plants and other places. Due to the complexity of the installation environment, it is difficult to ensure that the water gauge can be strictly perpendicular to the water surface during installation. This situation is particularly common in outdoor environments, such as on rivers, lakes, the edge of reservoirs or on slopes. When the water gauge tilts, the relative position of the electrodes inside the device and the water surface will change, which will cause the effective distance between the electrodes to not match the actual water level, thereby affecting the measurement accuracy. The accuracy of water level data is crucial in fields such as water resource management and flood control, so the errors caused by the tilt of the water gauge may lead to wrong decisions and risks.
[0006] (2) The water gauge needs to be manually calibrated for tilt angle during installation: Although the design of some electronic water gauges has taken the tilt problem into consideration, they still require precise calibration during installation. This requires the installer to use professional tools, such as a level, to ensure that the water gauge is as perpendicular to the water surface as possible. Even so, any small error during the installation process may lead to subsequent measurement deviations. In addition, even if the calibration is done properly during installation, subsequent environmental changes, such as geological changes or temperature changes, may cause the water gauge to shift or tilt, which requires regular recalibration, increasing maintenance costs and complexity. Summary of the invention
[0007] In order to address the deficiencies in the prior art, the present invention provides a water level measurement correction method for an electronic water gauge and an electronic water gauge. Through an accelerometer, the inclination angle of the water gauge can be detected in real time, and data correction can be automatically performed based on the inclination angle to ensure that the accuracy of water level measurement is not affected by the inclination.
[0008] In order to achieve the above object, the present invention adopts the following technical solution:
[0009] A first aspect of the present invention provides a water level measurement and correction method for an electronic water gauge.
[0010] A water level measurement and correction method for an electronic water gauge, comprising:
[0011] Obtain the three-axis gravity acceleration components and the measured height of the electronic water gauge;
[0012] Based on the three-axis gravity acceleration components, the tilt angles of the three axes are calculated, and based on the tilt angles of the three axes, the tilt matrix is constructed and synthesized;
[0013] After calculating the tilt vector based on the synthesized tilt angle, the difference between the Z-axis component of the tilt vector of the electronic water gauge and the Z-axis component of the initial vector is calculated, and the measured height of the electronic water gauge is compensated using the difference.
[0014] Furthermore, the three-axis inclination angles include: the inclination angle of the X axis Tilt angle of Y axis Tilt angle of Z axis
[0015] Furthermore, the synthesized tilt matrix is:
[0016] R=R z R y R x
[0017]
[0018] Among them, θ x is the inclination angle of the X axis, θ y is the inclination angle of the Y axis, θ z is the tilt angle of the Z axis.
[0019] Furthermore, the method further includes: filtering the three-axis gravity acceleration components.
[0020] Furthermore, the filtering step includes: state prediction, state update and error covariance update.
[0021] Further, if the difference between the square sum of the filtered three-axis gravity acceleration components and the square of 1g exceeds a threshold, the three-axis gravity acceleration components are reacquired.
[0022] Further, the compensation is expressed as:
[0023] The actual height H0 of the electronic water gauge can be calculated by the relationship between the measured height H and the height change Δh:
[0024] H0=H-Δh
[0025] Wherein, H is the measured height, H0 is the actual height, and Δh is the difference.
[0026] A second aspect of the present invention provides an electronic water gauge, comprising a data acquisition module, a microprocessor and an accelerometer;
[0027] The data acquisition module is used to collect the measured height of the electronic water gauge;
[0028] The accelerometer is used to collect three-axis gravity acceleration components;
[0029] The microprocessor is configured to execute the steps in a water level measurement correction method for an electronic water gauge as described in any one of claims 1-6.
[0030] Furthermore, it also includes a plurality of electrode-type water level gauge measuring contacts, all of which are connected to the data acquisition module, and the electrode-type water level gauge measuring contacts are evenly arranged on the electronic water level gauge.
[0031] Furthermore, the accelerometer is arranged at the center of gravity of the electronic water gauge.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. The water level measurement correction method for an electronic water gauge described in the present invention can detect the tilt angle of the water gauge in real time through an accelerometer and automatically perform data correction to ensure that the accuracy of water level measurement is not affected by the tilt.
[0034] 2. The water level measurement and correction method for an electronic water gauge described in the present invention can maintain high-precision water level measurement even in a tilted state due to the application of adaptive correction technology, thereby providing users with more accurate data.
[0035] 3. The water level measurement and correction method for an electronic water gauge described in the present invention does not require strict horizontal calibration during installation of the electronic water gauge, so the installation process is simplified and the subsequent maintenance and calibration requirements caused by improper installation are reduced.
[0036] 4. The water level measurement correction method for an electronic water gauge described in the present invention makes the electronic water gauge have strong anti-interference ability, helps to reduce the interference of external factors (such as plant residues, silt, animals, etc.) on water level measurement, and improves the reliability of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute improper limitations on the present invention.
[0039] Figure 1 This is a flow chart of a water level measurement and correction method for an electronic water gauge according to Embodiment 1 of the present invention;
[0040] Figure 2 Schematic diagram of gravitational acceleration components on three axes of Example 1 of the present invention;
[0041] Figure 3 This is a structural diagram of an electronic water gauge according to Embodiment 2 of the present invention;
[0042] Figure 4 This is a hardware configuration diagram of an electronic water gauge according to Example 2 of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0044] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0045] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0046] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0047] Example 1
[0048] Embodiment 1 of the present invention provides a water level measurement and correction method for an electronic water gauge.
[0049] As described in the background technology, the electronic water gauge needs to be able to better adapt to the complex and changeable installation environment and conditions. Whether from the perspective of detection accuracy or from the perspective of maintenance cost and personnel occupation cost, there is an urgent need for an electronic water gauge with a tilt adaptive function, which can monitor the tilt state and tilt angle of the equipment in real time, and automatically correct the electronic water gauge reading according to the tilt angle, and calculate the current real water level value in real time, so as to fundamentally solve a series of problems caused by the tilt of the electronic water gauge during installation or use.
[0050] The present embodiment provides a water level measurement and correction method for an electronic water gauge, which can automatically detect the installation inclination angle of the electronic water gauge and perform correction.
[0051] The water level measurement and correction method for an electronic water gauge provided in this embodiment can ensure that the electronic water gauge can maintain stable performance and accurate measurement results during long-term use even when affected by environmental factors such as temperature changes, ground subsidence or other interferences, reduce the maintenance and recalibration requirements caused by environmental changes or equipment aging, and ensure low maintenance for long-term operation; and meet the needs of different application scenarios, provide high-precision water level data under various installation conditions and environments, overcome the limitations of the existing technology, and provide a more accurate, stable, easy to use and maintain water level measurement solution.
[0052] This embodiment provides a water level measurement and correction method for an electronic water gauge, such as Figure 1 As shown, the following steps are included:
[0053] Step 1: Obtain the gravity acceleration component and filter it.
[0054] Step 101: Figure 2 As shown, an accelerometer is used to measure the gravity acceleration of the X, Y, and Z axes, and the gravity acceleration components on the three axes Ax*, Ay*, and Az* are read through the SPI bus. A filtering algorithm is used to obtain a more accurate angle for calculation.
[0055] In this embodiment, the accelerometer is disposed at the center of gravity of the electronic water gauge.
[0056] In this embodiment, the accelerometer is an ADXL362 chip, which is a low-power three-axis digital accelerometer that can measure acceleration along the X, Y, and Z axes, which correspond to different directions of the sensor chip. The basic principle of tilt measurement is to use gravity acceleration as a reference. When the accelerometer is stationary or moving in a uniform straight line, it is only affected by the earth's gravity. In this case, the acceleration vector measured by the accelerometer will point to the center of the earth, that is, the direction of gravity. By measuring the component of this vector relative to the axis of the accelerometer, the tilt angle of the object relative to the ground can be calculated.
[0057] Step 102: Assume that the three-axis acceleration components obtained by reading the SPI bus are and Then: The actual observed value at the current moment is:
[0058]
[0059] Step 103: Based on the actual observation value at the current moment, a filtered state estimation value is obtained through a filtering algorithm.
[0060] The inputs to the filtering algorithm include: predicted state estimates (the state estimate after the last update), the predicted estimated covariance P k-1 (estimated covariance after the last update), state transition matrix (A), process noise covariance matrix (Q), observation matrix (H), observation noise covariance matrix (R), actual observation value z k (measured value at the current moment).
[0061] The output of the filtering algorithm includes: the updated state estimate (filtered state estimate), updated estimated covariance P k (Estimated covariance after filtering).
[0062] The steps of the filtering algorithm include:
[0063] (1) Status prediction:
[0064]
[0065] (2) Status update:
[0066]
[0067] (3) Error covariance update:
[0068]
[0069] In the above formula, z k It is the three-axis acceleration component read through the SPI bus. Through these steps, filtering can be used to fuse the three-axis acceleration data. Through filtering processing, these components will gradually tend to the real gravity component, effectively reducing the influence of noise, thereby obtaining a more accurate and stable gravity component estimate.
[0070] The final filtered state estimate is It can be expressed as:
[0071]
[0072] Step 104: Calculate Ax 2 +Ay 2 +Az 2 If the sum of squares is close to the square of 1g, it means that the sampled value is valid and can be used to substitute into the formula for calculation; otherwise, the sampled value is discarded and the process returns to step 101.
[0073] Step 2: Based on the filtered state estimate, calculate the tilt angle of each axis, construct the rotation matrix, synthesize the rotation matrix, and then calculate the vector and height change.
[0074] Step 201: The three-axis gravity acceleration components obtained in step 1 are Ax k , Ay k and Az k , through these components, the inclination angle of each axis can be calculated:
[0075] The tilt angle θ along the X axis x :
[0076]
[0077] The tilt angle θ along the Y axis y :
[0078]
[0079] Tilt angle θ along the Z axis z :
[0080]
[0081] Step 202: Use the calculated tilt angle to construct a tilt matrix (rotation matrix):
[0082] Tilt around the X axis:
[0083]
[0084] Tilt around the Y axis:
[0085]
[0086] Tilt around the Z axis:
[0087]
[0088] Step 203: Synthesize the tilt matrix:
[0089] R=R z R y R x
[0090] Step 204: Calculate the vector and height change after tilting.
[0091] Assume that the initial vector V of the water gauge in the untilted state is [0,0,L], where L is the length of the electronic water gauge. The tilted vector (tilt vector) V' is calculated by the tilt matrix R:
[0092] V'=RV
[0093] The difference between the Z-axis component of the electronic water level gauge tilt vector V' and the Z-axis component of the initial vector V is:
[0094] Δh=V z ′ -V z
[0095] Step 3: Collect water gauge data and calculate water gauge height compensation based on the height change Δh.
[0096] The actual height H0 of the electronic water gauge can be calculated by the relationship between the measured height H and the height change Δh:
[0097] H0=H-Δh
[0098] Among them, the measured height H is the uncompensated water level height obtained from the data acquisition module; the height change Δh is the height change difference caused by the tilt calculated by the tilt matrix and acceleration data; the actual height H0 of the electronic water gauge is the actual water level height value after compensation using the relationship.
[0099] If the tilt angle of the electronic water level gauge keeps changing during use, it is necessary to obtain the tilt angle in real time and perform real-time correction.
[0100] Through the above steps, the influence of the tilt angle on the liquid level measurement can be effectively eliminated, so as to obtain more accurate liquid level data, reduce the need for recalibration due to environmental changes and other factors, and ensure the low maintenance and accuracy of the electronic water gauge during long-term use.
[0101] The water level measurement and correction method for an electronic water gauge provided in this embodiment can realize automatic tilt detection and correction: through an accelerometer, the tilt angle of the water gauge can be detected in real time, and data correction can be automatically performed to ensure that the accuracy of water level measurement is not affected by the tilt.
[0102] The water level measurement correction method for an electronic water gauge provided in this embodiment can achieve high-precision water level measurement: even in the case of a tilt, due to the application of adaptive correction technology, high-precision water level measurement can be maintained, providing users with more accurate data.
[0103] The water level measurement and correction method for an electronic water gauge provided in this embodiment is easy to install and maintain the electronic water gauge: since strict horizontal calibration of the electronic water gauge is not required during installation, the installation process is simplified and the subsequent maintenance and calibration requirements caused by improper installation are reduced.
[0104] The water level measurement correction method for an electronic water gauge provided in this embodiment makes the electronic water gauge have strong anti-interference ability: it helps to reduce the interference of external factors (such as plant residues, silt, animals, etc.) on water level measurement and improve the reliability of data.
[0105] Example 2
[0106] Embodiment 2 of the present invention provides an electronic water level gauge.
[0107] This embodiment provides an electronic water level gauge, such as Figure 3 and Figure 4 As shown, it includes: an accelerometer 1, a PCB board 2, and an electrode-type water level measuring contact 3.
[0108] The accelerometer is set at the center of gravity of the electronic water gauge. The accelerometer (acceleration sensor) 1 uses the ADXL362 chip, which is a low-power three-axis digital accelerometer. It can measure acceleration along the X, Y and Z axes. These axes correspond to different directions of the sensor chip. The basic principle of tilt measurement is to use gravity acceleration as a reference. When the accelerometer is stationary or moving at a constant speed in a straight line, it is only affected by the gravity of the earth. In this case, the acceleration vector measured by the accelerometer will point to the center of the earth, that is, the direction of gravity. By measuring the component of this vector relative to the axis of the accelerometer, the inclination angle of the object relative to the ground can be calculated.
[0109] The PCB board 2 in the electronic water gauge includes a power module, a data acquisition module, a communication module and a high-precision microprocessor.
[0110] Several electrode-type water level measuring contacts 3 are arranged on the electronic water level gauge at 1CM or 0.5CM intervals to accurately measure the change of water level. Each contact can sense the height of the water level, and the height of the current water level can be determined by calculating the position of each contact.
[0111] The accelerometer 1 collects acceleration components in real time and uploads them to the microprocessor through the communication module; the data acquisition module is connected to a number of electrode-type water level measurement contacts 3, collects the measured height H in real time, and uploads it to the microprocessor through the communication module.
[0112] The microprocessor is configured to execute the steps in a water level measurement correction method for an electronic water gauge as described in Example 1.
[0113] The electronic water gauge provided in this embodiment automatically performs data correction according to the calculation result of the tilt angle, adjusts the water level measurement data, and eliminates the error caused by the tilt.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A water level measurement and correction method for an electronic water gauge, characterized in that: include: Obtain the three-axis gravity acceleration components and the measured height of the electronic water gauge; Based on the three-axis gravity acceleration components, the tilt angles of the three axes are calculated, and based on the tilt angles of the three axes, the tilt matrix is constructed and synthesized; After calculating the tilt vector based on the synthesized tilt angle, the difference between the Z-axis component of the tilt vector of the electronic water gauge and the Z-axis component of the initial vector is calculated, and the measured height of the electronic water gauge is compensated using the difference.
2. A water level measurement and correction method for an electronic water gauge as claimed in claim 1, characterized in that: The tilt angles of the three axes include: Tilt angle of Y axis Tilt angle of Z axis 3. A water level measurement and correction method for an electronic water gauge as claimed in claim 2, characterized in that: The synthesized tilt matrix is: R=R z R y R x Among them, θ x is the inclination angle of the X axis, θ y is the inclination angle of the Y axis, θ z is the tilt angle of the Z axis.
4. A water level measurement and correction method for an electronic water gauge as claimed in claim 1, characterized in that: Also includes: Filter the three-axis gravity acceleration components.
5. A water level measurement and correction method for an electronic water gauge as claimed in claim 4, characterized in that: The filtering steps include: state prediction, state update and error covariance update.
6. A water level measurement and correction method for an electronic water gauge as claimed in claim 4, characterized in that: If the difference between the square sum of the filtered three-axis gravity acceleration components and the square of 1g exceeds a threshold, the three-axis gravity acceleration components are reacquired.
7. A water level measurement and correction method for an electronic water gauge as claimed in claim 1, characterized in that: The compensation is expressed as: The actual height H0 of the electronic water gauge can be calculated by the relationship between the measured height H and the height change Δh: H0=H-Δh Wherein, H is the measured height, H0 is the actual height, and Δh is the difference.
8. An electronic water level gauge, characterized in that: It includes a data acquisition module, a microprocessor and an accelerometer; The data acquisition module is used to collect the measured height of the electronic water gauge; The accelerometer is used to collect three-axis gravity acceleration components; The microprocessor is configured to execute the steps in a water level measurement correction method for an electronic water gauge as described in any one of claims 1-7.
9. An electronic water gauge as claimed in claim 8, characterized in that: It also includes a plurality of electrode-type water level gauge measuring contacts, all of which are connected to the data acquisition module. The electrode-type water level gauge measuring contacts are evenly arranged on the electronic water level gauge.
10. An electronic water gauge as claimed in claim 8, characterized in that: The accelerometer is arranged at the center of gravity of the electronic water gauge.
