Next Article in Journal
Advances in Sweet Corn (Zea mays L. saccharata) Research from 2010 to 2025: Genetics, Agronomy, and Sustainable Production
Previous Article in Journal
Impacts of Shrub Encroachment on Vegetation Community and Soil Characteristics in Coastal Wetlands of the Abandoned Yellow River Course
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

PSO-Based System Identification and Fuzzy-PID Control for EC Real-Time Regulation in Fertilizer Mixing System

Nanjing Institute of Agriculture Mechanization, Ministry of Agriculture and Rural Affairs, Nanjing 210014, China
*
Author to whom correspondence should be addressed.
Agronomy 2025, 15(5), 1259; https://doi.org/10.3390/agronomy15051259
Submission received: 28 April 2025 / Revised: 17 May 2025 / Accepted: 18 May 2025 / Published: 21 May 2025
(This article belongs to the Section Water Use and Irrigation)

Abstract

:
In this article, we propose a fuzzy proportional–integral–derivative (Fuzzy-PID) controller that integrates a system-identification-based control strategy. We aim to address the challenge of regulating electrical conductivity (EC) in a fertigation system to ensure precise nutrient delivery. During fertilization, the nutrient solution EC value increases gradually and nonlinearly as water and fertilizer are integrated. Precise fertilizer injection is essential to maintain stable EC levels, preventing crop undernutrition or overnutrition. The fertigation process is modeled using a particle swarm optimization (PSO)-based system identification method. A Fuzzy-PID method is then employed to regulate the nutrient solution EC value based on the pre-determined or real-time identified transfer model. The proposed control strategy is deployed within a programmable logic controller (PLC) environment and validated on a PLC-based fertilizer system. The results show that the identified transfer model accurately represents the fertilizer mixing process, achieving a standard Mean Absolute Percentage Error (MAPE) value of less than 5% within 2 s using the proposed PSO-based identification method. In the simulation tests, the proposed Fuzzy-PID control rule would converge the nutrient solution to target EC values 1000 and 1500 μs/cm within a deviation band ± 50 μs/cm, within 6 s from the recorded identified transfer models and within 25 s from the real-time identified transfer models. In the device’s test, the convergence time of the fertigation EC control is approximately 16 s from the history data and 42 s from the real-time collected data, with a deviation band ± 50 μs/cm. In contrast, it may take over 70 s for the EC regulation of the same fertilization, using the classic control methods including conventional PID and Fuzzy-PID. The proposed control strategy significantly improves EC regulation in terms of speed, stability, and precision, enhancing the performance of fertilizer mixing systems.

1. Introduction

Fertigation—the process of injecting fertilizers into an irrigation system—ensures precise nutrient delivery directly to crop root zones. It plays a critical role in the soil and crop management of industrial agriculture [1], including greenhouse [2] and field cultivation [3]. Precise nutrient management in fertigation enhances the health and fertility of soil [4], as well as the growth and yield of plants [5]. With industrial advances in automation [6], sensing techniques [7,8], and the integration of IoT (Internet of Things) [9,10], modern fertigation equipment demonstrates improved stability, efficiency, and precision.
The precise control of concentration, EC, pH, water flow, and fertilizer injection in fertigation systems is fundamental for optimizing nutrient availability, uptake efficiency, and overall crop health [11]. Structural optimization and system upgrades have been long-standing and ongoing research topics in fertigation development [12,13]. By using the MSP430 microcontroller unit (MCU), Wu et al. [14] upgraded the fertigation system in the greenhouse for the EC control of nutrient solution. Similarly, Zhou et al. [15] developed a PLC-based control system to optimize pH regulation in fertilizer application. Dun et al. [16] designed a spiral-pushing feed mechanism for a fertilizers applicator to attain precise electric control in agricultural fields. The application of venturi injectors with electromagnetic actuation remains a widely adopted method for regulating the inlet flow of water and liquid fertilizer [17]. Optimizing venturi injector structures through numerical flow field verification and fertilizer injection performance analysis can further enhance their precision and efficiency in fertigation systems [18,19].
In addition to advances in fertigation hardware and structural upgrades, the optimization of control strategies for electrical conductivity (EC) and pH regulation has garnered significant attention over the past five years [20,21]. EC control is essential for maintaining the optimal concentration of nutrients in irrigation, which directly affects plant growth in fertigation. pH control is equally crucial for nutrient absorption and preventing plant mortality. The fertigation process is characterized by time delays, as the fertilizer must mix into the nutrient solution before reaching a stable concentration. Conventional proportional–integral–derivative (PID) controllers are not always effective in managing EC or pH due to the time-varying and lagging characteristics inherent in fertigation systems [22]. Currently, research attention is concentrated on improving the fertigation control strategy for better precision, stability, and convergence. Song et al. [23] utilized the Fuzzy-PID algorithm to fertilizer application, achieving better speed, stability, and accuracy in EC regulation. Fu et al. [24] developed an improved Fuzzy-PID for fertigation control by optimizing the fuzzy proportional integral differential gain using the particle swarm optimization (PSO) method. Jaiswal and Ballal [25] developed a fuzzy inference-based irrigation controller for agricultural water management. Shan et al. [26] developed a modified Fuzzy-PID-Smith predictive compensation algorithm for fertilization control. It has been verified that Fuzzy-PID can be effectively combined to obtain an accurate water and fertilizer control system [27,28,29]. However, verification or the application of the confined application scenarios of fertilization systems, such as systems with predefined transfer models, is needed [14,26]. In certain fertigation scenarios, fertilizers may contain built-in pH control agents or buffering components that help stabilize the pH of nutrient solutions. In this context, EC control in fertigation has become critical [30,31], as its convergence time often exceeds 100 s, according to current studies [14,27]. This extended convergence time can induce the significant waste of water and fertilizers, as nutrients applied during unstable periods are ineffective for efficient fertigation management.
The objective of this study is to provide crops with nutrient solutions more accurately, rapidly, and steadily using the fertigation system. We utilized a Fuzzy-PID control strategy combined with a system identification method for EC regulation in a fertilizer mixing system. Different from the classic solutions, our novel integration of system identification enables accurate representations of the actual system dynamics in real time or offline. It serves as an effective tool in determining input nutrient amounts, thereby achieving faster convergence, reduced overshoot, and more robust tracking performance implemented with the Fuzzy-PID controller in EC regulation [23,24,26], without extensive data collection or high-performance computing hardware. The proposed control strategy was validated in a real fertilization system by assessing its convergence time and deviation band. It is verified that the identified fertilization process aligns closely with the real mixing process within 2 s. The implementation of the proposed method demonstrated a significant reduction in EC regulation time, achieving stability within 50 s, compared to longer times required by traditional control methods.

