Next Article in Journal
TSE-YOLO: A Model for Tomato Ripeness Segmentation
Next Article in Special Issue
Monocular Vision-Based Clamping-Point Determination via Pose Estimation for Walnut Vibration Harvesting
Previous Article in Journal
Lethal Effect of Pulsed Electric Fields on Tribolium castaneum: Optimization and Mechanistic Insight into Electro-Neurotoxicity
Previous Article in Special Issue
Dynamic Task Scheduling Optimisation Method for Hilly Orchard Rail Transport Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development of an Online Automatic Water–Fertilizer Mixing Device Considering Direct Mixing of Raw Water

1
Faculty of Modern Agricultural Engineering, Kunming University of Science and Technology, Kunming 650500, China
2
Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China
*
Authors to whom correspondence should be addressed.
Agriculture 2026, 16(1), 3; https://doi.org/10.3390/agriculture16010003
Submission received: 13 November 2025 / Revised: 5 December 2025 / Accepted: 17 December 2025 / Published: 19 December 2025
(This article belongs to the Special Issue Agricultural Machinery and Technology for Fruit Orchard Management)

Abstract

To address the issue of low fertilizer proportioning accuracy in irrigation and fertilization systems due to neglecting the influence of target ions in raw water, this study designed a high-precision online automatic water–fertilizer mixing device that can directly mix raw water (without water purification treatment) with fertilizer stock solution. This device is capable of preparing mixed fertilizer solutions containing N, K, and Ca elements. It employs ion-selective electrodes and flow meters for online detection and feedback of target ion concentrations in the fertilizer solution and flow rate information, and adopts an online fertilizer mixing control strategy that uses a constant raw water flow rate and a fuzzy PID control method to dynamically adjust the pulse frequency of metering pumps, thereby changing the injection volume of nutrient solution. Simulation and experimental analyses show that the piping system of the device is reasonably designed, ensuring stable and smooth fertilizer injection. The temperature-compensated concentration detection models for the three target ions in the fertilizer solution, constructed using a stepwise fitting method, achieve average relative detection errors of 1.94%, 1.18%, and 2.87% for K+, NO3, and Ca2+, respectively. When preparing single-element or mixed fertilizer solutions, the device achieves an average steady-state error of no more than 4% and an average steady-state time of approximately 40 s. Compared with deionized water, the average relative errors for potassium ions, nitrate ions, and calcium ions when preparing fertilizer solutions with raw water are 1.33%, 1.12%, and 1.19%, respectively. Compared with the theoretical errors of fertilizer preparation with raw water, the fertilizer proportioning errors of this device for potassium ions, nitrate ions, and calcium ions can be reduced by a maximum of 10.55%, 66.84%, and 62.71%, respectively, which is superior to the performance requirements for water–fertilizer integration equipment specified in the national industry standard DG/T 274-2024. Additionally, the device achieves accurate and stable fertilizer proportioning with safe and reliable operation during 6 h of continuous operation. This device significantly reduces the impact of raw water on fertilizer proportioning accuracy, improves the adaptability of the device to irrigation water sources, and provides theoretical basis and technical support for water-fertilizer integration systems in cost-sensitive agriculture.

1. Introduction

Fertigation technology, which integrates irrigation and fertilization, is an indispensable component of modern agricultural development [1]. Intelligent irrigation–fertilization devices, equipped with sensors and automated control systems, based on this technology offer numerous advantages—water and fertilizer savings, high efficiency, intelligent operation, customizability, precise water–fertilizer control, and reduced water and soil pollution—and are being applied increasingly widely in agricultural irrigation and fertilization [2,3]. As a representative application, such a device typically uses a high-concentration nutrient solution as the fertilizer source. Power equipment draws water and nutrient solution into the pipeline for mixing; sensing equipment measures the in-line concentration and provides feedback; and the control system dynamically regulates the inlet water volume or the fertilizer injection rate, after which the formulated fertilizer solution is delivered to the crops [4]. At a larger scale, recent studies on vegetation dynamics and the terrestrial water cycle have shown that future vegetation changes can substantially affect global land greening and terrestrial water loss; for example, the work “Underestimating global land greening: Future vegetation changes and their impacts on terrestrial water loss” indicates that these processes may have been underestimated and that vegetation–water interactions will play an increasingly important role in future water-resource management [5]. These findings further underline the necessity of improving irrigation and fertigation efficiency and of developing precise, water-saving fertilization devices such as the system proposed in this study.
At present, most fertigation devices prepare fertilizer solution directly with untreated source water—such as lake water, groundwater, or reservoir water—without prior purification. Nutrient ions present in the source water (e.g., nitrogen and phosphorus) can combine with fertilizers and produce a water–fertilizer coupling effect, thereby compromising formulation accuracy [6,7,8]. For scenarios with stringent requirements on water–fertilizer precision—such as floriculture and substrate (soilless) cultivation—the common practice in production is to install expensive upstream water-purification systems to obtain ultrapure water for formulation [9,10], which is unsuitable for cost-sensitive agriculture. Therefore, there is an urgent need to design an online, automatic mixing device for irrigation and fertilization that can directly use untreated source water as the formulation water source while maintaining high formulation accuracy in the presence of target ions or interfering ions in the source water.
Currently, most traditional fertigation devices inject a fertilizer stock solution using either gravity-fed or suction-type mechanisms [11]. However, gravity-fed devices without external actuation deliver uneven fertilization, while suction-type devices are susceptible to variations in the main waterline pressure and flow; both approaches make automatic control and precise fertilizer injection difficult [12,13]. To achieve automatic and precise injection of the nutrient solution, researchers have leveraged the accurate and flexible flow-rate regulation of mechanical pumps: by mechanically driving the injector and modulating the pump output, the injected amount of nutrient solution can be precisely controlled, thereby ensuring the preset water-to-nutrient mixing ratio and enabling real-time, dynamic adjustment of the fertilizer solution concentration [14]. For example, one study developed an intelligent fertilization unit powered by a peristaltic pump [15]; tests reported a flow-rate accuracy of 94.89%, providing an important reference for precise nutrient-solution injection.
Common mixing strategies in fertigation devices include dynamic mixing and static mixing. In static mixing, neither external power nor a large mixing tank is required; water and the fertilizer stock solution mix in the pipeline during flow, offering advantages such as low energy consumption and a small footprint [16,17]. However, relying solely on the pipeline makes it difficult to achieve sufficient mixing of the water–fertilizer solution, which leads to nonuniform nutrient distribution, inaccurate measurement of fertilizer-solution concentration, reduced formulation accuracy, and uneven discharge of the fertilizer solution [18]. By contrast, dynamic mixing employs a stirrer and a mixing tank. Although it entails some energy consumption, it provides superior mixing performance, low user operation and maintenance costs, and thus better practicality and cost-effectiveness [19].
The automatic water–fertilizer regulation system is the core of fertigation devices for achieving automated and precise formulation. Accurate in-line detection and real-time feedback of fertilizer-solution concentration provide the essential basis for control decisions in water–fertilizer management systems [20]. Common online concentration measurement methods include the EC/pH method [21], the dielectric-property method [22], and the ion-selective electrode (ISE) method [23]. Among these, the ion-selective electrode (ISE) method—based on the Nernstian response, which describes the logarithmic relationship between electrode potential and ion activity—enables online detection of a specific ion within a multi-component mixed fertilizer solution [24]. In recent years, issues such as temperature sensitivity and cross-response have been substantially mitigated, while accuracy, sensitivity, and selectivity have improved, indicating broad application prospects. For example, one study developed a real-time online nitrogen-concentration detection device for fertilizer solutions by using a nitrate ISE as the core sensor and compensating temperature drift through a temperature-parameter model [25]. In addition, an artificial intelligence-assisted colorimetric sensor array based on supramolecular self-assembled nanozymes has been developed for the visual monitoring of pesticide residues, further demonstrating the potential of combining advanced functional materials with intelligent data analysis for highly sensitive and selective detection [26].
To achieve rapid and precise regulation of water and fertilizer, researchers have combined traditional control methods—such as fuzzy control and PID control—with machine learning and artificial intelligence algorithms to design multiple automatic water–fertilizer regulation systems [27,28]. For instance, a fertigation control system employing a fuzzy PID algorithm dynamically adjusts the frequency of a variable-frequency fertilizer-injection pump, thereby realizing fast and precise control of the fertilizer-solution electrical conductivity [29]. Therefore, adopting a fuzzy PID control algorithm in combination with appropriate hardware to design an automatic water–fertilizer regulation system is of great significance for enhancing both the formulation accuracy and the automation level of the device.
This study addresses how untreated source water affects formulation accuracy in existing fertigation devices. An STM32 microcontroller serves as the main controller. A constant formulation-water flow rate is combined with a metering pump for precise nutrient-solution injection, together with an on-demand “prepare-and-apply” regulation strategy. Based on the ion-selective electrode (ISE) method, a detection model is established for the target-ion concentration, and a fuzzy-PID control scheme dynamically modulates the metering pump’s pulse frequency to adjust the injected amount of nutrient solution. On this basis, a high-precision, online, automatic water–fertilizer mixing device is developed that directly uses untreated source water as the formulation water source. The device aims to reduce the influence of 60% of raw water, improve formulation accuracy (fertilization error less than 5%, steady-state time less than 1 min), reduce costs, and enhance applicability across agricultural irrigation water sources, and provide a new avenue for research on fertigation equipment.

