Next Article in Journal
Evaluation of Saline Solutions and Organic Compounds as Displacement Fluids of Bentonite Pellets for Application in Abandonment of Offshore Wells
Previous Article in Journal
Sustainable Harnessing of SiO2 Nanoparticles from Rice Husks: A Review of the Best Synthesis and Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Design and Optimization of Precision Fertilization Control System Based on Hybrid Optimized Fractional-Order PID Algorithm

1
College of Mechanical and Electrical Engineering, Shihezi University, Shihezi 832003, China
2
Bingtuan Energy Development Institute, Shihezi University, Shihezi 832003, China
*
Author to whom correspondence should be addressed.
Processes 2023, 11(12), 3374; https://doi.org/10.3390/pr11123374
Submission received: 13 November 2023 / Revised: 26 November 2023 / Accepted: 4 December 2023 / Published: 5 December 2023

Abstract

:
In order to mitigate time-varying, lag, and nonlinearity impacts on fertilization systems and achieve precise control of liquid conductivity, we propose a novel hybrid-optimized fractional-order proportional-integral-derivative (PID) algorithm. This algorithm utilizes a fuzzy algorithm to tune the five parameters of the fractional-order PID algorithm, employs the Smith predictor for structural optimization, and utilizes Wild Horse Optimizer, improved by genetic algorithms, to optimize fuzzy rules. We conducted MATLAB simulations, precision experiments, and stability tests on this controller. MATLAB simulation results, along with precision experiment results, indicate that compared to PID controllers, Smith predictor-optimized PID controllers, and fuzzy-tuned fractional-order PID controllers, the proposed controller has the narrowest steady-state conductivity range, the shortest settling time, and the lowest overshoot, showcasing excellent overall dynamic performance. Stability test results demonstrate that the controller maintains stable operation under different pressure conditions. Therefore, this control system from our study achieves superior control effectiveness, providing a viable approach for the control of nonlinear time-delay systems.

1. Introduction

In the Xinjiang region, a large number of farmlands still adopt extensive planting methods, leading to the excessive use of water and fertilizer resources. For example, in fertilization, the fertilizer ratio often relies on farmers’ planting experience. In this context, precision agriculture as a technology to enhance crop yield and quality has evolved. However, the precision fertilization system exhibits characteristics of time variance, hysteresis, and nonlinearity that are influenced by factors such as volume delay in the transmission pipeline. Therefore, reducing the impact of these factors has become a research hotspot [1,2,3].
Fenglei Zhu et al. [4] proposed a hybrid algorithm based on a genetic algorithm and particle swarm algorithm to address the low-accuracy issue in the fertilization control system for comprehensive water and fertilizer management in farmland. The algorithm optimizes the BP neural network PID control algorithm. Experimental results demonstrate an average maximum overshoot of 5.1% and an average settling time of 68.99 s for this control algorithm. However, there is an issue of slow iteration during the process.
Pengju Wang et al. [5] addressed the issue of low precision in the fertilization control device for tractor-trailer applications and proposed a genetic algorithm-optimized Back Propagation Neural Network (BP) PID control algorithm. Test results show an average relative error of 1.07% in liquid manure flow and an actual response time of 2.85 s. However, in practical operation, the system requires a longer time to compute optimal parameters, thus affecting the real-time performance of the device.
Jinbin Bai and colleagues [6] proposed a control algorithm based on the beetle antenna search algorithm to address the issues of low fertilization accuracy and uneven fertilization in tractor-towed fertilizer spreaders. Experimental results demonstrate that the actual response time of this control system can reach 2 s, with an average relative error of 1.27%. However, there was no in-depth investigation into fertilizer flow control at different vehicle speeds.
Lepeng Song et al. [7] addressed the issue of low control precision in the variable-rate fertilizer system and proposed a genetic algorithm-optimized fuzzy PID control algorithm. Simulation results indicate that this algorithm has a faster response speed and can achieve high-precision control. However, the research process lacks on-site experiments, making it challenging to effectively evaluate the system’s real-world performance.
Jicheng Zhang et al. [8] addressed the issue of low precision in the variable-rate liquid fertilizer system and proposed a closed-loop control system based on the combination of Geographic Information System (GIS) and PID control algorithm. Experimental results indicate that variable-rate fertilization is consistent with planned data, and the signal-tracking effect is good. The errors in fertilization quantity and fertilization ratio are both less than 5%, with a control response time of 6 s. However, in the experimental design process, only accuracy experiments were conducted, with a lack of stability experiments.
Changxin Fu et al. [9] addressed the issues of nonlinearity, time variation, and significant inertia in intelligent fertilization machines. They proposed a particle swarm optimization-based fuzzy PID control algorithm. Experimental results indicate that compared to PID algorithms, fuzzy algorithms, and fuzzy PID algorithms, the proposed control algorithm significantly reduced the overshoot by 2.48 percentage points. However, due to the tendency of particle swarm algorithms to get stuck in local optimal solutions, there is a possibility that the algorithm may not reach the global optimum.
To enhance the accuracy of the orchard variable-rate fertilization system, Chang Wan et al. [10] proposed a BP neural network PID control algorithm optimized by the particle swarm algorithm. Experimental results indicate that under varying conditions of target fertilization quantity and vehicle speed, average errors in fertilization are 1.16% and 1.07%, respectively. However, the problem persists wherein the algorithm is prone to getting stuck in local optimal solutions.
Zhou Wenqi et al. [11] proposed a fuzzy PID algorithm to address issues such as low precision in directional variable-depth liquid fertilizer application in the field, inaccurate fertilization quantity, and poor fertilization effectiveness. Test results showed that the target rate of the devices exceeded 80%, and the accuracy remained above 90%. However, further consideration of the system’s robustness and stability is warranted in this study.
Zihao Meng et al. [12] addressed the issue of pH value regulation in liquid fertilizers, proposing a control algorithm that jointly optimizes the PID controller using the Smith predictive compensation algorithm and BP neural network. Experimental results indicate that the algorithm’s average maximum overshoot is 0.27%, and the average settling time for pH adjustment from 7.5 to 6.8 is 71.39 s. However, the study focused solely on dynamic performance analysis and lacked in-depth research.
The above studies collectively focus on the precision control issues of liquid fertilization systems. They aim to improve overall system performance by employing various optimization algorithms and control strategies to reduce fertilization errors and enhance system response speed. Experimental results indicate significant advantages of these algorithms in terms of average maximum overshoot and settling time. However, challenges are also mentioned, such as slow iteration processes and prolonged computation times for optimizing algorithm parameters.
In order to mitigate time-varying, lag, and nonlinearity impacts on fertilization systems and achieve precise control of liquid conductivity, a hybrid optimized fuzzy fractional order PID algorithm is proposed in this paper. The algorithm uses a fuzzy algorithm to tune five parameters of the fractional order PID algorithm, employs the Smith predictor for structural optimization, and uses the Wild Horse Optimizer, improved by genetic algorithms, to optimize fuzzy rules. Through MATLAB simulations, precision experiments, and stability tests on this controller, the results indicate that this control algorithm exhibits a fast and effective response in the precise fertilization system EC value adjustment process, providing a viable approach for the control of nonlinear time-delay systems.

