1. Introduction
In recent years, with the advancement of agricultural mechanization and modernization, the integration of water and fertilizer technology has rapidly developed. The integration of water and fertilizer is a new agricultural technology that integrates agricultural irrigation and fertilization control. According to the nutrient demand of crop growth, this technology accurately regulates the pH value and EC value of water and fertilizer and gives the optimal pH value of water and fertilizer for crop growth, which is conducive to the absorption of liquid fertilizer nutrients by crop roots and the promotion of crop growth [
1]. After adjusting the pH value, water and fertilizer can effectively improve the soil quality and reduce the pollution of fertilizer in the environment [
2].
However, In precision agriculture, the regulation process of liquid fertilizer pH value has the volume delay of pipeline transmission and a reaction delay of the neutralization process, resulting in time-varying, hysteresis and non-linearity of the system [
3,
4]. Understanding how to apply fertilizer quickly and effectively adjust the pH value of water and fertilizer in the process is a hot issue in today’s water and fertilizer integration technology [
5]. Tan et al. [
6] obtained the parameters of the static antititration relationship through a genetic algorithm, linearized the regulation process model, and then applied the PID controller after parameter optimization to the pH value regulation device. The experiment showed that the controller had a faster response speed and smaller overshoot in pH regulation. Zou Zhiyun et al. [
7] proposed a non-linear Hammerstein MAC algorithm, which can track the set value in time and suppress interference. Through simulations and experiments, it was found that even in the case of model mismatch, the non-linear Hammerstein MAC algorithm showed good robustness and stability. Homero J. Sena et al. [
8] designed a real-time adaptive correction of artificial neural network prediction through the extended Kalman filter (EKF). Compared with the MPC of the artificial neural network, this algorithm reduced the oscillation of the system and the sum of square error of the controlled pH value by 64.3%. Sanaz Mahmoodi et al. [
9] designed a Wiener–Laguerre model. The linear and non-linear parts of the Wiener structure of the model were Laguerre filters and simple polynomials. Based on this model, the pH neutralization process identification was evaluated in different orders. Experimental results showed that the model fitted well and improved the quality of the model. E. Ali [
10] designed an adaptive PI algorithm to predict the closed-loop response of the model and sensitivity to the algorithm parameter settings according to the characteristics of the pH neutralization process and then adjusted the controller parameters online.
Adjusting and optimizing a fuzzy algorithm can improve the control effect of a non-linear system noticeably. B. Demaya et al. [
11] associated the gradient algorithms and Rosenbrok’s algorithms with the qualitative supervision level of multilayer structure to optimize the fuzzy controller, and put the optimized fuzzy controller into the chaotic system for simulation experiment. The results showed that the algorithm had good control effect in linear, nonlinear, stable and unstable systems. T. Nalovsky et al. [
12] improved the fuzzy PI control system of superheated steam temperature for a once-through boiler, optimizing the parameters of the fuzzy function of high-pressure steam temperature by minimizing the minimum deviation between the actual temperature output calculated by the standard and the response output with fixed parameters. The simulation results showed that the system can significantly improve the controlled process. Shahid Hussain et al. [
13,
14,
15]. undertook in depth research on the optimization and application of fuzzy control. When an EV parking lot is faced with a huge charging load, Shahid Hussain proposed a fuzzy logic weighting scheme, which assigns weights to the relevant states of each vehicle and schedules the charging operation according to the weights, so as to optimize the distribution of charging power for an EV. Under the constraint of a power grid, a two-stage fuzzy logic reasoning algorithm was proposed to optimize the performance quality of the EV parking lot. In the first stage, the total charge–discharge energy of the EV is obtained by the next travel distance of EV, and in the second stage, the charging amount of the EV is regulated by preference variables.
At present, the most common method to overcome pure hysteresis in industry is Smith predictive control [
16]. Guangda Chen [
17] proposed a Smith predictor combined with linear active disturbance rejection control (LADRC), which solves the problem of the estimated and actual models in the Smith predictor needing to be accurately matched. It was proven after simulation testing and application experiments. The performance indicators of this algorithm are better than those of traditional algorithms. Haocai Huang et al. [
18] put a first-order filter in the Smith predictor in view of the characteristics of large inertia, time delay and a complex and changeable environment in the process of deep-sea hydraulic oil replenishment. The simulation results of the controller showed that the algorithm has small oscillations and overshoots and can reach the steady state of the system in a short time. The algorithm also confirmed the simulation results in practical applications. Vicente Feliu-Batlle and Raul Rivas-Perez [
19] established a dynamic model of heating furnace crude oil temperature control. To ensure the stability and sensitivity of the control, they designed a proportional integral controller embedded in the Smith predictor. The simulation results showed that the system can effectively suppress the interference and maintain steady-state control in the dynamic changes of parameters.
In this paper, fuzzy-PID, Smith and modified fuzzy-PID-Smith controllers (hereinafter referred to as FP-Smith controllers) for adjusting the pH value of liquid fertilizers were designed. The simulation analysis was carried out for two cases of model matching and non-matching, and the step response curve was obtained. The performance evaluation of the controller through four aspects—rise time, peak time, maximum overshoot and steady-state time [
20]—indicates that the FP-Smith controller has the best control effect. In addition, based on STM32F103ZET6, four control algorithms were applied to the pH control system of liquid fertilizer, and the effectiveness of the three algorithms was verified by experiments. The results further showed that the FP-Smith predictor compensator can effectively solve the time-variation, time-delay and non-linearity of the pH control model of liquid fertilizer. Thus, this approach meets the requirements of precise control of the pH value of liquid fertilizer by the controller.
The purpose of this paper is to propose a modified fuzzy-PID-Smith predictive compensation control algorithm in view of the time-varying, time-lag, and non-linear characteristics of pH adjustment when water and fertilizer are mixed. This algorithm can quickly adjust the pH value of water and fertilizer to the set value in the pH value adjustment and reduce the adverse effects of system time delay on controller performance.
The chapters of this article are as follows: the second section introduces the working principle of the pH value control system, establishes a mathematical model of pH value control, and analyses the characteristics of liquid fertilizer pH value control. In the third section, the mathematical derivation of the FP-Smith predictive compensator algorithm is carried out, the fuzzy-PID, Smith, and FP-Smith predictive compensators are simulated and analyzed, and the model is evaluated through simulation analysis. The fourth section introduces the test platform and devices and analyses the experimental results to verify the simulation results. The fifth section analyses the performance of the controller through experiments. The sixth section draws conclusions.
6. Conclusions
In this paper, a modified fuzzy-PID-Smith predictive compensation controller was designed based on the mathematical model of the pH control system. Compared with the fuzzy-PID controller and Smith controller in simulation and practical applications, the performance of the controller was tested. The results show that the modified fuzzy-PID-Smith predictive compensation controller can adjust the pH value of liquid fertilizer to the expected value in the shortest time and has a small overshoot in both simulation and practical application.
Under different fertilizer flow rates, the average maximum overshoot of the pH value regulated by the modified fuzzy-PID-Smith predictive compensation controller was 0.23%, and the average time for the pH value of liquid fertilizer to reach steady state from 7.3 to 6.8 was 30 s, which was better than the fuzzy-PID and Smith algorithms. This shows that the modified fuzzy-PID-Smith predictive compensation controller can be adapted for different fertilization modes.
The modified fuzzy-PID-Smith predictive compensation controller can effectively solve the adverse effects of time-varying, time delay and non-linearity of the model on the controller in liquid fertilizer pH control and has good dynamic performance and robustness, which meets the control requirements of liquid fertilizer pH control in practical applications.