Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 8, No. 1, 2024 58 Tracking Control Based on Model Predictive and Adaptive Neural Network Sliding Mode of Tiltrotor UAV Zijing Ouyang, Sheng Xu and Chengyue Su School of Physics and Optoelectronic Engineering, Guangdong University of Technology, Guangzhou Guangdong, 510006, China Abstract: As the low-altitude economy rapidly expands, the demand for UAVs is increasingly growing, and their operational scenarios are becoming more complex, with higher requirements for endurance and short-distance take-off and landing performance. Tiltrotor UAVs, characterized by vertical take-off and landing and long endurance, have attracted widespread attention for their potential applications. However, the dynamics and flight paths of tiltrotor UAVs are highly nonlinear, and traditional linear flight controllers cannot fully utilize the real-time performance capabilities of tiltrotor UAVs. Under the conditions of model uncertainty and input saturation in tiltrotor UAVs, traditional LOS+PID control strategies exhibit characteristics of insufficient responsiveness and excessive overshoot. To improve the performance of tiltrotor UAVs in completing path tracking tasks, we have developed a new control strategy. By establishing an error model for three-dimensional space path tracking, we propose a cascaded control strategy of motion controllers and dynamic controllers. The motion controller is designed based on model predictive control, generating a series of speed-limited signals. Then, in the dynamic controller part, an adaptive radial basis function neural network is used to estimate the model uncertainty caused by aerodynamic parameters to enhance its robustness. Finally, the proposed algorithm is compared with the LOS guidance method and PID controller through simulation experiments. The comparison results show that the proposed algorithm can improve the path tracking effect, increase the response speed, and reduce the overshoot. Keywords: Tiltrotor UAV; Model Predictive Control; Adaptive Neural Network Sliding Mode; Trajectory Tracking. 1. Introduction It is well-known that the dynamics of tiltrotor UAVs are highly nonlinear, with strong coupling between longitudinal and lateral dynamics. Therefore, the control issues of tiltrotor UAVs present new challenges to control engineers. However, with the rapid development of sensor technology, automatic control and microelectronics technology, energy supply, and communication technology in recent years, the design and manufacturing of tilt-rotor aircraft have achieved new breakthroughs. Many researchers have resumed the study of tiltrotor UAVs and have achieved many remarkable results. In 2007, Hoffmann G M introduced a trajectory tracking control scheme based on error decomposition, which divided the trajectory error into tangential and normal components, compensated by PI and PID controllers respectively. This approach enabled path tracking and speed adjustment of unmanned aerial vehicles (UAVs), providing temporal flexibility in their tracking performance [1]. In 2008, Bouktir Y proposed a trajectory planning method based on B-spline equations, which utilized nonlinear optimization to derive time-optimal trajectories, albeit requiring significant computational resources [2]. Mellinger D, in 2011, put forward a PD-based trajectory tracking control scheme that employed PD controllers for feedback control of the UAV's position and attitude, achieving precise trajectory tracking [3]. As research progressed, Sliding Mode Control (SMC) algorithms, known for their low model dependency and excellent robustness, have been widely applied in the control of quadrotor UAVs. For instance, Mofid and colleagues studied the position controller for quadrotor UAVs and implemented attitude stabilization using the Terminal Sliding Mode Control (TSMC) algorithm [4]. Reference [5] proposed an Elevator Aileron (EA) control method based on Linear Quadratic Regulation (LQR) for the short-period approximation of the longitudinal model of tiltrotor unmanned aerial vehicles. However, stability remains a primary concern for linear control techniques, especially during operations at high pitch angles. The model's uncertainties were not considered due to the difficulty in accurately modeling tiltrotor UAVs. To ensure robustness against model uncertainties, numerous studies have focused on control theories such as gain scheduling [6], adaptive control [7-10], Sliding Mode Control (SMC) [11,12], and neural network control [13]. Taking into account the constraints on control deflection and rate, reference [14] introduced a Model Predictive Control (MPC) algorithm to address the issues of depth tracking and attitude control for tiltrotor unmanned aerial vehicles. However, both algorithms are based on nominal models. Therefore, building on existing research, this paper integrates several algorithms including Model Predictive Control (MPC), Radial Basis Function Neural Network (RBFNN), and Adaptive Sliding Mode Control (ASMC). Chapter Two presents the kinematic and dynamic modeling of tiltrotor unmanned aerial vehicles. Chapter Three describes the error model, motion controller, and dynamic controller for tiltrotor UAVs. Simulation results are presented in Chapter Four, along with an evaluation of the overall performance of the controllers. Chapter Five concludes the paper. 2. Motion Modeling of Tiltrotor UAV In this paper, the lift of the tiltrotor unmanned aerial vehicle is generated by the combined forces of the engine thrust, the aerodynamic force provided by the wings, and the gravity of the vehicle itself. The mass of the tiltrotor UAV is mT=1.5kg. Due to the consideration of part universality in previous designs, the motors, electronic speed controllers, and propellers providing thrust to the tiltrotor UAV are of the same 59 model as those used in the quadrotor UAV discussed in this paper. The fuselage is equipped with four motors symmetrically distributed on both sides of the tiltrotor UAV, with each motor positioned at a distance of dT=600mm from the geometric center of the tiltrotor UAV, and the wing area being ST=720000mm2. Since the motors, electronic speed controllers, and propellers of the same model as those used in the quadrotor UAV are employed, the rotational radius of the propeller blades r, the propeller thrust coefficient, and the propeller torque coefficient cm are universal to the quadrotor UAV discussed in this paper. The rotational speeds of the four motors of the tiltrotor UAV are wT1, wT2, wT3, and wT4, respectively, with the tilt angles of motor 1 and motor 4 being adjustable and identical at angle α . To counteract the torque effect during flight, one pair of diagonally opposite motors rotates clockwise, while the other pair rotates counterclockwise, generating a reactive force through the rotation of the rotors on the motors, thereby providing power output. The body coordinate system for the tiltrotor unmanned aerial vehicle is designated as {T}. The origin TOT of the tiltrotor UAV's body coordinate system {T} is situated at the center of the UAV's fuselage, with the positive direction of the x-axis aligned with the UAV's forward direction, the z-axis perpendicular to the fuselage's belly plane and pointing downward, and the y-axis perpendicular to both the x-axis and z-axis, pointing to the right side of the quadrotor UAV's forward direction. The coordinate system {G} is defined as the terrestrial coordinate system. To facilitate calculations, the UAV's initial position is set as the origin GOG of the terrestrial coordinate system {G}, with the x-axis of {G} being horizontal to the ground and pointing east, the y-axis horizontal to the ground and pointing south, and the z-axis perpendicular to the ground. Fig 1. Definition of various coordinate systems. Consequently, the kinematic and dynamic models for the underactuated tiltrotor unmanned aerial vehicle are as follows: T T Tη =J v (1) T T T T T T Tv v f b     (2) Within this context, G G G T T T T T T T Tη z [ x y ]   is the position and orientation of the tiltrotor unmanned aerial vehicle within the {G} coordinate frame. The terms ( G G G T T T x y z ) and ( T T T    ) correspond to the position and orientation in the {G} frame, respectively. T T T T T T T Tv =[ u v w p q r ] is the vectors of translational velocity and angular velocity in the {T} frame. The velocities u, v, w along the x, y, and z axes of the {T} frame, respectively, and the angular velocities p, q, r represents the roll, pitch, and yaw rates in the {T} frame. The matrix JT represents the rotational transformation from the {T} to the {G} frame: G T 3 3 T G 3 3 T R 0 J = 0 W         (3) In this matrix, the forms of matrices G T R and G T W are as follows: T T T T T T T T T T T T G T T T T T T T T T T T T T T T T T T cos cos cos sin sin cos sin sin sin cos cos sin R cos sin cos cos sin sin sin cos cos sin cos sin sin cos sin cos cos                                         (4) T T T T G T T T T T T T 1 sin tan cos sin W= 0 cos sin 0 sin / cos cos / cos                   (5) The matrices T , T , T are as follows: Txx T T Tyy T Tzz T I m , I I I I                   , x y z T T l m n C C C1 ρS C2 C C                      , × G T T T T 3 1 0 R 0 m 0 g                       (6) The fT is the control vector: 60                   2 2 2 2 2 2 T1 T3 T2 T4 T T1 T3 2 2 2 2 T1 T3 T2 T4 T 2 2 2 2 2 2 2 T T1 T2 T1 T4 2 T3 2 2 t T1 T4 2 2 2 t T1 T4 T2 T T2 T4 3 T t m t t m c w +w c w +w cos w +w f sinα 0 - α+ -w +w cosα+w -w d w -w sinα w +w cosα-w -w d d -w +w sinα+ -w wc +w c c c cc osα-w +w                         (7) In this vector, the ct and cm denote the thrust coefficient and torque coefficient of the motor. The vector bT describes the uncertainty of tiltrotor UAV model. 3. Design of a Tilt-Wing UAV Controller based on Model Predictive Control and Adaptive Sliding Mode Control References In this chapter, we will employ two methodologies, Model Predictive Control (MPC) and Adaptive Sliding Mode Control (ASMC), for the design of controllers for tiltrotor UAV. Initially, a model based on flight path tracking error will be constructed. Subsequently, a kinematic controller utilizing MPC will be designed, along with a dynamic controller based on ASMC. To address uncertainties arising from modeling precision, this section will integrate Radial Basis Function (RBF) neural networks into the sliding mode control to estimate such uncertainties. Following this, we will simulate the flight performance of the tiltrotor UAVs using these controllers and conduct tests on waypoint tracking, straight-line path tracking, spiral path tracking, and wave path tracking. The objective of this chapter is to explore and understand how to formulate efficient and stable control strategies that enable precise execution of various types of flight maneuvers by tiltrotor UAVs through the application of MPC and ASMC methods. 3.1. Design of Kinematic Controllers for Tiltrotor UAV Based on Model Predictive Control Fig 2. Establishing the Frenet coordinate system. To track the desired trajectory, a Frenet frame {F} is established at the current point on the traced path. The directions of the unit tangent vector, unit normal vector, and unit binormal vector at the current point on the traced path are defined as the x, y, and z axis directions of the Frenet frame {F}, respectively. This coordinate system is used to develop a three-dimensional tracking error model. The origin P of the Frenet frame {F} is treated as a virtual target moving along the expected path, which the unmanned aerial vehicle (UAV) tracks. A controller is designed to stabilize the error to zero, as depicted in Figure 2. Referring to Figure 3-1, let s be defined as the distance traveled by point P along the traced path, cc as the curvature, and ct as the torsion. Then, the pitch rate and yaw rate of the Frenet frame {F} can be calculated according to the following equations: F t t Fq =c s=c u , F c c Fr =c s=c u , Fs=u (8) These equations facilitate the determination of the dynamic behavior of the UAV in relation to the desired path, enabling precise control strategies for trajectory tracking. The path tracking task can be transformed into the stability problem of the following system:           1 2 3 ucos cos tan cos / / / e x e ed d F e F e x e y e F e y e z e F e z e e e e e e F F e F e F F e d e ed e F e ed e F uk u u q z r y d x uk r x d y uk q x d z p q r r q r p p T q q q T q r r r T r p                                                                                           (9) And c o s ( c o s 1 ) /x e e ek     , cos sin /y e e ek    , sin /z e ek   . Therefore, the control system (9) can be considered as: , (10) In this context, T ] [ e e e e e e e e ex y z p q r  x represents the state variables, while T[ ] ed ed edu q ru denotes the input variables. T ] [ e e e e e e e e ex y z p q r  x constitutes an augmented error matrix comprising errors in position, orientation, and angular velocity. s At the equilibrium point, the control system given by equation (10) can be discretized as follows: 1 (11) In the context of discretization, matrices kA and kB correspond to the system matrix and the control input matrix of the state equation, respectively. Their specific forms are presented as: 61 16 26 35 66 69 1 2 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 / 0 0 0 0 0 0 0 0 0 1 / F F k F k F k k k Tr Tq A Tr A Tq A T A A T T T T                           kA , 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 / 0 0 0 / T T T T T                             kB , 16 26 35 66 69 1 tan Tcos / cos xk yk zk F Fk Fk TukA TukA TukA TqA A                                  (12) Within the model predictive control framework, where only new state variables are reselected, the state quantity ( )kx is defined as: ( ) ( ) ( 1) k k k       x x u (13) Consequently, future state variables can be expressed as:     2 1 ( 1) ( ) Δ ( ), ( 2) ( 1) Δ ( 1) ( ) Δ ( ) Δ ( 1), ( ) Δ ( ) Δ 1 , p p p c k k k k k k k k N N p k k k N N k k c k k k k k k k k k k N k k k N                        x A x B u x A x B u A x A B u B u x A x A B u A B u (14) In this context, it is stipulated that Nc