2. Design of the Device

2.1. Device Structure and Working Principle

An online automatic water–fertilizer mixing unit (3D model diagram in Figure S5) was constructed, comprising a frame, a controller, three nutrient tanks, a dynamic buffer tank (internal components in Figure S1), five level sensors, solenoid valves, a flowmeter, a variable-frequency drive (VFD), a stirrer, a suction pump, three metering pumps, a fertilizer pump, three ion-selective electrodes (ISEs), and a temperature sensor (Figure 1). The system was configured with one main pipeline and three nutrient pipelines. The inlet of the main pipeline was connected to the external water network, whereas the outlet was connected to the irrigation manifold; conversely, each nutrient pipeline drew from its respective nutrient tank and discharged into the main pipeline. Solenoid valves were installed at the water inlet, the nutrient-injection port, and the fertilizer-outlet port to control, respectively, the on–off states of the intake line, the water–fertilizer mixing line, and the discharge line.
The three nutrient tanks were used to store potassium-, nitrogen-, and calcium-based nutrient solutions, while the dynamic buffer tank held the mixed fertigation solution. Notably, level sensors mounted near the lower outer wall of each nutrient tank and near the upper outer wall of the buffer tank were used to detect, respectively, the lower limit of nutrient level and the upper limit of mixed-solution level. The suction pump and the three metering pumps were employed to draw the external water source and the corresponding nutrient solutions. The stirrer was used to thoroughly mix the raw water with the dosed nutrients to obtain a homogeneous water–fertilizer mixture. In addition, the ISEs were used to monitor the concentrations of K+, NO3, and Ca2+, the temperature sensor recorded the real-time temperature of the fertilizer solution, and the flowmeter measured the flow rate.
Based on the feedback of target ion concentrations and flow information, the controller adjusted the VFD operating frequency to govern the start–stop state and rotational speed of the suction pump and, therefore, regulated the pulse frequency of the metering pumps to dose nutrients with high precision. Consequently, online automatic water–fertilizer mixing was achieved.
The operating principle of the unit was as follows: mixed fertigation solutions containing potassium, nitrogen, and calcium were prepared on demand and applied synchronously according to the actual fertilization requirement. Specifically, a control strategy with a constant water flow rate and dynamically adjusted nutrient-dosing rates was implemented. The suction pump delivered raw water to the main pipeline at the rated flow, whereas the metering pumps injected the respective nutrient solutions into the main pipeline in accordance with the target application concentrations. The water–fertilizer mixture was then conveyed into the dynamic buffer tank, where continuous stirring ensured more complete and uniform mixing.
At each time step during ratio control, the required dosing rates of the individual nutrient solutions were finely regulated by modulating the pulse frequency of the metering pumps. Moreover, to further achieve precise proportioning, mathematical models of the target ion concentrations established from preliminary experiments were used, the ion-selective electrodes and the temperature sensor provided real-time measurements of the target ion concentrations in the mixed solution, which were fed back to dynamically adjust the nutrient-dosing rates. In parallel, the flowmeter verified whether the cumulative discharge of the mixed solution met the prescribed application volume; therefore, closed-loop control of online automatic water–fertilizer mixing was realized.

2.2. Hardware Design

The hardware of the online water–fertilizer mixing system (Figure 2) was organized into five modules: control, detection, actuation, human–machine interaction, and power supply. The STM32F103VET6 microcontroller served as the core controller.
In the detection module, ion-selective electrodes were interfaced to the microcontroller via a signal-conditioning step-down module that converted their 0–10 V outputs to 0–3.3 V, enabling acquisition by the analog-to-digital converter (ADC). The flowmeter and the temperature sensor were connected to the microcontroller’s serial interface through an RS-485 repeater—supporting multi-drop RS-485 devices—and a TTL-to-RS-485 transceiver, which performed level and protocol conversion; conversely, the level sensors were wired directly to the ADC inputs.
In the actuation module, the suction pump’s supply was taken from the output of a variable-frequency drive (VFD), and the VFD communicated with the microcontroller through a TTL-to-RS-485 transceiver on the serial interface. The metering pumps were driven through voltage-to-current converters that transformed the 0–3.3 V signals from the digital-to-analog converter (DAC) into 4–20 mA control currents, thereby adjusting the pumps’ pulse frequency. The fertilizer pump, the stirrer (model GEAR-220V-90W, Changzhou Dinggao Environmental Protection Equipment Co., Ltd., Changzhou, China), and the solenoid valves were connected to the microcontroller’s outputs through relays; notably, control commands issued by the microcontroller actuated the relays, which in turn drove these devices.
For human–machine interaction, an industrial HMI (Weintek TK8072iP) was linked to the microcontroller’s serial interface via a TTL-to-RS-485 transceiver to enable bidirectional communication. The power-supply module provided three rails—AC 220 V, DC 24 V, and DC 3.3 V—to satisfy the requirements of different components. The model numbers and specifications of the hardware in each module are listed in Table 1.

2.3. Control System Design

2.3.1. Fuzzy Controller Design

Given the nonlinear, time-varying, and lagging characteristics of water–fertilizer mixing, an accurate mathematical model was difficult to establish [30]. Therefore, a fuzzy PID control strategy was adopted. The real-time target ion concentrations of the fertilizer solution were treated as the controlled variables; ion-selective electrodes served as the feedback elements; and the metering pumps functioned as the actuators, thereby forming a closed-loop online mixing control system.
The deviation of the target ion concentration, (e = ry, where r and y denote the setpoint and the measured (actual) values of the target ion concentration, respectively), and its rate of change, ec, were used as input variables to a two-dimensional fuzzy controller comprising fuzzification, fuzzy inference, and defuzzification. Notably, the basic and fuzzy universes of discourse for e, ec, and the output increments ΔKp, ΔKi and ΔKd were specified as in Table 2. The fuzzy linguistic sets for e, ec, and ΔKp, ΔKi, ΔKd were all defined as {NB, NM, NS, ZO, PS, PM, PB}; Gaussian membership functions were employed for the continuous and smooth inputs e and e c [31], whereas triangular membership functions were assigned to the outputs ΔKp, ΔKi and ΔKd to satisfy computational efficiency requirements [32].
Based on expert knowledge, empirical experience, and system requirements, fuzzy control rules were formulated as shown in Table 3. Using an If–Then representation, the fuzzy logical relationships between ΔKp, ΔKi, ΔKd and e, ec yielded 49 conditional statements, which collectively constituted the rule base for inference. Finally, defuzzification was performed using the centroid-of-area method [33]; consequently, the centroid of the area enclosed by the membership functions and the abscissa was taken as the final output, namely the precise pulse frequency command for the metering pumps. As a result, online tuning of ΔKp, ΔKi and ΔKd was realized to maintain the ion concentrations at their targets.

2.3.2. System Operation Process

According to the aforementioned operating principle, the workflow of the online automatic water–fertilizer mixing system was established as shown in Figure 3. An immediate preparation and application strategy was implemented whereby mixed fertilizer solutions containing potassium, nitrogen, and calcium were prepared and applied on demand. Specifically, the solution was configured under a constant raw-water flow rate, while the nutrient-dosing rates were dynamically regulated by a fuzzy-control scheme in accordance with the target application concentrations.
Ion concentrations in the mixed solution were monitored online by ion-selective electrodes; once the setpoints were achieved, the prepared fertilizer solution was extracted by the fertilizer pump and delivered to the irrigation manifold. In parallel, the flowmeter measured and accumulated the applied volume in real time. When the prescribed application volume was reached, the proportioning and mixing process was terminated; therefore, a complete cycle of on-demand mixing and delivery was accomplished.

3. Materials and Methods

3.1. Test Materials

Considering that crops demand potassium and nitrogen most strongly and that calcium is an essential medium-quantity nutrient, K, N and Ca were selected for the fertigation proportioning study. To minimize interference from extraneous impurities, analytical-grade solids were employed as unit fertilizers: potassium chloride (KCl, ≥99.5%), sodium nitrate (NaNO3, ≥99.0%), and monocalcium phosphate (Ca(H2PO4)2, ≥99.2%) produced by China National Pharmaceutical Group Chemical Reagent Co., Ltd., Shanghai, China.
Because the solubilities of the analytical-grade salts differ—and to better emulate practical application—each reagent was weighed with an analytical balance (readability 0.1 mg) and dissolved in deionized water. Using fixed-volume (volumetric) preparation, ten concentration levels were formulated for each target ion:
K+ at 1–10 g/L in 1 g/L increments, NO3 at 1–10 g/L in 1 g/L increments, and Ca2+ at 0.25–2.50 g/L in 0.25 g/L increments, yielding 30 solutions in total. For each solution, temperature conditioning was performed in a constant-temperature water bath over 5–45 °C in 5 °C increments, resulting in nine temperature levels.
To evaluate the influence of pre-existing target ions in raw water on the proportioning accuracy of the device, eight raw-water sources (all used for irrigation) were collected from distinct regions, river systems, and water types within Yunnan Province. The concentrations of K+, NO3 and Ca2+ in these samples were determined by an accredited testing organization (PONY Testing Co., Ltd., Shanghai, China), as summarized in Table 4. Sampling was conducted during the dry season (May–June), under stable weather conditions.
As shown in Table 4, the concentrations of the target ions in the eight raw-water sources varied markedly—K+ at 0.47–16.20 mg/L, NO3 at 0.50–236.00 mg/L, and Ca2+ at 23.70–195.00 mg/L. Notably, these background levels constituted a substantial fraction of the application-level concentrations (on the order of 100 mg/L) and, in several cases, approached the intended dosing levels. Therefore, the influence of raw-water ions on proportioning accuracy could not be neglected; moreover, higher background concentrations exerted more pronounced effects. The heterogeneity in ion contents among raw-water sources consequently led to fluctuations in proportioning accuracy for conventional fertigation devices.