2. System Design and Model Establishment

2.1. Construction of a Precision Fertilizer System

Figure 1 depicts the structure of the precision fertilization system, comprising components such as the fertilizer mixing tank, water pump, fertilization pump, water reservoir, and fertilizer storage tank. The fertilization pump employs a peristaltic pump with a flexible tube to convey fertilizer, effectively preventing corrosion of the pump by the fertilizer. The system operates in an ‘irrigation-fertilization-irrigation’ mode, with the first irrigation ensuring sufficient soil moisture and the second irrigation promoting the absorption and utilization of nutrients by plants. Irrigation and fertilization are achieved by opening and closing corresponding electromagnetic valves [13,14,15,16]. During independent irrigation, electromagnetic valves 1, 2, and 4 are closed, while 3 is open. During fertilization, electromagnetic valves 1, 2, and 4 are open, and 3 is closed. The system precisely adjusts the EC value of the mixed fertilizer by regulating the frequency of the variable frequency drive connected to fertilization pump 1.

2.2. Establishment of Mathematical Model

The amount of fertilizer in the hoppers is in dynamic equilibrium and can be considered constant when the system is operating normally. The dynamic model during the equilibrium of the EC-adjustment process, assuming that the EC value of the fertilizer in the fertilizer mixing tanks is equal to the EC value in the outlet pipe, is as follows:
V d C ( t ) d t = C f Q f + C w Q w C ( t ) Q
where V is the fertilizer’s volume in the mixing tank, C ( t ) is the mixed fertilizer‘s mass concentration in the mixing, C f is the fertilizer mother liquor’s mass concentration that flows into the mixing tank, Q f is the fertilizer mother liquor’s flow rate for flow into the mixing tank, C w is the water’s mass concentration that flows into the mixing tank, Q w is the water’s flow rate for flow into the mixing tank, Q is the mixed fertilizer’s flow rate that flows out of the mixing tank, and t is the variable frequency fertilizer pump’s working time.
The formula for flow rate (1) of the mixed fertilizer mother liquor flowing into the mixing tank in relation to frequency (2) can be expressed as follows, considering the approximate proportionality between the output flow rate and frequency for a peristaltic pump [17]:
Q f = q f ( t )
where q is a proportionality parameter.
Due to the direct proportionality between mass concentration and EC value, combining Equations (1) and (2) yields the following:
V d E ( t ) d t = E f q f ( t ) + E w Q w E ( t ) Q
where E f is the fertilizer mother liquor’s EC value that flows into the mixing tank; E w is the water’s EC value that flows into the mixing tank, and it is approximately 0; and E ( t ) is the mixed fertilizer’s EC value in the mixing tank.
Using the Laplace transform of Equation (3), we obtain the following:
E ( S ) = E f q V S + Q F ( s )
where E ( S ) is E ( t ) ’s Laplace transform, and F ( s ) is f ( t ) ’s Laplace transform.
In Equation (4), it can be observed that the control response characteristics form a first-order linear system. In practical experiments, when the equipment is operational, the outlet pressure is set at 0.2 MPa, and the time delay is 10 s. E f = 10   m S / c m ;   V = 50   L ;   Q = 1.71   L / s . The approximate transfer function for EC is obtained by substituting these variables into Equation (4):
G s = E ( S ) F ( s ) = 0.09 e 10 s 50 s + 1.71 = 0.05 e 10 s 29.2 s + 1

2.3. Fractional-Order PID Controller Design

We have chosen the fractional-order PID control algorithm. Figure 2 depicts the fractional-order PID control system’s schematic diagram.
In Figure 2, r ( t ) represents the system input, e ( t ) is the difference between the input and output signals, u ( t ) is the controller output, y ( t ) is the system output, and G ( s ) is the controlled object. The controller is established utilizing fractional-order integration and differentiation [18]. In the time domain, it is denoted as
u ( t ) = K P · e ( t ) + K i · J λ e ( t ) + K d · D µ e ( t )
where K P is proportional gain, K i is integral gain, K d is derivative gain, λ is integral order, and µ is derivative order.
Taking the Laplace transform of Equation (6), the transfer function expression for a fractional-order PID controller is as follows:
C ( S ) = U ( S ) E ( S ) = K P + K i S λ + K d · S µ
Any real numbers can be used as the integration and differentiation orders in the fractional-order PID controller. However, in general, 0 λ  2 and 0 µ 2 [19,20]. Figure 3 illustrates the fractional-order PID controller’s plane. With the addition of two parameters, the fractional-order PID gains greater adjustability, enabling more flexible control of the controlled object and better meeting the performance requirements of complex systems.
Due to the weak singularity of fractional calculus, solving analytical solutions for fractional differential equations becomes challenging. This difficulty in obtaining analytical solutions poses certain challenges in the implementation of fractional-order controllers [21]. Therefore, this paper employs the Oustaloup filter algorithm to approximate the fractional-order differential operators S µ and S λ . Assuming an approximation frequency range of [ W l , W h ] , the fractional-order operator S α is approximated in integer-order form. The transfer function is as follows:
K ( S ) = ( W h W l ) α 2 k = N N S + W k S + W k
where N is the filter order, α is the differentiation order, W k represents the zeros, and W k represents the poles.
W k = W l ( W h W l ) k   +   N   +   0.5 ( 1 α ) 2 N   +   1
W k = W l ( W h W l ) k   +   N   +   0.5 ( 1   +   α ) 2 N   +   1
Fractional order PID implementation is achieved through the Oustaloup filter algorithm. The initial values for K P , K i , and K d in fractional-order PID are obtained using the Ziegler–Nichols tuning formula. K p = 0.80; K i = 0.05; K d = 1.36. The initial value is set to 1.

