An Enhanced Incremental Nonlinear Dynamic Inversion Control Strategy for Advanced Unmanned Aircraft Systems

: A cascade control architecture was proposed for the control of advanced unmanned aerial vehicles targeted for operation inside conﬁned hazardous spaces. The aircraft of interest is a highly maneuverable system presenting highly coupled dynamics, enabling it to perform unique ﬂight maneuvers that no other aircraft can. To deal with the complexities inherent to such an aircraft, a novel nonlinear control architecture was proposed. Two outer loop NDI controllers and an inner loop INDI controller were employed for position/velocity and a4itude/rotation rate control, respectively. These controllers assist each other, enabling them to decouple the aircraft dynamics while coping with complex external disturbances. The obtained results demonstrate an eﬀective control of the targeted aircraft system to accurately track complex ﬂight maneuvers.


Introduction
Urban search and rescue (USAR) robots and drones have the potential to save lives and hold the promise to limit the monetary consequences of disasters.Specifically, numerous conferences and journal articles have highlighted the potential benefits of unmanned aerial vehicles (UAVs) for SAR operations, as well as the need for their further development.To reduce the number of casualties from urban disasters (among other things), new aircraft configurations and advanced control systems are needed to enable UAVs to fly and maneuver inside helicopter-impenetrable environments and cope with the associated aerodynamic disturbances that the aircraft might encounter inside hazardous spaces.This paper provides novel theoretical and practical control formulations for the next phase of UAV evolution.
To enable robots to navigate inside confined environments, there is also a need to increase their motion capabilities so that robots can penetrate and maneuver through geometrically complex 3D spaces (e.g., voids and crevices).Examples of suitable motions include pitch hover maneuvers and aerial manipulation.Aircraft having such capabilities would be beneficial to numerous other applications, including mining, construction, forestry (flying within tree-covered areas), and inspection tasks inside critical infrastructures.Although UAVs have been the subject of numerous developments, the biggest limitation to the widespread deployment of such systems for complex operations in restricted environments is their limited agility to move inside confined spaces while coping with the associated aerodynamic ground and wall effects.Therefore, improvements are needed to control new UAV designs formulated for complex autonomous maneuvers in tight spaces with high speed, complex trajectory tracking, and other aspects.

