Attitude and Altitude Control of Unmanned Aerial-Underwater Vehicle Based on Incremental Nonlinear Dynamic Inversion

A vehicle able to navigate both in the air and underwater is referred to an unmanned aerial-underwater vehicle (UAUV). Aiming at the attitude and altitude control of UAUVs, an incremental dynamic inverse control (INDI) method with second-order low-pass filters is proposed. Based on the underwater motion model of an UAUV and the incremental attitude control model, the relationship between thrust increment and angular acceleration increment is obtained through Taylor series expansion and angular acceleration feedback. Subsequently, attitude and altitude controllers based on nonlinear dynamic inversion (NDI) and INDI are designed and their robustness is analyzed. By introducing second-order low-pass filters at the part of control and feedback, the accuracy of the angular acceleration estimation is improved and the time synchronization of the control system is ensured. Simulation results demonstrated that when introducing external disturbances and uncertainties, the INDI control with second-order low-pass filters proposed in this article can track the reference signal faster and more accurately than the NDI control.

as stealthily as a UUV. In recent years, increasing attention has been paid to UAUVs, since they have great value for military and civilian applications [3], [4].
However, due to the huge differences in the physical properties between air and water, it is a great challenge to design a vehicle capable of both air flight and underwater navigation, especially concerning the power system, configuration, dynamics, and control. According to the existing literature, fixed-wing [5]- [7], variable-swept wing [8], [9], flapping wing [10], and multi-rotor systems [11]- [17] for aerial and underwater navigation have been proposed. Drews et al. [11] evaluated the controllability, payload/vehicle volume, environment switch-over, and structure modification of aerial and underwater vehicles. It was concluded that multi-rotor aircrafts have simple mechanical structure, strong environmental adaptability, and mature aerodynamics model, while their multi-rotor configuration is the best choice for amphibious vehicles.
There are still many difficulties in designing an aerial-submersible vehicle that can completely adapt to two VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/  different fluid media, i.e., water and air. However, many countries and scientific research institutions have invested a lot of money and manpower to perform research with great application prospect and value. Relevant technical achievements and prototypes have sprung up, verifying the feasibility of integrating UAVs and UUVs on one platform. This has significantly stimulated and promoted the development of UAUVs.
For the development of an UAUV prototype with a multirotor configuration, Drews et al. [11] proposed a hybrid unmanned aerial-underwater vehicle with a quad-rotor configuration to verify the feasibility of water-air crossing motion. Alzu'bi et al. [12], [13] demonstrated the feasibility of single-layer propellers to achieve both air and underwater motion, and designed a prototype named LOON COPTER incorporated with an active buoyancy adjustment device. Experimental results demonstrated that the LOON COPTER was capable of seamless air-water transition. Mercado et al. [14], Mercado Ravell et al. [15], and [14] proposed an aerial-underwater vehicle with an octo-quadcopter configuration, named NAVIATOR. The trajectory tracking and attitude control systems of the above three UAUVs were controlled by PID, and the air flight, underwater navigation, and seamless transition functions were conducted successfully. Ma et al. [16] proposed a hybrid unmanned aerial underwater vehicles (HUAUV) with a group of aerial propellers and a group of underwater propellers, and designed an attitude and depth controller based on the Lyapunov stability theory and adaptive sliding mode dynamic surface control. Lu et al. [17] designed an attitude and depth controller based on a robust adaptive technique and adaptive dynamic surface control.
Both the NAVIATOR and the LOON COPTER use aerial propellers, which enable them to operate both in the air and underwater. Under the premise of satisfying the aerial flight,  the above two can reduce the drag force during underwater motion to the greatest extent. A previous study [18] revealed that when the air propellers are used directly for underwater navigation, they lead to very low efficiency and the navigation speed is far lower than that when using underwater propellers. The HUAUV designed by Ma had two control boxes, which induced significant resistance to underwater navigation. Therefore, in this article, a UAUV is proposed, which adopts a two-layer layout with four aerial and four underwater propellers located in the upper and lower of the UAUV, respectively. Each propeller has the ability to generate force and torque independently. The conceptual diagram of the UAUV is shown in Fig. 5 (left), where the eight cantilevers extend from the fuselage and are integrally formed. The control circuits and components are installed centrally in the fuselage, and the circuit wiring is in the cantilever. To verify the feasibility of the product, a proof-of-concept UAUV, shown in Fig. 5 (right), was designed and produced. In Fig. 5 (right), the uppermost layer is the image recording device, and the middle layer is the control box. Since the battery needs to be frequently disassembled, replaced, and charged, it was installed separately at the lower part of the control box.
Researchers have conducted a lot of research on attitude control of UAVs and UUVs, and have proposed many typical control strategies and methods, such as PID control [19], sliding mode control [16], feedback linearization control [20], [21], and backstepping control [22], etc.
For the UAUV, its special task may need to control the attitude and height at the same time, so as to realize the hover of Altitude Hold and Attitude Hold, such as underwater detection, search and rescue, underwater live broadcast and so on. As an important part of the feedback linearization theory, nonlinear dynamic inversion (NDI) has been widely used in aircraft and missile control systems. NDI control simplifies the design of the control law by eliminating the non-linearity of the intermediate link. However, NDI relies on an accurate model of the controlled system. When the parameters of the controlled system change, its robustness will deteriorate. In order to eliminate the dependence of NDI on the model, many researchers have improved the NDI control method, proposing an incremental nonlinear dynamic inversion (INDI) control method. The dynamic equation of the system in the NDI control method can be expanded by Taylor series, and based on the time-scale independence principle, the change of the state vector is ignored, and then, the control equation in incremental form can be obtained. In flight control systems, the angular acceleration, which is the feedback input of INDI control, cannot be measured directly. It is very critical and important to accurately determine or estimate the angular acceleration of the vehicle in real time and add this information in the design of the INDI controller. Yin et al. [23] introduced the Kalman filter to ensure the accurate and real time estimation of the angular acceleration. In order to solve the problem of aircraft maneuvering at a high angle-of-attack, Zhou et al. [24] used a dynamic compensation method for the actuators and control variables, designed an incidence angle and angular rate increment controller, and solved the problem of introduced delay during state derivative filtering. Dong et al. [25] introduced a fast-tracking differentiator in a missile overload control system, in order to solve the problem that the state derivative cannot be measured directly. Based on the angular rate and its reference values, Sieberling et al. [20] proposed a linear prediction filter that predicts the angular acceleration, and solves the problems of time delay and angular acceleration availability. Grondman et al. [21] introduced a second-order low-pass filter in the angular acceleration channel and a complementary filter in the speed channel, developed a flight control law, and verified through flight tests that the performance of INDI was significantly better than that of NDI.
In this study, an attitude control method based on INDI is proposed. From the engineering application perspective, a second-order low-pass filter is added to the input and output simultaneously, ensuring time synchronization of the control system and solving the problem that the angular acceleration cannot be measured directly. On this basis, the relationship between thrust increment and angular acceleration increment is derived. In the attitude controller, the angular velocity is used as the control feedback, while the thrust increment generated by the rotor is used as the control variable. The simulation results demonstrated that the INDI control method with the second-order low-pass filter has better robustness against external interference and uncertainty than the NDI control method.
The rest of this article is organized as follows. Section II introduces the mathematical model of the UAUV during underwater navigation, including the force acting on the UAUV and coordinate frames. Section III describes the basic principle, advantages and disadvantages of NDI and INDI control. Section IV applies NDI and INDI in the design of controller. Then the linear controllers and the command filtering and reference models are discussed. Section V shows the simulation results of the controller based on NDI and INDI. Section VI summarizes the paper.