3.2. Determination of Selectivity Coefficients for Interfering Ions

Ion-selective electrodes (ISEs) generate response potentials to both target ions and interfering ions in solution. To investigate the degree of interference exerted by other ions in the solution on the target ion, the selectivity coefficient Kij was introduced. In this study, the fixed interference method—a subtype of the mixed solution method—was employed. Specifically, the concentration of interfering ions was fixed while that of target ions was varied. Under ambient temperature, potassium chloride, sodium nitrate, and calcium dihydrogen phosphate solutions were prepared using deionized water, with concentrations of potassium, nitrate, and calcium ions ranging from 10−6 to 10−1 mol/L (spanning the order of magnitude of 10−1 mol/L). The concentration of interfering ions was fixed at 10−2 mol/L, and a series of mixed solutions were prepared with stirring. For each mixed solution, three replicate measurements were performed (n = 3); the corresponding standard deviation was also calculated to evaluate measurement variability. The selectivity coefficient was calculated when the electrode response potential determined by the target ion was equal to that determined by the interfering ion (Equation (1)).
    K i j = c i c j n i / n j
wherein Kij is the selectivity coefficient; ci is the concentration of the target ion, g/L; cj is the concentration of the interfering ion, g/L; n is the charge number of the target ion (with sign: positive for cations and negative for anions).

3.3. Methods for Construction and Validation of the Concentration Detection Model for Target Ions in Fertilizer Solution

3.3.1. Methods for Construction of the Concentration Detection Model for Target Ions in Fertilizer Solution

In this study, ion-selective electrode (ISE) methodology was employed to construct the concentration detection model for target ions in fertilizer solutions. Specifically, the corresponding ISEs were immersed in the aforementioned target fertilizer solutions, and a multimeter was used to measure the response potentials of the ISEs in each solution. Through regression analysis, multiple functions were tested for curve fitting of the experimental data (concentration vs. electrode response potential) of each target fertilizer solution. The regression equation with the highest goodness of fit (i.e., the largest coefficient of determination, R2) was selected as the concentration detection model for target ions in fertilizer solutions at ambient temperature.
The temperature variation range (5–45 °C) in this study is small, and its effect on the activity of the target ions can be neglected. Therefore, both the electrode response slope and the standard electrode potential (intercept) in the Nernst equation are treated as functions of temperature, and the Nernst equation can be rewritten as Equation (2).
Subsequently, using the stepwise fitting method based on the least squares principle, linear fitting curves of temperature (t) with slope [f(t)] and intercept [e(t)] were established, respectively. Regression equations describing the relationships of slope and intercept with temperature were derived and substituted into Equation (2), thereby constructing temperature-compensated concentration detection models for the three target ions in fertilizer solutions.
E = f ( t ) × l n ( c ) + e ( t )
wherein: E is the electrode response potential, V; t is the temperature of the target fertilizer solution, °C; f(t) is the function of electrode response slope with respect to temperature; e(t) is the function of standard electrode potential with respect to temperature; c is the concentration of the target ion, g/L.

3.3.2. Methods for Validation of the Concentration Detection Model for Target Ions in Fertilizer Solution

After the construction of the temperature-compensated concentration detection model for target ions in fertilizer solutions, its performance must be validated. Specifically, response potentials of target fertilizer solutions with different concentrations were measured using ion-selective electrodes (ISEs) at varying temperatures. These potentials were substituted into the model to obtain the detected values of target ion concentrations, thereby calculating the relative errors (Equation (3)). Furthermore, by comparing with the concentration detection model for target ions in fertilizer solutions at ambient temperature, the temperature-compensated model was validated to determine whether it meets the requirements for accurate detection of target ion concentrations in fertilizer solutions.
δ = | c a c t | c a × 100 %
wherein: δ is the relative error; ca is the actual value of target ion concentration, g/L; ct is the detected value of target ion concentration, g/L. Using raw water listed in Table 4 as the fertilizer-mixing water source, a series of target fertilizer solutions with different concentrations were prepared for potassium fertilizer, nitrogen fertilizer, and calcium fertilizer, respectively. The effectiveness of the concentration detection model for target ions in fertilizer solutions (using raw water) was then tested in these target fertilizer solutions at varying temperatures.
To reduce the experimental workload while ensuring representativeness, the following experimental protocol was adopted: The impact of different raw water sources on the proportioning accuracy of each target ion was divided into three levels: high, medium, and low. The “high”, “medium”, and “low” impact levels are defined according to the magnitude of the electrode response contributed by the target ions in the raw water. From the 8 raw water sources listed in Table 4, 3 sources were selected for each of potassium ions, nitrate ions, and calcium ions, covering lake water, groundwater, and rainwater and representing the three impact levels.
Accordingly, potassium chloride solutions with low, medium, and high concentrations (1.5 g/L, 5.5 g/L, and 9.5 g/L) were prepared using raw water 1, 3, and 8, respectively. Sodium nitrate solutions with low, medium, and high concentrations (1.5 g/L, 5.5 g/L, and 9.5 g/L) were prepared using raw water 1, 4, and 5, respectively. Calcium dihydrogen phosphate solutions with low, medium, and high concentrations (0.38 g/L, 1.38 g/L, and 2.38 g/L) were prepared using raw water 4, 5, and 6, respectively.
For the target fertilizer solutions with three concentration gradients prepared using each raw water source, their temperatures were adjusted to three different levels (10 °C, 20 °C, and 30 °C) using a constant temperature water bath. During the experiment, for each sample of target fertilizer solution corresponding to a specific target ion, the respective potassium/nitrate/calcium ion-selective electrode (ISE) was immersed in the solution. After measuring the ISE response potential, the value was substituted into the constructed temperature-compensated concentration detection model for target ions in fertilizer solutions to calculate the detected values and relative errors of the target ion concentrations.

3.4. Simulation Method for Hydrodynamic Performance of the Device’s Pipeline System

Within Fluent software (ANSYS Fluent 2024 R2), the internal flow field domain of the device’s pipeline system was extracted, and solid components not involved in flow field analysis were excluded to construct the simulation model as shown in Figure 4. A single-precision solver was used to divide the model into meshes with sizes ranging from a minimum of 0.2 mm to a maximum of 2.0 mm [34]. A grid-independence study was carried out by comparing three mesh densities (coarse, medium, and fine), and the medium mesh, containing approximately 2 × 105 elements, was selected because further refinement produced negligible changes in the predicted velocity and pressure fields. The standard k-ε model was selected to describe the flow characteristics of the fluid within the pipeline [35].
For boundary condition settings, to simulate the operating conditions of the device under near-full-load operation, fluid velocities in the pipeline were set based on the rated flow rates of the water suction pump, metering pump, and fertilizer solution pump: specifically, inlet-water was 0.90 m/s; inlet-K, inlet-N, and inlet-Ca were all 0.04 m/s; and inlet-fertilizer was 0.28 m/s. Meanwhile, the boundary pressures at the main pipeline outlet, nutrient solution pipeline inlet, and fertilizer outlet pipeline were set to 0.2 MPa, 0 MPa, and 0.15 MPa, respectively. Under these operating conditions, the flow regime was characterized by the Reynolds number:
R e   =   ρ v D μ
where ρ is the density of the fertilizer solution, v is the cross-sectional average velocity, D is the pipe diameter, and μ is the dynamic viscosity. In the simulations, the fertilizer solution was assumed to have physical properties close to those of water at 20 °C, with ρ ≈ 1000 kg/m3 and μ ≈ 1.0 × 10−3 Pa·s. The main mixing pipeline was modeled with an inner diameter of 28 mm and a flow velocity of 0.90 m/s, while the fertilizer outlet pipeline was modeled with an inner diameter of 16 mm and a flow velocity of 0.28 m/s. These parameters were used to evaluate the Reynolds number and characterize the flow regime in the subsequent hydrodynamic analysis.
The simulation focused on analyzing the pressure distribution and velocity distribution within the pipeline, thereby verifying the rationality of the pipeline system design and the hydrodynamic performance of the device during operation.

3.5. Test Device and Performance Test Method

