Aerodynamic parameters identification and adaptive LADRC attitude control of quad-rotor model

Sen Yang, Leiping Xi, Jiaxing Hao, Yuefei Zhao,Ye Yang, Wenjie Wang 1 Department of UAV Engineering, Army Engineering University, Shijiazhuang 050003, China; 2 School of Automation Science and Electrical Engineering, Beihang University, Beijing 100083, China; 3 School of electrical and electronic engineering, Shijiazhuang Tiedao University, Shijiazhuang 050043, China 4 High Speed Aerodynamics Research Institute, China Aerodynamics Research and Development Center, Mianyang 621000, China; School of Engineering, University of Warwick, Coventry, CV4 7AL, United Kingdom; Email:Wenjie.Wang.1@warwick.ac.uk Email:568657132@qq.com Abstract: In accordance with problems such as difficulty in obtaining aerodynamic parameters of a quad-rotor model, the change of model parameters with external interference affects the control performances, an aerodynamic parameter estimation method and an adaptive attitude control method based on LADRC are designed. Firstly, the motion model, dynamics model and control distribution model of quad-rotor are established by using the aerodynamic and Newtonian Euler equations. Secondly, the identification tool CIFER is used to identify the aerodynamic parameters with large uncertainties in frequency domain and a more accurate attitude model of the quad-rotor is obtained. Then an adaptive attitude decoupling controller based on LADRC is designed to solve the problem of poor anti-interference ability of the quad-rotor, so that the control parameter b0 can be automatically adjusted to identify the change of the moment of inertia in real time. Finally, a semi-physical simulation platform is used for simulation verification. The results show that the adaptive LADRC attitude controller designed can effectively estimate and compensate the system's internal and external disturbances, and the tracking speed of the controller is faster and the precision is higher which can effectively improve system's anti-interference and robustness.


Introduction
The quad-rotor is an unmanned aircraft which has advantages of simple-structure and easyoperation.It can achieve hover, vertical takeoff, landing and some other specific flight postures when rotating speed of the four motors is controlled.In order to complete specific flight missions with high standard, it is necessary to design control system and establish accurate model [1][2][3] .
The quad-rotor modeling mainly adopts the following two methods: One is the mechanism analysis method, which uses traditional engineering experience and modern aerodynamics knowledge for analysis, and mathematical methods to derive theoretical models.But the environmental influence on the model parameters is ignored.It is difficult to ensure the accuracy and complexity of the model at the same time.The other is the experiment method, including wind tunnel experiment and parameter identification experiment.The key parameters of a quad-rotor obtained by wind tunnel experiment need long time and high cost.Parameter identification can be divided into three methods: "black box", "grey box" and "white box".Among them, "grey box" is an identification experiment conducted when some mechanisms is still not clear.At present, mechanism analysis with "grey box" is an effective means for quad-rotor to obtain key parameters and establish accurate models [4] .In the process of parameter identification, the most commonly used methods are time-domain identification method, such as Least Squares, maximum likelihood method and intelligent identification algorithm based on neural network, etc.However, the identification results based on least squares are easily affected by measurement noise [5] .The maximum likelihood method has high complexity and large calculation amount [6] .Artificial neural network is easy to fall into local optimal solution with poor real-time performance [7] .Compared with the above time-domain identification methods, the identification of key parameters in frequency domain is more suitable for a quad-rotor with high dynamic characteristics and low signal-to-noise ratio of flight data.Among them, CIFER is the aircraft identification software of the United States military.It adopts advanced frequency domain identification algorithm, which can estimate the transfer function and state space model of the system, so that the frequency response of the identification model can be best matched with the frequency response of the actual system [8] .Moreover, the CIFER identification software package is a mature tool developed with high identification accuracy, simple operation and other advantages, which is suitable for the parameter identification of quad-rotor.
In addition, a good control system is also the basis and premise for UAV to complete flight missions.At present, the control algorithms applied to a quad-rotor mainly include PID control, backstepping, nested saturation control, fuzzy control and sliding mode control, etc [9][10][11][12][13][14] .Among these control theories, except a few classic controllers (such as PID controller) can be applied in practice, most other advanced control theories can only be used for simulation due to the complexity, and there is still a large distance for the actual engineering application [15][16][17] .Prof.Han proposed the active disturbance rejection controller (ADRC), inherited the essence of PID based on error and eliminates error.Absorbing the modern control theory, the system disturbance is estimated in real time by an extended state observer.Then the system is compensated according to the estimated value [18][19] .This method can improve the system robustness effectively with an independent accurate model.However, ADRC has many setting parameters, which are not good for engineering practice [20][21][22][23] .Linear active disturbance rejection controller (LADRC) is based on the bandwidth of the controller to tune parameters, which simplifies the process, is more convenient for engineering application [24][25] .
The effect of control channel gain of the controller is the most important parameter in LADRC designing process.However, many studies have treated this parameter as a constant now.A large number of simulations and practical applications show that the parameters, as a function of state, should be time-varying, and better control effects can be obtained by seeking appropriate values [26- 28] .The process of adaptive adjustment is added to LADRC controller in this paper to make it adjust online with the change of system parameters and improve the system robustness and antidisturbance.

