CN111221346A - Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm - Google Patents

Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm Download PDF

Info

Publication number
CN111221346A
CN111221346A CN202010127520.4A CN202010127520A CN111221346A CN 111221346 A CN111221346 A CN 111221346A CN 202010127520 A CN202010127520 A CN 202010127520A CN 111221346 A CN111221346 A CN 111221346A
Authority
CN
China
Prior art keywords
control
aircraft
search
algorithm
pid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010127520.4A
Other languages
Chinese (zh)
Inventor
赵帅
周廷博
赵雪清
王岩
金妍君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Auto Sergeant School Of Military Transportation College Of Pla Army
Original Assignee
Auto Sergeant School Of Military Transportation College Of Pla Army
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Auto Sergeant School Of Military Transportation College Of Pla Army filed Critical Auto Sergeant School Of Military Transportation College Of Pla Army
Priority to CN202010127520.4A priority Critical patent/CN111221346A/en
Publication of CN111221346A publication Critical patent/CN111221346A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/08Control of attitude, i.e. control of roll, pitch, or yaw
    • G05D1/0808Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft
    • G05D1/0816Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft to ensure stability
    • G05D1/0825Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft to ensure stability using mathematical models
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft

Abstract

The invention discloses a method for controlling a four-rotor aircraft to fly by optimizing a PID (proportion integration differentiation) through a crowd search algorithm.