Based on the device structure design described earlier, a prototype of the online automatic water-fertilizer mixing device was developed (Figure 5a). The main frame of the device is constructed from aluminum profiles (European standard 4040C) with dimensions (length × width × height) of 1.0 m × 0.8 m × 1.3 m; a vertical multi-layer structure (4 layers in total, with layer spacing from bottom to top being 30 cm, 40 cm, and 40 cm in sequence) is used to arrange and integrate various hardware devices in an orderly manner; the bottom is equipped with 4 casters that are rotatable in any direction and have a locking function, to enhance the flexibility of the prototype and its adaptability to different terrain conditions.
The main pipeline of the device is a DN25 PVC pipe (diameter 32 mm), the nutrient solution pipelines are PE hoses (diameter 10 mm), the nutrient solution tanks (fertilizer mixing tanks) have a capacity of 10 L (15 L), and the fertilizer outlet pipeline is a DN15 PVC pipe (diameter 20 mm). The device includes three core modules: water-fertilizer injection and mixing, water-fertilizer measurement and control, and water-fertilizer irrigation. The components required for each module are shown in Figure 5b, Figure 5c, and Figure 5d, respectively.
In this study, the device prototype was used to conduct tests on proportioning accuracy, steady-state time, degree of raw water impact, and long-term stability to verify the performance of the device during actual operation. The specific experimental methods are as follows:
(1) For preparing single-component fertilizer solutions: the device prepared potassium and nitrogen fertilizers at concentrations ranging from 1 to 9 g/L sequentially in steps of 2 g/L; for calcium fertilizer, it was prepared at concentrations ranging from 0.25 to 2.25 g/L sequentially in steps of 0.5 g/L. Each concentration was tested in triplicate to ensure reproducibility.
For preparing mixed fertilizer solutions: to reduce the number of experiments, potassium ions, nitrate ions, and calcium ions were each divided into three concentration levels (low, medium, and high). The orthogonal design method was adopted, and the 3 target ions with 3 concentration levels each resulted in 9 combinations (Table 5). The device was then used to prepare these 9 mixed fertilizer solutions sequentially.
(2) According to the aforementioned experimental protocol, the device was started and operated to sequentially prepare single-component or mixed fertilizer solutions with set concentrations. Ion-selective electrodes (ISEs) and temperature sensors detected and fed back in real-time the response potential and temperature of the fertilizer solution. The microcontroller invoked the temperature-compensated concentration detection model for target ions in fertilizer solution to calculate the detected values of target ion concentrations. The target ion concentration values were recorded every 1 s, curves of target ion concentration versus time were plotted, and the fertilizer-mixing accuracy (Equation (5)) and steady-state time were calculated. The steady-state time is defined as the time when the measured target ion concentration in the fertilizer solution reaches the set value and subsequent errors do not exceed ±5%.
Fertilizer solutions with different target ion types and concentrations were prepared using different raw water sources, and the relative errors compared with fertilizer mixing using deionized water were calculated. The theoretical error of fertilizer mixing with raw water (i.e., the fertilizer-mixing error without the control system proposed in this study) is calculated as described in Equation (6). Notably, Equation (6) quantifies the theoretical deviation that arises solely from the target ions originally present in the raw water, without considering sensor errors or control errors.
P = 1 m a x | C a C t | C a × 100 %
wherein: P is the fertilizer-mixing accuracy; ca is the actual value of target ion concentration, g/L; ct is the detected value of target ion concentration, g/L.
e = b C f + b × 100 %
wherein: e is the theoretical error of fertilizer mixing with raw water; Cf is the target ion concentration of fertilizer solution prepared with different raw water sources, g/L; b is the target ion concentration of fertilizer solution measured from different raw water sources listed in Table 4, g/L. Thus, Cf + b represents the actual ion concentration in the mixed fertilizer solution, and Equation (6) quantifies the fraction of the final concentration that originates from the raw water, i.e., the theoretical contribution of raw water to the overall mixing error.
(3) The potassium ion concentration was set to 5 g/L, nitrate ion concentration to 8 g/L, and calcium ion concentration to 2 g/L, with the fertilizer application rate set to 1.2 m3. The device was started and operated to prepare mixed fertilizer solutions containing potassium, nitrogen, and calcium nutrients based on the set fertilization parameters. Ion-selective electrodes (ISEs) were used to detect and feed back the target ion concentrations in the fertilizer solution, and the stability and accuracy of the device during long-term fertilizer mixing were analyzed based on the fluctuation of these target ion concentrations.
Meanwhile, during the continuous operation of the device, observations were made to check for abnormal conditions such as equipment operation failures, pipe leakage or blockage, and sensor data transmission errors.

4. Results and Analysis

4.1. Construction of the Concentration Detection Model for Target Ions in Fertilizer Solution Based on ISE

4.1.1. The Impact of Interfering Ions in Raw Water on the Determination of Target Ions by ISE

As shown in Table 6, except for the selectivity coefficient of the potassium ion-selective electrode for NH4+ and that of the nitrate ion-selective electrode for NO2, which are on the order of 10−2, the selectivity coefficients of each ion-selective electrode (ISE) for other interfering ions are on the order of 10−3 or lower. Although the selectivity coefficients of the potassium ISE for NH4+ and of the nitrate ISE for NO2 are relatively larger (on the order of 10−2 mol/L), the concentrations of NH4+ and NO2 in the raw water samples are typically in the range of 10−4–10−6 mol/L [36], whereas the target ion concentrations in the fertilizer solutions are on the order of 100 mol/L. Therefore, the ratio between interfering and target ions is much smaller than the corresponding selectivity coefficients, and the resulting interference on the determination of K+ and NO3 is extremely weak. This indicates that interfering ions in raw water have little impact on the determination of target ions by ISE.

4.1.2. Construction of the Concentration Detection Model for Target Ions in Fertilizer Solution at Ambient Temperature

At ambient temperature, for the three target ions (potassium ions, nitrate ions, and calcium ions) in fertilizer solutions, the regression analysis method was used to construct the corresponding relationship between ISE response potential and ion concentration. The regression equation with the best goodness of fit was selected as the concentration detection model, as shown in Figure 6.
As can be seen from Figure 6, the coefficients of determination (R2) of the concentration detection models for potassium, nitrate, and calcium ions in fertilizer solutions at ambient temperature are 0.9982, 0.9991, and 0.9988, respectively, indicating that the models have high reliability.

4.1.3. Construction of the Concentration Detection Model for Target Ions in Fertilizer Solution Based on Temperature Compensation

Since the operating performance of ion-selective electrodes (ISEs) is easily affected by ambient temperature, when detecting fertilizer solutions with a fixed concentration but varying temperatures, the electrode response potential will exhibit temperature drift, resulting in errors in ion concentration detection. To reduce the detection errors of target ion concentrations caused by temperature variations, linear fitting curves of the logarithm of potassium, nitrate, and calcium ion concentrations versus response potential at different temperatures were plotted (Figure 7), based on the response potential data of target ions with different types and concentrations measured at different temperatures.
As shown in Figure 7, for target ions at the same concentration, the influence of temperature variation on the measured response potential values follows a linear pattern. Both the electrode response slope K = RT/nF and the standard potential (slope) E0 are linear functions of temperature.
Data on the slopes and intercepts of the regression equations for the logarithms of potassium (nitrate, calcium) ion concentrations versus response potential at different temperatures were obtained from Figures S2–S4 (Table 7).
Based on the slope and intercept data in Table 7, using the stepwise fitting method, linear fitting curves of temperature versus slope and intercept for potassium (nitrate, calcium) ions were established (as shown in Figure 8a, Figure 8b, and Figure 8c, respectively), thereby obtaining functional expressions of slope and intercept with respect to temperature.
Substituting these functional expressions into Equation (2), the temperature-compensated concentration detection models for potassium, nitrate, and calcium ions in fertilizer solution were constructed, as shown in Equations (7), (8), and (9), respectively:
c = e E 0.0088 t 0.5209 0.0002 t + 3.9566
c = e E + 0.0083 t 9.5289 0.0002 t 3.9515
c = e E 0.0075 t 5.3949 0.0001 t + 2.0257

4.1.4. Validation of the Concentration Detection Model for Target Ions in Fertilizer Solution Based on Temperature Compensation

First, potassium (nitrate, calcium) ion-selective electrodes were immersed in potassium chloride (sodium nitrate, calcium dihydrogen phosphate) solutions with different temperatures and concentrations, and their ISE response potentials were measured.
Subsequently, each ISE response potential was substituted into the temperature-compensated concentration detection models and the ambient temperature concentration detection models for potassium (nitrate, calcium) ions in fertilizer solution, respectively. The corresponding relative errors in detecting potassium (nitrate, calcium) ion concentrations were obtained, as shown in Figure 9.
Compared with the ambient temperature models, which exhibited maximum relative errors of 6.47% (5.07%, 9.21%) and average relative errors of 2.69% (2.31%, 3.80%) for potassium (nitrate, calcium) ions, the temperature-compensated models showed maximum relative errors of 3.33% (1.93%, 4.21%) and average relative errors of 1.23% (0.86%, 1.40%). The temperature-compensated models exhibited smaller detection errors and higher detection accuracy, which can meet the requirements for accurate detection of potassium, nitrate, and calcium ion concentrations in fertilizer solutions.
As shown in Figure 10, when using raw water as the water source for fertilizer preparation, the maximum relative errors of the temperature-compensated models for potassium, nitrate, and calcium ions in fertilizer solution are 5.03%, 3.08%, and 5.71%, respectively, with average relative errors of 1.94%, 1.18%, and 2.87%, respectively. These results meet the requirements for accurate detection of target ion concentrations in fertilizer solution when using raw water.

