Farmland runoff rainfall responsive automatic precise sampling device and method
By monitoring rainfall, flow velocity, and conductivity data of farmland runoff in real time and dynamically adjusting the sampling frequency, the problem of synchronizing the sampling frequency with the rate of water quality change in farmland runoff monitoring was solved, achieving high-precision monitoring of pollutant migration and reducing operating costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-04-21
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies for monitoring farmland runoff, the sampling frequency is not synchronized with the rate of change in runoff water quality, resulting in monitoring results that deviate from the actual discharge process, failing to accurately depict the migration patterns of pollutants, and having problems such as redundant samples and omission of key feature points.
By acquiring real-time rainfall, runoff velocity, and conductivity data, the water quality gradient changes are calculated, and the sampling frequency is dynamically adjusted based on weighting coefficients. The sampling cycle is optimized by combining runoff acceleration characteristic data, thus achieving automatic and accurate sampling.
This improved the authenticity and completeness of monitoring data, reduced the number of sampling bottles used and the frequency of laboratory tests, and lowered the maintenance workload and operating costs of field monitoring stations.
Smart Images

Figure CN122192841A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural ecological environment monitoring and water quality sampling technology, specifically to an automatic and precise sampling device and method for farmland runoff and rainfall sensing. Background Technology
[0002] In the field of modern agricultural environmental monitoring and ecological protection, accurately depicting the migration patterns of farmland runoff with rainfall is a crucial prerequisite for assessing non-point source pollution loads and formulating control strategies. To achieve continuous monitoring without human intervention, the industry currently widely uses automated sampling equipment. Through preset time intervals or proportional flow triggering logic, water samples are collected from discharge outlets during rainfall, and then laboratory analysis is used to reconstruct the entire process of pollutant discharge.
[0003] However, to ensure that monitoring results accurately reflect the instantaneous flux of pollutants, the core prerequisite is that the sampling frequency must be highly synchronized with the rate of change in runoff water quality. In actual farmland irrigation and drainage environments, the generation and evolution of surface runoff are not simple linear processes, but are influenced by a complex interplay of multiple dynamic factors, including rainfall dynamics, surface erosion intensity, and complex underlying surface conditions. If the monitoring system operates based solely on a single fluid parameter or a static response step size, it becomes difficult to perceive the instantaneous differences in the contribution of rainfall energy to the degree of surface material erosion, especially when rainfall intensity and runoff processes fluctuate asynchronously. The inherent control mechanism cannot adaptively identify the high-energy phases of pollutant migration. This fundamental mismatch between the sampling frequency adjustment logic and the pollution evolution law leads to the omission of key characteristic points during periods of drastic water quality fluctuations, while generating a large number of meaningless redundant samples during periods of stable runoff. Consequently, the final fitted pollution characteristic curve deviates significantly from the actual discharge process. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides an automatic and precise sampling device and method for farmland runoff and rainfall sensing.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] An automatic and precise sampling method for farmland runoff rainfall sensing includes the following steps:
[0007] Acquire real-time rainfall data of the current environment, real-time runoff velocity data of farmland inlets, and real-time conductivity data of target water samples;
[0008] Real-time conductivity data at the start and end points within the preset observation window are extracted respectively, and water quality gradient change data are calculated based on the ratio of the conductivity difference between the two to the time difference.
[0009] Based on the preset basic weight coefficients, the real-time rainfall data and the real-time runoff velocity data are initially weighted and fused to calculate the initial hydrological scour intensity data. Based on the initial hydrological scour intensity data, the water quality gradient change data is initially corrected to generate the first water quality gradient correction data.
[0010] Based on the real-time runoff velocity data of the previous and current preset observation windows, runoff acceleration characteristic data are calculated, and the preset basic weight coefficients are adjusted based on the first water quality gradient correction data and the runoff acceleration characteristic data to obtain the corrected weight coefficients.
[0011] Based on the corrected weighting coefficients, the real-time rainfall data and real-time runoff velocity data are re-weighted and fused twice to generate target hydrological scour intensity data, and the water quality gradient change data are re-corrected to generate the final predicted water quality gradient corrected data.
[0012] The ratio of the pre-stored basic sampling interval time data to the predicted water quality gradient correction data is calculated to generate sampling period data, and control commands are generated based on the sampling period data and sent to the sampling execution mechanism.
[0013] An automatic precision sampling device for farmland runoff rainfall sensing includes:
[0014] The sensor assembly includes at least a rain sensor, a flow rate sensor, and a water quality probe.
[0015] A sampling actuator, which receives and executes control commands;
[0016] A control device is communicatively connected to a sensor assembly and a sampling actuator. The control device includes a processor and a memory storing a computer program. When the computer program is executed by the processor, it implements the steps of an automatic and precise sampling method for farmland runoff rainfall sensing.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0018] This invention corrects the fundamental weighting coefficients of rainfall and flow velocity by introducing runoff acceleration characteristic data. This design can effectively distinguish between rainfall-driven and confluence-driven runoff changes. When a sudden change occurs in runoff velocity (turbulent change), it can automatically balance the contribution rate of rainfall intensity and actual flow velocity, making the calculated target hydrological scour intensity more consistent with the actual physical process in farmland. It breaks through the traditional static sampling mode by introducing water quality gradient change data as the core driver. By extracting the rate of change of conductivity in real time, combined with the first water quality gradient correction and the final predictive correction, the sampling frequency can sensitively capture subtle fluctuations in water quality concentration. In the initial scour stage with severe pollution loads, it can automatically increase sampling density to ensure that no pollutant concentration peaks are missed, effectively improving the authenticity and completeness of monitoring data. Through intelligent sampling frequency adjustment, the sampling interval is automatically extended during periods of stable runoff, low pollutant concentration, and small gradient changes. While ensuring monitoring accuracy, it effectively reduces the number of sampling bottles used and the frequency of subsequent laboratory testing, effectively reducing the maintenance workload and operating costs of field monitoring stations. Attached Figure Description
[0019] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:
[0020] Figure 1 This is a diagram illustrating the method steps of the present invention;
[0021] Figure 2 This is a flowchart of the present invention;
[0022] Figure 3 This is a schematic diagram of the device of the present invention. Detailed Implementation
[0023] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0024] Application Overview:
[0025] In the field of farmland non-point source pollution monitoring and ecological assessment, accurately capturing pollutant concentration fluctuations during rainfall and runoff processes is a core indicator for measuring monitoring quality. This high-precision sampling is essentially a dynamic adaptive process of sampling frequency to hydrological scouring energy at the physical level. Specifically, by sensing the nonlinear changes in rainfall intensity and runoff velocity in real time, the evolution of environmental kinetic energy is precisely translated into adjustment instructions for the sampling step size, thereby leaving representative pollutant migration trajectories in the sampling sequence.
[0026] However, existing technologies lack a verification mechanism to ensure the consistency between the input scouring energy and the output sampling frequency, resulting in an inability to accurately identify response lag and sensitivity drift issues in complex farmland habitats. Response lag manifests as the system detecting an increase in flow velocity, but due to the lack of dynamic identification of runoff acceleration, the frequency densification action lags significantly behind the peak abrupt change in pollutant concentration. Sensitivity drift manifests as the system encountering different slopes or background noise interference, resulting in invalid jumps in the sampling step size at critical points due to the lack of dynamic threshold generation logic. Consequently, a strict physical correspondence cannot be established between fluctuations in environmental factors and the execution of sampling actions, leading to misjudgments or ambiguous responses to water quality evolution trends, thus affecting the accuracy of pollutant flux estimation and the scientific rigor of environmental assessments.
[0027] For example, in the process of runoff monitoring in typical hilly farmland, when high-intensity instantaneous rainfall occurs, traditional monitoring systems can only record the cumulative changes in flow rate through conventional flow velocity triggering, but cannot distinguish whether it is accompanied by a sudden change in runoff acceleration induced by surface slope. Furthermore, when the sensor is disturbed by debris and causes background fluctuations, the system only records the numerical jumps in flow velocity data, failing to monitor the true contribution of actual rainfall intensity to the scour driving force and the imbalance of sampling weights. Specifically, the system may misjudge environmental noise as a sudden change in turbulence and frequently trigger invalid sampling, or misclassify the initial scour stage with high pollution load as steady runoff. As a result, the sampled samples cannot truly restore the concentration peak at the beginning of rainfall, making it difficult to form a pollution distribution curve that conforms to the physical process of soil and water loss.
[0028] If the above problems are not addressed, the sampling system will continue to lose its ability to objectively determine the state of runoff pollution. Specifically, unrecognized response lag will cause sampling points to deviate significantly from the spatiotemporal distribution patterns of pollutant concentrations, leading to an underestimation of non-source pollution load. Simultaneously, uncorrected sensitivity drift will cause severe internal consumption of sampling resources, making it impossible for limited sample bottles to cover the entire rainfall cycle, ultimately causing the monitoring data to lose its representativeness. Therefore, inaccurate sampling logic will systematically hinder in-depth analysis of farmland pollutant migration mechanisms, affecting the achievement of agricultural ecological governance goals.
[0029] like Figures 1-3As shown, an automatic and precise sampling method for farmland runoff rainfall sensing includes the following steps:
[0030] Step 1: Acquire real-time rainfall data, real-time runoff velocity data at the farmland inlet, and real-time conductivity data of the target water sample. The system first acquires real-time environmental data through sensing components deployed in the farmland monitoring area. Real-time rainfall data is collected using a tipping bucket rain gauge or radar rain sensor; real-time runoff velocity data is collected using an ultrasonic Doppler current meter deployed at the flow cross-section of the farmland inlet; and real-time conductivity data of the target water sample is collected using a water quality probe. The control equipment performs timestamp alignment processing on the signals uploaded by each sensor to ensure spatiotemporal consistency of rainfall, velocity, and conductivity under the same time series index, and stores this data in a real-time buffer for subsequent calculations.
[0031] Step 2: Extract real-time conductivity data at the beginning and end of the preset observation window, and calculate water quality gradient change data based on the ratio of the conductivity difference to the time difference. Retrieve the conductivity sequence within the preset observation window from the buffer. Extract real-time conductivity data at the beginning and end of the observation window. By calculating the ratio of the difference between the two to the time span of the observation window, water quality gradient change data reflecting the intensity of dynamic fluctuations in water quality is generated. This indicator quantitatively characterizes the rate of change of pollutant concentration per unit time.
[0032] Step 3: Based on preset basic weighting coefficients, real-time rainfall data and real-time runoff velocity data are initially weighted and fused to calculate initial hydrological scour intensity data. Based on this initial hydrological scour intensity data, the water quality gradient change data is initially corrected to generate the first water quality gradient correction data. To incorporate the influence of hydrodynamics on pollution transport, preset basic weighting coefficients (rainfall and velocity basic weighting coefficients) are first used to initially linearly weight and fuse real-time rainfall data and real-time runoff velocity data to calculate initial hydrological scour intensity data. Then, the ratio of the initial hydrological scour intensity data to the preset standard scour intensity benchmark data is calculated to generate dimensionless scour driving factor data. The scour driving factor data is input into a preset continuous gain mapping function to calculate the initial compensation coefficients. Finally, the water quality gradient change data obtained in Step 2 is multiplied to generate the first water quality gradient correction data. This achieves initial sensitivity enhancement of water quality signals under physical scour background.
[0033] Step 4: Calculate runoff acceleration characteristic data based on real-time runoff velocity data from the previous and current preset observation windows. Adjust the preset base weight coefficients based on the first water quality gradient correction data and the runoff acceleration characteristic data to obtain corrected weight coefficients. Optimize the control logic by identifying the changing trend of runoff kinetic energy. The control device calculates the average velocity data within the previous and current preset observation windows respectively, and calculates the runoff acceleration characteristic data by combining the time step between the two windows. The runoff acceleration characteristic data is compared with the turbulent change threshold. If the runoff is determined to be in a state of severe acceleration and the first water quality gradient correction data is positive, a corrected weight coefficient vector is generated by increasing the velocity base weight coefficient and proportionally decreasing the rainfall base weight coefficient. If the first water quality gradient correction data is negative, the weights are adjusted in the opposite direction. If the runoff state is stable, the base weights are maintained. This mechanism can accurately sense the difference in the contribution rate of surface scour energy at different stages.
[0034] Step 5: Based on the corrected weighting coefficients, the real-time rainfall data and real-time runoff velocity data are re-weighted and fused a second time to generate target hydrological scour intensity data. The water quality gradient change data is then re-corrected to generate the final predicted water quality gradient correction data. Based on the corrected weighting coefficients obtained in Step 4, the real-time rainfall data and real-time runoff velocity data are re-weighted and fused a second time to generate more physically representative target hydrological scour intensity data. The target compensation coefficient is recalculated using this intensity, and the original water quality gradient change data is calibrated a second time to finally generate predicted water quality gradient correction data. This data integrates water quality evolution trends and hydrodynamic abrupt change characteristics, and can proactively reflect the sampling needs of the next stage.
[0035] Step Six: Calculate the ratio of the pre-stored basic sampling interval time data to the predicted water quality gradient correction data to generate sampling cycle data. Based on the sampling cycle data, generate control commands and send them to the sampling actuator. Calculate the absolute value of the pre-stored basic sampling interval time data to the predicted water quality gradient correction data to generate real-time sampling cycle data. The control device starts timing accumulation based on the sampling cycle data. When the timing variable reaches the sampling cycle value, it generates control commands containing physical action parameters (such as pumping duration and frequency) and sends them to the sampling actuator. After completing the sampling action, the actuator feeds back a signal to the control device and resets the timing variable to zero, thus entering the next cycle, ensuring that the sampling frequency is always highly synchronized with the pollution evolution process of farmland runoff.
[0036] Example 1: Runoff monitoring in vegetable growing areas of hilly regions, initial parameters and environmental settings:
[0037] Monitoring location: slope is The confluence of vegetable growing areas;
[0038] Basic sampling interval: set to 600s (i.e., once every 10 minutes during the stable period);
[0039] Basic weighting: Rainfall weighting Flow rate weight ;
[0040] Observation window: set to 60 seconds;
[0041] Standard erosion strength benchmark: set to 1.0;
[0042] Overflow prevention limit: set to 5.0, curvature smoothing constant. .
[0043] Scene: Initial stage of rainfall (minute 0 to minute 2):
[0044] Step 1: Real-time data acquisition (based on the data collected in the first step) (For example, time)
[0045] 120 seconds after the start of rainfall, the sensor measured:
[0046] Real-time rainfall ;
[0047] Real-time runoff velocity ;
[0048] Real-time conductivity .
[0049] Step 2: Extract the water quality gradient:
[0050] Extract conductivity in the first 60 seconds (starting point) ;
[0051] ;
[0052] Water quality gradient .
[0053] Step 3: Initial Correction Calculation:
[0054] Initial scour intensity ;
[0055] Flushing driving factors ;
[0056] Initial compensation coefficient ;
[0057] First water quality gradient correction data .
[0058] Step 4: Dynamic Weight Adjustment (Key Action):
[0059] The average flow velocity monitored in the previous window (0-60s) was The average flow rate during the current window (60-120s) is ;
[0060] Runoff acceleration ;
[0061] Assuming the current torrent mutation threshold .because and This triggers an increase in flow rate weight;
[0062] Adjusted weights: ; .
[0063] Step 5: Secondary weighting and predictive generation:
[0064] Target hydrological scour intensity ;
[0065] Target scour driving factor ;
[0066] Calculate the target compensation coefficient (Assume the result calculated from the function is 0.94);
[0067] Final predictive correction data .
[0068] Step 6: Generate sampling period and execute:
[0069] Sampling period ;
[0070] Action executed: The original 600-second sampling interval is shortened to 255 seconds. The control equipment sends a command to the sampling mechanism: when the timer reaches 255 seconds, start the vacuum pump to pump water for 15 seconds and inject the sample into sampling bottle No. 2.
[0071] At the 2-minute mark, a rapid increase in flow velocity (significant acceleration) was detected. Even though the absolute value of conductivity had not yet reached the pollution warning threshold, the increased scouring energy was anticipated by modifying the weights, thus allowing for a preemptive increase in the sampling frequency. The increase in sampling frequency takes into greater consideration the dynamic indicator of flow velocity, because in sloping farmland, flow velocity is more decisive for the transport of sediment and attached phosphorus than rainfall depth alone. Compared to the traditional sampling every 10 minutes, this example more than doubles the sampling frequency during the initial flushing phase when pollution emissions are most intense, ensuring the capture of the complete pollution peak curve.
[0072] The core innovation of this application lies in introducing runoff acceleration characteristic data to correct the basic weighting coefficients of rainfall and flow velocity. This design can effectively distinguish between rainfall-driven and confluence-driven runoff changes. When a sudden change occurs in runoff velocity (turbulent change), it can automatically balance the contribution rate of rainfall intensity and actual flow velocity, making the calculated target hydrological scour intensity more consistent with the actual physical process in farmland. It breaks through the traditional static sampling mode by introducing water quality gradient change data as the core driver. By extracting the rate of change of conductivity in real time, combined with the first water quality gradient correction and the final predictive correction, the sampling frequency can sensitively capture subtle fluctuations in water quality concentration. In the initial scour stage with severe pollution load, it can automatically increase sampling density to ensure that no pollutant concentration peaks are missed, effectively improving the authenticity and completeness of monitoring data. Through intelligent sampling frequency adjustment, the sampling interval is automatically extended during periods of stable runoff, low pollutant concentration, and small gradient changes. While ensuring monitoring accuracy, it effectively reduces the number of sampling bottles used and the frequency of subsequent laboratory testing, effectively reducing the maintenance workload and operating costs of field monitoring stations.
[0073] In farmland runoff monitoring, rainfall (as an external triggering factor), flow velocity (as a hydrodynamic transmission factor), and conductivity (as a water quality response factor) exhibit complex nonlinear coupling relationships over time. Traditional sampling methods often focus on only a single indicator, or, due to inconsistent sampling step sizes for different parameters, the system cannot accurately identify the dynamic response process in the chain from rainfall to runoff to pollution transport, easily leading to sampling timing lagging behind pollution peaks. Therefore, this paper proposes acquiring real-time rainfall data, real-time runoff velocity data from farmland inlets, and real-time conductivity data of target water samples, as detailed below:
[0074] Among them: real-time rainfall data: refers to the precipitation depth value per unit time measured by rain gauge equipment during the current monitoring period, which is used to characterize the external driving force of rainfall on farmland runoff.
[0075] Real-time runoff velocity data refers to the physical speed of water flow passing through a specific cross-section per unit time at the inlet of a farmland runoff area, measured by a velocity sensing device. It is used to characterize the transport efficiency of surface runoff.
[0076] Real-time conductivity data refers to the electrical conductivity value of a target water sample measured by a conductivity probe. In farmland runoff monitoring, conductivity is correlated with the concentration of dissolved ions in water and is often used as an indicative parameter reflecting water quality fluctuations.
[0077] Step 1: Install multi-parameter monitoring terminals at the inlet area of the target farmland. Deploy tipping bucket rain gauges or radar rain sensors in an area with an open view and no obstructions to obtain rainfall intensity. Install an ultrasonic Doppler current meter at the inlet's flow cross-section, ensuring the sensor probe is fixed in a stable water flow area to guarantee the representativeness of the measured flow velocity. Place a conductivity sensor in the center of the flow channel, equipped with a self-cleaning device, to prevent siltation or biofouling from affecting the accuracy of real-time conductivity values.
[0078] Step 2: The central processing unit of the control device polls and collects the electrical signals emitted by each sensor according to a preset sampling frequency (e.g., once every 60 seconds): the rain gauge outputs pulse signals, and the processor calculates the total number of pulses per unit time and converts them into rainfall data. The flow meter outputs flow velocity values via RS485 or analog signals, which are then converted from analog to digital to obtain real-time runoff velocity data. The conductivity probe outputs a current signal, which is then converted into real-time conductivity data. During this process, the processor establishes a unified timestamp mapping to ensure that rainfall, flow velocity, and conductivity data collected at the same time are perfectly aligned on the timeline.
[0079] Step 3: The processor performs outlier removal on the collected raw data:
[0080] If the instantaneous data exceeds the sensor's physical range or experiences a step jump, mean interpolation is used for smoothing, as shown in the following formula:
[0081] ;
[0082] in: : Indicates the current time The effective output data after filtering (representing the final adopted value of rainfall, flow velocity, or conductivity);
[0083] : Indicates that the sensor is in The raw digital signals collected at all times;
[0084] : Indicates the preset number of sampling points for the sliding window (i.e., how many consecutive historical data points to take for averaging).
[0085] It should be noted that when the processor performs outlier removal on the collected raw data, it determines the outlier by calculating the deviation of the current sampled value from the mean of the sliding window:
[0086] If satisfied If it is a step-like abnormal jump, it is determined to be a step-like abnormal jump, thus distinguishing between instantaneous induced noise (step jump) and real physical abrupt changes in the early stage of rainfall (continuous trend increase).
[0087] in, The anomaly detection coefficient has a value range of [3,5].
[0088] This represents the standard deviation of the data within the sliding window.
[0089] The processed data sequence is temporarily stored in the real-time buffer of the memory, forming a triplet data set. .
[0090] in: : Indicates the index of the currently collected time series data;
[0091] : indicates the first Real-time rainfall data at any given moment;
[0092] : indicates the first Real-time runoff velocity data at any given moment;
[0093] : indicates the first Real-time conductivity data at any given moment.
[0094] Example 2: Based on Example 1, obtain the result at the 120th second (i.e., the...) The processor collects raw pulses and electrical signals from sensors at multiple acquisition nodes. It then performs outlier removal on the raw data to obtain the current data set.
[0095] Real-time rainfall data ;
[0096] Real-time runoff velocity data ;
[0097] Real-time conductivity data .
[0098] The aforementioned technology integrates rainfall, flow velocity, and conductivity sensors synchronously at key runoff sections in farmland, and utilizes control equipment to achieve parallel acquisition and timestamp alignment of multi-source data. This constructs a synchronous monitoring system of "power source-process quantity-response value," providing fundamental data support for subsequent correction calculations based on water quality gradients and ensuring the consistency of environmental dynamic data and water quality response data in the spatiotemporal dimensions. By acquiring rainfall and flow velocity data in real time, environmental changes can be perceived, while the synchronously acquired conductivity data provides direct feedback on water quality fluctuations. This provides accurate data input for dynamically adjusting sampling weights based on hydrological scour intensity, effectively improving the perception accuracy of sudden runoff pollution processes.
[0099] In agricultural runoff monitoring, a single moment's conductivity value is insufficient to determine whether a pollution process is in its rising, peak, or declining phase. Sampling based solely on numerical thresholds may lead to excessive duplicate sampling during periods of high but stabilizing concentrations, while insufficient sampling is conducted during periods of low but rapidly increasing concentrations (i.e., the outbreak point of pollutant migration), resulting in a mismatch between monitoring frequency and pollution transport patterns. Therefore, this paper proposes extracting real-time conductivity data at the beginning and end of a preset observation window, and calculating water quality gradient change data based on the ratio of the conductivity difference to the time difference, as detailed below:
[0100] Among them: Preset observation window: refers to a fixed time interval set within the system, used to extract a specific segment from the continuous data stream in order to perform quantitative analysis on the parameter evolution trend within that segment.
[0101] Water quality gradient change data: refers to the rate of change of water quality characteristic parameters (i.e., conductivity) over time, characterizing the severity of water quality fluctuations per unit time.
[0102] Start / End: refers to the time corresponding to the earliest acquired data point and the time corresponding to the most recently acquired data point on the timeline within a preset observation window.
[0103] Step 1: The control device extracts the current time node and a data segment that goes back a preset duration from the real-time buffer. This duration is the preset observation window. Determine the start time of the observation window. and end time Extract the corresponding values from the data triple sequence. Real-time conductivity data recorded at all times ,as well as Real-time conductivity data recorded at all times .
[0104] Step 2: The processor performs a subtraction operation on the extracted endpoint data to quantify the absolute deviation of water quality within that time period. Calculate the conductivity difference:
[0105] ;
[0106] in: : Indicates the difference in conductivity within the preset observation window;
[0107] : Represents the real-time conductivity data at the end of the observation window, i.e., the current [number]th [time]. Moment ;
[0108] : Represents the real-time conductivity data at the beginning of the observation window, i.e., the first... Moment data.
[0109] Confirmation of time difference: ;
[0110] : Indicates the time span of the preset observation window, the value of which is determined by the system's preset parameters.
[0111] Step 3: The processor uses the difference ratio algorithm to calculate the rate of change of conductivity, generating water quality gradient change data describing the dynamic characteristics of water quality. The calculation formula is as follows:
[0112] ;
[0113] generated Positive values indicate that conductivity is increasing, while negative values indicate that conductivity is decreasing. The magnitude of the absolute value reflects the rate of change in water quality.
[0114] Example 3: Following the example of vegetable growing areas in hilly regions mentioned earlier, given the data collected at 120 seconds, the specific calculations are as follows:
[0115] Step 1: Extract endpoint data:
[0116] End time ( ): 120s;
[0117] Terminal conductivity ( ): It is known that ;
[0118] Preset observation window ( The system is set to 60 seconds.
[0119] Start time ( ): ;
[0120] Initial conductivity ( ): Retrieve data from the buffer at time 60s (set to) ).
[0121] Step 2: Calculate the conductivity difference ( ):
[0122] ;
[0123] This indicates that the conductivity of the runoff water sample increased over the past minute. .
[0124] Step 3: Calculate water quality gradient change data ( ):
[0125] ;
[0126] in: This refers to the water quality gradient generated at the current node, representing the conductivity changing by a rate per second. The speed increases by one unit. This calculation result will be used as input to step three for initial weighted correction.
[0127] In the aforementioned technology, by introducing a preset observation window, a first-order derivative model (i.e., water quality gradient calculation) is constructed using data from the starting and ending points, transforming static concentration data into dynamic rate-of-change data. By calculating the ratio of conductivity difference to time difference, the evolution trend of water sample conductivity characteristics over time is quantitatively described, thereby enabling the identification of the severity of water quality fluctuations. Through water quality gradient change data, transient characteristics in the pollutant discharge process can be identified, providing a precise rate indicator for differentiated compensation of sampling step size in subsequent steps. This allows for automatic adjustment of response sensitivity based on the rate of pollutant change, improving the accuracy of characterizing sudden pollution processes in agricultural runoff.
[0128] Because changes in pollutant concentrations in farmland runoff are directly driven by rainfall intensity and runoff velocity, relying solely on the rate of change of conductivity (i.e., water quality gradient) to determine the sampling frequency can easily overlook the role of physical energy in pollutant transport. For example, in the initial stage of heavy rainfall before the flow velocity has fully dissipated, the water quality gradient may not yet show a dramatic change, but the potential scour energy indicates a rapid increase in subsequent pollution emissions. If these hydrodynamic parameters are not incorporated into the model, it will be difficult to control the timing of sampling in advance. Therefore, this paper proposes an initial weighted fusion of real-time rainfall data and real-time runoff velocity data based on preset baseline weighting coefficients to calculate initial hydrological scour intensity data. Based on this initial hydrological scour intensity data, the water quality gradient change data is then initially corrected to generate the first corrected water quality gradient data, as detailed below:
[0129] The water quality gradient change data are initially corrected based on the initial hydrological scour intensity data to generate the first water quality gradient correction data, including:
[0130] Obtain the system's preset standard scour strength benchmark data;
[0131] Calculate the ratio of the initial hydrological scour intensity data to the standard scour intensity baseline data to generate dimensionless scour driving factor data;
[0132] The scour driving factor data is input into a preset continuous gain mapping function to calculate and generate the initial compensation coefficient.
[0133] Continuous gain mapping function: refers to a nonlinear mathematical model used to convert the linear growth of physical dynamics into a compensation coefficient for the sampling frequency, in order to prevent the sampling frequency from jumping beyond the limit under extreme operating conditions.
[0134] The water quality gradient change data is multiplied with the initial compensation coefficient to generate the first water quality gradient correction data.
[0135] Among them: Basic weight coefficient: refers to the pre-set proportional value of rainfall and runoff velocity in the hydrological scouring process, which is used to measure the respective contributions of rainfall and runoff velocity. It includes the basic weight coefficient of rainfall and the basic weight coefficient of runoff velocity.
[0136] Standard scour intensity reference data: refers to a reference physical quantity set internally by the system, used to convert the actual observed scour intensity into a dimensionless multiple relationship.
[0137] Initial hydrological scour intensity data: refers to a physical quantity obtained by linearly weighting rainfall and flow velocity, used to characterize the ability of hydrodynamics to physically transport and scour pollutants on farmland surfaces under the current environment.
[0138] First water quality gradient correction data: refers to the data obtained by calculating the water quality gradient change data with the gain coefficient converted from the scour intensity, and is a representation of the water quality change rate after taking into account the physical scour background.
[0139] Step 1: The control device retrieves the pre-stored basic weighting coefficients from the memory and performs a fusion calculation using the currently collected real-time rainfall data and real-time runoff velocity data. The calculation formula is as follows:
[0140] ;
[0141] in, : Represents initial hydrological scour intensity data;
[0142] : Indicates the preset basic weighting coefficient for rainfall;
[0143] : indicates the first Real-time rainfall data at any given moment;
[0144] : Represents the preset basic weighting coefficient for flow rate;
[0145] : indicates the first Real-time runoff velocity data at any given moment.
[0146] Step 2: To convert the physical scour intensity into a coefficient that can be used to correct the water quality gradient, the processor first calculates the ratio of the scour intensity to the standard reference value to obtain a dimensionless factor, and then calculates the initial compensation coefficient through a gain mapping function. The calculation process is as follows:
[0147] First, calculate the scour driving factor data. :
[0148] ;
[0149] in: : Indicates the system's preset standard scouring strength benchmark data.
[0150] Then Input the continuous gain mapping function and calculate the initial compensation coefficient. The specific formula for the continuous gain mapping function is:
[0151] ;
[0152] : Calculate the initial compensation coefficients for the output;
[0153] : The flushing driving factor data represents the strength of the current environmental kinetic energy relative to the standard operating conditions;
[0154] The preset overflow limit threshold is used to limit excessive gain. It refers to the maximum theoretical value that the compensation coefficient is allowed to reach. It is used to protect the sampling system from shortening the sampling period below the hardware execution limit due to excessively large calculated values. It is limited by the minimum operating cycle of the sampling pump and the bottle number switching speed. The value range is as follows: ;
[0155] The curvature smoothing adjustment constant is used to control the smoothness of coefficient changes. It refers to the parameter used to adjust the slope of the gain mapping function curve, determining the sensitivity of the compensation coefficient to changes in scour intensity. Its value range is... .
[0156] Step 3: The processor multiplies the water quality gradient change data with the initial compensation coefficient. The calculation formula is as follows:
[0157] ;
[0158] in, : Indicates the first water quality gradient correction data.
[0159] Example 4: Following the previous example of vegetable planting areas in hilly regions, it is known that at the 120th second... , , .
[0160] Step 1: Initial Weighted Fusion
[0161] A base weight is usually set. , :
[0162] .
[0163] Step 2: Calculate the scour driving factor:
[0164] Set standard reference value :
[0165] .
[0166] Step 3: Calculate the initial compensation coefficient ( ):
[0167] An overflow prevention limit is usually set. Smoothing constant :
[0168] ;
[0169] Since the current scouring intensity is exactly equal to the reference value, the compensation coefficient is 1.0, and no gradient gain or loss is applied.
[0170] Step 4: Generate the first water quality gradient correction data ( ):
[0171] .
[0172] In the aforementioned technology, weighted fusion couples the two core dynamic factors of rainfall and flow velocity into a unified initial hydrological scour intensity. Furthermore, a continuous gain mapping function transforms the physical intensity into a quantified initial compensation coefficient, which is then applied to the water quality gradient. This expands the simple water quality monitoring signal into a composite signal regulated by dynamic parameters, achieving preliminary calibration of water quality information from hydrological data. By introducing the initial compensation coefficient, the water quality gradient can be automatically adjusted up or down based on the current intensity of hydrological scour. This means that even when water conductivity changes are not significant during periods of high scour energy, adjustments will be made to improve the gradient. The numerical values enable the sampling logic to be more forward-looking, effectively reducing sampling errors caused by relying solely on sensor hysteresis responses under complex hydrological conditions.
[0173] In the evolution of farmland runoff, the contributions of rainfall intensity and runoff velocity to pollutant migration are dynamically changing. In the initial stage of rainfall, surface runoff accelerates rapidly, and the increased velocity dominates the stripping of pollutants from the soil surface. However, in the middle and later stages of rainfall or during periods of stable runoff, the contribution of velocity is relatively stable. Traditional fixed-weight schemes cannot identify abrupt changes in runoff motion, leading to inaccuracies in the calculation of hydrological scour intensity when velocity fluctuates drastically, as the results do not accurately reflect changes in physical scour energy levels, thus causing inaccuracies in the sampling frequency adjustment logic. Therefore, this paper proposes calculating runoff acceleration characteristic data based on real-time runoff velocity data from the previous and current preset observation windows. The preset base weight coefficients are then adjusted based on the first water quality gradient correction data and the runoff acceleration characteristic data to obtain the corrected weight coefficients, as detailed below:
[0174] Runoff acceleration characteristic data are calculated based on real-time runoff velocity data from the previous and current preset observation windows, including:
[0175] Calculate the average flow velocity data within the previous preset observation window and the current preset observation window, respectively;
[0176] Calculate the flow velocity difference between the average flow velocity data in the current preset observation window and the average flow velocity data in the previous preset observation window;
[0177] Extract the time step data between the current preset observation window and the previous preset observation window;
[0178] The ratio of the velocity difference data to the time step data is calculated to obtain the runoff acceleration characteristic data.
[0179] Based on the first water quality gradient correction data and runoff acceleration characteristic data, the preset basic weight coefficients are corrected and adjusted to obtain the corrected weight coefficients, including:
[0180] The basic weighting coefficients include the basic weighting coefficients for velocity and rainfall, which correspond to real-time runoff velocity data and real-time rainfall data, respectively.
[0181] Determine whether the runoff acceleration characteristic data is greater than the preset abrupt change benchmark threshold and whether the first water quality gradient correction data is positive;
[0182] If the runoff acceleration characteristic data is determined to be greater than the preset turbulent change threshold and the first water quality gradient correction data is positive, then the flow velocity basic weight coefficient is increased by the first preset step size and the rainfall basic weight coefficient is decreased proportionally to generate the correction weight coefficient.
[0183] If the runoff acceleration characteristic data is determined to be greater than the turbulent change threshold and the first water quality gradient correction data is less than or equal to zero, then the flow velocity basic weight coefficient is reduced by the second preset step size and the rainfall basic weight coefficient is increased proportionally to generate the correction weight coefficient.
[0184] If the runoff acceleration characteristic data is determined to be less than or equal to the turbulent change threshold, then the preset basic weight coefficient is directly used as the correction weight coefficient.
[0185] Among them: runoff acceleration characteristic data: refers to the rate of change of real-time runoff velocity over time between two adjacent observation windows, used to quantify the intensity of runoff kinetic energy change and the degree of abrupt change in runoff state.
[0186] Previous preset observation window: refers to the time interval with the same fixed duration that is immediately preceding the current observation window in the time series.
[0187] Average flow velocity data: refers to the value obtained by arithmetically averaging all real-time flow velocity values within a specific preset observation window.
[0188] Flow velocity difference data: refers to the mathematical difference between the average flow velocity of the current preset observation window and the average flow velocity of the previous preset observation window.
[0189] Time step data: refers to the time interval between the center points of two adjacent preset observation windows, or the time span between the starting points of two windows.
[0190] First preset step size / Second preset step size: refers to the fixed increment or decrement value preset by the system to adjust the weight allocation ratio.
[0191] Corrected weighting coefficient: refers to the coefficient obtained by dynamically adjusting the initial basic weighting coefficients of rainfall and flow velocity based on the dynamic characteristics of runoff movement.
[0192] Torrent change threshold: refers to a critical value dynamically generated by the system based on historical flow velocity variance and terrain slope, used to determine whether the current runoff has undergone a change in nature sufficient to affect the sampling weight.
[0193] Step 1: The control device retrieves the average flow velocity data within the current preset observation window from the memory. and the average flow velocity data within the previous preset observation window The formula for calculating runoff acceleration characteristic data is as follows:
[0194] ;
[0195] : Represents the generated runoff acceleration characteristic data;
[0196] : Represents the average flow velocity data within the current preset observation window;
[0197] : Represents the average flow velocity data within the previous preset observation window;
[0198] : Represents the time step data between two observation windows.
[0199] Step 2: The processor processes the calculated runoff acceleration characteristic data. With the threshold of sudden change in torrent Comparison was performed, and the first water quality gradient correction data was extracted simultaneously. The positive and negative attributes.
[0200] Judgment condition one: This indicates that the current runoff is in a state of rapid acceleration.
[0201] Judgment condition two: The water conductivity, after considering the background scouring, shows an upward trend.
[0202] Step 3: Based on the above determination results, the processor executes different weight adjustment logic:
[0203] If the judgment and Then execute the first preset step size. Adjustment:
[0204] ;
[0205] ;
[0206] Enhance the sensing of hydrodynamic scouring by increasing the velocity weight.
[0207] If the judgment and Then execute the second preset step size. Adjustment:
[0208] ;
[0209] ;
[0210] By increasing the weight of rainfall, the sensitivity to rainfall dilution or delayed scouring effects can be enhanced.
[0211] If the judgment Then the original base weights are maintained:
[0212] ;
[0213] ;
[0214] in: : Represents the corrected flow velocity weighting coefficient;
[0215] : Indicates the corrected rainfall weighting coefficient;
[0216] : Represents the preset basic weighting coefficient for flow rate;
[0217] : Indicates the preset basic weighting coefficient for rainfall;
[0218] / : Indicates the system's preset weight adjustment step size, with a range of values of 100%. .
[0219] When performing weight adjustment, the following physical constraints must be followed:
[0220] Normalization constraint: always maintain .
[0221] Boundary protection: Upper limit of flow velocity weight and lower limit If the calculated Then let Correspondingly This prevents the rainfall factor from being completely ignored during extreme turbulence, thus ensuring the stability of the composite power source monitoring.
[0222] Step 4: The processor will generate and The combined vectors are used to correct the weight coefficients and then output to the next step.
[0223] Example 5: Following the previous example, the system performs weight correction adjustment at 120s:
[0224] Step 1: Calculate runoff acceleration ( ):
[0225] Current window (60-120s): Average flow rate ;
[0226] Previous window (0-60s): Average flow rate (System history);
[0227] Time step ( The two windows start at a time 60 seconds apart.
[0228] .
[0229] Step 2: Torrent mutation threshold ( Assume the threshold currently generated by the system is: ;
[0230] Judgment result: This triggers the correction logic;
[0231] First water quality gradient correction data ( (The calculations in the preceding text are known.) .
[0232] Step 3: Weight Adjustment Calculation:
[0233] The base weights are usually set to , Preset step size ;
[0234] Adjust flow rate weights: ;
[0235] Adjusting rainfall weights: .
[0236] In the aforementioned technology, a dynamic variable, runoff acceleration characteristic data, is introduced by calculating the ratio of the velocity difference between adjacent windows to the time step. By comparing the acceleration with a dynamically generated turbulent transition threshold and incorporating positive and negative feedback from the first water quality gradient correction data, a weighted feedback adjustment mechanism is established. This enables real-time differential adjustment of the weighting coefficients, thereby improving the system's sensitivity to changes in runoff dynamics. By introducing the acceleration variable, the critical point at which runoff transitions from static / stable to turbulent / mutually abrupt changes can be identified. The dynamic correction of the weighting coefficients ensures that the subsequently generated target hydrological scour intensity more closely reflects the actual physical transport process of farmland runoff, guaranteeing more targeted gain compensation at runoff abrupt changes and enhancing the adaptive adjustment capability of the sampling logic in complex hydrological contexts.
[0237] Due to the significant differences in topography and water flow background across different farmlands, small changes in flow velocity in plains farmlands may indicate the onset of erosion; while on steep mountain slopes, dramatic fluctuations in flow velocity may be due to natural turbulence caused by the terrain. Using a uniform, fixed threshold would lead to sluggish system response in plains areas or frequent false triggers in mountains, severely impacting the accuracy of the sampling logic. Therefore, a dynamically generated turbulence change threshold is proposed, including:
[0238] Acquire multiple sets of historical runoff velocity data within a preset environmental assessment period;
[0239] Calculate the distribution variance of multiple sets of historical runoff velocity data to obtain background velocity fluctuation characteristic data;
[0240] Obtain static terrain slope data of the target farmland, and input the static terrain slope data and background flow velocity fluctuation characteristic data into a preset threshold generation function to calculate and generate a mutation benchmark threshold.
[0241] Among them: Environmental assessment cycle: refers to the time span that the system pre-sets for statistical analysis of background hydraulic characteristics, usually selecting a stable period before or at the beginning of rainfall.
[0242] Background flow velocity fluctuation characteristic data: refers to the numerical values obtained by calculating the variance of historical flow velocity sequences, used to quantify the natural hydraulic noise or inherent stability of the flow field at a specific monitoring section.
[0243] Static terrain slope data: refers to the angle between the ground and the horizontal plane in the runoff area of the target farmland, which is a core geographical parameter that determines the contribution of gravity to runoff acceleration.
[0244] Threshold generation function: refers to a mathematical model that nonlinearly couples environmental noise characteristics with geographical slope characteristics, and is used to customize the abrupt change sensitivity for monitoring stations in different geographical environments.
[0245] Basic safety threshold constant: refers to the minimum trigger threshold that the system presets and must maintain in an ideal plain environment (zero slope and no background noise).
[0246] Noise penalty coefficient: This refers to the coefficient used to adjust the impact of background fluctuations on the threshold. The higher the value, the stronger the system's ability to resist environmental noise.
[0247] Slope sensitivity coefficient: This refers to the coefficient used to adjust the degree of threshold reduction caused by terrain. The higher the value, the more sensitive the system is to changes in runoff in steep slope environments.
[0248] Step 1: The control device retrieves multiple sets of historical runoff velocity data within a preset environmental assessment period from the memory. This sequence reflects the baseline water flow conditions at the current monitoring point when it is not significantly affected by rainfall.
[0249] Step 2: The processor performs distribution variance calculation on the extracted historical flow velocity sequence to quantify the pulsation characteristics of the water flow. The calculation formula is as follows:
[0250] ;
[0251] in: : Generated background flow velocity fluctuation characteristic data;
[0252] The total number of samples in historical data;
[0253] The first in the historical flow velocity sequence One data point;
[0254] : The arithmetic mean of the sequence.
[0255] Step 3: The system reads the static terrain slope data of the target farmland either through a configuration interface or directly from a Geographic Information Database (GIS). Once set, this parameter remains unchanged throughout the current site's operating cycle unless the monitoring location is physically relocated.
[0256] Step 4: The processor processes the statistics obtained above. With geographic parameters A common input threshold generation function is used to calculate and generate the final mutation baseline threshold. The specific formula for the threshold generation function is as follows:
[0257] ;
[0258] : Mutation baseline threshold;
[0259] : Preset basic safety threshold constant;
[0260] Background flow velocity fluctuation characteristics data;
[0261] : Static topographic slope data of the target farmland;
[0262] The noise penalty factor depends on the sensor installation environment; a higher value is used in areas with severe water turbulence to filter hydraulic noise. The value range is... ;
[0263] The slope sensitivity coefficient is positively correlated with the susceptibility to soil erosion. Higher values are used in high-slope erosion risk areas to enhance acceleration sensing sensitivity. The value range is... .
[0264] If the background noise (variance) increases, then through the item Increase the threshold to filter false alarms; if the terrain slope increases, use the exponential term. Lower the threshold to make it easier for the system to trigger encrypted sampling in areas prone to rapid runoff.
[0265] Example 6: Connecting to the previous example of vegetable planting area in hilly region (slope) The process of generating thresholds during the initialization phase of the system is as follows:
[0266] Step 1: Statistical analysis of background fluctuations:
[0267] The system retrieved 60 sets of flow velocity data from the past hour. The calculated variance of the sequence distribution is:
[0268] .
[0269] Step 2: Load preset constants:
[0270] Normally set , , .
[0271] Step 3: Calculate the mutation baseline threshold ( ):
[0272] First, calculate the geographical correction term: ;
[0273] The exponent term is .
[0274] Then substitute into the complete formula: ;
[0275] The generated threshold This corresponds to the threshold of 0.005 mentioned above, meaning that under this environment, as long as the runoff acceleration... If the value exceeds 0.0058, the system will determine it as a sudden change in flow, and then increase the flow velocity weight to achieve encrypted sampling.
[0276] The aforementioned technology incorporates variance-based dynamic noise modeling and sinusoidal slope-based terrain weight correction. A threshold generation function organically integrates geographical constants and statistical variables. This enables site-specific sampling logic, automatically sensing environmental noise levels at stations and adjusting sensitivity based on slope. Consequently, the determination of sudden turbulent changes possesses both robust resistance to complex environments and early warning capabilities for terrain risks, ensuring that the triggering of the weight correction logic always occurs within the optimal sensitivity range.
[0277] Because rainfall intensity and flow velocity changes are not always synchronized in complex agricultural runoff processes, if only the initial scour intensity calculated based on a fixed ratio in step three is used for correction, the corrected water quality gradient may exhibit overcompensation or undercompensation due to unreasonable weight allocation when there are drastic changes in flow velocity or a sudden increase in rainfall intensity. This calculation error will cause the sampling period to fail to accurately match the actual evolution curve of pollutant concentration, resulting in insufficient response of the sampling frequency during critical peak periods. Therefore, this paper proposes a method based on corrected weighting coefficients to perform a secondary weighted fusion of real-time rainfall data and real-time runoff velocity data to generate target hydrological scour intensity data, and then re-corrects the water quality gradient change data to generate the final predicted water quality gradient correction data, as detailed below:
[0278] Among them: target hydrological scour intensity data: refers to the physical index obtained by secondary fusion calculation of real-time rainfall and real-time flow velocity using a corrected weighting coefficient calibrated with dynamic characteristics (runoff acceleration), in order to more realistically reflect the transport potential energy of pollutants by the current instantaneous environment.
[0279] Target scour driving factor data: refers to the ratio of the target hydrological scour intensity to the system standard benchmark value, which is a dimensionless value reflecting the degree of deviation of the current dynamic energy level from the standard operating conditions.
[0280] Predictive water quality gradient correction data refers to data generated after final correction of the original water quality gradient based on the target hydrological scour intensity. This data integrates hydrodynamic abrupt changes and water quality evolution trends, and is used to predict the sampling frequency requirements for the next stage, serving as the direct calculation basis for generating sampling control commands.
[0281] Step 1: The control device calls the corrected weighting coefficient vector (i.e., the corrected flow velocity weighting coefficient) output in Step 4. and the corrected rainfall weighting coefficient This recalculates the real-time data collected at the current moment. The calculation formula is as follows:
[0282] ;
[0283] in, : Indicates the target hydrological scour intensity data.
[0284] Step 2: Based on the scouring intensity after secondary fusion, the processor recalculates the dimensionless driving factor and obtains a compensation coefficient that better matches the real-time operating conditions through the gain mapping function.
[0285] First, calculate the target scour driving factor data. :
[0286] ;
[0287] in, : Indicates the system's preset standard scouring strength benchmark data.
[0288] Then, Input the continuous gain mapping function and calculate the target compensation coefficient. :
[0289] .
[0290] Step 3: The processor processes the raw water quality gradient change data calculated in Step 2. The target compensation coefficient obtained in this step The calculation is performed to complete the final correction. The calculation formula is as follows:
[0291] ;
[0292] in, : Indicates the generated predictive water quality gradient correction data.
[0293] Example 7: Following the previous example, at the 120s, the system is known to... , , And the corrected weights output above are , .
[0294] Step 1: Perform a second-order weighted fusion calculation:
[0295] ;
[0296] Step 2: Calculate the target scour driving factor ( ):
[0297] Standard reference value :
[0298] ;
[0299] Step 3: Calculate the final target compensation coefficient ( ):
[0300] Overflow prevention limit Smoothing constant :
[0301] ;
[0302] Since the corrected weights identified that the current flow velocity contributed more but the total scouring momentum was slightly lower than the baseline, the gain was moderately reduced (0.8904) to achieve a more robust correction.
[0303] Step 4: Generate final predicted water quality gradient correction data ( ):
[0304] .
[0305] In the aforementioned technology, by introducing the corrected weighting coefficient adjusted in real time according to runoff acceleration in step four, a more physically representative target hydrological scour intensity is generated. This intensity is then used to recalibrate the original water quality gradient, forming a closed-loop optimization path with secondary feedback correction, thereby achieving refined output of the sampling control variables. Through secondary weighted fusion, the scour contribution under different environmental dynamics can be accurately distinguished and responded to. This ensures that the final generated target hydrological scour intensity not only reflects the current water quality fluctuation intensity but also includes predictions of hydrodynamic trends in the near future (i.e., predictive features). This allows the sampling execution agency to obtain periodic commands that better conform to the transport patterns of agricultural runoff pollution, enhancing the accuracy of the system in capturing peak pollutant concentrations under extreme hydrological conditions and reducing the distortion rate of the sampling data.
[0306] In farmland runoff monitoring, translating the algorithmic water quality change rate into actual sampling actions requires addressing the adaptability issue. If the conversion logic is too simple (e.g., a fixed step size), it cannot reflect the accurate predictive information obtained through acceleration and dual correction in the preceding steps. Furthermore, if the control commands lack descriptions of hardware physical characteristics (e.g., pumping duration and frequency), it will lead to uneven water sample volumes collected under different flow conditions, affecting the representativeness of subsequent laboratory analyses. Therefore, this paper proposes calculating the ratio of pre-stored basic sampling interval time data to predicted water quality gradient correction data to generate sampling cycle data. Based on this sampling cycle data, control commands are generated and sent to the sampling execution mechanism, as follows:
[0307] Control commands are generated based on the sampling period data and sent to the sampling actuator, including:
[0308] Initialize a timer variable and start the timer accumulation;
[0309] Continuously compare the current value of the timing variable data with the sampling period data;
[0310] When the current value of the timing variable data reaches the sampling period data, a physical motion control command containing the positive pressure pumping duration and action frequency is generated.
[0311] The physical motion control command is sent to the sampling actuator, and the timing variable data is cleared to zero after the command is sent.
[0312] Among them: Basic sampling interval time data: refers to the default time parameter pre-stored in the memory of the control device, which represents the standard sampling frequency benchmark under the condition of stable runoff and no significant pollution fluctuations.
[0313] Sampling cycle data: refers to the time length between two sampling actions that is finally determined after real-time environmental dynamics and water quality gradient calibration.
[0314] Sampling execution mechanism: refers to the hardware combination responsible for performing physical sampling actions, which usually includes a positive pressure water pump, a sample dispensing turntable, sampling bottles and connecting pipelines.
[0315] Timing variable data: refers to the real-time time value recorded by the system's internal accumulator since the end of the last sampling action, used to measure the current progress of time.
[0316] Positive pressure pumping time: refers to the time parameter during which the power component (such as a positive pressure pump) in the sampling actuator works continuously, which determines the volume of a single water sample collected.
[0317] Action frequency: refers to the pulse frequency or cycle rate of the actuator's power output when performing a sampling task, used to regulate the smoothness of the pumping process.
[0318] Physical motion control instructions: These are low-level instruction packets generated by the control equipment that conform to the communication protocol of the actuator, and include control fields such as trigger switch, execution duration, and motion frequency.
[0319] Step 1: Control the device to retrieve pre-stored basic sampling interval time data. And combined with the predicted water quality gradient correction data output from step five. A division operation is performed to achieve non-linear adjustment of the sampling frequency. The calculation formula is as follows:
[0320] ;
[0321] in, : Represents the generated sampling period data;
[0322] : Represents the pre-stored basic sampling interval time data;
[0323] : Represents the absolute value of the predicted water quality gradient correction data.
[0324] when When the value increases (indicating a more severe pollution trend), it indicates a more serious pollution trend. The sampling frequency increases accordingly when the sampling interval is shortened; conversely, the sampling interval increases when the sampling frequency is increased.
[0325] Step 2: Immediately after the program starts or the last sampling command is sent, the system performs an initialization operation to set the timing variable data. Subsequently, the system's internal clock pulses drive... The current time span is recorded by continuously accumulating data at a fixed time step (e.g., once per second).
[0326] The processor calculates based on Based on the hardware characteristics of the sampling actuator, it is converted into a control instruction package containing multiple parameters. These include, but are not limited to:
[0327] Timing Comparison Command: Start the internal timer to continuously monitor the current timing variables. and The relationship.
[0328] Physical parameter configuration: Set the start-up time of the water pump based on the current flow rate and liquid level. and frequency of action This is to ensure that the volume of the inhaled sample meets the experimental requirements.
[0329] Its logical representation is as follows:
[0330] when Upon this point, the system immediately enters the instruction generation phase. The processor retrieves the corresponding physical action parameters based on the preset single-sample volume requirement and the current flow rate environment. The instruction encapsulation logic is as follows:
[0331] ;
[0332] in, : Generated physical motion control commands;
[0333] : The address of the current sampling bottle number;
[0334] Positive pressure pumping duration;
[0335] Action frequency;
[0336] : A checksum used to ensure the accuracy of communication.
[0337] It should be noted that the processor determines the target sampling volume. (e.g., 500ml) and current runoff rate Calculate the duration parameter in the physical action command:
[0338] ;
[0339] Pump operating frequency Standard rated flow rate
[0340] Flow velocity compensation coefficient, formula is: ,in This is the suction head resistance correction factor (value range: 0.05-0.1).
[0341] Action frequency The setting logic:
[0342] when At that time, set (Low power silent mode);
[0343] when At that time, set (Full power mode to overcome greater resistance).
[0344] Step 3: The control device transmits control commands via a communication interface (such as RS485 or TTL level signals). The command is sent to the sampling actuator. Upon receiving the command, the actuator starts the positive pressure water pump and proceeds according to the instructions. and Water sample extraction completed. After the command is sent and the actuator sends a confirmation signal, the control equipment will adjust the timing variable. Perform a zeroing operation ( Then, the timing loop re-enters the next sampling period.
[0345] Example 8: Following the previous example of vegetable growing areas in hilly regions, the final predicted water quality gradient correction data calculated at 120 seconds is known. .
[0346] Step 1: Calculate the sampling period ( ):
[0347] Known (Preset benchmark):
[0348] ;
[0349] The calculation results show that, due to the strong current flushing force and water quality gradient, the original sampling cycle of once every 10 minutes has been compressed to about 270 seconds.
[0350] Step 2: Timing Comparison Logic:
[0351] Current timing status: Assuming since the last sampling, The total has been accumulated to 270 seconds;
[0352] Comparison results: The logical judgment is "true".
[0353] Step 3: Generate physical control commands:
[0354] The system searches the hardware parameter library and sets the positive pressure parameters required for a single 500ml water sample collection:
[0355] Positive pressure pumping time ;
[0356] Action frequency .
[0357] The generated instruction package It was distributed to the sampling pump set.
[0358] Step 4: Perform a reset.
[0359] After the command is successfully sent, the control device will immediately Reset. The system begins a new timing cycle at 271 seconds to accommodate any changes in environmental data.
[0360] The aforementioned technology employs dynamic ratio mapping and parameterized control. By calculating the ratio between pre-stored basic sampling interval time data and predictive water quality gradient correction data, it achieves reverse automatic scaling of the sampling interval as water quality / kinetic energy fluctuates. Simultaneously, the calculation results are transformed into composite control commands containing timing variables, action duration, and frequency, realizing a direct mapping from logic to physical action. By using deeply corrected predictive water quality gradient correction data as the denominator of the sampling frequency, it ensures that physical sampling actions remain highly synchronized with the migration patterns of environmental pollutants. During periods of surging pollution load, the system can shorten the sampling cycle data to densify sampling points, thereby fully preserving the characteristic information of pollution peaks; while during stable phases, it automatically extends the cycle, reducing hardware wear and testing costs. This precise command generation mechanism ensures the continuity of sampling frequency adjustment and the stability of system operation.
[0361] An automatic precision sampling device for farmland runoff rainfall sensing includes:
[0362] The sensor assembly includes at least a rain sensor, a flow rate sensor, and a water quality probe.
[0363] A sampling actuator, which receives and executes control commands;
[0364] The control device is communicatively connected to the sensor assembly and the sampling actuator. The control device includes a processor and a memory storing a computer program. When the computer program is executed by the processor, it implements the steps of the automatic and precise sampling method for farmland runoff rainfall sensing.
[0365] Rainfall sensors are used to collect real-time rainfall data of the current environment; flow velocity sensors are used to collect real-time runoff velocity data of farmland inlets; and water quality probes are used to collect real-time conductivity data of target water samples.
[0366] Specifically, sensor components:
[0367] Rainfall sensor: A dual-tipping bucket rain gauge (0.2mm resolution) or radar rainfall sensor is used, deployed in open areas of farmland. The pulse signal generated by the tipping bucket is captured via GPIO interrupts to calculate the rainfall intensity per unit time.
[0368] Flow velocity sensor: An ultrasonic Doppler flow meter is used and fixed at the center of the inlet flow section. Real-time runoff velocity data is transmitted to the control equipment via RS485 bus (Modbus-RTU protocol).
[0369] Water quality probe: It adopts a four-electrode conductivity sensor with automatic scraping and self-cleaning function, which is placed in the center of the flow channel to collect the conductivity data of the target water sample in real time.
[0370] Control equipment: including a central processing unit (MCU) and memory. The processor has multiple ADC sampling channels, a pulse counter, and a communication interface (RS485 / TTL).
[0371] Synchronous acquisition logic: The processor polls each sensor at a fixed interval of 60 seconds. By establishing a unified timestamp mapping, it ensures that sensors under the same index... The data is strictly aligned on the timeline.
[0372] Sampling actuator: Consists of a positive pressure water pump, a sample dispensing turntable, and a sampling bottle assembly. It receives data from the control equipment, including trigger switches and execution time. and frequency of action Physical motion control instruction package .
[0373] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.
Claims
1. A method for automatic and precise sampling of farmland runoff rainfall, characterized in that, Includes the following steps: Acquire real-time rainfall data of the current environment, real-time runoff velocity data of farmland inlets, and real-time conductivity data of target water samples; Real-time conductivity data at the start and end points within the preset observation window are extracted respectively, and water quality gradient change data are calculated based on the ratio of the conductivity difference between the two to the time difference. Based on the preset basic weight coefficients, the real-time rainfall data and the real-time runoff velocity data are initially weighted and fused to calculate the initial hydrological scour intensity data. Based on the initial hydrological scour intensity data, the water quality gradient change data is initially corrected to generate the first water quality gradient correction data. Based on the real-time runoff velocity data of the previous and current preset observation windows, runoff acceleration characteristic data are calculated, and the preset basic weight coefficients are adjusted based on the first water quality gradient correction data and the runoff acceleration characteristic data to obtain the corrected weight coefficients. Based on the corrected weighting coefficients, the real-time rainfall data and real-time runoff velocity data are re-weighted and fused twice to generate target hydrological scour intensity data, and the water quality gradient change data are re-corrected to generate the final predicted water quality gradient corrected data. The ratio of the pre-stored basic sampling interval time data to the predicted water quality gradient correction data is calculated to generate sampling period data, and control commands are generated based on the sampling period data and sent to the sampling execution mechanism.
2. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 1, characterized in that: Based on the real-time runoff velocity data from the previous and current preset observation windows, runoff acceleration characteristic data are calculated, including: Calculate the average flow velocity data within the previous preset observation window and the current preset observation window, respectively; Calculate the flow velocity difference between the average flow velocity data in the current preset observation window and the average flow velocity data in the previous preset observation window; Extract the time step data between the current preset observation window and the previous preset observation window; The ratio of the velocity difference data to the time step data is calculated to obtain the runoff acceleration characteristic data.
3. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 2, characterized in that: Based on the first water quality gradient correction data and runoff acceleration characteristic data, the preset basic weight coefficients are corrected and adjusted to obtain the corrected weight coefficients, including: The basic weighting coefficients include the basic weighting coefficients for velocity and rainfall, which correspond to the real-time runoff velocity data and the real-time rainfall data, respectively. Determine whether the runoff acceleration characteristic data is greater than the preset abrupt change benchmark threshold and whether the first water quality gradient correction data is positive; If the runoff acceleration characteristic data is determined to be greater than the preset turbulent change threshold and the first water quality gradient correction data is positive, then the flow velocity basic weight coefficient is increased by the first preset step size and the rainfall basic weight coefficient is decreased proportionally to generate the correction weight coefficient. If the runoff acceleration characteristic data is determined to be greater than the turbulent change threshold and the first water quality gradient correction data is less than or equal to zero, then the flow velocity basic weight coefficient is reduced by the second preset step size and the rainfall basic weight coefficient is increased proportionally to generate the correction weight coefficient. If the runoff acceleration characteristic data is determined to be less than or equal to the turbulent change threshold, then the preset basic weight coefficient is directly used as the correction weight coefficient.
4. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 3, characterized in that: The turbulence mutation threshold is dynamically generated and includes: Acquire multiple sets of historical runoff velocity data within a preset environmental assessment period; Calculate the distribution variance of multiple sets of historical runoff velocity data to obtain background velocity fluctuation characteristic data; Obtain static terrain slope data of the target farmland, and input the static terrain slope data and background flow velocity fluctuation characteristic data into a preset threshold generation function to calculate and generate a mutation benchmark threshold.
5. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 4, characterized in that: The specific formula for the threshold generation function is as follows: ; : Mutation baseline threshold; : Preset basic safety threshold constant; Background flow velocity fluctuation characteristics data; : Static topographic slope data of the target farmland; Noise penalty factor; Slope sensitivity coefficient.
6. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 1, characterized in that: The initial correction of water quality gradient change data based on initial hydrological scour intensity data to generate first water quality gradient correction data includes: Obtain the system's preset standard scour strength benchmark data; Calculate the ratio of the initial hydrological scour intensity data to the standard scour intensity baseline data to generate dimensionless scour driving factor data; Input the scour driving factor data into a preset continuous gain mapping function to calculate and generate the initial compensation coefficient. The water quality gradient change data is multiplied with the initial compensation coefficient to generate the first water quality gradient correction data.
7. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 6, characterized in that: The specific formula for the continuous gain mapping function is as follows: ; : Calculate the initial compensation coefficients for the output; : Flushing driving factor data; : Preset overflow prevention upper limit threshold; Curvature smoothing adjustment constant.
8. The automatic and precise sampling method for farmland runoff rainfall sensing according to claim 1, characterized in that: Control commands are generated based on the sampling period data and sent to the sampling actuator, including: Initialize a timer variable and start the timer accumulation; Continuously compare the current value of the timing variable data with the sampling period data; When the current value of the timing variable data reaches the sampling period data, a physical motion control command containing the positive pressure pumping duration and action frequency is generated. The physical motion control command is sent to the sampling actuator, and the timing variable data is cleared to zero after the command is sent.
9. A farmland runoff rainfall sensing automatic precision sampling device, characterized in that, include: The sensor assembly includes at least a rain sensor, a flow rate sensor, and a water quality probe. A sampling actuator, which receives and executes control commands; A control device is communicatively connected to a sensor assembly and a sampling actuator, the control device including a processor and a memory storing a computer program, which, when executed by the processor, implements the steps of the farmland runoff rainfall sensing automatic precision sampling method as described in any one of claims 1 to 8.
10. The automatic precision sampling device for farmland runoff and rainfall sensing according to claim 9, characterized in that: The rainfall sensor is used to collect real-time rainfall data of the current environment, the flow velocity sensor is used to collect real-time runoff velocity data of farmland inlets, and the water quality probe is used to collect real-time conductivity data of target water samples.