Water balance calculation method based on measurement of integration and quality recovery correction
Patent Information
- Application Number
- CN202610947032.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-25
AI Technical Summary
[0006]但现有质量回收法通常将投加质量与实测回收质量之差直接视为管道漏损,未充分区分复杂流态滞留、变截面扩散、局部回流、浓度长尾未采集、混合不充分等非漏损因素,易高估漏损率
本发明提出浓度长尾补全和无漏损数学模型修正方法。对于监测结束时尚未回归背景值的浓度过程,采用指数衰减、统计峰形模型、数值模拟或物理约束模型补全未采集长尾,得到实测修正回收质量;同时建立无漏损条件下的示踪剂输移数学模型,考虑投加位置、管道几何结构、多断面、变截面、扩散、滞留和监测窗口影响,计算理论修正回收质量。最终以实测修正回收质量与理论修正回收质量计算修正质量回收率,从而降低非漏损因素对漏损率和输水效率评价的干扰。本发明提出浓度数据智能清洗与自适应基线分离方法。首先通过浓度变化率阈值、滑动窗口中位数、中位数绝对偏差和时序异常识别模型,对气泡、水草、漂浮物、鱼类撞击及设备抖动造成的瞬时尖峰进行识别、剔除和插补;其次利用自适应基线模型,根据实测浓度数据动态估计背景基线,并从实测浓度中扣除背景漂移信号,得到更加准确的净示踪剂浓度曲线,提高实测修正回收质量的计算精度。本发明提出测算投一体化的示踪剂精准投加方法及装置,通过对取水口周边预设范围进行三维扫描,识别主流区、死水区、回流区、障碍物、淤积区和投加装置可达范围,建立取水口局部三维模型,并据此计算最佳投加位置。随后通过可伸缩投加管、末端定位机构、计量泵和流量计等,将预设质量的保守性示踪剂准确投加至目标位置,从源头提高示踪剂进入主流区和充分混合的可靠性,降低人工投加误差。
Smart Images