2. Materials and Methods

2.1. EC Control System

The structure of the developed irrigation and fertilizer applicator is shown in Figure 1, which is composed of water and fertilizer tanks, a pump, ventures, electromagnetic valves, an agitator, and a mixer. The arrows in Figure 1 indicate the mixing process between water and fertilizer. The control system is PLC-based, designed to monitor and control the flow rate and EC value of the nutrient solutions. The fertigation system operates as follows: when initializing the system, irrigation water passes through the main pipe, with a certain pressure controlled by the water pump; the agitator starts operating if the water pressure in the main pipe exceeds the set pressure of the pressure-reducing solenoid valve; the water flows into the fertilizer pipeline and the Venturi suction devices (pipes marked in yellow from Figure 1), inducing negative pressure at the fertilizer suction ports; when the electromagnetic valves trigger, the fertilizer from the tanks is injected into the fertilizer pipeline, where it mixes with water in the mixing chamber, and is then transported to the field together with the irrigation water. It should be noted that the fertilizers employed in this study contain built-in pH buffering components. The arrows in Figure 1 illustrate the mixing process between water and fertilizers. The main control target is the EC value of the nutrient solutions. The developed fertigation system adjusts the amount of fertilizer absorbed by controlling the opening and closing time of the solenoid valve through Pulse Width Modulation (PWM) [32]. Based on the diverse requirements of various crops, a multi-channel configuration and automatic fertilization device are adopted, with a uniform mixing mechanism. Through feedback data analysis of the water–fertilizer ratio and EC value, the amount of fertilizer injected in different fertilization channels can be adjusted to address the diverse needs of crops for various types of fertilizers. One EC sensor is positioned in the discharge pipe to provide the EC value of the nutrient solutions directly for overall fertigation control. The pump, agitator, sensors of EC, pH, flow rate, and pressure are connected to a PLC module. The pH sensor is installed for acid monitoring and emergence control.
The proposed fertigation control system (Figure 2) was tested to validate its effectiveness, which is developed and integrated by the Plant Protection Machinery Innovation Center from the Nanjing Institute of Agriculture Mechanization. The developed system consists of four fertilizer (or dosage) tanks, four Venturi tubes—designed by the Jieyang Green Beauty Water saving Technology Co., Ltd. (Jieyang, Guangdong, China)—each coupled to an electromagnetic valve produced by Shanghai Chaogang Valve Co., Ltd., (Shanghai, China); an agitator, a pump, and a mixer supplied by Nanjing Yabo Automation Technology Co., Ltd. (Nanjing, Jiangsu, China). These four fertilizer tanks, which store four stock solutions, are connected to four distinct Venturi tubes. This control system has been applied to pear orchard and rice fields for irrigation and fertigation. The general control is integrated based on a PLC module SIEMENS S7-1200 by Siemens China (Beijing, China), including triggering the pump with the required flow rate and pressure, agitator for the sufficient mixing of stock solutions, and the output solution’s flow rate and EC value. The EC sensor is S-EC-B1LT S-EC-B2LT supplied by Nanjing Qrise Electronic Technology Co., Ltd. (Nanjing, Jiangsu, China). An independent control panel is embedded to prevent EC control failure or emergencies. One EC sensor is installed in the discharge pipe. The pressure and flow rate of the solution nutrients are controlled by the inherent units of the PLC module using an increment PID control strategy. The negative pressure of the venturi tubes is controlled to remain a constant value. This indicates that the fertilizers’ injection performance of the venturi tubes with electromagnetic valves could be adjusted by changing the PWM ratio and frequency. The technique parameters of the fertigation system are listed as follows: the irrigation flow rate is 2~100 m3/h, work pressure 0.15~0.5 MPa, maximum and minimum fertilizer injection flow rate 1000 L/h and 100 L/h (accommodating both field and greenhouse environments), and the EC sensing range of the device is 0~20 ms/cm. The following tests were conducted at a temperature of approximately 10 °C and a humidity of approximately 70%. Tap water, standard agricultural salts, and fertilizers containing built-in pH control agents were used.

