Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 4, No. 1, 2023 51 Design of Preset Performance Reverse Step Attitude Controller for Four‐rotor UAV Keyong Shao, Yuda Pan College of Electrical Information Engineering, Northeast Petroleum University, Daqing 163318, China Abstract: Aiming at the attitude control problem in flight control of four-rotor UAV, a control scheme based on the preset performance backstepping controller (ESO-NPPCBSC) for attitude Angle of four-rotor UAV with extended state observer is proposed. A preset performance function with specified time convergence is designed to constrain the transient performance and steady-state performance of the tracking error. Compared with the traditional scheme, the preset performance function can make the tracking error of the controlled system converge to the preset precision range within the specified time, and the convergence rate can be adjusted flexibly and the error conversion function can be used to transform the tracking error without constraints. The attitude Angle tracking error satisfies the preset performance condition by controlling the conversion error. The control law of attitude Angle of four-rotor UAV is designed based on reverse step method, which solves the problem of low control accuracy of four-rotor UAV under the condition of uncertain interference. Keywords: UAV Attitude Angle Control; Extended State Observer; Preset Performance Control; Backstepping Control. 1. Introduction In recent years, the design, development and application of four-rotor Unmanned Aerial Vehicles (UAVs) have attracted the attention of scholars around the world [1]. Compared with fixed wing UAVs, four-rotor uAVs have advantages such as simple structure, low manufacturing cost, easy maintenance, light fuselage and easy manipulation. In addition, four-rotor UAVs also have excellent maneuverability, environmental durability, hover, vertical takeoff and landing [2], which makes four-rotor uAVs widely used in military, agricultural, commercial, civil and scientific research and other related fields [3]. Four-rotor UAV is a control system with multi-input multi- output (MIMO), high nonlinear and underdriven internal parameter coupling degree [4]. At the same time, the dynamics modeling of quadrotor UAV contains many unknown interference factors, such as model parameter change, model mismatch, external environmental interference, etc. [5]. Therefore, it is of high practical value and practical significance to design a reliable flight control algorithm to solve flight control problems related to poor anti-interference ability and low control accuracy of quadrotor UAV in actual operation [6]. Sun Zidong [7] et al. designed an improved backstepping control algorithm combining fuzzy control and dynamic surface control, which not only approached the unknown function appearing in the system, but solved the complexity explosion problem existing in the backstepping design process. By introducing a performance function, the tracking error of the controlled system converges in a finite time. Dalwadi Niha l [8] et al. designed a backstepping controller based on nonlinear observer. The backstepping controller can achieve good trajectory tracking when the nominal altitude drops, and improve the control quality of the quadrotor UAV during the transition from hovering state to horizontal flight state. Ma TieNan [9] et al. designed a single nonlinear extended state observer by using the feedback linearization technique to reduce the complexity of observer parameter adjustment. A preset performance control method of the four- rotor UAV under the attitude and input saturation constraints is designed to improve the stability of the controlled system. Davood Allahverd [10] et al. designed an inverse integral sliding mode control (BISMC) based on iterative learning control, which improved the problems existing in the nonlinear translational and rotational dynamics of the four- rotor UAV and enabled the controlled system to have high transient and steady-state performance. RodriguezAbreo Omar [11] and others through a based on genetic algorithm is designed to step of parameters self-tuning control algorithm, the algorithm is based on four rotor uav autonomous trajectory tracking to backstepping controller gain, implements the gain of different magnitude error self-tuning. Chen Yanjie [12] et al. designed an adaptive sliding mode interference observer (ASMDO) and designed a finite time preset performance control method on the basis of ASMDO to realize effective control of UAV manipulator with uncertainty and external interference. The system converges in finite time and has specified transient and steady-state properties. Based on the inspiration of the above literature, this paper aims to design a preset performance control scheme whose convergence time can be artificially set for small quadrotor UAV as the research object, and verifies the control performance of this scheme in the presence of incident interference through numerical simulation. The main contributions are as follows: An extended observer is designed to dynamically compensate the complex interference. A preset performance function whose convergence time can be artificially specified is proposed. Based on this, a preset performance control law based on backward step method is designed, which can make the tracking error of the controlled system converge within the specified time and the convergence speed can be adjusted according to the requirements. 2. System Modeling and Problem Description Driven by four propellers, four-rotor UAV can realize six 52 degrees of freedom movement in three-dimensional space. Therefore, the mathematical model of four-rotor UAV is a typical multi-input, multi-output and strongly coupled underactuated controlled system. In this paper, Newton-Euler formula is adopted to deduce the attitude dynamics of the four-rotor UAV [13]. The following hypothesis is given: (1) Quadrotor UAV is a uniform and symmetrical rigid body; (2) The mass and moment of inertia of the four-rotor UAV do not change; (3) The geometric center of the quadrotor UAV coincides with its own center; (4) Quadrotor UAV only accepts gravity and propeller pull. According to Newton-Euler formula, the attitude dynamics equation of the four-rotor UAV is established as follows: y z x x z x y y x y z z I I U d I I I I U d I I I I U d I I                         + + + + + +         (1) Where,  ,  and  represent the roll Angle, pitch Angle and yaw Angle of the attitude Angle system of the four- rotor UAV respectively. d , d and d respectively represents the interference of roll Angle system, the interference of pitch Angle system and Interference of yaw Angle system. xI , yI and zI respectively represent the moment of inertia of the four-rotor UAV with respect to the x axis, the moment of inertia with respect to the y axis and the moment of inertia with respect to the z axis. U , U and U respectively represent the control input of the three attitude angles of the four-rotor UAV. In order to facilitate the subsequent controller design, the original four-rotor UAV attitude Angle system dynamics model needs to be converted into n order integral series dynamics model with strict feedback form. In order to simplify the design process, a symbol representation method as shown in Equation (2) is proposed before model transformation:           1 2 2 1 1 1 2 1 1 1 2 2 T T T x y z y z x z x y T T x y z X X d d d d I I I I I I I I I f X K U I U I U I U                                                                 (2) where, 1X , 2X and 2 2K U represents the control input of attitude Angle, attitude angular velocity and yaw Angle of the four-rotor UAV respectively. Based on Formula (1) and combined with Formula (2), the state space equation of the integral series attitude Angle system of the four-rotor UAV can be described as:   1 2 2 2 2 2 2 X X X f X K U d     + +   (3) Where, 2d represents the sum of external airflow disturbance, unmodeled system dynamics and model uncertainty influence disturbances received by the four-rotor UAV. Due to the under-actuation characteristic of the four-rotor UAV, the designed controller cannot track the 6 degrees of freedom at the same time. The controller designed in this paper can ensure no attitude control of UAV. The human- machine attitude Angle stably tracks the expected input  Td d d   . 3. Default Performance Function and Error Transform Presetting performance means that the transient and steady- state performance of the system is limited within the range of the pre-designed performance function by designing a conversion function, so as to improve the transient and steady-state performance [14]. The default performance method can be expressed as the following inequality:                   1 2 , 0 0 , 0 0 M t e t t e t e t M t e              (4) Where, 0 1M  is design parameter;  e t is a constrained error signal;  t is a predesigned performance function that meets the following definitions: (1) ( )t Is a smooth bounded function, ( )t is decreasing monotone and ( )t R R    ; (2) For ( )t , have ( ) ( )t t   and satisfy lim ( ) ( ) [0, ) t t t         . Attitude Angle system for quadrotor UAV, the performance function ( )t that can converge in a finite time is selected as follows: 1 1[( ) / ] ( (0) ( ) ( )) ( ) 0 ( ), rT t t t t T t T                   , (5) Where, (0,1)r ,  0 ,    and T is the adjustment parameter of the performance profile at the specified time, By adjusting the value T of the time, you can make the time specified by the performance function ( )t converge. In order to make tracking errors converge within the preset performance, inequality constraints should be converted into equality constraints, and constrained errors into unconstrained errors [15]. This paper introduces the error transform shown in Equation (6): (6) : ( ) ( ) ( ( ))e t t s z t (6) Where, ( ( ))s z t is the error conversion function of the tracking error, ( )z t is conversion error. Select the error conversion function shown in Equation (7): ( ) ( ) ( ) ( ) ( ( )) t t t t e e z t e e        (7) By inverting equation (7), the expression of conversion 53 error ( )t can be obtained as follows: ( ) 1 1 ( ) 2 ( )( ) 1 ( ) ( ) ln ( ) 2 ( ) t t e te t t z t e t                 (8) According to different control requirements, reasonable error conversion function ( ( ))s z t and error conversion function ( )z t are designed, the transient performance and steady-state performance of the UAV attitude Angle system can be set in advance so that the tracking error of the system is always limited within the error ( )t boundary of the preset performance function. It's important to note that, when  0 0e  ,the value of 1 2M M, cannot be 0, Otherwise, the value ( )z t is infinity. Therefore, the design parameters 1 2M M, need to be satisfied 1 20 1M M , . By differentiating equation (8), the derivative of conversion error  t can be expressed as follows:                  1 1 / tz t e t e t t te t t                 (9) For equation (9), make          1 1 / z r t te t t     ,       t v t t     ,Then formula (9) can be rewritten as:         t r e t e t v t    (10) Therefore, as long as the conversion error  t is bounded, the tracking error  e t can meet the requirements of the preset performance. 4. Preset Performance Backstepping Controller Design On the basis of given virtual control quantity, attitude closed-loop control can be regarded as a linear control. By using the idea of error conversion, the tracking error is guaranteed to be in the preset boundary function, and the extended state observer is designed to estimate the sum of the uncertain influence interference, and then the adaptive backstepping controller is designed. Step 1: Conversion error 1e is introduced into the attitude Angle tracking error 1( )z t of the four-rotor UAV, then the tracking error equation of the system can be described as: 1 1( ) ( ) re t z t p p   (11) Where, p and rp represents the actual attitude Angle and the expected attitude Angle respectively. Based on the rolling Angle channel tracking error equation of Equation (11), the Lyapunov function is constructed as follows: 2 1 1 1 1 ( ) 2 V e e (12) The derivative of equation (12) is obtained: 1 1 1 1 1 1 1 2 1( ) ( ) ( )r rV e e e e p p e r U p e v          (13) Where, 2U represents the virtual control input of the attitude Angle system of the four-rotor UAV. In order to ensure the tracking error of attitude Angle is stable, A must be satisfied 1 1( ) 0V e  . Based on Equation (13), the virtual control law of the stable attitude Angle system satisfying Lyapunov's sense is designed as follows:    1 2 1 1 1 1 1( ) ( ) ( ) ( )rU t k r t e t p t e t v t   + (14) If equation (14) is substituted into Equation (13), equation (13) can be rewritten as: 2 1 1 1 1( )V e k e  (15) Step 2: The error equation for defining the tracking speed of the attitude Angle system of the four-rotor UAV is as follows: 2 2re p p p U      (16) Where, p , rp Respectively represent the actual attitude Angle tracking speed. The degree and desired attitude Angle track the velocity. Aiming at the error equation of attitude Angle tracking velocity, the Lyapunov function is constructed as follows: 2 2 2 2 1 ( ) 2 V e e (17) The derivative of Equation (17) is obtained: 2 2 2 2 2 2 2 2 2 2 2 ( ) ( ) ( ) V e e e e p U e K U d U           (18) Where, 2U represents the actual control input of the attitude Angle system. In order to ensure that the tracking velocity error of attitude Angle 2e is stable, it needs to meet 2 2( ) 0V e  . Then the actual control law of the stable attitude Angle system satisfying Lyapunov's sense is designed as follow  1 2 2 2 2 2( )rU K k p p d U       (19) If equation (19) is substituted into Equation (18), equation (18) can be rewritten as: 2 2 2 2 2( )V e k e  (20) For Equation (19), it is necessary to design an extended state observer for the velocity term p and interference term 2d in it for online observation. Parameter uncertainties and unknowns in the system state of the controlled system. The perturbation is merged into lumped interference dX ,where,  2 2=dX f X d+ and the lumped interference dX is extended into a new state variable 3X of the system (3). 3X h is defined as the derivative of lumped interference, assuming 3X that it is continuous and differentiable and satisfied 3X M , where 0M  . Finally, the augmented state- space equation of the attitude Angle system of a four-rotor UAV can be described as: 1 2 2 2 2 3 3 X X X K U X X h       +    (21)  1 2 3 TTX X X X= is used to represent formula (4), then formula (4) can be rewritten as: + +T TX AX U  (22) The expression of A andU is shown in Equation (23) 3 3 2 2 0 0 0 0 0 , 0 0 0 0 I A I U K U                    (23) 54 For Equation (23), where the identity matrix 3I is represented 3 3 , 0 represents the zero matrix of appropriate dimension. Based on the design method of the extended state observer, the extended state observer specific to the attitude Angle system of the four-rotor UAV is constructed to provide the state estimation, angular rate state estimation and lumped interference estimation of the attitude Angle system.  2 2 1 1 ˆ ˆ ˆ h h hX A X K U H X X + +  (24) Where, the expression of hA , ˆ hX and H is shown in Equation (25): 3 3 1 2 3 2 3 3 3 3 0 0 0 0 0 0 0 ˆ ˆ ˆ ˆ 3 3 h T T T T h T I A I X X X X H w I w I w I                    (25) For equation (25), where, 1X̂ , 2X̂ and 3X̂ respectively represent four the estimated value of attitude Angle, attitude Angle rate and lumped interference of the rotor UAV 3I are represented by the unit matrix 3 3 , where 0 represents the zero matrix of appropriate dimension, H is the observer gain matrix, w is the bandwidth of the linear expanded state observer and satisfies 0w  . The bandwidth of the linear w expanded state observer is the only adjustment parameter. For Equation (19), due to the control system of attitude Angle system. An extended state observer is introduced to observe the state variables 2X and 3X lumped interference respectively. Therefore, based on Equation (19) and combined with Equation (24), the actual control law of the attitude Angle system can be rewritten as: 1 2 1 2 2 2 3 2 ˆ ˆ( ( ) )U K k X U X U      (26) Where, 2X̂ and 3X̂ respectively represent the estimated values of system state variables 2X and lumped interference 3X̂ . 5. Simulation Results and Analysis In order to verify the effectiveness of the controller designed in this paper, the ESO-NPPCBSC controller was simulated based on Simulink environment and compared with the proportional Integral-differential controller (PID) and the reverse step controller (ESO-BSC) with no default performance and extended state observer. After repeated debugging, parameters of the preset performance function of the attitude Angle system of the four- rotor UAV are shown in Table 1: Table 1. Preset performance parameter Parameter (0,1)r  0    T Numerical value 0.6 2 0.02 0.2 For the state space model of the attitude Angle system of the four-rotor UAV, considering the output limitation of the attitude Angle of the four-rotor UAV in the trim state, the maximum change amplitude of the attitude Angle is defined as /18rad . The reference control inputs of attitude Angle, d , d and d . d are selected as the step signals of amplitude, 0.1rad , 0.12rad and 0.15rad respectively, and the external interference of the attitude Angle system is selected as 2 sind t . The comparison of attitude Angle tracking response curves of ESO-NPPCBSC controller and PID controller is shown in Figure 1 to Figure 3: Fig 1. Roll channel tracks response curve Fig 2. Pitch channel tracks response curve Fig 3. Yaw channel tracks response curve The comparison of attitude Angle tracking response curves between the ESO-NPPCBSC controller and the ESO-BSC controller is shown in Figure 4 to Figure 6: Fig 4. Comparison of roll Angle ESO-NPPCBSC and ESO- BSC 0 0.5 1 1.5 2 2.5 时间[/s] 0 0.02 0.04 0.06 0.08 0.1 0.12 滚 转 角 [/ ra d] PID ESO-BCPPC 控制输入 0 0.5 1 1.5 2 2.5 时间[/s] 0 0.05 0.1 0.15 俯 仰 角 [/ ra d] PID ESO-BCPPC 控制输入 0 0.5 1 1.5 2 2.5 时间[/s] 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 偏 航 角 [/ ra d] PID ESO-BCPPC 控制输入 0 0.2 0.4 0.6 0.8 1 时间[/s] -0.1 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1 滚 转 角 [/ ra d] 无预设性能 有预设性能 预设性能上界 预设性能下界 55 Fig 5. Comparison of pitch Angle ESO-NPPCBSC and ESO-BSC Fig 6. Comparison of yaw Angle ESO-NPPCBSC and ESO- BSC The experimental results show that, compared with PID controller, the attitude Angle tracking response curve of the four-rotor UAV based on ESO-NPPCBSC controller has faster response time, smaller overshoot and shorter adjustment time, and the convergence time can be manually specified by adjusting preset performance parameters. Compared with the ESO-BSC without preset performance, the attitude Angle tracking response curve of the four-rotor UAV using the ESO-NPPCBSC controller can be limited within the envelope of preset performance, and the static difference after reaching the steady state is relatively small. References [1] GIERNACKI W J E. Minimum Energy Control of Quadrotor UAV: Synthesis and Performance Analysis of Control System with Neurobiologically Inspired Intelligent Controller (BEL BIC) [J]. 2022, 15(20): 7566-7566. [2] SELVARAJ R, KUTHADI V M, BASKAR S J A J. Real‐time agricultural field monitoring and smart irrigation architecture using the internet of things and quadrotor unmanned aerial vehicles [J]. 2023, 115(1): 1-20. [3] SONG Y-H, KIM D-K J J O T K S F A, SCIENCES S. Development of Coaxial Propeller Test Facility and Experimental Study on Hover Performance Characteristics for Drone [J]. 2018, 46(1): 59-67. [4] GIERNACKI W, GOŚLIŃSKI J, GOŚLIŃSKA J, ESPINOZA-FRAIRE T, RAO J J E. Mathematical modeling of the coaxial quadrotor dynamics for its attitude and altitude control [J]. 2021, 14(5): 1232-1232. [5] ZARRI A, DELL'ERBA E, MUNTERS W, SCHRAM C J A S, TECHNOLOGY. Aeroacoustic installation effects in multi- rotorcraft: Numerical investigations of a small-size drone model [J]. 2022, 128: 107762. [6] XIONG L, TANG G J O L. Multi-object tracking based on deep associated features for UAV applications [J]. 2023, 19(2): 105-111. [7] SUN Z, LIANG L, GAO W J I J O I S. Prescribed performance dynamic surface fuzzy control for strict‐feedback nonlinear system with actuator fault [J]. 2022, 37(12): 11692-11712. [8] Dalwadi Nihal,Deb Dipankar,Kothari Mangal,Ozana Stepan. Disturbance Observer-Based Backstepping Control of Tail- Sitter UAVs[J]. Actuators,2021,10(6): 119-119. [9] MA T-N, XI R-D, XIAO X, YANG Z-X J M. Nonlinear Extended State Observer Based Prescribed Performance Control for Quadrotor UAV with Attitude and Input Saturation Constraints [J]. 2022, 10(7): 551-551. [10] ALLAHVERDY D, FAKHARIAN A, MENHAJ M B J J O E E, TECHNOLOGY. Back-stepping integral sliding mode control with iterative learning control algorithm for quadrotor UAVs [J]. 2019, 14: 2539-2547. [11] RODRíGUEZ-ABREO O, GARCIA-GUENDULAIN J M, HERNáNDEZ-ALVARADO R, FLORES RANGEL A, FUENTES-SILVA C J E. Genetic algorithm-based tuning of backstepping controller for a quadrotor-type unmanned aerial vehicle [J]. 2020, 9(10): 1735-1735. [12] Chen Yanjie, Liang Jiacheng, Wu Yangning,Miao Zhiqiang, Zhang Hui, Wang Yaonan. Adaptive Sliding-Mode Disturbance Observer-Based Finite-Time Control for Unmanned Aerial Manipulator With Prescribed Performance. [J]. IEEE transactions on cybernetics,2022. [13] ARDEMA M D. Newton-Euler Dynamics [M]. Springer Science & Business Media, 2004. [14] Seongik Han. Non-Transformed Prescribing Performance Function and Finite-Time RISE-Based Tracking Control for Euler-Lagrange Systems[J]. IEEE Access,2020, PP(99): 1-1. [15] ZHANG Y, WANG S-H, CHANG B, WU W-H J A S, TECHNOLOGY. Adaptive constrained backstepping controller with prescribed performance methodology for carrier-based UAV [J]. 2019, 92: 55-65. 0 0.2 0.4 0.6 0.8 1 时间[/s] -0.1 -0.05 0 0.05 0.1 俯 仰 角 [/ ra d] 无预设性能 预设性能上界 有预设性能 预设性能下界 0 0.2 0.4 0.6 0.8 1 时间[/s] -0.15 -0.1 -0.05 0 0.05 0.1 偏 航 角 [/ ra d] 无预设性能 预设性能上界 有预设性能 预设性能下界