Literature Review
This paper presents a novel control architecture towards developing highly maneuverable UAVs, enabling them to perform agile maneuvers inside restricted GPS-denied spaces in the presence of a priori unknown disturbances and coupled aircraft dynamics.Due to the diverse applications of UAVs in a wide variety of areas, such as surveillance, environmental monitoring, drug delivery, and SAR, there has been a substantial body of work developing diverse control systems for the position and orientation (a.k.a.pose) of UAVs, as well as their trajectory and resistance to internal and external disturbances.Although such aspects have been extensively considered in past works, such mechanisms have mainly been developed for flying in open unclu4ered spaces which lack effectiveness inside the type of spaces that have been considered in this paper.For such unrestricted (open) spaces, different control methods have been developed, from classical linear [1][2][3] to adaptive [4], fuzzy [5], and multi-variable nonlinear control [6] approaches.These control methods have been mostly applied to typical rotorcraft (e.g., helicopters and quadrotors) and fixed-wing type aerial vehicles, with very li4le a4ention to new aircraft concepts.Such linear and nonlinear control methods have also employed numerous complementary techniques, including tools from the area of artificial intelligence (AI).
Due to the fact that aircraft systems (especially those targeted to fly inside clu4ered spaces) are affected by diverse aspects (e.g., propeller performance, changing atmospheric conditions, drag, etc.), many of which change over time and/or are based on the aircraft's motion, obtaining an exact mathematical model of aircraft for all flying conditions is practically impossible.Under such conditions, and knowing that most aircraft models are nonlinear, researchers have employed diverse processes to improve the aircraft representation while simultaneously enabling the model to facilitate for control development using model simplification techniques [7].Generating linear models based on the corresponding nonlinear models has enabled the use of simpler linear control techniques (e.g., PID, H_∞, and LQR).In the study published by the authors of [8], a feed-forward control algorithm that led to a Lyapunov function with asymptotic stability was developed.In the study published by the authors of [7], Funtoni et al. proposed a linearization-based technique to enable effective control of under-actuated mechanical systems in cases where either typical control mechanisms could not effectively be used, or when typical controllers (e.g., PID) severely limit the operational capabilities of aircraft restricted to fly under benign wind conditions).
Despite the success of previous controllers in controlling aircraft under typical flight missions (cruise, take-off, hover, etc.), such controllers have been proved to be ineffective when controlling UAVs performing untypical or aggressive flight maneuvers.Examples of such maneuvers include acrobatic flight maneuvers, such as hammerheads and lomcevaks (a family of extreme acrobatic maneuvers where the aircraft, with almost no forward speed, rotates on a chosen axes using the gyroscopic precession and torque of the rotating propellers).Furthermore, controlling aircraft under unexpected or changing flight conditions, such as flying under system failure and landing on an oscillatory moving ship deck (a common problem faced by military and maritime SAR operations), have been proved to be difficult.In the study published by the authors of [9], Marconi et al. proposed a control algorithm for landing VTOL (vertical take-off and landing) aircraft on an oscillatory deck ship using an internal model-based feedback dynamic regulator.Such a controller proved to be robust in the presence of uncertainties affecting the system; however, the controller was only analyzed in open spaces, with the aircraft performing typical flight maneuvers.Similarly, in trying to resolve such problems, other mechanisms have been proposed e.g., those published by the authors of [9][10][11].Olfati presented an algorithm with a smooth static state feedback approach for stabilizing a VTOL with a complex input [10].A simple Lyapunov analysis-based controller for a VTOL limited to perform simple maneuvers, such as take-off, hover, linear flight trajectories, and landing, was presented and assessed by the authors of [11].
In the study published by the authors of [5], Coza et al. provided a summary of UAV stabilization techniques aiming to identify effective tools to solve the problems of controlling UAVs having model uncertainties-a problem none of the previous developments could fully resolve.The observation of such a review led to the development of new adaptive fuzzy methodologies to control quadrotor helicopters in the presence of both model uncertainty and sinusoidal wind disturbances without the need for a (precise) mathematical formulation of the aircraft e.g., those published by the authors of [5,12].In the study published by the authors of [13], an adaptive nonlinear robust controller was designed to enable UAVs to follow desired tracking missions.Although such approaches have reduced the complexities associated with creating precise aircraft mathematical models, they require the use of arduous methods to find their needed control parameters (e.g., drag coefficients), requiring the control engineer to be highly knowledgeable in numerous areas outside the control domain, including computational fluid dynamics, engine/motor characterization, etc.To reduce such complexities, engineers have used fewer formal mechanisms to model the behaviour of aircraft, including AI methodologies.Similar to the study published by the authors of [5], an adaptive neural network control method was presented in the study published by the authors of [12] to stabilize the a4itude of quadrotor helicopters in the presence of model uncertainty and considerable wind disturbances.Morel and Leonessa [14] proposed a direct adaptive controller for altitude and Euler angels tracking of a quadrotor UAV in the presence of model uncertainties.Amiri et al. [15] proposed an integral backstepping control technique to control both the position and orientation of a highly maneuverable UAV, improving the stability of the vehicle, but no aerodynamic or other disturbance rejection was considered.A backstepping control approach combined with two neural networks to approximate aerodynamic uncertainties was used by the authors of [16].Xu and Ozquner proposed a combination of PID control for the fully actuated part of the dynamic model of UAVs, with a sliding mode controller for the underactuated part [17].
In the study published by the authors of [18], a sliding mode disturbance observer was presented as a robust flight controller of a quadrotor, which provided robustness to external disturbances, uncertainties of the dynamic model, and actuator failure.Similar to the study published by the authors of [18], researchers have proposed other control mechanisms to increase flight performance using robust adaptive fuzzy controllers, e.g., in the study published by the authors of [19], which have demonstrated satisfactory results against sinusoidal and other types of wind disturbances.Mokhtari et al. presented a robust feedback linearization method with a linear generalized H∞ controller with a weighting function that resulted in an improved overall robustness against disturbances and uncertainties [20].Dunfied et al. proposed the use of a pre-trained neural network to stabilize quadrotor UAVs while hovering without disturbances [21].In the work reported by the authors of [22,23], the capabilities of adaptive neural network controllers in VTOL aircraft stabilization were shown.Although promising and somewhat effective, most of the mentioned control developments have focused on the control of traditional unmanned aircraft (e.g., quadrotors, helicopters, and fixed-wing aircraft) executing somewhat simple flight maneuvers under the presence of simple external disturbances modelled as impulse and sinusoidal signals.Despite the satisfactory results of previous works, such approaches have not considered the control of new aircraft concepts that are currently being developed (e.g., supersonic and hybrid or transitional UAVs) [24][25][26][27].As a result, previously developed controllers provide somewhat limited control capabilities when applied to unconventional (complex) aircraft.Such control formulations have challenges to enable aircraft to perform complex (e.g., acrobatic) and stable maneuvers in the presence of rapidly changing disturbances, which are typically found when navigating inside confined spaces or under extreme weather conditions.
Based on the proliferation in the development of advanced unmanned aircraft targeted to be deployed in hazardous environments, there is a need to reduce the depend-ency on having accurate aircraft models required for control.Sensor-based control approaches have been formulated that are capable of dealing with model uncertainties.In such techniques, accurate knowledge of the system is exchanged with precise sensing of the system's dynamics, decreasing system identification efforts.A promising sensor-based strategy is the use of incremental dynamics (ID) techniques, which ease the generation of controllers that are less dependent on the system model e.g., that proposed by the authors of [28].The incremental nonlinear dynamic inversion (INDI) method, in particular, combined with a set of PID/PD controllers, has been successfully employed in the literature to control the a4itude and position of advanced tilt-rotor bi-copter drones, which cannot be fully controlled via traditional control formulations [28].
Although INDI has shown great promise for the control of novel (non-typical) aircraft subject to disturbances, INDI control remains sensitive to several model uncertainties.To deal with such characteristics, the original INDI control formulation has been combined with AI paradigms, such as artificial neural networks, and other mechanisms.The authors of [28] proposed a novel INDI with neural networks (INDI-NNs) control scheme to deal with inherent system model uncertainties.Numerous INDI control schemes have been developed with diverse objectives in mind, including position, a4itude, and trajectory tracking for diverse UAVs.In the study published by the authors of [29], an INDI controller for the 3D acceleration trajectory tracking of tail-si4er UAVs (capable of transitioning between VTOL and fixed-wing flight) was developed.The results presented by the authors of [30] show that INDI control is effective to control aircraft operating under diverse flight modes (e.g., VTOL and fixed wing), which is not possible, or at least very challenging, with other control mechanisms.By adding a sideslip controller to align the wings of a given aircraft with the sensed airspeed vector, this has provided the means to neglect the flight phase that the UAV is executing.Following such advances, Wang et al. proposed an incremental sliding mode control mechanism driven by a sliding mode disturbance observer (INDI-SMC/SMDO) based on the control structure of INDI.This developed controller has been shown to have the ability to passively resist a wider variety of faults and external disturbances using continuous inputs with lower control and observer gains [31].
Based on the cited works, INDI control formulations seem to be the most appropriate mechanism developed, thus far, for the control of advanced unmanned aircraft systems, especially those aircraft having coupled dynamics capable to execute complex flight maneuvers.When compared to other control formulations for either linear or nonlinear systems, the INDI control method is less dependent and less sensitive to model dynamics and model uncertainties, and therefore increasing both system robustness and flexibility with respect to changes in the aircraft's operation mode.Based on previous work conducted by our research group (e.g., the study published by the authors of [28]), an extension of previous INDI formulations for the control of highly maneuverable VTOL UAVs has been proposed in this paper to enhance the operation of such an aircraft targeted to operate inside GPS-denied confined spaces subject to aerodynamic ground and wall effects.This proposed control method decouples the control parameters, which reduces the time to compute a proper control signal and hence improves the performance of the aircraft.The controller was shown to be robust to external disturbances, capable of independent control of the system's coupled degrees of freedom, and convenient for independent position/orientation trajectory tracking subject to motion and state constraints.
The following sections of this paper are organized as follows: the nonlinear mathematical model of the aircraft of interest (termed the Navig8) is described in Section 3; the proposed dynamic inversion control method is described in Section 4, while Section 5 presents illustrative numerical simulations showing the performance of the proposed controller, followed by the conclusions in Section 6.