3. Control Strategy Optimization

3.1. Controller Parameter Tuning Based on Fuzzy Algorithm

To enhance the adaptability of the controller, we employed a fuzzy algorithm for the automatic tuning of parameters in the fractional-order PID controller. This enables the controller to achieve better control performance in the field. A two-input, five-output fuzzy system is designed in this paper. Error e and error’s change rate e c are input signals to the system. Using the Mamdani direct inference method, the correction parameters ( Δ K P , Δ K i , Δ K d , Δ λ , and Δ µ ) are obtained. By adding them to the PID parameters’ initial values, online self-tuning of PID parameters is achieved. Figure 4 depicts the structural diagram of the controller parameter tuning using the fuzzy algorithm.
Based on the relevant experience, the domain of fuzzy sets is divided into seven fuzzy sets, which are represented by the linguistic values of NB, NM, NS, ZO, PS, PM, and PB. The affiliation functions for correction parameters Δ K P , Δ K i , Δ K d , Δ λ , and Δ µ are shown in Figure 5.
For the fractional-order PID controller, parameter K P influences the system response speed, parameter K i affects the system overshoot and response speed, parameter K d impacts the system’s damping, parameter λ influences the system’s lag, and parameter µ affects the system’s damping [22,23,24]. Based on the properties of these parameters, the principles for fuzzy rule design are determined as follows:
  • When the absolute value of error e is significantly large, it is advisable to moderately increase K P and λ while decreasing K d . Increasing K P can enhance the system response rate, reducing K d can mitigate the impact of disturbance signals, and increasing λ can minimize system errors.
  • When the absolute value of error e is moderate, select appropriate values for Δ K P , Δ K i , Δ K d , Δ λ , and Δ µ to maintain system stability.
  • When the absolute value of error e is relatively small, it is advisable to decrease K P appropriately to reduce the system overshoot. Adjust the values of λ and µ based on the error change rate e c to enhance system stability.
  • When the absolute value of the rate of change of the error e c is significantly large, it is advisable to decrease K P and K i while increasing λ , µ , and K d to enhance system damping, reduce system oscillations, and mitigate the impact of the time-variability introduced by delay.
From this, the fuzzy rules can be summarized, as shown in Table 1 and Table 2.
The fuzzy inference process adopts the Mamdani direct inference method, and the fuzzy inference statements are multi-dimensional conditional statements [25,26]. The defuzzification method used is the center of gravity method, and its formula is as follows:
f = i = 1 P K ( i ) · µ K ( i ) i = 1 P µ K ( i )
where K ( i ) is the value of the membership function of a fuzzy set for a certain output variable, P is the number of points the membership function has, and µ K ( i ) is the membership function’s value at those points.

3.2. Structure Optimization Based on Smith Predictor

In order to improve the stability of the control system, we utilize the Smith predictor for controller structure optimization. The Smith predictor involves estimating the controlled process’s dynamic model in advance and introducing a compensator in parallel with the controlled object to compensate for the pure lag time of the controlled object [27]. This compensates for the controlled quantity lagged by τ time and feeds it back to the input of the controller in advance, enabling the controller to take action ahead of time. This significantly reduces system instability and decreases the control time. Figure 6 shows the structural model optimized by the Smith predictor, and Figure 7 illustrates the Smith predictor structure diagram.
In Figure 7, G 0 ( s ) e τ s represents the system’s theoretical model without lag, e τ 2 s represents the model’s pure theoretical lag part, G 0 ( s ) e τ 1 s represents the transfer function of the Smith predictor model, and G c ( s ) represents the controller. The system’s closed-loop transfer function is
Y ( S ) R ( S ) = G c ( s ) G 0 ( s ) e τ s 1 + G c ( s ) G 0 ( s )

3.3. Parameter Optimization Based on Wild Horse Optimizer

