Intelligent water gauge self-adaptive calibration method, device and equipment
By using an adaptive calibration method to adjust the reference value of the smart water gauge in real time, and combining temperature and physical displacement correction, the measurement drift problem caused by temperature changes is solved, thus improving the accuracy and stability of short-range water level measurement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INSPUR GENERSOFT CO LTD
- Filing Date
- 2026-01-04
- Publication Date
- 2026-05-12
AI Technical Summary
Existing smart water gauges experience measurement reference drift due to temperature changes, which affects accuracy, especially in short-range scenarios. It is difficult to compensate for the accuracy loss within intervals through regular manual calibration.
By using an adaptive calibration method, multiple sets of data within the temperature-sensitive range are acquired, a temperature correction coefficient is fitted, and the reference value is adjusted in real time. Combined with Kalman filtering and physical shift correction, the effects of temperature and mechanical errors are suppressed.
It achieves consistent accuracy and long-term stability in water level measurement under complex environments, reduces errors caused by temperature changes and mechanical offsets, and improves the reliability of short-range measurements.
Smart Images

Figure CN122016019A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of water level detection technology, and particularly relates to an intelligent water level gauge adaptive calibration method, device and equipment. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] In scenarios such as water conservancy monitoring, industrial production, and urban pipeline network operation and maintenance, smart water gauges, as digital water level measurement devices, are gradually replacing traditional mechanical water gauges. Their measurement accuracy directly depends on the reliability of the calibration process. Smart water gauge calibration is a process of establishing a stable measurement benchmark through parameter calibration and error correction to offset deviations caused by environmental interference and the characteristics of the equipment itself.
[0004] In existing technologies, the calibration of smart water level gauges is mostly concentrated during the installation phase, typically employing methods such as averaging multiple repeated measurements. This only preliminarily establishes initial installation reference values, meeting basic measurement requirements. However, core components of smart water level gauges, such as the laser module and the gauge housing, exhibit thermal expansion and contraction characteristics, and their coefficients of thermal expansion differ. Changes in ambient temperature can cause slight shifts in component dimensions and installation posture, leading to measurement reference drift. This is particularly pronounced in short-range scenarios, where the proportion of such temperature-related errors is significantly amplified, directly impacting the reliability of measurement results. Furthermore, due to the influence of temperature on measurement results, subsequent measurements will also experience reference drift due to changes in ambient temperature. Although periodic manual calibration can compensate for the accuracy loss within the calibration interval, it is difficult to fully compensate for this. Summary of the Invention
[0005] In view of this, the present invention provides an intelligent water level gauge adaptive calibration method, apparatus and equipment to improve the accuracy of water level measurement.
[0006] To achieve the above objectives, a first aspect of the present invention provides an intelligent water level gauge adaptive calibration method, comprising the following steps: Based on the target range of the water gauge, obtain the temperature-sensitive range; Multiple sets of temperature and measurement values are obtained during a continuous period of stable water level. The average of the multiple measurement values is used as the initial installation reference value, and the average of the multiple temperatures is used as the calibration reference temperature. Multiple temperatures covering the temperature-sensitive range are used as measured temperatures, and the corresponding measured values at each measured temperature are obtained as measured reference values. The temperature correction coefficient is fitted based on the offset of each measured reference value relative to the initial installation reference value, and the temperature difference between each measured temperature and the calibration reference temperature. The current temperature is obtained, and based on the temperature correction factor and the temperature difference between the current temperature and the calibration reference temperature, the initial calibration reference value is obtained by calibration based on the initial installation reference value.
[0007] In some embodiments, the current temperature and the current measured value are obtained, and based on the temperature calibration reference value at the previous moment, the offset of the theoretical reference value at the current temperature relative to the temperature calibration reference value at the previous moment is calculated according to the temperature correction coefficient to obtain the temperature calibration reference value at the current moment.
[0008] In some embodiments, the temperature correction factor is fitted based on a reference value calibration model, which is based on an initial installation reference value and constructs correction terms according to the temperature difference between each measured temperature and the calibrated reference temperature. The correction term is a linear correction term, which is the product of the temperature correction coefficient and the temperature difference; or, The correction term is the sum of a linear correction term and a nonlinear correction term; the linear correction term is the product of the linear temperature correction coefficient and the temperature difference, and the nonlinear correction term is the product of the nonlinear temperature correction coefficient and the square of the temperature difference.
[0009] In some embodiments, the correction term also includes a thermal expansion coupling correction term, which is the product of the difference in thermal expansion coefficients between the laser module and the water gauge housing, the temperature difference, and the target range.
[0010] In some embodiments, the offset of the theoretical reference value at the current temperature relative to the temperature calibration reference value at the previous time is obtained by multiplying the correction term and the temperature calibration reference value at the previous time. The temperature calibration reference value at the current time is obtained by subtracting the current measurement value from the offset.
[0011] In some embodiments, after obtaining the current temperature and the current measurement value, it is further determined whether the current measurement value is abnormal. If not, the measurement value is valid; if so, the average value of the measurement values at the previous multiple times is used to replace the current measurement value.
[0012] In some embodiments, after obtaining the temperature calibration reference value at the current moment, an observation period is set as one period. By comparing the mean and standard deviation of the temperature calibration reference value of the current period with that of the previous period, it is determined whether there is a physical shift. If there is, it is considered that the initial installation reference value has shifted. The initial installation reference value is corrected based on the shift correction coefficient to obtain a new installation reference value. Based on the shift between the initial installation reference value and the new installation reference value, a physical shift correction is performed on the temperature calibration reference value at the current moment to obtain the temperature-shift calibration reference value.
[0013] In some embodiments, a set duration is used as the observation period, and the standard deviation of multiple temperature-offset calibration reference values within the observation period is recorded as the actual noise. The observation noise covariance is adaptively adjusted based on the actual noise of the current period and the short-range noise calibration threshold. Kalman filtering is performed on the current period based on the observation noise covariance obtained by adaptive adjustment to obtain the noise calibration reference value. Based on the coupling compensation coefficient and temperature compensation coefficient, combined with the temperature difference between the current temperature and the calibration reference temperature, and the noise difference between the current cycle and the previous cycle, the noise calibration reference value is corrected. The corrected noise calibration reference value and temperature-offset calibration reference value are used to calculate the actual water level.
[0014] A second aspect of the present invention provides an intelligent water level gauge adaptive calibration device, comprising: The initial parameter matching module is configured to obtain the temperature sensitive range based on the target range of the water gauge. The initial reference calibration module is configured to acquire multiple sets of temperature and measurement values during a continuous period of stable water level, and use the average of the multiple measurement values as the initial installation reference value and the average of the multiple temperatures as the calibration reference temperature. The training data acquisition module is configured to use multiple temperatures covering the temperature-sensitive range as measured temperatures, and acquire the corresponding measured values at each measured temperature as measured reference values. The correction parameter fitting module is configured to fit the temperature correction coefficient based on the offset of each measured reference value relative to the initial installation reference value, and the temperature difference between each measured temperature and the calibration reference temperature. The initial reference calibration module is configured to acquire the current temperature, and based on the temperature correction factor and the temperature difference between the current temperature and the calibration reference temperature, calibrate to obtain the initial calibration reference value based on the initial installation reference value.
[0015] A third aspect of the present invention provides an electronic device including a processor and a memory, wherein the memory stores computer instructions that, when executed by the processor, cause the electronic device to perform the method described thereon.
[0016] The above one or more technical solutions first match the temperature-sensitive range to the target measurement range, obtain multiple sets of measured temperatures and corresponding measured reference values within this range, then select samples from continuous periods of stable water level to calibrate the initial installation reference value and calibration reference temperature. Based on the initial installation reference value, the influence of temperature differences is fitted to obtain the temperature correction coefficient. Finally, the initial installation reference value is calibrated by combining the difference between the current temperature and the calibration reference temperature and using the fitted temperature correction coefficient. This dynamically offsets the slight offsets in component size and installation posture caused by temperature changes, suppresses temperature-related reference drift from the source, effectively reduces the proportion of amplified temperature errors in short-range scenarios, and ensures the consistency between the measurement results and the actual water level. Attached Figure Description
[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0018] Figure 1 A flowchart of an intelligent water level gauge adaptive calibration method for the installation phase, provided for one or more embodiments of the present invention; Figure 2 A flowchart of an intelligent water gauge adaptive calibration method for the measurement stage, provided for one or more embodiments of the present invention; Figure 3 A flowchart for outlier determination and correction provided in one or more embodiments of the present invention; Figure 4 A flowchart for determining and correcting installation reference offset provided for one or more embodiments of the present invention; Figure 5 This is a schematic diagram of the overall process of the intelligent water level gauge adaptive calibration method provided in one or more embodiments of the present invention. Detailed Implementation
[0019] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0020] In the description of the embodiments of this application, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on".
[0021] One or more embodiments of this invention are applied to intelligent water level gauges. The intelligent water level gauge has a processing module and a sensor module at its detection end. It is specifically designed for short-range intelligent water level gauges (5-20cm) and is suitable for scenarios such as small reservoirs, water storage tanks, and industrial water tanks where high accuracy in water level measurement is required, environmental temperature fluctuations are large, and long-term stable operation is necessary. As a digital device replacing traditional mechanical water level gauges, the intelligent water level gauge can output and remotely transmit water level data in real time. Among the core sensors, a distance sensor collects distance data in real time to provide raw observation data for benchmark value calculation; a temperature sensor collects the current temperature to provide a basis for related calculations such as temperature calibration and fitting temperature correction coefficients; and an accelerometer monitors water level vibration trends. Based on the detection data from the sensor module, the processing module performs a calibration process including temperature correction, physical displacement correction, and noise suppression correction, ultimately outputting the actual water level data.
[0022] As described in the background section, existing intelligent water level gauge calibration primarily focuses on the installation phase, neglecting the impact of ambient temperature changes. During measurement, when the ambient temperature differs from the initial calibration temperature, it can lead to measurement reference drift. To address this issue, one or more embodiments of the present invention provide an adaptive calibration method for intelligent water level gauges, applied to a processing module, such as... Figure 1 As shown, it includes the following steps: S101. Based on the target range of the water gauge and the mapping relationship between the target range and the initial parameters, obtain the initial parameters, which include the temperature sensitive range. S102. Obtain multiple sets of temperature and measurement values during a continuous period of stable water level, and use the average of the multiple measurement values as the initial installation reference value and the average of the multiple temperatures as the calibration reference temperature. S103. Using multiple temperatures covering the temperature-sensitive range as measured temperatures, obtain the corresponding measured values at each measured temperature as measured reference values. S104. Based on the offset of each measured reference value relative to the initial installation reference value, and the temperature difference between each measured temperature and the calibration reference temperature, fit the temperature correction coefficient. S105. Obtain the current temperature, and based on the temperature correction factor and the temperature difference between the current temperature and the calibration reference temperature, calibrate to obtain the initial calibration reference value based on the initial installation reference value.
[0023] The above steps S101-S105 are applied to the installation stage of the water gauge. By using the above method, when installing water gauges of different ranges, a reference value calibration model can be constructed by obtaining the initial installation reference value and the measured reference value at different temperatures, thereby obtaining a dedicated calibration model for the water gauge of that range. Furthermore, the reference value can be adaptively adjusted with temperature changes, achieving scene adaptation while eliminating human error.
[0024] In step S101, during the installation phase of the laser rangefinder, a basic parameter library for short-range scenarios is established to replace manually input water level baseline values and eliminate human error. A standardized template is generated through a combination of laboratory device calibration and on-site scenario pre-research. This template includes the mapping relationship between the target range and initial parameters, with the initial parameters including the temperature-sensitive range [T]. min ,T max Key information includes the range identifier, noise spectrum characteristics (dominant frequency range, amplitude upper limit, etc.), temperature correction coefficient, and initial parameters for adaptive filtering and installation offset determination. Upon receiving the user's input target range, the system automatically loads the corresponding initial parameters for that range.
[0025] In step S102, after the water gauge is installed, the water flow velocity and vibration acceleration are monitored. When both the water flow velocity and vibration acceleration meet the set conditions, the current water level is considered stable, and a continuous period of stable water level is selected. Multiple temperature-measurement value pairs are obtained within this continuous period. Anomalies are judged based on the continuous measurement values, and abnormal temperature-measurement value pairs are removed. The average of the remaining measurement values is used as the initial installation reference, and the average of the remaining temperatures is used as the calibration reference temperature.
[0026] For example, the criteria for judging water level stability can be set as water flow velocity < 0.1 m / s and vibration acceleration < 0.05 g. After selecting a continuous period of water level stability, 100 sets of temperature-measurement pairs are continuously collected. Outliers are removed from the above measurements using the 3σ criterion, and the mean of the remaining measurements is the initial installation reference D. b The average temperature value is the calibration reference temperature T0.
[0027] In step S103, multiple temperatures covering the temperature-sensitive range are used as measured temperatures, and multiple measurement values corresponding to each measured temperature are obtained. The average of the multiple measurement values is used as the measured reference value. Specifically, at the installation site, the ambient temperature is controlled from T... min To T max (Covering all temperature ranges), collect 3 sets of measured values D0(i,j) and corresponding temperature values T(i) at 5℃ intervals, where i is the temperature point number i=1,2,…,n, j is the number of repeated measurements, j=1,2,3. T(i) is the measured temperature, and the mean value of D0(i,j) D0(i) is the measured baseline value.
[0028] In step S104, the temperature correction coefficient is fitted based on the reference value calibration model. The reference value calibration model is based on the initial installation reference value and constructs correction terms according to the temperature difference between each measured temperature and the calibrated reference temperature.
[0029] For example, the correction term is a linear correction term, which is the product of the temperature correction coefficient and the temperature difference. The reference value calibration model is:
[0030] in, Indicates the initial calibration reference value. It is the installation reference value at time t. These are the initial installation baseline values. It is the calibration reference temperature. It is the temperature correction factor.
[0031] For example, the nonlinear effect of temperature change on the reference value is also considered, and the correction term is the sum of a linear correction term and a nonlinear correction term; the linear correction term is the product of the linear temperature correction coefficient and the temperature difference, and the reference value calibration model is:
[0032] in, It is the installation reference value at time t. These are the initial installation baseline values. It is the calibration reference temperature. , These represent the linear correction coefficient and the nonlinear correction coefficient, respectively.
[0033] Based on this, further considering the influence of temperature on the water gauge material and the laser module material, the correction term also includes a thermal expansion coupling correction term, and the benchmark calibration model is further corrected as follows:
[0034] in, It is the installation reference value at time t. These are the initial installation baseline values. It is the calibration reference temperature. , These represent the linear correction coefficient and the nonlinear correction coefficient, respectively. Δα represents the difference in thermal expansion coefficients between the laser module and the water gauge housing, and L represents the target range.
[0035] Those skilled in the art will understand that the coefficients in the above model can be solved using the least squares method.
[0036] The above model is based on the initial installation reference value. It comprehensively considers the linear and nonlinear effects of temperature changes, as well as the coupling effect of the thermal expansion difference between the laser module and the water gauge housing and the target range. By fitting the linear correction coefficient (k1) and the nonlinear correction coefficient (k2), it can accurately calculate the theoretical reference value at the current temperature and offset the interference of temperature-related factors on the short-range measurement reference.
[0037] In the application phase of water level gauges, since water level measurement is a dynamic process, the calibration reference value at the previous moment is calculated based on the temperature at that time. If the current temperature changes, directly using the historical reference value will cause calibration failure due to temperature shift, and will not reflect the current true water level reference. To address this problem, in some embodiments of the present invention, when the temperature changes, the offset is calculated through a temperature correction coefficient, allowing the calibration reference value to be dynamically adjusted with the temperature. The method further includes: S106. Obtain the current temperature and the current measured value. Based on the temperature calibration reference value at the previous moment, calculate the offset of the theoretical reference value at the current temperature relative to the calibration reference value at the previous moment according to the temperature correction coefficient, and obtain the temperature calibration reference value at the current moment.
[0038] Based on this, the reference value can be corrected in real time according to the current temperature, allowing the calibration reference value to be dynamically adjusted with the temperature, ensuring that the reference value at each moment matches the current environmental conditions, avoiding cumulative errors caused by temperature lag, and ensuring the consistency of accuracy in the dynamic measurement process.
[0039] In step S106, based on the temperature correction coefficient obtained during the initialization phase, the influence of temperature on the ranging is corrected. Specifically, the offset of the theoretical reference value at the current temperature relative to the temperature calibration reference value at the previous moment is obtained by multiplying the correction term and the temperature calibration reference value at the previous moment. The temperature calibration reference value at the current moment is obtained by subtracting the offset from the current measured value, as shown in the formula:
[0040] in, The current temperature is used as the calibration reference value. This is the current measurement value. This is the temperature calibration reference value from the previous moment.
[0041] In some embodiments, after acquiring the current temperature and the current measurement value, it is further determined whether the current measurement value is abnormal. If not, the measurement value is valid; if so, the average value of the measurements taken at previous times is used to replace the current measurement value. Specifically, multiple measurement values, including the current measurement value, are acquired based on a sliding window of a set length. When the deviation between the average value of the measurements taken at previous times and the current measurement value exceeds a set multiple of the standard deviation of the measurement values within the window, the current measurement value is considered abnormal. For example, the sensor is triggered at a frequency of 10Hz via a timer interrupt of the MCU, and the D value of the laser ranging module is read simultaneously. r The data (t) and the temperature sensor's T(t) are used in a sliding window with a window size of N, which can be 20. The standard deviation σ of the data within the window is calculated in real time. If the following condition exists:
[0042] The measured value is then marked as an outlier and replaced with the average of the valid values from the previous three time points. The measured value, based on the outlier determination and processing, can be used to perform calibration based on a temperature correction factor.
[0043] By combining the sliding window algorithm with the standard deviation multiple judgment rule, abnormal measurement values caused by noise interference, instantaneous environmental fluctuations, etc., can be identified in short-range measurement scenarios. The average of the valid measurement values at multiple previous times is then used to replace them. This avoids interference from a single abnormal data point in the calculation of the current calibration reference value. Furthermore, the window data smoothing process reduces the impact of high noise levels in short-range scenarios, ensuring the reliability of the measurement data used for temperature correction and providing an accurate data foundation for subsequent temperature correction.
[0044] Furthermore, disturbances such as water flow impact, environmental vibration, and long-term settlement can easily cause physical displacement of mechanical components, leading to systematic drift of the measurement reference. To address this issue, during the application phase of the water gauge, water level measurements are collected in real time, and stability checks are performed to determine if any deviation exists. When a deviation is found, corrections are made. The method also includes: S107. Using a set duration as an observation cycle, compare the mean and standard deviation of the temperature calibration reference value of the current cycle with that of the previous cycle to determine whether there is a physical shift. If so, it is considered that the initial installation reference value has shifted. Correct the initial installation reference value based on the shift correction coefficient to obtain a new installation reference value. Based on the shift between the initial installation reference value and the new installation reference value, perform physical shift correction on the temperature calibration reference value at the current moment to obtain the temperature-shift calibration reference value.
[0045] Specifically, statistical stability tests using multi-period data are conducted to determine whether the installation reference has shifted, avoiding misjudgments based on single noise events. A period of ten minutes (T) is used. c 600 temperature calibration reference values are collected in each cycle. Calculate the mean of the data for the current period. Standard deviation And with the previous cycle Standard deviation Comparison. If satisfied... ,and If an installation offset is found, then an installation offset is determined to exist, where Hs is half of the short-range accuracy target. If an offset is determined, the installation reference is updated:
[0046] in, This represents the offset correction factor, with a value ranging from 0.8 to 0.95. As the measurement range increases, it linearly approaches 1. The standard deviation of multiple measurements over a continuous period of stable water level can be obtained in step S102.
[0047] By setting a verification cycle and comparing the mean and standard deviation of the cycles before and after, the systematic drift of the initial installation reference can be identified. The installation reference value is updated with an offset correction coefficient, which effectively offsets the reference deviation caused by mechanical displacement. After performing outlier processing, the coupling and superposition problem of mechanical error and temperature error in short-range scenarios is solved through physical offset correction and temperature correction. This avoids the degradation of measurement accuracy caused by long-term accumulation of systematic drift, ensures the stability of the reference value of the water gauge during long-term use, and makes the calibration reference value adaptable to real-time temperature conditions and dynamically follow the changes in mechanical installation status, thus comprehensively improving the long-term reliability and accuracy consistency of short-range water level measurement.
[0048] However, even with compensation for temperature or installation offset, the measurement accuracy remains difficult to improve due to the significantly higher noise ratio in short-range scenarios and the coupling and superposition effect of multiple error sources. In some embodiments, to address the high noise ratio in the 5-20cm short-range, noise suppression is performed, the short-range noise threshold is calibrated, and the noise covariance is adaptively adjusted based on the deviation between the actual noise and the short-range noise threshold. Then, the reference value is corrected using an adaptive Kalman filter. That is, the method further includes: S108. Using a set duration as the observation period, the standard deviation of multiple temperature-offset calibration reference values within the observation period is recorded as the actual noise. Based on the actual noise of the current period and the short-range noise calibration threshold, the observation noise covariance is adaptively adjusted. Based on the observation noise covariance obtained from the adaptive adjustment, Kalman filtering is applied to the current period to obtain the noise calibration reference value D. KF (t).
[0049] S109. Based on the coupling compensation coefficient and temperature compensation coefficient, combined with the temperature difference between the current temperature and the calibration reference temperature, and the noise difference between the current cycle and the previous cycle, the noise calibration reference value is corrected. The corrected noise calibration reference value and temperature-offset calibration reference value are used to calculate the actual water level.
[0050] In step S108, the formula for calculating the adjusted observation noise covariance is:
[0051] in, R0 is the adjusted observation noise covariance, and R0 is the initial observation noise covariance, obtained through calibration. Set the noise calibration threshold for short range; This represents the actual noise level for the current period.
[0052] Considering the increased noise proportion, the formula for calculating the short-range noise calibration threshold is:
[0053] in, The long-range baseline noise threshold is expressed in mm.
[0054] The specific execution process of Kalman filtering includes: based on the previous reference value and water level change rate, predicting the current reference value and current water level change rate according to the state equation; calculating the deviation between the observed value and the predicted value according to the observation equation; optimizing the Kalman gain according to the adaptive noise covariance; and correcting the predicted state based on the deviation and the Kalman gain according to the observation equation.
[0055] The state equation is: ,in, , Let A represent the rate of change of water level, and let A be the state transition matrix. , =0.1s, This includes random disturbances such as minor environmental vibrations.
[0056] The observation equation is: ,in V(t) represents the observation noise. This is the current measured value.
[0057] In step S109, the co-interference between temperature and offset is corrected:
[0058] in, This indicates the corrected noise calibration reference value. The noise calibration reference value of the Kalman filter output, where β is the coupling compensation coefficient. This indicates the maximum allowable normal fluctuation range of the installation reference.
[0059] Calculate the actual water level based on the corrected benchmark and calibration values:
[0060] in, For the corrected noise calibration reference value, This is the temperature-offset calibration reference value. This is the reference altitude corresponding to the zero mark on the water gauge, which is entered during system initialization.
[0061] Furthermore, during long-term system operation, dynamic parameter iterative updates are employed to address the accuracy degradation issue within calibration intervals, enabling algorithm self-optimization. When the noise value for a continuously set duration or a continuously set number of cycles exceeds the initial noise set multiple, for example, every 24 hours or when for three consecutive cycles... All exceeded the initial When the value is 1.5 times, the update mechanism is triggered to refit k1 and k2.
[0062]
[0063]
[0064] Where M=86400.
[0065] At the same time, the short-range noise calibration threshold is updated, and is determined based on the maximum value of the standard deviation of the measured value, temperature measured value and water level change acceleration value within the set time window. , This indicates which value to select from the current noise standard deviation of the three major categories of data: "distance measurement, temperature, and vibration". Taking the maximum value can cover the most stringent noise scenarios and avoid missing anomalies.
[0066] At the same time, the updated parameters are stored in Flash, and the most recent three historical parameters are retained. If the new parameters cause a decrease in accuracy, for example, if the deviation between the calculated actual water level and the standard water level is >0.5mm, the system will automatically revert to the previous version of the parameters.
[0067] The aforementioned calibration method covers the initial calibration during the installation phase of the smart water gauge and the real-time calibration during the application phase, achieving full-cycle adaptive calibration. Furthermore, the real-time calibration during the application phase includes a multi-dimensional calibration mechanism encompassing real-time temperature correction, physical displacement correction, and system noise correction. Based on temperature correction, it identifies and corrects physical displacement caused by water flow impact, vibration, and settlement. Simultaneously, it adaptively adjusts filter parameters based on actual noise, and further optimizes the reference accuracy under noise interference through coupling compensation. Ultimately, it achieves synergistic suppression of temperature error, physical displacement error, and system noise error in short-range water level measurement, significantly improving the long-term measurement accuracy, stability, and environmental adaptability of smart water gauges, especially short-range smart water gauges, in complex environments.
[0068] Based on the above method, one or more embodiments of the present invention also provide an intelligent water level gauge adaptive calibration device, comprising: The initial parameter matching module is configured to obtain the temperature sensitive range based on the target range of the water gauge. The initial reference calibration module is configured to acquire multiple sets of temperature and measurement values during a continuous period of stable water level, and use the average of the multiple measurement values as the initial installation reference value and the average of the multiple temperatures as the calibration reference temperature. The training data acquisition module is configured to use multiple temperatures covering the temperature-sensitive range as measured temperatures, and acquire the corresponding measured values at each measured temperature as measured reference values. The correction parameter fitting module is configured to fit the temperature correction coefficient based on the offset of each measured reference value relative to the initial installation reference value, and the temperature difference between each measured temperature and the calibration reference temperature. The initial reference calibration module is configured to acquire the current temperature, and based on the temperature correction factor and the temperature difference between the current temperature and the calibration reference temperature, calibrate to obtain the initial calibration reference value based on the initial installation reference value.
[0069] To meet the calibration requirements during the application of water level gauges, the device further includes: The outlier handling module is configured to, after obtaining the current temperature and the current measurement value, also determine whether the current measurement value is outlier. If not, the measurement value is valid; if so, the average value of the previous multiple measurement values is used to replace the current measurement value.
[0070] The real-time temperature correction module is configured to acquire the current temperature and the current measured value, and based on the temperature calibration reference value at the previous moment, calculate the offset of the theoretical reference value at the current temperature relative to the temperature calibration reference value at the previous moment according to the temperature correction coefficient, so as to obtain the temperature calibration reference value at the current moment.
[0071] The physical shift correction module is configured to use a set duration as an observation cycle. By comparing the mean and standard deviation of the temperature calibration reference value of the current cycle with that of the previous cycle, it determines whether there is a physical shift. If so, it is considered that the initial installation reference value has shifted. The initial installation reference value is corrected based on the shift correction coefficient to obtain a new installation reference value. Based on the shift between the initial installation reference value and the new installation reference value, the physical shift correction is performed on the temperature calibration reference value at the current moment to obtain the temperature-shift calibration reference value.
[0072] The system noise correction module is configured to use a set duration as the observation period, record the standard deviation of multiple temperature-offset calibration reference values within the observation period as the actual noise, and adaptively adjust the observation noise covariance based on the actual noise of the current period and the short-range noise calibration threshold. Based on the observation noise covariance obtained by adaptive adjustment, Kalman filtering is performed on the current period to obtain the noise calibration reference value. Based on the coupling compensation coefficient and temperature compensation coefficient, combined with the temperature difference between the current temperature and the calibration reference temperature, and the noise difference between the current period and the previous period, the noise calibration reference value is corrected.
[0073] One or more embodiments of the present invention also provide an electronic device that can be used to implement the intelligent water level gauge adaptive calibration method in the above embodiments. The electronic device includes one or more processors, one or more memories coupled to the processors, and a communication module coupled to the processors.
[0074] The memory may include one or more non-volatile memories and one or more volatile memories. Examples of non-volatile memories include, but are not limited to, at least one of the following: read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, hard disk, compact disc (CD), digital video disc (DVD), or other magnetic and / or optical storage. Examples of volatile memories include, but are not limited to, at least one of the following: random access memory (RAM), or other volatile memories that do not persist during the power outage period. The computer program may be stored in the ROM. When the processor executes the computer program, it implements the above-described intelligent water level gauge adaptive calibration method.
[0075] In some embodiments, the program may be tangibly contained in a computer-readable medium, which may include a device (such as a memory) or other storage device accessible by the device. The program may be loaded from the computer-readable medium into RAM for execution. The computer-readable medium may include any type of tangible non-volatile memory, such as ROM, EPROM, flash memory, hard disk, whereby the computer-readable storage medium stores a computer program that, when executed by a processor, implements the aforementioned intelligent water level adaptive calibration method.
[0076] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a server or terminal, they generate, in whole or in part, the processes or functions described in the embodiments of this application. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic cable, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to the server or terminal, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, and magnetic tape), an optical medium (e.g., digital video disk (DVD), etc.), or a semiconductor medium (e.g., solid-state drive).
[0077] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0078] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A smart water level gauge adaptive calibration method, characterized in that, Includes the following steps: Based on the target range of the water gauge, obtain the temperature-sensitive range; Multiple sets of temperature and measurement values are obtained during a continuous period of stable water level. The average of the multiple measurement values is used as the initial installation reference value, and the average of the multiple temperatures is used as the calibration reference temperature. Multiple temperatures covering the temperature-sensitive range are used as measured temperatures, and the corresponding measured values at each measured temperature are obtained as measured reference values. The temperature correction coefficient is fitted based on the offset of each measured reference value relative to the initial installation reference value, and the temperature difference between each measured temperature and the calibration reference temperature. The current temperature is obtained, and based on the temperature correction factor and the temperature difference between the current temperature and the calibration reference temperature, the initial calibration reference value is obtained by calibration based on the initial installation reference value.
2. The intelligent water level gauge adaptive calibration method as described in claim 1, characterized in that, Obtain the current temperature and the current measured value. Based on the temperature calibration reference value at the previous moment, calculate the offset of the theoretical reference value at the current temperature relative to the temperature calibration reference value at the previous moment according to the temperature correction coefficient, and obtain the temperature calibration reference value at the current moment.
3. The intelligent water level gauge adaptive calibration method as described in claim 1, characterized in that, The temperature correction factor is fitted based on a reference value calibration model, which is based on the initial installation reference value and constructs correction terms according to the temperature difference between each measured temperature and the calibrated reference temperature. The correction term is a linear correction term, which is the product of the temperature correction coefficient and the temperature difference; or, The correction term is the sum of a linear correction term and a nonlinear correction term; The linear correction term is the product of the linear temperature correction coefficient and the temperature difference, while the nonlinear correction term is the product of the nonlinear temperature correction coefficient and the square of the temperature difference.
4. The intelligent water level gauge adaptive calibration method as described in claim 3, characterized in that, The correction term also includes a thermal expansion coupling correction term, which is the product of the difference in thermal expansion coefficients between the laser module and the water gauge housing, the temperature difference, and the target range.
5. The intelligent water level gauge adaptive calibration method as described in claim 3 or 4, characterized in that, The offset of the theoretical reference value at the current temperature relative to the temperature calibration reference value at the previous moment is obtained by multiplying the correction term and the temperature calibration reference value at the previous moment. The temperature calibration reference value at the current moment is obtained by subtracting the current measured value from the offset.
6. The intelligent water level gauge adaptive calibration method as described in claim 2, characterized in that, After obtaining the current temperature and the current measurement value, it is also determined whether the current measurement value is abnormal. If not, the measurement value is valid; if so, the average value of the previous multiple measurement values is used to replace the current measurement value.
7. The intelligent water level gauge adaptive calibration method as described in claim 2, characterized in that, After obtaining the temperature calibration reference value at the current moment, the observation period is set as one observation period. By comparing the mean and standard deviation of the temperature calibration reference value of the current period with that of the previous period, it is determined whether there is a physical displacement. If there is, it is considered that the initial installation reference value has shifted. The initial installation reference value is corrected based on the shift correction coefficient to obtain a new installation reference value. Based on the offset between the initial installation reference value and the new installation reference value, a physical offset correction is performed on the temperature calibration reference value at the current moment to obtain the temperature-offset calibration reference value.
8. The intelligent water level gauge adaptive calibration method as described in claim 7, characterized in that, Using a set duration as the observation period, the standard deviation of multiple temperature-offset calibration reference values within the observation period is recorded as the actual noise. Based on the actual noise of the current period and the short-range noise calibration threshold, the observation noise covariance is adaptively adjusted. Based on the observation noise covariance obtained through adaptive adjustment, Kalman filtering is applied to the current period to obtain the noise calibration reference value; Based on the coupling compensation coefficient and temperature compensation coefficient, combined with the temperature difference between the current temperature and the calibration reference temperature, and the noise difference between the current cycle and the previous cycle, the noise calibration reference value is corrected. The corrected noise calibration reference value and temperature-offset calibration reference value are used to calculate the actual water level.
9. A smart water level gauge adaptive calibration device, characterized in that, The initial parameter matching module is configured to obtain the temperature-sensitive range based on the target range of the water gauge. The initial reference calibration module is configured to acquire multiple sets of temperature and measurement values during a continuous period of stable water level, and use the average of the multiple measurement values as the initial installation reference value and the average of the multiple temperatures as the calibration reference temperature. The training data acquisition module is configured to use multiple temperatures covering the temperature-sensitive range as measured temperatures, and acquire the corresponding measured values at each measured temperature as measured reference values. The correction parameter fitting module is configured to fit the temperature correction coefficient based on the offset of each measured reference value relative to the initial installation reference value, and the temperature difference between each measured temperature and the calibration reference temperature. The initial reference calibration module is configured to acquire the current temperature, and based on the temperature correction factor and the temperature difference between the current temperature and the calibration reference temperature, calibrate to obtain the initial calibration reference value based on the initial installation reference value.
10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 8.