2.2. Description of the Fertigation System

The main outputs of the irrigation and fertilizer system are flow rate and the EC value of nutrient solutions, defined as QO and EO. The input is the amounts of fertilizers injected from each tank, defined as Ci (i = 1, 2, …, 5). After the nutrient solution is mixed at the agitator and the mixer between water and fertilizers, the fertigation system produces nutrient solutions with a stable EC level. Based on the mass and volume conservation, the inlet water and fertilizers and outlet nutrient solution should meet the constraints in the following equation:
d V ( t ) E o ( t + τ ) d t + Q o ( t ) E o ( t + τ ) = q i ( t ) C i ( t ) + Q w ( t ) E w ( t ) ,
where V is the solution volume of the general system; qi (i = 1, 2, …, 5) refers to the original mixer flow rate from each tank, which is the control variable in the control system; τ is the mixing time of the original fertilizers into the system, or the delay time of the mixing system lag; Qw and Ew are the water inputs from the pump and its EC value, respectively. It should be noted that the EC value of water is not zero but is a value of around 300. Mapping the EC value from E into (EEw) could simplify the above problem into the following equation:
d V ( t ) E o ( t + τ ) d t + Q o ( t ) E o ( t + τ ) = Q I ( t ) E I ,
where Q I ( t ) E I = q i ( t ) C i ( t ) , in which EI is the EC value of mixers from tanks with different proportions to meet different plants and growth requirements. By employing the Laplace transform, Equation (2) could be re-written as follows:
E o ( s ) = E I Q I ( s ) s V + Q o e τ s ,
where s = σ + jω denotes the complex frequency variable in the Laplace domain, σ is the real part accounting for exponential decay, and j is the imaginary part representing oscillatory behavior.
The fertigation system is a first-order linear lag control problem. Equation (3) indicates that the EC value of the nutrient solutions is affected by the input fertilizers and its output flow rate mainly, since the voltage of the fertigation system is stationary. The transfer function between the input fertilizers’ amounts and output nutrient solutions’ EC should be changed for different EC requirements and supplied fertilizer types or dosages. In this way, the general control strategy of the fertigation system may be invalid.

2.3. System Identification of the Fertigation Process

This section is to proceed with the system identification of fertigation to meet different operation requirements and scenarios. By using Zero-Order Hold (ZOH), the discrete equivalent transfer function for the first-order system (without delay) writes as follows:
Y ( z ) = K ( 1 e T s / T ) z e T s / T U ( z ) ,
where K = EI/Qo, T = V/Qo, and Ts is the sampling time. Equation (4) corresponds to the dynamic equation in Equation (5):
y ( k ) = e T s / T y ( k 1 ) + K ( 1 e T s / T ) u ( k ) ,
Secondly, the time delay could be considered a shift in the discrete domain. This means that e τ s could be converted as follows:
u ( k ) = u ( k m ) ,   where   m = round τ T s .
In this way, the first-order time delay control system in Equation (3) can be changed to be the discrete dynamic equation in Equation (7) as follows:
y ( k ) = e T s / T y ( k 1 ) + K ( 1 e T s / T ) u ( k m ) .
To obtain an estimated value approximating the collected data, we employ a PSO-based method to obtain the parameters including k, θ, and τ′. It should be noted that the interval of τ′ refers to the collected data y(i). The initialization of the PSO variables (K, T) is strictly in limited intervals. The update strategy of each evolutionary interval is shown as follows:
V ( i ) = ω V ( i ) + c 1 r 1 [ P ( best , i ) P ( i ) ] + c 2 r 2 [ P ( global _ best ) P ( i ) ] ,
P ( i + 1 ) = P ( i ) + V ( i + 1 ) ,   if   P ( i ) P ( global _ best ) P ( i ) ,   otherwise ,
P ( i + 1 ) = P ( i + 1 ) = Rand ( A ) ,   if   P ( i + 1 ) A   P ( i + 1 ) ,   otherwise ,
where P(i) is the particle with the format of (K, T) at the i-th iteration, V(i) is the velocity of the P(i) at the (i + 1)-th iteration, ω is the inertia weight, c1 and c2 represent the acceleration constants, and r1 and r2 are random values uniformly distributed in [0,1]. A refers to the variable zone of the parameters (K, T), and the function Rand(A) is to generate a set of parameters (K, T) within the interval A. It should be noted that the global best particle, i.e., P(global_best), would be updated compared with the best particle P(best)at the i-th iteration. The target function is the sum of the Root Mean Squared Error (SSE) and Mean Absolute Percentage Error defined in Equations (11) and (12),
RMSE = 1 N i = 1 N y ( t ) y ^ ( t ) 2 ,
MAPE = 100 % N i = 1 N y ( t ) y ^ ( t ) y ( t ) ,
where y(t) is the actual collected time series EC value of the output nutrients, and y ^ ( t ) is the estimated EC value from the estimated model using PSO with different elements of (K, T). The optimization function could be re-written as in Equation (13):
G = α RMSE y , y ^ , K , T + MAPE y , y ^ , K , T ,
where α is the weight function with a value 0.1, mapping the value of RMSE into the interval [−10, 10]. It should be noted that we only consider the value range of RMSE and MAPE regardless of different units.
A set of collected nutrients EC and corresponding injected fertilizers time series data could be used to determine the transfer model, and hence the ideal input fertilizers amount for nutrients with a target EC value.