Description

Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm
Technical Field
The invention relates to the technical field of four-rotor aircrafts, in particular to a method for optimizing PID (proportion integration differentiation) to control the four-rotor aircrafts to fly by using a crowd search algorithm.
Background
The four-rotor aircraft has 6 degrees of freedom, and the propellers are driven by four independent motors to generate lift force and thrust, so that the four-rotor aircraft can realize hovering and change flight attitude, and the four-rotor aircraft is a multi-input multi-output, strong-coupling and under-actuated nonlinear system. PID control is still the preferred control algorithm for most aircrafts at present due to its simplicity, good stability, better robustness and more mature technology compared with other control algorithms. However, due to the uncertainty of the four-rotor aircraft, external interference in the flight process and the like, parameters in the PID control cannot be adjusted by self, so that the flight attitude of the aircraft is affected, and the actual expectation is difficult to achieve.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for optimizing PID (Proportion Integration Differentiation) to control the flight of a four-rotor aircraft by a crowd search Algorithm, wherein the four-rotor aircraft is controlled by a control method for optimizing PID (Proportion Integration Differentiation) control parameters based on the crowd search Algorithm (SOA), so that the anti-interference capability of the aircraft is enhanced, the robustness of the aircraft is improved, and the flight attitude of the aircraft can be self-adjusted in real time when the aircraft is interfered by the outside.
The technical scheme of the invention is as follows:
the method for optimizing the PID to control the flight of the four-rotor aircraft by the crowd search algorithm specifically comprises the following steps:
(1) establishing a dynamic model of the four-rotor aircraft, and establishing a dynamic mathematical model of the four-rotor aircraft through a Newton-Euler equation and a coordinate transformation matrix, wherein the dynamic mathematical model is shown in the following formula (1):
Figure BDA0002394852200000021
in the formula (1), m is the mass of the four-rotor aircraft; g is the acceleration of gravity; mu.sx、μy、μzThe air resistance coefficients of the X axis, the Y axis and the Z axis are obtained; j. the design is a squarex、Jz、JzThe rotary inertia of the four-rotor aircraft around an X axis, a Y axis and a Z axis; i isrThe moment of inertia of the rotor of the four-rotor aircraft relative to the rotating shaft; l is the distance from the center point of the rotor to the mass center of the four-rotor aircraft; w is a1、w2、w3Angular velocity, w, of the aircraft1′、w2′、w3' are each w1、w2、w3First derivation; x, y, z areThe position of the line driving device, x ', y' and z 'are the first derivatives of x, y and z, respectively, and x', y 'and z' are the second derivatives of x, y and z, respectively, omegaiThe rotation speed of each rotor, wherein i is 1,2,3, 4; c represents a conversion constant between force and moment; c. CTIs the lift coefficient of the rotor; u shapeiFor controlling the input quantity, the mapping relation of the control input quantity and the rotating speed of the four propellers is shown as formula (1), wherein i is 1,2,3,4, 5; theta, theta,
Figure BDA0002394852200000022
Psi is the pitching attitude angle, the rolling attitude angle and the yawing attitude angle of the aircraft respectively;
(2) optimizing PID control parameters based on a crowd search algorithm:
the four independent control channels are controlled by a flight controller of the four-rotor aircraft, and respectively consist of an altitude crowd search algorithm optimized PID control parameter, a rolling crowd search algorithm optimized PID control parameter, a pitching crowd search algorithm optimized PID control parameter and a yawing crowd search algorithm optimized PID control parameter; the rotating speeds of the four rotors are adjusted to achieve the control of the flight attitude through the conversion control of the control quantity; the method specifically comprises the following steps:
the control law of the digital incremental PID control is shown as the following formulas (2) and (3):
u(k)=u(k-1)+Δu(k) (2),
u(k)=u(k-1)+Kp[e(k)-e(k-1)]+Kie(k)+Kd[e(k)-2e(k-1)+e(k-2)](3),
in the formula (3), e (K) is a systematic error, KpIs a proportionality coefficient, KiIs the integral coefficient, KdIs a differential coefficient;
and then carrying out parameter optimization on the PID controller by using a crowd search algorithm SOA, wherein the method comprises the following specific steps:
(a) and parameter coding:
defining S individuals in the population P, and optimizing for three parameters of the PID controller, the dimension of the position vector of each individual is defined as D-3, so the population P is expressed as shown in the following formula (4):
Figure BDA0002394852200000031
(b) selecting a fitness function:
fitness function value see formula (5):
F=∫0 (w1|e(t)|+w2u2(t))dt (5),
in the above equation (5), e (t) is the error of the control system, u (t) is the output of the controller, and w1And w2Is the weight;
in order to avoid overshoot, a penalty measure is adopted, that is, once the system generates overshoot, the overshoot is taken as one of the optimal indexes, and the optimal index is as shown in the following formula (6):
if e(t)<0,F=∫0 (w1|e(t)|+w2u2(t)+w3|e(t)|)dt (6);
in the above formula (6), w3Is a weight value, and w3>>w1In the SOA optimization algorithm, w1=0.999,w2=0.001,w3=100;
(c) Determining a search step length:
the SOA algorithm is an intelligent control algorithm, which is embodied in that the intelligent activity of simulating the search behavior of a human is completed by using the approximation capability of fuzzy reasoning in fuzzy control, and the relation between the SOA algorithm and the search step length is established by describing some natural languages; the SOA algorithm uses a gaussian function to represent the fuzzy variable of the search step size, namely:
Figure BDA0002394852200000041
in the above formula (7), uAExpressing the degree of membership of a Gaussian function, and x expressing an input variable; u and delta represent parameters of a Gaussian function, and according to the relevant properties of the Gaussian function, when an output variable exceeds [ u-3 delta, u +3 delta]When the probability at this time is takenThe value is less than 0.0111, i.e. the degree of membership is less than 0.0111, thus setting the minimum degree of membership to umin0.0111, and u is selected to satisfy faster convergence ratemax0.9500, a linear function is used to represent the fuzzy variable of the objective function, see equation (8) below:
Figure BDA0002394852200000042
uij=rand(ui,1),j=1,2,3 (9),
in the above formulae (8) and (9), IiShowing the sequence x after the current function value is arranged from high to lowiNumber of (t), function rand (u)i1) is randomly, uniformly and low distributed in [ u ]i,1]real number of (d), so that the search space step size α is of dimension jijIs represented by the formula (10):
Figure BDA0002394852200000043
in the formula (10), δijThe parameters of the foregoing gaussian membership functions are expressed mathematically as shown in the following equation (11):
Figure BDA0002394852200000044
w=(itermax-iter)/itermax(12),
in the above formulae (11) and (12), xminAnd xmaxThe positions of the minimum function value and the maximum function value in the population are respectively, w represents an inertia weight, and the inertia weight is linearly decreased from 0.9 to 0.1 along with the increase of evolution algebra; iter and itermaxRepresenting the current iteration times and the maximum iteration times;
(d) determining the search direction:
according to the analysis and modeling of the human simulation of the actions of benefiting oneself, the actions of benefiting oneself and the actions of preacting, the direction of benefiting oneself of the ith search individual is obtained
Figure BDA0002394852200000045
Directions of interest
Figure BDA0002394852200000046
And a pre-movement direction
Figure BDA0002394852200000047
Their mathematical expressions are shown in the following cases (13) to (15):
Figure BDA0002394852200000051
Figure BDA0002394852200000052
Figure BDA0002394852200000053
in the above-mentioned formulas (13) to (15),
Figure BDA0002394852200000054
represents the best position that the ith searching individual has experienced so far;
Figure BDA0002394852200000055
representing the best position of the collective history of the area where the ith searching individual is located;
Figure BDA0002394852200000056
and
Figure BDA0002394852200000057
are respectively as
Figure BDA0002394852200000058
The optimal position of (1);
the search direction is determined from a randomly weighted geometric average of the three directions, see equation (16):
Figure BDA0002394852200000059
in formula (16), sgn (. cndot.) is a sign function, phi1And phi2Is [0,1 ]]A constant of (d); w is an inertia weight;
(e) location update of the individual:
and updating the position according to the searching step length and the searching direction, wherein the mathematical expression of the position updating is as the following formulas (17) and (18):
Figure BDA00023948522000000510
xij(t+1)=xij(t)+Δxij(t+1) (18),
Δ x in formulae (17) and (18)ij(t +1) is the position variation of the ith search unit at the next moment in the j-dimensional search space, xijAnd (t) the position of the ith searching individual in the j-dimensional searching space at the time t.
In conclusion, the crowd search algorithm SOA optimizes the PID control parameters according to the above analysis procedures, and transmits the optimal Kp, Ki, Kd parameters to the motor driving module to control the motor to adjust the rotation speeds of the four rotors.
The four-rotor aircraft comprises an aircraft controller, a power supply module, a navigation and inertia measurement module, a communication module and a motor driving module, wherein the power supply module, the navigation and inertia measurement module, the communication module and the motor driving module are respectively connected with the aircraft controller; the power supply module is connected with the flight controller and provides electric energy for the aircraft; the navigation and measurement module comprises a GPS navigation module, a triaxial accelerometer, a gyroscope and a magnetometer, wherein the GPS navigation module is used for measuring and positioning the real-time position of the aircraft, the triaxial accelerometer is used for measuring the linear acceleration of the aircraft, the gyroscope is used for measuring the angular acceleration of the aircraft, and the magnetometer is used for measuring the geomagnetic intensity of the position of the aircraft; the communication module is connected with the flight controller, so that the flight controller and the ground control station perform data exchange; the motor drive module include four unification motor speed regulators and four brushless motor, four unification motor speed regulators receive four brushless motor work of control behind the motor control signal, through giving four unification motor speed regulator control volume according to the aircraft controller promptly, and then control four brushless motor's rotational speed, make lift and the torque that four rotors produced produce corresponding change through the rotational speed that changes four brushless motor respectively.
The aircraft controller acquires linear acceleration, angular acceleration, real-time position and magnetic force intensity data acquired by the navigation and inertia measurement module in real time in each control period, solves the current position and attitude angle of the aircraft according to a preset signal processing algorithm, then performs parameter optimization on the PID controller by combining with a crowd search algorithm SOA, adjusts a PID control scheme, and calculates the actual driving quantity of each brushless motor, so that the aircraft can stably fly.
The crowd search algorithm SOA is a bionic control algorithm and is proposed by analyzing the random search behavior of a person; the optimal solution of the target is completed by simulating experience gradient and uncertainty reasoning in human intelligent search behaviors; namely, natural language is described and uncertainty inference is modeled to determine the search step size, and the search direction is determined by autonomous learning ability and group behaviors, including a selfish behavior, a rival behavior, a self-organizing aggregation behavior, a precautionary behavior, and an uncertainty inference behavior.
The fitness function value is used for explaining the individual or solution quality of the crowd search algorithm SOA in the optimizing process, meanwhile, reference is provided for updating the position of the individual, the time integral performance index of the absolute value of the error is used as the minimum objective function of parameter selection, and meanwhile, in order to prevent the control quantity from being too large, the square term of the control input is added into the objective function.
The invention has the advantages that:
the invention can update the setting K in real time along with the influence of the external interference changep、Ki、KdThe method has the advantages that the parameters are self-adjusted, the defect that the traditional PID control cannot self-adapt to parameter adjustment in real time is overcome, attitude control of the aircraft under the interference of external environment in flight is better realized, and the interference resistance and robustness of the system are improved.
Drawings
Fig. 1 is a schematic view of the main module configuration of a four-rotor aircraft.
Fig. 2 is a flow chart of the present invention.
Fig. 3 is a schematic diagram of the control process of the present invention.
FIG. 4 is a step response output curve of attitude angle of SOA optimized PID parameters of the quad-rotor aircraft without interference.
FIG. 5 is an error response output curve of attitude angle of SOA optimized PID parameters of the quad-rotor aircraft without interference.
FIG. 6 is a step response output curve of attitude angle for SOA optimized PID parameters with continuous disturbance for a quad-rotor aircraft of the present invention.
FIG. 7 is an error response output curve for attitude angle for SOA optimized PID parameters in the presence of sustained disturbance for a quad-rotor aircraft of the present invention.
FIG. 8 is a position tracking response curve under group intelligence algorithm optimized PID.
FIG. 9 is a position tracking error response curve under group intelligence algorithm optimized PID.
FIG. 10 is a plot of the position tracking response of the swarm intelligence algorithm optimized PID control in the presence of sustained disturbances.
FIG. 11 is a plot of position tracking error response for group intelligence algorithm optimized PID control in the presence of sustained disturbances.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The quad-rotor aircraft of the present invention is further described below with reference to fig. 1:
the four-rotor aircraft comprises an aircraft controller 10, a power supply module 20, a navigation and inertia measurement module 30, a communication module 40 and a motor driving module 50 which are respectively connected with the aircraft controller 10; wherein, the power module 20 is connected with the flight controller 10 and provides electric energy for the aircraft; the navigation and measurement module 30 comprises a GPS navigation module 31, a triaxial accelerometer 32, a gyroscope 33 and a magnetometer 34, wherein the GPS navigation module 31 measures and positions the real-time position of the aircraft, the triaxial accelerometer 32 is used for measuring the linear acceleration of the aircraft, the gyroscope 33 is used for measuring the angular acceleration of the aircraft, and the magnetometer 34 is used for measuring the geomagnetic intensity of the position where the aircraft is located; the communication module 40 is connected with the flight controller 10, so that the flight controller 10 exchanges data with the ground control station; the motor driving module 50 includes a four-in-one motor speed regulator 51 and four brushless motors 52, and the four-in-one motor speed regulator 51 controls the four brushless motors 52 to work after receiving the motor control signal, that is, the four-in-one motor speed regulator 51 controls the amount of control according to the aircraft controller 10, and further controls the rotating speeds of the four brushless motors 52, and the lift force and the torque generated by the four rotors are changed correspondingly by changing the rotating speeds of the four brushless motors 52 respectively.
The aircraft controller 10 obtains linear acceleration, angular acceleration, real-time position and magnetic force intensity data collected by the navigation and inertia measurement module 30 in real time in each control period, solves the current position and attitude angle of the aircraft according to a preset signal processing algorithm, then performs parameter optimization on the PID controller by combining with a crowd search algorithm SOA, adjusts a PID control scheme, and calculates the actual driving quantity of each brushless motor, so that the aircraft can stably fly.
The method for optimizing the PID to control the flight of the four-rotor aircraft by the crowd search algorithm specifically comprises the following steps:
(1) establishing a dynamic model of the four-rotor aircraft, and establishing a dynamic mathematical model of the four-rotor aircraft through a Newton-Euler equation and a coordinate transformation matrix, wherein the dynamic mathematical model is shown in the following formula (1):
Figure BDA0002394852200000091
in the formula (1), m is the mass of the four-rotor aircraft; g is the acceleration of gravity; mu.sx、μy、μzIs the X axisAir resistance coefficients in the Y axis and the Z axis; j. the design is a squarex、Jz、JzThe rotary inertia of the four-rotor aircraft around an X axis, a Y axis and a Z axis; i isrThe moment of inertia of the rotor of the four-rotor aircraft relative to the rotating shaft; l is the distance from the center point of the rotor to the mass center of the four-rotor aircraft; w is a1、w2、w3Angular velocity, w, of the aircraft1′、w2′、w3' are each w1、w2、w3First derivation; x, y and z are the positions of the aircraft, x ', y' and z 'are the first derivatives of x, y and z, respectively, x', y 'and z' are the second derivatives of x, y and z, respectively, and omegaiThe rotation speed of each rotor, wherein i is 1,2,3, 4; c represents a conversion constant between force and moment; c. CTIs the lift coefficient of the rotor; u shapeiFor controlling the input quantity, the mapping relation of the control input quantity and the rotating speed of the four propellers is shown as formula (1), wherein i is 1,2,3,4, 5; theta, theta,
Figure BDA0002394852200000092
Psi is the pitching attitude angle, the rolling attitude angle and the yawing attitude angle of the aircraft respectively;
(2) optimizing PID control parameters based on a crowd search algorithm:
the four independent control channels are controlled by a flight controller of the four-rotor aircraft, and respectively consist of an altitude crowd search algorithm optimized PID control parameter, a rolling crowd search algorithm optimized PID control parameter, a pitching crowd search algorithm optimized PID control parameter and a yawing crowd search algorithm optimized PID control parameter; the rotating speeds of the four rotors are adjusted to achieve the control of the flight attitude through the conversion control of the control quantity; the method specifically comprises the following steps:
the crowd search algorithm SOA is a bionic control algorithm and is proposed by analyzing the random search behavior of a person; the optimal solution of the target is completed by simulating experience gradient and uncertainty reasoning in human intelligent search behaviors; the method comprises the following steps of determining a search step length by describing a natural language and modeling uncertainty inference, and determining a search direction by autonomous learning ability and group behaviors including a beneficial behavior, a self-organizing aggregation behavior, a preventive behavior and an uncertainty inference behavior;
the control law of the digital incremental PID control is shown as the following formulas (2) and (3):
u(k)=u(k-1)+Δu(k) (2),
u(k)=u(k-1)+Kp[e(k)-e(k-1)]+Kie(k)+Kd[e(k)-2e(k-1)+e(k-2)](3),
in the formula (3), e (K) is a systematic error, KpIs a proportionality coefficient, KiIs the integral coefficient, KdIs a differential coefficient;
and then carrying out parameter optimization on the PID controller by using a crowd search algorithm SOA, wherein the method comprises the following specific steps:
(a) and parameter coding:
defining S individuals in the population P, and optimizing for three parameters of the PID controller, the dimension of the position vector of each individual is defined as D-3, so the population P is expressed as shown in the following formula (4):
Figure BDA0002394852200000101
(b) selecting a fitness function:
the fitness function value is used for indicating whether an individual or a solution of the SOA is good or bad in the optimizing process, meanwhile, a reference is provided for position updating of the individual, the time integral performance index of the absolute value of the error is used as the minimum objective function of parameter selection, meanwhile, in order to prevent the control quantity from being too large, a square term of the control input is added into the objective function, and then the fitness function value at the moment is expressed by an expression (5):
F=∫0 (w1|e(t)|+w2u2(t))dt (5),
in the above equation (5), e (t) is the error of the control system, u (t) is the output of the controller, and w1And w2Is the weight;
in order to avoid overshoot, a penalty measure is adopted, that is, once the system generates overshoot, the overshoot is taken as one of the optimal indexes, and the optimal index is as shown in the following formula (6):
if e(t)<0,F=∫0 (w1|e(t)|+w2u2(t)+w3|e(t)|)dt (6);
in the above formula (6), w3Is a weight value, and w3>>w1In the SOA optimization algorithm, w1=0.999,
(c) Determining a search step length:
the SOA algorithm is an intelligent control algorithm, which is embodied in that the intelligent activity of simulating the search behavior of a human is completed by using the approximation capability of fuzzy reasoning in fuzzy control, and the relation between the SOA algorithm and the search step length is established by describing some natural languages; the SOA algorithm uses a gaussian function to represent the fuzzy variable of the search step size, namely:
Figure BDA0002394852200000111
in the above formula (7), uAExpressing the degree of membership of a Gaussian function, and x expressing an input variable; u and delta represent parameters of a Gaussian function, and according to the relevant properties of the Gaussian function, when an output variable exceeds [ u-3 delta, u +3 delta]At this time, the probability value is less than 0.0111, that is, the membership degree is less than 0.0111, so the minimum membership degree is set as umin0.0111, and u is selected to satisfy faster convergence ratemax0.9500, a linear function is used to represent the fuzzy variable of the objective function, see equation (8) below:
Figure BDA0002394852200000112
uij=rand(ui,1),j=1,2,3 (9),
in the above formulae (8) and (9), IiShowing the sequence x after the current function value is arranged from high to lowiNumber of (t), function rand (u)i1) is randomly, uniformly and low distributed in [ u ]i,1]real number of (d), so that the search space step size α is of dimension jijIs represented by the formula (10):
Figure BDA0002394852200000113
in the formula (10), δijThe parameters of the foregoing gaussian membership functions are expressed mathematically as shown in the following equation (11):
Figure BDA0002394852200000114
w=(itermax-iter)/itermax(12),
in the above formulae (11) and (12), xminAnd xmaxThe positions of the minimum function value and the maximum function value in the population are respectively, w represents an inertia weight, and the inertia weight is linearly decreased from 0.9 to 0.1 along with the increase of evolution algebra; iter and itermaxRepresenting the current iteration times and the maximum iteration times;
(d) determining the search direction:
according to the analysis and modeling of the human simulation of the actions of benefiting oneself, the actions of benefiting oneself and the actions of preacting, the direction of benefiting oneself of the ith search individual is obtained
Figure BDA0002394852200000121
Directions of interest
Figure BDA0002394852200000122
And a pre-movement direction
Figure BDA0002394852200000123
Their mathematical expressions are shown in the following cases (13) to (15):
Figure BDA0002394852200000124
Figure BDA0002394852200000125
Figure BDA0002394852200000126
in the above-mentioned formulas (13) to (15),
Figure BDA0002394852200000127
represents the best position that the ith searching individual has experienced so far;
Figure BDA0002394852200000128
representing the best position of the collective history of the area where the ith searching individual is located;
Figure BDA0002394852200000129
and
Figure BDA00023948522000001210
are respectively as
Figure BDA00023948522000001211
The optimal position of (1);
the search direction is determined from a randomly weighted geometric average of the three directions, see equation (16):
Figure BDA00023948522000001212
in formula (16), sgn (. cndot.) is a sign function, phi1And phi2Is [0,1 ]]A constant of (d); w is an inertia weight;
(e) location update of the individual:
according to the search step length alphaijAnd search direction
Figure BDA00023948522000001213
The position update is performed, and the mathematical expressions thereof are as follows (17) and (18):
Figure BDA00023948522000001214
xij(t+1)=xij(t)+Δxij(t+1) (18),
Δ x in formulae (17) and (18)ij(t +1) is the position variation of the ith search unit at the next moment in the j-dimensional search space, xijAnd (t) the position of the ith searching individual in the j-dimensional searching space at the time t.
In conclusion, the crowd search algorithm SOA optimizes the PID control parameters according to the above analysis procedures, and transmits the optimal Kp, Ki, Kd parameters to the motor driving module to control the motor to adjust the rotation speeds of the four rotors.
The model is used for verifying and verifying the crowd search Algorithm to optimize the performance of the PID control Algorithm on the attitude control of the quadrotor, such as the step response of a quadrotor system and observing the dynamic and steady performance of the system, the anti-interference performance of the system and the robustness of the system, and the superiority of the crowd search Algorithm to optimize the PID control can be demonstrated by optimizing the PID control and comparing with the conventional PID control and the Genetic Algorithm (GA), and optimizing the PID control and the Particle Swarm Algorithm (PSO).
In order to verify the control effect of the invention, the experiment is carried out by utilizing the built four-rotor aircraft model machine. A plurality of protocol experiments were performed separately, as follows:
(1) and a control performance comparison experiment:
corresponding conventional PID controllers, Genetic Algorithm (GA) Optimization PID controllers and Particle Swarm Optimization (PSO) Optimization PID controllers are designed, and a comparison experiment is carried out with the four-rotor aircraft control method based on crowd search Algorithm Optimization PID control provided by the invention. In the experiment, firstly, the crowd search algorithm optimizes the step experiment of the attitude angle of the four-rotor aircraft under the PID control, the conventional PID control and other two kinds of crowd intelligent PID control and an error response output curve under the condition of no interference. The corresponding flight effect is shown in fig. 4 and 5. Then, the crowd search algorithm optimized PID control and the conventional PID control under the continuous interference and the anti-interference performance comparison of the four-rotor aircraft with two kinds of crowd intelligent PID are carried out, as shown in the figure 6 and the figure 7. The verification crowd search algorithm optimizes the control accuracy of the four-rotor aircraft under PID control, conventional PID control and other two kinds of crowd intelligent PID control, wherein FIGS. 8 and 9 are response curves under no interference, and FIGS. 10 and 11 are response curves under continuous random interference.
In an optimization experiment, the particle swarm algorithm is found to be easy to get early, and local information cannot be well utilized. The limitations of genetic algorithms on local information are that the optimization results vary relatively greatly. The crowd search algorithm (SOA) can well utilize information, the problem cannot be caused, and the user cannot jump.
The optimized PID parameters are adopted to carry out simulation experiments on the attitude angles of the four-rotor aircraft, and the optimized effect of the group intelligent control algorithm is better than the traditional PID control effect as can be seen from FIGS. 6 and 7. The specific dynamic performance indexes of the PID parameters optimized by the group intelligent algorithm on the attitude control system of the four-rotor aircraft can be obtained through further calculation, as shown in table 1, sigma represents overshoot, and t representssIndicates the adjustment time, trWhich is indicative of the rise time of the light,
TABLE 1 Performance index of quad-rotor aircraft control system under group intelligent optimization PID control
Class of algorithms σ% ts tr Absolute value of error (× 10)-3)
PSO 0.37% 0.0889 0.1170 3.680
GA 0.37% 0.0913 0.1250 3.690
SOA 0.44% 0.0886 0.1157 4.420
We can see that the overshoot amount of SOA optimal PID parameter for attitude control of the quadrotor aircraft is larger than that of the quadrotor aircraft under the control of GA and PSO optimal PID parameter, but the adjusting time and the rising time are relatively smaller than those of the quadrotor aircraft under the control of the PSO and GA, but the absolute value of the error is larger than those of the latter two.
In order to verify the anti-interference performance of SOA optimization PID parameters on a four-rotor aircraft attitude control system, continuous random signals are added as interference in the process of carrying out a simulation experiment, as shown in fig. 6 and 7, it can be seen from the figure that although an output step response curve fluctuates after the interference is added, the amplitude is not large, and the control effect on the system can still be realized. It is apparent from fig. 7 that the interference immunity of the attitude control system of the four-rotor aircraft under the optimized PID control by the swarm intelligence algorithm is obviously better than that of the traditional PID. It can be seen from fig. 11 that the group intelligence algorithm has a small tracking error value and exhibits a certain periodicity, but the SOA fluctuation amplitude is small by comparison. Specific data thereof are shown in table 2.
TABLE 2 group intelligence algorithm error under interference
Class of algorithms PSO GA SOA
Absolute value of error (× 10)-3) 9.420 11.000 8.561
Absolute value of position tracking error 0.0216 0.0248 0.0226
A sinusoidal signal is used as an input signal, and the control precision of the four-rotor aircraft under the control of PID is optimized through a simulation experiment checking group intelligent algorithm. It can be seen from fig. 8 that the position tracking accuracy under the PID control optimized by the group intelligence algorithm is better than that of the conventional PID. However, the position tracking under the control of SOA optimized PID designed in this section is worse than the position tracking under the control of GA and PSO optimized PID. It can be seen more clearly from fig. 9 and table 3 that the tracking accuracy under SOA optimal PID control is slightly better than that under GA optimal PID control, and slightly worse than PSO. And from fig. 10, fig. 11 and table 2, it can be seen that the position tracking under the SOA optimized PID control is slightly affected by the disturbance better than the GA, and slightly worse than the PSO.
TABLE 3 position tracking error
Class of algorithms PSO GA SOA
Absolute value of position tracking error (x 10)-3) 9.334 10.000 9.330
In summary, the dynamic performance of the attitude control system of the four-rotor aircraft under the control of the PID and the tracking capability of the four-rotor aircraft on the signal are optimized by the group intelligent algorithm, and the dynamic performance of the attitude control system of the four-rotor aircraft under the control of the traditional PID and the tracking capability of the four-rotor aircraft on the signal are obviously superior to those of the attitude control system of the four-rotor aircraft under the control of the traditional PID. The attitude control system of the four-rotor aircraft under the SOA optimization PID control is slightly superior to the dynamic performance of the attitude control system of the four-rotor aircraft under the PSO and GA optimization PID control in the aspect of dynamic performance. But the position tracking capability of the system is slightly better than that of the attitude control system of the four-rotor aircraft under GA optimized PID control, and is slightly lower than that of the attitude control system of the four-rotor aircraft under PSO optimized PID control. Namely, the control precision of the four-rotor aircraft is better than that of GA and is slightly poorer than that of PSO, but the four-rotor aircraft attitude control can be realized on the whole.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (5)