To improve the response speed of the control system, we use an improved Wild Horse Optimizer for controller parameter optimization. Figure 8 illustrates the Wild Horse Optimizer’s structural model for parameter optimization.
The Wild Horse Optimizer is a novel, intelligent optimization algorithm that simulates wild horse behavior. It is known for its strong adaptability and simplicity of implementation [28]. The genetic algorithm, on the other hand, is an optimization algorithm that simulates genetic, mutation, and selection mechanisms in biology and is known for its flexibility that allows adjustments based on problem characteristics [29]. Leveraging the strengths of both, the Genetic Algorithm-based Wild Horse Optimizer follows a specific process:
  • Population Initialization: For the 49 control rules used in the fuzzy inference process, each horse in the population is represented by a digitized encoding vector for fuzzy linguistic values, where 1, 2, 3, 4, 5, 6, and 7 correspond to NB, NM, NS, ZO, PS, PM, and PB, respectively. The vector length is 49 × 5, and vectors are randomly initialized. The population size was set to N = 50 , the percentage of stallions as P S = 0.2 , and the number of groups G = N     P S = 10 . These groups were then evenly distributed among the remaining horses in the population.
  • Fitness Function: Fitness function reflects superiority or inferiority of individuals, providing a standard and driving force for selection. For the model in this paper, fitness function is
    f = 4 0 T ( y ( t ) y 0 ) d t + 3 y 0 t α + 3 T ( y m y 0 ) y 0 T
    where T represents the PID algorithm’s steady-state time to reach the setpoint, y ( t ) represents the system’s real-time final output, y 0 represents objective function setpoint, t α represents the steady-state time to reach the setpoint and balance after using the optimizing algorithm, and y m represents the system’s maximum final output value.
  • Foraging behavior: The rest of the horses in the herd look around the leader’s position, with the leader’s position as the center of the circle [30]. The expression is given by
    X ¯ i , G j = 2 Z c o s ( 2 π R Z ) ( S t a l l i o n j X i , G j ) + S t a l l i o n j
    where X ¯ i , G j represents the updated position; R is a random number in the range of [−2, 2], primarily used to control the angle between individuals and the leader; S t a l l i o n j is the horse’s position; X i , G j is the horse’s original position; and Z is the adaptive mechanism, calculated as follows:
    P = R 1 < T D R ; I D X = ( P = = 0 ) ; Z = R 2 · I D X + R 3 · ( ~ I D X )
    where P is a vector consisting of 0 s and 1 s, and R 1 and R 3 are random vectors with values in the interval [0, 1] following a standard distribution. P = R 1 < T D R indicates that if an element in R 1 is less than T D R , the value at the corresponding position in vector P is 1; otherwise, it is 0. Random vector R 1 returns the indices where condition (P==0) is satisfied to IDX. R 2 is a random number between 0 and 1, · represents the dot product operator, ~ represents the binary negation, and T D R is an adaptation factor that decreases linearly from 1 to 0 in the following way:
    T D R = 1 i t e r m a x i t e r
    where i t e r is the current iteration number, and m a x i t e r is the maximum number of iterations.
  • Mating Behavior: When the young foal matures, it will leave the herd for mating behavior. Its position-updating method is as follows:
    X G , k P = C r o s s o v e r ( X G , i q , X G , j z )
    where X G , k P represents the foal P ’s position in herd k , and X G , i q , X G , j z follow the same logic; C r o s s o v e r is the mating method.
When animals mate, genes are swapped and mutated. Therefore, instead of the original mating formula, the crossover and mutation operations of genetic algorithms are used in this study. This avoids premature convergence of the population and exploits the global search capabilities of genetic algorithms. Here are the steps:
Crossover operation: With some probability, parts of chromosomes are exchanged between individuals. Here, we employ a uniform crossover method, where pairs of encoding strings are crossed over with equal probabilities. The value 0.6 has been set as the crossover probability.
Mutation operation: This is performed by randomly changing the position of a particular string in an individual with a certain degree of probability. Here are the specific steps: 1. Identify where to mutate. 2. Mutate the value of the gene at the point of the mutation. The value 0.1 has been set as the mutation probability
5.
Leadership behavior: Each group leader leads the group to a suitable area. Each group moves toward the suitable area. Then, the leaders compete for this suitable area to be used by the ruling group, with no other groups allowed to use the territory until the ruling group leaves. This process is reflected in Equation (18).
S t a l l i o n G i ¯ = 2 Z c o s ( 2 π R Z ) ( W H S t a l l i o n G i ) + W H R 3 > 0.5 2 Z c o s ( 2 π R Z ) ( W H S t a l l i o n G i ) W H R 3 < 0.5
where S t a l l i o n G i ¯ represents the group leader’s next position, Z is an adaptive mechanism, S t a l l i o n G i is the current position of the leader, W H is the position of the suitable area, and R 3 is a random number in the range [0, 1].
The formula for the leadership selection process is as follows:
S t a l l i o n G i = X i , G j i f   c o s t ( X i , G j ) < c o s t ( S t a l l i o n G i ) S t a l l i o n G i e l s e
where c o s t ( X i , G j ) represents the individual X i , G j ’s fitness, and c o s t ( S t a l l i o n G i ) follows the same logic.
6.
Terminating Condition: In this study, the number of iterations is set to 100 generations while using the maximum number of iterations as the final condition.

4. Results

4.1. MATLAB Simulation

To evaluate the novel hybrid fuzzy fractional-order PID control algorithm‘s performance (Mix-Fuzzy-FOPID) proposed in this paper, we used MATLAB to simulate and evaluate. The algorithm’s process is illustrated in Figure 9. Simultaneously, we simulated the conventional PID control algorithm (PID), the PID control algorithm optimized based on the Smith predictor (SMITH), and the fuzzy tuned fractional-order PID control algorithm (Fuzzy-FOPID) for comparison. The sampling rate was 1 ms, the system delay was 10 s, the input was a unit step, and the simulation was 500 s. A comparison of the control effects of the four controllers under a unit step response is shown in Figure 10.
Dynamic performance measures are used to evaluate the controller’s control effectiveness for a more accurate comparative analysis. Rise Time is the time after stimulation by a step signal for the system to reach a steady state for the first time. Peak Time represents the time required for the system to reach its peak value in response to a step input. Regulation Time indicates the time required for the system to stabilize. Overshoot is the maximum amplitude whereby the system response exceeds the setpoint. Table 3 shows the four controllers’ dynamic performance.

4.2. Experimental Test of EC Adjustment in Precision Fertilization Control System