Flight Mechanism
The drone under consideration in this paper is a six degrees of freedom (DOF) tilt rotorcraft.Each of the aircraft's ducted or shrouded propellers which rotate in opposite directions have independent tilt angles, speed, and variable pitch angles.The aircraft also has a variable pitch propeller (VPP) tail rotor, which, in contrast to helicopters, produces thrust perpendicular to the horizontal reference plane of the aircraft, enabling the aircraft to perform pitch maneuvers (Figure 1).The thrust produced by each of the three propellers can be independently controlled in three possible ways: i) by changing the propeller's rotational speed ( , , and ), ii) by changing the propeller's angle of a4ack ( , , and ), and iii) a combination of "i" and "ii" (a combination of propeller rpm and VPP changes) via the control signals , , , , , and , which correspond to the propellers' speed and the angle of attack of the left, tail, and right propellers, respectively.Additionally, each of the two main (left and right) propellers can independently tilt by an angle , providing the capability for thrust vectoring.These characteristics result in the use of eight control signals ( , , and ), which provides the opportunity to control the aircraft in different ways via proper control allocation mechanisms.Optimal control allocation would also enable the aircraft to cope with internal failures (e.g., damage of the control) under a high reaction time in diverse ways.Due to the control allocation challenges that are available for the control of such an UAV, in this paper, we only considered controlling the thrust produced by each of the UAV's propellers via option "i" (i.e., keeping all parameters unchanged throughout the given mission).Controlling the UAV via options "ii" and "iii" will be the subject of a subsequent paper focusing on the corresponding control allocation formulations needed to determine the optimal use of the propellers' rpm, VPP, or a combination of both.As a result of the reduced control complexities employed in this paper, the UAV was left with five control inputs: , , , , and .In order to minimize the adverse aerodynamic ground and wall effects, which the UAV would experience when flying close to surfaces (e.g., ground), the two main propellers were set to have a constant dihedral angle, , (see Figure 2).Such a dihedral angle was determined from extensive CFD (computational fluid dynamics) analysis [32].The combination of the above-mentioned characteristics enables the aircraft to perform untypical flight maneuvers that other aircraft cannot execute, including pitch hover at angles within the range from −90° (nose down) to 90° (nose up).With effective control and mechanical design changes, these flight characteristics can be augmented to perform enhanced maneuvers, such as perching and inverted pitch hover maneuvers suitable for time-extended surveillance, as well as other critical missions inside dynamic cluttered spaces.
The drone, having a mass "m", can fly sideways, forwards, and backwards in diverse a4itudes using the five control inputs that were considered in this paper.The sideways motion (in the vehicle's "y" direction-see Figure 2) was achieved through generating a differential thrust/speed of the two (left and right) main (shrouded) propellers.The tilt angles, and , of such propellers were changed in equal amounts to achieve fore and aft motions (i.e., motion in the "x" direction).Tilting the angle of the propellers in opposite directions created the yaw motion (rotation about the vehicle's "z" axis).The described motions are, however, highly coupled, that is, requesting the aircraft to execute a given maneuver produces a side effect (sometimes undesirable) motion.Such coupled motions have been summarized in Table 1, where the number of Xs in each box denotes the degree of the corresponding coupled motions.For example, if the aircraft has been requested to execute a pure sideways (translational) motion, the differential rotational speeds of the main propellers needed to achieve such a motion also generate roll and yaw aircraft motions.Such coupled motions and the number of simultaneous motion(s) associated with the given (desired) motion have been described via the drone's mathematical model.