Quad-rotor attitude model 2.1 Experimental device
Based on the 3-DOF quad-rotor platform of the Canadian Quanser company [29] , this paper establishes the semi-physical simulation environment of the quad-rotor, as shown in Fig. 1.
The platform consists of four thrusters mounted on a 3-DOF center link, each with a code disc that captures the angle of the aircraft module.The propeller consists of a fan with an impeller, which is driven by a motor to rotate the impeller, and then the impeller rotates to generate torque to control the model to produce roll, pitch and yaw motion.
The quad-rotor of the 3-DOF platform are distributed in the shape of "十", the "front" and "back" rotors turn counterclockwise and the "left" and "right" rotors turn clockwise.The control signal is sent to the quad-rotor platform in the form of voltage in the control program of the quadrotor on the computer.(1) Motion model The quad-rotor has six-degree of freedom movement in space, including three linear motions along the coordinate axis and three rotational motions around the center of mass.Only the attitude system model is studied, so the linear motion along the three coordinate axes is not considered. Where Among them,  represents the attitude angle of the quad-rotor in the earth coordinate system,  represents the angular velocity of the quad-rotor in the airframe system.Their transformation relation can be expressed as: (2) Dynamical model According to Newton's second law, the attitude dynamics equation of quad-rotor can be expressed as: Where , diag( , , ) is the rotation inertia matrix in the body coordinate system.x J , y J , z J are the rotation inertia of the roll axis, pitch axis and yaw axis in the body respectively.

T x y z
     =  is the angular velocity of three axes in the body coordinate system.Through analyzing, the rotational torque of the quad-rotor is mainly derived from the lift torque, air resistance torque and the torque under the gyroscope effect.
Where f  is the lifting torque of the body, and diag( , , ) 00 Taking the roll shaft as an example, the equation ( 2) is sorted out: () () () It can be obtained in the same way： () In conclusion, the angular motion model of quad-rotor is: () 1 tan sin tan cos () 0 cos sin 0 sin sec cos sec () (3) Control allocation model Set the control input of the quad-rotor attitude angle system as . For the "十" quad-rotor, the lift torque generated by its rotor can be expressed as: In the equation, U is the control allocation matrix, L is the length of the quad-rotor arm, t K is the lift coefficient and l K is the torque coefficient.The control allocation matrix is: 00

