Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 14, No. 3, 2025 303 Research on PSO‐PID Based Flow Regulation and Control System Kunpeng Wang, Dazhi Yang Sichuan University of Science & Engineering, Yibin, 64400, China Abstract: This research project is based on the demand for flow regulation and control. Chemical treatment of lithium is conducted to ensure precise control of fluid flow rate. The proportional flow electromagnetic valve block and valve core are analyzed and calculated. Based on relevant parameters and actual experimental data, corresponding mathematical models and transfer functions are established. To ensure fast and stable dynamic response of the control system, conventional PID control algorithms, fuzzy PID control algorithms, and particle swarm fuzzy PID algorithms are studied. Simulink simulation models are built in MATLAB, and step response simulations and interference signal response simulations are performed for verification and comparison. The results show that: the rise time for conventional PID control is 40.12 seconds, with an overshoot of 13.2%, peak time of 64.7 seconds, and settling time of 119 seconds; for fuzzy PID control, the rise time is 35.14 seconds, with an overshoot of 1.9%, peak time of 46.15 seconds, and settling time of 64 seconds; for particle swarm fuzzy PID control, the rise time is 31.47 seconds, with negligible overshoot, peak time of 35.14 seconds, and settling time of 42.48 seconds. It can be concluded that compared to conventional PID control and fuzzy PID control, particle swarm fuzzy PID control demonstrates superior performance in terms of rise time, settling time, and overshoot. Additionally, the superiority of particle swarm fuzzy PID control as the control algorithm for the flow regulation system is confirmed through interference signal simulations, meeting the operational requirements of the control system. Keywords: Flow Regulation Control; Fuzzy PID; Simulink Simulation; Particle Swarm. 1. Introduction Currently, research on variable control of spray flow has been extensively explored, achieving precise control under various complex operational conditions[1,2]. Tewari et al.[3] designed a system that utilizes ultrasonic sensors to collect information, which is then processed by a central controller to adjust the opening degree of proportional flow solenoid valves, thereby controlling the flow rate. Gonzalez et al.[4] developed a system that employs pressure sensors to collect real-time data during operation, establishes a mathematical model of the electro-controlled proportional valve to derive the transfer function, and implements precise flow control through the central controller’s control algorithm. Maghsoudi H et al.[5] utilized three ultrasonic distance sensors to gather information and combined it with the gradient descent backpropagation method to enable automatic flow regulation. Salcedo R et al.[6] employed PWM (Pulse Width Modulation) technology to control solenoid valves, thereby regulating the flow rate at the nozzle, reducing unnecessary spraying, and improving system efficiency. Elmer et al.[7] conducted an in- depth study of equipment operational parameters, focusing on the relationship between speed and spray pressure, established corresponding functional relationships, analyzed the relationship between spray angle and speed, and achieved real-time flow regulation within the system. Cen Zhenzhao et al.[8] established a MATLAB/Simulink simulation model based on the parameters of UAV flight speed and spray flow. Through the research on the neural network PID control algorithm and the comparison of simulation data, they proved the superiority of their design.Li Jinyang et al.[9] conducted a flow - field analysis on the fluid flow parameters passing through the regulating valve, and carried out theoretical calculations on the working principle and parameters of the regulating valve. By establishing a mathematical model between the valve opening and the fluid flow in combination with the valve opening of the regulating valve, and conducting simulation analysis in combination with the control algorithm, they achieved high - precision control of the flow, reduced the relative deviation, and accomplished the control target.Guo Na et al.[10] analyzed the fluid system to be modeled based on the fluid network theory, obtained the mathematical model through theoretical calculations, and controlled the flow based on the Smith - fuzzy PID control algorithm. They verified that this control algorithm has a high response speed and good robustness, and reduces the nonlinear interference of the system.Shao Lushou et al. [11] analyzed the growth density information of crops, and according to different set pest damage levels, used the fuzzy control method to establish a simulation model. Through the verification of simulation experiments, they determined the rationality of the control system and met the requirements of intelligent automatic regulation of spraying. 2. Research Object and Technical Route 2.1. Research object Lithium is a silvery-white metallic element. It is soft and has the lowest density among metals. It is flammable and prone to corrosion, with highly active chemical properties. It is widely used in atomic reactors, battery manufacturing, the metallurgical industry, and the production of glass and ceramics [12].Lithium can react with water to produce hydrogen and lithium hydroxide. During the reaction, a large amount of hydrogen is generated, which can easily cause an explosion when reacting with oxygen. Therefore, oxygen should be excluded during the production process of digesting lithium slag.In addition, LiOH is readily soluble in water and exists in the form of ions in the aqueous solution. The LiOH 304 solution is strongly alkaline and can cause burns to the eyes, respiratory tract, etc.[13]. Safety should be emphasized during the production process. The properties of lithium hydrates are shown in Table 1-1 below. Table 1-1. Properties of Lithium Hydrides Name Properties Li It has a melting point of 180℃ and a boiling point of 1340℃. It is flammable and prone to corrosion. It can react with water to produce hydrogen and lithium hydroxide. Generally, it is stored in kerosene. Li2O It has a melting point of 1567°C and a boiling point of 2600 °C. It hydrolyzes to form lithium hydroxide. LiOH It has a melting point of 471°C and a boiling point of 925 °C. It is a strong base with high corrosiveness, readily soluble in water, and should be stored in a sealed and dry environment. 2.2. Methodological framework The research object of this project is the flow regulation control system. Based on the actual design requirements, research and analysis are carried out to clarify the research objectives and directions. The flow regulation control system is determined as the core technology to achieve the purpose of precise regulation and control of the system flow. After model establishment and simulation analysis, the optimal control strategy is selected, and the feasibility of the scheme is verified through experiments. 3. Structural Analysis of Solenoid Valves 3.1. Theoretical calculation of the valve core In the flow regulation system, the proportional flow solenoid valve controls the system flow by adjusting the valve opening. Its core principle is to change the area of the flow port by axially moving the valve core. That is, the electromagnetic force drives the valve core to move axially to change the gap (effective flow aperture) between the valve core and the valve seat. It is necessary to study the cone angle of the valve core. According to the actual working conditions of the flow regulation system and combined with the flow change law of the valve core cone angle, theoretical calculations are carried out on the parameters of the valve core cone angle, and appropriate valve core cone angle parameters are selected[14]. The momentum equation can describe the motion of fluids. By combining the effect of the steady-state hydraulic force on the valve core and the flow characteristics of the fluid (such as inertial force and viscous force), the steady-state hydraulic force equation of the proportional flow solenoid valve core can be calculated. cos2 pACCF svqw  (2-1) In the formula, The steady-state hydraulic force is wF (N);The velocity coefficient of the steady-state hydraulic force is qC ;The flow velocity coefficient of the steady-state hydraulic force is vC ;The spool cone angle is  (°);The pressure difference across the flow cross-section is p (Pa). According to the references and the steady-state hydraulic force equation, the mathematical model of the spool of the proportional flow solenoid valve can be obtained as follows:   pnbl D lDCC F n nvq w    2 2sinsin2  (2-2) In the formula, The diameter of the spool is nD (mm);The number of throttling ports is n ;The slot width of the throttling port is b (mm);The opening degree of the spool is l (mm). In order to prevent the instability of the spool caused by excessive hydraulic force, the limiting conditions for the spool cone angle are set. To ensure its sealing performance and better control the magnitude of the steady-state hydraulic force, it should meet the following requirements: 4 tan 30 nn DD   (2-3) Through the research on the steady-state hydraulic force, it is found that there is approximately a linear relationship between the steady - state hydraulic force and the spool cone angle, and the magnitude of the hydraulic force increases with the increase of the cone angle [15]. Since an excessively large or small cone angle is not conducive to the working stability of the proportional flow solenoid valve, based on the above theoretical analysis and considering the working performance, a spool cone angle of 45 degrees is selected. It has good performance and can meet the requirements of actual working conditions. 3.2. Theoretical calculation of the flow field and flow rate equation According to the structural characteristics of the proportional flow solenoid valve, the characteristics of the throttle orifice in the valve block conform to the physical characteristics of a thin-walled orifice. Therefore, the throttle orifice in the valve block can be regarded as a thin-walled orifice model under ideal conditions. The pressure drop across the throttle orifice affects the flow velocity and flow rate of the fluid, which reflects the dynamic characteristics of the fluid. g vv g vv hh rfr f 22 22 1 22 1       (2-4) 121 2                g A nbl f (2-5) In the formula, The pressure drop across the throttle orifice is fh (Pa);The energy loss at the throttle orifice is h ;The 305 fluid velocity at the inlet of the throttle orifice is 1v (m/s);The average fluid velocity at the throttle orifice is rv (m/s);The flow resistance coefficient of the throttle orifice is f ;The cross-sectional area of the throttle orifice is A (mm2). When the fluid passes through the throttle orifice, its flow velocity and pressure will change, but the overall flow rate remains complete and continuous. Before conducting the theoretical calculation of the flow field flow equation, in order to ensure the accuracy and consistency of the fluid flow rate calculation, under ideal conditions, for the steady flow of the fluid (i.e., the law of conservation of mass where the flow rate does not change with time), the theoretical calculation of the continuity equation of steady flow is carried out. r r v A A v 1 (2-6) In the formula, The cross-sectional area of the throttle orifice is rA (mm2). Based on the basic principles of fluid mechanics and the law of conservation of mass, the flow equation of the valve block flow field can be derived through the continuity equation of steady flow and the pressure drop across the throttle orifice.  p AKvAQ rrrr   (2-7) In the formula, The throttling coefficient is rK ;The fluid density is  (kg/m3). 4. Mathematical Model of The Flow Regulation System 4.1. Control principle of the flow regulation control system In the flow regulation control system, the detection data from the flow sensor are used as inputs to perform real-time regulation of the valve opening of the proportional flow solenoid valve, thereby achieving changes in the flow rate and fulfilling the objective of precise and rapid regulation of the fluid flow. The schematic diagram of the closed-loop control system of the flow regulation control system is shown in Figure 3-1 below. Figure 3-1. Schematic Diagram of the Closed-Loop Control System 4.2. Construction of the mathematical model of the system Combined with the working characteristics of the proportional flow solenoid valve, considering it as a second - order oscillatory element, its transfer function can be obtained as follows: 1 2)( )( )( 2   s s K sI sQ sG v v v v v v v    (3-1) In the formula, The flow gain is )(sQv (m);The output current is )(sI (A);The gain coefficient is vK (m/A);The equivalent undamped natural vibration frequency is v (rad/A);The equivalent damping coefficient is v . The input and output of the flow sensor exhibit a linear relationship. The equivalent damping coefficient is Therefore, the transfer function relationship of the flow sensor can be derived as follows: ll K sy su sG  )( )( )( (3-2) In the formula, The proportional constant is lK ;The output value of the flow sensor is )(su ;The input value of the flow sensor is )(sy . By synthesizing the relationships in (3-1) and (3-2), the transfer function relationship of the flow regulation control system can be obtained as follows: )()(1 )()( )( sGsG sGsG sG lv lv   (3-3) Based on the selected model and parameters of the proportional flow solenoid valve and the parameters of the flow sensor, and in combination with the actual experimental process, the transfer function of the system can be obtained as follows: 4.15902.0 9.23 )( 2   ss sG (3-4) 306 5. Control Algorithm 5.1. PID control The PID control algorithm can meet the requirements for fluid flow control in the flow regulation control system and achieve the goal of reducing errors in the control system. It is widely used in industrial automation control and agricultural automation control systems [16]. The schematic diagram of the basic structure of a conventional PID control system is shown in Figure 4-1. Figure 4-1. Schematic Diagram of the PID Control System) The mathematical expression is as follows: )()()( tytrte  (4-1) The expression of the closed-loop control variable is as follows:               dt tdeT dtte T teKtu d i p 1 )( (4-2) In the formula, The proportional coefficient is pK ;The integral time coefficient is iT ;The derivative time coefficient is dT . Performing a Laplace transform on Equation (4-2) yields the following Equation (4-3):        )( )( )()( ssET sT sE sEKsU d i p (4-3) Since the output of the PID controller has been obtained from the above equation (4-3), the transfer function of the PID controller can be derived as shown in the following equation (4-4): ) 1 1( )( )( )( sT sT K sE sU sG d i p  (4-4) 5.2. Fuzzy PID control The conventional PID control system has poor stability and anti - interference ability. Moreover, when using it, the values of KP,KI,KD need to be set in advance. It can only be used for specific systems and cannot achieve parameter self - adaptation. Therefore, the research on the fuzzy PID control of the flow regulation control system is of great significance. Fuzzy PID control combines the adaptability of conventional PID control and fuzzy control, and can adjust the PID parameters of the system in real - time, further improving the control performance of the system [17]. In the schematic diagram of the two-dimensional three- output fuzzy PID control shown in Figure 4-2 below, Ke andKec are the quantization factors of the error e and the error change rate ec respectively. Taking the error e and the error change rate ec as the input variables of the fuzzy controller, the fuzzy PID controller combined with the fuzzy rule table adjusts and corrects the values of KP,KI,KD, and the resulting ∆KP,∆KI, and ∆KD are used as the output variables. Figure 4-2. Fuzzy PID Control Schematic Diagram In the flow regulation system, the flow sensor feeds back the fluid flow signal to the fuzzy PID controller. In the fuzzy PID controller, the error e obtained by comparing with the set flow and the error change rate ec serve as input variables. In the fuzzy PID controller, an appropriate membership function is selected to perform fuzzification on them. Then, the 307 established fuzzy rule base conducts fuzzy inference on them to obtain the corresponding fuzzy sets. Finally, the membership function is used again to defuzzify the fuzzy output quantity, so as to obtain an accurate output control signal. The fuzzy output quantity can be obtained through formula (4-5).         DDDD IIII PPPP KKK KKK KKK    ' ' ' (4-5) In the above equation, αP, αI, and αD are the scaling factors for the proportional, integral, and derivative terms respectively. KP, KI, KD are the revised parameters for the proportional, integral, and derivative terms, while K’ P, K’ I, and K’ D are the parameters for the proportional, integral, and derivative terms before revision.: The core of fuzzy PID control is to automatically adjust the PID parameters through fuzzy logic. The control process is as follows: 1. Fuzzification processing. Fuzzification is the process of performing fuzzy transformation on the error e and the error change rate ec, which serve as the input variables of the fuzzy PID controller, and calculating each membership value in combination with the membership function. According to the design requirements of the flow regulation control system, after multiple adjustments, the fuzzy domain of the error e is obtained as [-6, 6], the fuzzy domain of the error change rate ec is [-6, 6], the fuzzy domain of ∆KP is [-6, 6], the fuzzy domain of ∆KI is [-1, 1], and the fuzzy domain of ∆KD is [-1, 1]. The input and output variables of this system are divided into seven fuzzy sets: NB (Negative Big), NM (Negative Medium), NS (Negative Small), ZO (Zero), PS (Positive Small), PM (Positive Medium), and PB (Positive Big). Fuzzy inference based on the fuzzy rule base. When establishing the fuzzy rule base according to control experience, the following criteria can be referred to.When the value of the error e is large,∆KP can be increased to accelerate the system's response speed and reduce the overshoot. When the value of the error e is moderate, ∆KP can be moderately reduced to decrease the overshoot, and appropriate values of ∆KI and ∆KD can be maintained to improve the system's response speed. When the value of the error e is small,∆KP and ∆KI can be increased to suppress the system's oscillation. Meanwhile, the value of ∆KD is inversely selected according to the magnitude of the error change rate ec to enhance the system's steady - state performance.Based on the fuzzy rules summarized above, the fuzzy rule change law surface diagrams for ∆KP, ∆KI and ∆KD as shown in Figure 4-3 below are constructed. ∆KP ∆KI ∆KD Figure 4-3. Surface Plot of Fuzzy Rules Variation Patterns 3.Defuzzification. Since the fuzzy output cannot be directly recognized and controlled by the proportional flow solenoid valve, it is necessary to defuzzify the fuzzy output to obtain the crisp output. According to the defuzzification algorithm, in order to obtain a relatively accurate control quantity [18], the centroid method is adopted in this project to process and calculate the fuzzy output, as shown in the following equation (4-6):     n j j n j jj uA uAu u 1 1 )( )( (4-6) In the formula, The output crisp quantity is u;The abscissa of A(uj) is uj; The membership function is A(uj). 5.3. Particle Swarm Optimization (PSO) algorithm The Particle Swarm Optimization (PSO) algorithm is an algorithm that simulates the collective movement of birds in the natural environment to find the optimal solution based on the foraging experiences of individual birds and the bird group [19, 20]. In simple terms, this algorithm is similar to regarding particles as individual birds. Through information sharing among the bird group, the algorithm compares the pros and cons of different individual birds' routes, adjusts the flight target direction in real - time (i.e., the iterative process), and finally selects the best route (i.e., the optimal solution) through continuous adjustment [21].In this project, the proportional factors KP, KI, KD and the quantization factors Ke and Kec are regarded as particles with certain velocities and different positions. The PSO algorithm gradually converges to obtain the optimal solution through continuous iterative operations [22]. Due to the uncertainty of particle movement, the system also has corresponding uncertainty during simulation [23]. Therefore, when the distance between the particle and the optimal solution is too large, the running time of the iterative optimization will be too long, and the results obtained may not be accurate. So, the iteration of the particle swarm needs to follow the principle that the particles move towards the optimal solution without colliding with each other and without leaving the range of the particle swarm group. In the actual simulation model, the proportional factors KP, KI, KD and the quantization factors Ke and Kec are set in an N dimensional space. In this space, the spatial position of the i th particle in the particle swarm is represented as xi=[xi1,xi2...xin] which represents the actual position direction of the particle; the moving velocity of the particle is represented as vi=[vi1,vi2...vin], which represents the actual operating velocity of the particle.In the space, all particles 308 search for the optimal solution through continuous iteration. By combining the optimal extreme value of individual particles Pbesti=(Pi1,Pi2,…,Pin) and the optimal extreme value of the group particles Gbesti=(Gi1,Gi2,…,Gin), they are compared through the fitness. Finally, the position and velocity of the particles are continuously iteratively optimized. The formulas are shown as follows in equations (4-7) and (4- 8):    iiiii xGrcxPrcvv  22111 * (4-7) 11   iii vxx (4-8) In the formula, The inertia weight is ω;The learning factor is c1,c2;The random number within the range of [0-1] is r1,r2. The value of the inertia weight ω reflects the degree of retention of the previous motion inertia. It is directly proportional to the search range of the particles and reflects the local and global search capabilities of the particle swarm. The learning factor c1 represents the experience of the particles in the search process, while c2 represents the magnitude of its weight. During the particle swarm optimization process, the larger the population size of the particle swarm, the larger the search range and the better the optimization result. However, an excessively large population size will lead to a longer computation time for the system. Therefore, the size of the particle swarm is generally chosen to be between 20 and 100.In the particle swarm optimization process, the parameters need to be set first. Parameters such as the initial number of particles, the number of iterations, the learning factors, and the inertia weight are set. Then, the algorithm is used for optimization calculations, and the fitness function value is determined according to the ITAE criterion as shown in the following equation (4-9). Finally, the curve of the fitness change during the particle swarm optimization process is obtained, as shown in Figure 4-4 below. dttetITAE    0 |)(| (4-9) Figure 4-4. Particle Swarm Fitness Optimization Change Curve Diagram It can be seen from the above figure that after iteration, the result is very close to the optimal solution of the set parameters, meeting the actual performance index requirements. 5.3.1. Improvement of the particle swarm algorithm In the particle swarm algorithm, when the local search and optimization ability is strong, the overall ability of the particle swarm to find the optimal solution often weakens. However, if the overall optimization ability is enhanced, the final optimization result of the particle swarm may be unsatisfactory. In response to this phenomenon, by referring to the literature [24, 25], a research was conducted and an improved scheme was determined. This scheme uses the compression factor λ to limit the particle velocity and control the parameter size of the inertia weight ω to improve the optimization ability of the algorithm. In the particle swarm algorithm, the compression factor λ is used to control the particle velocity to prevent it from being too large and reduce the oscillation phenomenon generated during the algorithm's optimization process. The compression factor λ gradually decreases with the number of iterations of the algorithm's operation, so as to stably shrink towards the global optimal solution. The improved expressions are shown in the following equations (4-10) and (4-11):      )()()()()()()(*)1( 2211 txtGtrctxtPtrctvtv idididididid   (4-10)    42 2 2   (4-11) Among them, ψ=c1+c2. The compression factor λ will converge as the algorithm iterates. When the value of λ is relatively large in the early stage, it can help the particles conduct range searches more quickly, thereby improving the efficiency. When the value of λ becomes smaller later, it can suppress the particle velocity, shrink towards the optimal solution, obtain more accurate search results, and enhance the performance of the system. In the above - mentioned principle of the particle swarm algorithm, the role of the parameter size of the inertia weight ω was briefly mentioned. When the value of the inertia weight ω is relatively large, the particles will retain more of their previous speed and direction, which improves the global search ability and helps to discover potential optimal solutions. However, it is not conducive to convergence. When the value of the inertia weight ω is relatively small, the particles can more easily find local optimal solutions, which improves the local search ability and results in a faster convergence speed. Nevertheless, it is also prone to failing to find the global optimal solution. In this research project, the parameter size of the inertia weight ω is regulated in the form of an exponential function, and its value gradually decreases as the number of iterations increases. By adding random numbers in the form of a beta distribution, the proportional factors KP,KI,KD and the quantization factors Ke and Kec can enhance the global search ability and search accuracy of the algorithm, reduce the possibility of getting trapped in local optimal solutions, and improve the search efficiency of the entire algorithm. The random numbers that meet the requirements can be generated using the random number generator `betarnd` in MATLAB. The expression for the inertia weight is shown in the following equation (4 - 12): 309   ),(** max 1 minmaxmin qpbetarnde t    (4-12) In the formula, The maximum number of iterations is tmax; The inertia adjustment factor is σ. Analysis of expression (4 - 12) reveals that it exhibits the characteristic of non - linear decreasing variation, which meets the design requirements. The particle swarm algorithm is improved by using the compression factor λ to limit the particle velocity and control the parameter size of the inertia weight ω, and the particle positions are updated through crossover and mutation. Ultimately, this can lead to better convergence of the algorithm and stronger global search ability of the algorithm. 5.3.2. Optimization process based on the particle swarm fuzzy PID control algorithm In MATLAB, the particle swarm algorithm is programmed through an m - file. The values of the proportional factors KP,KI,KD and the quantization factors Ke and Kec are assigned to the fuzzy PID controller using the `assigain` function, thus realizing the connection between the particle swarm algorithm and the simulation model. According to the particle swarm fuzzy PID control algorithm described above, taking advantage of its global optimization ability, the parameters such as the proportional factors KP,KI,KD and the quantization factors Ke and Kec are continuously optimized and adjusted. Finally, the optimal solution is output. According to the above figure, the optimization process is as follows: First, parameters of the algorithm such as the number of particles, the number of iterations, learning factors, and inertia weights are initialized, making the initial velocity and position of each particle random. Then, calculations are carried out in the fuzzy PID controller based on the current velocity and position of the particles. By running the Simulink simulation model using the `sim` function, the fitness of the current particles is obtained. Next, the current fitness of the particles is compared with the historical optimal fitness, and the better fitness value is selected. The particle swarm information is updated, and the fitness of the particles is repeatedly compared to select the globally optimal fitness. It is determined whether the optimal solution is reached and whether the number of iterations meets the standard to decide whether to stop the operation. Otherwise, the calculation process continues to run repeatedly. Throughout the entire process, the algorithm continuously adjusts and optimizes the parameters, and finally outputs the optimal solution, thereby improving the performance indicators of the fuzzy control. 6. Simulation and Analysis To facilitate the comparison of the effects of the three control algorithms, a comprehensive Simulink simulation model of the three control algorithms as shown in Figure 5 - 1 below is established in MATLAB. Figure 5-1. Integrated Simulink Model for Three Control Algorithms Input the corresponding parameters and then conduct a simulation. The step-response simulation diagram as shown in Figure 5-2 below is obtained. For the particle swarm fuzzy PID algorithm, the rise time is 31.47s, the peak time is 35.14s, and the settling time is 42.48s. There is no obvious overshoot. By comparing the data obtained from the PID control algorithm and the fuzzy PID control, it can be clearly found that the particle swarm fuzzy PID algorithm has better regulation performance. 310 Figure 5-2. Step Response Simulation Diagram When a step interference signal with a value of -2 is inserted at t = 300, the simulation diagram of the anti - interference signal response and its locally enlarged view are shown in Figure 5-3 below. The settling time of the particle swarm fuzzy PID algorithm is 36.36s, and there is no obvious deviation. Compared with the other two algorithms, it has stronger anti-interference ability and meets the control requirements. Figure 5-3. Anti-interference Signal Response Simulation Diagram 7. Conclusion Through the research on the conventional PID control algorithm, the fuzzy PID control algorithm, and the particle swarm fuzzy PID algorithm, the control principles of the three algorithms are understood. Corresponding Simulink simulation models are established in MATLAB and verified and compared through step-response simulations. For the conventional PID control algorithm, the rise time is 40.12s, the overshoot is 13.2%, the peak time is 64.7s, and the settling time is 119s. For the fuzzy PID control algorithm, the rise time is 35.14s, the overshoot is 1.9%, the peak time is 46.15s, and the settling time is 64s. For the particle swarm fuzzy PID algorithm, the rise time is 31.47s,there is no obvious overshoot, the peak time is 35.14s, and the settling time is 42.48s.It can be seen that compared with the conventional PID control and the fuzzy PID control, the particle swarm fuzzy PID control performs better in terms of rise time, settling time, and overshoot. At the same time, interference signals are added to them, and anti - interference signal simulation experiments are carried out respectively. The stable times of the conventional PID control algorithm, the fuzzy PID control algorithm, and the particle swarm fuzzy PID algorithm are 115.28s,59.71s,and 36.36s respectively, and the maximum deviation amounts are 2.6%,0.3%, and no obvious deviation respectively. The superiority of the particle swarm fuzzy PID as the control algorithm for the flow regulation system is determined, which meets the working 311 requirements of the control system. References [1] Qinggang Xiao,Rui Du,Lin Yang, et al. Comparison of Droplet Deposition Control Efficacy on Phytophthora capsica and Aphids in the Processing Pepper Field of the Unmanned Aerial Vehicle and Knapsack Sprayer[J]. Agronomy, 2020, 10: 215. [2] Marco Canicattì,Mariangela Vallone. Drones in Vegetable Crops: A Systematic Literature Review[J]. Smart Agricultural Technology, 2024, 7: 100396. [3] Tewari V K, Pareek C M, Lal G,et al. Image processing based real-time variable-rate chemical spraying system for disease control in paddy crop[J]. Artificial Intelligence in Agriculture, 2020, 4:21-30. [4] Gonzalez.R,Pawlowski A,Rodriguez. C,et al. pressure-control system for a mobile sprayer for al. Design and implementation of an automatic greenhouse applications[J]. Spanish Journal of Agricultural Research, 2012, 10(4):939-949. [5] Maghsoudi H, Minaei S, Ghobadian B, et al. Ultrasonic sensing of pistachio canopy for low-volume precision spraying[J]. Computers and Electronics in Agriculture, 2015,112:149-160. [6] Salcedo R, Zhu H, Ozkan E, et al. Reducing ground and airborne drift losses in young apple orchards with PWM- controlled spray systems[J]. Computers and Electronics in Agriculture, 2021,189:106389 [7] Elmer A.G Heitor V. M.Vilma.A.O. et al. An advanced model based on analytical and computational procedures for the evaluation of spraying processes in agriculture[C] IEEE Tenth International Conference on Semantic Computing, 2016, 4(3):432-436 [8] Cen Zhenzhao, Yue Xuejun, Wang Linhui, et al. Design and experiment of an adaptive variable - rate spraying system for unmanned aerial vehicles based on neural network PID [J]. Journal of South China Agricultural University, 2019, 40(04): 100 - 108. [9] Li Jinyang, Jia Weidong, Wei Xinhua. An on - line chemical mixing device for plant protection machinery based on flow control valve and neural network [J]. Transactions of the Chinese Society for Agricultural Machinery, 2014, 45(11): 98 - 103.. [10] Guo Na, Hu Jingtao. Design and Experimental Study of Variable Spraying System Based on Smith-Predictor-Based Fuzzy PID Control [J]. Journal of Agricultural Engineering, 2014, 30(08): 56-64. [11] Shao L., Dai Z., Cui H., Wei W., Zhu D., Li B. Variable Application Control System Based on Fuzzy Control [J]. Transactions of the Chinese Society for Agricultural Machinery, 2005, (11): 116-118. [12] Cao Q., Sha Q., Liu R. et al. Current Status and Reflections on the Development of Lithium Industry at Home and Abroad [J]. Petroleum Science Forum, 2024, 43(1):94-102. [13] Dai L. Study on the Preparation Process of Battery-Grade Lithium Carbonate and Lithium Hydroxide [D]. Beijing University of Chemical Technology, 2023. [14] Huang K., Wang H., Li Z. et al. Study on Flow Resistance Characteristics of Throttle Valves with Different Valve Core Structures [J]. Modern Machinery, 2018(1):35-40. [15] Shang Zhaohui. Study on the Influence of Valve Core Structure on the Performance of Throttle Stop Valves [D]. Zhejiang Sci- Tech University, Hangzhou, China, 2013, 1-7. [16] Xue Heren. Research on Parameter Optimization of PID Control Algorithm Based on BP Neural Network [D]. Beijing: North China Electric Power University, 2020. [17] Wang Xiaochong. Design and Study of Temperature Control System with Self-Tuning PID Based on Fuzzy Parameters [D]. Central South University, 2007. [18] Li Xiwu. Research on Temperature Control System for Piglet Bed Based on Adaptive Fuzzy PID Algorithm [J]. Chinese Journal of Agricultural Machinery, 2020.40(10):53-59. [19] Jincheng Z, Peng X. Research on Control Strategy of Buck Converter Based on Particle Swarm Optimization Fuzzy PID[J]. Journal of Physics: Conference Series,2022,2395(1). [20] Muzammal M I, Ahmad S S, Iftikhar A, et al. Supertwisting and terminal sliding mode control of course keeping for ships by using particle swarm optimization[J]. Ocean Engineering, 2022, 266(P3). [21] Zhang Feng, Wang Qiang. Research on Temperature Control System Based on Fuzzy Particle Swarm PID Algorithm [J]. Electronic Measurement Technology, 2022, 45(13): 109-114. [22] Zhao Lu. Research on Cognitive Radio Power Allocation Algorithm Based on Particle Swarm Algorithm [D]. Changchun University of Technology, 2023. [23] Shi Xueling. Research on Evaluation Methods for Maturity of Aerobic Composting Based on Particle Swarm Optimization Algorithm [D]. Northeast Agricultural University, 2023. [24] Lei Jiaxin. Research on Height Adjustment of Coal Mining Machine Based on Particle Swarm Fuzzy PID Control [D]. Anhui University of Science and Technology, 2022. [25] Niu Bin. Performance Study of Intelligent Regulating Valves Based on PID Fuzzy Control [D]. Xi'an University of Petroleum, 2023.