Dynamic Model
The Newton-Euler formulation was used to derive the system's dynamic model.Two frames of reference were used: an inertial reference frame, denoted by , and a body reference frame positioned at the center of mass of the UAV, denoted by , as shown in Figure 2.
In order to describe the rotation of the drone, the Euler angles (roll (ϕ), pitch (θ), and yaw (ψ)) were used and, therefore, the transformation matrix from the inertial to the body reference frame was defined by Equation ( 1) as: where c and s represent the cos and sin functions of the corresponding angle (e.g., = cos ), respectively.The matrix describing the relationship between the body's angular velocity (p, q, or r) and the rotational speed of the Euler angles was defined as per Equation (2): Due to the complexities related to the operational capabilities of the Navig8 UAV, the following three assumptions (Ak) and two constraints (Ck) were made to simplify the drone's equations of motion: (C1) The body reference frame and the aircraft center of mass are coincident.(C2) The aircraft's structure is symmetric to its XZ (longitudinal) plane, resulting in 7 89 = 7 :9 = 0.
(A1) All aerodynamic coefficients, such as drag and lift, remain constant throughout the given flight mission.(A2) The thrust, ; , generated by propeller I, is proportional to the square of its rotational speed.(A3) The trust and torque coefficients for each of the three propellers (i = 1, 2, or 3) is assumed constant, as described by Equations ( 3) and (4).
; < = =0 0 > ?@ A ? (3) and Where F ? and F ?D represent the propellers' trust and torque coefficients, and H specify the radius and footprint area of each propeller, and G denotes the air density.
Based on the previously mentioned aspects, the equations of the motion for the Navig8 can be expressed as Equation (5).
The terms , , , U, V, and W in Equation ( 5) denote the total forces and torques in the M, R, and S directions, respectively.Such terms were obtained as per Equation ( 6): where ), ^, , `, and d represent the corresponding orthogonal distances between the center of mass of the UAV and the left, right, and back propellers described by the vectors = 3), ^, 5, = 3−`, 0, −d5, and = 3), −^, 5, respectively, as illustrated in Figure 2. The five expressions provided in Equation ( 6), , , U, V, and W, define a coupled set of equations, which are simplified by defining the five control variables e , e , e , e f , and e g , as per Equation (7).
It is worthwhile to clarify that based on the assumptions and the drone's symmetrical geometry, the expression for is not involved in Equation ( 6).As a result, Equation ( 6) can be rewri4en as Equation ( 8): in which C is a fixed matrix defined by the physical characteristics of the UAV, as per Equation (8).Therefore, the control signals vector, U, can be calculated if the inverse of C exists, as represented by Equation ( 9) below.
Therefore, considering Equation ( 7), the five control inputs of interest are computed per Equation (10) as: tan j e e