2.4. General Control Strategy of the Fertigation System

To supply nutrient solution in EC control mode while varying fertilizer dosages, we propose a control strategy that converges the nutrient solution to target the EC value using PSO-based system identification and the Fuzzy-PID controller. The general setup of the strategy comprises three main parts: pump start-up, system identification, and Fuzzy-PID tuning. The start-up process is to initialize the pump and agitator, providing sufficient negative pressure for the Venturi. The system identification process involves fixed inputs, u, corresponding to the amount of fertilizer added, or the use of a PID control method for a duration of 4 × τ. The collected time series data on fertilizer input and EC of the nutrient solution are then used for system identification (refer to Section 2.3), estimating the ideal amounts of initial fertilizers. A system delay time is incorporated to account for mixing and control interference from the long delay mixing reaction. The third step is to fine-tune the flow rate and stabilize the system by addressing deviations between the real system and the identified model using the Fuzzy-PID controller. The flowchart of the fertigation control strategy for EC regulation is shown in Figure 3. It should be noted that the system identification process can be skipped if the fertilizer dosage and output flow rate are unvaried with only variation in the target EC value. This means the 4 × τ time could be saved in this way with history data for the general control of the fertigation system.
In the second and third processes, a Fuzzy-PID control algorithm is adopted for quick convergence and stability of fertigation control. The Incremental-PID control is mainly based on the difference in the former and latter outputs, i.e., the EC value y. The Incremental-PID-based adjustment to the injected amount of original fertilizer is defined in Equation (14):
Δ u = u i u i 1 = K P e ( k ) e ( k 1 ) + K i e ( k ) + K d e ( k ) 2 e ( k 1 ) + e ( k 2 ) ,
where KP is the proportional gain, Ki is the integral gain, and Kd is the differential gain; ei is the current error value between the measured and target EC values at the i-th time, i.e., ei = ytargetyi.
Similarly to classic works, the coefficients KP, Ki, and Kd are not fixed but vary with the error value and the error change rate. A fuzzy controller is employed to quickly expand the injection of the fertilizers when the EC value remains much lower than the target one and slows down when the EC value comes close to the target one. In the controller sets, the fuzzy linguistic values are defined as {NB, NM, NS, Z, PS, PM, PB}, where NB, NM, NS, Z, PS, PM, and PB represent negative large, negative medium, negative small, zero, positive small, positive medium, and positive large, respectively. The fuzzy control rules for the controller output are shown in Table 1.
The proposed fuzzy control rule, as defined in Table 1, states that when the EC value and error change rate are relatively low (PB and NB or NB and PB), the control strategy places NB on expanding the coefficients KP, Ki, and Kd for quick convergence. The application of NM/NS/Z/PS/PM results in overshoot and oscillations near the target EC value. Compared with the classic methods, the ratio of Z application is larger for better monitoring and action in consideration of the time delay in fertigation.
The variation range of error and cumulative error terms in the fuzzy rule varies with the target EC, eliminating the interference from water. For instance, the domain is [−1200, 1200] for a target EC value of 1000 μs/cm, and the variation ranges of the output parameters Kp, Ki, and Kd are [−0.09, 0.09], [−0.03, 0.03], and [−0.03, 0.03], respectively. All the input and output parameters in the proposed fuzzy control process are normalized and dimensionless. The EC value of the nutrient solutions is normalized as Eo* = Eo/Eref, where Eref = 1 μs/cm, and the flow rate of the original fertilizer prescription QI is normalized as QI* = QI/Qref, where Qref = 1 L/h.

3. Results

3.1. Fertigation Performance and System Identification

This section is to verify the nutrients mixing performance and the system identification validation of the proposed method. Two tests are carried out, with two different parameter setups, including 0.1 MPa and 0.15 MPa of the output nutrients, 700 L/h of input fertilizers from a single venturi tube, and 500 L/h of input fertilizers from two venturi tubes. The collected data, including the input fertilizers flow rate, output nutrients EC value, and pressure in those two tests, are shown in Figure 4. The line in black refers to the EC value of the nutrient solution, the lines in blue and green refer to the fertilizer injection flow rates of the venturi tubes, the line in magenta refers to the outlet pressure of the nutrient solution.
Figure 4 shows that in the fertigation process, it takes 4 to 5 s when the EC value of the solution nutrients reacts after injecting the fertilizers. This indicates that the reaction parameter τ is around 4.5 s. The EC value remains stable after injecting the same quantity of fertilizers after 18 to 20 s. The fertilizers’ injection quantity is stable in 5 s when given the input information, with a deviation interval of around ± 10%. The outlet pressure of the fertigation system remains stable with a deviation band of 0.01 MPa. In this test, the performance of fertigation in maintaining the outlet pressure and injecting the fertilizers is sound; hence, the convergence time of the solution nutrients could be in 20 s with stationary inputs.
To verify the system identification performance of the fertigation process in those two tests, we show the attained error results defined in Equations (11) and (12) using the proposed method in Table 2 and Table 3. The parameters of the PSO, the iteration of the particle number, are mainly investigated.
Table 2 shows that the iteration and particle number of the proposed method play a critical role in the fertigation identification. The calculation time increases as its iteration and particle number expand, while the RMSE and MAPE both decrease with increasing iteration and particle number. However, the decreasing rate of RMSE and MAPE shrinks when its population size increases from 30 × 30. This indicates that the setup of the PSO population with 30 × 30 is suitable for system identification, considering both calculation time and overall precision.
Table 3 shows that the attained calculation time result remains close to that in Table 2, respectively. The attained RMSE and MAPE remain stable when the PSO population size expands from 20 × 20 to 50 × 50. This phenomenon is different from that in Table 2, while using the PSO population size with 30 × 30 also seems to be quantified for fertigation identification. In this way, the identified transfer models of those two mixing processes are attained as 0.4481 exp ( 4.5 s ) s + 0.3207 and 0.9307 exp ( 4.5 s ) s + 0.3083 , respectively. We then show the simulated fertigation process based on the identified models with the collected flow rate of the venturi tube/tubes in Figure 5.
Figure 5 shows that the estimated EC data of the nutrient solution remain close to the real one in each second. The response and stability of the estimated fertigation system closely mirror those of the actual system. The main error of the estimated fertigation comes from the rise in the EC value between the EC value first expansion and stability of the solution nutrients. This could originate from the mixing uniformity of the real system or the detection accuracy of the mounted EC sensors, in addition to the stability of the fertilizers’ injection and nutrients’ outlet pressure.