1. The method for optimizing the PID to control the flight of the four-rotor aircraft by the crowd search algorithm is characterized by comprising the following steps of: the method specifically comprises the following steps:
(1) establishing a dynamic model of the four-rotor aircraft, and establishing a dynamic mathematical model of the four-rotor aircraft through a Newton-Euler equation and a coordinate transformation matrix, wherein the dynamic mathematical model is shown in the following formula (1):
Figure FDA0002394852190000011
in the formula (1), m is the mass of the four-rotor aircraft; g is the acceleration of gravity; mu.sx、μy、μzThe air resistance coefficients of the X axis, the Y axis and the Z axis are obtained; j. the design is a squarex、Jz、JzThe rotary inertia of the four-rotor aircraft around an X axis, a Y axis and a Z axis; i isrThe moment of inertia of the rotor of the four-rotor aircraft relative to the rotating shaft; l is the distance from the center point of the rotor to the mass center of the four-rotor aircraft; w is a1、w2、w3Is the angular velocity, w, of the aircraft1′、w2′、w3' are each w1、w2、w3First derivation; x, y and z are the positions of the aircraft, x ', y' and z 'are the first derivatives of x, y and z, respectively, x', y 'and z' are the second derivatives of x, y and z, respectively, and omegaiThe rotation speed of each rotor, wherein i is 1,2,3, 4; c represents a conversion constant between force and moment; c. CTIs the lift coefficient of the rotor; u shapeiFor controlling the input quantity, the mapping relation of the control input quantity and the rotating speed of the four propellers is shown as formula (1), wherein i is 1,2,3,4, 5; theta, theta,
Figure FDA0002394852190000012
Psi is the pitching attitude angle, the rolling attitude angle and the yawing attitude angle of the aircraft respectively;
(2) optimizing PID control parameters based on a crowd search algorithm:
the four independent control channels are controlled by a flight controller of the four-rotor aircraft, and respectively consist of an altitude crowd search algorithm optimized PID control parameter, a rolling crowd search algorithm optimized PID control parameter, a pitching crowd search algorithm optimized PID control parameter and a yawing crowd search algorithm optimized PID control parameter; the rotating speeds of the four rotors are adjusted to achieve the control of the flight attitude through the conversion control of the control quantity; the method specifically comprises the following steps:
the control law of the digital incremental PID control is shown as the following formulas (2) and (3):
u(k)=u(k-1)+Δu(k) (2),
u(k)=u(k-1)+Kp[e(k)-e(k-1)]+Kie(k)+Kd[e(k)-2e(k-1)+e(k-2)](3),
in the formula (3), e (K) is a systematic error, KpIs a proportionality coefficient, KiIs the integral coefficient, KdIs a differential coefficient;
and then carrying out parameter optimization on the PID controller by using a crowd search algorithm SOA, wherein the method comprises the following specific steps:
(a) and parameter coding:
defining S individuals in the population P, and optimizing for three parameters of the PID controller, the dimension of the position vector of each individual is defined as D-3, so the population P is expressed as shown in the following formula (4):
Figure FDA0002394852190000021
(b) selecting a fitness function:
fitness function value see formula (5):
Figure FDA0002394852190000022
in the above equation (5), e (t) is the error of the control system, u (t) is the output of the controller, and w1And w2Is the weight;
in order to avoid overshoot, a penalty measure is adopted, that is, once the system generates overshoot, the overshoot is taken as one of the optimal indexes, and the optimal index is as shown in the following formula (6):
Figure FDA0002394852190000023
in the above formula (6), w3Is a weight value, and w3>>w1In the SOA optimization algorithm, w1=0.999,w2=0.001,w3=100;
(c) Determining a search step length:
the SOA algorithm is an intelligent control algorithm, which is embodied in that the intelligent activity of simulating the search behavior of a human is completed by using the approximation capability of fuzzy reasoning in fuzzy control, and the relation between the SOA algorithm and the search step length is established by describing some natural languages; the SOA algorithm uses a gaussian function to represent the fuzzy variable of the search step size, namely:
Figure FDA0002394852190000031
in the above formula (7), uAExpressing the degree of membership of a Gaussian function, and x expressing an input variable; u and delta represent parameters of a Gaussian function, and according to the relevant properties of the Gaussian function, when an output variable exceeds [ u-3 delta, u +3 delta]At this time, the probability value is less than 0.0111, that is, the membership degree is less than 0.0111, so the minimum membership degree is set as umin0.0111, and u is selected to satisfy faster convergence ratemax0.9500, a linear function is used to represent the fuzzy variable of the objective function, see equation (8) below:
Figure FDA0002394852190000032
uij=rand(ui,1),j=1,2,3 (9),
in the above formulae (8) and (9), IiShowing that the current function value is arranged from high to lowSequence xiNumber of (t), function rand (u)i1) is randomly, uniformly and low distributed in [ u ]i,1]real number of (d), so that the search space step size α is of dimension jijIs represented by the formula (10):
Figure FDA0002394852190000033
in the formula (10), δijThe parameters of the foregoing gaussian membership functions are expressed mathematically as shown in the following equation (11):
Figure FDA0002394852190000034
w=(itermax-iter)/itermax(12),
in the above formulae (11) and (12), xminAnd xmaxThe positions of the minimum function value and the maximum function value in the population are respectively, w represents an inertia weight, and the inertia weight is linearly decreased from 0.9 to 0.1 along with the increase of evolution algebra; iter and itermaxRepresenting the current iteration times and the maximum iteration times;
(d) determining the search direction:
according to the analysis and modeling of the human simulation of the actions of benefiting oneself, the actions of benefiting oneself and the actions of preacting, the direction of benefiting oneself of the ith search individual is obtained
Figure FDA0002394852190000041
Directions of interest
Figure FDA0002394852190000042
And a pre-movement direction
Figure FDA0002394852190000043
Their mathematical expressions are shown in the following cases (13) to (15):
Figure FDA0002394852190000044
Figure FDA0002394852190000045
Figure FDA0002394852190000046
in the above-mentioned formulas (13) to (15),
Figure FDA0002394852190000047
represents the best position that the ith searching individual has experienced so far;
Figure FDA0002394852190000048
representing the best position of the collective history of the area where the ith searching individual is located;
Figure FDA0002394852190000049
and
Figure FDA00023948521900000410
are respectively as
Figure FDA00023948521900000411
The optimal position of (1);
the search direction is determined from a randomly weighted geometric average of the three directions, see equation (16):
Figure FDA00023948521900000412
in formula (16), sgn (. cndot.) is a sign function, phi1And phi2Is [0,1 ]]A constant of (d); w is an inertia weight;
(e) location update of the individual:
and updating the position according to the searching step length and the searching direction, wherein the mathematical expression of the position updating is as the following formulas (17) and (18):
Figure FDA00023948521900000413
xij(t+1)=xij(t)+Δxij(t+1) (18),
Δ x in formulae (17) and (18)ij(t +1) is the position variation of the ith search unit at the next moment in the j-dimensional search space, xijAnd (t) the position of the ith searching individual in the j-dimensional searching space at the time t.
In conclusion, the crowd search algorithm SOA optimizes the PID control parameters according to the above analysis procedures, and transmits the optimal Kp, Ki, Kd parameters to the motor driving module to control the motor to adjust the rotation speeds of the four rotors.
2. The method for optimizing PID control of the flight of a quad-rotor aircraft according to claim 1, wherein the population search algorithm comprises: the four-rotor aircraft comprises an aircraft controller, a power supply module, a navigation and inertia measurement module, a communication module and a motor driving module, wherein the power supply module, the navigation and inertia measurement module, the communication module and the motor driving module are respectively connected with the aircraft controller; the power supply module is connected with the flight controller and provides electric energy for the aircraft; the navigation and measurement module comprises a GPS navigation module, a triaxial accelerometer, a gyroscope and a magnetometer, wherein the GPS navigation module is used for measuring and positioning the real-time position of the aircraft, the triaxial accelerometer is used for measuring the linear acceleration of the aircraft, the gyroscope is used for measuring the angular acceleration of the aircraft, and the magnetometer is used for measuring the geomagnetic intensity of the position of the aircraft; the communication module is connected with the flight controller, so that the flight controller and the ground control station perform data exchange; the motor drive module include four unification motor speed regulators and four brushless motor, four unification motor speed regulators receive four brushless motor work of control behind the motor control signal, through giving four unification motor speed regulator control volume according to the aircraft controller promptly, and then control four brushless motor's rotational speed, make lift and the torque that four rotors produced produce corresponding change through the rotational speed that changes four brushless motor respectively.
3. The method for optimizing PID control of the flight of a quad-rotor aircraft according to claim 2, wherein the population search algorithm comprises: the aircraft controller acquires linear acceleration, angular acceleration, real-time position and magnetic force intensity data acquired by the navigation and inertia measurement module in real time in each control period, solves the current position and attitude angle of the aircraft according to a preset signal processing algorithm, then performs parameter optimization on the PID controller by combining with a crowd search algorithm SOA, adjusts a PID control scheme, and calculates the actual driving quantity of each brushless motor, so that the aircraft can stably fly.
4. The method for optimizing PID control of the flight of a quad-rotor aircraft according to claim 1, wherein the population search algorithm comprises: the crowd search algorithm SOA is a bionic control algorithm and is proposed by analyzing the random search behavior of a person; the optimal solution of the target is completed by simulating experience gradient and uncertainty reasoning in human intelligent search behaviors; namely, natural language is described and uncertainty inference is modeled to determine the search step size, and the search direction is determined by autonomous learning ability and group behaviors, including a selfish behavior, a rival behavior, a self-organizing aggregation behavior, a precautionary behavior, and an uncertainty inference behavior.
5. The method for optimizing PID control of the flight of a quad-rotor aircraft according to claim 1, wherein the population search algorithm comprises: the fitness function value is used for explaining the individual or solution quality of the crowd search algorithm SOA in the optimizing process, meanwhile, reference is provided for updating the position of the individual, the time integral performance index of the absolute value of the error is used as the minimum objective function of parameter selection, and meanwhile, in order to prevent the control quantity from being too large, the square term of the control input is added into the objective function.
CN202010127520.4A 2020-02-28 2020-02-28 Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm Pending CN111221346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010127520.4A CN111221346A (en) 2020-02-28 2020-02-28 Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010127520.4A CN111221346A (en) 2020-02-28 2020-02-28 Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm

Publications (1)

Publication Number Publication Date
CN111221346A true CN111221346A (en) 2020-06-02

Family

ID=70807809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010127520.4A Pending CN111221346A (en) 2020-02-28 2020-02-28 Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm

Country Status (1)

Country Link
CN (1) CN111221346A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110308649A (en) * 2019-07-11 2019-10-08 东南大学 A kind of pid parameter optimization method based on PSO-SOA blending algorithm
CN111667055A (en) * 2020-06-05 2020-09-15 北京百度网讯科技有限公司 Method and apparatus for searching model structure
CN112016162A (en) * 2020-09-05 2020-12-01 江西理工大学 Four-rotor unmanned aerial vehicle PID controller parameter optimization method
CN114056554A (en) * 2020-08-04 2022-02-18 沃科波特有限公司 Aircraft, flight control device and method for determining a maneuver reserve in an aircraft
CN114114896A (en) * 2021-11-08 2022-03-01 北京机电工程研究所 PID parameter design method based on path integral
US11983017B2 (en) 2020-08-04 2024-05-14 Volocopter Gmbh Method for determining a maneuvering reserve in an aircraft, flight control device in an aircraft and appropriately equipped aircraft

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645636A (en) * 2013-11-25 2014-03-19 南京航空航天大学 PID controller parameter optimization method
CN106094860A (en) * 2016-08-29 2016-11-09 广西师范大学 Quadrotor and control method thereof
CN106681345A (en) * 2016-12-28 2017-05-17 广西师范大学 Crowd-searching-algorithm-based active-disturbance-rejection control method for unmanned plane

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645636A (en) * 2013-11-25 2014-03-19 南京航空航天大学 PID controller parameter optimization method
CN106094860A (en) * 2016-08-29 2016-11-09 广西师范大学 Quadrotor and control method thereof
CN106681345A (en) * 2016-12-28 2017-05-17 广西师范大学 Crowd-searching-algorithm-based active-disturbance-rejection control method for unmanned plane

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
唐堂等: "基于附加惯性项人群搜索算法的四旋翼无人机姿态控制研究", 《广西师范大学学报(自然科学版)》 *
赵帅: "四旋翼飞行器几种姿态控制算法的研究", 《中国优秀硕士学位论文全文数据库信息工程科技Ⅱ辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110308649A (en) * 2019-07-11 2019-10-08 东南大学 A kind of pid parameter optimization method based on PSO-SOA blending algorithm
CN110308649B (en) * 2019-07-11 2022-10-14 东南大学 PID parameter optimization method based on PSO-SOA fusion algorithm and applied to industrial process control
CN111667055A (en) * 2020-06-05 2020-09-15 北京百度网讯科技有限公司 Method and apparatus for searching model structure
CN114056554A (en) * 2020-08-04 2022-02-18 沃科波特有限公司 Aircraft, flight control device and method for determining a maneuver reserve in an aircraft
CN114056554B (en) * 2020-08-04 2023-12-05 沃科波特有限公司 Aircraft, flight control device and method for determining a maneuver reserve in an aircraft
US11983017B2 (en) 2020-08-04 2024-05-14 Volocopter Gmbh Method for determining a maneuvering reserve in an aircraft, flight control device in an aircraft and appropriately equipped aircraft
CN112016162A (en) * 2020-09-05 2020-12-01 江西理工大学 Four-rotor unmanned aerial vehicle PID controller parameter optimization method
CN114114896A (en) * 2021-11-08 2022-03-01 北京机电工程研究所 PID parameter design method based on path integral
CN114114896B (en) * 2021-11-08 2024-01-05 北京机电工程研究所 PID parameter design method based on path integration