Control Technique
The UAV's dynamic model can be represented in generic form of a nonlinear statespace system: where n q and p q represent the state and input transpose vectors, at time (, respectively: n q = =M, R, S, r, , , M% , R% , S% , r% , % , % A s p q = t , , , , By calculating the first-order Taylor series of Equation (11), Equation ( 11) can be wri4en as: in which n _ and p _ represent the state and input vectors of the system at the previous time step, (y _ ), respectively.An INDI description of a system described by Equation ( 12) is possible under the following two assumptions: (a) The state of the UAV and input, p, are bounded, and the function o is continuous.(b) The amount of time that has passed between n _ and n (sampling time) is sufficiently small.By using a small sampling time (assumption b) and employing high performance actuators in the drone, the changes in the state of the UAV (∆n) with the given time step can be considered negligible (i.e., ∆n = n − n _ ) with respect to the large changes in the input parameters represented as (∆p = p − p _ ), given that state changes arise as a result of the integration of input changes and are, therefore, slower.
The assumptions listed above imply that the difference (n − n _ ) can be considered negligible (ignored) and therefore, Equation ( 12) becomes: To be efficient, this INDI approach requires a suitable timescale separation, which was considered as 0.01 s in this paper.To achieve the required timescale separation, the approach taken in this paper was to employ a combination of NDI, INDI, and PID controllers, forming an inner and outer loop control strategy, as illustrated in Figure 3.The developed control architecture can be applied to diverse aircraft systems, especially those with complex dynamics operating in the presence of internal (e.g., system failures) and/or external disturbances (e.g., wind gusts).Overall, the controller would receive, as a control input, a desired path/trajectory to follow, which includes the desired position (M { , R { , S { ), orientation ( { , { , { ), and time conditions, defining the UAV's maneuvers from where the required control signals will be computed.

The A itude Controller (INDI)
For the INDI a4itude controller, the state of the drone was defined as a subset of the state variables used in Equation (11).Such a subset, M̅ ∈ M, comprises the roll, pitch, and yaw Euler angles and the corresponding rotational speeds 3 , 0, and 5, as described by Equation ( 14), where 4 = t , , u ?, Ω = t , 0, u ?, and e € = te , e , e u ?have been defined based on Equations (8-9) and the dynamic equations of the system (e.g., Equation ( 5)): It is important to note that the lateral (sway) motion of the UAV is highly coupled with the roll angle of the body (see Table 1).The result of such coupled motions is that the UAV cannot perform pure lateral movement without rolling and vice versa.The additional coupled effects, as represented in Table 1, are manageable and can be decoupled and be precisely controlled.Therefore, for the proposes of this paper, the roll angle was not considered as a controllable state, but it was used as an input to reach a desired lateral translation.
From Equation ( 14), one can map the state vector, M̅ , to the Euler angles of the UAV, 4, via a transformation matrix ƒ, as per Equation ( 15): Since the first-order time derivative of the control variable vector, 4 = t , , u ?, is not directly related to the control input vector, e €, the relationship between the input and output variables was determined through obtaining the second-order derivative of the control vector, 4, as shown in Equations ( 16) and ( 17): Considering Equation ( 17) and the dynamic equations of the UAV, Eqns.(5-7), one can define 4 N as a function of M̅ and e €, as shown in Equation (18).From this formulation, and following Equation ( 11), the INDI controller can be formulated by performing a Taylor series expansion in the current time step, (, as described in Equation ( 19): Using o3M̅ _ , e € _ 5 = 4 N _ as the angular acceleration measurement of the UAV at the previous time step, ( − 1, a very short measurement sampling time (∆() can be used, given that the actuator dynamics are faster (as per assumption b).Then, it is reasonable to further consider 3M̅ − M̅ _ 5 ≈ 0 when compared to the changes in the control output, ∆e € = 3e € − e € _ 5.In these circumstances, the simplified expression shown in Equation ( 20) can be used to obtain the control law: Solving for ∆e € from Equation ( 20) results in ∆e € = C3M̅ _ , e € _ 5 j 34 N − 4 N _ 5, where the matrix C3M̅ _ , e € _ 5 represents the partial derivative matrix of function o ‡ with respect to the control inputs of the system, e €, resulting in: With the above formulations, it is possible to effectively compute the control inputs (i.e., U, V, and W) based on the vehicle's angular acceleration measurements taken at time step ( − 1.Thus, Equations ( 20) and ( 21) represent the a4itude (orientation) INDI controller, which guides the UAV on how to a4ain the desired orientation at a given position 3M, R, or S5 when following a desired path.As a result, the desired orientation behavior of the aircraft was not significantly affected when the slower dynamics of the model were ignored (which will be described in Section 6).

The Position Controller (NDI + INDI)
The controller designed to control the aircraft's orientation (i.e., yellow boxes in Figure 3), provides the torques 3U, V, and W5 required to orient the aircraft.Such torques can then be used in combination with the forces 3 and 5 needed to position the aircraft at a specific point 3M, R, or S5 to generate the control signals needed to maneuver the UAV.As illustrated in Figure 3, a position controller must be formulated to provide such forces that will enable the UAV to track the desired path, which includes the position and orientation information.The aircraft's translational movement control was achieved via a combination of an NDI and INDI (INDI + NDI) control strategy (blue boxes shown in Figure 3), where the NDI port is responsible for controlling the lateral motion, while the INDI port focuses on computing the and forces that need to be applied to the aircraft through the control of the propeller's thrust vectoring ability.Such a strategy enables to manage the coupled motions of the aircraft described in Table 1.Specifically, the proposed controller was targeted to reduce the coupled translational motions taking place in the M − S (longitudinal) plane of the aircraft.That is, the position controller aimed to decouple the surge and heave motions of the aircraft.An NDI controller was employed for the lateral (sway) movement, and an INDI controller was developed for the movements in the M − S directions (heave).For altitude regulation in the M − S plane, the control inputs e f and e g were used.However, there was no direct control input within the vector U (Equation ( 7)) for the side movement.Thus, a differential thrust/speed of the propellers was used to provide the required lateral motion.Therefore, finding the required roll angle, , was required to generate the desired lateral motion in terms of the aircraft's R position and its rate of change, R% .In turn, the computed roll angle was provided as one of the three inputs for the a4itude controller.To enable the NDI controller to cope with disturbances (in the R direction), a sigma-pi neural network (NN) adaptive compensator was used to correct modeling errors and overcome the tendency of NDI controllers to be sensitive to the dynamic model's accuracy [28,33].
The INDI position controller for the M and S aircraft motions was developed using a similar approach of the a4itude controller (Section 4.1).For the position controller, however, a two-layer architecture was used.An INDI formulation was used to cancel the nonlinearities associated with the linear dynamics of the system and generate the control signals for the M and z positions of the UAV.In addition, NDI was employed for the lateral (position) motion.

The Position INDI Controller
For the position INDI controller, a virtual control variable, e Ž, defined as per Equation ( 22), was used.
Considering the dynamic model of the system in the M − S direction, Equation ( 23), and defining the states variables M and S as vector M Ž, the second-order time derivative of matrix M Ž for the INDI position controller was given as per Equation ( 25): in which •3M Ž _ , e Ž _ 5 is defined by Equation ( 26).

The Position NDI Controller
As previously mentioned, due to the high coupling between the roll angle, , and the position in the y direction, it is not possible to independently control both parameters at the same time.Thus, a variable, e -, (Equation ( 28)) was defined, which enables the design of an NDI controller to control the UAV's lateral motion.The output of this controller block, { , was fed to the a4itude control block, which will control the lateral motion of the drone.
e -= +* Following the process used in Section 4.1, the second-order time derivative of the side motion of the drone's mathematical model, R, for the NDI position controller used the corresponding formulation in Equation ( 5), where the term +* has been replaced with e -, as shown in Equation ( 29): A virtual control input, š, can then be chosen as š = RN if `d(3 T3 55 ≠ 0. e -= T345 j 3š − '3455 An accurate description of the functions ' and T within Equation (30) was required to cancel all model uncertainties and cross-couplings in the system.However, an exact cancelation of nonlinearities is practically impossible.Therefore, a sigma-pi neural network (NN) was used to compensate the uncertainties.Such a NN is represented as a NN adaptive compensator in Figure 3, which processes nine inputs (i.e., M _ , R _ , S _ , M { , S { , d, š oe{ , , and 5 plus a set of three Kronecker values 3 , , 5 (defined later in this document in Equation ( 37)), where M _ , R _ , and S _ represent the position of the UAV in the previous time step, and d = R •ž − R _ defines the error between the reference model and the lateral position of the UAV in the previous time step.From the defined error and the Kronecker values, the sigma-pi NN generates š oe{ , which adaptively compensates the input produced via the NDI controller, which operates under the assumption that the mathematical model of the system is accurate.
As a result, the sigma-pi NN compensates the inversion error with a real-time pseudo control signal, š oe{ , where the pseudo control command was generated as per Equation (32): where š •ž = RN is the reference model's pseudo control, and š Ÿ{ is the signal generated via a PD linear regulator (see Section 4.3), which is used to regulate the dynamic response of the system as per Equation ( 33): As a result, the dynamics of the model tracking error can then be described via Equation (34): where •, and B = • 0 1 ‚.

The Sigma-Pi Neural Network
In comparison to other neural networks, the sigma-pi NN [33] uses summation and quadrature neurons in its hidden layers, providing the ability to preserve the network's highly nonlinear mapping capability [34].Figure 4 depicts the single layer sigma-pi NN used in the proposed UAV controller as having three inputs and one output.The neural network's input/output map can be expressed as follows: where ¥ ?represents the weight coefficient matrix, and denotes the basis function vector, which is defined as per Equation ( 36): The "> ,*" denotes the Kronecker product operating on , , and , which are defined as follows: The corresponding weight error can then be expressed as follows: where ¥ * denotes the ideal set of weights.Thus, the model tracking error (Equation ( 34)) was wri4en as per Equation (39), and the update law for the NN was expressed via Equation (40).
The HurwiC matrix H < of Equation ( 37) ensures the existence of a unique ® < = ® < ?> 0, where the ® < matrix used in the developed controller is described as per Equation (41): The NDI + NN outer loop controller responsible for the slow dynamics of the UAV's R channel generates the state command for the inner INDI block as per Equation (42): r { = +* j 3 e -5. (42)

The PD/PID Controller
The altitude and position controllers described above, Equations 20, 27, and 30, were designed based on the second derivative of the position and a4itude states of the UAV, meaning that the controller has been developed to follow the second-order derivative of the desired trajectory (acceleration) of the aircraft.Therefore, in order to enable the UAV to follow the desired position/a4itude (trajectory), three proportional derivative (PD) controllers for a4itude (i.e., ®µ ¶ , ®µ • , and ®µ ¸ ) and three PID controllers (i.e., ®7µ ‰ , ®7µ -, and ®7µ ¹ 5 for position were used to map the pose error (the difference between the desired and measured poses in the previous time step) [35].Similar to that conducted by the authors of [28], the PD/PID gains were optimized using a non-dominated, sorting-based multi-objective evolutionary algorithm (MOEA) called the non-dominated sorting genetic algorithm II (NSGA-II).Two different objectives were followed: the integral of timeweighted absolute error (ITAE) performance index, and the integral of the square of the error (ISE), in which minimizing the first objective will provide good reference tracking and good disturbance rejection, while minimizing the second objective reduces the rise time.The final gain values used in the simulations are provided in Table 2.

Simulation Results
The final formulation for the controllers described in Section 4 (i.e., Eqs. 20, 27, and 30) were implemented and analyzed in the MATLAB/Simulink software.For this, the physical characteristics of a nine inch diameter-shrouded propeller's version of the Navig8 UAV were used based on previous research studies, i.e., the studies published by the authors of [15,25] (Table 3).PID gains were set as per Table 2, and the sampling time was set to 0.01 s.Overall, the controller received a desired path/trajectory to follow, which would include the desired position (M { , { , or S { 5 and orientation ( { , { , or { ) as a function of time, defining the UAV's maneuvers to compute the required control signals.From the physical characteristics of the UAV, the required parameters were computed.To analyze the performance of the controller, the UAV was commanded to execute standardized maneuvers considered fundamental in determining the flight performance (worthiness) of the rotorcraft as per that conducted by the authors of [36].Flight maneuvers included pure hover and sidestep, which the aircraft was able to perform as per flight regulations.
In what follows, however, we present the results of an untypical flight maneuver which illustrates the ability to use the developed controller to fly a highly maneuverable rotorcraft inside confined spaces by changing its a4itude according to the environmental conditions (e.g., confined space).

Test 1: Trajectory Tracking
In this first simulation, the aircraft (Navig8 UAV) was commanded to track the trajectory defined by Equation (43), which defines a set of movements within the aircraft's flying capabilities.Although this trajectory does not exemplify a confined space, it requires the UAV to change its a4itude in an untypical fashion (a maneuver that a helicopter pilot would not a4empt).
The UAV's initial state, including its position, orientation and their first derivatives (as per Equation ( 11)), was set as n _ t0,0,0,0,0,0,0,0,0,0u ? .It must be noted that n _ defines the state where the UAV is in a typical hovering maneuver position at a given a4itude "ℎ" from the ground where the frame of reference that defines the trajectory is defined (set).
The drone's position responses are shown in Figure 5, while its a4itude responses are shown in Figure 6. Figure 7 depicts the position and orientation followed in a 3D space.These results indicate that the developed trajectory tracking control approach was effective, showing a low RMS error in both position and a4itude control.Although at the start there was an error of 0.53 m between the desired R and the followed trajectory, the UAV was able to track the desired path for the rest of the trajectory.Such a maximum error occurs in a specific situation where the desired roll and lateral translations are somewhat in conflict.However, the controller effectively managed such conflicts and guided the UAV to complete the flight with sufficient accuracy to fly in confined spaces.
Similar results were obtained under diverse trajectories, including pure hover, pitch hover, climb, and descent.

Test 2: Disturbance Rejection
To assess/analyze the ability of the controller to deal with external disturbances, the UAV was commanded to follow the same trajectory as described in Section 5.1, where wind gusts and other disturbances were added.Here, however, we only present an illustrative example of exposing the UAV to horizontal wind gusts, having a maximum speed of 5 / with variable magnitude and direction (moderate breeze based on the "Beaufort Wind Scale" (see h4ps://www.weather.gov/mfl/beaufort(accessed: 14 August 2023).
Such a varying disturbance was implemented following the work conducted by the authors of [37], where the magnitude of the wind was defined by Equation (44) and the azimuth, Ã , of the blow point of the wind (Equation (45)) defined the direction of it, while random values were used to denote the changes in the wind's direction.The magnitude of the wind, Ä ¹ , can then be defined as a function of the altitude of the drone with respect to the sea level, S _ (Equation (44)).
In Equation (44), Ä ¹ x is the wind velocity measured at a4itude S _ , z is the current altitude of the UAV, and "®" is the index of the energetic profile, and in Equation (45), " Ã_ " is the azimuth angle in the previous time step, and " )*`" is a random function to create a random number between zero and one (rad).Therefore, the wind force in the x and y directions of the UAV's body frame of reference affecting the drone were calculated using Equation (46): where H 1.6 " 9.81 is the rate of converting the wind speed ( / ) into pressure (W/ ) [38], and P Å is the influence effective area.To ease obtaining the parameters H and P Å (Equation ( 46)), the Navig8 was modelled as a cubic body (Figure 8), which simplifies computing the total force of the wind disturbance and its distribution over the drone's fuselage.Although this is a very rough estimate, it allowed us to evaluate how well the controller held up to external, previously unidentified wind disturbances.From Figure 8, it was possible to compute the drone's surface area as per Equation (47): P Å‰ P É " sin3 5 " cos3 5 P Ê " cos3 5 " cos3 5 P Å-P É " cos3 5 " cos3 5 P Ê " sin3 5 " cos3 5 (47) where P É Ë ℎ ℎ is the drone's lateral surface area, P Ê Ë ℎ ℎ is the UAV's face area, ℎ , ℎ , and ℎ are the cubic dimensions, as shown in Figure 8, and Ë and Ë are the fill features of the base cube, as shown in Figure 8. Figure 9 shows the obtained magnitude and direction (azimuth, Ã ) of the wind affecting the UAV over time.As shown in Figure 9a, the wind velocity has points where the wind declines (to a value of 2.1 / ), after which it gradually increases to a max value of 5 / .In turn, the direction of the wind (Figure 9b) changes at discrete intervals.Figure 13 shows the desired and reached trajectories under variable wind disturbances.The result shows the effectiveness of the developed controller in being able to perform this maneuver, and the root mean square errors (RMSEs) obtained under all position and a4itude directions were considered to be small/acceptable, as presented in Table 4.  From Figures 11-13, it is observed that the controller was able to guide the UAV with high accuracy (i.e., the max error in translation was the same as the result for the simulation with no disturbances, Figure 5).However, this UAV had experienced some challenges managing the coupled lateral and roll motions as it flew (although such deviations were small).

Conclusions
The proposed nonlinear trajectory controller is based on the INDI controller technique, which includes an outer NDI/INDI loop controller for position and an inner INDI loop controller for a4itude.The controllers are used in combination with PD/PID controllers to provide appropriate control inputs for the NDI/INDI blocks.The linear controllers' gains are tuned manually and show satisfying results for different flight maneuvers.In order to improve the disturbance rejection capability of the NDI controller in the R channel, a single-layer sigma-pi neural network is added, and the simulation result demonstrates its ability to compensate for the control law.Finally, several simulations demonstrate the ability of the controller to follow different trajectories under moderate external disturbances (wind gusts).

Future Work
In this paper, the pitch angles of the propeller are considered constant; that is, the variable pitch capabilities of the aircraft are not utilized.However, in order to take advantage of the full capacity of the designed UAV, investigating the relation between the blade pitch angle and the aerodynamic coefficient will be performed in future work.Furthermore, work will be conducted in enhancing the developed controller to include the necessary control allocation mechanisms to compute the required configuration of the UAV in each time step.Finally, performing flight tests under incremental levels of complexity within a controlled (engineered) environment, such as flying inside a wind tunnel, followed by flight tests under real-world scenarios are future work tasks that will be performed.

Figure 2 .
Figure 2. Body and inertia reference frames of the Navig8 model.

Figure 4 .
Figure 4.The structure of the online adaptive sigma-pi neural network [24].

Figure 5 .
Figure 5. Responses to position control in trajectory tracking.

Figure 6 .
Figure 6.Responses to a4itude control in trajectory tracking.

Figure 7 .
Figure 7. Tracking the 3D trajectory for 150 s.Note that a helicopter schematic has been used to be4er represent the change in the orientation of the UAV.
Figure9shows the obtained magnitude and direction (azimuth, Ã ) of the wind affecting the UAV over time.As shown in Figure9a, the wind velocity has points where the wind declines (to a value of 2.1 / ), after which it gradually increases to a max value of 5 / .In turn, the direction of the wind (Figure9b) changes at discrete intervals.Figure 10a,b shows the wind forces in the M and R directions, respectively.Figures 11 and

Figure 10 .
Figure 10.Simulated wind force in the (a) x direction and (b) y direction.

Figure 11 .
Figure 11.Responses to position control in trajectory tracking under moderate wind gusts.

Figure 12 .
Figure 12.Responses to a4itude control in trajectory tracking under moderate wind gusts.

Figure 13 .
Figure 13.Tracking the 3D trajectory under moderate wing gusts for 150 s.Note that a helicopter schematic has been used to be4er represent the change in the orientation of the UAV.

Table 1 .
Motions and respective coupling effects.

Table 2 .
Gains for the PID controllers.

Table 3 .
Simulation parameters and physical characteristics of the UAV.

Table 4 .
Root mean square errors.