II. MATHEMATICAL MODEL
Precise mathematical modeling is an important basis for the research on the design of control and guidance laws. In this section, based on the proposed UAUV structure, the forces during navigation are analyzed, and a six degree-of-freedom mathematical model is developed using the Newton-Euler method.

A. COORDINATE FRAMES
To facilitate the description of the UAUV motion, in this article, an Earth-fixed frame and a body-fixed frame are selected as the reference systems, with the origin of the body-fixed frame being on the center of buoyancy (CoB), as shown in Fig. 6.
The UAUV motion parameters are defined according to the selected reference system. The parameters in the Earth-fixed frame are defined as follows: position P = (X , Y , Z ) T , velocity V E =Ṗ = (Ẋ ,Ẏ ,Ż ) T , attitude angle = (φ, θ, ψ) T , and angle rate E =˙ = (φ,θ ,ψ) T . The parameters in the body-fixed frame are defined as follows: linear velocity V B = (u, v, w) T and angular velocity B = (p, q, r) T . The transformation relationship of the linear velocity and angular velocity between the Earth-fixed and body-fixed frames can be expressed as follows: where R E B and T E B are the rotation matrix, as shown at the bottom of the page.

B. MATHEMATICAL MODELS
In order to simplify the mathematical model, the following assumptions are made: Assumption 1: The UAUV is symmetrical about the xy-and xz-planes. Under this assumption, the following relationship holds: I xy = I yx = I xz = I zx = I yz = I zy = 0.
Assumption 2: The center of gravity (CoG) coincides with the CoB. Since the UAUV is slightly negatively buoyant, the gravity is greater than buoyancy. Since the origin of the body-fixed frame is on the CoB, the following relationship holds: Assumption 3: The CoG and the center of each propeller are in the same horizontal plane, which means that the Z coordinate of the propeller center in the body-fixed frame is 0.
The dynamic equation of the UAUV in the body-fixed coordinate is given by: In the following segment, for the convenience of descrip- The hydrodynamics concerning the UAUV can be divided into two parts: rigid body (the UAUV in this paper) and fluid.
According to [16], Eq. (1) can be rewritten as: where M RB denotes the mass matrix of UAUV, C RB (v) denotes the Coriolis-centripetal matrix of UAUV, f H is the total hydrodynamic forces and moments, and f T is the force and moment generated by thrusters. The matrices M RB and C RB (v) mainly depend on the motion state of the UAUV and the position of the CoG, and are defined in (3) and (4), as shown at the bottom of the next page, where m denotes the mass of UAUV, I 0 denotes the moment of inertia, E 3×3 is a 3 × 3 unit matrix, R G denotes the vector from the origin of body-fixed frame to the CoG, and The hydrodynamic forces and moments of fluid are presented as where M A denotes the added mass matrix, C A (v) denotes the Coriolis-centripetal matrix of fluid, D (v) denotes the hydrodynamic damping matrix, g (η) denotes the restore force matrix.
When UAUV navigates at a low speed in a deep zone, the influence of waves can be ignored, and the added mass and the hydrodynamic damping force can be regarded as a constant matrix. The added mass matrix and the Coriolis-centripetal matrix are given by where Xu and Yv and so forth denote the added mass coefficients. The matrix C A (v) is related to the added mass coefficients and the current motion state of the UAUV. When the UAUV navigates underwater, the hydrodynamic damping force is usually highly coupled and nonlinear.
In addition, the damping force is related to many factors, such as the geometry, Reynolds number, and UAUV relative speed. In general, the total damping force can be divided into a linear and a nonlinear part. When the UAUV navigates underwater at low speed, the linear damping force is dominant and the nonlinear can be ignored. Thus, the damping force can be simplified and determined by: where X u and Y v and so forth denote linear damping coefficient.
The restoring force includes gravity and buoyancy, and, in the absence of driving forces, it provides a balance to the UAUV. Gravity is only related to the mass of the UAUV, and is equal in the air and in the water. On the contrary, buoyancy depends on fluid density. Gravity and buoyancy act on the CoG and the CoB of the UAUV, respectively. For a fully submerged UAUV, the restoring force can be regarded as constant. Since the CoB coincides with the CoG, the value of the restoring moment is 0. Consequently, the restoring force and moment generated by gravity and buoyancy can be given by: In Eq. (9), G and B are the gravity and buoyancy, respectively, and are defined in the Earth-fixed frame.
The control force of the UAUV is the thrust and thrust moment generated by the underwater propellers. Their motion mechanism is exactly the same with that of the air propellers. It is usually simplified, and can be expressed as: where