3.2. Simulation of Fertigation Control in EC Mode

To assess the convergence of the fertigation control using different methods, we show the EC value results of nutrients using different methods with two pre-determined transfer models. Four methods, including Incremental-PID [20,21], Fuzzy-PID [22,23], proposed method with history data, and real-time collected data, are included in the comparison. Two target EC values of nutrient solutions are employed, i.e., 1000 and 1500 μs/cm. The ±50 μs/cm deviation band is filled in blue to enable stability tracking.
Figure 6 shows that the convergence time of the nutrients EC value using the proposed method remains smaller than that using Incremental-PID and Fuzzy-PID. Based on the attained transfer function from the history data, the EC value of the solution nutrients would expand to the target value quickly; moreover, the proposed control strategy would regulate the EC value within the deviation band of ±50 μs/cm. Without history data, the system identification and input fertilizer amount adjustment would optimize the convergence time of the general system. In addition, the convergence time of the general fertigation system using Fuzzy-PID is smaller than that using Incremental-PID on those two occasions. The convergence results of the fertigation simulation using different control methods are listed in Table 4.
Table 4 shows that the convergence of the general system using the proposed method based on the history data is only 5 s. This seems too ideal for real fertigation systems because the stability time in actual scenarios is around 20 s. This originates from the ideal stabilized inputs of injected fertilizers, which could be realized in reality. In this way, the general control of the real fertigation devices could be different with more delays. Table 4 also shows that the convergence time of those methods without history data is close to each other within 15 s.

3.3. Test Validation of the Proposed EC Control Strategy

To verify the convergence performance of the fertigation control using different methods, we show the EC value results of nutrients using different methods in real fertigation systems.
Figure 7 shows that the convergence performance using the proposed method with history and real-time collected data remains the best and the second best in those two fertigation tests. The fertigation performance using the Fuzzy-PID is better than that using the Incremental-PID. This agrees with the phenomenon in Figure 6. It should be noted that the convergence times in the real fertigation devices are quite different from those in the simulation tests. It takes longer for the real fertigation system to converge to the target EC values due to the performance of the fertilizers’ injection and maintaining pressure. There are ups and downs in the fertigation system without using the history data. This comes from the flow rate maintaining ability in the band being from 0 to 100 L/h of the venturi tube and electromagnetic valve design. This could be settled with better modification of the structure in future works. The convergence results of the fertigation tests using different control methods are listed in Table 5.
Table 5 shows that the convergence system using the proposed method with the history data is around 16 s, while that with the real-time collected data is less than 42 s. Their convergence performances are much better than those using the Fuzzy-PID (less than 63 s) and Incremental-PID (less than 78 s).

4. Discussion

In this study, a PSO-based Fuzzy-PID controller is proposed as a robust and practically viable solution for precise EC regulation in fertigation systems. Compared with conventional solutions based on Incremental-PID and Fuzzy-PID methods, the proposed method exhibits faster convergence and improved stability. By leveraging historical data and system identification in simulation tests, the strategy reduces convergence time to less than 20% of that required by traditional approaches, highlighting its efficiency in dynamic control scenarios. Experimental validation further demonstrates the method’s practical effectiveness. EC stabilization was achieved within approximately 16 s when using historical data and within 42 s using real-time data, compared to about 75 s with traditional control methods.
Compared to state-of-the-art approaches such as deep learning-based techniques, the proposed method offers several distinct advantages. While advanced methods often rely on high-performance computing platforms and require large-scale labeled datasets, our controller does not require large-scale data collection or high-performance computing hardware, making it more accessible to small- and medium-scale agricultural producers. This indicates that the proposed approach is feasible for integration into existing agricultural automation platforms for wide applications.
Nonetheless, the proposed algorithm has several limitations. The accuracy of the identified model depends on the quality and quantity of the training data, and sensor drift or system disturbances from complex agricultural environments may affect long-term performance. Moreover, although the fuzzy control rules were designed based on expert knowledge, they were static and not adaptive during operation [29]. Integrating online learning mechanisms could further enhance control robustness. With further improvements addressing its limitations and deployment challenges, this method has potential for broad adoption in modern agriculture.