To validate the precision fertilizer control system’s performance designed in this paper, using the STM32F103ZET6, STMicroelectronics (Paris, France), microcontroller as the control component, we built an EC control platform. The experimental setup is illustrated in Figure 11. The structural schematic diagram of the EC regulation platform is depicted in Figure 12. The working principle of the experiment involves the STM32F103ZET6 microcontroller controlling the flow rate of the fertilization pump based on the real-time EC values of the mixed fertilizer returned by the EC sensor. The control algorithm employs a hybrid-optimized fuzzy fractional-order PID control algorithm. The EC sensor signal is received by an I/O port. STM32F103ZET6 serves as a control center, adjusting the output frequency of the variable frequency drive to alter the flow rate of the fertilization pump, ultimately achieving control over the mixed fertilizer’s EC value.
During the experiment, the liquid level of the water–fertilizer mixture in the mixing tank was kept stable, with a volume of 100 L. The diameter of the inflow and outflow pipes was 50 mm. The inflow pipe was connected to a pressurized water source with a water pressure of 0.2 MPa. Fertilizer master batches with an electrical conductivity of 10 mS/cm were prepared using potassium nitrate. The peristaltic pump has a power of 1.5 KW, a voltage of 380 V, and a maximum flow rate of 5.0 m3/h. A frequency converter used was the MD200 (1.5 KW) model from Shenzhen Wanchuanda Inverter, with an output frequency range of 0–400 HZ and rated voltage of 380 V. The EC sensor employed was a rail-mounted online pH and EC dual-electrode probe from Jiousu Electronic Technology Co., Ltd. (Shijiazhuang, China), with an EC measurement range of 0–20 mS/cm and a resolution of 0.001 mS/cm. Two EC sensors were placed in the mixing tank, and the measured EC value was the average of the readings from the two sensors. The system used Beijing Altai Technology Development Co.’s USB2805C acquisition card for flow data collection, with a measurement accuracy of 0.01%. The sampling period was set to 5 s, and continuous measurements were taken for 500 s.
Target ECs were set at 1.5 mS/cm, 1.8 mS/cm, and 2.0 mS/cm, and accuracy comparison experiments for four controllers were conducted on the EC regulation platform. The experimental results are shown in Table 4 and Figure 13.
Stability tests were conducted on the Mix-Fuzzy-FOPID controller with target EC values adjusted to 1.5 mS/cm, 1.8 mS/cm, and 2.0 mS/cm at 0.2 MPa, 0.3 MPa, and 0.4 MPa. Averaged EC values at 200 s, 250 s, 300 s, 350 s, and 400 s were taken as the steady-state EC values for comparison. The experimental results are presented in Table 5 and Figure 14.

5. Discussion

In the comparison between Figure 10 and Table 3, it can be observed that the conventional PID algorithm generated significant oscillations and overshoot, with a maximum overshoot of up to 41.43% and a longer Regulation Time of 254.28 s. In contrast, the introduction of the Smith predictor significantly reduced the system’s maximum overshoot to 4.88%, and the Regulation Time was relatively shortened to 202.76 s. The Fuzzy-FOPID algorithm reduced the Regulation Time (128.37 s), but compared to the Smith predictor, it exhibited a slightly larger maximum overshoot of 15.59%. In contrast, the Mix-Fuzzy-FOPID algorithm demonstrated a significant improvement in dynamic performance compared to the other three controllers. The Regulation Time was reduced to 114.61 s, and the maximum overshoot decreased to 1.63%, greatly enhancing the stability of the control process.
In Table 4, it can be observed that under different target EC values, the steady-state EC fluctuation amplitude of the PID algorithm is relatively large, with a mean of approximately 0.57 mS/cm. The steady-state time is relatively long, with a mean of approximately 226 s, and the overshoot is also relatively high, with a mean of approximately 22%. After introducing the Smith predictor, the steady-state range of electrical conductivity is relatively narrow, with a mean of approximately 0.34 mS/cm. The steady-state time is relatively short, with a mean of approximately 190 s, and the overshoot is lower, with a mean of approximately 16.0%. Compared to the PID control algorithm optimized based on the Smith predictor, the Fuzzy-FOPID control algorithm significantly shortens the steady-state time, with a mean of approximately 165 s, but the overshoot and conductivity range are larger, approximately 0.51 mS/cm and 20.2%, respectively. The Mix-Fuzzy-FOPID control algorithm excels in all performance indicators, with a mean EC fluctuation amplitude of approximately 0.12 mS/cm, a mean steady-state time of approximately 102 s, and a mean overshoot of approximately 11.1%.
In Figure 11, it can be observed that as the target EC value increases, the amplitude of EC fluctuations decreases, and the steady-state EC value becomes more accurate. However, both steady-state time and overshoot increase, indicating an increase in lag and enhanced stability. This is because, at larger target EC values, the feedback adjustment of the system is relatively easier, contributing to reducing the amplitude of EC fluctuations and making the steady-state EC value more precise. The increase in steady-state time and overshoot is due to the fact that when adjusting to higher target EC values, more time is needed to adapt to and counteract the instability and nonlinearity during the process.
As shown in Table 4 and Figure 12, under different pressures, the difference between the steady-state EC value and the target EC value is small, with an absolute difference of less than 0.10 m3/h and a relative error below 6%. This indicates that the Mix-Fuzzy-FOPID controller can maintain a relatively stable operating state under various pressure conditions, unaffected by pressure changes.
In summary, the PID controller exhibits poor performance in both experiments and simulations, characterized by significant conductivity fluctuations, long steady-state times, and high overshoot. This is attributed to the system’s characteristics of time-varying, hysteresis, and nonlinearity, where the PID algorithm performs poorly in handling such a complex system compared to other algorithms. The PID algorithm optimized based on the Smith predictor demonstrates good control over conductivity in experiments, but in simulations, it also exhibits long rise and peak times. This is because the Smith predictor introduces time delay compensation into the PID control system, enhancing control performance but also implying a predictive process between control signal transmission and system response, thus delaying the reaction speed. The Fuzzy-FOPID algorithm shows improved performance compared to the PID algorithm in both experiments and simulations. This is attributed to the fractional-order PID algorithm introducing fractional-order control terms and combining the high adaptability of the fuzzy algorithm, making it more adaptable to rapid system changes. In terms of stability, the Mix-Fuzzy-FOPID algorithm excels in both experiments and simulations, exhibiting smaller conductivity fluctuations, shorter steady-state times, and lower overshoot. It utilizes an improved Wild Horse Optimizer, avoiding the issue of particle swarm algorithms prone to local optima, and combines the high adaptability of the fuzzy algorithm used by Wenqi Zhou and the time delay compensation function of the Smith predictor used by researchers like Zihao Meng, resulting in outstanding performance.

6. Conclusions