III. INCREMENTED NONLINEAR DYNAMIC INVERSION
The nonlinear multiple-input multiple-output (MIMO) system can be expressed as: where x denotes the state vector, u denotes the input vector, and y denotes the output vector. The control law of NDI is: When the disturbance is taken into consideration, the state equation is: In Eq. (13), f (x) and g (x) represent model disturbance.
Implementing Eq. (12) in (13): From Eq. (14), it can be seen that the formulaẋ = v holds only when f (x) = g (x) = 0. Therefore, NDI relies on an accurate model of the controlled system. In care of parameter perturbation or uncertainty in the control system, the robustness of NDI control worsen [18], [19]. The nonlinear MIMO system (11) is expanded by a first-order Taylor series around the current operating condition near time '0', and the approximation ofẋ iṡ VOLUME 8, 2020 It should be noted that a change in input induces a change in moment, which directly affects the angular acceleration. On the other hand, the angular rate is affected only by the angular acceleration [24]. Therefore, when the principle of time-scale independence holds, the change in state is considered to be much slower than the change in control input for very small incremental time and fast control action, that is, (15) can be rewritten as follows: The inputs of the control system are Considering model disturbances, Eq. (16) can be rewritten as follows:ẋ By comparing Eq. (16) and Eq. (18), it can be found that f (x) is not included in the first term on the right side, due to the effect of f (x) is implicitly implied inẋ 0 . By substituting Eq. (17) into Eq. (18), the following expression can be obtained.ẋ where B = g (x 0 ) g −1 (x 0 ), and if g (x 0 ) = 0 holds, theṅ x = v. Virtual control, defined by v = k x ref − x , is introduced based on tracking errors. By using the Laplace transform on both sides of Eq. (19) and introducing the initial conditionẋ = sx, the following expression can be obtained: The transfer function of reference singal and the response can be obtained as follows: It can be seen from Eq. (21) that the transfer function of INDI control system does not change when f (x) and g (x) are perturbed and there is external interference. Thus, the INDI can overcome the weakness of the NDI, which depends on the precise controlled object model. Therefore, ifẋ 0 and u 0 are measurable for the nonlinear MIMO system, the controller based on INDI-based controller has the advantages of strong disturbance rejection, excellent decoupling and easy to guarantee stability.