5. Conclusions

In this study, we propose a PSO-based Fuzzy-PID control strategy to regulate the EC value of nutrient solutions in fertigation systems. Specifically, PSO was employed for system identification to construct accurate transfer function models of the fertigation process by optimizing the parameters of dynamic models using historical or real-time collected data. This approach enables efficient modeling of the nonlinear and time-delayed behavior of nutrient solution delivery, providing a reliable foundation for precise EC control in saving fertilizer and energy. Meanwhile, fuzzy logic addresses system nonlinearities and uncertainties, making the proposed hybrid controller particularly suitable for dynamic and time-delayed fertigation systems. The developed controller is embraced with practical values in dynamic agricultural environments, where rapid nutrient adjustment can directly impact crop health and resource efficiency. Future work will focus on conducting large-scale field trials to validate the practical performance of the proposed controller in vineyards.

Author Contributions

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

Funding

This research was supported by the Innovation Program of Chinese Academy of Agricultural Sciences (Grant NO. CAAS-CAE-202302); China Agriculture Research System of MOF and MARA (grant No. CARS-12).

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the fact that they are composed of currently privileged information.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Incrocci, L.; Massa, D.; Pardossi, A. New Trends in the Fertigation Management of Irrigated Vegetable Crops. Horticulturae 2017, 3, 37. [Google Scholar] [CrossRef]
  2. Rubio-Asensio, J.S.; Intrigliolo, D.S. Fertigation frequency is a useful tool for nitrate management in intensive open-field agriculture. Irrig. Sci. 2024, 42, 353–365. [Google Scholar] [CrossRef]
  3. He, J.; Wang, Y.; Liang, W.; Rasouli, F.; Li, L.; Bose, J.; Donovan-Mak, M.; Huda, S.; Jayasena, V.; Chen, Z.H.; et al. Optimised fertigation improves yield and quality of cucumbers for resource efficiency and economic return in high-tech greenhouses. J. Agric. Food Res. 2025, 19, 101699. [Google Scholar] [CrossRef]
  4. Howe, J.A.; McDonald, M.D.; Burke, J.; Robertson, I.; Coker, H.; Gentry, T.J.; Lewis, K.L. Influence of fertilizer and manure inputs on soil health: A review. Soil Secur. 2024, 16, 100155. [Google Scholar] [CrossRef]
  5. Kushwah, N.; Billore, V.; Sharma, O.P.; Singh, D.; Chauhan, A.P.S. Integrated Nutrient management for optimal plant health and crop yield. Plant Sci. Arch. 2023, 8, 10–12. [Google Scholar] [CrossRef]
  6. Singh, K.A.P.; Goutam, P.K.; Xaxa, S.; Nasima; Pandey, S.K.; Panotra, N.; Rajesh, G.M. The Role of Greenhouse Technology in Streamlining Crop Production. J. Exp. Agric. Int. 2024, 46, 776–798. [Google Scholar] [CrossRef]
  7. Dudala, S.; Dubey, S.K.; Goel, S. Microfluidic Soil Nutrient Detection System: Integrating Nitrite, pH, and Electrical Conductivity Detection. IEEE Sens. J. 2020, 20, 4504–4511. [Google Scholar] [CrossRef]
  8. Hutchinson, G.K.; Nguyen, L.X.; Rubio Ames, Z.; Nemali, K.; Ferrarezi, R.S. Sensor-controlled fertigation management for higher yield and quality in greenhouse hydroponic strawberries. Front. Plant Sci. 2025, 15, 1469434. [Google Scholar] [CrossRef] [PubMed]
  9. Maraveas, C.; Piromalis, D.; Arvanitis, K.G.; Bartzanas, T.; Loukatos, D. Applications of IoT for optimized greenhouse environment and resources management. Comput. Electron. Agric. 2022, 198, 106993. [Google Scholar] [CrossRef]
  10. Kayadibi, İ. An IoT-driven framework based on sensor technology for smart greenhouses and precision agriculture. Int. J. Smart Sens. Intell. Syst. 2025, 18, 1–13. [Google Scholar] [CrossRef]
  11. Sulaiman, H.; Yusof, A.A.; Mohamed Nor, M.K. Automated Hydroponic Nutrient Dosing System: A Scoping Review of pH and Electrical Conductivity Dosing Frameworks. AgriEngineering 2025, 7, 43. [Google Scholar] [CrossRef]
  12. Steidle Neto, A.J.; Zolnier, S.; de Carvalho Lopes, D. Development and evaluation of an automated system for fertigation control in soilless tomato production. Comput. Electron. Agric. 2014, 103, 17–25. [Google Scholar] [CrossRef]
  13. Giannoccaro, N.I.; Persico, G.; Strazzella, S.; Lay-Ekuakille, A.; Visconti, P. A System for Optimizing Fertilizer Dosing in Innovative Smart Fertigation Pipelines: Modeling, Construction, Testing and Control. Int. J. Precis. Eng. Manuf. 2020, 21, 1581–1596. [Google Scholar] [CrossRef]
  14. 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]
  15. Zhou, R.; Zhang, L.; Fu, C.; Wang, H.; Meng, Z.; Du, C.; Shan, Y.; Bu, H. Fuzzy Neural Network PID Strategy Based on PSO Optimization for pH Control of Water and Fertilizer Integration. Appl. Sci. 2022, 12, 7383. [Google Scholar] [CrossRef]
  16. Dun, G.; Wu, X.; Ji, X.; Wei, Y. Design and Experiment of an Electric Control Spiral-Pushing Feed Mechanism for Field Fertilizer Applicator. Appl. Sci. 2023, 13, 12628. [Google Scholar] [CrossRef]
  17. Kyriakopoulos, G.L.; Huynh, H.X.; Tran, L.N.; Duong-Trung, N. Smart greenhouse construction and irrigation control system for optimal Brassica juncea development. PLoS ONE 2023, 18, e0292971. [Google Scholar] [CrossRef]
  18. Baha, V.; Piteľ, J.; Pavlenko, I. Analytical, Numerical, and Experimental Studies of the Working Process in a Pneumatic Abrasive Installation. Appl. Sci. 2024, 14, 11728. [Google Scholar] [CrossRef]
  19. Tang, P.; Zhang, Z. Structural Optimization Based on Response Surface Methodology for the Venturi Injector Used in Fertigation System. Horticulturae 2025, 11, 223. [Google Scholar] [CrossRef]
  20. aya Olalla, E.; Lopez Flores, A.; Zambrano, M.; Domínguez Limaico, M.; Diaz Iza, H.; Vasquez Ayala, C. Fuzzy Control Application to an Irrigation System of Hydroponic Crops under Greenhouse: Case Cultivation of Strawberries (Fragaria vesca). Sensors 2023, 23, 4088. [Google Scholar] [CrossRef]
  21. Zhou, W.; An, T.; Wang, J.; Fu, Q.; Wen, N.; Sun, X.; Wang, Q.; Liu, Z. Design and Experiment of a Targeted Variable Fertilization Control System for Deep Application of Liquid Fertilizer. Agronomy 2023, 13, 1687. [Google Scholar] [CrossRef]
  22. Mihalache, G.; Peres, C.I.; Bodale, I.; Achitei, V.; Gheorghitoaie, M.V.; Teliban, G.C.; Cojocaru, A.; Butnariu, M.; Muraru, V.; Stoleru, V. Tomato Crop Performances under Chemical Nutrients Monitored by Electric Signal. Agronomy 2020, 10, 1915. [Google Scholar] [CrossRef]
  23. Song, X.; Li, H.; Chen, C.; Xia, H.; Zhang, Z.; Tang, P. Design and Experimental Testing of a Control System for a Solid-Fertilizer-Dissolving Device Based on Fuzzy PID. Agriculture 2022, 12, 1382. [Google Scholar] [CrossRef]
  24. Fu, C.; Ma, X.; Zhang, L. Fuzzy-PID Strategy Based on PSO Optimization for pH Control in Water and Fertilizer Integration. IEEE Access 2022, 10, 4471–4482. [Google Scholar] [CrossRef]
  25. Jaiswal, S.; Ballal, M.S. Fuzzy inference based irrigation controller for agricultural demand side management. Comput. Electron. Agric. 2020, 175, 105537. [Google Scholar] [CrossRef]
  26. Shan, Y.; Zhang, L.; Ma, X.; Hu, X.; Hu, Z.; Li, H.; Du, C.; Meng, Z. Application of the Modified Fuzzy-PID-Smith Predictive Compensation Algorithm in a pH-Controlled Liquid Fertilizer System. Processes 2021, 9, 1506. [Google Scholar] [CrossRef]
  27. Wang, H.; Zhang, L.; Wang, H.; Hu, X.; Zhao, J.; Zhu, F.; Wu, X. Research and Design of Improved Wild Horse Optimizer-Optimized Fuzzy Neural Network PID Control Strategy for EC Regulation of Cotton Field Water and Fertilizer Systems. Agriculture 2023, 13, 2176. [Google Scholar] [CrossRef]
  28. Mohindru, P. Review on PID, fuzzy and hybrid fuzzy PID controllers for controlling non-linear dynamic behaviour of chemical plants. Artif. Intell. Rev. 2024, 57, 97. [Google Scholar] [CrossRef]
  29. Kisi, O.; Parmar, K.S.; Yaseen, Z.M.; Kim, S. Modeling Wetting Front Redistribution of Drip Irrigation Systems Using a New Machine Learning Method: Adaptive Neuro-Fuzzy System Improved by Hybrid Particle Swarm Optimization–Gravity Search Algorithm. Agric. Water Manag. 2021, 256, 107067. [Google Scholar] [CrossRef]
  30. Heinen, M.; Marcelis, L.F.M.; Elings, A.; Figueroa, R. Effects of Ec and Fertigation Strategy on Water and Nutrient Uptake of Tomato Plants. Acta Hortic. 2002, 593, 101–107. [Google Scholar] [CrossRef]
  31. Ren, X.; Lu, N.; Xu, W.; Zhuang, Y.; Takagaki, M. Optimization of the Yield, Total Phenolic Content, and Antioxidant Capacity of Basil by Controlling the Electrical Conductivity of the Nutrient Solution. Horticulturae 2022, 8, 216. [Google Scholar] [CrossRef]
  32. Han, L.; Wang, Z.; He, X. Development of an Energy-Saving PWM Driving Method for Precision Pesticide Application Using Adjustable Frequency and Characterization of Spray. Comput. Electron. Agric. 2024, 217, 108634. [Google Scholar] [CrossRef]