4.2. Simulation Analysis of the Control System Model for Target Ion Concentration in Fertilizer Solution

The output response of the fuzzy controller was analyzed using Matlab’s Surface Viewer tool (MATLAB R2022b). The output response surface diagram of the fuzzy controller is shown in Figure 11.
As can be seen from this diagram, the output response surface of the fuzzy controller is smooth without abrupt changes, indicating that the response of the output variable to the input variable is continuous and there are no contradictory or conflicting rules. This verifies the rationality of the fuzzy control rule design and the effectiveness of the fuzzy control system.
A PID control-based system model for regulating target ion concentration in fertilizer solution was constructed on the Simulink platform. The three parameters (Kp, Ki, and Kd) of PID control were obtained via the trial-and-error method, with values of 15, 6.5, and 15.5, respectively.
By importing the fuzzy controller and combining it with PID control, a fuzzy PID control-based system model for regulating target ion concentration in fertilizer solution was constructed (Figure 12). In the model, the target ion concentration was set to 2.0 g/L, and the system was started to operate and simulate the preparation of fertilizer solution with the set concentration; the simulation results are shown in Figure 13.
As can be seen from the figure, the fuzzy PID control exhibited a rise time of 20 s, a steady-state time of 38 s and an overshoot of 15%, which can meet the requirements for fast, accurate, and stable fertilizer preparation.

4.3. Analysis of the Hydrodynamic Performance of the Piping System of the Device

Using Fluent software, the pressure distribution (Figure 14a) and velocity distribution (Figure 14b,c) of the piping system were analyzed to verify the overall hydrodynamic characteristics of the device.
As can be seen from Figure 14a, the pressure distribution in the piping system is uniform, and the design of pipe diameter, length, and bending angle is reasonable, effectively avoiding pressure loss and turbulence. Under the conditions where the outlet static pressure is set to 0.2 MPa (main pipeline) and 0.15 MPa (fertilizer outlet pipeline), the measured maximum static pressure on the pipe wall is 0.207 MPa and 0.158 MPa, respectively, which is much lower than the 1.6 MPa rated pressure-bearing capacity of the pipe material, ensuring reliable safety. The total pressure drop of the main pipeline and fertilizer outlet pipeline is 0.007 MPa (0.7 m head) and 0.008 MPa (0.8 m head), respectively, which is significantly lower than the rated head of 20 m for the water pump and 15 m for the fertilizer pump [37]. This ensures no issues of insufficient liquid supply or inadequate fertilizer pumping during operation, verifying the practicability and reliability of the device. With an inner pipe diameter of 28 mm and a flow velocity of 0.90 m/s, the Reynolds number in the main mixing pipeline was approximately 2.5 × 104, indicating a fully turbulent flow regime. For the fertilizer outlet pipeline, with an inner diameter of 16 mm and a flow velocity of 0.28 m/s, the Reynolds number was approximately 4.4 × 103, which is also close to or within the turbulent regime. These values confirm that the use of the standard k–ε model is appropriate for the simulated flow conditions.
As shown in Figure 14b, the fluid velocity in the piping system changes smoothly (with a gradual color change of the flow lines) without severe fluctuations, indicating a reasonable design and uniform mixing of water and fertilizer. The velocity near the water pump is the highest (red area), while the velocity decreases at the pipe joints due to local resistance, which conforms to the law of energy conversion in fluid mechanics.
From Figure 14c, it can be observed that the nutrient solution can be stably injected into the main pipeline without backflow, and the fluid in the main pipeline does not flow back into the nutrient solution pipeline, verifying the rationality and reliability of the design at the junction.

4.4. Performance Verification Test of the Device

4.4.1. Test of Proportioning Accuracy and Steady-State Time

The test device was tested according to the device performance test method described above. The curves of target ion concentration varying with time when the device prepares single-element fertilizer solutions are shown in Figure 15, while the fertilizer proportioning accuracy and steady-state time of the device when preparing single-element and mixed fertilizer solutions are shown in Figure 16 and Figure 17, respectively.
As can be seen from Figure 15, when the device prepares single-element fertilizer solutions of potassium, nitrogen, and calcium, respectively, the real-time concentration values of target ions in the fertilizer solution all stabilize around 40 s, at which point the device reaches a stable working state. During stable operation, the measured values of target ion concentration in the fertilizer solution fluctuate slightly around the set value over time.
As can be seen from Figure 16, when the device prepares single-element fertilizer solutions of different types and concentrations, its steady-state error does not exceed 4%, with an average steady-state time of 40 s. Specifically, the average proportioning accuracies of the device for potassium ions, nitrate ions, and calcium ions are 96.61%, 96.75%, and 96.46%, respectively.
As shown in Figure 17, when the device prepares multi-component mixed fertilizer solutions, the average steady-state time remains 40 s, and the average proportioning accuracies for potassium ions, nitrate ions, and calcium ions are 96.29%, 96.40%, and 96.19%, respectively.
The test results indicate that the online automatic water–fertilizer mixing device designed in this study is superior to the performance requirements for water–fertilizer integration equipment specified in the national industry standard DG/T 274-2024 in terms of these two key performance indicators (steady-state time ≤ 5 min, steady-state error ≤ 10%).

4.4.2. Test of the Influence Degree of Raw Water

When using different raw water sources to prepare fertilizer solutions with different target ion types and concentrations, the relative detection errors compared with those when using deionized water for fertilizer preparation and the theoretical errors of fertilizer preparation with raw water (fertilizer proportioning errors without the control system in this study) are shown in Figure 18.
Specifically, the average proportioning accuracies of the device for potassium ions, nitrate ions, and calcium ions when using deionized water are 96.63%, 96.32%, and 96.29%, respectively. When using different raw water sources, the average proportioning accuracies for potassium ions, nitrate ions, and calcium ions are 95.34%, 95.96%, and 95.67%, respectively.
Compared with deionized water, when preparing fertilizer solutions with raw water, the maximum relative errors for potassium ions, nitrate ions, and calcium ions are 2.00%, 1.57%, and 1.70%, respectively, with average relative errors of 1.33%, 1.12%, and 1.19%, respectively. Compared with the theoretical errors of fertilizer preparation with raw water, the maximum relative errors for potassium ions, nitrate ions, and calcium ions when preparing fertilizer solutions with raw water are 5.12%, 12.79%, and 44.92%.
The influence of target ions in raw water on fertilizer proportioning accuracy cannot be ignored, and the higher the ion concentration and the lower the concentration of the prepared fertilizer solution, the more significant the impact. Calculated using the formula for the theoretical error of fertilizer preparation with raw water, the ranges of theoretical errors for potassium ions, nitrate ions, and calcium ions when preparing solutions with concentrations of 0.1–1 g/L using raw water are 0.07–13.94%, 0.16–70.23%, and 2.32–66.10%, respectively. The comparative results between the device’s actual fertilizer-mixing error and the theoretical error due to raw water are given in Tables S1–S3.
By comparison, the average fertilizer proportioning error of the device when preparing fertilizer solutions with raw water is 3.39%. Compared with the theoretical error of fertilizer preparation with raw water, the fertilizer proportioning errors of this device for potassium ions, nitrate ions, and calcium ions can be reduced by a maximum of 10.55%, 66.84%, and 62.71%, respectively.

4.4.3. Test of Long-Term Stability

The curve of target ion concentration in fertilizer solution varying with time during long-term operation of the device is shown in Figure 19.
As can be seen from the figure, with the set fertilizer application volume of 1.2 m3, during 6 h of continuous operation (with the fertilizer pump operating at a rated flow rate of 200 L/h), the measured values of potassium ion, nitrate ion, and calcium ion concentrations in the mixed fertilizer solution remained around the set values without significant fluctuations. This indicates that the device can still achieve stable and accurate fertilizer proportioning during long-term operation. The device worked normally and stably during continuous operation without any abnormalities.

5. Conclusions