IV. CONTROLLER DESIGN A. NDI CONTROL METHOD
According to Eq. (2), the force and torque required to complete the predetermined command can be obtained: Then according to the control allocation, the required force is distributed to the four thrusters.  with: It can be concluded that the force required by the UAUV to complete the predetermined command is closely related to the aerodynamic coefficient

B. VERTICAL ACCELERATION AND ANGULAR ACCELERATION
According to Eq. (2), the required vertical acceleration can be rewritten as follows: (24) Eq. (24) is linearizing by a first-order Taylor series around the previous operating condition (T = T 0 ), and the incremental vertical acceleration after simplification can be obtained as: According to the INDI theory mentioned in Sec.III, the thrust increment can be obtained by Eq. (25): where dT = T − T 0 . Moreover, it is assumed that the previous vertical accelerationz 0 and input T 0 can be obtained or estimated.
Similarly, the required angular acceleration can be obtained from Eq. (2): (27) where I = I 0 + I A , I A = diag Kṗ, Mq, Nṙ , and where L is the length of the UAUV arm, which is defined as the distance from any propeller to the CoG of the UAUV. Eq. (27) is linearizing by a first-order Taylor series around the previous operating condition T 0 and B0 , and the following expression can be obtained: Due to the time-scale independence principle, the contribution of thrust to angular acceleration increment is much greater than that of angular velocity. Therefore, when the sampling time is very small, it can be approximately considered that ( B − B0 ) ≈ 0, thus, Eq. (28) can be rewritten as: The thrust increment can be obtained as follows: By combining Eq. (26) and Eq. (30), the expression for thrust increment can be obtained as follows: Eq. (31) can also be written as: According to Eq. (32), (a) the INDI control system depends only on the equivalent mass and equivalent moment of inertia (MoI) of the UAUV (i.e., the sum of the mass of the UAUV and the additional mass of the fluid), the thrust coefficient, and the rotational moment coefficient. Unlike NDI, INDI does not rely on the accuracy of the aerodynamic parameters.
(b) The current input of the UAUV can be obtained according to its previous state and input. More specifically, the input of the current time is closely related to the motion state and control input of the previous time. Due to that the measured signal contains high-frequency noise, it is necessary to accurately extract the motion state and its derivative from the measured signal, i.e., filtering, which will be discussed in Section IV-D.