Parameter identification based on CIFER
It can be seen from the above analysis that in order to establish the model of the quad-rotor attitude system, the following parameters need to be known: directly.The precision of t K 、 l K 、and J is closely related to the design of quad-rotor flight control system.Therefore, it is necessary to design identification algorithm to get more accurate values.In this paper, the key parameters of quad-rotor are obtained based on CIFER identification method.
3.1.Identification process of CIFER CIFER algorithm is mainly composed of five core modules, frequency response identification, multi-input processing, combined window processing, single channel transfer function identification, state space equation identification and time domain verification.Fig. 2 shows the connection between each module [30] [31] .
In general, the identification steps based on CIFER method can be summarized as: (1) Input sweep signal to the quad-rotor platform, collect sweep frequency data and process data to make it conform to the actual test requirements.The frequency response of input and output is calculated mainly by using Chip-z transformation to calculate the frequency response of each input and output pairs.
(2) The frequency response is calculated as a paired SISO system, and additional steps are required to be organized to eliminate the influence of multiple related inputs.Therefore, multi-input identification technology should be adopted to regulate frequency response and partial coherence.
(3) In order to obtain the most accurate identification estimation, the above spectral calculation (SISO and multi-input normalization) needs to be processed by using the optimized composite window technology to obtain a single MIMO composite frequency response estimation matrix with excellent quality and dynamic range.
(4) Identify the single-channel transfer function for the data processed above, and obtain the transfer function of the response.
(5) The identification algorithm is obtained according to the identification criteria, the state space model of the system is established according to the known parameters, and the initial value of estimation is used for the unknown parameters.The frequency response of the known model and the estimated model is matched.Finally, the system state space equation and the unknown parameter values that need to be identified are obtained.Fig. 2 The constituent part of CIFER

Key parameters identification of quad-rotor
The 3-DOF quad-rotor platform introduced in section 2.1 was selected for the identification experiment.Due to the high symmetry of rotor structure, the differences of aerodynamic parameters and other performances of the quad-rotors are very small, which can be considered to be approximately equal.Taking roll channel as an example, the key parameter identification experiment of quad-rotor is conducted.
From equations ( 5) and ( 9), the nonlinear model of the roll channel is: Small angle linearization at the equilibrium point can be approximated when the coupling between channels is ignored, then Then, equation ( 12) can be simplified as: Ys are respectively the Laplace transform of input and output signals.
The estimation matrix of the frequency response matrix can be expressed as: () ˆ() xx Gf are cross-power spectral function and self-power spectral function.The task of system identification is to make the estimation matrix ˆc T of frequency response conform to the actual data matrix.The model adopted by identification is the output error model, and the identification criteria are: .After the frequency data is collected, the identification experiment can be carried out.
The state space equation of the system is constructed according to the input quantity u , state quantity x and output quantity y of the system.It can be expressed as: Where M , F , G , H , T and  are the coefficient matrix and coefficients that need to be solved in CIFER software.In this experiment, the rotor arm length 0.197 Lm = , the key parameters to be identified are rotation inertia x J and lift coefficient t K .The initial value of the parameter is obtained based on prior estimation, and the identification vector  is constantly changed through the iterative process until the cost function J is minimized.After the frequency domain identification process of CIFER software package, model matrix M , F , G are obtained.The identification results of key parameters are also obtained: ˆ0.0492 x J = , ˆ0.1170 t K = . By comparison with the value 0.0552 given in the user manual of experimental platform, it can be seen that this identification result has a small error, which the moment of inertia ˆx J is around 10%  , and the lift coefficient ˆt The experimental results are shown in Fig. 3.The data collected by the sweep experiment is automatically generated and saved as a "quac_COM_ABC00" data file after chip-z transformation and window processing, which is drawn with solid line.The frequency response data of the identified model is a "quac_DER_A0000" file, which is drawn with dotted line.The upper part of Fig. 3 describes the amplitude comparison between the frequency response of experimental data and the identification model.The lower half is the contrast of the two phases.

Fig.3 The comparison of recognition result and experimental data frequency response
The acquisition frequency of the experimental data is 50 Hz.Analyzing the above results, it can be found that the amplitude and phase of the frequency response are good at the low-frequency stage less than 50 Hz, but the jitter occurs at the high-frequency stage more than 50 Hz, and the tracking effect is modest.The reason may be that additional feedback is needed to maintain the quad-rotor within the operating conditions at high frequencies, and the parameterized model based on mechanism analysis is not sufficient to fully describe the system response.

