Tracking Control Based on Model Predictive and Adaptive Neural Network Sliding Mode of Tiltrotor UAV

: 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.


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][8][9][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.

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 m T =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 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 d T =600mm from the geometric center of the tiltrotor UAV, and the wing area being S T =720000mm 2 .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 w T1 , w T2 , w T3 , and w T4 , 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 T O T 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 G O G 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.Consequently, the kinematic and dynamic models for the underactuated tiltrotor unmanned aerial vehicle are as follows: 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 J T represents the rotational transformation from the {T} to the {G} frame: In this matrix, the forms of matrices G T R and G T W are as follows: The matrices T  , T  , T  are as follows: The f T is the control vector: In this vector, the c t and c m denote the thrust coefficient and torque coefficient of the motor.
The vector b T describes the uncertainty of tiltrotor UAV model.

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.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.

Design of Kinematic Controllers for Tiltrotor UAV Based on Model Predictive Control
Referring to Figure 3-1, let s be defined as the distance traveled by point P along the traced path, c c as the curvature, and c t as the torsion.Then, the pitch rate and yaw rate of the Frenet frame {F} can be calculated according to the following equations: 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: 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  Tcos / cos Within the model predictive control framework, where only new state variables are reselected, the state quantity Consequently, future state variables can be expressed as: Δ ( 1) In this context, it is stipulated that N c <N p .Herein, N p denotes the prediction horizon, while N c signifies the control horizon.In (14), the explicit forms of parameters and k C are detailed as follows: Consequently, the future output variable can be predicted as: .
The following results were obtained upon consolidation: Regarding the stability issue of the system, it is imperative to ensure that the predicted output remains as close to zero as possible within the forecasting horizon.The task of the Model Predictive Controller is to compute the optimal control vector ΔU , which minimizes the predicted output.The cost function J cost , chosen as the sum of terminal and input costs, is formulated as: cost J ( 1 ) ( 1 ) Δ ( ) Δ ( ) Wherein Q and R denote: Taking into account the constraints at each step, the optimization problem of MPC can be equivalently addressed through the solution of the subsequent quadratic programming: cost min J ( 1) ( 1) Δ ( ) Δ ( ) Upon entering the next sampling period, the MPC will reiterate the aforementioned process and recalculate the control signal based on the most recently measured state vector.

Design of Dynamic Controllers for Tiltrotor UAV Based on Radial Basis Function Neural Network Adaptive Sliding Mode Control
This section will present the development of a dynamic controller.The error variable and the sliding mode function are defined as: For the nonlinear uncertainty b T in the dynamics model of a tiltrotor UAV, an approximation using radial basis function neural networks is employed in the following manner: ) And the ε is the estimation error.The output of the radial basis function neural network is defined as  W represents the estimation of optimal weights, while * Ŵ W W    denotes the estimation error.Therefore, the control law for the kinematic controller of tiltrotor UAV can be designed as: And To validate the stability of the system with the added controller, we may select a Lyapunov function as follows: Since each term in formula (dd) is non-negative, it follows that 0 V   . Therefore, it is affirmed that the application of the controller results in the aileron dynamics system being progressively stable.

Simulation Experiment
This section will introduce the simulation results of the kinematic controller based on Model Predictive Control and the dynamic controller based on Sliding Mode Control in MATLAB.

Simulation Program Development
The control framework for the tiltrotor UAV is shown in  1.
Additionally, the control performance of the proposed controller is compared with that of a Line-of-Sight (LOS)+Proportional-Integral-Derivative (PID) controller.The specific configuration of the LOS+PID controller is as follows:

Straight Line Path Tracking
The purpose of this simulation is to test the fundamental performance of the designed controller and to verify whether the controller can accurately track a basic straight reference path.
The reference path for the straight-line path tracking simulation experiment is: 15 120 15 120 100 Through the execution of simulation experiment, this study has successfully gathered performance data pertaining to the trajectory tracking task of tilt-rotor unmanned aerial vehicles.
The positional changes of the tiltrotor UAV during the trajectory tracking task in the geodetic coordinate system {G} are illustrated in the figure: In the figure, the green curve represents the input target trajectory, which is defined within the geodetic coordinate system {G}.The red curve illustrates the actual positional changes of the tiltrotor UAV while performing a trajectory tracking task under the controller designed in this study.The blue curve depicts the positional changes of the tiltrotor UAV executing the trajectory tracking task under a controller based on the Line-Of-Sight (LOS) plus Proportional-Integral-Derivative (PID) control strategy.It is observable that the time taken for the tiltrotor UAV to reach the position on the target trajectory at the current moment using the controller proposed in this paper is similar to that when employing the traditional LOS+PID controller.However, the overshoot is greater when the traditional LOS+PID controller is utilized.
The velocity variations of the tiltrotor UAV during the trajectory tracking task within the geodetic coordinate system {G} are depicted in the figure: Variations in the magnitude of position errors for tilt-rotor unmanned aerial vehicles during trajectory tracking tasks within the geodetic coordinate system {G}: In the figure, the red curve illustrates the error between the actual path and the target trajectory of the tilt-rotor unmanned aerial vehicle when executing the trajectory tracking task with the controller designed in this paper.The blue curve shows the error between the actual path and the target trajectory when the tilt-rotor unmanned aerial vehicle is using a controller with a LOS (Line of Sight) + PID (Proportional-Integral-Derivative) control strategy for the trajectory tracking task.It can be observed that both the traditional LOS+PID controller and the controller designed in this paper can enable the tilt-rotor unmanned aerial vehicle to quickly converge the error with the target trajectory.However, the controller designed in this paper allows the unmanned aerial vehicle to complete the task with less energy consumption.
The simulation results presented above indicate that, in the task of straight-line path tracking, the controller designed in this study demonstrates advantages of faster response and quicker convergence rates when compared to controllers employing a LOS+PID control strategy.Consequently, it can be inferred that it exhibits superior performance in tracking basic straight-line reference paths.

Helical Curve Path Tracking
This segment of the simulation is designed to examine the actual performance of the developed controller and to verify its capability to effectively track common curved reference paths within a three-dimensional space.
The reference path for the helical curve path tracking simulation experiment is as follows: Through the execution of simulation experiment, this study has successfully gathered performance data pertaining to the trajectory tracking task of tilt-rotor unmanned aerial vehicles.
The positional changes of the tiltrotor UAV during the trajectory tracking task in the geodetic coordinate system {G} are illustrated in the figure 7.
In the figure, the green curve represents the input target trajectory, which is defined in the geodetic coordinate system {G}.The red curve illustrates the actual position changes of the tiltrotor UAV when performing the trajectory tracking task under the controller designed in this paper.The blue curve shows the position changes of the tiltrotor UAV when executing the trajectory tracking task under a controller with a LOS+PID control strategy.It is evident that the tiltrotor UAV reaches the current target position on the trajectory more smoothly with the controller designed in this paper compared to the traditional LOS+PID controller.
The velocity variations of the tiltrotor UAV during the trajectory tracking task within the geodetic coordinate system {G} are depicted in the figure: In the figure, the green curve represents the reference velocity obtained by processing the input target trajectory, which is defined in the geodetic coordinate system {G}.The red curve shows the actual velocity changes of the tiltrotor UAV when performing the trajectory tracking task under the controller designed in this paper.The blue curve indicates the velocity changes of the tiltrotor UAV when executing the trajectory tracking task under a controller with a LOS+PID control strategy.It can be observed that the controller designed in this paper enables the tiltrotor UAV to complete the task with a smoother response compared to the traditional LOS+PID controller.
Variations in the magnitude of position errors for tilt-rotor unmanned aerial vehicles during trajectory tracking tasks within the geodetic coordinate system {G}: In the figure presented, the red curve illustrates the error between the actual path and the target trajectory of the tiltrotor UAV when tracking the trajectory using the controller designed in this study.The blue curve depicts the error in the trajectory tracking task of the tiltrotor UAV when employing a controller with a LOS+PID control strategy.It is evident that compared to the conventional LOS+PID controller, the controller proposed in this paper significantly reduces the tracking error of the tiltrotor UAV.
The simulation results indicate that, in the task of following a helical path, the controller designed in this study exhibits advantages over the controller with a LOS+PID control strategy, including reduced overshoot and faster convergence.Consequently, it can be inferred that the proposed controller demonstrates superior performance in tracking common curvilinear reference paths in three-dimensional space.

