Research on Spraying Control Strategy for Quadrotor Drones Based on Particle Swarm Optimization

In the context of modern agriculture, precision farming has become increasingly important, demanding efficient and accurate methods for crop management. Among various technologies, the use of quadrotor drones for spraying operations has gained significant attention due to their high safety, water and chemical savings, flexibility, high spraying efficiency, and non-destructive characteristics. As a researcher in this field, I aim to enhance the stability and self-regulation capabilities of spraying control systems for quadrotor drones. Traditional control methods, such as PID and fuzzy PID, often face challenges in adaptability and performance optimization. Therefore, this study proposes a novel control strategy that integrates particle swarm optimization (PSO) with fuzzy PID control to improve the spraying accuracy and stability of quadrotor drones under varying environmental conditions. The quadrotor drone serves as an ideal platform for aerial spraying, and optimizing its control system is crucial for achieving precise liquid fertilizer application. Throughout this research, the term ‘quadrotor drone’ is emphasized to highlight its central role in agricultural automation.

The development of spraying control systems for quadrotor drones requires a comprehensive mathematical model to simulate and analyze system behavior. In this study, I focus on establishing the mathematical model of the spraying system, particularly the electromagnetic flow valve, which is a key component for controlling fertilizer discharge. The quadrotor drone’s spraying mechanism relies on the precise adjustment of the valve core displacement in the electromagnetic valve, enabling variable-rate spraying based on real-time needs. To derive the dynamics of the electromagnetic valve, I consider the electromagnetic force, current, voltage, and mechanical properties. The electromagnetic force \( F_e \) is given by the following equation, which relates to the current and physical parameters of the valve:

$$ F_e = K_i i = B_g \pi D N_e i $$

Here, \( K_i \) represents the electromagnetic proportional valve current, \( B_g \) is the magnetic flux density in the air gap, \( D \) is the average coil diameter, \( N_e \) is the number of coil turns, and \( i \) is the current. The voltage equation for the coil accounts for resistance, inductance, and back electromotive force:

$$ u_e = (R_c + r_p) i + L \frac{di}{dt} + K_e \frac{dx}{dt} $$

where \( u_e \) is the coil terminal voltage, \( R_c \) is the coil resistance, \( r_p \) is the amplifier internal resistance, \( L \) is the coil inductance, \( K_e \) is the back electromotive force constant, and \( x \) is the valve core displacement. The constant \( K_e \) is defined as:

$$ K_e = B_g \pi D N_e $$

The mechanical motion of the valve core is described by a second-order differential equation, incorporating mass, damping, and spring stiffness:

$$ F_e = m \frac{d^2x}{dt^2} + B \frac{dx}{dt} + K x $$

In this equation, \( m \) is the mass of the valve core, \( B \) is the viscous damping coefficient, and \( K \) is the spring stiffness. By applying Laplace transforms to these equations, I derive the transfer function of the electromagnetic valve, which serves as the core of the spraying control system. The transfer functions for the electrical and mechanical parts are as follows:

$$ G_0(s) = \frac{1}{Ls + (R_c + r_p)} $$
$$ G_1(s) = \frac{1}{Ms^2 + Bs + K} $$

The overall system model combines these transfer functions to relate the input voltage to the output valve core displacement. This mathematical foundation is essential for designing and simulating control strategies for the quadrotor drone’s spraying system. The accuracy of this model directly impacts the performance of the quadrotor drone in field applications.

To achieve adaptive control for the quadrotor drone’s spraying system, I design a fuzzy PID controller that adjusts the parameters based on system error and its rate of change. Traditional PID controllers have fixed gains, which may not perform optimally under dynamic conditions. The fuzzy PID controller addresses this by fuzzifying the error \( e \) and error change rate \( e_c \), then using fuzzy rules to adjust the proportional, integral, and derivative gains \( K_p \), \( K_i \), and \( K_d \). The control principle involves continuous monitoring of \( e \) and \( e_c \), mapping them to fuzzy sets (e.g., NB, NM, NS, ZO, PS, PM, PB), and applying a rule base to compute adjustments \( \Delta K_p \), \( \Delta K_i \), and \( \Delta K_d \). The updated gains are given by:

$$ K_p = K^0_p + \Delta K_p, \quad K_i = K^0_i + \Delta K_i, \quad K_d = K^0_d + \Delta K_d $$

where \( K^0_p \), \( K^0_i \), and \( K^0_d \) are initial parameter values. The fuzzy rule table, derived from expert knowledge, contains 49 rules for different combinations of \( e \) and \( e_c \). For instance, if \( e \) is negative big (NB) and \( e_c \) is positive small (PS), the rule might suggest increasing \( K_p \) and decreasing \( K_d \). This approach enhances the responsiveness of the quadrotor drone’s spraying system, but it still relies on predefined rules that may not be optimal for all scenarios.

To further optimize the fuzzy PID controller, I integrate particle swarm optimization (PSO), a bio-inspired algorithm that mimics the foraging behavior of birds. PSO is used to fine-tune the parameters of the fuzzy PID controller, including the scaling factors and gain adjustments, for better performance. In this context, each particle in the swarm represents a potential solution, defined by its position \( x_i = (x_{i1}, x_{i2}, x_{i3}, …, x_{in}) \) and velocity \( v_i = (v_{i1}, v_{i2}, v_{i3}, …, v_{in}) \). The algorithm iteratively updates these particles based on their personal best position \( p_{best,i} \) and the global best position \( g_{best} \). The update equations are:

$$ v_{i+1} = \omega v_i + c_1 r_1 (p_{best,i} – x_i) + c_2 r_2 (g_{best} – x_i) $$
$$ x_{i+1} = x_i + v_{i+1} $$

Here, \( \omega \) is the inertia weight, \( c_1 \) and \( c_2 \) are acceleration constants, and \( r_1 \) and \( r_2 \) are random numbers between 0 and 1. The inertia weight is dynamically adjusted using a linear decreasing strategy to balance exploration and exploitation:

$$ \omega = \omega_{max} – \frac{\omega_{max} – \omega_{min}}{t_{max}} t $$

where \( t \) is the current iteration, \( t_{max} \) is the maximum iterations, and \( \omega_{max} \) and \( \omega_{min} \) are the maximum and minimum inertia weights. The fitness function for evaluating particles is based on the integral of time-weighted absolute error (ITAE), which minimizes both error and settling time:

$$ J = \int_0^T t |e(t)| dt $$

A lower \( J \) value indicates better control performance. The PSO algorithm searches for optimal parameters that minimize \( J \), thereby improving the stability and accuracy of the quadrotor drone’s spraying control. This hybrid PSO-fuzzy PID approach enables automatic parameter tuning, making the quadrotor drone more adaptable to changing environmental conditions.

The performance of the proposed PSO-optimized fuzzy PID controller is evaluated through simulation in MATLAB and Simulink. I build a simulation model that includes the electromagnetic valve transfer functions and the control algorithms. The model is tested with different target valve displacements (e.g., 0.4 cm, 0.7 cm, and 1.0 cm) to compare the PSO-fuzzy PID controller with traditional PID and fuzzy PID controllers. The simulation parameters are set as follows: swarm size of 50, maximum iterations of 25, minimum fitness of 0.01, inertia weight bounds of \( \omega_{max} = 1.5 \) and \( \omega_{min} = 0.5 \), and learning factors \( c_1 = 0.5 \) and \( c_2 = 0.5 \). The results are summarized in the table below, which shows key performance metrics such as settling time and overshoot for each control method at different target displacements.