Adaptive LADRC attitude control method of quad-rotor
In the quad-rotor system, the rotational inertia is uncertain with the change of center of gravity, wind disturbance and other factors, which have a bad influence on the tracking accuracy and response speed of the control system.The rotational inertia is identified online and the parameters of the controller are adjusted adaptively according to the obtained moment of inertia, which can make the control system a good anti-interference performance.

Online identification of rotational inertia
Based on the disturbance observer (DOB), the rotational inertia is identified online.By estimating the internal and external disturbances in the model, the real-time rotational inertia is equivalently obtained.Taking the rolling channel as an example, a certain transformation of equation ( 5) can be obtained as follows: Where M  is the unknown disturbance that the DOB needs to estimate and . Because the changing rate of the disturbance is far lower than the sampling frequency, it is considered for M  to be constant within a sampling period.
According to the equation ( 19) state space equation is: Where, the state quantity is  (20), the minimum order state observer is established to estimate the unknown disturbance: Where z is the intermediate variable, n J is the constant rotational inertia, Two intermediate variables are introduced and expressed as: Put equation (23) into equation (22), and the estimated value of disturbance can be expressed as:  as the change of rotational inertia caused by external factors.
it with equations ( 20) ~ ( 22), which can be concluded as follows: () Put the intermediate variable 0 q and 1 q into equation ( 24), we can obtain: Multiply 0 q by both sides: Both 0 q and 0 q ， 1 q and 0 q are quadrature which can be proved.Therefore, the equation (26)   can be used to estimate the change of the rotational inertia: Add the rotational inertia of the previous period and the change value of the rotational inertia, the estimated value of the new rotational inertia can be obtained: The structure diagram in the identification process is shown in Fig. 4. The ratio  between the initial value of the rotational inertia and the theoretical value is set as a fuzzy variable in the controller.The variable value of 0 b is expressed as another fuzzy variable 0 b  .In their domain, eight language subsets are defined as {" 0 P ", " 1 P "," 2 P ", " 3 P "," 4 P ", " 5 P "," 6 P ", " 7 P "} "respectively.Select membership function of The fuzzy reasoning criterion is determined as: If  is i P , then 0 b  is , ( 0,1, 2,..., 7) i Pi = .
The defuzzification algorithm is average weight method.
Finally, by the adjustment of fuzzy controller, the control parameters 0 b  can be expressed as: The adjusted control parameters 0 ' b can be obtained from equation (29).Combined with LARDC control rules, the adaptive controller of attitude tracking for quad-rotor can be obtained, the structure of which is shown in Fig. 5.
Fig. 5 Adaptive controller of attitude tracking for quad-rotor based on LADRC

Result and discussion
In order to verify the performance of the attitude tracking adaptive controller based on LADRC.Compare it with PID and traditional LADRC on 3-DOF physical simulation platform.
In the Matlab/Simulink environment, the DOB-based rotational inertia identification module was built.The sampling period of the experimental platform is 0.002s, the test signal is superimposed on the command signal and the identification module estimates the total disturbance in real time so as to update the rotational inertia value.The identification process is shown in Fig. 6, where the dashed line represents the reference value of the rotational inertia as  It can be seen from Fig. 8 that when the expected roll angle is set within a certain angle range, the adaptive LADRC controller is not superior to the traditional LADRC controller in tracking performance.However, when the angle is small, that is, the desired angle is set at 1 or less than 1, the adaptive LADRC controller is obviously superior in tracking.The simulation results are shown in Fig. 9, where the dotted line represents the expected angle, the black dashed line represents the tracking process of LADRC controller, and the dash dotted line represents the tracking process of adaptive LADRC controller.It can be seen that the traditional LADRC controller has a large overshoot and a long response time while the adaptive LADRC controller has fast response speed and small overshoot, which indicates the real-time adjustment of the control parameter 0 b , improving the performance of LADRC controller.As shown in Fig. 10 and Fig. 11, for the impulse disturbance, the disturbance estimated value of the adaptive LADRC controller is closer to the real value, and the reaction speed is faster.For the sinusoidal disturbance, the adaptive LADRC controller has almost no deviation in the estimation of the disturbance, while the traditional LADRC controller has a significantly larger estimation.
Compared with the traditional LADRC controller, the parameter 0 b can be optimized in real time by adaptive LADRC, so that the system can estimate the disturbance more accurately, and the performance of the controller is superior.