To address the issue of low fertilizer proportioning accuracy caused by the influence of raw water, this study developed a high-precision online automatic water–fertilizer mixing device that can directly use raw water without water purification treatment as the water source for fertilizer preparation. The main research conclusions are as follows:
(1) With the STM32F103VET6 microcontroller as the core controller, an online fertilizer mixing control strategy was adopted, which uses a constant raw water flow rate and a fuzzy PID control method to dynamically adjust the pulse frequency of the metering pump to change the injection volume of nutrient solution. This strategy realizes the preparation of mixed fertilizer solutions containing N, K, and Ca elements, with nitrate and potassium ion concentrations in the range of 1–10 g/L and calcium ion concentrations in the range of 0.25–2.5 g/L. The device was validated using raw water sampled from lake water, groundwater, and rainwater in Yunnan Province, China, representing typical irrigation water qualities in the region. The designed fuzzy PID controller regulates the target ion concentration in the fertilizer solution, with a steady-state time of 38 s. Simulation results show that the fuzzy rules are reasonably designed and the system operates stably and reliably within the above concentration ranges and water types.
(2) Detection models for the concentrations of potassium, nitrate, and calcium ions in fertilizer solutions at room temperature were established, with coefficients of determination (R2) all greater than 0.99. On this basis, temperature compensation-based detection models for the concentrations of potassium, nitrate, and calcium ions in fertilizer solutions were established and validated. The average relative detection errors of the three models are 1.94%, 1.18%, and 2.87%, respectively, which are 0.75% (1.13%, 0.93%) lower than the average relative errors of the room-temperature detection models for potassium (nitrate, calcium) ions in fertilizer solutions, indicating higher detection accuracy of the temperature-compensated models.
(3) The piping system of the device was analyzed through simulation, and the results show that: the maximum static pressure on the pipe wall of the piping system is 0.207 MPa, which is within the pressure-bearing range of the pipe material; the total pressure drop between inlet and outlet of the main pipeline and fertilizer outlet pipeline is 0.007 MPa (0.7 m) and 0.008 MPa (0.8 m), respectively, which is significantly lower than the rated head of 20 m for the water pump and 15 m for the fertilizer pump; there is no backflow at the junction of the main pipeline and nutrient solution pipeline, and the nutrient solution can be effectively injected into the main pipeline, indicating that the piping system is reasonably designed.
(4) The device performance test results show that: when preparing single-element or mixed fertilizer solutions, the average steady-state error of the device does not exceed 4%, with an average steady-state time of 40 s, which is superior to the performance requirements for water-fertilizer integration equipment specified in DG/T 274-2024; compared with deionized water, the average relative errors for potassium ions, nitrate ions, and calcium ions when preparing fertilizer solutions with raw water are 1.33%, 1.12%, and 1.19%, respectively; compared with the theoretical errors of fertilizer preparation with raw water, the fertilizer proportioning errors of this device for potassium ions, nitrate ions, and calcium ions can be reduced by a maximum of 10.55%, 66.84%, and 62.71%, respectively; the device achieves accurate and stable fertilizer proportioning with safe and reliable operation during long-term operation (6 h).
This study still has some limitations and shortcomings: only concentration detection models for N, K, and Ca element fertilizers have been established, without considering the crop growth demand for P, other medium or trace element fertilizers, resulting in a limited application range; the functionality of the online automatic water–fertilizer mixing device needs further improvement. Future research will incorporate a fertilizer solution pH measurement and control module on the basis of achieving precise water-fertilizer proportioning, to prepare fertilizer solutions according to the nutrient content and pH required by crops. Future work will evaluate the device under field conditions with actual crops to confirm long-term applicability.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/agriculture16010003/s1, Figure S1: Schematic diagram of internal components of dynamic mixing tank for water and fertilizer online automatic mixing device; Figure S2: Linear fitting curve of logarithm of potassium ion concentration and response voltage at different temperatures; Figure S3: Linear fitting curve of logarithm of nitrate ion concentration and response voltage at different temperatures; Figure S4: Linear fitting curve of logarithm of calcium ion concentration and response voltage at different temperatures; Figure S5: 3D model diagram of online automatic fertilizer-water mixing device; Table S1: Comparison of the device’s actual mixing error for potassium ion and the theoretical error due to raw water; Table S2: Comparison of the device’s actual mixing error for nitrate ion and the theoretical error due to raw water; Table S3: Comparison of the device’s actual mixing error for calciumion and the theoretical error due to raw water.

Author Contributions