Similar Documents

Publication Publication Date Title
CN111221346A (en) Method for optimizing PID (proportion integration differentiation) control four-rotor aircraft flight by crowd search algorithm
Wai et al. Adaptive neural network control and optimal path planning of UAV surveillance system with energy consumption prediction
CN110806759B (en) Aircraft route tracking method based on deep reinforcement learning
CN106094860B (en) Quadrotor and its control method
Clawson et al. Spiking neural network (SNN) control of a flapping insect-scale robot
Hong et al. Energy-efficient online path planning of multiple drones using reinforcement learning
Clarke et al. Deep reinforcement learning control for aerobatic maneuvering of agile fixed-wing aircraft
Yin et al. Adaptive neural network sliding mode control for quad tilt rotor aircraft
Nie et al. Three-dimensional path-following control of a robotic airship with reinforcement learning
Mohammed et al. Design optimal PID controller for quad rotor system
Kose et al. Hexarotor yaw flight control with SPSA, PID algorithm and morphing
Moshayedi et al. The quadrotor dynamic modeling and study of meta-heuristic algorithms performance on optimization of PID controller index to control angles and tracking the route
CN110083168A (en) Small-sized depopulated helicopter based on enhancing study determines high control method
Ferdaus et al. Development of c-means clustering based adaptive fuzzy controller for a flapping wing micro air vehicle
CN116414153B (en) Unmanned aerial vehicle take-off and landing correction method based on artificial intelligence
CN117215197B (en) Four-rotor aircraft online track planning method, four-rotor aircraft online track planning system, electronic equipment and medium
Gmili et al. Intelligent PSO-based PDs/PIDs controllers for an unmanned quadrotor
Maslim et al. Performance evaluation of adaptive and nonadaptive fuzzy structures for 4d trajectory tracking of quadrotors: A comparative study
CN112016162A (en) Four-rotor unmanned aerial vehicle PID controller parameter optimization method
Abdulla et al. Roll control system design using auto tuning LQR technique
Tagliabue et al. Robust, high-rate trajectory tracking on insect-scale soft-actuated aerial robots with deep-learned tube mpc
CN113885549B (en) Four-rotor gesture track control method based on dimension clipping PPO algorithm
CN116301007A (en) Intensive task path planning method for multi-quad-rotor unmanned helicopter based on reinforcement learning
Arama et al. Control of an unmanned coaxial helicopter using hybrid fuzzy-PID controllers
Muthusamy Intelligent control systems for unmanned aerial vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200602