Improved neural network-oriented adaptive unmanned aerial vehicle control method

By optimizing the BP neural network with an improved sparrow search algorithm and designing a dynamic learning rate and error feedback mechanism, the control accuracy and stability problems of the quadrotor UAV in complex environments are solved, and fast response and high-precision adaptive control are achieved.

CN120686633APending Publication Date: 2025-09-23SHENYANG LIGONG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511032196.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

When quadrotor drones face complex environmental factors, the traditional PID control method has fixed control parameters and poor adaptability, making it difficult to meet high-precision control requirements. The BP neural network has the problems of slow convergence speed and easy falling into local optimality, which affects the adaptive control performance of the drone.

Method used

An improved sparrow search algorithm (SSA) is used to optimize the BP neural network, a dynamic learning rate adjustment mechanism is designed, a disturbance compensation mechanism based on error feedback is constructed, the initial weights and thresholds of the neural network are optimized, an adaptive inertia weight strategy is introduced, and the calculation structure is optimized to improve the control accuracy and stability of the UAV.

Benefits of technology

It achieves rapid response and high-precision control of UAVs in complex environments, improves the system's anti-interference ability and attitude stability, meets the real-time requirements of embedded hardware, avoids local optimal problems, and improves control accuracy and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120686633A_ABST
    Figure CN120686633A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive unmanned aerial vehicle control method for an improved neural network. The method comprises the following steps: constructing a PID controller SSA-BP-PID of a BP neural network; optimizing a PID controller SSA-BP-PID based on a sparrow search algorithm SSA, updating a population position and assigning a value to a weight value and a threshold value of the SSA-BP-PID, so that the SSA-BP-PID outputs an updated PID parameter and a control law; calculating output attitude data of the aircraft according to the control law in combination with an aircraft kinetic model; and S3, setting the number of iterations, constructing a fitness function as a minimization target in combination with the overshoot, the adjustment time and the steady-state error, and iteratively calculating the steps S2-S3 to obtain output attitude data for controlling the flight of the unmanned aerial vehicle. The method is used for optimizing PID controller parameters, compared with a traditional PID control method, the method has remarkable advantages in the aspects of dynamic response speed, steady-state precision, anti-interference capacity and the like, and the control performance of the four-rotor unmanned aerial vehicle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This paper is applied to the field of intelligent flight control. To address the control accuracy problem of a quadrotor UAV in a complex environment, an adaptive UAV control method based on an improved neural network is proposed to optimize the PID controller parameters and improve the attitude stability and anti-interference ability of the UAV. Background Art

[0002] Quadrotors (UAVs) have been widely used in aerial reconnaissance, logistics, and environmental monitoring due to their simple structure, high maneuverability, and flexible control. Attitude control, a key technology for ensuring stable flight and mission execution, is typically implemented using a PID controller. However, traditional PID control methods suffer from fixed control parameters, poor adaptability, and limited regulation performance when faced with complex environmental factors (such as wind disturbances, load variations, and sensor noise). This makes it difficult to meet the high-precision control requirements of UAVs in complex environments.

[0003] In recent years, neural networks have been widely used in the intelligent control of quadrotor drones due to their strong adaptability and superior nonlinear approximation capabilities. BP neural networks, in particular, can improve the system's dynamic performance and anti-interference capabilities through online learning and adjustment of PID control parameters. However, BP neural networks still suffer from slow convergence and susceptibility to local optima, which affect their real-time and robustness in drone control. Therefore, optimizing the BP neural network structure to improve its convergence speed and global search capabilities, and thereby enhance the adaptive control performance of quadrotor drones, has become a key research topic.

[0004] Currently, methods for optimizing BP neural networks mainly include intelligent optimization algorithms such as genetic algorithms (GA), particle swarm optimization (PSO), and ant colony optimization (ACO). However, these methods still suffer from limited convergence accuracy, high computational complexity, and sensitivity to parameter selection in practical applications, making it difficult to achieve efficient and accurate control optimization. This paper addresses the difficulties of attitude control for quadrotor drones and proposes an adaptive control method using an improved neural network using the sparrow search algorithm (SSA). This method is of great significance in the field of intelligent drone control. Summary of the Invention