In this paper, the precision fertilization control system is studied, the EC flow control process is mathematically modeled, and the corresponding transfer function is established. A method is proposed for the optimization of a fractional-order PID controller. The algorithm utilizes fuzzy logic for parameter tuning, employs the Smith predictor for structural optimization, and incorporates a Wild Horse Optimizer, improved with a genetic algorithm, for parameter optimization. Simulation results demonstrate that the algorithm shortens the settling time to 114.61 s and reduces the maximum overshoot to 1.63%. Precision experiments indicate that the algorithm achieves an average EC fluctuation amplitude of about 0.12 mS/cm, a mean steady-state time of approximately 102 s, and an average overshoot of around 11.1%, showcasing excellent performance in various performance metrics. Stability tests reveal that the algorithm maintains an absolute difference below 0.10 m3/h and a relative error below 6%, exhibiting robustness against pressure variations. This algorithm enables faster convergence to control objectives, with short response times and minimal overshoot, providing a viable approach for the control of first-order nonlinear time-delay systems.

Author Contributions

Conceptualization, H.W. (Hao Wang) and L.Z.; software, H.W. (Hao Wang); validation, X.H.; resources, L.Z.; data curation, X.H.; writing—original draft preparation, H.W. (Hao Wang); writing—review and editing, H.W. (Huan Wang). All authors have read and agreed to the published version of the manuscript.

Funding

This study was funded by National Key R&D Program of China (2022ZD0115804), Major Science and Technology Projects in Xinjiang Uygur Autonomous Region (2022A02012-4), and Xinjiang Agricultural Machinery Research, Development, Manufacturing and Promotion Application Integration Project (YTHSD2022-03).

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Shi, Y.; Zhu, Y.; Wang, X.; Sun, X.; Ding, Y.; Cao, W.; Hu, Z. Progress and development on biological information of crop phenotype research applied to real-time variable-rate fertilization. Plant Methods 2020, 16, 11. [Google Scholar] [CrossRef]
  2. Wang, Y.; Yuan, Y.; Yuan, F.; Ata-UI-Karim, S.T.; Liu, X.; Tian, Y.; Zhu, Y.; Cao, W.; Cao, Q. Evaluation of Variable Application Rate of Fertilizers Based on Site-Specific Management Zones for Winter Wheat in Small-Scale Farming. Agronomy 2023, 13, 2812. [Google Scholar] [CrossRef]
  3. Raza, A.; Shahid, M.A.; Safdar, M.; Tariq, M.A.R.; Zaman, M.; Hassan, M.U. Exploring the Impact of Digital Farming on Agricultural Engineering Practices. Biol. Life Sci. Forum 2023, 27, 10. [Google Scholar]
  4. Zhu, F.; Zhang, L.; Hu, X.; Zhao, J.; Meng, Z.; Zheng, Y. Research and Design of Hybrid Optimized Backpropagation (BP) Neural Network PID Algorithm for Integrated Water and Fertilizer Precision Fertilization Control System for Field Crops. Agronomy 2023, 13, 1423. [Google Scholar] [CrossRef]
  5. Wang, P.; Chen, Y.; Xu, B.; Wu, A.; Fu, J.; Chen, M.; Ma, B. Intelligent Algorithm Optimization of Liquid Manure Spreading Control. Agriculture 2023, 13, 278. [Google Scholar] [CrossRef]
  6. Bai, J.; Tian, M.; Li, J. Control System of Liquid Fertilizer Variable-Rate Fertilization Based on Beetle Antennae Search Algorithm. Processes 2022, 10, 357. [Google Scholar] [CrossRef]
  7. Song, L.; Wen, L.; Chen, Y.; Lan, Y.; Zhang, J.; Zhu, J. Variable-Rate Fertilizer Based on a Fuzzy PID Control Algorithm in Coastal Agricultural Area. J. Coast. Res. 2020, 103, 490–495. [Google Scholar] [CrossRef]
  8. Zhang, J.; Hou, S.; Wang, R.; Ji, W.; Zheng, P.; Wei, S. Design of variable-rate liquid fertilization control system and its stability analysis. Int. J. Agric. Biol. Eng. 2018, 11, 109–114. [Google Scholar] [CrossRef]
  9. 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]
  10. Wan, C.; Yang, J.; Zhou, L.; Wang, S.; Peng, J.; Tan, Y. Fertilization Control System Research in Orchard Based on the PSO-BP-PID Control Algorithm. Machines 2022, 10, 982. [Google Scholar] [CrossRef]
  11. 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]
  12. Meng, Z.; Zhang, L.; Li, H.; Zhou, R.; Bu, H.; Shan, Y.; Ma, X.; Ma, R. Design and Application of Liquid Fertilizer pH Regulation Controller Based on BP-PID-Smith Predictive Compensation Algorithm. Appl. Sci. 2022, 12, 6162. [Google Scholar] [CrossRef]
  13. Liu, J.; Yang, C.; Chen, S.; Wang, Y.; Zhang, X.; Kang, W.; Li, J.; Wang, Y.; Hu, Q.; Yuan, X. Hydrochemical Appraisal and Driving Forces of Groundwater Quality and Potential Health Risks of Nitrate in Typical Agricultural Area of Southwestern China. Water 2023, 15, 4095. [Google Scholar] [CrossRef]
  14. Xu, J.; Wan, W.; Zhu, X.; Zhao, Y.; Chai, Y.; Guan, S.; Diao, M. Effect of Regulated Deficit Irrigation on the Growth, Yield, and Irrigation Water Productivity of Processing Tomatoes under Drip Irrigation and Mulching. Agronomy 2023, 13, 2862. [Google Scholar] [CrossRef]
  15. Dong, J.; Xue, Z.; Shen, X.; Yi, R.; Chen, J.; Li, Q.; Hou, X.; Miao, H. Effects of Different Water and Nitrogen Supply Modes on Peanut Growth and Water and Nitrogen Use Efficiency under Mulched Drip Irrigation in Xinjiang. Plants 2023, 12, 3368. [Google Scholar] [CrossRef] [PubMed]
  16. Zhu, J.; Chen, Y.; Li, Z.; Duan, W.; Fang, G.; Wang, C.; He, G.; Wei, W. Using Film-Mulched Drip Irrigation to Improve the Irrigation Water Productivity of Cotton in the Tarim River Basin, Central Asia. Remote Sens. 2023, 15, 4615. [Google Scholar] [CrossRef]
  17. Wang, W.; Zhang, L.; Ma, X.; Hu, Z.; Yan, Y. Experimental and Numerical Simulation Study of Pressure Pulsations during Hose Pump Operation. Processes 2021, 9, 1231. [Google Scholar] [CrossRef]
  18. Laldingliana, J.; Biswas, P. Artificial intelligence based fractional order PID control strategy for active magnetic bearing. J. Electr. Eng. Technol. 2022, 17, 3389–3398. [Google Scholar] [CrossRef]
  19. Guo, B.; Zhuang, Z.; Pan, J.; Chu, s. Optimal design and simulation for PID controller using fractional-order fish migration optimization algorithm. IEEE Access 2021, 9, 8808–8819. [Google Scholar] [CrossRef]
  20. Padron, J.P.; Perez, J.P.; Diaz, J.J.P.; Astengo-Noguez, C. Time-Delay Fractional Variable Order Adaptive Synchronization and Anti-Synchronization between Chen and Lorenz Chaotic Systems Using Fractional Order PID Control. Fractal Fract. 2023, 7, 4. [Google Scholar] [CrossRef]
  21. Li, Z.; Ding, J.; Wu, M.; Lin, J. Discrete fractional order PID controller design for nonlinear systems. Int. J. Syst. Sci. 2021, 52, 3206–3213. [Google Scholar] [CrossRef]
  22. Shi, J. A fractional order general type-2 fuzzy PID controller design algorithm. IEEE Access 2020, 8, 52151–52172. [Google Scholar] [CrossRef]
  23. Jha, A.K.; Dasgupta, S.S. Fractional order PID based optimal control for fractionally damped nonlocal nanobeam via genetic algorithm. Microsyst. Technol. 2019, 25, 4291–4302. [Google Scholar] [CrossRef]
  24. Gomaa, H.A.; Yin, Y.Y. A novel optimized fractional-order hybrid fuzzy intelligent PID controller for interconnected realistic power systems. Trans. Inst. Meas. Control 2019, 41, 3065–3080. [Google Scholar] [CrossRef]
  25. Kacimi, M.A.; Guenounou, O.; Brikh, L.; Yahiaoui, F.; Hadid, N. New mixed-coding PSO algorithm for a self-adaptive and automatic learning of Mamdani fuzzy rules. Eng. Appl. Artif. Intell. 2020, 89, 103417. [Google Scholar] [CrossRef]
  26. Chen, Y.; Long, F.; Kuang, W.; Zhang, T. A method for predicting blast-induced ground vibration based on Mamdani Fuzzy Inference System. J. Intell. Fuzzy Syst. 2023, 44, 7513–7522. [Google Scholar] [CrossRef]
  27. Baskys, A. Switched-Delay Smith Predictor for the Control of Plants with Response-Delay Asymmetry. Sensors 2023, 23, 258. [Google Scholar] [CrossRef]
  28. Naruei, I.; Keynia, F. Wild horse optimizer: A new meta-heuristic algorithm for solving engineering optimization problems. Eng. Comput. 2022, 38 (Suppl. S4), 3025–3056. [Google Scholar] [CrossRef]
  29. Katoch, S.; Chauhan, S.S.; Kumar, V. A review on genetic algorithm: Past, present, and future. Multimed. Tools Appl. 2021, 80, 8091–8126. [Google Scholar] [CrossRef]
  30. Zeng, C.; Qin, T.; Tan, W.; Lin, C.; Zhu, Z.; Yang, J.; Yuan, S. Coverage Optimization of Heterogeneous Wireless Sensor Network Based on Improved Wild Horse Optimizer. Biomimetics 2023, 8, 70. [Google Scholar] [CrossRef]