Conclusion
In this paper, a quad-rotor aerodynamic parameter identification based on CIFER and an adaptive LADRC attitude control method are designed.Firstly, a quad-rotor mathematical model based on Newton-Euler formula is established.Then the key parameters of the model are identified by CIFER.According to the model uncertainly caused by the change of the moment of inertia, DOB is introduced to identify the moment of inertia online, and the control parameters are optimized in real time by adaptive LADRC depending on the rotation that you get.Finally, the simulation experiment is carried out on the quad-rotor semi-physical platform.The results show that the adaptive LADRC attitude controller designed in this paper can effectively estimate and compensate the total disturbance of the system, and the tracking speed of the controller is faster and the accuracy is higher.

Fig.1 3 -
Fig.1 3-DOF hover simulation platform of quad-rotor 2.2 The establishment of mathematical models(1) Motion model The quad-rotor has six-degree of freedom movement in space, including three linear motions along the coordinate axis and three rotational motions around the center of mass.Only the attitude system model is studied, so the linear motion along the three coordinate axes is not considered.
of the frequency response matrix of the system is:

n, where 2 
 represents the number of frequency points, 1  and n  represent the appropriate start and stop frequencies; W  is a weight function related to the coherent functionrepresents the coherent value at each frequency point; the variance of amplitude and phase.ˆc T is the estimation matrix of frequency response.Frequency sweep signal is input to the experimental platform of quad-rotor.Frequency bandwidth is predetermined in frequency sweep design requires.Generally, a good bandwidth for quad-rotor identification is at 0.3 12rad / s .The record length of each scan data should be 45 cycles as max T of the minimum frequency, and the record length should satisfy max 4 rec TT  state space equation of formula c M is the estimated value of disturbance and  − is the observer pole value.The Laplace transform of equation (21) can be obtained by integrating: Preprints (www.preprints.org)| NOT PEER-REVIEWED | Posted:

Fig. 4
Fig.4 Diagram of the identification of rotational inertial based on DOB 4.2 Adaptive LADRC attitude control method As estimating the rotational inertia online, the control parameters 0 b can be adjusted according to the rotational inertia value in real time.The fuzzy logic controller is introduced and the rules are used to modify the control parameter 0 b according to the change of the rotational  and 0 b  as triangle.According to a large number of simulation experiments, the ratio of the initial value of the rotational inertia to the theoretical value should meet 1 22  , and the change value of the control parameters 0 , therefore, the basic theory field of  is ( )

.
Taking roll channel as an example, the bandwidth of the controller is adjusted repeatedly in LADRC and 10 c  = is finally selected.Observer bandwidth is 0 30  = .In PID controller, the parameters with good control performance are 1 adjustment.The comparison of the three control methods is shown in Fig.8, where the dotted line represents the expected roll angle, the red dashed line represents the tracking process by PID controller, the black dashed line indicates the tracking performance of the original LADRC controller, and the dash dotted line indicates the adaptive LADRC controller.
In order to verify the dynamic performance and anti-disturbance of the control system, adding the impulse disturbance with amplitude as 0.2N m  , duration 5s and sinusoidal disturbance with amplitude as 0.3N m  , period 5s respectively.The estimation of disturbance by LADRC controller and adaptive LADRC controller was observed.The results are shown in Fig.10and Fig.11.The dotted line represents the actual disturbance moment, the dash dotted line represents disturbance estimation with LADRC and the dashed line represents disturbance estimation with adaptive LADRC controller.

Fig. 9
Fig.9 Comparison of small angles control methods