Figure CN122819033A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water balance calculation technology, and in particular to a water balance calculation method based on integrated measurement and input and quality recovery correction. Background Technology
[0002] my country's water resources are unevenly distributed in time and space, leading to the rapid development of water diversion projects such as inter-basin water transfer, regional water network connectivity, and joint operation of reservoir groups. These projects typically transport water through reservoir intakes, inverted siphons, pressure pipelines, tunnels, box culverts, open channels, and end-point discharge facilities. In actual operation, intakes are often located in reservoirs or deep water areas. Due to limitations such as water depth, siltation, trash racks, floating debris, maintenance conditions, and the difficulty of engineering modifications, reliable flow meters are usually difficult to install at the intake; while the discharge end often has better metering capabilities. Therefore, in scenarios where "there is no metering at the intake but metering at the discharge end," accurately calculating water intake and pipeline leakage rates is a key issue in implementing water conservation requirements and conducting water balance testing.
[0003] Existing water balance testing methods for such projects mainly include tracer dilution and mass recovery methods. Among them, the mass recovery method focuses on cumulative water balance and is suitable for analyzing the water supply and demand relationship over a period of time, thus better meeting the water balance testing requirements of water diversion projects.
[0004] Formula for calculating leakage rate using the mass recovery method:
[0005] In the formula, To measure the actual recovery quality; This refers to the flow rate at the outlet. This is the measured concentration; Background concentration; , These are the start and end times of integration. Traditional methods typically use... Indicates recovery rate, and in Estimate the leakage rate, where To ensure the quality of the dosage, This represents the leakage rate.
[0006] However, existing mass recovery methods typically consider the difference between the added mass and the measured recovered mass as pipeline leakage, failing to adequately differentiate between non-leakage factors such as complex flow patterns, variable cross-section diffusion, local backflow, uncollected concentration tails, and insufficient mixing, which easily leads to an overestimation of leakage rates. Furthermore, traditional tracer dosing relies heavily on manual experience to determine the dosing location; if added to the sidewalls, stagnant water zones, or low-velocity areas, it can easily cause concentration peak distortion and prolonged tailing. The sensor at the outlet may also be affected by air bubbles, aquatic plants, floating debris, fish impacts, and equipment vibrations, generating abnormal spikes and further reducing the accuracy of recovery mass calculations.
[0007] Therefore, there is an urgent need for a method and device for calculating the leakage rate of water diversion projects based on integrated measurement and injection and quality recovery correction. Under conditions where there is no flow meter at the water intake, this method utilizes timed and quantitative injection, real-time monitoring at the outlet, intelligent concentration cleaning, adaptive baseline separation, long-tail concentration compensation, and leakage-free mathematical model correction to obtain both measured and theoretical corrected recovery quality. This allows for accurate calculation of the pipeline leakage rate, providing a scientific basis for water balance calculation and water use efficiency improvement in large-scale water diversion projects. Summary of the Invention
[0008] This invention overcomes the shortcomings of the prior art and provides a water balance calculation method based on integrated measurement and input and quality recovery correction.
[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a water balance calculation method based on integrated measurement and input and quality recovery correction, comprising: The topography and boundary of the water intake are scanned to obtain basic data, and a three-dimensional model of the water intake is constructed based on the basic data. A local three-dimensional flow field calculation model is constructed by combining the Reynolds-averaged Navier-Stokes equations and the basic data. The optimal dosing position of the tracer is determined based on the local three-dimensional flow field calculation model, and the dosing tube is positioned and quantitatively added using an automatic dosing module based on the optimal dosing position of the tracer. Based on the aforementioned basic data, intelligent cleaning is performed by real-time monitoring of the outlet flow rate and tracer concentration, combined with tracer concentration data. The background baseline and net concentration were estimated using an asymmetric least squares smoothing method. The net concentration was fitted using a Gamma distribution function and the long tail of the concentration was completed. The actual mass of tracer recovered was calculated based on the effluent flow rate process and the corrected net concentration process. A mathematical model for tracer transport without leakage was established. The model was used to correct the recovery mass calculation, and the leakage rate, water intake, leakage volume, and water transfer efficiency were calculated.
[0010] Furthermore, in the water balance calculation method based on integrated measurement and input and quality recovery correction, the topography and boundary of the water intake are scanned to obtain basic data, and a three-dimensional model of the water intake is constructed based on the basic data, specifically as follows: Using the inverted siphon intake or inlet section as the center, a pre-defined area around the intake is scanned, including underwater topography and the location of the intake pipe. By using scanning, the actual spatial boundary conditions around the reservoir intake and the inverted siphon inlet are obtained to form basic data, and a three-dimensional model of the intake is constructed based on the basic data.
[0011] Furthermore, in the water balance calculation method based on integrated measurement and input and mass recovery correction, a local three-dimensional flow field calculation model is constructed by combining the Reynolds-averaged Navier-Stokes equations and basic data, specifically as follows: Based on the aforementioned basic data, the Reynolds mean velocity vector, Reynolds mean pressure, water density, water kinematic viscosity, and mean velocity gradient are obtained. The turbulent eddy viscosity coefficient is set, and the gravitational acceleration vector is obtained. A local three-dimensional flow field calculation model is constructed by introducing the Reynolds-averaged Navier-Stokes equations and combining them with the Reynolds-averaged velocity vector, Reynolds-averaged pressure, water density, water kinematic viscosity, average velocity gradient, turbulent eddy viscosity coefficient, and gravitational acceleration vector. The local three-dimensional flow field calculation model is used to calculate and identify the average flow velocity distribution, backflow zone range, low velocity zone range, and main flow channel location of the water intake within a preset range.
[0012] Furthermore, in the water balance calculation method based on integrated measurement and dosing and quality recovery correction, the optimal dosing position of the tracer is determined according to the local three-dimensional flow field calculation model, and the dosing tube is positioned and quantitatively added using an automatic dosing module based on the optimal dosing position of the tracer. Specifically: After identifying the average velocity distribution, backflow zone range, low velocity zone range, and main flow channel location of the water intake within a preset range using the local three-dimensional flow field calculation model, the optimal dosing location of the tracer is determined. After determining the optimal dosing point, the automatic dosing module performs positioning and dosing. The automatic dosing module includes a storage tank, a stirrer, a metering pump, a flow meter, a retractable dosing pipe, an end positioning sensor, and an anti-clogging nozzle. After moving the end of the dosing tube to the optimal dosing position and stabilizing the state, start adding the tracer and track the actual quality of the added tracer.
[0013] Furthermore, in the water balance calculation method based on integrated measurement and injection and quality recovery correction, intelligent cleaning is performed by combining real-time monitoring of the outlet flow rate and tracer concentration with the tracer concentration data based on the aforementioned basic data. Specifically: A flow meter and a tracer concentration sensor are installed at the water outlet to track the flow rate and tracer concentration at the water outlet in real time, collect the original tracer concentration signal, and calculate the concentration change rate of the original tracer concentration signal. A robust moving window method is used to identify the median in the sliding window, and the absolute deviation of the median is calculated. A threshold for the absolute deviation of the median is set. When the absolute deviation of the median is greater than the threshold, it is marked as a candidate peak outlier. If a candidate outlier lasts for only one to several sampling intervals and the overall trend of the data before and after is continuous, it is determined to be an instantaneous spike and replaced; if the concentration change shows a stable increase, a stable decrease, or a broad peak shape in multiple consecutive sampling points, it is determined to be a true concentration fluctuation and retained. For points identified as instantaneous spikes, linear interpolation, local polynomial interpolation, or neighborhood median replacement are used to obtain the cleaned concentration sequence.
[0014] Furthermore, in the water balance calculation method based on integrated measurement and input and quality recovery correction, an asymmetric least squares smoothing method is used to estimate the background baseline and the net extraction concentration, specifically: The concentration sequence after cleaning is processed to obtain the cleaned concentration sequence, and the background baseline is estimated by asymmetric least squares smoothing on the cleaned concentration sequence. The asymmetric weights are iteratively updated based on the relationship between the concentration value after cleaning and the current baseline estimate until the baseline change is less than a set threshold or the maximum number of iterations is reached, thus obtaining the final background baseline. After obtaining the background baseline, the net tracer concentration is updated, and the updated net tracer concentration is subjected to non-negative constraint processing to obtain the net tracer concentration used for mass recovery integration.
[0015] Furthermore, in the water balance calculation method based on integrated measurement and input and quality recovery correction, the net concentration is fitted using the Gamma distribution function, and the long tail of the concentration is completed, specifically as follows: The net concentration process was fitted using the Gamma distribution function, and a differential algorithm was introduced to use the amplitude coefficient, tracer response start time, shape parameter, and scale parameter in the Gamma distribution function as the set of optimization parameters. Construct a fitting objective function, and the differential evolution algorithm searches for the parameter combination that minimizes the fitting objective function through population initialization, mutation, crossover and selection processes; The differential evolution algorithm is used to randomly generate multiple candidate parameter vectors within the parameter allowable range. Then, new parameter vectors are generated through differential mutation. These vectors are then cross-combined with the original parameter vectors. Finally, individuals with smaller objective function values are retained. This process is repeated until the maximum number of iterations or the error convergence condition is reached to obtain the optimal parameters. When the actual monitoring ends and the net concentration has not yet returned to the background, the optimal Gamma distribution curve is used to complete the long tail of the concentration after the end of the actual monitoring.
[0016] Furthermore, in the water balance calculation method based on integrated measurement and dosage and quality recovery correction, the actual recovered tracer mass is calculated according to the effluent flow rate process and the corrected net concentration process, specifically as follows: Obtain the effluent flow rate and the corresponding net concentration at the time, and calculate the tracer mass passing through the effluent section per unit time based on the effluent flow rate and the corresponding net concentration at the time. The measured corrected recovery mass is obtained by integrating the tracer mass passing through the effluent section per unit time over the entire monitoring period and the tail completion period. For discrete sampling data, the measured recovery mass after data quality control and long-tail completion can be calculated by numerical summation.
[0017] Furthermore, in the water balance calculation method based on integrated measurement and injection and quality recovery correction, a leakage-free tracer transport mathematical model is established, and the recovery quality calculation is corrected using the leakage-free tracer transport mathematical model. Specifically: A mathematical model under no-leakage conditions is established based on the diffusion transport equation, and the tracer transport process from the dosing point to the effluent outlet is simulated using the mathematical model under no-leakage conditions; For projects with multiple cross-sections, variable cross-sections, bends, or complex inlet flow patterns, a three-dimensional convection-diffusion model is adopted. The model inputs include the dosing location, dosing mass, dosing duration, dosing liquid flow rate, pipeline geometric parameters, cross-sectional change parameters, effluent flow process, and monitoring window. The model outputs the theoretical effluent concentration process under leak-free conditions. Furthermore, in the water balance calculation method based on integrated measurement and input and quality recovery correction, a leakage-free tracer transport mathematical model is used to correct the recovery quality calculation, and the leakage rate, water intake, leakage water volume, and water conveyance efficiency are calculated, specifically as follows: The theoretical concentration process output by the leak-free model is multiplied by the effluent flow rate process and integrated to calculate the leak-free theoretical corrected recovery mass. Under the premise of synchronous migration of the conservative tracer and the water body, the corrected mass recovery rate and pipeline leakage rate are calculated. The corrected mass recovery rate represents the proportion of water recovered from the pipeline, and the unrecovered proportion is used as the pipeline leakage rate.
[0018] This invention addresses the shortcomings of the prior art and has the following beneficial effects: This invention proposes a method for long-tailed concentration data completion and leakage-free mathematical model correction. For concentration processes that have not yet returned to background values at the end of monitoring, exponential decay, statistical peak-shaped models, numerical simulations, or physical constraint models are used to complete the missing long-tailed data, obtaining the measured corrected recovery mass. Simultaneously, a tracer transport mathematical model under leakage-free conditions is established, considering the effects of dosing location, pipeline geometry, multi-section, variable cross-section, diffusion, retention, and monitoring window, to calculate the theoretical corrected recovery mass. Finally, the corrected recovery rate is calculated using the measured and theoretical corrected recovery masses, thereby reducing the interference of non-leakage factors on leakage rate and water conveyance efficiency evaluation. This invention also proposes a method for intelligent concentration data cleaning and adaptive baseline separation. First, by using a concentration change rate threshold, sliding window middle, median absolute deviation, and time-series anomaly identification model, instantaneous spikes caused by bubbles, aquatic plants, floating objects, fish impacts, and equipment vibrations are identified, removed, and interpolated. Second, using an adaptive baseline model, the background baseline is dynamically estimated based on measured concentration data, and the background drift signal is subtracted from the measured concentration to obtain a more accurate net tracer concentration curve, improving the calculation accuracy of the measured corrected recovery quality. This invention proposes a method and device for precise tracer dosing that integrates measurement and dosing. By performing a three-dimensional scan of a preset area around the water intake, the main flow area, dead water area, backflow area, obstacles, siltation area, and the reachable range of the dosing device are identified, establishing a local three-dimensional model of the water intake, and calculating the optimal dosing position accordingly. Subsequently, through a retractable dosing pipe, end positioning mechanism, metering pump, and flow meter, a conservatively controlled tracer of a preset mass is accurately added to the target position, improving the reliability of tracer entering the main flow area and ensuring thorough mixing from the source, and reducing human dosing errors. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.
[0020] Figure 1 This diagram illustrates the overall process of water balance. Figure 2 A flowchart of a water balance calculation method based on integrated measurement and input and quality recovery correction is shown. Detailed Implementation
[0021] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0023] Specifically, it includes the following steps and content: Due to the presence of sidewall effects, local backflow, slow-flow zones, stagnant water zones, trash rack disturbance, silt-laden terrain, and obstacles near reservoir intakes and inverted siphon inlets, tracers may not be able to enter the mainstream in time if added to non-mainstream or localized stagnant areas. This can lead to distorted concentration peaks, inadequate mixing, prolonged tailing, or low recovery quality. Existing experiments typically rely on the experience of on-site personnel to select the addition location, lacking precise identification of the surrounding terrain, flow patterns, obstacles, and the reach of the addition device. Furthermore, there is a lack of automated positioning and quantitative addition methods, resulting in insufficient stability and repeatability of results between different experimental batches.
[0024] This invention proposes a method and apparatus for precise tracer dosing that integrates measurement and dosing. By performing a three-dimensional scan of a preset area around the water intake, the main flow zone, stagnant water zone, backflow zone, obstacles, siltation zone, and the reachable range of the dosing device are identified, establishing a local three-dimensional model of the water intake and calculating the optimal dosing location. Subsequently, a preset mass of conservative tracer is accurately dosed to the target location using a retractable dosing pipe, an end-point positioning mechanism, a metering pump, and a flow meter. This improves the reliability of tracer entry into the main flow zone and thorough mixing from the source, reducing human dosing errors. Specifically, it includes the following: S1: Intake Topography and Boundary Scan The purpose of this step is to obtain the actual spatial boundary conditions around the reservoir intake and inverted siphon inlet, providing basic data for subsequent 3D modeling, flow field identification, and optimal injection point calculation. In practice, a preset range around the intake is scanned, centered on the inverted siphon intake or inlet section. The preferred scanning range is: [Equivalent diameter of the intake pipe or inverted siphon inlet].
[0025] The scan includes underwater topography and the location of the water intake pipe, providing foundational data for the subsequent creation of a 3D model of the water intake. Underwater sonar and multibeam bathymetry equipment can be used for the scanning.
[0026] S2: Establish a 3D model of the water intake. The purpose of this step is to identify the main flow zone, slow flow zone, backflow zone, and dead flow zone near the water intake, providing hydrodynamic basis for selecting the tracer dosing location. Its basic principle is to establish a local three-dimensional flow field calculation model based on the three-dimensional geometric model of the water intake. Near actual reservoir water intakes and inverted siphon inlets, the water flow is mostly turbulent. To balance engineering calculation efficiency and flow regime description accuracy, the Reynolds-averaged Navier-Stokes equations, i.e., the RANS equations, can be used.
[0027] Its governing equations are:
[0028] In the formula: : Reynolds mean velocity vector; Reynolds mean pressure; Water density; : Kinematic viscosity of water; : Turbulent eddy viscosity coefficient; Mean velocity gradient; : Transpose of the average velocity gradient matrix; : Gravitational acceleration vector.
[0029] This model can be used to calculate the average velocity distribution near the water intake, the range of the backflow zone, the range of the low-velocity zone, and the location of the main flow channel.
[0030] S3: Determine the optimal location for tracer dosing. The purpose of this step is to determine the dosing location that facilitates rapid entry of the tracer into the mainstream, thorough mixing, and easy access by the device, and to achieve precise dosing of the tracer.
[0031] Based on the three-dimensional flow field diagram, determine the optimal location for adding the tracer. The optimal location should be a safe distance (usually 1 to 5 times the diameter D of the water intake) directly in front of or above the central axis of the water intake, and the flow velocity should not exceed 2 m / s, with no other directional velocity components, to ensure that all substances can enter the water supply pipeline.
[0032] S4: Dosing tube positioning and quantitative dosing This step avoids manual addition to the sidewalls, stagnant water areas, or backflow zones, improving the reliability of tracer entry into the mainstream and thorough mixing. After determining the optimal addition point, the automatic addition module performs positioning and addition. The automatic addition module includes a storage tank, stirrer, metering pump, flow meter, retractable addition tube, end-position sensor, and anti-clogging nozzle. The control system moves the end of the addition tube to the optimal addition position and begins adding tracer after the state stabilizes. The actual added tracer mass is:
[0033] In the formula, To ensure the quality of the tracer addition; The concentration of the added solution; For a moment Dosage flow rate; Duration of application; For time derivative.
[0034] The core of the mass recovery method is to integrate the concentration and flow processes at the effluent end. Therefore, the quality of the concentration data directly determines the accuracy of the recovery mass calculation. In actual engineering, concentration sensors may be affected by bubbles, aquatic plants, floating objects, fish collisions, sediment adhesion, sensor vibration, or communication abnormalities, resulting in short-term abnormal spikes or drops. At the same time, the background conductivity, turbidity, fluorescence signal, and water temperature of the reservoir may drift slowly with scheduling, water quality changes, or environmental conditions. If a fixed background value is used for subtraction or direct integration of the original concentration curve, sensor abnormalities or changes in the environmental baseline may be mistaken for tracer signals, resulting in an overestimation or underestimation of the measured recovery mass.
[0035] This invention proposes an intelligent cleaning and adaptive baseline separation method for concentration data. First, using a concentration change rate threshold, sliding window median, median absolute deviation, and a time-series anomaly identification model, instantaneous spikes caused by bubbles, aquatic plants, floating objects, fish impacts, and equipment vibration are identified, removed, and interpolated. Second, an adaptive baseline model is used to dynamically estimate the background baseline based on the measured concentration data, and the background drift signal is subtracted from the measured concentration to obtain a more accurate net tracer concentration curve, improving the calculation accuracy of the measured corrected recovery quality. Specifically, this includes: S5: Real-time monitoring of outlet flow rate and concentration The purpose of this step is to obtain the basic measured data required for mass recovery calculations, namely the effluent flow rate and tracer concentration. This is achieved by recording the effluent flow rate using an effluent flow meter and recording the tracer concentration change after it reaches the effluent using a concentration sensor, synchronizing the two data points in time.
[0036] In practice, a flow meter and a tracer concentration sensor are installed at the water outlet to collect data in real time.
[0037] In the formula, For the water outlet at time The measured flow rate; For the water outlet at time The original tracer concentration signal; For monitoring time.
[0038] in, It can be used to convert concentrations based on conductivity, fluorescence intensity, salinity, or other conservative tracer concentrations. The monitoring process should cover the tracer front arrival, concentration rise, peak appearance, concentration fall, and tailing stages to provide a complete data foundation for subsequent mass integration.
[0039] S6: Intelligent Cleaning of Concentration Data The purpose of this step is to eliminate spike anomalies caused by bubbles, aquatic plants, floating objects, fish impacting the sensor, or transient sensor disturbances, while preserving the true tracer concentration fluctuations. The principle behind this is that the true tracer concentration process typically exhibits hydraulic transport characteristics such as continuous rise, continuous fall, peak diffusion, and tailing attenuation. Anomalies caused by bubbles, aquatic plants, and fish impacts, on the other hand, often manifest as sudden increases or decreases at single points or over very short periods, with short durations, large local rates of change, and a lack of continuity with the preceding and following concentration processes.
[0040] The original concentration signal can be represented as:
[0041] In the formula, This is the original concentration signal; This is the actual tracer concentration signal; These are transient spike-like abnormal signals caused by bubbles, aquatic plants, fish impacts, etc. It is random noise; For time.
[0042] First, calculate the rate of change in concentration:
[0043] In the formula, For a moment The rate of change of concentration; For a moment The original concentration; This represents the original concentration at the previous sampling time. This is the sampling time interval. If If so, the point is marked as a candidate instantaneous spike point; This is the threshold for the rate of change of concentration.
[0044] Then, a sliding window robust discrimination is used. The median value in the sliding window is:
[0045] In the formula, For a moment The median value in the sliding window; For median operations; The width is half the width of the window.
[0046] The absolute deviation of the median is:
[0047] In the formula, For a moment The absolute deviation of the median; For the first in the sliding window Each concentration value; This represents the middle value in the sliding window.
[0048] like:
[0049] Then the point is marked as a candidate spike anomaly; where, This is the anomaly detection coefficient.
[0050] To avoid accidentally deleting true concentration peaks, this step further performs continuity judgment. If a candidate anomaly lasts only for one to several sampling intervals and the overall trend of the data before and after is continuous, it is judged as an instantaneous spike and replaced; if the concentration change shows a stable increase, stable decrease, or broad peak shape in multiple consecutive sampling points, it is judged as a true concentration fluctuation and retained.
[0051] For points identified as instantaneous spikes, linear interpolation, local polynomial interpolation, or neighborhood median replacement can be used to obtain the cleaned concentration sequence:
[0052] In the formula, To remove transient spikes in concentration data, this cleaning process only addresses transient sensor disturbances and does not smooth or weaken the true concentration peak shape, thus ensuring that subsequent mass integration does not lose the true tracer signal.
[0053] S7: Background baseline determination and net concentration extraction based on asymmetric least-squares smoothing The purpose of this step is to identify and subtract the background baseline from the concentration data after removing instantaneous spikes, obtaining the net concentration process caused solely by tracer addition. The principle behind this is that the signal recorded by the concentration sensor at the effluent end includes not only the tracer response but also the original background concentration of the water and its slow drift. The background baseline typically changes gradually, while the tracer response usually exhibits a localized peak. Therefore, an asymmetric least squares smoothing method can be used to estimate the background baseline, ensuring the fitted curve closely matches the lower envelope of the concentration curve, while avoiding misinterpreting tracer peaks as background.
[0054] The concentration signal after S6 cleaning can be expressed as:
[0055] In the formula, To remove the concentration signal after the transient spike; This is the true net concentration signal of the tracer; Background baseline; It is random noise; For time.
[0056] For a discrete sampling sequence, let the concentration sequence after cleaning be:
[0057] In the formula, This is a column vector of concentration data after cleaning; For the first Concentration values after cleaning at each sampling point; Total number of sampling points; superscript This indicates transpose.
[0058] Asymmetric least squares smoothing is used to estimate the background baseline:
[0059] In the formula, The background baseline sequence to be estimated; For the first Background baseline values at each sampling point; For the first Asymmetric weights for each sampling point; The first term is a smoothing parameter used to control the degree of baseline smoothing; the second term is a data fitting term used to constrain the baseline to closely approximate the observed data; the third term is a second-order difference smoothing term used to constrain the background baseline to change slowly.
[0060] Among them, the second-order difference term:
[0061] It is used to suppress sharp fluctuations in the baseline and keep the background baseline with smooth change characteristics.
[0062] Asymmetric weights Iterative updates are based on the relationship between the post-cleaning concentration value and the current baseline estimate:
[0063] In the formula, The weights are asymmetric, and ; This indicates that the concentration at this sampling point is higher than the current baseline, and may fall within the tracer peak region, thus it is assigned a smaller weight. To avoid the baseline being pulled upwards by the peak; This indicates that the sampling point is close to or below the baseline, and is therefore assigned a higher weight. This makes the baseline closer to the envelope at the background concentration.
[0064] This optimization problem can be written in matrix form:
[0065] In the formula, This is a column vector of concentration data after cleaning; The background baseline column vector to be estimated; For weight The diagonal matrix formed; It is a second-order difference matrix; For smoothing parameters; superscript This indicates the matrix transpose.
[0066] The corresponding linear equation is:
[0067] In the formula, the symbols have the same meaning as above. This is achieved by repeatedly solving the linear equation and updating the weights. The final background baseline can be obtained by continuing this process until the baseline change is less than a set threshold or the maximum number of iterations is reached.
[0068] In the formula, For the first Background baseline values at each sampling time; The first is obtained by asymmetric least squares smoothing. One baseline estimate.
[0069] After obtaining the background baseline, the net tracer concentration is:
[0070] In the formula, For the first Net tracer concentration at each sampling time; For the first Concentration after cleaning at each sampling time; For the first The background baseline at each sampling time.
[0071] To avoid negative net concentrations due to minor noise, non-negativity constraints can be used:
[0072] In the formula, This indicates taking the larger value between the value inside the parentheses and 0.
[0073] This step adaptively estimates the background baseline from the concentration time series itself and obtains the net tracer concentration process for mass recovery integration. This method reduces the impact of slow background drift on recovery mass calculations while preserving the true shape of the tracer response peak.
[0074] In actual water diversion projects, inverted siphon pipes often have multiple cross-sections, variable cross-sections, bends, transition sections, gate sections, local diffusion sections, and pressure change sections. During transport, tracers may experience enhanced diffusion, localized retention, backflow tailing, and uneven mixing across the cross-section. Even if there is no actual leakage in the pipe, some tracers may fail to be fully collected within the designated monitoring window due to retention or long-tail release. Traditional mass recovery methods typically calculate the leakage rate directly based on the difference between the added mass and the measured recovered mass, failing to distinguish between "mass loss due to actual leakage" and "non-leakage unrecovered mass due to complex flow patterns," thus easily overestimating the leakage rate.
[0075] This invention proposes a method for concentration long-tail completion and leakage-free mathematical model correction. For concentration processes that have not yet returned to the background value at the end of monitoring, the long tail of uncollected data is completed using exponential decay, statistical peak-shaped models, numerical simulation, or physical constraint models to obtain the measured corrected recovery mass. Simultaneously, a tracer transport mathematical model under leakage-free conditions is established, considering the effects of dosing location, pipeline geometry, multi-section, variable cross-section, diffusion, retention, and monitoring window, to calculate the theoretical corrected recovery mass. Finally, the corrected recovery rate is calculated using the measured and theoretical corrected recovery masses, thereby reducing the interference of non-leakage factors on the evaluation of leakage rate and water conveyance efficiency. Specifically, the method includes the following steps: S8: Concentration long-tail completion based on Gamma distribution fitting and differential evolution algorithm The purpose of this step is to address the underestimation of recovery quality caused by insufficient monitoring time or incomplete concentration tailing. The underlying principle is as follows: after tracer transport in long-distance inverted siphons or complex pipelines, the concentration process at the effluent end typically exhibits an asymmetric peak shape, meaning the leading edge rises relatively quickly, the peak decays slowly, and it has a pronounced right-skewed long tail. The Gamma distribution, with its non-negativity, skewness, and long tail characteristics, is suitable for describing tracer concentration response curves. The Differential Evolution (DE) algorithm is a global optimization algorithm suitable for searching for optimal parameters under nonlinear, multi-parameter, and non-convex objective function conditions, avoiding the pitfalls of traditional local optimization methods.
[0076] This invention uses a Gamma distribution function to fit the net concentration process. The Gamma distribution can be expressed as:
[0077] In the formula, The concentration process obtained by fitting; This is the amplitude coefficient, used to control the overall magnitude of the curve. This is the start time of the tracer response; The shape parameter controls the steepness of the peak shape; This is a scale parameter that controls the length of the trailing edge. It is the Gamma function; For time.
[0078] The set of parameters that need to be optimized is:
[0079] In the formula, The vector of parameters to be optimized; , , , These are the fitting parameters for the Gamma distribution.
[0080] Construct the fitting objective function:
[0081] In the formula, The objective function is the fitting error. This represents the number of sampling points where the net concentration has been observed. For the first Net tracer concentration at each sampling time; For parameters Next The fitted concentration at each sampling time.
[0082] Differential evolution algorithm searches through population initialization, mutation, crossover and selection processes to achieve The goal is to find the optimal parameter combination. Specifically, first, multiple candidate parameter vectors are randomly generated within the allowed parameter range; then, new parameter vectors are generated through differential mutation; these are then combined with the original parameter vectors; finally, the vectors with the smallest objective function value are retained. This process is repeated iteratively until the maximum number of iterations or the error convergence condition is reached, yielding the optimal parameters.
[0083] In the formula, The optimal Gamma distribution parameters; This represents the set of parameters that minimizes the objective function.
[0084] When the actual monitoring ends at When the net concentration has not yet regressed to the background, the optimal Gamma distribution curve is used for... The concentration tail is then supplemented:
[0085] In the formula, To complete the tail concentration; Fit the concentration to the Gamma distribution under optimal parameters; This is the actual end time of monitoring.
[0086] The completed net concentration process is as follows:
[0087] In the formula, For the complete net concentration process used for mass integration; This is the measured net concentration; Tail concentrations for fitting and completing the Gamma distribution.
[0088] This step helps avoid underestimating recovery quality due to incomplete collection caused by concentration tailing, and thus avoids overestimating pipeline leakage rates.
[0089] S9: Calculation of Corrected Recovery Quality Based on Actual Measurement The purpose of this step is to calculate the actual recovered tracer mass based on the effluent flow rate and the corrected net concentration. The principle behind this is mass conservation: the mass of tracer passing through the effluent section per unit time is equal to the product of the effluent flow rate and the net concentration at that moment. Integrating over the entire monitoring period and the supplementary tail period yields the measured corrected recovered mass.
[0090] The measured corrected recovery mass is:
[0091] In the formula, To correct the recovery quality based on actual measurements; The measured flow rate at the outlet at time t; The net concentration process after peak washing, background subtraction, and Gamma tail completion; This is the moment when integration begins; The end time of integration includes the actual monitoring period and the necessary long-tail completion period; For time derivative.
[0092] For discrete sampled data, a numerical summation method can be used:
[0093] In the formula, For the first The outflow rate during each sampling period; For the first Net concentration for each sampling period; For the first The length of each sampling period; This represents the total number of sampling periods.
[0094] The output of this step It is the measured recovery quality after data quality control and long-tail completion, which is used for subsequent comparison with the recovery quality corrected by the theory of no leakage.
[0095] S10: Establish a mathematical model for tracer transport without leakage. The purpose of this step is to determine how much tracer should theoretically be recovered at the outlet under the condition of no pipeline leakage, thereby eliminating the impact of non-leakage factors such as complex flow regimes, variable cross-sections, local stagnation, inadequate mixing, and monitoring windows on the recovery quality. Its implementation principle is based on the tracer convection-diffusion transport equation, establishing a mathematical model under leakage-free conditions to simulate the tracer transport process from the injection point to the outlet.
[0096] The one-dimensional lossless transport model can be expressed as:
[0097] In the formula, The concentration of the tracer; For time; These are the spatial coordinates along the pipeline direction; For position ,time The cross-sectional average velocity; For position ,time The longitudinal diffusion coefficient; the second term on the left represents convective transport; the term on the right represents diffusion transport.
[0098] For projects with multiple cross-sections, variable cross-sections, bends, or complex inlet flow patterns, a three-dimensional convection-diffusion model can also be used:
[0099] In the formula, For spatial differential operators; It is a three-dimensional velocity vector; For diffusion or diffusion coefficient; For liquidity divergence; For diffusion or diffusion flux divergence.
[0100] Model inputs include dosing location Dosing quality Dosing time Dosage flow rate The model outputs the theoretical outlet concentration process under leak-free conditions, including pipe geometry parameters, cross-sectional variation parameters, outlet flow rate process, and monitoring window.
[0101] In the formula, The theoretical tracer concentration at the outlet under leak-free conditions; subscript Indicates simulated value; subscript This indicates a condition with no leakage.
[0102] S11: Leakage-free theory-corrected recovery quality calculation The purpose of this step is to calculate the theoretically recoverable tracer mass that the effluent monitoring system should reclaim under leak-free conditions, serving as the denominator for correcting the mass recovery rate. This is achieved by multiplying the theoretical concentration output from the leak-free model by the effluent flow rate and then integrating the result.
[0103] The corrected recovery quality based on the no-leakage theory is:
[0104] In the formula, To correct the recovery quality based on the theory of zero leakage; The measured flow rate at the outlet at time t; The theoretical outlet water concentration obtained from a leakage-free mathematical model simulation. This is the starting moment of the theoretical mass integral; This is the moment when the theoretical mass integral ends; For time derivative.
[0105] This value is not necessarily equal to the mass added. When the pipeline flow pattern is simple, monitoring time is sufficient, and there is no obvious stagnation or tailing, Approachable When there are complex flow patterns, local stagnation, tailing release, or monitoring window limitations, Smaller than Therefore, adopting As a theoretical recovery benchmark, compared to direct use It better reflects the leakage-free recovery capability under actual engineering conditions.
[0106] S12: Calculation of leakage rate, water intake, leakage volume, and water conveyance efficiency. The purpose of this step is to convert the quality recovery results into leakage rate, water intake, leakage volume, and water transmission efficiency required for engineering management. The underlying principle is that, under the premise of synchronous migration of the conservative tracer with the water body, the corrected quality recovery rate can characterize the proportion of water recovered from the pipeline, and the unrecovered proportion can be used as the pipeline leakage rate. Thus, the leakage rate, water intake, leakage volume, and water transmission efficiency are used to balance the water volume.
[0107] The corrected mass recovery rate is:
[0108] In the formula, To correct the mass recovery rate; To correct the recovery quality based on actual measurements; To correct the recovery quality based on the theory of zero leakage.
[0109] Pipeline leakage rate:
[0110] In the formula, Pipeline leakage rate; To correct the mass recovery rate.
[0111] In summary, this invention proposes a method for long-tailed concentration data completion and leakage-free mathematical model correction. For concentration processes that have not yet returned to the background value at the end of monitoring, exponential decay, statistical peak-shaped models, numerical simulations, or physical constraint models are used to complete the uncollected long tail, obtaining the measured corrected recovery mass. Simultaneously, a tracer transport mathematical model under leakage-free conditions is established, considering the effects of dosing location, pipeline geometry, multi-section, variable cross-section, diffusion, retention, and monitoring window, to calculate the theoretical corrected recovery mass. Finally, the corrected recovery rate is calculated using the measured and theoretical corrected recovery masses, thereby reducing the interference of non-leakage factors on leakage rate and water conveyance efficiency evaluation. This invention also proposes a method for intelligent concentration data cleaning and adaptive baseline separation. First, by using a concentration change rate threshold, sliding window middle, median absolute deviation, and time-series anomaly identification model, instantaneous spikes caused by bubbles, aquatic plants, floating objects, fish impacts, and equipment vibrations are identified, removed, and interpolated. Second, using an adaptive baseline model, the background baseline is dynamically estimated based on measured concentration data, and the background drift signal is subtracted from the measured concentration to obtain a more accurate net tracer concentration curve, improving the calculation accuracy of the measured corrected recovery quality. This invention proposes a method and device for precise tracer dosing that integrates measurement and dosing. By performing a three-dimensional scan of a preset area around the water intake, the main flow area, dead water area, backflow area, obstacles, siltation area, and the reachable range of the dosing device are identified, establishing a local three-dimensional model of the water intake, and calculating the optimal dosing position accordingly. Subsequently, through a retractable dosing pipe, end positioning mechanism, metering pump, and flow meter, a conservatively controlled tracer of a preset mass is accurately added to the target position, improving the reliability of tracer entering the main flow area and ensuring thorough mixing from the source, and reducing human dosing errors.
[0112] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0113] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0114] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0115] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0116] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0117] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included 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 water balance calculation method based on integrated measurement and input with quality recovery correction, characterized in that, Specifically, it includes: The topography and boundary of the water intake are scanned to obtain basic data, and a three-dimensional model of the water intake is constructed based on the basic data. A local three-dimensional flow field calculation model is constructed by combining the Reynolds-averaged Navier-Stokes equations and the basic data. The optimal dosing position of the tracer is determined based on the local three-dimensional flow field calculation model, and the dosing tube is positioned and quantitatively added using an automatic dosing module based on the optimal dosing position of the tracer. Based on the aforementioned basic data, intelligent cleaning is performed by real-time monitoring of the outlet flow rate and tracer concentration, combined with tracer concentration data. The background baseline and net concentration were estimated using an asymmetric least squares smoothing method. The net concentration was fitted using a Gamma distribution function and the long tail of the concentration was completed. The actual mass of tracer recovered was calculated based on the effluent flow rate process and the corrected net concentration process. A mathematical model for tracer transport without leakage was established. The model was used to correct the recovery mass calculation. The leakage rate, water intake, leakage water volume, and water transport efficiency were calculated. The leakage rate, water intake, leakage water volume, and water transport efficiency were used to balance the water volume.
2. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, The topography and boundary of the water intake are scanned to obtain basic data, and a three-dimensional model of the water intake is constructed based on the basic data, specifically as follows: Using the inverted siphon intake or inlet section as the center, a pre-defined area around the intake is scanned, including underwater topography and the location of the intake pipe. By using scanning, the actual spatial boundary conditions around the reservoir intake and the inverted siphon inlet are obtained to form basic data, and a three-dimensional model of the intake is constructed based on the basic data.
3. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, A local three-dimensional flow field calculation model is constructed by combining the Reynolds-averaged Navier-Stokes equations and basic data, specifically as follows: Based on the aforementioned basic data, the Reynolds mean velocity vector, Reynolds mean pressure, water density, water kinematic viscosity, and mean velocity gradient are obtained. The turbulent eddy viscosity coefficient is set, and the gravitational acceleration vector is obtained. A local three-dimensional flow field calculation model is constructed by introducing the Reynolds-averaged Navier-Stokes equations and combining them with the Reynolds-averaged velocity vector, Reynolds-averaged pressure, water density, water kinematic viscosity, average velocity gradient, turbulent eddy viscosity coefficient, and gravitational acceleration vector. The local three-dimensional flow field calculation model is used to calculate and identify the average flow velocity distribution, backflow zone range, low velocity zone range, and main flow channel location of the water intake within a preset range.
4. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 3, characterized in that, The optimal dosing location for the tracer is determined based on the local three-dimensional flow field calculation model. Then, based on this optimal dosing location, an automatic dosing module is used to position and quantitatively add the tracer to the dosing tube. Specifically: After identifying the average velocity distribution, backflow zone range, low velocity zone range, and main flow channel location of the water intake within a preset range using the local three-dimensional flow field calculation model, the optimal dosing location of the tracer is determined. After determining the optimal dosing point, the automatic dosing module performs positioning and dosing. The automatic dosing module includes a storage tank, a stirrer, a metering pump, a flow meter, a retractable dosing pipe, an end positioning sensor, and an anti-clogging nozzle. After moving the end of the dosing tube to the optimal dosing position and stabilizing the state, start adding the tracer and track the actual quality of the added tracer.
5. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, Based on the aforementioned basic data, real-time monitoring of the outlet flow rate and tracer concentration is combined with tracer concentration data for intelligent cleaning, specifically: A flow meter and a tracer concentration sensor are installed at the water outlet to track the flow rate and tracer concentration at the water outlet in real time, collect the original tracer concentration signal, and calculate the concentration change rate of the original tracer concentration signal. A robust moving window method is used to identify the median in the sliding window, and the absolute deviation of the median is calculated. A threshold for the absolute deviation of the median is set. When the absolute deviation of the median is greater than the threshold, it is marked as a candidate peak outlier. If a candidate outlier lasts for only one to several sampling intervals and the overall trend of the data before and after is continuous, it is determined to be an instantaneous spike and replaced; if the concentration change shows a stable increase, a stable decrease, or a broad peak shape in multiple consecutive sampling points, it is determined to be a true concentration fluctuation and retained. For points identified as instantaneous spikes, linear interpolation, local polynomial interpolation, or neighborhood median replacement are used to obtain the cleaned concentration sequence.
6. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 5, characterized in that, The background baseline and net extracted concentration were estimated using an asymmetric least squares smoothing method, specifically as follows: The concentration sequence after cleaning is processed to obtain the cleaned concentration sequence, and the background baseline is estimated by asymmetric least squares smoothing on the cleaned concentration sequence. The asymmetric weights are iteratively updated based on the relationship between the concentration value after cleaning and the current baseline estimate until the baseline change is less than a set threshold or the maximum number of iterations is reached, thus obtaining the final background baseline. After obtaining the background baseline, the net tracer concentration is updated, and the updated net tracer concentration is subjected to non-negative constraint processing to obtain the net tracer concentration used for mass recovery integration.
7. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, The net concentration was fitted using the Gamma distribution function, and the long tail of the concentration was completed, specifically as follows: The net concentration process was fitted using the Gamma distribution function, and a differential algorithm was introduced to use the amplitude coefficient, tracer response start time, shape parameter, and scale parameter in the Gamma distribution function as the set of optimization parameters. Construct a fitting objective function, and the differential evolution algorithm searches for the parameter combination that minimizes the fitting objective function through population initialization, mutation, crossover and selection processes; The differential evolution algorithm is used to randomly generate multiple candidate parameter vectors within the parameter allowable range. Then, new parameter vectors are generated through differential mutation. These vectors are then cross-combined with the original parameter vectors. Finally, individuals with smaller objective function values are retained. This process is repeated until the maximum number of iterations or the error convergence condition is reached to obtain the optimal parameters. When the actual monitoring ends and the net concentration has not yet returned to the background, the optimal Gamma distribution curve is used to complete the long tail of the concentration after the end of the actual monitoring.
8. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, The actual mass of tracer recovered is calculated based on the effluent flow rate and the corrected net concentration. Obtain the effluent flow rate and the corresponding net concentration at the time, and calculate the tracer mass passing through the effluent section per unit time based on the effluent flow rate and the corresponding net concentration at the time. The measured corrected recovery mass is obtained by integrating the tracer mass passing through the effluent section per unit time over the entire monitoring period and the tail completion period. For discrete sampling data, the measured recovery mass after data quality control and long-tail completion can be calculated by numerical summation.
9. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, A leakage-free tracer transport mathematical model was established, and the recovery quality calculation was corrected using this model. Specifically: A mathematical model under no-leakage conditions is established based on the diffusion transport equation, and the tracer transport process from the dosing point to the effluent outlet is simulated using the mathematical model under no-leakage conditions; For projects with multiple cross-sections, variable cross-sections, bends, or complex inlet flow patterns, a three-dimensional convection-diffusion model is adopted. The model inputs include the dosing location, dosing mass, dosing duration, dosing liquid flow rate, pipeline geometric parameters, cross-sectional change parameters, effluent flow process, and monitoring window. The model outputs the theoretical effluent concentration process under leak-free conditions.
10. The water balance calculation method based on integrated measurement and input and quality recovery correction according to claim 1, characterized in that, The recovery mass calculation was corrected using a mathematical model of tracer transport without leakage, and the leakage rate, water intake, leakage volume, and water transfer efficiency were calculated, specifically as follows: The theoretical concentration process output by the leak-free model is multiplied by the effluent flow rate process and integrated to calculate the leak-free theoretical corrected recovery mass. Under the premise of synchronous migration of the conservative tracer and the water body, the corrected mass recovery rate and pipeline leakage rate are calculated. The corrected mass recovery rate represents the proportion of water recovered from the pipeline, and the unrecovered proportion is used as the pipeline leakage rate.