Figure 1. Structure and operation mechanism of the developed irrigation and fertilizer system.
Figure 1. Structure and operation mechanism of the developed irrigation and fertilizer system.
Agronomy 15 01259 g001
Figure 2. Verification system of the proposed EC control fertilizer.
Figure 2. Verification system of the proposed EC control fertilizer.
Agronomy 15 01259 g002
Figure 3. Flowchart of the control strategy for fertigation system in EC mode.
Figure 3. Flowchart of the control strategy for fertigation system in EC mode.
Agronomy 15 01259 g003
Figure 4. Fertigation process with fixed amount of injected fertilizers.
Figure 4. Fertigation process with fixed amount of injected fertilizers.
Agronomy 15 01259 g004
Figure 5. Identification performance of fertigation using the proposed method.
Figure 5. Identification performance of fertigation using the proposed method.
Agronomy 15 01259 g005
Figure 6. Simulation of fertigation control using different methods.
Figure 6. Simulation of fertigation control using different methods.
Agronomy 15 01259 g006
Figure 7. Fertigation control test and validation using different methods.
Figure 7. Fertigation control test and validation using different methods.
Agronomy 15 01259 g007
Table 1. Fuzzy control rules for fertilizer system.
Table 1. Fuzzy control rules for fertilizer system.
EC Error Change RateDifference Between the Measured and Target Value
NBNMNSZPSPMPB
NBZZNMNMNMNBNB
NMNSZNSNSNMNMNB
NSPSPSZNSNSNMNM
ZPMPMPSZNSNSNM
PSPMPMPMPSZNSNS
PMPBPBPMPMPSZNS
PBPBPBPMPMPSZZ
Table 2. Fertigation system identification error using PSO using single venturi tube for injecting fertilizers.
Table 2. Fertigation system identification error using PSO using single venturi tube for injecting fertilizers.
PSO
Number × Iteration
Time, sRMSE, μs/cmMAPE, %
5 × 50.0782.014.30
10 × 100.2054.343.31
20 × 200.7440.993.00
30 × 301.5932.702.47
40 × 402.8529.741.87
50 × 504.5928.831.78
Table 3. Fertigation system identification error using PSO using two venturi tubes for injecting fertilizers.
Table 3. Fertigation system identification error using PSO using two venturi tubes for injecting fertilizers.
PSO
Number × Iteration
Time, sRMSE, μs/cmMAPE, %
5 × 50.0581.744.93
10 × 100.1970.264.13
20 × 200.6968.573.66
30 × 301.5466.933.69
40 × 402.6766.753.73
50 × 504.2267.033.78
Table 4. Convergence time of fertigation simulation using different methods.
Table 4. Convergence time of fertigation simulation using different methods.
Test Number/Time, s
15 ± 120 ± 125 ± 128 ± 1
25 ± 120 ± 125 ± 132 ± 1
Note: Numbers ① and ② refer to the convergence time of the fertigation simulation using the proposed methods with history data and real-time collected data; ③ and ④ denote the convergence time of the fertigation simulation using Fuzzy-PID and Incremental-PID. Test numbers 1 and 2 denote the target EC value as 1000 μs/cm and 1500 μs/cm of the solution nutrients based on the identified systems (i.e., transfer functions afore-mentioned), respectively.
Table 5. Convergence time of fertigation validation using different methods.
Table 5. Convergence time of fertigation validation using different methods.
Test Number/Time, s
116 ± 134 ± 146 ± 174 ± 1
215 ± 141 ± 162 ± 177 ± 1
Note: Numbers ① and ② refer to the convergence time of the fertigation tests using the proposed methods with history data and real-time collected data; ③ and ④ denote the convergence time of the fertigation tests using Fuzzy-PID and Incremental-PID, respectively. Test numbers 1 and 2 denote the target EC value as 1000 μs/cm and 1500 μs/cm of the solution nutrients in the real tests, respectively.
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

Xu, Y.; Jin, Y.; Sun, Z.; Xue, X. PSO-Based System Identification and Fuzzy-PID Control for EC Real-Time Regulation in Fertilizer Mixing System. Agronomy 2025, 15, 1259. https://doi.org/10.3390/agronomy15051259

AMA Style

Xu Y, Jin Y, Sun Z, Xue X. PSO-Based System Identification and Fuzzy-PID Control for EC Real-Time Regulation in Fertilizer Mixing System. Agronomy. 2025; 15(5):1259. https://doi.org/10.3390/agronomy15051259

Chicago/Turabian Style

Xu, Yang, Yongkui Jin, Zhu Sun, and Xinyu Xue. 2025. "PSO-Based System Identification and Fuzzy-PID Control for EC Real-Time Regulation in Fertilizer Mixing System" Agronomy 15, no. 5: 1259. https://doi.org/10.3390/agronomy15051259

APA Style

Xu, Y., Jin, Y., Sun, Z., & Xue, X. (2025). PSO-Based System Identification and Fuzzy-PID Control for EC Real-Time Regulation in Fertilizer Mixing System. Agronomy, 15(5), 1259. https://doi.org/10.3390/agronomy15051259

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