[0005] To address the above-mentioned deficiencies in the prior art, the present invention proposes an adaptive UAV control method based on an improved neural network. The improved neural network is used to perform real-time online learning of the flight state of a quadrotor UAV, and the PID control parameters are adaptively adjusted according to environmental changes, thereby improving the dynamic response performance and anti-interference capability of the system. A disturbance compensation mechanism based on error feedback is constructed by utilizing the characteristics of the neural network. When external interference or sudden environmental changes occur, the control parameters can be quickly adjusted to enhance the stability of the UAV in complex environments. A dynamic learning rate adjustment mechanism is designed to adjust the learning rate of the BP neural network in real time according to error changes, thereby improving training efficiency and enhancing the accuracy and adaptability of the UAV attitude control. SSA is introduced to optimize the initial weights and thresholds of the BP neural network to accelerate network convergence, avoid falling into local optimality, and improve control accuracy and stability. An adaptive inertia weight strategy is adopted to improve the search efficiency of SSA when optimizing the BP neural network parameters, enabling the neural network to more accurately adjust the PID control parameters. The computational structure of the neural network is optimized to improve computational efficiency, enabling it to run efficiently on embedded hardware (such as DSP or FPGA), meeting the real-time requirements of the control algorithm for the quadrotor UAV.

[0006] The technical solutions adopted by the present invention to solve the technical problems are as follows:

[0007] The adaptive UAV control method for improving neural network includes the following steps:

[0008] S1: Construct PID controller SSA-BP-PID based on BP neural network;

[0009] S2: Based on the sparrow search algorithm SSA, the PID controller SSA-BP-PID is optimized, the population position is updated and the weights and thresholds are assigned to the SSA-BP-PID, so that the SSA-BP-PID outputs the updated PID parameters and control law;

[0010] S3: Calculate the output attitude data of the aircraft based on the control law and the aircraft dynamics model;

[0011] S4: Set the number of iterations, combine the overshoot, adjustment time, and steady-state error to build a fitness function as the minimization target, and iterate the calculation steps S2-S3 to obtain the output attitude data for controlling the UAV flight.

[0012] The construction of the PID controller SSA-BP-PID includes:

[0013] Set network parameters: establish the network structure and initialize the parameters of the BP neural network;

[0014] Input layer: The error between the reference input and the system output is e(k). The input vector of the BP neural network is: [x1(k), x2(k), x3(k)] = [e(k), e(k) - e(k-1), ∑e(k)];

[0015] Output layer: output PID controller parameter K p , K i , K d ;

[0016] Network parameters: weight w, bias b, activation function;

[0017] The form of BP neural network is:

[0018]

[0019] where w i is the weight, b is the bias, x i is the input node and f is the activation function.

[0020] The updating of population position comprises the following steps:

[0021] Use SSA to iteratively optimize the relevant parameters of the neural network. The position vector of each individual is: i =[w1,w2,…,w n ,b1,b2,…,b m ];

[0022] SSA Explorer position updated to:

[0023]

[0024] The SSA follower position is updated as:

[0025]

[0026] SSA Sentinel positions updated to:

[0027]

[0028] in represents the position of the i-th sparrow in the t-th generation; represents the global optimal individual position; Xw represents the worst individual position; R is the warning value, ST is the threshold; Q is the random factor.

[0029] The assignment of the SSA-BP-PID comprises the following steps:

[0030] The individual position vector x in SSA i =[w1,w2,…,w n ,b1,b2,…bm ] is mapped to the structure of BP network; input Hidden Layer Output but: Bias:

[0031] The PID parameters and control law include:

[0032] The proportional, integral and differential coefficients of the PID output of the BP network are:

[0033] [K p ,K i ,K d ]=BPNN(e(k),e(k)-e(k-1),∑e(k))

[0034] The control law of the controller is:

[0035] u(t)=K p e(t)+K i ∫e(t)dt+K d de(t) / dt.

[0036] The aircraft dynamics model is:

[0037]

[0038] Where u(t) = [u1, u2, u3, u4] T , They represent the velocity components of the aircraft along the three orthogonal axes in the inertial coordinate system; φ, θ, and ψ are the roll angle, pitch angle, and yaw angle, respectively, which describe the attitude change of the aircraft; u1 represents the total thrust generated by the aircraft, which is equal to the resultant force of the lift of each propeller; m is the mass of the aircraft; g is the acceleration of gravity, usually taken as 9.81m / s; u2, u3, and u4 are the control torque inputs around the x, y, and z axes, respectively, which act on the attitude adjustment of the aircraft; L represents the length of the moment arm, that is, the distance from the propeller to the center of mass of the aircraft; J x 、J y 、J z are the moments of inertia of the aircraft around each axis. The above parameters together describe the dynamic behavior and control input of the quadrotor aircraft.

[0039] The aircraft output attitude data includes: error signal e(t), attitude angle response curve, control signal u(t), and system response time.

[0040] The fitness function is:

[0041] Fitness=w1·OS+w2·T s +w3·ess

[0042] Where OS is the overshoot, T is the adjustment time, e ss is the steady-state error, w1, w2, w3 are weighting coefficients.

[0043] The present invention has the following beneficial effects and advantages:

[0044] 1. The present invention uses an improved neural network to adjust PID control parameters in real time, enabling the quadrotor UAV to adapt to different flight environments and improving the system's stability and anti-interference ability.

[0045] 2. The present invention adaptively optimizes the initial weights and thresholds of the neural network, effectively avoiding local optimal problems, accelerating convergence speed, and improving control accuracy.

[0046] 3. The present invention designs a dynamic learning rate adjustment mechanism to enable the BP neural network to optimize the learning rate in real time according to the error changes, improve control accuracy, and reduce overshoot and steady-state errors.

[0047] 4. The present invention constructs a disturbance compensation mechanism based on error information, which can quickly adjust control parameters when there is external interference or sudden environmental changes, thereby enhancing the adaptability and stability of the UAV in complex environments.

[0048] 5. The present invention optimizes the neural network calculation process and improves the calculation efficiency, so that it can run efficiently on embedded hardware (such as DSP or FPGA) to meet the real-time requirements of UAV control.

[0049] 6. This invention does not need to rely on experience to adjust PID parameters. Compared with traditional PID control methods, it has significant advantages in dynamic response speed, steady-state accuracy and anti-interference ability, thereby improving the control performance of quadrotor drones. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Control flow chart of the device of the present invention. DETAILED DESCRIPTION

[0051] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, the specific implementation methods of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth many specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the invention. Therefore, the present invention is not limited to the specific implementation methods disclosed below.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this invention belongs. The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The present invention will be further described in detail below with reference to the accompanying drawings and examples.

[0053] The present invention proposes an adaptive UAV control method for improving neural networks. The method establishes a PID controller (SSA-BP-PID) based on a BP neural network optimized by the sparrow search algorithm (SSA) to calculate the output attitude data of the aircraft. The control flow chart is shown in Figure 1 Specifically including:

[0054] (1) Set network parameters: establish the network structure and initialize the parameters of the BP neural network.

[0055] Input layer: The error between the reference input and the system output is e(k). The input vector of the BP neural network is given by: [x1(k), x2(k), x3(k)] = [e(k), e(k) - e(k-1), ∑e(k)];

[0056] Output layer: output PID controller parameter K p , K i , K d .

[0057] Network parameters: weight w, bias b, activation function, etc.

[0058] The form of BP neural network is:

[0059]

[0060] Where wi is the weight, b is the bias, xi is the input node, and f is the activation function, which can be expressed as