C. LINEAR CONTROLLERS
Considering the relative degree of the control system, the linear controller in angular acceleration works to the second-order time derivative, and the control law are designed as follows: In equation (33), ( * ) ref , * ref and * ref concern the reference model, and K * is positive number. The integral part K * s is added to the first term on the right side of Eq. (33) to ease manual control. In the control of vertical acceleration, compensation of the restoring force is introduced.

D. STATE ESTIMATION AND FILTERING
In practice, a signal can be measured directly by the sensor; however, its derivative needs to be extracted from the state. Due to that the measured signal contains high-frequency noise, the effect of noise will introduce complications if it passes directly through the differentiator. In addition, the tracking differentiator or observer will increase the complexity of the system. Therefore, starting from the engineering viewpoint, a second-order low-pass filter is used to obtain the approximate state and its derivative.
Nevertheless, due to the delay of low-pass filtering, a new error is introduced in the design of the controller. In order to eliminate the delay effect induced by the filter, the same filter is introduced for the input, ensuring that the feedback signal The second-order low-pass filter is introduced in the angular acceleration channel, which can be expressed as follows: Due to the effect of atmospheric turbulence on the velocity sensor, a first-order complementary filter is used in this study [23]. By combining the low-frequency part of the airspeed signal with its equivalent inertial high-frequency part, an accurate approximation of airspeed can be obtained.
The overall controller structure can be divided into an inner loop and an outer loop based on the time-scale independence principle (Fig. 7). Based on the error between the desired value and the actual value, the inner loop obtains the control allocation scheme through the calculation of the INDI controller, in order to derive the thrust and speed of each propeller. The main function of the outer loop is to control the attitude angle and altitude of the UAUV. The command signal is transformed through the filter into the reference signal and its derivative, and the desired inner loop control parameters are obtained through the linear controller. Another advantage of this approach is that the outer loop does not rely on the UAUV.

