Small farmland water-saving irrigation intelligent adjusting device
Patent Information
- Application Number
- CN202611152762.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种小型农田节水灌溉智能调节装置,解决了现有灌溉系统因缺乏底层数据去噪及物理换算导致供水精度低,以及在自动与手动模式切换时因历史数据滞后会引发补偿性过灌的问题
[0032]1、本发明通过调用一阶指数平滑滤波算法对原始数字量进行去噪处理,并依据物理分区差异分配权重系数计算加权平均有效湿度值,同时设置故障节点的动态剔除与权重归一化机制;上述特征能够有效滤除现场高频干扰噪声,提高土壤综合水分状态的评估精度,并在局部传感器损坏时维持系统的正常运转,避免因单一硬件异常导致系统发生误灌或漏灌。
Smart Images

Figure CN122873471A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural irrigation control technology, specifically to a small-scale intelligent regulation device for water-saving irrigation in farmland. Background Technology
[0002] In the field of small-scale farmland irrigation, automated irrigation control equipment with fixed time and frequency is widely used. This type of equipment mainly relies on preset time cycles to execute the opening and closing of valves. It lacks real-time closed-loop acquisition of the actual soil moisture status. Because it does not combine the underlying environmental feedback, this type of open-loop control method often leads to a disconnect between the set water supply and the actual water demand of crops due to differences in natural precipitation or different growth stages of crops. This results in a large waste of water resources or affects the final yield of crops due to long-term under-irrigation.
[0003] To address the shortcomings of fixed-cycle irrigation, some irrigation systems have introduced soil moisture sensors for feedback control. However, the agricultural environment is complex, and the discrete electrical signals collected by the sensors are affected by electromagnetic interference and local fluctuations in soil salinity, resulting in high-frequency transient noise. Existing systems directly use the raw collected data for threshold comparison without in-depth signal denoising and spatial multi-node weighting, which can lead to misjudgments and false triggers in the main control logic. Furthermore, existing technologies often focus on controlling only the percentage of moisture content, failing to incorporate differences in soil bulk density and the mechanical characteristics of regulating valves for equivalent conversion and dynamic compensation of the actual water demand volume, resulting in limited accuracy in the final water supply volume control.
[0004] Furthermore, in actual agricultural production, managers often need to issue manual intervention commands to the system based on emergencies. Existing automatic irrigation controllers often lack a smooth interruption preemption and data transition mechanism when processing such external asynchronous commands. When receiving and executing manual forced irrigation, the system kernel may experience main program timing blockage due to the complex parsing of communication data frames. Moreover, after the manual irrigation process ends, the system directly jumps back to the automatic operation mode without timely clearing the historical drought status data in the internal cache. This causes the automatic control program to use the old, invalid data from before manual irrigation for incorrect calculations, resulting in compensatory over-irrigation and reducing the control stability of the equipment when switching between multiple operating modes. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a small-scale intelligent regulation device for water-saving irrigation in farmland. It solves the problems of low water supply accuracy caused by the lack of underlying data denoising and physical conversion in existing irrigation systems, as well as the compensatory over-irrigation caused by the lag in historical data when switching between automatic and manual modes.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] This invention provides a small-scale intelligent water-saving irrigation regulation device for farmland, comprising:
[0008] Soil moisture sensors are used to collect raw moisture signals from the measurement nodes in the farmland and transmit the raw moisture signals to the central control module.
[0009] The central control module is used to receive the raw humidity signal, calculate the effective humidity value, compare the effective humidity value with the internally stored water demand lower limit threshold, and when the effective humidity value is less than or equal to the water demand lower limit threshold, calculate the theoretical total irrigation water demand and duty cycle control command for the current control cycle. The central control module has multi-channel pulse width modulation output capability.
[0010] The electric regulating valve includes a main regulating valve installed on the main water supply pipeline and branch regulating valves installed on each branch water supply pipeline. It is used to receive duty cycle control commands independently issued by the central control module and to adjust the water flow in the corresponding pipeline by reaching the set opening position.
[0011] The wireless communication module is used to establish a data communication link between the central control module and external devices, send status data packets to external devices, and receive manual irrigation commands sent by external devices.
[0012] In a preferred embodiment of the present invention, the central control module reads the discrete raw electrical signal transmitted by the soil moisture sensor according to the analog-to-digital conversion cycle parameter set by the internal timer, and converts it into the corresponding raw digital quantity; calls the first-order exponential smoothing filter algorithm program to perform noise reduction processing and iterative calculation on the raw digital quantity stored in the memory to obtain the effective humidity value of each measurement node in the current sampling period; assigns corresponding weight coefficients to each effective humidity value calculated according to the differences in the physical partitions where each measurement node is located, and performs multiplication and addition operations to calculate the weighted average effective humidity value that represents the comprehensive moisture state of the current farmland area as the effective humidity value benchmark for system judgment.
[0013] The above settings correct the underlying discrete signals in both the time and spatial domains, thereby improving the accuracy of the regional comprehensive moisture status assessment.
[0014] Furthermore, the central control module extracts the raw digital value acquired by the same measurement node in the current sampling period and the effective humidity value of the previous sampling period; multiplies the raw digital value acquired in the current sampling period by a preset smoothing coefficient to obtain a first product; multiplies the difference between the first product and the smoothing coefficient by the effective humidity value of the previous sampling period to obtain a second product; and sums the first product and the second product, using the sum as the effective humidity value of each measurement node in the current sampling period.
[0015] The above processing method can attenuate high-frequency transient electromagnetic interference and extract low-frequency trend signals that reflect changes in soil moisture.
[0016] Furthermore, when the system diagnoses a sensor fault by finding that the data of a certain measurement node exceeds the physical limit, the faulty measurement node is removed from the valid set and the number of remaining valid nodes is checked. If the number of remaining valid nodes is determined to decrease to zero, a sensor disconnection alarm flag is generated, and a reset signal is forcibly output to close the corresponding electric regulating valve to suspend the automated operation and control process. If the number of remaining valid nodes is determined to be greater than zero, the original weight coefficient of each remaining valid node is extracted and divided by the sum of the original weight coefficients of all remaining valid nodes. The calculated quotient is then used as a new weight coefficient and reassigned for normalization.
[0017] The above settings can dynamically remove abnormal data and reset weights when a sensor experiences a partial fault, avoiding distortion of weighted calculations caused by local hardware damage, and cut off the water supply to prevent over-irrigation when all sensors are disconnected.
[0018] In one embodiment of the present invention, when the effective humidity value is determined to be less than or equal to the lower limit threshold of water demand, a continuous sampling verification program is initiated to determine whether the effective humidity value within the continuously set control cycle is lower than the lower limit threshold of water demand. If the continuous verification passes, the pre-set target saturation upper limit threshold is extracted, and the difference between the target saturation upper limit threshold and the current effective humidity value is calculated to obtain the farmland water deficit of the corresponding measurement node area. The farmland water deficit, the farmland area value of the corresponding area configured by the system, the crop root depth parameter, and the retrieved soil bulk density correction coefficient are multiplied in sequence, and the product of all parameters is taken as the theoretical irrigation water demand of the area in the current control cycle. The theoretical total irrigation water demand is obtained by summing the theoretical irrigation water demand of all areas.
[0019] The above settings filter out frequent false triggers caused by transient fluctuations through continuous sampling and verification, compensate for volume deviations caused by different soil porosities using soil bulk density correction coefficients, and achieve accurate water demand calculation based on regional division, providing a data foundation for subsequent multi-node independent regulation.
[0020] Furthermore, the central control module dynamically matches the global target operating flow of the main regulating valve set in the system parameter area according to the theoretical total irrigation water demand, and independently matches the zone target operating flow of the corresponding branch regulating valves in combination with the theoretical irrigation water demand of each region. It calls the hardware characteristic curve parameters, which reflect the mapping relationship between the steady-state water flow of each electric regulating valve and the input control command, pre-written within the system. These hardware characteristic curve parameters include the flow gain constant and the basic offset. The difference between the target operating flow and the basic offset is divided by the flow gain constant, and the resulting quotient is used as the corresponding target duty cycle control command. Specifically, the zone duty cycle control command is calculated independently for the branch regulating valves, and the global duty cycle control command is calculated for the main regulating valve. The target duty cycle control command undergoes safety saturation limiting processing, constraining it within the allowable safety boundary value of the corresponding electric regulating valve, generating the duty cycle control command to be sent to the drive circuit. This achieves distributed collaborative irrigation where the main water supply pipeline ensures the global basic flow, and the branch water supply pipelines achieve precise quantitative water replenishment to the region.
[0021] The above settings, by introducing hardware characteristic curve parameters, compensate for the impact of pipeline foundation back pressure and valve mechanical dead zone on output flow, and innovatively construct an independent mathematical decoupling model for global pressure stabilization of the main pipeline and on-demand allocation of branch pipelines, thereby improving the dynamic regulation flexibility and water supply efficiency under the non-uniform water shortage state of large-area farmland.
[0022] Furthermore, after confirming that the target working flow rate is greater than zero, the theoretical total irrigation water demand is divided by the target working flow rate, and the resulting quotient is used as the target irrigation duration. The internal hardware timer is activated synchronously and starts counting in decrementing mode. When the count value of the hardware timer reaches the target irrigation duration and triggers an overflow interrupt, the central control module outputs a reset signal with a duty cycle of zero to the drive circuit, causing the corresponding electric regulating valve to respond to the reset signal and move to a fully closed state to cut off the water flow channel.
[0023] The above settings, combined with the countdown mechanism of the hardware timer, control the irrigation duration, thereby controlling the actual water supply volume.
[0024] In a preferred embodiment of the present invention, when executing the automated irrigation process, the effective humidity value of the current cycle, the theoretical total irrigation water demand, and the duty cycle control command are extracted simultaneously, converted to a unified data type, and encapsulated into a status data packet according to a preset communication protocol format. The wireless communication module modulates the status data packet into a radio frequency signal and broadcasts it to the outside at a fixed frequency, while keeping the receiving channel in a listening state to capture the manual irrigation command data stream sent by the external device. The key identifier bits and cyclic redundancy check codes in the manual irrigation command data stream are extracted for legality verification. If the verification passes, a trigger signal is sent to the external interrupt input port of the central control module through the hardware interrupt pin.
[0025] The above settings can periodically synchronize the system's operating status to external devices and intercept illegal command interference through a verification mechanism.
[0026] Furthermore, after the kernel hardware of the central control module captures the trigger signal, it identifies the highest preemption priority of the external interrupt request based on the internally pre-allocated interrupt vector table; it enters the designated external interrupt service subroutine, triggers the switching instruction of the system running state machine, flips the current system working mode flag from automatic control mode to forced manual mode; it suspends the irrigation action task in the currently executing automated calculation control process, exits the external interrupt service subroutine, and hands over the mode switching event to the main loop.
[0027] The above settings only perform flag bit toggling and suspend the task in the interrupt service routine, avoiding the data parsing process from occupying the interrupt response time and ensuring the multi-task concurrent scheduling performance of the control module.
[0028] Furthermore, after detecting that the working mode flag has switched to forced manual mode, the manual irrigation instruction data frame in the wireless communication module buffer is read, and the forced opening parameter and forced irrigation duration parameter are extracted. The fixed maximum allowable stroke physical threshold is retrieved to perform a limiting operation on the forced opening parameter, and the limited forced opening parameter is written into the comparison register of the underlying pulse width modulation generator to drive the corresponding electric regulating valve to run to the specified opening. The count value of the internal hardware timer is reset and assigned to the forced irrigation duration parameter to start the countdown. When the countdown ends, an overflow interrupt is triggered to close the corresponding electric regulating valve. The residual calculation instructions in the automation task queue and the historical data in the main data buffer are cleared, and the working mode flag is restored to automatic control mode to re-initiate the analog-to-digital conversion data acquisition task.
[0029] The above settings construct a complete closed-loop response mechanism for hardware interrupt preemption, direct overwriting of underlying drivers, and forced clearing of data after intervention. This ensures zero-latency execution of high-priority manual instructions and completely eliminates historical dirty data pollution during the switching between manual and automatic modes, preventing system misjudgment from causing over-feeding.
[0030] The above settings can prioritize responding to forced intervention commands from external devices and actively clear cached data after manual irrigation ends, avoiding compensatory over-irrigation caused by historical data lag when resuming automatic mode.
[0031] This invention provides a small-scale intelligent water-saving irrigation regulation device for farmland. It has the following beneficial effects:
[0032] 1. This invention uses a first-order exponential smoothing filter algorithm to denoise the original digital quantity, and calculates the weighted average effective humidity value based on the weight coefficients assigned according to the differences in physical partitions. At the same time, it sets up a dynamic removal mechanism for faulty nodes and a weight normalization mechanism. The above features can effectively filter out high-frequency interference noise on site, improve the accuracy of soil moisture status assessment, and maintain the normal operation of the system when local sensors are damaged, avoiding mis-irrigation or missed irrigation caused by a single hardware failure.
[0033] 2. This invention obtains the farmland water deficit in the corresponding measurement node area after continuous sampling and verification. It calculates the theoretical irrigation water demand of the area by combining the farmland area, crop root depth and soil bulk density correction coefficient, and summarizes the theoretical total irrigation water demand. In combination with the distributed architecture of the main pipeline and branch pipelines, it introduces hardware characteristic curve parameters including flow gain constant and basic offset to independently deduce the global duty cycle of the main regulating valve and the partition duty cycle control commands of the branch regulating valves. The above features convert the soil moisture percentage difference into an equivalent physical water replenishment volume, compensate for the nonlinear flow error caused by valve mechanical dead zone and pipeline back pressure, and innovatively construct an independent collaborative model in which the main pipeline guarantees the global basic flow and the branch pipelines allocate water as needed. This enables precise quantitative water supply for the differentiated water shortage status of different farmland plots and reduces the ineffective consumption of water resources.
[0034] 3. This invention captures external manual irrigation commands through a hardware interrupt pin. In the interrupt service subroutine, only the working mode flag is toggled, and the main loop parses the opening and duration parameters to drive the corresponding electric regulating valve. After the manual countdown ends, the residual calculation instructions and the main data cache are cleared. The above features ensure that the system kernel does not experience timing blockage when responding to external asynchronous intervention. At the same time, the operation of clearing historical cache data avoids compensatory over-irrigation errors induced by the use of old data before manual intervention after the system returns to automatic mode, thus improving the control stability when switching working modes. Attached Figure Description
[0035] Figure 1 This is a perspective view of the present invention;
[0036] Figure 2 This is a schematic diagram of the module architecture of the present invention;
[0037] Figure 3 This is a schematic diagram of the method flow of the present invention;
[0038] Figure 4 This is a schematic diagram of the irrigation threshold determination and water demand calculation logic of the present invention;
[0039] Figure 5 This is a timing diagram of the actuator drive control logic of the present invention;
[0040] Figure 6 This is a schematic diagram of the logic flow for full-state vector synchronization and asynchronous interrupt priority intervention in this invention;
[0041] Figure 7 This is a line graph showing the trend of soil weighted average effective moisture variation over 30 days according to the present invention.
[0042] Figure 8 This is a bar chart comparing the cumulative water consumption of the two groups with the final crop yield of the present invention.
[0043] Among them, 10 is a soil moisture sensor; 20 is a central control module; 30 is an electric regulating valve; and 40 is a wireless communication module. Detailed Implementation
[0044] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] See attached document Figure 1 and Figure 2 The present invention provides a small-scale intelligent regulation device for water-saving irrigation in farmland, which may include: a soil moisture sensor 10, a central control module 20, an electric regulating valve 30, and a wireless communication module 40.
[0046] Soil moisture sensor 10 is used to collect humidity data from different areas of farmland and transmit the humidity data to central control module 20. Soil moisture sensor 10 is distributed at measurement node locations in farmland. Soil moisture sensor 10 establishes an electrical connection with the input port of central control module 20 through wired analog signal bus or digital bus.
[0047] The central control module 20 is used to receive humidity data sent by the soil moisture sensor 10, calculate irrigation demand according to the preset crop water requirement threshold, and output control commands. The input port of the central control module 20 is connected to the soil moisture sensor 10, the control output port of the central control module 20 is connected to the control terminal of the electric regulating valve 30, and the communication interface of the central control module 20 is connected to the wireless communication module 40. When the farmland is divided into multiple independent rotational irrigation areas, the central control module 20 has multi-channel pulse width modulation output capability to output control commands independently for each area.
[0048] The electric regulating valve 30 is used to receive control commands from the central control module 20 and to adjust the water flow in the pipeline according to the control commands. The electric regulating valve 30 is connected in series in the fluid passage of the main water supply pipeline and the branch water supply pipelines of the farmland. The main regulating valve installed in the main water supply pipeline is used to control the global basic water pressure and total flow. The branch regulating valves installed in each branch water supply pipeline are used to adjust the water volume independently according to the sensor data of their corresponding areas.
[0049] The wireless communication module 40 is used to establish a data communication link between the central control module 20 and an external device. In this embodiment, the external device includes a smartphone terminal or a personal computer terminal. The wireless communication module 40 receives the device operation status data transmitted by the central control module 20 and sends it to the outside for the smartphone terminal or personal computer terminal to perform a graphical display of remote environmental parameters and working status. The wireless communication module 40 receives control commands from the external smartphone terminal or personal computer terminal and transmits the control commands to the internal register of the central control module 20.
[0050] See attached document Figure 3 This invention provides a smart regulation method for water-saving irrigation in small-scale farmland, comprising the following steps:
[0051] S1, the central control module 20 triggers the internal analog-to-digital conversion task according to the set periodic time, controls the soil moisture sensor 10 to collect the raw humidity signal of the measurement node where the farmland is located, performs a filtering process on the acquired raw humidity signal, calculates the weighted average value of all effective sensor nodes, and obtains the effective humidity value that characterizes the comprehensive water status of the current farmland area.
[0052] S2, the central control module 20 retrieves the internally stored lower limit threshold of water demand, compares the obtained effective humidity value with the lower limit threshold of water demand, and calls the irrigation demand calculation program when the effective humidity value is less than or equal to the lower limit threshold of water demand. It calculates the current water deficit of farmland in combination with the preset target saturation upper limit threshold, and calculates the theoretical total irrigation water demand for the current control cycle based on the water deficit, the farmland area value configured by the system and the crop root depth parameter.
[0053] S3, the central control module 20 obtains the calculated theoretical total irrigation water demand, and calculates the corresponding duty cycle control command and target irrigation duration by combining the flow gain constant of the electric regulating valve 30 preset in the system. The duty cycle control command is sent to the drive circuit to make the electric regulating valve 30 reach the calculated and set opening position. The internal timer starts counting. When the count reaches the target irrigation duration, a reset signal is output to close the electric regulating valve 30.
[0054] S4, when performing the aforementioned steps, the central control module 20 generates a status data packet containing the effective humidity value, the theoretical total irrigation water demand, and the valve control command at a fixed frequency, and sends the status data packet through the wireless communication module 40. The wireless communication module 40 listens for external input signals, and when it receives a manual irrigation command sent by an external device, it sends an interrupt request to the central control module 20. The central control module 20 responds to the external interruption, suspends the current automated calculation and control process, extracts the opening parameter and duration parameter from the manual irrigation command, and directly drives the electric regulating valve 30 to run according to the extracted parameters.
[0055] In specific implementations, step S1 provided by the present invention may include the following steps.
[0056] S101, the central control module 20 triggers a data acquisition command based on the analog-to-digital conversion cycle parameter set by its internal timer. In this embodiment, the value range of the analog-to-digital conversion cycle parameter is 500 milliseconds to 2000 milliseconds, which enables its analog input channel to be turned on to read the discrete raw electrical signal transmitted by the soil moisture sensor 10 through the signal bus. Then, the internal analog-to-digital converter is used to convert the discrete raw electrical signal into the corresponding raw digital quantity. Then, the soil moisture sensor 10 connected to each measurement node on the input port is traversed sequentially according to the preset timing sequence. Finally, the read raw digital quantity is stored in the random access memory of the central control module 20. For the specific hardware topology of the analog-to-digital conversion circuit and the sensor analog signal output principle, conventional design can be carried out by referring to the existing microcontroller datasheet.
[0057] S102, the central control module 20 calls the internally stored first-order exponential smoothing filter algorithm program to denoise the raw digital quantity stored in the random access memory. Considering that electromagnetic interference and soil salinity fluctuations in the farmland environment can cause high-frequency jitter in the raw digital quantity, the smoothing filter algorithm can physically weaken the transient noise impact and retain the low-frequency trend characteristics of soil moisture changes. The central control module 20 uses the above algorithm to iteratively calculate the raw digital quantity of the current sampling period and the effective humidity value of the previous sampling period:
[0058] ;
[0059] In the formula, In order to be in Time of the first Effective humidity values at each measurement node; For smoothing coefficients; In order to be in Time of the first The raw digital data collected by each measurement node; In order to be in Time of the first Effective humidity values at each measurement node; It is a natural number greater than 0 and represents the number of the measurement node; This serves as the identifier for the current sampling period. This serves as the time marker for the previous sampling period; the smoothing coefficient is pre-configured in the central control module 20. The calibration value is a constant determined by least-squares fitting of the historical moisture variation curve of the test plot with the sensor output sequence. In this embodiment, the smoothing coefficient α ranges from 0.1 to 0.3. After a single calculation is completed, the central control module 20 will... The data is overwritten and stored in the corresponding register address as the valid output result for the current cycle.
[0060] S103, the central control module 20 assigns corresponding weighting coefficients to each calculated effective humidity value based on the differences in the physical zones where each measurement node is located. The non-volatile memory of the central control module 20 pre-programs the initial weighting coefficients corresponding to each measurement node. These initial weighting coefficients are obtained by looking up an empirical mapping table of the clay content of the soil layer where each node is located and the depth from the ground surface. The central control module 20 extracts the effective humidity values corresponding to all effective sensor nodes in normal working condition and their associated current weighting coefficients, and performs multiplication and addition operations to calculate the regional weighted average effective humidity.
[0061] ;
[0062] In the formula, In order to be in The weighted average effective humidity value of the entire farmland area at the current sampling period; It is a natural number greater than 0 and represents the number of the measurement node; For the first The weighting coefficients corresponding to each measurement node; In order to be in Time of the first Effective humidity values at each measurement node; This serves as the identifier for the current sampling period. This indicates the total number of valid soil moisture sensors 10 currently recorded by the system. When the system diagnoses a sensor malfunction by determining that the data of a certain measurement node exceeds the physical limit, the central control module 20 removes that node from the valid set and resets its count. -1;
[0063] At this time, the central control module 20 performs a valid quantity check. If it determines that the remaining valid node count n has decreased to 0, it generates a sensor disconnection alarm flag and reports the anomaly through the wireless communication module 40, and forcibly outputs a reset signal to close the electric regulating valve 30 to suspend the automated process and prevent uncontrolled overfilling; if it determines that the remaining valid node count n has decreased to 0, it generates a sensor disconnection alarm flag and reports the anomaly through the wireless communication module 40, and forcibly outputs a reset signal to close the electric regulating valve 30 to suspend the automated process and prevent uncontrolled overfilling. If the value is greater than 0, then the weights are calculated by dividing the original weight coefficients of each remaining valid node by the sum of the original weight coefficients of the remaining valid nodes. The weighted average effective humidity value is recalculated and normalized to ensure that the total weight is always 1. Finally, the central control module 20 stores the calculated weighted average effective humidity value into the main data cache.
[0064] See attached document Figure 4 In specific implementation, step S2 provided by the present invention may include the following steps.
[0065] S201, the central control module 20 reads the weighted average effective humidity value from the main data cache and retrieves the set lower water demand threshold from the non-volatile memory for numerical comparison. The lower water demand threshold is a specific value obtained by looking up a table based on the lower limit of field water holding capacity corresponding to the current crop growth stage. In this embodiment, the lower water demand threshold ranges from 60% to 75% of the field water holding capacity. When the weighted average effective humidity value is determined to be less than or equal to the lower water demand threshold, the flag bit of the status register inside the central control module 20 flips. The timer inside the central control module 20 starts a continuous sampling verification program to determine whether the weighted average effective humidity value within 10 to 30 consecutive control cycles or a set verification time window is lower than the lower water demand threshold to fully filter out transient interference in the agricultural field. If the continuous verification passes, it is confirmed that the trigger condition is met and the irrigation demand calculation subroutine is called. If the trigger condition is not met, the central control module 20 resets the flag bit of the status register and maintains the current standby state, waiting for the next sampling subroutine to wake up.
[0066] S202, after successfully calling the irrigation demand calculation subroutine, the central control module 20 extracts the pre-set target saturation upper limit threshold. This target saturation upper limit threshold represents the maximum capillary suspended water volume that the soil can maintain under gravity, and its value is written into the parameter area during system initialization. In this embodiment, the target saturation upper limit threshold ranges from 85% to 95% of field capacity. The difference between the target saturation upper limit threshold and the currently sampled weighted average effective humidity value is calculated to extract the farmland water deficit. When natural precipitation causes the weighted average effective humidity value to exceed the target saturation upper limit threshold, the central control module 20 forces the water deficit to zero using a low-level limiting function. The central control module 20 extracts the farmland water deficit according to the following specific mathematical expression:
[0067] ;
[0068] In the formula, This represents the current water deficit in farmland. The target saturation upper limit threshold configured for the system; In order to be in The weighted average effective humidity value calculated at any given time; This serves as the identifier for the current sampling period. The lower limit constant for the forced zeroing of water deficit is defined; the central control module 20 uses the above numerical comparison and truncation instructions to generate valid water deficit data and store it in memory.
[0069] S203, the central control module 20 acquires the calculated water deficit and substitutes it into the three-dimensional spatial theoretical total irrigation water demand calculation model. This model calls the farmland area value and crop root depth parameters configured by the system to perform spatial volume conversion. The central control module 20 internally retrieves the soil bulk density correction coefficient matched with the current test plot and converts the water deficit calculated based on mass measurement into an equivalent three-dimensional spatial volume deficit, thereby compensating for the theoretical volume deviation caused by different porosities. The aforementioned soil bulk density correction coefficient can be determined by sampling and measuring undisturbed soil using the ring cutter method and written into non-volatile memory through the configuration interface. In this embodiment, the soil bulk density correction coefficient... The value ranges from 1.1 grams per cubic centimeter to 1.5 grams per cubic centimeter. Based on this, the central control module 20 calculates the theoretical total irrigation water demand for the current control cycle. Its mathematical expression is as follows:
[0070] ;
[0071] In the formula, This represents the theoretical total irrigation water demand required for the current control cycle. The horizontal area of the farmland plots currently covered by the control node; The effective root absorption depth of crops; This represents the current water deficit in farmland. This represents the soil bulk density correction factor, where the effective root absorption depth of the aforementioned crops is... As the crop growth period progresses, the central control module 20 updates the table by looking up the internal calendar clock. The central control module 20 assigns the calculated theoretical irrigation water demand for each zone and the total water demand to the corresponding global variables and pushes them into the task queue stack for the underlying execution mechanism control program to read.
[0072] See attached document Figure 5 In specific implementations, step S3 provided by the present invention may include the following steps.
[0073] S301, the central control module 20 calls the hardware characteristic curve parameters of the electric regulating valve 30 pre-written in the system's internal non-volatile memory. In actual engineering, the opening degree of the electric regulating valve is controlled by a pulse width modulation signal, and the opening degree is physically related to the water flow velocity in the pipeline. This hardware characteristic curve characterizes the mapping relationship between the steady-state water flow rate of the electric regulating valve 30 and the input control command. Its specific mathematical expression is as follows:
[0074] ;
[0075] In the formula, This indicates the steady-state water flow rate of the electric regulating valve 30 at a specific control opening. This represents the flow gain constant, which reflects the mechanical structure of the valve and the resistance characteristics of the pipeline network. This indicates the duty cycle control command output by the central control module 20. The above-mentioned flow gain constant and basic offset can be obtained by multi-point calibration and fitting using a standard flow meter at different duty cycles before the equipment leaves the factory. For the mechanical transmission structure and motor drive circuit of the electric regulating valve, the underlying hardware implementation can be conventionally configured with reference to existing fluid control equipment.
[0076] S302, the central control module 20 obtains the theoretical total irrigation water demand pushed into the task queue in step S2, and dynamically matches the target working flow rate set in the system parameter area according to the magnitude of the theoretical total irrigation water demand. For example, when the theoretical total irrigation water demand is greater than the set large water volume threshold, a higher level of target working flow rate is matched to improve irrigation water replenishment efficiency; when the theoretical total irrigation water demand is less than the set large water volume threshold, a lower level of target working flow rate is matched to prevent surface water runoff. Subsequently, combined with the extracted hardware characteristic curve parameters, reverse analysis is performed to deduce the duty cycle control command required to maintain the target working flow rate. The specific mathematical expression is as follows:
[0077] ;
[0078] In the formula, The target duty cycle control command sent by the central control module to the underlying drive circuit; The target workload pre-defined by the system; To overcome the mechanical dead zone of valves and the foundation offset of pipeline foundation pressure; To reflect the flow gain constant of the valve's mechanical structure and pipeline resistance characteristics, the central control module 20 performs safety saturation limiting processing on the calculated target duty cycle control command. When the target duty cycle control command exceeds the upper or lower limit of the effective physical stroke allowed by the electric regulating valve 30, it is forcibly constrained within the safety boundary value. In this embodiment, the lower limit of the safety boundary value of the target duty cycle control command ranges from 15% to 20%, and the upper limit ranges from 90% to 95%. The central control module 20 writes the limited target duty cycle control command into the comparison register of the internal pulse width modulation generator to generate the corresponding electrical drive signal for the duty cycle.
[0079] S303, the central control module 20 extracts the aforementioned dynamically matched target working flow parameters and performs a division-by-zero check to check for data configuration anomalies. After confirming that the target working flow is greater than 0, the central control module 20 uses the extracted theoretical total irrigation water demand and the target working flow to perform a division operation to obtain the target irrigation duration. This calculation logic is based on the physical law that volume equals the integral of constant flow over time, and its calculation relationship is as follows:
[0080] ;
[0081] In the formula, Indicates the duration of continuous water supply to maintain the target operating flow rate; This represents the theoretical total irrigation water requirement; The system pre-calibrates the target working flow rate; the central control module 20 sends the target duty cycle control command to the drive circuit to drive the shaft of the electric regulating valve 30 to reach the calculated and set opening position. The hardware timer inside the central control module 20 is activated synchronously and starts counting in decrementing mode. When the timer count value reaches the target irrigation duration and triggers an overflow interrupt, the central control module 20 outputs a reset signal with a duty cycle of 0 to the drive circuit. The electric regulating valve 30 responds to the reset signal and moves to the fully closed state to cut off the water flow channel.
[0082] S304, in an embodiment of multi-block collaborative control, when the farmland area is large and divided into multiple independent measurement node areas, the central control module 20 expands the calculation logic in the above steps into an array. Specifically, the central control module 20 does not perform a single weighted average globally, but instead extracts the effective humidity value of the soil moisture sensor in the specific area covered by each branch pipeline, and independently substitutes it into the above irrigation demand calculation program and hardware characteristic curve model to calculate the independent target duty cycle control command required by each branch pipeline. The central control module 20 dynamically adjusts the basic opening of the electric regulating valve of the main pipeline according to the sum of the theoretical total irrigation water demand of all branch pipelines, and simultaneously sends each independent duty cycle control command to the corresponding branch pipeline electric regulating valve, thereby realizing distributed collaborative irrigation in which the main water supply pipeline ensures the global basic flow and the branch water supply pipelines realize precise quantitative water replenishment in the area.
[0083] See attached document Figure 6 In specific implementations, step S4 provided by the present invention may include the following steps.
[0084] S401, when the central control module 20 executes the automated irrigation process, it simultaneously extracts the weighted average effective humidity value of the current cycle, the theoretical total irrigation water demand, and the target duty cycle control command, converts the above parameters into a unified data type, and encapsulates them into a status data packet according to a preset communication protocol format. The internal data frame structure of the status data packet includes a frame header byte, a data payload field, a cyclic redundancy check code, and a frame tail byte.
[0085] The central control module 20 pushes the encapsulated status data packets to the wireless communication module 40 at a fixed frequency according to the built-in heartbeat timer. In this embodiment, the fixed frequency triggered by the heartbeat timer ranges from 0.5 Hz to 2 Hz. The wireless communication module 40 modulates the status data packets into radio frequency signals and broadcasts them to the outside, while keeping the receiving channel in a listening state to capture the reverse control data stream. The radio frequency antenna matching network and signal modulation and demodulation algorithm inside the wireless communication module can be designed conventionally with reference to existing standards.
[0086] S402, when the receiving channel of the wireless communication module 40 captures the manual irrigation command data stream sent by the external device, it extracts the key identifier bit of the command and the cyclic redundancy check code for legality verification. If the verification result does not match, the wireless communication module 40 triggers the underlying discard command to clear the current receiving buffer and increments the count value of the error status register by 1 for subsequent verification. After the legality verification is passed, the wireless communication module 40 sends a high-level trigger signal to the external interrupt input port of the central control module 20 through its hardware interrupt pin. After the core hardware of the central control module 20 captures the interrupt request, it identifies the corresponding preemption priority according to the internally pre-allocated interrupt vector table.
[0087] S403, after the central control module 20 identifies the highest preemption priority of the external interrupt request, it enters the designated external interrupt service subroutine. In the interrupt service subroutine, it triggers the system running state machine switching instruction, flips the current system working mode flag from automatic control mode to forced manual mode, and suspends the irrigation action task in the currently executing automated calculation main loop code. Through the above flag flipping operation, the central control module 20 quickly exits the external interrupt service subroutine, avoids the kernel being blocked for a long time, and hands over the mode switching event to the main loop to capture and prepare to execute the manual intervention action issued by the outside.
[0088] S404, after the main loop of the central control module 20 detects that the working mode flag has switched to forced manual mode, it reads the manual irrigation instruction data frame in the buffer of the wireless communication module 40 and extracts the forced opening parameter and forced irrigation duration parameter by parsing the data frame through a shift operation. The central control module 20 retrieves the maximum allowable stroke physical threshold of the electric regulating valve 30 fixed in the non-volatile memory and performs a limiting operation on the extracted forced opening parameter. In this embodiment, the value range of the maximum allowable stroke physical threshold is 90% to 95% of the duty cycle. The central control module 20 directly writes the limited forced opening parameter into the comparison register of the underlying pulse width modulation generator to bypass the original water flow parsing logic and drive the electric regulating valve 30 to run to the specified opening.
[0089] In step S405, while completing the overwrite of the underlying control register, the central control module 20 resets the count value of the internal hardware timer and assigns it to the parsed forced irrigation duration parameter to restart the countdown cycle. When the hardware timer decrements to zero and triggers an overflow interrupt to close the electric regulating valve 30, the central control module 20 forcibly clears the residual calculation instructions in the current automation task queue and the historical valid humidity values in the main data buffer, restores the system's working mode flag to automatic control mode, and triggers a brand-new analog-to-digital conversion data acquisition task, i.e., jumps to execute S1 to obtain the true current soil moisture of the farmland after artificial watering, avoiding over-irrigation caused by distortion of the automatic control basis due to directly restoring the historical data before the interruption.
[0090] Application Examples:
[0091] To aid in understanding the technical solution of this invention, the following is an application example based on a tomato planting plot with an area of 1000 square meters.
[0092] The system is initialized with the effective root absorption depth of the crop in the plot set at 0.3 meters and the soil bulk density correction factor determined by the ring cutter method is set at 1.3 grams per cubic centimeter. The system records a total of 3 effective soil moisture sensors 10, with each sensor having an initial weight coefficient that is equally distributed as one-third. The analog-to-digital conversion cycle parameter of the internal timer of the central control module 20 is set to 1000 milliseconds. The smoothing coefficient written to the non-volatile memory is set to 0.2. The lower limit of field water holding capacity (i.e., the lower limit of water requirement) corresponding to the current crop growth stage is set to 65%, and the upper limit of target saturation is set to 90%.
[0093] In a certain control cycle, the central control module 20 reads the raw digital values of three measurement nodes as 45%, 48%, and 42%, respectively, and the effective humidity value of the previous cycle is 50%. The central control module 20 iteratively calculates the effective humidity values of the three nodes in the current cycle as 49%, 49.6%, and 48.4% based on the first-order exponential smoothing filtering algorithm. By multiplying and adding the weights, the weighted average effective humidity of the region is obtained as 49%. The central control module 20 determines that 49% is lower than the lower limit threshold of water demand of 65% and triggers the irrigation demand calculation subroutine after continuous sampling verification. The central control module 20 calculates the current water deficit of farmland as 41% by subtracting the target saturation upper limit threshold of 90% from the weighted average effective humidity of 49%.
[0094] The central control module 20 substitutes the above parameters into the three-dimensional space theoretical total irrigation water demand calculation model to obtain the current theoretical total irrigation water demand as 1000×0.3×0.41×1.3=159.9 cubic meters. Based on this theoretical total irrigation water demand, the central control module 20 dynamically matches and sets the target working flow rate to 15 cubic meters per hour. It extracts the flow gain constant 30 and the basic offset 0 from the hardware characteristic curve of the electric regulating valve 30 to deduce the target duty cycle control command as 50%. The central control module 20 writes the 50% safety limit duty cycle into the underlying comparison register to drive the electric regulating valve 30 to the corresponding opening degree. At the same time, it uses 159.9 divided by 15 to obtain the target irrigation duration of 10.66 hours and starts the timer to count down the water supply.
[0095] During the 5th hour of the aforementioned automatic irrigation, an external smartphone terminal sends a manual irrigation command with a forced opening of 80% and a duration of 1 hour. After the central control module 20 captures the interrupt request from the wireless communication module 40, it suspends the main loop task and switches the working mode flag to the forced manual mode. Subsequently, the central control module 20 parses and extracts the forced opening and overwrites the underlying register to drive the electric regulating valve 30 to run to 80% opening. It resets the hardware timer to 1 hour for countdown. After the 1-hour countdown ends, it triggers a reset signal to close the electric regulating valve 30 and clear the historical cache data. The system jumps back to the automatic control mode and re-initiates analog-to-digital conversion to obtain the latest soil moisture.
[0096] Table 1: Statistical Table of Data from Two-Group Comparison Experiment
[0097] Experimental group Control method Total water consumption of the system (cubic meters) Soil moisture fluctuation variance Final yield per unit area (kg / m²) Experimental group (test plot A) The intelligent adjustment device of the present invention 312 12.4 8.2 Control group (test plot B) Traditional timer and frequency controller 485 45.8 6.5
[0098] According to Table 1 and Figure 7 and Figure 8 The total water consumption of the experimental group was 312 cubic meters, while that of the control group was 485 cubic meters. The total water consumption of the experimental group decreased by 35.67% compared to that of the control group. The soil moisture fluctuation variance of the experimental group was 12.4, while that of the control group was 45.8. The crop yield per unit area of the experimental group was 8.2 kg / m², while that of the control group was 6.5 kg / m².
[0099] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A small-scale intelligent water-saving irrigation device for farmland, characterized in that, include: A soil moisture sensor is used to collect raw humidity signals from the measurement nodes in the farmland and transmit the raw humidity signals to the central control module. The central control module is used to receive the original humidity signal, calculate the effective humidity value, compare the effective humidity value with the internally stored water demand lower limit threshold, and when the effective humidity value is less than or equal to the water demand lower limit threshold, calculate the theoretical total irrigation water demand and duty cycle control command for the current control cycle. The central control module has multi-channel pulse width modulation output capability. The electric regulating valve includes a main regulating valve installed on the main water supply pipeline and branch regulating valves installed on each branch water supply pipeline. It is used to receive duty cycle control commands independently issued by the central control module and to move to the set opening position to regulate the water flow of the corresponding pipeline. The wireless communication module is used to establish a data communication link between the central control module and external devices, send status data packets to the external devices, and receive manual irrigation commands sent by the external devices.
2. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 1, characterized in that, The central control module receives the raw humidity signal and calculates the effective humidity value, specifically including: The discrete raw electrical signal transmitted by the soil moisture sensor is read according to the analog-to-digital conversion cycle parameter set by the internal timer, and converted into the corresponding raw digital quantity; The first-order exponential smoothing filter algorithm is invoked to perform noise reduction processing and iterative calculation on the original digital quantity stored in the memory, so as to obtain the effective humidity value of each measurement node in the current sampling period. Based on the differences in physical zones where each measurement node is located, a corresponding weighting coefficient is assigned to each of the calculated effective humidity values, and a multiplication-addition operation is performed to calculate the weighted average effective humidity value that represents the overall moisture status of the current farmland area, which serves as the benchmark for the effective humidity value determined by the system.
3. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 2, characterized in that, The step of calling the first-order exponential smoothing filter algorithm to perform denoising processing and iterative calculation on the original digital quantity stored in the memory to obtain the effective humidity value of each measurement node in the current sampling period specifically includes: Extract the raw digital values acquired by the same measurement node in the current sampling period and the effective humidity value in the previous sampling period; The first product is obtained by multiplying the original digital value obtained in the current sampling period with a preset smoothing coefficient. The difference between the number one and the smoothing coefficient is multiplied by the effective humidity value of the previous sampling period to obtain the second product; The first product and the second product are added together, and the sum is used as the effective humidity value of each measurement node in the current sampling period.
4. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 2, characterized in that, After calculating the weighted average effective humidity value, which represents the overall moisture status of the current farmland area, using the multiplication-addition operation as the benchmark for the effective humidity value determined by the system, the following steps are also included: When the system diagnoses that the data of a certain measurement node exceeds the physical limit and determines that the sensor is faulty, the faulty measurement node is removed from the valid set and the number of remaining valid nodes is checked. If the number of remaining valid nodes is determined to decrease to zero, a sensor disconnection alarm flag is generated, and a reset signal is forcibly output to close the electric regulating valve to suspend the automated operation and control process. If the number of remaining valid nodes is determined to be greater than zero, the original weight coefficient of each remaining valid node is extracted and divided by the sum of the original weight coefficients of all remaining valid nodes. The calculated quotient is then used as a new weight coefficient and reassigned and normalized.
5. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 1, characterized in that, When the effective humidity value is less than or equal to the lower limit threshold for water demand, the central control module calculates the theoretical total irrigation water demand for the current control cycle, specifically including: When the effective humidity value is determined to be less than or equal to the lower water demand threshold, a continuous sampling verification program is started to determine whether the effective humidity value within the continuously set control cycle is lower than the lower water demand threshold. If the continuous verification passes, the pre-set target saturation upper limit threshold is extracted, and the difference between the target saturation upper limit threshold and the current effective humidity value is calculated to obtain the farmland water deficit in the corresponding measurement node area. The farmland water deficit, the corresponding farmland area value configured by the system, the crop root depth parameter, and the retrieved soil bulk density correction coefficient are multiplied sequentially. The product of all parameters is taken as the theoretical irrigation water demand of the region in the current control period. The total theoretical irrigation water demand is obtained by summing the theoretical irrigation water demand of all regions.
6. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 5, characterized in that, The central control module calculates the duty cycle control commands, specifically including: The global target operating flow rate of the main regulating valve is dynamically matched according to the theoretical total irrigation water demand, and the zone target operating flow rate of the corresponding branch regulating valve is independently matched according to the theoretical irrigation water demand of each region. The system calls the hardware characteristic curve parameters that are pre-written inside the system, which reflect the mapping relationship between the steady-state water flow of each electric regulating valve and the input control command. The hardware characteristic curve parameters include the flow gain constant and the basic offset. The difference between the target working flow rate and the basic offset is divided by the flow gain constant, and the resulting quotient is used as the corresponding target duty cycle control command. The partition duty cycle control command is calculated independently for the branch regulating valve, and the global duty cycle control command is calculated for the main regulating valve. The target duty cycle control command is subjected to safety saturation limiting processing, constrained within the safety boundary value allowed by the corresponding electric regulating valve, and a duty cycle control command is generated for sending to the drive circuit, thereby realizing distributed collaborative irrigation in which the main water supply pipeline ensures the global basic flow and the branch water supply pipelines realize precise quantitative water replenishment in the region.
7. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 6, characterized in that, After sending the duty cycle control command after amplitude limiting to the drive circuit to drive the shaft of the electric regulating valve to the set opening position, the method further includes: After confirming that the target working flow rate is greater than zero, the theoretical total irrigation water demand is divided by the target working flow rate, and the resulting quotient is used as the target irrigation duration. The internal hardware timer is activated synchronously and starts counting in a decrementing mode. When the count value of the hardware timer reaches the target irrigation duration and triggers an overflow interrupt, the central control module outputs a reset signal with a zero duty cycle to the drive circuit, causing the corresponding electric regulating valve to respond to the reset signal and move to a fully closed state to cut off the water flow channel.
8. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 1, characterized in that, The wireless communication module sends status data packets to the external device and receives manual irrigation commands from the external device, specifically including: When executing an automated irrigation process, the effective humidity value of the current cycle, the theoretical total irrigation water demand, and the duty cycle control command are extracted simultaneously, converted into a unified data type, and encapsulated into a status data packet according to a preset communication protocol format. The wireless communication module modulates the status data packet into a radio frequency signal and broadcasts it to the outside at a fixed frequency, and keeps the receiving channel in a listening state to capture the manual irrigation command data stream sent by the external device; Extract the key identifier bits and cyclic redundancy check codes from the manual irrigation command data stream for legality verification. If the verification passes, send a trigger signal to the external interrupt input port of the central control module via the hardware interrupt pin.
9. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 8, characterized in that, The central control module responds to the external interrupt by suspending the current automated operation control process, specifically including: After the kernel hardware of the central control module captures the trigger signal, it identifies the highest preemption priority of the external interrupt request based on the internally pre-allocated interrupt vector table. Enter the specified external interrupt service subroutine, trigger the system running state machine switching instruction, and flip the current system working mode flag from automatic control mode to forced manual mode; Suspend the irrigation task in the currently executing automated operation control process, exit the external interrupt service subroutine and hand over the mode switching event to the main loop.
10. The small-scale intelligent regulation device for water-saving irrigation in farmland according to claim 9, characterized in that, After the central control module receives the main cycle capture mode switching event, it extracts the opening and duration parameters from the manual irrigation command and directly drives the electric regulating valve according to the extracted parameters, specifically including: After detecting that the working mode flag has switched to forced manual mode, read the manual irrigation instruction data frame in the buffer of the wireless communication module, and parse and extract the forced opening parameter and the forced irrigation duration parameter. The maximum permissible stroke physical threshold is retrieved to perform a limiting operation on the forced opening parameter, and the limited forced opening parameter is written into the comparison register of the underlying pulse width modulation generator to drive the corresponding electric regulating valve to run to the specified opening. The count value of the internal hardware timer is reset and assigned to the forced irrigation duration parameter to start the countdown. When the countdown ends, an overflow interrupt is triggered to close the corresponding electric regulating valve. The residual calculation instructions in the automation task queue and the historical data in the main data buffer are cleared, and the working mode flag is restored to the automatic control mode to re-initiate the analog-to-digital conversion data acquisition task.