[0061] (2) Population position update: Use SSA to iteratively optimize the relevant parameters of the neural network. The position vector of each individual is: i =[w1,w2,…,w n ,b1,b2,…,b m ].

[0062] SSA Explorer position updated to:

[0063]

[0064] The SSA follower position is updated as:

[0065]

[0066] SSA Sentinel positions updated to:

[0067]

[0068] Where T max is the maximum number of iterations, n is the total number of sparrows, r1∈(0,1) is a real number randomly generated in each generation of iteration, which is used to dynamically determine the proportion of explorers, t is the current number of iterations, represents the position of the i-th sparrow in the t-th generation; shows the global optimal individual position; represents the worst individual position; R∈(0,1) is the warning value, used to determine whether there is a predator in the current environment; ST∈(0,1) is the safety threshold, when R>ST indicates the presence of a threat. Q is a random variable following a normal distribution, used to increase the randomness and jumpiness of individual search; α is the parameter that controls the position update step size; β is the adjustment coefficient for the position update of the sentinel.

[0069] (3) Assign the positions as neural network weights and thresholds in sequence: Map the individual position vector xi=[w1,w2,…,wn,b1,b2,…bm] in SSA to the structure of BP network. Input Hidden Layer Output but: Bias:

[0070] (4) Update PID parameters:

[0071] The proportional, integral and differential coefficients of PID are obtained from the output of BP network:

[0072] [K p ,K i ,K d ]=BPNN(e(k),e(k)-e(k-1),∑e(k))

[0073] The control law of the updated controller is:

[0074] u(t0=K p e(t)+K i ∫e(t)dt+K d de(t) / dt

[0075] (5) Running the aircraft model: This model can be a quadrotor dynamics simulation system that receives the control variable u(t) and outputs the attitude response angle of the aircraft. The model is a nonlinear coupling system, specifically:

[0076]

[0077] Where u(t) = [u1, u2, u3, u4] T , They represent the velocity components of the aircraft along the three orthogonal axes in the inertial coordinate system; φ, θ, and ψ are the roll angle, pitch angle, and yaw angle, respectively, which describe the attitude change of the aircraft; u1 represents the total thrust generated by the aircraft, which is equal to the resultant force of the lift of each propeller; m is the mass of the aircraft; g is the acceleration of gravity, usually taken as 9.81m / s; u2, u3, and u4 are the control torque inputs around the x, y, and z axes, respectively, which act on the attitude adjustment of the aircraft; L represents the length of the moment arm, that is, the distance from the propeller to the center of mass of the aircraft; J x 、J y 、J z are the moments of inertia of the aircraft around each axis. The above parameters together describe the dynamic behavior and control input of the quadrotor aircraft.

[0078] (6) Aircraft output attitude data:

[0079] After the simulation is complete, the output data is recorded for performance evaluation. The output includes:

[0080] Error signal e(t0;

[0081] Attitude angle response curve;

[0082] Control signal u(t);

[0083] System response time.

[0084] (7) Calculate overshoot, adjustment time, steady-state error, and fitness:

[0085] Overshoot:

[0086]

[0087] Among them, y ref Indicates the set attitude angle, target position or height, y max It is the maximum offset value of the system during the response process.

[0088] Adjustment time T s :

[0089] The time required to reach and maintain an error band of ±2%;

[0090] Steady-state error:

[0091]

[0092] where y refrepresents the set attitude angle, target position or height, and y is the corresponding final actual output value. The steady-state error reflects the control performance of the system in terms of steady-state accuracy.

[0093] Fitness function (minimization objective):

[0094] Fitness=w1·OS+w2·T s +w3·e ss

[0095] Where w1, w2, w3 are weighting coefficients.

[0096] (8) Reaching the maximum number of iterations

[0097] Set the maximum number of iterations Tmax. If the current iteration t≥Tmax, exit the SSA loop, otherwise return to step 2.

[0098] Through these processes, the optimized PID parameters are transmitted in real time to the flight control system and used to adjust the quadcopter's motor speed and attitude control. During flight, the neural network adjusts the control strategy based on the ever-changing flight environment and state, ensuring the drone maintains high precision and stability during complex missions. This real-time control and feedback mechanism enables the drone to quickly respond and adapt to changing flight conditions, thereby completing complex missions.

[0099] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. An adaptive UAV control method based on improved neural network, characterized in that: The following steps are involved: S1: Construct PID controller SSA-BP-PID based on BP neural network; S2: Based on the sparrow search algorithm SSA, the PID controller SSA-BP-PID is optimized, the population position is updated and the weights and thresholds are assigned to the SSA-BP-PID, so that the SSA-BP-PID outputs the updated PID parameters and control law; S3: Calculate the output attitude data of the aircraft based on the control law and the aircraft dynamics model; S4: Set the number of iterations, combine the overshoot, adjustment time, and steady-state error to build a fitness function as the minimization target, and iterate the calculation steps S2-S3 to obtain the output attitude data for controlling the UAV flight.

2. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The construction of the PID controller SSA-BP-PID includes: Set network parameters: establish the network structure and initialize the parameters of the BP neural network; Input layer: The error between the reference input and the system output is e(k). The input vector of the BP neural network is: [x1(k), x2(k), x3(k)] = [e(k), e(k) - e(k-1), ∑e(k)]; Output layer: output PID controller parameter K p , K i , K d ; Network parameters: weight w, bias b, activation function; The form of BP neural network is: where w i is the weight, b is the bias, x i is the input node and f is the activation function.

3. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The updating of population position comprises the following steps: Use SSA to iteratively optimize the relevant parameters of the neural network. The position vector of each individual is: i =[w1,w2,…,w n ,b1,b2,…,b m ]; SSA Explorer position updated to: The SSA follower position is updated as: SSA Sentinel positions updated to: in represents the position of the i-th sparrow in the t-th generation; represents the global optimal individual position; Xw represents the worst individual position; R is the warning value, ST is the threshold; Q is the random factor.

4. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The assignment of the SSA-BP-PID comprises the following steps: The individual position vector x in SSA i =[w1,w2,…,w n ,b1,b2,…b m ] is mapped to the structure of BP network; input Hidden Layer Output but: Bias:

5. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The PID parameters and control law include: The proportional, integral and differential coefficients of the PID output of the BP network are: [K p ,K i ,K d ]=BPNN(e(k),e(k)-e(k-1),∑e(k)) The control law of the controller is: u(t)=K p e(t)+K i ∫e(t)dt+K d d e(t) / dt。 6. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The aircraft dynamics model is: Where u(t) = [u1, u2, u3, u4] T , They represent the velocity components of the aircraft along the three orthogonal axes in the inertial coordinate system; φ, θ, and ψ are the roll angle, pitch angle, and yaw angle, respectively, which describe the attitude change of the aircraft; u1 represents the total thrust generated by the aircraft, which is equal to the resultant force of the lift of each propeller; m is the mass of the aircraft; g is the acceleration of gravity, usually taken as 9.81m / s; u2, u3, and u4 are the control torque inputs around the x, y, and z axes, respectively, which act on the attitude adjustment of the aircraft; L represents the length of the moment arm, that is, the distance from the propeller to the center of mass of the aircraft; J x 、J y 、J z are the moments of inertia of the aircraft around each axis. The above parameters together describe the dynamic behavior and control input of the quadrotor aircraft.

7. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The aircraft output attitude data includes: error signal e(t), attitude angle response curve, control signal u(t), and system response time.

8. The adaptive UAV control method for improved neural network according to claim 1, characterized in that: The fitness function is: Fitness=w1·OS+w2·T s +w3·e ss Where OS is the overshoot, T is the adjustment time, e ss is the steady-state error, w1, w2, w3 are weighting coefficients.

Citation Information

Cited By

  • Low-pressure-difference gas mass flow controller

    CN121300561A