Conclusion
This paper presents the kinematic and dynamic modeling for the tiltrotor UAV.Based on the established models, a control strategy for the tiltrotor UAV, which integrates Model Predictive Control (MPC) and Adaptive Sliding Mode Control (ASMC), has been implemented.The controller is designed utilizing a model established on the basis of path tracking errors, and it meticulously controls both kinematics and dynamics, enabling precise tracking of various flight paths.Furthermore, extensive simulation experiments were conducted to test waypoint tracking, straight-line path tracking, spiral path tracking, and wave path tracking.
In comparative simulation experiments, the designed controller was benchmarked against a controller employing a Line-Of-Sight (LOS) plus Proportional-Integral-Derivative (PID) control strategy.The experimental results demonstrate the significant superiority of our tiltrotor UAV control strategy, which leverages MPC and sliding mode control, in terms of both flight path tracking precision and stability, outperforming the LOS+PID control strategy.
The research work in this chapter not only enhances the stability and precision of tiltrotor UAV flying in complex environments but also showcases the considerable potential of Model Predictive Control and Sliding Mode Control in practical applications.These research findings lay an important foundation for the design and optimization of UAV flight control strategies in the future.

Fig 1 .
Fig 1. Definition of various coordinate systems.


is the position and orientation of the tiltrotor unmanned aerial vehicle within the {G} coordinate frame.The terms ( ) correspond to the position and orientation in the {G} frame, respectively.
control system (9) can be considered as: , 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 k A and k B correspond to the system matrix and the control input matrix of the state equation, respectively.Their specific forms are presented as: 26) In this context,  represents a constant, and it must satisfy the condition 0   .Given that all terms within the function are positive, it follows that 0 V  .Differentiating the Lyapunov function V with respect to time yields:

Fig 3 .
Fig 3.The control framework for the tiltrotor UAV To validate the control effectiveness of the kinematic controller based on Model Predictive Control (MPC) and the dynamic controller based on Radial Basis Function (RBF) Neural Network adaptive sliding mode control for tiltrotor UAV, it is necessary to conduct simulation experiments on MATLAB to demonstrate the efficacy of the final control strategy.In the simulation experiments, the initial values for the position, attitude, velocity, angular velocity, acceleration, and

Fig 4 .
Fig 4. The positional variations of the tiltrotor UAV

Fig 5 .
Fig 5.The velocity variations of the tiltrotor UAV In the figure, the green curve represents the reference velocity obtained by processing the input target trajectory, which is coordinated within the geodetic coordinate system {G}.The red curve in the figure indicates the actual velocity variations of the tilt-rotor unmanned aerial vehicle when executing the trajectory tracking task under the controller designed in this paper.The blue curve represents the actual velocity variations of the tiltrotor UAV when executing the trajectory tracking task under a controller with a Line of Sight (LOS) plus Proportional-Integral-Derivative (PID) control strategy.It can be observed that compared to the traditional LOS+PID controller, the controller designed in this paper enables the tiltrotor UAV to accelerate to the target velocity more rapidly while maintaining smoother movements.Variations in the magnitude of position errors for tilt-rotor unmanned aerial vehicles during trajectory tracking tasks within the geodetic coordinate system {G}:

Fig 6 .
Fig 6.The positional errors of the tiltrotor UAV

Fig 7 .
Fig 7. The positional variations of the tiltrotor UAV

Fig 8 .
Fig 8.The velocity variations of the tiltrotor UAV

Fig 9 .
Fig 9.The positional errors of the tiltrotor UAV