Figure 1. Structural diagram of precision fertilization system.
Figure 1. Structural diagram of precision fertilization system.
Processes 11 03374 g001
Figure 2. Fractional-order PID control schematic.
Figure 2. Fractional-order PID control schematic.
Processes 11 03374 g002
Figure 3. Fractional-order PID controller plane.
Figure 3. Fractional-order PID controller plane.
Processes 11 03374 g003
Figure 4. Structural diagram of fuzzy algorithm tuning controller parameters.
Figure 4. Structural diagram of fuzzy algorithm tuning controller parameters.
Processes 11 03374 g004
Figure 5. Membership function diagrams for relevant parameters. (a) Membership function diagram for error e and the rate of change of error e c ; (b) Membership function diagram for the correction parameters ( Δ K P , Δ K i , Δ K d ); (c) Membership function diagram for the correction parameters ( Δ λ and Δ µ ).
Figure 5. Membership function diagrams for relevant parameters. (a) Membership function diagram for error e and the rate of change of error e c ; (b) Membership function diagram for the correction parameters ( Δ K P , Δ K i , Δ K d ); (c) Membership function diagram for the correction parameters ( Δ λ and Δ µ ).
Processes 11 03374 g005
Figure 6. Structural model optimized by Smith predictor.
Figure 6. Structural model optimized by Smith predictor.
Processes 11 03374 g006
Figure 7. Smith predictor structural diagram.
Figure 7. Smith predictor structural diagram.
Processes 11 03374 g007
Figure 8. Structural model for parameter optimization using improved Wild Horse Optimizer.
Figure 8. Structural model for parameter optimization using improved Wild Horse Optimizer.
Processes 11 03374 g008
Figure 9. Flowchart of Mix-Fuzzy-FOPID Algorithm.
Figure 9. Flowchart of Mix-Fuzzy-FOPID Algorithm.
Processes 11 03374 g009
Figure 10. Comparison of control effects for four controllers under unit step response.
Figure 10. Comparison of control effects for four controllers under unit step response.
Processes 11 03374 g010
Figure 11. The experimental platform for regulating the EC value in the precision fertilization control system.
Figure 11. The experimental platform for regulating the EC value in the precision fertilization control system.
Processes 11 03374 g011
Figure 12. Schematic diagram of the experimental platform.
Figure 12. Schematic diagram of the experimental platform.
Processes 11 03374 g012
Figure 13. The comparison of test results for three target EC values. (a) Comparison graph of EC fluctuation amplitude; (b) Comparison graph of steady-state time; (c) Comparison graph of overshoot.
Figure 13. The comparison of test results for three target EC values. (a) Comparison graph of EC fluctuation amplitude; (b) Comparison graph of steady-state time; (c) Comparison graph of overshoot.
Processes 11 03374 g013
Figure 14. Comparison of relative error and absolute error under different pressures. (a) Comparison chart of absolute errors; (b) comparison chart of relative errors.
Figure 14. Comparison of relative error and absolute error under different pressures. (a) Comparison chart of absolute errors; (b) comparison chart of relative errors.
Processes 11 03374 g014
Table 1. Table of fuzzy rules for correction parameters Δ K P , Δ K i , and Δ K d .
Table 1. Table of fuzzy rules for correction parameters Δ K P , Δ K i , and Δ K d .
ecNBNMNSZOPSPMPB
e
Δ K P ,   Δ K i   and   Δ K d
NBPB/NB/PSPB/NB/NSPM/NM/NBPM/NM/NBPS/NS/NBZO/ZO/NMZO/ZO/PS
NMPB/NB/PSPB/NB/NSPM/NM/NBPS/NS/NBPS/NS/NBZO/ZO/NMZO/ZO/PS
NSPM/NB/ZOPM/NM/NSPM/NS/NMPM/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/PS/PSNM/PM/PSNM/PB/PSNB/PB/PB
PBZO/ZO/PBZO/ZO/PMNM/PS/PMNM/PM/PMNM/PM/PSNB/PB/PSNB/PB/PB
Table 2. Table of fuzzy rules for correction parameters Δ λ and Δ μ .
Table 2. Table of fuzzy rules for correction parameters Δ λ and Δ μ .
ecNBNMNSZOPSPMPB
e
Δ λ   and   Δ µ
NBPB/PSPB/PSPM/PBPM/PBPS/PBZO/PBZO/PM
NMPB/PSPB/PSPM/PBPS/PMPS/PBZO/PBZO/PS
NSPB/ZOPM/PSPS/PMPS/PMZO/PNNS/PMNS/PS
ZOPM/ZOPM/PSPS/PSZO/PSNS/PSNM/PSNM/PS
PSPM/ZOPS/ZOZO/ZONS/ZONS/ZONM/ZONB/ZO
PMZO/NBZO/NSNS/NSNS/NSNM/NSNB/NSNB/NS
PBZO/NBZO/NMNS/NMNM/NSNM/NSNB/NSNB/NS
Table 3. The four controllers’ transient performance indicators.
Table 3. The four controllers’ transient performance indicators.
Controller TypeRise Time (s)Peak Time (s)Regulation Time (s)Maximum Overshoot
PID29.1348.01254.2841.43%
SMITH152.85179.98202.764.88%
Fuzzy-FOPID22.5530.26128.3715.59%
Mix-Fuzzy-FOPID86.9494.08114.611.63%
Table 4. The precision test results of the four controllers.
Table 4. The precision test results of the four controllers.
Controller TypeTarget EC Values (mS/cm)Steady-State EC Values (mS/cm)EC Fluctuation Amplitude (mS/cm)Steady-State Time (s)Overshoot (%)
PID1.51.21~1.820.6121821.4
1.81.57~2.140.5722321.7
2.01.73~2.260.5323622.9
SMITH1.51.39~1.750.3618315.7
1.81.61~1.940.3318916.0
2.01.85~2.170.3219716.3
Fuzzy-FOPID1.51.33~1.920.5915119.5
1.81.57~2.080.5116920.2
2.01.87~2.310.4417620.8
Mix-Fuzzy-FOPID1.51.43~1.580.159210.1
1.81.76~1.890.1310110.9
2.01.94~2.030.0911212.4
Table 5. The stability test results for the Mix-Fuzzy-FOPID controller.
Table 5. The stability test results for the Mix-Fuzzy-FOPID controller.
Target EC Values (mS/cm)0.2 MPa0.3 MPa0.4 MPa
Measured Mean (mS/cm)Absolute Error (mS/cm)Relative Error (%)Measured Mean (mS/cm)Absolute Error (mS/cm)Relative Error (%)Measured Mean (mS/cm)Absolute Error (mS/cm)Relative Error (%)
1.51.560.064.001.580.085.331.470.032.00
1.450.053.331.530.032.001.520.021.33
1.510.010.671.540.042.671.540.042.67
1.81.880.084.441.760.042.221.850.052.78
1.830.031.671.800.000.001.780.021.11
1.890.095.001.830.031.671.810.010.56
2.01.990.010.501.970.031.501.940.063.00
1.960.042.002.010.010.502.030.031.50
2.020.021.002.030.031.501.980.021.00
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

Wang, H.; Zhang, L.; Hu, X.; Wang, H. Design and Optimization of Precision Fertilization Control System Based on Hybrid Optimized Fractional-Order PID Algorithm. Processes 2023, 11, 3374. https://doi.org/10.3390/pr11123374

AMA Style

Wang H, Zhang L, Hu X, Wang H. Design and Optimization of Precision Fertilization Control System Based on Hybrid Optimized Fractional-Order PID Algorithm. Processes. 2023; 11(12):3374. https://doi.org/10.3390/pr11123374

Chicago/Turabian Style

Wang, Hao, Lixin Zhang, Xue Hu, and Huan Wang. 2023. "Design and Optimization of Precision Fertilization Control System Based on Hybrid Optimized Fractional-Order PID Algorithm" Processes 11, no. 12: 3374. https://doi.org/10.3390/pr11123374

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