Conceptualization, J.W. and J.L.; methodology, J.Z. and Z.S.; software, J.W. and X.C.; validation, J.W. and J.L.; formal analysis, J.F. and J.L.; investigation, Z.S. and J.Z.; resources, J.L.; data curation, J.F. and J.L.; writing—original draft preparation, J.L. and J.W.; writing—review and editing, J.W. and J.L.; visualization, J.W.; supervision, J.L.; project administration, J.W.; funding acquisition, J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Yunnan Major Science and Technology Special Plan, grant number 202302AE090024, the National Natural Science Foundation of China, grant number 52069008, the Yunnan Revitalization Talent Support Program, grant number KKRD202223052.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author. The dataset corresponds to observations collected in 2025.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Hu, B.; Li, H.; Jiang, Y.; Tang, P.; Du, L. Review of the Interaction Mechanism for Droplets and Foliage under Sprinkler Irrigation and Water-Fertilizer Integration. Int. J. Agric. Biol. Eng. 2024, 17, 31–43. [Google Scholar] [CrossRef]
  2. Kabirigi, M.; Prakash, S.O.; Prescella, B.V.; Niamwiza, C.; Quintin, S.P.; Mwamjengwa, I.A.; Jayantha, A.M.; Keji, M.L.A.; Zhang, C. Fertigation for Environmentally Friendly Fertilizers Application: Constraints and Opportunities for Its Application in Developing Countries. Agric. Sci. 2017, 8, 292–301. [Google Scholar] [CrossRef]
  3. Fu, C.; Ma, X.; Zhang, L. Fuzzy-PID Strategy Based on PSO Optimization for pH Control in Water and Fertilizer Integration. IEEE Access 2021, 10, 4471–4482. [Google Scholar] [CrossRef]
  4. Zhu, F.; Zhang, L.; Hu, X.; Zhao, J.; Zhang, X. Precision Fertilizer Application Control System Based on BA Optimization BP-PID Algorithm. Trans. Chin. Soc. Agric. Mach. 2023, 54, 135–143, 171. [Google Scholar] [CrossRef]
  5. Chai, Y.; Miao, C.; Slater, L.; Ciais, P.; Berghuijs, W.R.; Chen, T.; Huntingford, C. Underestimating global land greening: Future vegetation changes and their impacts on terrestrial water loss. One Earth 2025, 8, 101176. [Google Scholar] [CrossRef]
  6. Zhang, W.; Zhu, J.; Liu, Z.; Liu, L. The Eutrophication-Related Index of Drinking Water Sources Based on the Oxidation-Reduction Potential. BioResources 2024, 19, 4941–4959. [Google Scholar] [CrossRef]
  7. Hu, T.; Li, K.; Xiong, K.; Wang, J.; Yang, S.; Wang, Z.; Gao, A.; Yu, X. Research Progress on Water–Fertilizer Coupling and Crop Quality Improvement and Its Implication for the Karst Rock Desertification Control. Agronomy 2022, 12, 903. [Google Scholar] [CrossRef]
  8. Xing, Y.; Wang, X. Precise Application of Water and Fertilizer to Crops: Challenges and Opportunities. Front. Plant Sci. 2024, 15, 1444560. [Google Scholar] [CrossRef]
  9. Jimenez, J.M.; Parra, L.; García, L.; Lloret, J.; Mauri, P.V.; Lorenz, P. New Protocol and Architecture for a Wastewater Treatment System Intended for Irrigation. Appl. Sci. 2021, 11, 3648. [Google Scholar] [CrossRef]
  10. Sharma, K.; Choudhary, P.; Majeed, A.; Guleria, S.; Kumar, M.; Rana, A.K.; Rajauria, G. Cellulose Based Membranes, Hydrogels and Aerogels for Water Treatment Application. Ind. Crops Prod. 2025, 225, 120474. [Google Scholar] [CrossRef]
  11. Ma, X.; Zhang, L.; Wang, W.; Yan, Y.; Du, C. The Shell Shape Optimization and Fluid–Structure Interaction Simulation of Hose Pump in Water-Fertilizer Integrated Fertilizer Application. Sci. Rep. 2022, 12, 3284. [Google Scholar] [CrossRef] [PubMed]
  12. Fan, J.; Wu, L.; Zhang, F.; Yan, S.; Xiang, Y. Evaluation of Drip Fertigation Uniformity Affected by Injector Type, Pressure Difference and Lateral Layout. Irrig. Drain. 2017, 66, 520–529. [Google Scholar] [CrossRef]
  13. Wang, H.; Wang, J.; Yang, B.; Mo, Y.; Zhang, Y.; Ma, X. Simulation and Optimization of Venturi Injector by Machine Learning Algorithms. J. Irrig. Drain. Eng. 2020, 146, 04020021. [Google Scholar] [CrossRef]
  14. Tang, P.; Ren, N.; Yi, Z.; Li, H. Optimization and experiment of the suction piston structure for proportional fertilization pump. Trans. Chin. Soc. Agric. Eng. 2022, 38, 33–41. [Google Scholar] [CrossRef]
  15. Xu, C.; Liu, N.; Cheng, J.; Wang, Z.; Chen, C.; Zhao, P. Design and Test of Water Fertilizer and Medicine Integrated Equipment Based on Peristaltic Pum. J. Agric. Mech. Res. 2022, 44, 63–70. [Google Scholar]
  16. Aanjaneya, K.; Agrawal, S. Optimization of Twisted-Tape Element Static Mixers for Industrially Relevant Setups. Chem. Eng. Res. Des. 2023, 191, 426–438. [Google Scholar] [CrossRef]
  17. Haddadi, M.M.; Hosseini, S.H.; Rashtchian, D.; Olazar, M. Comparative Analysis of Different Static Mixers Performance by CFD Technique: An Innovative Mixer. Chin. J. Chem. Eng. 2020, 28, 672–684. [Google Scholar] [CrossRef]
  18. Wang, H.; Xu, J.; Chen, B.; Li, Y.; Li, S.; Liang, H.; Jiang, Q.; He, Y.; Xi, W. Performance of an Automatic Variable-Rate Fertilization System Subject to Different Initial Field Water Conditions and Fertilizer Doses in Paddy Fields. Agronomy 2023, 13, 1629. [Google Scholar] [CrossRef]
  19. Li, L.; Xu, B. Numerical Simulation of Hydrodynamics Characteristics in a Tank with an Up-down Reciprocating Agitator. J. Appl. Fluid Mech. 2023, 16, 1455–1466. [Google Scholar] [CrossRef]
  20. Lin, Z.; Wang, R.; Wang, Y.; Wang, L.; Lu, C.; Liu, Y.; Zhang, Z.; Zhu, L. Accurate and Rapid Detection of Soil and Fertilizer Properties Based on Visible/near-Infrared Spectroscopy. Appl. Opt. 2018, 57, D69–D73. [Google Scholar] [CrossRef]
  21. Wu, Y.; Li, L.; Li, S.; Wang, H.; Zhang, M.; Sun, H.; Sygrimis, N.; Li, M. Optimal Control Algorithm of Fertigation System in Greenhouse Based on EC Model. Int. J. Agric. Biol. Eng. 2019, 12, 118–125. [Google Scholar] [CrossRef]
  22. Li, J.; Cheng, Y.; Ma, Y.; Li, Y.; Wu, J.; Wang, D. Machine Learning for Detecting Fertilizer Solution Information Based on Dielectric Frequency Response. IEEE Sens. J. 2024, 24, 41717–41730. [Google Scholar] [CrossRef]
  23. Cecconi, F.; Reifsnyder, S.; Ito, Y.; Jimenez, M.; Sobhani, R.; Rosso, D. ISE-Ammonium Sensors in WRRFs: Field Assessment of Their Influencing Factors. Environ. Sci. Water Res. Technol. 2019, 5, 737–746. [Google Scholar] [CrossRef]
  24. Li, J.; Xue, L.; Zhou, Q.; Huang, L.; Wang, Z. Preparation of double-barreled ion-selective microelectrodes. Trans. Chin. Soc. Agric. Eng. 2021, 37, 24–30. [Google Scholar] [CrossRef]
  25. Li, J.; Li, Y.; Yang, Q.; Le, L.; Wu, Z. Development of Real-Time Detecting Device for Nitrogen Concentration of Liquid Fertilizer. Trans. Chin. Soc. Agric. Eng. 2015, 31, 139–145. [Google Scholar] [CrossRef]
  26. Li, D.; Yin, J.; Yu, Z.; Gao, Z.; Xu, N.; Meng, L. Artificial intelligence-assisted colorimetric sensor array based on supramolecular self-assembled nanozymes for visual monitoring of pesticide residues. Sens. Actuators B Chem. 2025, 444, 138493. [Google Scholar] [CrossRef]
  27. Mehra, M.; Saxena, S.; Sankaranarayanan, S.; Tom, R.J.; Veeramanikandan, M. IoT Based Hydroponics System Using Deep Neural Networks. Comput. Electron. Agric. 2018, 155, 473–486. [Google Scholar] [CrossRef]
  28. Wang, X.; Fang, W.; Zhao, Z. Establishment of a Model and System for Secondary Fertilization of Nutrient Solution and Residual Liquid. Sustainability 2023, 15, 1851. [Google Scholar] [CrossRef]
  29. Zhu, D.; Ruan, H.; Wu, P.; Li, J.; Lu, L. Strategy on Remote Fuzzy PID Control for Fertilizer Liquid Conductivity of Water Fertilizer Integrated Machine. Trans. Chin. Soc. Agric. Mach. 2022, 53, 186–191. [Google Scholar] [CrossRef]
  30. Wang, H.; Zhang, L.; Hu, X.; Wang, H. Design and Optimization of Precision Fertilization Control System Based on HybridOptimized Fractional-Order PID Algorithm. Processes 2023, 11, 3374. [Google Scholar] [CrossRef]
  31. Li, J.; Ding, F.; Yang, E. Identification of the Nonlinear Systems Based on the Kernel Functions. Int. J. Robust Nonlinear Control 2021, 31, 6917–6933. [Google Scholar] [CrossRef]
  32. Li, L.; Wu, Z.; Zhang, Z.; Zhang, Y. Anti-Overturning Capability and Fuzzy PID Speed Control for Four-Way Shuttle Vehicles in Processed Grain Storage. Processes 2023, 11, 1355. [Google Scholar] [CrossRef]
  33. Bellini, F.; Barzegar, Y.; Barzegar, A.; Marrone, S.; Verde, L.; Pisani, P. Sustainable Water Quality Evaluation Based on Cohesive Mamdani and Sugeno Fuzzy Inference System in Tivoli (Italy). Sustainability 2025, 17, 579. [Google Scholar] [CrossRef]
  34. Ortwein, R.; Kotula, J.; Wiacek, U.; Swierblewski, J.; Bocian, D. Hydraulic Analysis of the Start-up Monitoring Module (STUMM) for IFMIF-DONES. Fusion Eng. Des. 2021, 171, 112601. [Google Scholar] [CrossRef]
  35. Wu, G.; Zhao, X.; Shi, D.; Wu, X. Analysis of Fluid–Structure Coupling Vibration Mechanism for Subsea Tree Pipeline Combined with Fluent and Ansys Workbench. Water 2021, 13, 955. [Google Scholar] [CrossRef]
  36. Meiyan, H. Spatiotemporal distribution and controlling factors on ammonium in waters in the central Yangtze River Basin, China. J. Contam. Hydrol. 2023, 258, 104239. [Google Scholar] [CrossRef]
  37. Yan, T.; Qiu, B.; Yuan, J. Effect Mechanism of Inlet Elbow on Energy Consumption of Large Low-Head Pumping System and Its Optimization Design. Phys. Fluids 2025, 37, 015104. [Google Scholar] [CrossRef]