V. SIMULATION AND DISCUSSION
In this section, simulation were carried out to verify the performance of the designed controller. The parameters of the UAUV used in the simulation are listed in Table 1. In the following simulation, the attitude and altitude are set as (ϕ, θ, ψ) = (0, 0, 0) and z = 0, responsively.
When various disturbances and uncertainties were taken into consideration during navigation, the hydrodynamics coefficient was perturbed by 15%, and at the same time,  the sinusoidal function with energy of 5 and a period of 0.2 and the white noise with a correlation time of 0.1 s constituted the uncertainty in the simulation. Parameter perturbation is presented in Table 2. NDI and INDI were used to control the attitude of the UAUV. The simulation results are shown in Figs. 8-11.
The command signals are designed as follows: first, the UAUV rolls 10 deg to the right, then pitches 10 deg nose down, and then makes a 20 deg heading change. Finally, the UAUV roses to 2 m. Fig. 8 exhibits the controller performance under step commands on all four channels of pitch, roll, yaw, and altitude. In Fig. 8, there are four curves: the command signal, the reference signal, and the responses by the NDI and INDI. The command signal refers to the signal received from the ground station or the pilot. Due to that the low-pass filter will introduce a time delay in the command signal, the control signal is processed the same as the filtering stage in order to eliminate this delay, and the resulting signal is the reference signal. The other two curves are the tracking curves obtained when the system is controlled by NDI and INDI. It can be observed that when the reference signal of any channel changes, the other three channels can preserve its original state, which illustrates the better decoupling of NDI and INDI on three axes.
Both the NDI and INDI control can track the reference signal; however, the NDI method has errors that are difficult to eliminate. For example, the response of NDI to the yaw signal has errors relative to the target value (e.g., the target value is 20 deg, while the response is 19.7 deg). On the other hand, the INDI method can track command signals quickly and accurately, and is robust to interference.
The experimental investigation of the author's team found that the UAUV with quadrotor configuration is easier to achieve the function of air flight and water-entry crossing, but it is difficult to maintain the depth underwater. This is a very interesting phenomenon. Therefore, when only the attitude controller works, the UAUV can quickly and accurately track the reference signal of the attitude angle, but its height also changes continuously with the change of the attitude angle. At the same time, as a comparison, the attitude controller and altitude controller work together, and the reference command is set to: the altitude rises from 0 to 2 m at 60 s.
The two sets of simulation results are shown in Fig.9. By comparing the altitude changes in Figure 8, it can be found that, if only the attitude is controlled, the height of the UAUV changes with the change of the attitude angle, and when the attitude controller and the altitude controller work at the same time, the UAUV can follow the reference signal better at the same time. This is very important for the UAUV, because it may need to complete specific tasks underwater and to achieve Altitude Hold and Attitude Hold. Fig. 10 shows the angular acceleration of UAUV, where p, q, r are defined in the body-fixed frame, while the  Euler angle φ, θ, ψ in Fig. 8, are defined in the Earth-fixed frame. It can be found that when the yaw angle changes (t = 45 s), it causes a small change in p and q. It should be noted that this is not caused by coupling, but due to the transition of the angular velocity between the Earth-fixed frame and the body-fixed frame.
Based on the structure and working principle of the UAUV, the differential of the four thrusters generates pitching, rolling, and yawing moments. The pitching moment is determined by (T 1 + T 2 − T 3 − T 4 ) and L, and T 1 = T 2 , T 3 = T 4 holds only when UAUV has pitching motion, Similarly, the rolling moment is determined by (T 1 + T 4 − T 2 − T 3 ) and L, and T 1 = T 4 , T 2 = T 3 holds only when UAUV has rolling motion,. The yaw moment is determined by (T 1 + T 4 − T 2 − T 3 ), and T 1 = T 3 , T 2 = T 4 holds only when UAUV has yaw moment.
As can be seen from Fig.11, when using NDI control, the input changes greatly, and then needs to be adjusted slightly. However, when using INDI control, the input is relatively stable and the time required to achieve stability is relatively short.

VI. CONCLUSION AND FUTURE WORK
In this article, nonlinear dynamic inversion and incremental nonlinear dynamic inversion are employed for the attitude and altitude controller of an unmanned aerial-underwater vehicle for underwater navigation. The simulation results demonstrated that INDI control has a good decoupling ability and is independent of the UAUV. Moreover, it was proved that INDI is able to track the reference signal accurately and quickly, is more suitable for complicated navigation environments, and provides the designed controller with a more stable output.
Notably, during the transition through the air-water interface, the hydrodynamics, including the added mass, buoyancy, and drag force, change nonlinearly as the depth of the UAUV entering the water changes, which introduces huge challenges to the design of the controller. In future work, our group will apply the INDI control method to control UAUVs, aiming to accomplish air and underwater navigation, as well as seamless air-water transition.