Target Displacement (cm) Control Algorithm Settling Time (s) Overshoot (%)
0.4 PID 2.722 31.52
0.4 Fuzzy PID 1.544 21.63
0.4 PSO-Fuzzy PID 0.683 11.71
0.7 PID 2.691 31.52
0.7 Fuzzy PID 1.517 21.63
0.7 PSO-Fuzzy PID 0.662 11.69
1.0 PID 2.711 31.50
1.0 Fuzzy PID 1.534 21.60
1.0 PSO-Fuzzy PID 0.676 11.72

From the table, it is evident that the PSO-fuzzy PID controller consistently outperforms the other methods. The average settling time across all targets is 0.674 s for PSO-fuzzy PID, compared to 1.532 s for fuzzy PID and 2.708 s for PID. Similarly, the average overshoot is 11.71% for PSO-fuzzy PID, while fuzzy PID and PID exhibit 21.62% and 31.51%, respectively. These improvements highlight the effectiveness of PSO optimization in enhancing the control dynamics of the quadrotor drone’s spraying system. The faster response and reduced overshoot contribute to more precise and stable spraying operations, which are critical for agricultural applications where resource efficiency and crop health are paramount.

To further analyze the control behavior, I derive additional formulas that describe system stability and performance. For instance, the closed-loop transfer function of the spraying system with PSO-fuzzy PID control can be expressed as:

$$ T(s) = \frac{G(s) C(s)}{1 + G(s) C(s)} $$

where \( G(s) \) is the plant transfer function (combining \( G_0(s) \) and \( G_1(s) \)), and \( C(s) \) is the controller transfer function. The PSO-fuzzy PID controller \( C(s) \) is adaptive, with parameters optimized online. The error reduction over time can be modeled using exponential decay functions, such as:

$$ e(t) = e_0 e^{-\alpha t} $$

where \( e_0 \) is the initial error and \( \alpha \) is a decay constant influenced by the controller gains. By optimizing \( \alpha \) through PSO, the system achieves quicker convergence. Moreover, the robustness of the quadrotor drone’s control system can be assessed using sensitivity functions, which measure how variations in system parameters affect performance. For example, the sensitivity of the output to changes in the valve mass \( m \) is given by:

$$ S_m^T = \frac{\partial T / T}{\partial m / m} $$

Minimizing such sensitivities through PSO ensures that the quadrotor drone maintains consistent spraying performance even under disturbances, such as wind gusts or payload changes.

In conclusion, this research demonstrates the superiority of a PSO-optimized fuzzy PID control strategy for quadrotor drone spraying systems. The integration of particle swarm optimization enables automatic tuning of controller parameters, leading to faster settling times, lower overshoot, and enhanced stability compared to traditional PID and fuzzy PID methods. The mathematical models and simulation results validate the effectiveness of this approach, making it a promising solution for precision agriculture. Future work could involve real-time implementation on quadrotor drones and testing in field conditions to further refine the algorithm. The continuous advancement of control strategies for quadrotor drones will drive innovations in agricultural automation, contributing to sustainable farming practices.

The application of such advanced control systems extends beyond spraying to other quadrotor drone operations, such as monitoring, mapping, and delivery. By leveraging PSO and fuzzy logic, quadrotor drones can become more autonomous and intelligent, adapting to complex environments with minimal human intervention. This aligns with the global trend towards smart agriculture, where technology plays a pivotal role in increasing productivity and reducing environmental impact. As researchers, we must continue to explore hybrid optimization techniques and integrate them with emerging technologies like machine learning to further enhance the capabilities of quadrotor drones.

In summary, the key contributions of this study include the development of a comprehensive mathematical model for the spraying system, the design of a fuzzy PID controller with PSO optimization, and thorough simulation analysis. The results confirm that the proposed method offers significant advantages in control performance, paving the way for more efficient and reliable quadrotor drone applications in agriculture. The repeated emphasis on ‘quadrotor drone’ throughout this paper underscores its importance as a versatile platform for modern farming solutions.

Scroll to Top