Figure 1. Water–fertilizer online automatic mixing device structure diagram. 1. Frame; 2. Industrial HMI (touchscreen); 3. Control cabinet; 4. Nutrient tank; 5. Dynamic buffer tank; 6. Water-inlet solenoid valve; 7. Nutrient-injection solenoid valve; 8. Fertilizer-outlet solenoid valve; 9. Flowmeter; 10. Suction pump; 11. Metering pump; 12. Fertilizer pump; 13. Variable-frequency drive (VFD); 14. Drive motor; 15. Nutrient-level sensor; 16. Sensor.
Figure 1. Water–fertilizer online automatic mixing device structure diagram. 1. Frame; 2. Industrial HMI (touchscreen); 3. Control cabinet; 4. Nutrient tank; 5. Dynamic buffer tank; 6. Water-inlet solenoid valve; 7. Nutrient-injection solenoid valve; 8. Fertilizer-outlet solenoid valve; 9. Flowmeter; 10. Suction pump; 11. Metering pump; 12. Fertilizer pump; 13. Variable-frequency drive (VFD); 14. Drive motor; 15. Nutrient-level sensor; 16. Sensor.
Agriculture 16 00003 g001
Figure 2. Device hardware circuit connection diagram.
Figure 2. Device hardware circuit connection diagram.
Agriculture 16 00003 g002
Figure 3. System automatic configuration mixing and application fertilizer flow chart.
Figure 3. System automatic configuration mixing and application fertilizer flow chart.
Agriculture 16 00003 g003
Figure 4. Model of the internal flow field domain of the device’s pipeline system.
Figure 4. Model of the internal flow field domain of the device’s pipeline system.
Agriculture 16 00003 g004
Figure 5. Device prototype and its key components.
Figure 5. Device prototype and its key components.
Agriculture 16 00003 g005
Figure 6. Corresponding relationship between fertilizer solution ion concentration and ISE response potential.
Figure 6. Corresponding relationship between fertilizer solution ion concentration and ISE response potential.
Agriculture 16 00003 g006
Figure 7. Variation of ISE response potential with temperature under different ion concentrations.
Figure 7. Variation of ISE response potential with temperature under different ion concentrations.
Agriculture 16 00003 g007
Figure 8. Linear fitting of temperature versus slopes and intercepts of regression equations for target ions.
Figure 8. Linear fitting of temperature versus slopes and intercepts of regression equations for target ions.
Agriculture 16 00003 g008
Figure 9. Comparison of detection errors between the two ion concentration detection models with and without temperature compensation.
Figure 9. Comparison of detection errors between the two ion concentration detection models with and without temperature compensation.
Agriculture 16 00003 g009
Figure 10. Comparison of detection errors of the temperature-compensated ion concentration models for fertilizer solutions with different water qualities.
Figure 10. Comparison of detection errors of the temperature-compensated ion concentration models for fertilizer solutions with different water qualities.
Agriculture 16 00003 g010
Figure 11. Fuzzy controller output response surface plot.
Figure 11. Fuzzy controller output response surface plot.
Agriculture 16 00003 g011
Figure 12. Model of the control system for target ion concentration in fertilizer solution.
Figure 12. Model of the control system for target ion concentration in fertilizer solution.
Agriculture 16 00003 g012
Figure 13. Simulation results of PID and fuzzy PID models.
Figure 13. Simulation results of PID and fuzzy PID models.
Agriculture 16 00003 g013
Figure 14. Analysis of the hydrodynamic performance of the device.
Figure 14. Analysis of the hydrodynamic performance of the device.
Agriculture 16 00003 g014
Figure 15. Curve of target ion concentration in fertilizer solution varying with time during automatic fertilizer mixing by the device.
Figure 15. Curve of target ion concentration in fertilizer solution varying with time during automatic fertilizer mixing by the device.
Agriculture 16 00003 g015
Figure 16. Fertilizer proportioning accuracy and steady-state time when the device prepares single-element fertilizer solutions.
Figure 16. Fertilizer proportioning accuracy and steady-state time when the device prepares single-element fertilizer solutions.
Agriculture 16 00003 g016
Figure 17. Fertilizer proportioning accuracy and steady-state time when the device prepares mixed fertilizer solutions.
Figure 17. Fertilizer proportioning accuracy and steady-state time when the device prepares mixed fertilizer solutions.
Agriculture 16 00003 g017
Figure 18. Relative detection error during actual fertilizer proportioning by the device.
Figure 18. Relative detection error during actual fertilizer proportioning by the device.
Agriculture 16 00003 g018
Figure 19. Curve of target ion concentration in fertilizer solution varying with time during long-term operation of the device.
Figure 19. Curve of target ion concentration in fertilizer solution varying with time during long-term operation of the device.
Agriculture 16 00003 g019
Table 1. Selection and Specifications of Key Hardware Components for the Device.
Table 1. Selection and Specifications of Key Hardware Components for the Device.
HardwareModelSpecification
Ion selective electrodeJXBS-30011 × 10−6–1 mol/L Range, 1.5% Measuring error, 0–10 V analog voltage output
Flow meterLWGY0.1~0.6 m3/h Range, 1% Measuring error, Modbus-RTU
Temperature sensorPCT260−20–100 °C Range, 0.5% Measuring error, Modbus-RTU
Level sensorXKC-Y29-NPN±1.5 mm Accuracy
Suction pumpJETS550G22 m3/h Rated flow, 20 m Rated lift, The rated power:0.55 KW
Frequency converterEV43000–400 HZ Frequency range, The rated power:0.75 KW
Metering pumpAldous C series31.2 L/h Rated flow, ±1% Flow error, The rated power:49 W
Fertilizer pumpJWM-200/0.2200 L/h Rated flow, 4% Flow error, The rated power:90 W
Table 2. Basic Information of Input and Output Variables.
Table 2. Basic Information of Input and Output Variables.
VariableBasic DomainFuzzy Domain
e[−0.1, 0.1]{−3, −2, −1, 0, 1, 2, 3}
ec[−0.1, 0.1]{−3, −2, −1, 0, 1, 2, 3}
ΔKp, ΔKi, ΔKd[−60, 60]{−1, −0.5, 0, 0.5, 1}
Table 3. ΔKp, ΔKi, ΔKd fuzzy control rules.
Table 3. ΔKp, ΔKi, ΔKd fuzzy control rules.
eec
NBNMNSZOPSPMPB
NBPB/NB/PSPB/NB/NSPM/NM/NBPM/NM/NBPS/NS/NBZO/ZO/NMZO/ZO/PS
NMPB/NB/PSPB/NB/NSPM/NM/NBPS/NS/NMPS/NS/NMZO/ZO/NSNS/ZO/ZO
NSPM/NB/ZOPM/NM/NSPM/NS/NMPS/NS/NMZO/ZO/NSNS/PS/NSNS/PS/ZO
ZOPM/NM/ZOPM/NM/NSPS/NS/NSZO/ZO/NSNS/PS/NSNM/PM/NSNM/PM/ZO
PSPS/NM/ZOPS/NS/ZOZO/ZO/ZONS/PS/ZONS/PS/ZONM/PM/ZONM/PB/ZO
PMPS/ZO/PBZO/ZO/NSNS/PS/PSNM/PM/PSNM/PM/PSNM/PB/PSNB/PB/PB
PBZO/ZO/PBZO/ZO/PMNM/PS/PMNM/PM/PMNM/PM/PSNB/PB/PSNB/PB/PB
Table 4. Detection Results of Target Ion Concentrations in Different Raw Water Samples.
Table 4. Detection Results of Target Ion Concentrations in Different Raw Water Samples.
Raw Water SampleCharacteristics of Raw WaterSampling SitePotassium Ion Concentration (mg/L)Nitrate Ion Concentration (mg/L)Calcium Ion Concentration (mg/L)
Raw water 1Lake waterDianchi lake, kunming city 102.73° E, 25.04° N16.201.5833.40
Raw water 2GroundwaterAn orchard in kunming city 102.87° E, 24.82° N1.760.5068.20
Raw water 3GroundwaterDry-farmed rice planting base in chuxiong city 101.32° E, 25.21° N2.020.5264.80
Raw water 4RainwaterReservoir of dayu water saving company in yuanmou county 101.89° E, 25.72° N9.6610.4077.00
Raw water 5GroundwaterYuanmou county modern seed industry science and technology park 101.86° E, 25.72° N1.35236.00195.00
Raw water 6Lake waterErhai lake, dali city 100.33° E, 25.56° N4.65118.0023.70
Raw water 7Lake waterBaishuihe blue moon valley, lijiang city 100.14° E, 25.73° N0.472.2836.30
Raw water 8RainwaterLongtan reservoir in shangri la city 99.57° E, 27.44° N0.720.5828.30
Table 5. Orthogonal design.
Table 5. Orthogonal design.
Serial NumberSet Value of Potassium Ion Concentration (g/L)Set Value of Nitrate Ion Concentration (g/L)Set Value of Calcium Ion Concentration (g/L)
11.5 (low)1.5 (low)0.38 (low)
25.5 (middle)5.5 (middle)0.38
39.5 (high)9.5 (high)0.38
49.55.51.38 (middle)
55.51.51.38
61.59.51.38
71.55.52.38 (high)
85.59.52.38
99.51.52.38
Table 6. Selectivity coefficients of ion-selective electrodes for interfering ions determined by the fixed interference method.
Table 6. Selectivity coefficients of ion-selective electrodes for interfering ions determined by the fixed interference method.
Target IonInterfering IonSelective Coefficient Kij
K+NH4+1.35 × 10−2
Fe2+7.12 × 10−5
Al3+6.61 × 10−5
NO3Cl5.21 × 10−3
HCO33.47 × 10−4
NO21.03 × 10−2
Ca2+Ba2+2.16 × 10−4
Cu2+5.42 × 10−5
Table 7. Slopes and intercepts of linear regression equations for the logarithm of target ion concentration versus ISE response potential at different temperatures.
Table 7. Slopes and intercepts of linear regression equations for the logarithm of target ion concentration versus ISE response potential at different temperatures.
Temperature
(℃)
Linear Fitting of the Logarithm of Potassium Ion Concentration Versus Response VoltageLinear Fitting of the Logarithm of Nitrate Ion Concentration Versus Response VoltageLinear Fitting of the Logarithm of Calcium Ion Concentration Versus Response Voltage
SlopeInterceptSlopeInterceptSlopeIntercept
53.95730.5677−3.95219.48742.02635.4294
103.95820.6104−3.95349.44942.02685.4694
153.95930.6526−3.95469.40532.02735.5093
203.96040.6930−3.95549.36252.02795.5492
253.96130.7376−3.95649.31892.02835.5812
303.96210.7805−3.95739.27822.02885.6161
353.96270.8266−3.95829.23962.02965.6550
403.96350.8754−3.95919.20002.03005.6940
453.96430.9181−3.95999.15822.03055.7319
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, J.; Wu, J.; Zhang, J.; Su, Z.; Chen, X.; Fang, J. Development of an Online Automatic Water–Fertilizer Mixing Device Considering Direct Mixing of Raw Water. Agriculture 2026, 16, 3. https://doi.org/10.3390/agriculture16010003

AMA Style

Li J, Wu J, Zhang J, Su Z, Chen X, Fang J. Development of an Online Automatic Water–Fertilizer Mixing Device Considering Direct Mixing of Raw Water. Agriculture. 2026; 16(1):3. https://doi.org/10.3390/agriculture16010003

Chicago/Turabian Style

Li, Jianian, Jun Wu, Jian Zhang, Zeyang Su, Xiaohui Chen, and Jiaoli Fang. 2026. "Development of an Online Automatic Water–Fertilizer Mixing Device Considering Direct Mixing of Raw Water" Agriculture 16, no. 1: 3. https://doi.org/10.3390/agriculture16010003

APA Style

Li, J., Wu, J., Zhang, J., Su, Z., Chen, X., & Fang, J. (2026). Development of an Online Automatic Water–Fertilizer Mixing Device Considering Direct Mixing of Raw Water. Agriculture, 16(1), 3. https://doi.org/10.3390/agriculture16010003

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop