E Ibarra-Jimenez

| P Castillo
email: castillo@hds.utc.fr

| H Abaunza

P Castillo

Nonlinear control with integral sliding properties for circular aerial robot trajectory tracking: real-time validation

Keywords: Robust and nonlinear control, integral sliding mode, aerial robots, path tracking, dynamic trajectory, real-time validation SMC, sliding mode control, ISM, integral sliding mode, MIMO, multiple input multiple output, UAV, unmanned aerial vehicle

A nonlinear control algorithm for tracking dynamic trajectories using an aerial vehicle is developed in this work. The control structure is designed using a sliding mode methodology which contains integral sliding properties. The stability analysis of the closed-loop system is proved using the Lyapunov formalism, ensuring convergence in a desired finite time and robustness towards unknown and external perturbations from the first time instant, even for high frequency disturbances. In addition, a dynamic trajectory is constructed with the translational dynamics of an aerial robot for autonomous take-off, surveillance missions and landing. This trajectory respects the constraints imposed by the vehicle characteristics allowing free initial trajectory conditions. Simulation results demonstrate the good performance of the controller in closed-loop system when a quadrotor follows the designed trajectory. In addition, flight tests are developed to validate the trajectory and the controller behavior in real time.

| INTRODUCTION

New civil applications for aerial robots are being developed every day. In recent years, novel implementations of these vehicles have been increasing in complexity, demanding a higher control performance to accomplish their missions. A recurrent task for Unmanned Aerial Vehicles (UAVs) is target inspection and surveillance, which requires that the aerial vehicle continuously tracks its objective with high precision and robustness. Quadrotors are a kind of UAV that has been widely studied in recent years due to their mechanical simplicity and broad availability, typically, these vehicles are capable of performing rotation and translation movements over three axes (six degrees of freedom). This configuration consists on four rotating blades whose aerodynamic effects result on three total torque components and one total thrust (four control inputs).

Quadrotor dynamics are often modeled as a nonlinear underactuated Multiple Input Multiple Output (MIMO) system. Controlling this kind of vehicles is a complex problem that requires effective methodologies to ensure system stability. A common practice to facilitate the development of quadrotor controllers (and other nonlinear MIMO systems) relies on linearizing the dynamic equations around equilibrium points or through defining linear models that approximate the nonlinear equations behavior under certain limited conditions, see [START_REF] Chen | Linear System Theory and Design[END_REF] and [START_REF] Hespanha | Linear System Theory[END_REF].

Linearization techniques usually consider that only small variations occur in the internal system dynamics, in quadrotors this means that only small angles and slow velocities are taken into account in the model, converting the nonlinear problem in an easier linear or quasi-linear one in which the existing theory for linear control systems can be applied. For example in [START_REF] Altug | Control of a quadrotor helicopter using visual feedback[END_REF], a quadrotor was restricted such that only yaw and vertical movements could be performed, therefore reducing the control problem from a mathematical point of view. In [START_REF] Bouabdallah | PID vs LQ control techniques applied to an indoor micro quadrotor[END_REF], classical Proportional-Integral-Derivative (PID) and Linear-Quadratic (LQ) controllers were used to control the orientation of a quadrotor which was fixed on a 3D universal joint, these controllers were developed from a simplified linear version of the quadrotor dynamics. The main disadvantage of these approaches is that the resulting controllers are only valid locally, in a limited region around the equilibrium point. In quadrotors this means that the vehicle could become unstable at high angular inclinations or velocities, compromising the success of demanding missions.

In consequence, the study and development of controllers for nonlinear MIMO systems has been a subject of increasing interest in recent years. Some of the most popular approaches to solve this kind of problems are backstepping techniques like [START_REF] Liu | Robust stabilization of MIMO nonlinear systems by backstepping[END_REF], [START_REF] Yao | Adaptive robust control of MIMO nonlinear systems in semi-strict feedback forms[END_REF], and [START_REF] Shaocheng | Fuzzy adaptive observer backstepping control for MIMO nonlinear systems[END_REF], flatness algorithms as detailed in [START_REF] Rigatos | Nonlinear control and filtering using differential flatness approaches: applications to electromechanical systems[END_REF], [START_REF] Zerar | Robust tracking of nonlinear MIMO uncertain flat systems[END_REF], and [START_REF] Victor | Robust path tracking using flatness for fractional linear MIMO systems: a thermal application[END_REF] and Sliding Mode Controllers (SMC), see [START_REF] Ledgerwood | Controllability and nonlinear control of rotational inverted pendulum[END_REF]- [START_REF] Utkin | Sliding Mode Control in Electromechanical Systems[END_REF]. This last one has prorelyven to have an outstanding performance for controlling nonlinear systems by providing robustness properties, detailed in [START_REF] Young | A control engineer's guide to sliding mode control[END_REF], and characteristics such as finite-time convergence as remarked in [START_REF] Zhihong | Terminal sliding mode control of MIMO linear systems[END_REF], and disturbance rejection as noted by [START_REF] Utkin | Variable structure systems with sliding modes[END_REF].

In [START_REF] Utkin | Sliding Mode Control in Electromechanical Systems[END_REF]-Chapter 4 an effective methodology is presented to control a certain type of MIMO nonlinear systems, here, the authors propose to transform the system into a regular form and then use a candidate Lyapunov function to solve the stability problem. Nevertheless, this methodology does not consider cases when the system is affected by parameters uncertainties or external disturbances. Therefore such controllers were not developed to achieve robustness.

It is well known that one of the advantages of sliding mode control is that it provides systems with robustness towards bounded parameter uncertainties and external disturbances (no mechanical system is subject to unbounded perturbations in the real world). However, in conventional sliding mode controllers, such robustness can only be guaranteed after the sliding surface converges to zero. This means that the disturbance compensation does not happen immediately after starting the system. A solution for better disturbance rejection and uncertainties compensation can be found on a variant of sliding mode algorithms proposed by [START_REF] Matthews | Decentralized tracking for a class of interconnected nonlinear systems using variable structure control[END_REF] and [START_REF] Utkin | Integral sliding mode in systems operating under uncertainty conditions[END_REF], which is known as Integral Sliding Mode (ISM), this algorithm contains properties which can compensate bounded uncertainties since the beginning.

The application of sliding mode controllers for UAVs has been addressed by some works to provide system ro-bustness. For instance [START_REF] Benallegue | High-order sliding-mode observer for a quadrotor UAV[END_REF]- [START_REF] Shao | Robust dynamic surface trajectory tracking control for a quadrotor UAV via extended state observer[END_REF] used sliding mode observers to obtain state signals which were then introduced to the control loop. In [START_REF] Dong | Adaptive-gain multivariable super-twisting sliding mode control for reentry RLV with torque perturbation[END_REF], a super-twisting sliding mode controller with adaptive gains was developed for a UAV with 3 degrees of freedom. Other works like [START_REF] Furtat | Finite-time sliding mode stabilization using dirty differentiation and disturbance compensation[END_REF] and [START_REF] Zou | Nonlinear robust adaptive hierarchical sliding mode control approach for quadrotors[END_REF] have tackled the problem of compensating disturbances and uncertainties on quadrotors with adaptive sliding mode control schemes. Trajectory tracking algorithms based on sliding mode controllers have been proposed in [START_REF] Tian | Multivariable finite-time output feedback trajectory tracking control of quadrotor helicopters[END_REF] and by using multiple control layers. However, all of these works have limited the validation of their proposed algorithms to simulations (in most cases), or to constrained experimental setups, see [START_REF] Zhao | Nonlinear robust sliding mode control of a quadrotor unmanned aerial vehicle based on immersion and invariance method[END_REF] and [START_REF] Liu | Robust attitude controller design for miniature quadrotors[END_REF].

The main scope of this work is the development of an integral sliding mode control algorithm to stabilize a quadrotor modeled as a nonlinear MIMO system. The algorithm is composed by two parts, the first one is designed to compensate external perturbations since the beginning, while the second one consists on a super-twisting sliding mode controller which ensures the convergence of a sliding surface to zero in a desired finite time. As consequence, our proposal provides fast stabilization of the system dynamics without increasing chattering effect, see [START_REF] Dávila | Variable gains super-twisting algorithm: A Lyapunov based design[END_REF], [START_REF] Shtessel | Sliding Mode Control and Observation[END_REF].

Therefore, the main contributions of this work are:

1. The design of a robust nonlinear controller to stabilize a quadrotor in presence of unknown external disturbances with high frequency.

2.

The proposed controllers compensate bounded uncertainties from the beginning, guaranteeing a faster stabilization.

3.

The conception of a trajectory generation algorithm for quadrotors, with dynamic properties for takeoff, landing, and surveillance missions.

4.

Real-time validation of the trajectory generation and control schemes in autonomous flight tests.

The rest of the paper is organized as follows: In Section 2 the preliminaries for modeling the nonlinear quadrotor dynamic model, as well as the mathematical preliminaries of the trajectory generation algorithm are introduced. In Section 3 the circular dynamic trajectory design is presented, detailing its autonomous takeoff, target tracking and landing properties based on Hopf bifurcations. The design of a nonlinear integral sliding mode controller for robust and fast trajectory tracking is detailed in Section 4. Numerical simulations of the proposed algorithms are depicted in Section 5. In addition, flight experiments are presented in Section 6, that validate the proposed schemes in real time.

Finally, conclusions about this work and future improvements are discussed in Section 7.

| PROBLEM STATEMENT

Quadrotors are commonly used for inspection, surveillance and target tracking missions. In this kind of tasks it is often necessary to expand the aerial vehicle workspace for reaching a wider area for inspection, or in the case of target tracking, increasing its vision angle for relocating a lost or hidden target. If the objective to be surveilled is static, the problem is relatively easy to solve using classical approaches. The challenge arises with a moving target performing random displacements, in this case the controller should be robust enough to ensure tracking without loosing the target.

In this paper, we propose a solution based on a nonlinear sliding-mode controller for trajectory tracking. This solution also includes the conception of a time-varying trajectory that adapts its dynamics with respect to target movements. The control law will be designed to compensate unknown external perturbations from the beginning and to converge the sliding surfaces to zero in a desired finite time.

The scenario for validating this approach is the following: A quadrotor takes-off autonomously from a random position either far or close from its target until a desired altitude is reached, while the vehicle is lifting, its objective will be to describe circles such that its center is located over the target at a constant height (see Figure 1). If the target moves, the circular trajectory will be adapted and reconstructed to fit its behavior. And finally, if a remote operator indicates the mission ending, the drone will autonomously land accordingly.

| Model background and trajectory design preliminaries

The quadrotor is an under-actuated system with fast and unstable nonlinear dynamics such that any failure in the closed-loop system may cause the vehicle to crash. Its nonlinear model is commonly described as

ẍ = -sin (θ) 1 m U 1 (1)
ÿ = cos (θ) sin (φ) 1 m U 1 (2)
z = cos (θ) cos (φ) 1 m U 1 -g (3)
φ = θ ψ I y -I x I x - I r I x θΩ + l I x U φ + ξ 1 (4) θ = φ ψ I z -I x I y - I r I y φΩ + l I y U θ + ξ 2 (5)
ψ = θ φ I x -I y I z + l I z U ψ + ξ 3 (6)
where the position coordinates are defined as x , y , z while its orientation is represented by Euler angles; roll (φ), pitch (θ) and yaw. (ψ) The angular acelerations of the body frame are considered to be aligned with the inertial frame in this model. The distance between each motor to the vehicle gravitational center is denoted by l . The body inertia over each axis is defined by I x , I y and I z , while the inertia of each motor is represented by I r . U i symbolizes the control input, the rotor speed is defined by Ω and ξ i represents external and unknown disturbances, see Figure 1.

F I G U R E 1 A quadrotor surveying a ground target (moving at a constant velocity) with a circular trajectory. The inertial reference frame, located at the target center, is denoted as I = {x I , y I , z I }, while the body frame is represented as B = {x B , y B , z B } .

One of the objectives of this work is to design a 3D dynamic trajectory that will be followed by the system described by ( 1)- [START_REF] Yao | Adaptive robust control of MIMO nonlinear systems in semi-strict feedback forms[END_REF]. The goal of this trajectory is to track a ground target even if it moves with random movements. Some ideas from [START_REF] Jordan | Nonlinear Ordinary Differential Equations[END_REF] are taken to conceive the trajectory. Define a circular relation as r 2 = x 2 r + y 2 r and tan(λ) = y r x r , where r denotes the desired trajectory radio and x r and y r are its position coordinates in the horizontal x, y plane.

From the previous, a nonlinear system can be stated as

ẋr = µ 1 x r + γ 1 y r -x r (x 2 r + y 2 r ) ẏr = -γ 1 x r + µ 1 y r -y r x 2 r + y 2 r (7)
where γ 1 and µ 1 are bifurcation parameters. Notice that system (7) has a single equilibrium point at the origin. Observe that for certain values of µ 1 , the dynamics (x r , y r ) will perform differently around the equilibrium point (0, 0) as seen in Figure 2.

µ 1 < 0 -4 -2 0 2 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 µ 1 = 0 -4 -2 0 2 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 µ 1 > 0 -4 -2 0 2 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 γ 1 > 0 γ 1 > 0 γ 1 > 0 µ 1 < 0 -4 -2 0 2 4 -2 -1.5 -1
-0.5 0 0.5

1 1.5 2 µ 1 = 0 -4 -2 0 2 4 -2 -1.5 -1
-0.5 0 0.5

1 1.5 2 µ 1 > 0 -4 -2 0 2 4 -2 -1.5 -1
-0.5 0 0.5

1 1.5 2 γ 1 < 0 γ 1 < 0 γ 1 < 0 F I G U R E 2
Development of a limit cycle in a Hopf bifurcation From [START_REF] Shaocheng | Fuzzy adaptive observer backstepping control for MIMO nonlinear systems[END_REF], the corresponding polar coordinates can be represented by

ṙ = r (µ 1 -r 2 ), λ = -γ 1 . (8)
Observe from Figure 2 the different stability cases for parameters µ 1 < 0, µ 1 = 0 and µ 1 > 0, with γ 1 > 0 and γ 1 < 0 respectively. If µ 1 ≤ 0 then the entire diagram consists on a stable spiral at the origin. If µ 1 > 0 then there is an unstable spiral at the origin surrounded by a stable limit cycle which grows out of the origin. Remark that the parameter µ 1 generates a limit cycle and then the Hopf bifurcation appears.

In addition, γ 1 produces a steady clockwise spiral motion if γ 1 > 0, which becomes counterclockwise if γ 1 < 0.

Finally, note from (8) that when the bifurcation parameter

µ 1 = r 2 > 0 then r = √ µ 1 .
It is straightforwardly deduced that (7) can yield a dynamic trajectory in the horizontal plane, nevertheless, a 3-dimensional movement is desired in this work. Imposing a constant altitude h for the quadrotor and defining a vertical error as e zr = z rh, it follows that ėzr = ż r , where z r denotes the reference height.

For ensuring asymptotic converge for e z , propose ėzr = -k e zr with a constant k > 0. Therefore, the trajectory dynamics for the z coordinate can be defined as

żr = -k (zr -h) . (9)
Consider that the aerial vehicle will take-off from an arbitrary horizontal position x, y with z = 0, thus, the initial position for the trajectory can be defined as x r (0) = x r 0 , y r (0) = y r 0 , z r (0) = 0. From (7) the initial conditions for the velocity become ẋr (0) = ẋr 0 , ẏr (0) = ẏr 0 and żr (0) = żr 0 , which yield:

ẋr 0 = µ 1 x r 0 + γ 1 y r 0 -x r 0 x 2 r 0 + y 2 r 0 , ẏr 0 = -γ 1 x r 0 + µ 1 y r 0 -y r 0 x 2 r 0 + y 2 r 0 , żr 0 = k h. (10)
Notice that the previous equations were obtained using classical approaches, implying that high values on the initial velocity of the vehicle could yield strong responses from many controllers, often resulting in aggressive maneuvers that could damage the quadrotor in real-world implementations.

To overcome this problem, a solution will be proposed in which the initial velocity conditions can be chosen freely without compromising the system robustness.

| 3D DYNAMIC TRA JECTORY

Propose the following functions

S x = x 2r -µ 1 x 1r -γ 1 y 1r + x 1r (x 2 1r + y 2 1r ) S y = y 2r + γ 1 x 1r -µ 1 y 1r + y 1r x 2 1r + y 2 1r S z = z 2r + k z 1r -h (11)
Notice that, if S i → 0, then systems ( 7) and ( 9) are obtained for x 1r = x r , x 2r = ẋr , y 1r = y r , y 2r = ẏr , z 1r = z r and z 2r = żr .

| Take-Off stage of movement

Define ẋ1r = x 2r ; ẏ1r = y 2r ; ż1r = z 2r , ẋ2r = u x ; ẏ2r = u y ; ż2r = u z , (12)
such that

u x = -3x 2 1r + y 2 1r -µ 1 x 2r -2x 1r y 1r -γ 1 y 2r -k x S x , u y = -2x 1r y 1r + γ 1 x 2r -3y 2 1r + x 2 1r -µ 1 y 2r -k y S y , (13)
u z = -k z 2r -k z S z , with k x , k y , k z > 0.
Taking the derivative of (11) and using the previous equations, it follows that

Ṡx = -k x S x ; Ṡy = -k y S y ; Ṡz = -k z S z ,
whose solutions are S x (t ) = e -kx t S x (0); S y (t ) = e -k y t S y (0) and S z (t ) = e -kz t S z (0).

This implies that (11) can be written as

x 2r = µ 1 x 1r + γ 1 y 1r -x 1r (x 2 1r + y 2 1r
) + e -kx t S x (0) , y 2r = -γ 1 x 1r + µ 1 y 1ry 1r x 2 1r + y 2 1r + e -k y t S y (0) , z 2r = -k z 1rh + e -kz t S z (0) , and finally,

x 2r 0 = µ 1 x 1r 0 + γ 1 y 1r 0 -x 1r 0 x 2 1r 0 + y 2 1r 0 x 2r (0)-Sx (0)
+ S x (0) ,

y 2r 0 = -γ 1 x 1r 0 + µ 1 y 1r 0 -y 1r 0 x 2 1r 0 + y 2 1r 0 y 2r (0)-Sy (0)
+ S y (0) ,

z 2r 0 = -k z 1r 0 -h z 2r (0)-Sz (0) + S z (0) ,
Observe from above that x 2r 0 , y 2r 0 , and z 2r 0 are independent, and can be chosen freely.

Equation ( 12) defines the first stage for reaching a desired altitude h. This system was simulated in the time

interval 0 ≤ t < T F 1 with T F 1 = 15s, choosing initial conditions x 1r (0) = 1.5, y 1r (0) = -3, z 1r (0) = 0 in meters and x 2r (0) = y 2r (0) = z 2r (0) = 0 in m/s, with h = 2m.
The constant parameters were selected as µ 1 = 4, γ 1 = 1, and

k = k x = k y = k z = 1.
The trajectory performance is depicted in Figure 3.

2 1 0 -1 -2 -3 -2 -1 0 1 2 1.5 1 0.5 0 2 y 1r [m] x 1r [m] z 1r [m]
F I G U R E 3 Dynamic circular trajectory to take-off and reach a desired altitude h.

The behavior of the sliding surfaces S x , S y and S z is illustrated in Figure 4, note that these functions converge asymptotically to zero guaranteeing a smooth convergence to the desired altitude.

S z (t) = e -kzt S z (0) S x (t) = e -kxt S x (0) F I G U R E 4
Performance of the sliding surfaces S x , S y and S z .

| Circular and landing stages of movements

Once the desired altitude is reached, two possible scenarios may arrive t ≥ T F 1 :

a.-Landing to the point 0, 0, z 1r 0 at T F 1 ≤ t ≤ T F . This implies that the aerial vehicle will start the asymptotic landing

at time T F 1 , ending at T F . b.-Spiral surveillance at T F 1 ≤ t < T F 2 around (0, 0, h) 1 , and landing to 0, 0, z 1r 0 at T F 2 ≤ t ≤ T F .
The complete 3D dynamic trajectory is represented in the following theorem.

Theorem 1 A 3D dynamic trajectory, ξr , with properties of take-off, circular motion and landing can be defined as

ξr = g(t )u + f(t )v, ( 14
)
with ξ r = [x r , y r , z r ], g(t ) = [ g (t ), g (t ), ḡ (t )], u = [u x , u y , u z ], f(t ) = [ f (t ), f (t ), f (t )], v = [v x , v y , v z ].
1 For simplifying the procedure, the origin in the plane x, y is considered as the center of the trajectory, nevertheless, these coordinates could be changed.

In the scalar form,

ẋ1r = x 2r , ẋ2r = g (t ) u x + f (t ) v x , ẏ1r = y 2r , ẏ2r = g (t ) u y + f (t ) v y , ż1r = z 2r , ż2r = ḡ (t ) u z + f (t ) v z , ( 15
)
where u is defined in [START_REF] Lukyanov | Sliding mode block control of uncertain nonlinear plants[END_REF] and v is proposed as

v x = -3x 2 1r + y 2 1r -µ 2 x 2r -2x 1r y 1r -γ 2 y 2r -kx σ x , v y = -2x 1r y 1r + γ 2 x 2r -3y 2 1r + x 2 1r -µ 2 y 2r -k y σ y , (16)
v z = -k z 2r -kz σ z , with σ x = ẋ1r -µ 2 x 1r -γ 2 y 21r + x 1r (x 2 1r + y 2 1r
),

σ y = ẏ1r + γ 2 x 1r -µ 2 y 1r + y 1r x 2 1r + y 2 1r , (17)
σ z = ż1r + k z 1r -z 1r (0) .
where the bifurcation parameters must be selected as µ 1 = r 2 > 0 with (γ 1 > 0 or γ 1 < 0) and µ 2 ≤ 0 with (γ 2 > 0 or γ 2 < 0). f (t ) and f (t ) are designed as

f (t ) =        e (n(t -T F 1 )) 0 ≤ t < T F 1 1 T F 1 ≤ t ≤ T F f (t ) =        e (n(t -T F 2 )) 0 ≤ t < T F 2 1 T F 2 ≤ t ≤ T F n > 0 where T F 1 ≤ T F 2 < T F . Finally, g (t ) = 1 -f (t ) and ḡ (t ) = 1 -f (t ).
In addition, these trajectory properties imply that the initial velocities are independent and can be chosen freely.

The proof of the theorem is given in Appendix A.

The trajectory with both scenarios for landing was verified numerically and illustrated in Figures 5 and6. The simulation values are written in Table 1.

n = 10 µ 1 = 4 µ 2 = -0.25 T F 1 = 15s γ 1 = 1 γ 2 = -1 T F 2 = 35s k = 1 k = 0.5 T F = 50s k x = 1 kx = 2 h = 2 k y = 1 ky = 2 k z = 1 kz = 0.5
TA B L E 1 Constant parameters used for simulation purposes.

In Figure 5, observe the evolution of the dynamic trajectory with two stages of movement: take-off and landing. In contrast, Figure 6 displays the complete scenario: take-off, spiral motion and landing.

3 2 x 1r [m] 1 0 -1 -2 -3 -2 -1 y 1r [m] 0 1 0 0.5 1 1.5 2 2 0 ≤ t < T F 1 T F 1 ≤ t ≤ T F z 1r [m] F I G U R E 5
Trajectory performance for take-off to a desired altitude h and landing to 0, 0, z 1r (0) .

3 2 x 1r [m] 1 0 -1 -2 -3 -2 -1 y 1r [m] 0 1 0 2 1.5 1 0.5 2 0 ≤ t < T F 1 T F 1 ≤ t ≤< T F 2 T F 2 ≤ t ≤ T F z 1r [m] F I G U R E 6
Trajectory behavior for the full scenario; take-off, spiral motion around (0, 0, h) and landing to 0, 0, z 1r (0) .

| NONLINEAR CONTROL FOR TRACKING A DYNAMIC TRA JECTORY

The challenge in this section is to design a robust nonlinear controller for tracking a desired trajectory. It will be constructed for compensating unknown and external disturbances.

From (1)-( 6), the nonlinear dynamics of the quadrotor can be separated in two subsystems for the translational and rotational movements, which will be controlled by following the scheme illustrated in Figure 7. Due the system characteristics (under-actuated) the controller will be proposed for high and low sequence levels giving more priority to the low level (attitude) control. In the following, the path tracking equations are developed.

| Translational tracking

In order to track the desired 3D trajectory, define the following errors for the position e x 1 = x 1x 1r , e y 1 = y 1y 1r , e z 1 = z 1z 1r , and for the velocity; e x 2 = x 2x 2r , e y 2 = y 2y 2r , e z 2 = z 2z 2r , where from ( 1)-( 3), it follows that

x 1 = x , y 1 = y , z 1 = z , x 2 = ẋ , y 2 = ẏ , z 2 = ż , φ 1 = φ, θ 1 = θ, ψ 1 = ψ.
The states with subscript r define the desired trajectory, in this case it is defined by Theorem 1.

Then, differentiating the position and velocity errors it yields

ėx 1 = e x 2 , ė y 1 = e y 2 , ėz 1 = e z 2 , ėx 2 = ẋ2 -ẋ2r , ė y 2 = ẏ2 -ẏ2r , ėz 2 = ż2 -ż2r . ( 18
)
Propose U 1 as the main thrust of the vehicle, such that its direction depends from the desired angles φ 1r and θ 1r as

U 1 = m żr 2 + g + V z cos θ 1r cos φ 1r , (19)
where V z will be defined later for ensuring asymptotic converge of the vertical dynamics. Define δ z = żr 2 + g and introducing U 1 into ėz 2 in (18), it yields

ėz 2 = cos (θ1) cos (φ1) 1 m    m cos θ 1r cos φ 1r [δ z + V z ]    -δ z .
Assumption 4.1 An attitude controller given by U φ , U θ , U ψ exists such that the quadrotor angles reach a desired reference as

φ 1 → φ 1r , θ 1 → θ 1r , ψ 1 → ψ 1r such that φ 1r , θ 1r 90
• . This controller will be developed in Section 4.3.

Considering that Assumption 4.1 is true, it implies that ėz 1 = e z 2 , ėz 2 = V z . V z = -K pz e z 1 -K dz e z 2 can be proposed with K pz , K dz > 0 to ensure asymptotic convergence of e z 1 and e z 2 around (0, 0).

The desired angles from [START_REF] Matthews | Decentralized tracking for a class of interconnected nonlinear systems using variable structure control[END_REF] should also be dependent on the position reference in the horizontal plane x, y for tracking trajectories, therefore, it is necessary to define them with respect to the e x and e y dynamics.

Introducing U 1 into ė y 2 , it follows that

ė y 2 = cos (θ1) sin (φ1) 1 m    m cos θ 1r cos φ 1r [δ z + V z ]    -ẏ2r .
Considering Assumption 4.1, then

ė y 2 = sin φ 1r    1 cos φ 1r [δ z + V z ]    -ẏ2r = tan φ 1r [δ z + V z ] -ẏ2r . (20)
Proposing

φ 1r = tan -1 ẏ2r + V y δ z + V z , (21)
where V y will be defined later for assuring asymptotic converge. The previous implies that ė y 1 = e y 2 , ė y 2 = V y .

Define V y = -K py e y 1 -K dy e y 2 with K py , K dy > 0, to achieve asymptotic convergence of e y 1 and e y 2 around (0, 0).

Introducing U 1 into ėx 2 in (18), and following Assumption 4.1, it yields

ėx 2 = -tan θ 1r    1 cos φ 1r [δ z + V z ]    -ẋ2r . (22)
Propose

θ 1r = tan -1 (-1) cos φ 1r ẋ2r + V x δ z + V z , (23)
whereV x will be obtained by introducing ( 23) into [START_REF] Shao | Model-assisted extended state observer and dynamic surface control-based trajectory tracking for quadrotors via output-feedback mechanism[END_REF], which implies that ėx 1 = e x 2 , ėx 2 = V x , definingV x = -K px e x 1 -

K dx e x 2 with K px , K dx > 0, then the asymptotic convergence of e x 1 and e x 2 around (0, 0) will be achieved.

From ( 21) and ( 23), the desired angular velocities are represented by

φ 2r = cos 2 φ 1r r z ṙy -ṙz tan φ 1r , θ 2r = cos 2 θ 1r r z r x sin φ 1r φ 2r -ṙz tan θ 1r -ṙx cos φ 1r , (24)
with r x = ẋ2r + V x ; r y = ẏ2r + V y and r z = δ z + V z . In addition,

ẍ2r = f (t ) ( vx -ux ) + n (vx -u x ) + ux , ÿ2r = f (t ) vy -uy + n v y -u y + uy , δz = f (t ) ( vz -uz ) + n (vz -u z ) + uz , such that Vx = -K px e x 2 -

| Free initial trajectory conditions

From the previous procedure, note that the initial conditions of the desired angles φ 1r (0), θ 1r (0) and angular velocities φ 2r (0), θ 2r (0) are clearly not always zero. For example at the first stage of movement (in numerical simulation), the initial angular position and velocity are given by φ 1r (0) = 59.7488 • , θ 1r (0) = 30.6205 • , φ 2r (0) = -207.6294 • s -1 and θ 2r (0) = 57.0956 • s -1 respectively. Therefore in real-time experiments this could be a problem if a faster convergence for φ 1 → φ 1r and θ 1 → θ 1r is desired because it could compromise the system stability.

To solve this problem, four angular variables φ 1 f , θ 1 f , φ1 f = φ 2 f and θ1 f = θ 2 f are used, such that the initial conditions can be chosen as

φ 1 f (0) = 0 • , θ 1 f (0) = 0 • and φ 2 f (0) = 0 • s -1 , θ 2 f (0) = 0 • s -1 .
These variables are defined as:

φ1 f = φ 2 f ( 25
)
φ2 f = φ2r -c 1 φ 2 f -φ 2r -c 1 f S φ 1 f g (t ) + φ2r -c 2 φ 2 f -φ 2r -c 2 f σ φ 1 f f (t ) ḡ (t ) + φ2r -c 3 φ 2 f -φ 2r -c 3 f Σ φ 1 f f (t )
θ1 f = θ 2 f ( 26
)
θ2 f = θ2r -d 1 θ 2 f -θ 2r -d 1 f S θ 1 f g (t ) + φ2r -d 2 θ 2 f -θ 2r -d 2 f σ θ 1 f f (t ) ḡ (t ) + φ2r -d 3 θ 2 f -θ 2r -d 3 f Σ θ 1 f f (t )
with

S φ 1 f = φ 2 f -φ 2r + c 1 φ 1 f -φ 1r , σ φ 1 f = φ 2 f -φ 2r + c 2 φ 1 f -φ 1r , Σ φ 1 f = φ 2 f -φ 2r + c 3 φ 1 f -φ 1r , S θ 1 f = θ 2 f -θ 2r + d 1 θ 1 f -θ 1r , σ θ 1 f = θ 2 f -θ 2r + d 2 θ 1 f -θ 1r , Σ θ 1 f = θ 2 f -θ 2r + d 3 θ 1 f -θ 1r ,
where c i , d i , and c i f , d i f , i : 1, 2, 3 are constant gains.

From the previous notice that φ 1 f → φ 1r , θ 1 f → θ 1r and φ 2 f → φ 2r , θ 2 f → θ 2r asymptotically.

One advantage when using these variables for tracking is that, for each time interval, asymptotic convergence can be achieved as fast as desired, and it will only depend on the gains chosen for each time interval. For example when T F 1 = T F 2 , (corresponding to the first scenario) it is convenient to choose small gains c 1 , c 1 f . In contrast, d 1 , d 1 f are preferred for the time interval 0 ≤ t < T F 1 , due to the high initial angular conditions. For all T F 1 ≤ t < T F is favorable to choose high gains c 2 , c 2 f and d 2 , d 2 f , since in this time interval the quadrotor motion has been switched from take-off to a desired altitude h to a landing spiral motion around 0, 0, z 1r (0) . This means that it is convenient to propose high gains when the dynamics are being switched.

The next step is to propose an attitude controller such that, φ 1 → φ 1 f , θ 1 → θ 1 f asymptotically, and in consequence it will follow that φ 1 → φ 1r , θ 1 → θ 1r asymptotically.

| Attitude nonlinear controller

Observe from ( 4)-( 6) that the attitude dynamics are represented by a nonlinear MIMO system.

Define now e φ

1 = φ 1 -φ 1 f ; e θ 1 = θ 1 -θ 1 f ; e ψ 1 = ψ 1 -ψ 1r , thefore e φ 2 = φ 2 -φ 2 f ; e θ 2 = θ 2 -θ 2 f and e ψ 2 = ψ 2 -ψ1r .
The desired yaw angle ψ 1r is considered constant such that ψ1r = ψ1r = 0. Hence the following system can be stated:

ėφ 1 = e φ 2 , ėθ 1 = e θ 2 , ėψ 1 = e ψ 2 , ėφ 2 = f1 + b 1 U φ + ξ 1 , ėθ 2 = f2 + b 2 U θ + ξ 2 , ėψ 2 = f3 + b 3 U ψ + ξ 3 , (27)
with f1 = θ 2 (ψ2 1 -β 1) -φ2 f , f2 = φ 2 (ψ2 2 -β 1) -θ2 f , f3 = θ 2 φ 2 3 . And 1 = I y -I x I x , 2 = I z -I x I y , 3 = I x -I y I z , β 1 = I r I x Ω, β 2 = I r I y Ω, b 1 = l I x , b 2 = l I y , b 3 = l I z .
Notice that [START_REF] Tian | Multivariable finite-time output feedback trajectory tracking control of quadrotor helicopters[END_REF] can also be written as

ẋ = Ax + B(u + ξ) = 0 3×3 0 3×3 3×3 0 3×3 q v q + 0 3×3 B 2 (u + ξ) (28)
with q = e φ 1 , e θ 1 , e ψ 1 T , v q = (e φ 2 , e θ 2 , e ψ 2 ) T , u = (U φ , U θ , U ψ ) T , x = q, v q T and

B 2 = b 1 0 0 0 b 2 0 0 0 b 3 , A = 0 3×3 0 3×3 3×3 0 3×3 , ξ = f1 + ξ 1 b 1 , f2 + ξ 2 b 2 , f3 + ξ 3 b 3 T
Remark that ( 27) is now expressed as a perturbed linear MIMO system by ( 28) without linearization around equilibrium points.

| Sliding mode surfaces design

Considering that the quadrotor has a balanced configuration such that its inertial effects mainly affect its symmetrical axes, thus propose

S = v q + M q = v q + M 11 0 0 0 M 22 0 0 0 M 33 q ( 29
)
where M is a diagonal matrix with positive values M 11 , M 22 , M 33 . Then S i = e j i +1 + M i i e j i for i = 1, 2, 3 and j : φ, θ, ψ.

Observe that when U j achieves S i → 0 in finite time t r i then the sliding modes appear, and these are given by e φ 1 (t ) =e -M 11 (t -tr 1 ) e φ 1 (t r 1 ) , e θ 1 (t ) =e -M 22 (t -tr 2 ) e θ 1 (t r 2 ) , e ψ 1 (t ) =e -M 33 (t -tr 3 ) e ψ 1 (t r 3 ) ,

e φ 2 (t ) = -M 11 e -M 11 (t -tr 1 ) e φ 1 (t r 1 ) , e θ 2 (t ) = -M 22 e -M 22 (t -tr 2 ) e θ 1 (t r 2 ) , e ψ 2 (t ) = -M 33 e -M 33 (t -tr 3 ) e ψ 1 (t r 3 ) . ( (30)
) 31
Taking the time derivative of S

Ṡ = B 2 u + ξ + M v q , (32)
then, introducing u = B -1 2 ū -M v q for removing the linear part, it implies that

Ṡ = ū + B 2 ξ, (33)
or in the scalar form

Ṡi = ūi + f i + ξ i , i = 1, 2, 3. (34)
| Integral sliding mode controller

Notice from [START_REF] Qiao | Double-loop integral terminal sliding mode tracking control for UUVs with adaptive dynamic compensation of uncertainties and disturbances[END_REF], that controller ūi must be proposed to compensate, on one hand, nonlinearities f i and unknown and external perturbations ξ i from the beginning, and on the other hand, to ensure that each sliding surfaces goes to zero.

Then, it is possible to consider a controller composed by two parts as

ūi = ūi 1 + ūi 2 . ( 35
)
Proposing a sliding surface as σ i = S i -Z i with Żi = ūi 2 , the following candidate Lyapunov function can be introduced

V (σi ) = 1 2 σ 2 i > 0. ( 36
)
For proving global asymptotic stability for σ i at the equilibrium point σ i = 0, the following conditions must be satisfied a) lim

σ i →∞ V = ∞, and b) V < 0 for σ i 0 .
Condition (a) is obviously satisfied by V in (36). In order to achieve finite-time convergence (global finite-time stability), condition (b) can be modified as

V ≤ -α i V 1/2 , α i > 0. (37)
Indeed, separating variables and integrating inequality (37) over time interval 0 ≤ τ ≤ t yields

V 1/2 σ i (t ) -V 1/2 σ i (0) ≤ - 1 2 α i t , (38)
and considering that V σ i (t ) reaches zero in finite time t r , it follows that

: 0 V 1/2 (σi (tr )) -V 1/2 σ i (0) ≤ - 1 2 α i t r . This implies that t r ≤ 2V 1/2 σ i (0) α i . (39)
Notice now that (37) can be written as

σ i σi ≤ -ᾱi σ i , ᾱi = α i √ 2 > 0. (40)
From ( 34) and ( 35), it follows that

σ i σi = σ i Ṡi -Żi = σ i ūi 1 + f i + ξ i . (41)
Real-world physical systems are usually constrained by inputs or states that cannot be neglected. These can be introduced by actuator or sensor range limitations. Some constraints are inherent limits (for example actuators in electromechanical systems) that depend on the system configuration and cannot be physically violated.

This implies that such systems cannot be endured by infinite perturbations. For the presented case of study, the external perturbations are unknown, but it is possible to consider a bound given by the system's physical limitations.

Therefore for control purposes each ξ i is considered to be bounded, i.e. ξ i ≤ L i , where L i defines the bound that the system could hold by its physical configuration. The disturbances bounds can be selected using several approaches, for many implementations, an empirical selection of such values would guarantee the compensation of most disturbances, alternatively, adaptive techniques using terminal sliding modes can be applied to autonomously identify such parameters, as proposed by [START_REF] Qiao | Adaptive non-singular integral terminal sliding mode tracking control for autonomous underwater vehicles[END_REF] and [START_REF] Qiao | Double-loop integral terminal sliding mode tracking control for UUVs with adaptive dynamic compensation of uncertainties and disturbances[END_REF].

Selecting ūi 1 = -ρ i sign(σ i ), and using (41), condition (40) is fulfilled if and only if

ρ i = ᾱi + f i + L i , (42)
where (42) represents the necessary gains for ensuring stability in a bounded finite time t r , meaning that

t r ≤ 2V 1/2 σ i (0) α i = √ 2 σ i (0) ᾱi . ( 43
)
The above implies that σ i = σi = 0 for all t ≥ t r , hence condition σi = 0 produces σi = -ρ i sign(σ i )

ūi 1 + f i + ξ i = 0 t ≥ t r .
This means that -ρ i sign(σ i ) compensates the disturbance terms f i + ξ i only during the reaching phase.

Observe from (43) that proposing σ i (0) = 0 implies that t r = 0, such that σ i = σi = 0 for all t ≥ 0. Thus

ūi 1 = -ρ i sign(σ i ) = -f i + ξ i , t ≥ 0,
therefore controller ūi 1 compensates f i + ξ i for all t ≥ 0 if and only if σ i (0) = 0.

Considering now that ūi 1 accomplishes σ i (t ) = 0, t ≥ 0, then it follows that S i (t ) = Z i (t ) for all t ≥ 0, consequently the sliding surface can be rewritten as

S i = Z i Żi = ūi 2 with Z i (0) = S i (0). ( 44
)
From the above, it yields that Ṡi = ūi 2 . Proposing ūi 2 = -k i S i 1/2 sign(S i ), a Lyapunov candidate function can be defined to prove convergence of (44) to zero as

V (Si ) = S i > 0, (45)
once again, the following conditions must be satisfied a) lim

S i →∞ V = ∞ and b) V < 0 for S i 0 .
Condition (a) is satisfied according to (45), now for proving global finite-time stability at S i = 0, a modified condition will be used as

V ≤ -α i V 1/2 , α i > 0, (46)
introducing ( 45) into (46), an equivalent modified condition is obtained as

S i Ṡi S i ≤ -α i S i 1/2 . ( 47
)
Since Ṡi = ūi 2 , then (47) finally yields

-k i S i 1/2 ≤ -α i S i 1/2 , ( 48
)
implying that each gain k i must be equal to α i , such that

V = -α i V 1/2 , if k i =α i > 0. ( 49
)
Separating variables and integrating inequality (49) over the time interval 0 ≤ τ ≤ t , it yields

V 1/2 S i (t ) -V 1/2 S i (0) = - 1 2 α i t , (50)
observe that V S i (t ) reaches zero at time t r i , therefore it follows that

: 0 V 1/2 S i t r i -V 1/2 S i (0) = - 1 2 α i t r i , which implies that t r i = 2V 1/2 S i (0) k i = 2 S i (0) 1/2 k i , (51)
Consequently S i (t ) → 0 in finite time t r i and ūi 2 keeps them at zero thereafter.

The previous means that S i = 0 t ≥ 0, signifying that robustness and sliding modes convergence are reached since the beginning. The previous also implies that e φ , e θ and e ψ go to zero and φ → φ 1 f , θ → θ 1 f and ψ → ψ 1 f and thus, φ → φ r , θ → θ 1r and ψ → ψ 1r holding Assumption 1.

An advantage when designing φ 1 f , θ 1 f , φ 2 f , θ 2 f altogether with the integral sliding mode control is that the occurence of the sliding modes can be achieved since the beginning, guaranteeing angular stabilization also from the start.

Remark From the fact that S i = 0 for all t ≥ 0 then, the coefficients k i in ūi 2 can be proposed with small values in order to diminish the scope of the controllers without compromising stability.

| NUMERICAL VALIDATION

The dynamic trajectory and the control algorithm were validated in numerical simulations, the constant parameters and gains were selected empirically such that the simulation performance resembled the behavior of real world quadrotors, such values are depicted in Table 2, while the system initial conditions were set as detailed in Table 3.

x 1r (0) = 0.23 m x 2r (0) = 0 m/s n = 2 µ 1 = 4 µ 2 = -0.20 k x = 1 kx = 12 T F = 50s y 1r (0) = -1.0 m y 2r (0) = 0 m/s T F 1 = 15s γ 1 = -1 γ 2 = 1 k y = 1 k y = 12 h = 4 m z 1r (0) = 0 m z 2r (0) = 0 m/s T F 2 = 35s k = 1 k = 0.5 k z = 4 kz = 0.5
TA B L E 2 Constant parameters and gains used for numerical simulations.

x 1 (0) = x 1r (0) φ 1 (0) = φ 1 f (0) = 0 x 2 (0) = x 2r (0) φ 2 (0) = φ 2 f (0) = 0 y 1 (0) = y 1r (0) θ 1 (0) = θ 1 f (0) = 0 y 2 (0) = y 2r (0) θ 2 (0) = θ 2 f (0) = 0 z 1 (0) = z 1r (0) ψ 1 (0) = 0 z 2 (0) = z 2r (0) ψ 2 (0) = 0 TA B L E 3 Quadrotor initial conditions
The gains used for designing φ 1 f , θ 1 f and φ 2 f , θ 2 f are given in the Table 4.

0 ≤ t < T F 1 T F 1 ≤ t < T F 2 T F 2 ≤ t ≤ T F c 1 = c 1 f = 4 c 2 = c 2 f = 150 c 3 = c 3 f = 10 d 1 = d 1 f = 4 d 2 = d 2 f = 150 d 3 = d 3 f = 10
TA B L E 4 Gains used for different interval times in the trajectory design.

The gains for the sliding surfaces are selected as M 11 = 10, M 22 = 10, M 33 = 4, k 1 = k 2 = k 3 = 0.45, and α 1 = 0.1,

α 2 = 0.1, α 3 = 0.1.
For simulation purposes, the external and unknown perturbations were considered as

ξ 1 = 2 sin(t )sign (S1) ξ 2 = -1.5 cos (2t ) sign (S2) ξ 3 = -0.5e cos(t ) sign (S3)              ξ 1 L 1 = 2 ξ 2 L 2 = 1.5 ξ 3 L 3 = 0.5e 1
The performance of these perturbations are depicted in Figure 8. Notice that they present an evident chattering effect caused by the term sign(S i ), beginning at the convergence time t r i = 0. Nevertheless observe also that, although these uncertainties present a high frequency the control signals are able of compensating such perturbations since the initial time instant t = 0. The following graphs were obtained when simulating the proposed control-scheme. In Figure 9 the dynamic trajectory (red dotted line) and the quadrotor performance (blue solid line) are introduced. On one hand, observe the good performance of the nonlinear controller when following the desired trajectory even in presence of unknown and external disturbances, in the other hand, notice that the trajectory is well defined and planned. In Figure 10 the translational errors (position and velocity) are depicted, observe that these behaviors are small and with an asymptotic convergence to zero.

Time[sec]

2 1 0 -1 -2 -2 -1 0 1 2 0 1 2 3 4 (x 1r , y 1r , z 1r ) (x 1 , y 1 , z 1 ) x[m] y[m] z[m]
F I G U R E 9 3D quadrotor performance when tracking the proposed trajectory. Sliding surfaces σ 1 , σ 2 , σ 3 and S 1 , S 2 , S 3 become zero since the initial time, this means that σ i = 0; t ≥ 0 guarantees robustness respect to uncertainties from start to finish and S i = 0; t ≥ 0 guarantees the asymptotic stabilization of e φ 1 , e θ 1 , e ψ 1 and its velocities from the beginning as can be seen in Figure 11. Notice here that the errors remain close to zero.

Time [sec]

Time [sec] Time [sec]

F I G U R E 1 1 Angular errors performance when applying the proposed control strategy. Note that a switch from circular surveillance to centering stage happens at T F 1 =15s, which induces a small peak in the angular errors.

In Figure 12 the asymptotic convergence of φ 1 f → φ 1r and θ 1 f → θ 1r is appreciated by using ( 25) and ( 26), in addition remember that U φ , U θ are necessary to achieve e φ 1 = φ 1φ 1 f → 0 and e θ 1 = θ 1θ 1 f → 0 asymptotically, implying also φ 1 → φ 1r and θ 1 → θ 1r asymptotically, therefore Assumption 4.1 is held.

In the following figures, the control behavior is depicted, notice in Figure 13 that these control signals present a chattering effect from the beginning, this means that the algorithms are compensating the proposed unknown uncertainties ξ 1 , ξ 2 and ξ 3 for all t ≥ 0. Similarly, in Figure 14

| EXPERIMENTAL VALIDATION

The controllers have also been validated in flight tests. The quadrotor used in this experiment was an AR Drone with an embedded ARM Cortex A8 processor at 1 GHz, running Linux 2.6.32, it also has a 1GB DDR2 RAM at 200 MHz, the sampling frequency is 200 Hz. The employed navigation sensors were an Inertial Measurement Unit, as well as an OptiTrack Motion Capture system for position and yaw feedback. The hardware of the quadrotor has been conserved from its factory design, nevertheless the original software has been completely replaced by our framework FL-Air, such that custom programs can be run, accessing all states and variables that usually can not be modified with a brand new Parrot.

Notice that matrix M was simplified (by considering only parameters in the main diagonal) for facilitating tuning, nevertheless, some nonlinear parameters are not easy to obtain because they depend on each prototype (form, configuration, material, etc) and they could change every time the prototype is modified. These parameters (β 2 , 1 , 2 , b 1 ) are represented by the following relations

ρ 1 = α 1 √ 2 + e θ 2 + θ1r e ψ 2 1 -β 1 -φ1r + L 1 ρ 2 = α 2 √ 2 + e φ 2 + φ1r e ψ 2 2 -β 2 -θ1r + L 2 ρ 3 = α 3 √ 2 + e θ 2 + θ1r e φ 2 + φ1r 3 + L 3
A procedure for easily tuning these kind of vehicles is proposed in the following. This idea will facilitate future practical validation when changing the prototype configuration. Rewriting the quadrotor parameters, it follows that

β 1 = β 2 ( 1 + 1) , b 2 = b 1 ( 1 + 1) , b 3 = b 1 [ 2 ( 1 + 1) + 1] , 3 = -1 1 2 ( 1 + 1) + 1 . (52)
Hence, the goal will be to minimize the effect of nonlinear terms for the pitch (e θ 2 + θ1r ) e ψ 2 1β 1 and roll (e φ 2 + φ1r ) e ψ 2 2β 2 angles. Considering 1 , b 1 ∈ can bee freely chosen, the following can be obtained:

2 = 1 ( 1 + 1) , 3 = - 1 1 + 1 , b 2 = b 3 = b 1 ( 1 + 1)
.

this implies that

ρ 1 = α 1 √ 2 + L 1 + φ1r , ρ 2 = α 2 √ 2 + L 2 + θ1r , ρ 3 = α 3 √ 2 + L 3 + e θ 2 + θ1r e φ 2 + φ1r 3 .
Choosing 1 = 0 then 3 = 0 implies that

ρ 1 = L x + φ1r , ρ 2 = L y + θ1r , ρ 3 = (Lz ) ,
where

L x = α 1 √ 2 + L 1 , L y = α 2 √ 2 + L 2 and L z = α 3 √ 2 + L 3 .
Therefore, the only parameters that must be experimentally tuned are b i , L i , M i i , K i , i = 1, 2, 3, which then yield the other terms by computing the previous relations.

The flight tests consisted on taking-off until a desired altitude of 1.4 m is reached, then following a circular trajectory of 1m of radius and finally landing, all in autonomous mode. The good performance of the control algorithm tracking the well defined dynamic trajectory is depicted in the following graphs. F I G U R E 1 5 3D system response when tracking the proposed trajectory.

F I G U R E 1 6 Quadrotor performance in the horizontal plane.

From Figure 17 observe the quadrotor states behavior when following the references from the dynamic trajectory.

Notice here the good performance of the controller for tracking x 1r , y 1r and z 1r . Similarly in Figure 18 the good performance of the controller can be analyzed when following the desired angles φ r , θ r obtained from the dynamic trajectory. F I G U R E 1 8 Attitude performance when the aerial vehicle follows autonomously the desired references.

Time [s]

Figures 19 and 20 are used to illustrate the control inputs responses, U 1 is the controller responsible of achieving that each component x , y and z of the quadrotor converge to x r , y r and z r respectively. Similarly, the control signal responses U φ , U θ and U ψ ensure attitude convergence to φ → φ r , θ → θ r and ψ → ψ r = 0.

[N]

F I G U R E 1 9 Main control performance when following the translational trajectory.

Note from Figure 20 that a chattering effect is displayed in the attitude control inputs due to the "sign" function which is present in the controllers. This chattering could be reduced by changing the "sign" functions by saturations, or a hyperbolic tangents, however, this would compromise the robustness of the system towards external disturbances.

Time [s]

| CONCLUSION

In this paper, a nonlinear algorithm for tracking dynamic trajectories was proposed. The control scheme was obtained using a sliding mode approach which contains integral sliding properties. The algorithm was deduced step by step, and validated numerically and experimentally. The controller has robustness properties to compensate external and unknown disturbances or nonlinear uncertainties from the beginning time instant.

A dynamic trajectory was also proposed and conceived with properties for autonomous take-off, circular motion and landing for a quadrotor. The mathematical representation of the aerial robot was taken into account for designing the trajectory. The physical movements of the aerial vehicles were also taken into account to design the initial positions of the vehicle.

The proposed controller and the trajectory were validated in numerical simulations and also in flight tests. Results corroborate the good performance of the proposed trajectory-control scheme.

Since this work only tackled control design and validation problems, the topic of identifying external disturbances bounds was not addressed, future work will include the use of adaptive terminal sliding mode techniques, to identify uncertainties and disturbances.

| THEOREM PROOF Proof Considering that the exponential functions, e (n(t -T F 1 )) ∈ f (t ) for 0 ≤ t < T F 1 and e (n(t -T F 2 )) ∈ f (t ) for 0 ≤ t < T F 2 , are increasing functions with values inferior than one, then, it is easy to verify that if n k < n k +1 0 < e (nk +1 (t -T F 1 )) < e (nk (t -T F 1 )) < 1, (53a)

0 < e (nk +1 (t -T F 2 )) < e (nk (t -T F 2 )) < 1. (53b) DefineT F 1 ≤ T F 2 < T F , then -T F 2 ≤ -T F 1 , which also implies that t -T F 2 ≤ t -T F 1 and taking n > 0 ⇒ n (t -T F 2) ≤ n (t -T F 1)
, as consequence e (n(t -T F 2 )) ≤ e (n(t -T F 1 )) . Therefore for all 0 ≤ t < T F 2 ,

f (t ) f (t ), (54)
and also if T F 1 ≤ T F 2 and for all T F 2 ≤ t ≤ T F the following equality

f (t ) = f (t ) = 1 is satisfied. F I G U R E 2 1 f (t ) and f (t ) analysis.
f (t ) and f (t ) can be analyzed in Figure 21. Observe in this figure that when n increases, f (t ) remains small and close to zero for almost the entire time interval 0 ≤ t < T F 1 , even when t approaches T F 1 . From inequality (54) also f (t ) ≈ 0, therefore, it is possible to consider that, for all 0 ≤ t < T F 1 , g (t ) and ḡ (t ) becomes

g (t ) = 1 -f (t ) :≈0 ≈ 1 & ḡ (t ) = 1 -f (t ) :≈0 ≈ 1.
The previous implies that for the time interval 0 ≤ t < T F 1 , the trajectory ( 14) is approximately equal to [START_REF] Lukyanov | Optimal nonlinear block-control method[END_REF].Then it is possible to achieve circular take-off movements to a desired altitude h as illustrated in Figure 3.

The previous implies that for all T F 1 ≤ t ≤ T F , ẋ1r , ẏ1r and ż1r are given by ẋ1r = µ 2 x 1r + γ 2 y 1rx 1r (x 2 1r + y 2 1r ) + e -kx (t -T F 1 ) σ x (TF 1) , ẏ1r = -γ 2 x 1r + µ 2 y 1ry 1r x 2 1r + y 2 1r + e -k y (t -T F 1 ) σ y (TF 1) , ż1r = -k z 1rz 1r (0) + e -kz (t -T F 1 ) σ z (TF 1) , with µ 2 ≤ 0 and (γ 2 > 0 or γ 2 < 0).

F I G U R E 2 3 Bifurcation cases for the interval T F 1 ≤ t ≤ T F .

Notice that v x and v y were designed such that σ x , σ y → 0 asymptotically, implying that x 1r , y 1r → (0, 0) in a spiral motion according to the convergence cases with T F 1 = 15, 17 and 19 seconds given in Figure 23. Similarly v z was designed to σ z → 0 such that z 1r → z 1r (0) asymptotically, this means that v x , v y and v z are necessary for achieving

x 1r , y 1r , z 1r → 0, 0, z 1r (0) in the time interval T F 1 ≤ t ≤ T F , and thus producing landing. The previous is illustrated in Figure 5, where the landing trajectory to 0, 0, z 1r (0) is presented as a solid (blue) line.

With Case1, the landing stage of movement is obtained such that, together with the first stage of movement, the first scenario has been completed.

Case 2:

T F 1 < T F 2 .
The trajectory is defined in the interval T F 1 ≤ T F 2 < T F , and 0 ≤ t < T F 2 , then f (t ) f (t ). From Case 1, if

T F 1 = T F 2 then f (t ) = f (t ). Therefore the only possibility for the inequality T F 1 < T F 2 is that f (t ) < f (t ) 0 ≤ t < T F 2 .

Observe that T F 1 ≤ t < T F 2 , thus f (t ) = 1. In this way f (t ) < 1 and f (t ) ≈ 0 even when t is close to T F 2 . Then T F 1 ≤ t < T F 2 is possible consider that g (t ) = 0 and ḡ (t ) = 1.

Therefore, for T F 1 ≤ t < T F 2 the trajectory ( 15) is approximately equal to ẋ1r = x 2r , ẏ1r = y 2r , ż1r = z 2r , ẋ2r = v x , ẏ2r = v y , ż2r ≈ u z .

(57)

Similarly the initial conditions of the position and velocity are given by x 1r T F 1 , y 1r T F 1 , z 1r T F 1 and x 2r T F 1 , y 2r T F 1 , z 2r T F 1 . The derivatives for σ x and σ y were previously obtained, the changing value in this case is the altitude, thus

Ṡz = u z + k z 2r .
This implies that σx = -kx σ x , σy = -k y σ y , Ṡz = -k z S z ,

with positive gains kx , k y and k z . The asymptotic solutions of (56) are given by σ x (t ) = e -kx (t -T F 1 ) σ x (TF 1) , σ y (t ) = e -k y (t -T F 1 ) σ y (TF 1) and S z (t ) = e -kz (t -T F 1 ) S z (TF 1) for all T F 1 ≤ t < T F 2 , graphically it can be seen in Figure 24. F I G U R E 2 4 σ x , σ y and S z behavior in the interval time T F 1 ≤ t < T F 2 .

The previous implies that ẋ1r , ẏ1r and ż1r in the time interval T F 1 ≤ t < T F 2 are given by ẋ1r = µ 2 x 1r + γ 2 y 1rx 1r (x 2 1r + y 2 1r ) + e -kx (t -T F 1 ) σ x (TF 1) , ẏ1r = -γ 2 x 1r + µ 2 y 1ry 1r x 2 1r + y 2 1r + e -k y (t -T F 1 ) σ y (TF 1) , ż1r = -k z 1rh + e -kz (t -T F 1 ) S z (TF 1) , with µ 2 ≤ 0 and (γ 2 > 0 or γ 2 < 0).

Notice that v x and v y produce that σ x , σ y → 0 asymptotically, in consequence ẋ1r → µ 2 x 1r + γ 2 y 1rx 1r (x 2 1r + y 2 1r ), ẏ1r → -γ 2 x 1r + µ 2 y 1ry 1r x 2 1r + y 2 1r , implying that x 1r , y 1r → (0, 0) in a spiral motion. u z makes that S z → 0, ż1r → -k z 1rh , and z 1r → h asymptotically. Therefore v x , v y and u z are necessary for achieving x 1r , y 1r , z 1r → (0, 0, h) in the interval time T F 1 ≤ t < T F 2 , and producing the spiral movement around (0, 0, h). This is illustrated in solid (blue) line in the Figure 25.

F I G U R E 2 5 Circular take-off trajectory with spiral motion around (0, 0, h).

Once proved that, for all 0 ≤ t < T F 2 and considering T F 1 < T F 2 , the proposed trajectory ( 15) is valid for take-off and circular movement stages at a desired altitude h. The final step is then to prove that for all T F 2 ≤ t ≤ T F , [START_REF] Utkin | Sliding Mode Control in Electromechanical Systems[END_REF] produces also a landing trajectory. Notice that f (t ) = f (t ) = 1 for all T F 2 ≤ t ≤ T F , then g (t ) and ḡ (t ) are zero. This implies that system becomes as (55) with initial position and velocity conditions given by x 1r (T F 2 ), y 1r (TF 2) , z 1r (TF 2) and x 2r (TF 2) , y 2r (TF 2) , z 2r (TF 2) .

The asymptotic solutions of are given by σ x (t ) = e -kx (t -T F 2 ) σ x (TF 2) , σ y (t ) = e -k y (t -T F 2 ) σ y (TF 2) and σ z (t ) = e -kz (t -T F 2 ) σ z (TF 2) for all T F 2 ≤ t ≤ T F , the performance of these solutions can be seen in Figure 26.

  t) = e -kyt S y (0)

F

  I G U R E 7 Quadrotor control diagram, including trajectory generation, attitude and position control algorithms.

2 F I G U R E 8

 28 Uncertainties performance ξ 1 , ξ 2 and ξ 3 .

1 e x 1 = x 1 -x 1r e y 1 = y 1 -y 1r e z 1 = z 1 3 e x 2 =

 1111132 x 2 -x 2r e y 2 = y 2 -y 2r e z 2 = z 2 -z 2r F I G U R E 1 0Translational errors performances when the quadrotor tracks the proposed trajectory.

2 Time 1 F I G U R E 1 3 25 F I G U R E 1 4

 213254 it is possible to analyze the good performance of the position control U 1 while achieving trajectory tracking. Fast converge of the virtual angular variables to their references, i.e. φ 1 f → φ 1r and θ 1 f → θ 1r Attitude control signals performance; U φ , U θ and U ψ . Position control behavior.

Figure 15

 15 Figure 15 illustrates the quadrotor position response in 3D when during the flight tests. Notice also in Figure 16 a 2D view from Figure 15, remark here the good real-time performance of the control scheme.

7

 7 Quadrotor position response when following in real-time the desired trajectory.

4 F

 4 I G U R E 2 0 Control inputs responses for the attitude stabilization and tracking desired angles.

  K dx ėx 2 , Vy = -K py e y 2 -K dy ė y 2 , and Vz = -K pz e z 2 -K dz ėz 2 . Therefore ux = -(3x 2 1r + y 2 1rµ 1 ) ẋ2r + k x x 2r -(2x 1r y 1rγ 1 ) ẏ2r + k x y 2r -2x 1r y 2 2r + 3x 2 2r -4x 2r y 1r y 2rk x ẋ2r , uy = -2x 1r y 1r + γ 1 ẋ2r + k y x 2r -(3y 2 1r + x 2 1rµ 1 ) ẏ2r + k y y 2r -2y 1r x 2 2r + 3y 2 2r -4y 2r x 1r x 2rk y ẏ2r , uz = -(δzg ) (k + k z )k z k z 2r ,

	and vx , vy , vz are defined as
	vx = -(3x 2 1r + y 2 1r -µ 2 ) ẋ2r + kx x 2r -(2x 1r y 1r -γ 2 ) ẏ2r + kx y 2r -2x 1r y 2 2r + 3x 2 2r -4x 2r y 1r y 2r -kx ẋ2r ,

vy = -2x 1r y 1r + γ 2 ẋ2r + k y x 2r -(3y 2 1r + x 2 1rµ 2 ) ẏ2r + k y y 2r -2y 1r x 2 2r + 3y 2 2r -4y 2r x 1r x 2rk y ẏ2r , vz = -(δzg ) k + kzkz k z 2r .

Funding information

This research was partially supported by Mexican CONACYT Project 262931. This work has been sponsored by the French government research program Investissements d'avenir through the Robotex Equipment of Excellence (ANR-10-EQPX-44)

Remember that the complete trajectory is defined for T F 1 ≤ T F 2 < T F , thus two cases are also studied:

Clearly f (t ) = f (t ), and for all t ≥ T F 1 it follows that f (t ) = f (t ) = 1. Therefore g (t ) and ḡ (t ) are zero. This implies that for all T F 1 ≤ t ≤ T F , trajectory [START_REF] Utkin | Sliding Mode Control in Electromechanical Systems[END_REF] is reduced to

where the initial conditions of the position and velocity are given by

Then obtaining the derivatives of σ x , σ y and σ z given in [START_REF] Zhihong | Terminal sliding mode control of MIMO linear systems[END_REF] results in

Substituting v x , v y and v z from (16) into the above, it yields

with positive gains kx , k y and kz . The asymptotic solutions of (56) are given by σ x (t ) = e -kx (t -T F 1 ) σ x (TF 1) , σ y (t ) = e -k y (t -T F 1 ) σ y (TF 1) and σ z (t ) = e -kz (t -T F 1 ) σ z (TF 1) for all T F 1 ≤ t ≤ T F , see Figure 22.

Time [sec] Time [sec] Time [sec]

F I G U R E 2 6 σ x , σ y and σ z behavior in the interval time T F 2 ≤ t ≤ T F All the above implies that ẋ1r , ẏ1r and ż1r in the interval time T F 2 ≤ t ≤ T F are given by

with µ 2 ≤ 0 and (γ 2 > 0 or γ 2 < 0).

Finally with the development of Case 2, two stages of movement (spiral motion and landing to a desired point) are obtained, which together with the first stage of movement (circular take-off to a desired altitude h), the second scenario has been completed.


L F Sanchez

H Abaunza

P Castillo
email: castillo@hds.utc.fr

User-Robot Interaction For Safe Navigation of a Quadrotor

Keywords: Quadrotor, Quaternion, Gesture Command, Unmanned Aerial Vehicles, User-Robot Interaction

This paper introduces an intuitive and safe command approach for a quadrotor, where inertial and muscular gestures are used for semi-autonomous flight. A bracelet composed by gyroscopes, accelerometers, and electromyographic sensors is used to detect user gestures, then an algorithm is proposed to interprete the signals as flight commands. The main goal is to provide a wearable, easy-to-handle human-machine interface for users a to safely command this kind of vehicles, even for inexpert operators. Safety measures are incorporated in the scheme to further enhance the user's experience. Experimental tests are performed to validate the proposal.

Introduction

Unmanned Aerial Vehicles (UAVs) have become increasingly popular in recent years due to their versatility, agility and their overall capability of performing a wide array of tasks which include surveillance, film shooting, or search and rescue missions. However, more applications of these systems are being developed at an increasing rate, including complex task such as payload manipulation, exploring unstructured environments, and directly interacting with humans and other robots. The growing complexity of modern tasks that involve UAVs will require more advanced techniques to ensure the safety of surrounding humans, while avoiding work overload on operators. Some works have explored techniques safely interact with aerial vehicles in more intuitive ways, for example, a multimodal ground control station for UAVs composed by voice commands, tactile displays, gesture tracking and haptic devices was introduced in ref. [START_REF] Maza | Multimodal interface technologies for uav ground control stations[END_REF], while ref. [START_REF] Orsag | Humanin-the-loop control of multi-agent aerial systems[END_REF] employed camera arrays, sound signals, graphical user interfaces, and an inertial joystick to control a group of three quadrotors. These works provide users with a more complete feedback of information, which enhances the situational awareness during missions, however, this does not directly change the commands given to the UAVs.

Meanwhile, methods for command-based voice teleoperation of mobile robots have also been explored, for instance in ref. [START_REF] Poncela | Command-based voice teleoperation of a mobile robot via a human-robot interface[END_REF], where a speech recognition system was developed over an acoustic voice model to identify a set of predefined commands to fly a quadrotor. Another speech-based algorithm for robot control was introduced in ref. [START_REF] Medicherla | Human-robot interaction via voice-controllable intelligent user interface[END_REF], where a learning technique was added for adapting to user preferences and capabilities on the go.

Furthermore, since an important part of human communication comes from gestures, gesture recognition technologies have been also explored for robot control, providing more intuitive ways to interact with robotic systems. An early multimodal approach for a gestural human-machine interface for disabled users to remotely manipulate familiar objects in unstructured environments is presented in ref. [START_REF] Kazi | Knowledge driven planning and multimodal control of a telerobot[END_REF]. In ref. [START_REF] Lementec | Recognition of arm gestures using multiple orientation sensors: gesture classification[END_REF], researchers used inertial handheld sensors to identify arm gestures by measuring Euler angles sequences, which were then classified as user commands for flying a hypothetical UAV in ref. [START_REF] Urban | Recognition of arm gestures using multiple orientation sensors: Repeatability assessment[END_REF],while ref. [START_REF] Redrovan | Hand gestures recognition using machine learning for control of multiple quadrotors[END_REF] employed an armband to measure muscular gestures that trigger movements on group of simulated agents.

Visual-based gestural interface for commanding drones was explored in ref. [START_REF] Nahapetyan | Gesture recognition in the problem of contactless control of an unmanned aerial vehicle[END_REF], where camera systems were used to track user gestures that were then interpreted as translational commands of a quadrotor. In ref. [START_REF] Costante | Personalizing vision-based gestural interfaces for hri with uavs: a transfer learning approach[END_REF], frame-by-frame image processing and learning algorithms were used to identify body gestures made by the user, which were also interpreted as flight commands for a UAV. Facial recognition software has also been explored for engaging interaction with quadrotors, such that hand gestures can then be captured by cameras, and used to command the vehicles. 11 More recent proposals seek to exploit the capabilities of readily available devices like the Microsoft Kinect for recognizing gestures that define position references for a quadrotor. 12 Ref. [START_REF] Vadakkepat | Fuzzy logic controllers for navigation and control of ar. drone using microsoft kinect[END_REF], proposed a fuzzy algorithm to control the velocity of a quadrotor, following arm movements performed by a user. However, this kind of devices are very dependent on environmental conditions such as light intensity, or presence of other humans in the scenario, even if they provide an entertaining way to interact with UAVs, their actual implementation on quadrotor operation results unpractical.

Wearable and EMG (electromyographic) devices present a completely different approach for gesture recognition methods and viable control schemes for robotics applications. The use of non-invasive EMG techniques for commanding simulated robots have been explored by some researchers, 14 their potential application in different fields including medical human-machine interfaces have also been studied; 15 proving the viability of this kind of interaction approaches. Some works have employed devices that combine EMG sensors with Inertial Measurement Units (IMUs) in a wearable armband to track different kinds of human gestures. 16 In ref. [START_REF] Akhmadeev | A testing system for a real-time gesture classification using surface emg[END_REF], the authors used such devices to recognize hand postures using pattern recognition strategies. In ref. [START_REF] Kucukyildiz | Design and implementation of a multi sensor based brain computer interface for a robotic wheelchair[END_REF], an armband was used along other sensors to control a wheelchair by tracking the gestures of its user.

Applications of wearable motion detection sensors for aerial vehicles have been studied by some recent works. For instance ref. [START_REF] Fernandez | Natural user interfaces for human-drone multi-modal interaction[END_REF] uses a hand motion sensor along other devices to detect gestures, interpreted as high-level commands for a quadrotor. Ref. [START_REF] Choi | Wearable gesture control of agile micro quadrotors[END_REF] used the inertial sensor signals of a wearable smartwatch as attitude references for a commercial quadrotor. However, most of these works propose limited solutions to this problem, mainly using out of the shelf products with default settings as in refs. [START_REF] Delpreto | Plug-and-play supervisory control using muscle and brain signals for real-time gesture and error detection[END_REF][START_REF] Muresan | Autonomous flight and real-time tracking of unmanned aerial vehicle[END_REF][START_REF] Côté-Allard | Towards the use of consumer-grade electromyographic armbands for interactive, artistic robotics performances[END_REF][START_REF] Sun | Gesture-based piloting of an aerial robot using monocular vision[END_REF][START_REF] Peshkova | Exploring intuitiveness of metaphor-based gestures for uav navigation[END_REF], which reduce the flexibility of the proposal. Furthermore, safety measures for limiting hazardous gestures are not considered, compromising the safety of operators, specially for novice users.

In this work we propose an intuitive, user friendly, and portable approach for the navigation of a quadrotor based on the aforementioned capabilities of wearable armbands, equipped with EMG sensors and an IMU. Previous results from our team were presented in ref. [START_REF] Sanchez | Safe navigation control for a quadcopter using user's arm commands[END_REF], where a preliminary approach was proposed to pilot a quadrotor with a sensorequipped armband. Our proposal interprets the user's arm orientation and muscular signals as flight commands for a drone and requires a minimal amount of gear for its operation. This scheme is composed by two parts; firstly, brute attitude reference signals will be acquired from the bracelet inertial sensors. These signals will be processed through nonlinar algorithms, such that they are attenuated in small values (commonly produced by involuntary movements), then amplified in the higher-end of the operation range, and saturated and limited for greater and hazardous values such that the user has a more intuitive and safe interaction with the quadrotor. Secondly, the EMG sensors will be used along the inertial measurements to develop a gesture based command which seeks to exploit unconventional flight maneuvers of the drone. Finally, a quaternion-based control algorithm, which ensures the stability of the quadrotor dynamic equations, is used to track the proposed navigation references in real-time experiments. Furthermore, our gesture based command improves the vehicle's usability due to its intuitive input for orientation commands and a mild learning curve for more complex tasks, requiring only a few minutes and a brief explanation to get a grasp of the interface.

The outline of this paper is the following: In section 2, an approach to interpret inertial measurements from the user's forearm postures as safe quadrotor flight commands is introduced. Algorithms to interpret muscular gestures as flight instructions using electromyographic signals are presented in Section 3. A description of the safety measures put in place to assure the UAV's operation is explained in Section 4. A quaternion-based control strategy which commands the vehicle's attitude in closed loop is described in 5. Flight tests developed to demonstrate the performance of the proposed scheme are detailed in Section 6. Finally, conclusions and future work are discussed in Section 7.

User commands for attitude references

Consider a scenario where a quadrotor is piloted using arm gestures from its pilot with the objective of giving them an intuitive and safe flight experience. If the vehicle follows blindly all the movements from the input device, aggressive unintended rotations could arrive from an unexperienced user, which might be dangerous for the vehicle and people around it.

In order to address this problem, algorithms will be introduced to put constraints on the vehicle such that it operates under safe flight conditions.

Attitude gestures

Let four coordinate systems be represented as I, M 0 , M, and B, which locate respectively at the global fixed frame, the initial bracelet pose, the rotating coordinates of the pilot's forearm, and the quadrotor body frame, see Figure 1, such that the rotation between I and M 0 is given by a constant quaternion q M0 defined as

q M0 =    cos ψ 0 2 ,   0 0 sin ψ0 2      ⊗    cos θ 0 2 ,   0 sin θ0 2 0      ⊗    cos φ 0 2 ,   sin φ0 2 0 0      , (1)
where θ 0 , φ 0 , and ψ 0 represent the forearm's initial pitch, roll, and yaw angles. Then, the rotation from M 0 to M is defined by

q M (t)=    cos ψ M 2 ,   0 0 sin ψ M 2      ⊗    cos θ M 2 ,   0 sin θ M 2 0      ⊗    cos φ M 2 ,   sin φ M 2 0 0      , (2)
where φ M , θ M , and ψ M symbolize the time variant Euler angles from M 0 to M. The quadrotor attitude commands are defined as a function of the angular variations experienced on the user's forearm q M (t), i.e., if the user tilts his arm, the quadrotor should undergo a correspondent motion along the same axis. This allows the user to get a more natural feel on how the drone will behave since it will essentially mimic the user's arm orientation.

However, a direct correspondence between the armband orientation q M (t) and that one of the drone could result in undesired behaviors. Any person (specially inexperienced and nervous operators) is susceptible of doing involuntary small movements while bending their arm to interact with the quadrotor. Furthermore, excessive arm tilts could result in vertical poses, which would turn perpendicularly the drone, crashing it to the ground.

Therefore, it is necessary to implement some safety motion restrictions to prevent the drone from performing a risky rotations. Introducing a quaternion reference as

q R (t) =    cos ψ R 2 ,   0 0 sin ψ R 2      ⊗    cos θ R 2 ,   0 sin θ R 2 0      ⊗    cos φ R 2 ,   sin φ R 2 0 0      , (3)
the reference pitch, roll, and yaw angles can be designed follow a cube relation with the original orientation values, such that, for small angles, the resulting orientation will be attenuated, while for greater inclinations, the vehicle will perform more reactive and agile maneuvers. Hence, their values can be computed according to

θ R (θ M ) =    θ 3 M S θ ; θ M ≤ 3 θmax S θ θ max ; θ M > 3 θmax S θ , (4)
φ R (φ M ) =    φ 3 M S φ ; φ M ≤ 3 φmax S φ φ max ; φ M > 3 φmax S φ , (5)
ψ R (ψ M ) = ψ M , (6)
being θ max and φ max the maximum tilt allowed on the reference angles (θ R and φ R ) respectively, while S θ , S φ < 1 are tunning parameters that improve the sensitivity of the command along them, and must be selected such that

3 φ max S φ , 3 θ max S θ < 1. (7)
Note from ( 4) and ( 5) that cubic relationships are followed by the attitude reference with respect to the forearm rotation, nevertheless [START_REF] Urban | Recognition of arm gestures using multiple orientation sensors: Repeatability assessment[END_REF] implies that the attitude gesture signals are cubically attenuated, see Figure 2. These cubic expressions also mean that higher values for these parameters translate into the quadrotor performing more aggressive movements in response to the user's arm motion; while lower values will cause the quadrotor to perform slower in response to the same arm motion, the tilting will also be diminished as the sensitivity values approach zero until the drone remains totally unresponsive.

The range of rotation and the velocity at which tilt limits θ max or φ max are reached, depend on the sensitivity parameters S θ and S φ , as can be seen in Figure 2. These parameters are tuned to enhance the user's comfort and experience: advanced users might prefer higher sensitivity values for sharper, faster maneuvers while beginners may prefer lower values for slower, easier to follow movements.

Electrical references from skeletal muscles

For this work, a pose will be defined as any combination in the fingers and wrist disposition, see Figure 3. Consider the armband contains eight electromyographic sensors, such that each one detects electrical activity in the superficial layers of the arm muscles and translates its intensity into an 8-bit value ranging from -127 to 128, see Figure 4. The combination and interpretation of these measurements can be used to detect five manufacturer predefined poses (wave in, wave out, double tap, fist, rest and spread fingers), or be used as raw data as well.

1 5 0 1 0 0 5 0 0 -5 0 -1 0 0 -1 5 0 2 0 0 0 1 5 0 0 1 0 0 0 5 0 0 0 samples (n) signal intensity (u) (a) A single EMG sensor for a resting arm. Some of the predefined poses can be, at times, triggered incorrectly, mainly when the armband is passed from one user to another. The double-tap predefined pose, which is performed by tapping the middle finger and thumb in quick succession, was deemed as the most reliable of these; since it was always triggered when the user intended to. A second pose was required for this proposal, having ran out of reliable predefined poses a custom pose was proposed.

Custom Gesture

The custom pose in Figure 5 works by measuring and adding up the electrical raw muscle activity in the user's arm or fingers collected from all eight sensors of the array. Once it surpasses a certain threshold it is checked to ascertain the intentionality of the command and then the signal is sent, this is the command used to set the custom rotation reference, which is mostly used when the user drifts too much apart from his starting position. The raw measurement of the total muscular activity in the subject's arm can be computed by

σ EM G (t) = 8 i=1 |EM G i (t)|, (8)
where EM G i (t) is the measure for each electrode.

Let b symbolize the muscular activity threshold and

f 1 (t) = 1 + sign(σ EM G (t) -b) 2 (9)
be the function that verifies whether or not the raw muscular activity in the user's arm has surpassed threshold b. Define c and d as parameters that will verify the intentionality of the gesture. c is defined as a whole number greater than zero, and d as a rational number such that 0 < d < 1, by checking c number of samples from (9) at different instants of time, i.e.

f 2 (t) = c i=0 f 1 (t -i) (10)
Besides, parameter d effectively refers to the least amount of times that threshold b has to be surpassed within c samples in order to be considered as a valid pose. This can be explained in the following:

f 3 (t) = sign(f 2 (t) -dc), (11)
signifying f 3 (t) = 1 that the pose has been successfully triggered and f 3 (t) = -1 or f 3 (t) = 0 means that the pose has not been triggered.

Input based on a gesture sequence

Once the bracelet signals are processed, the next goal is to apply them for controlling the aerial robot. The transition between the user's arm orientation and drone attitude reference is relatively natural; however, if the user wants to perform more specific tasks, it is necessary to device a different set of gestures. At Heudiasyc lab, in collaboration with CINVESTAV Saltillo, a nonlinear controller was developed to perform quadrotor pirouettes in closed loop. 27 The aim in the arm command algorithm is to indicate the drone when to perform acrobatic maneuvers using the user gestures.

A sequence triggered by a double-tap pose was chosen, consisting in two stages: After the double-tap gesture, the user has L t1 milliseconds to either perform the follow up for a single, double or triple quadrotor pirouette, see Figure 6.

If the user begins a gesture sequence during L t1 an additional L t2 milliseconds are provided during which the rest of the sequence is to be performed, this amounts L t1 + L t2 milliseconds during which the user has to perform the whole sequence. The quadrotor will perform the intended mission immediately thereafter, or, it will remain hovering if the sequence fails to be performed correctly. The method used to define each sequence is the following; first, since the gesture is performed by tilting the forearm upwards and downwards a vertical boundary b θ M was set around the initial frame M 0 . Gestures can then be identified by the way the user's arm orientation transitions between these regions by following

f G1 (t) = 1 + sign(θ M (t) -b θ M ) 2 - 1 -sign(θ M (t) + b θ M ) 2 . ( 12
)
Define a scalar function, which depends on discrete evaluations of ( 12) as

ρ = 2 i=0 f G1 (t i ) + f G1 (t i-1 ), (13)
where t i is the time instant where the value of f G2 (t) changes, marking the transition between any two adjacent poses. The value of [START_REF] Vadakkepat | Fuzzy logic controllers for navigation and control of ar. drone using microsoft kinect[END_REF], is finally assigned to specific tasks for the drone according to the following Other missions can also be performed by these gestures if required.

Safe Human-UAV Interaction

Human error is always a possibility in semi-autonomous navigation. In order to decrease its impact, safety measures were developed to allow more intuitive commands and a more enjoyable user experience. These also ensure safety by avoiding unintended maneuvers that might result in crashes.

IMU based safety measures

An additional orientation-based safety measure is implemented by defining two boundaries φ lim and θ lim in the event when the user would drop his arm. Should this happen, the orientation reference for θ R and φ R will be set to 0 to ensure safe hovering, User-Robot Interaction For Safe Navigation of a Quadrotor this is achieved by enhancing (4), ( 5) and ( 6) as

θ R (θ M ) =        θ 3 M S θ ; θ M ≤ 3 θmax S θ θ max ; 3 θmax S θ < θ M ≤ θ lim 0 θ lim < θ M , ( 14
) φ R (φ M ) =        φ 3 M S θ ; φ M ≤ 3 φmax S φ φ max ; 3 φmax S φ < φ M ≤ φ lim 0 ; φ lim < φ M , ( 15
) ψ R (ψ M ) = ψ M , (16)
where φ lim and θ lim are thresholds where the user's arm is considered to be beyond the acceptable, see Figures 7 and8. 60°>θ M >-60°θM >-60°θM >60°F igure 8: θ M orientation references considered within the accepted range.

EMG based safety measures

The electromyographic capabilities of the device were also used to make it safer. As previously mentioned, there are 7 pre-programmed muscular poses p each assigned a default numeric value, see Figure 9 and Table II. Furthermore, the bracelet can detect whether or not is it being worn by a user, and it will remain locked l(t) until the unlocking pose is performed (double tap pose while its locked). For this proposal: 6 (unknown) will determine whether or not the bracelet is being worn, 5 (double tap) will be used as the unlocking pose (as well as begin loop command), and 0 (resting position) will be used a neutral reference. Therefore the chosen poses for our application are: P = {0, 5, 6}.

Once communication between the ground station and the bracelet is enabled, the bracelet must be unlocked by performing the double tap pose according to [START_REF] Akhmadeev | A testing system for a real-time gesture classification using surface emg[END_REF]. l(t 0 ) = 0 for P = 5 1 for P = 5 , l(t) = 0 for P = 6 l(t 0 ) for P = 6 .

(

) 17
If the user suddenly removes the bracelet data transmission is stopped, then θ R and φ R angles are set to zero while ψ R remains in the last reference recorded such that

θ R (t) =        l(t)θ 3 M S θ ; θ M ≤ 3 θmax S θ l(t)θ max ; 3 θmax S θ < θ M ≤ θ lim 0 ; θ lim < θ M , ( 18
) φ R (t) =        l(t)φ 3 M S θ ; φ M ≤ 3 φmax S φ l(t)φ max ; 3 φmax S φ < φ M ≤ φ lim 0 ; φ lim < φ M , ( 19
) ψ R (t) = l(t)ψ M + (1 -l(t))ψ M (t -1). (20)

Additional safety measures

As a required safety measure to ensure the laboratory material integrity, a joystick command device is always kept at hand by a more experienced operator who can, at a moments notice, override the armband navigation commands in order to deliver the quadrotor from hazard. This safety layer is included by defining the actual reference quaternion q d , which will be introduced to an attitude controller in the next section.

q d (t) = q joy , override on , q R , override off , (21)
where q joy represents a quaternion computed from a dual-joystick device, following remote piloting conventions.

Inner Quaternion attitude control

Quaternion control has been proved to be robust avoiding singularities points in quadrotor flights. An inner attitude control based on quaternions is used to control the quadrotor vehicle. The vehicle attitude dynamic model is considered as

d dt q ω =   1 2 q ⊗ ω J -1 (τ -ω × J ω)   (22)
where q describes the vehicle orientation, ω denotes the angular velocity, J introduces the inertia matrix with respect to the body-fixed frame and τ is the torque vector caused by the action of the motors. The control law which stabilizes [START_REF] Muresan | Autonomous flight and real-time tracking of unmanned aerial vehicle[END_REF] to the desired reference is then defined as

τ = -J(K i 2 ln(q ⊗ q * d ) + K i ω) + ω × J ω, (23)
where K i ∈ R 3 denotes the control gains, and q d defines the desired attitude quaternion representing the user references from [START_REF] Delpreto | Plug-and-play supervisory control using muscle and brain signals for real-time gesture and error detection[END_REF]. More details can be found in. 28 The reference quaternion can be computed as

q d = q d0 , [q d1 q d2 q d3 ] T s z , (24)
with

q d0 = cos ψ d 2 cos θ d 2 cos φ d 2 + sin ψ d 2 sin θ d 2 sin φ d 2 , q d1 = cos ψ d 2 cos θ d 2 sin φ d 2 -sin ψ d 2 sin θ d 2 cos φ d 2 , q d2 = cos ψ d 2 sin θ d 2 cos φ d 2 + sin ψ d 2 cos θ d 2 sin φ d 2 , q d3 = sin ψ d 2 cos θ d 2 cos φ d 2 -cos ψ d 2 sin θ d 2 sin φ d 2 , (25)
quaternions are known to be singularity-free and continuous, however, discontinuities can be passed on to the control law by the original Euler representation of the armband; causing the drone to behave erratically. s z represents a term which makes a sign change for q d to avoid such discontinuities, and is defined as

s z = -1 if |ψ(t) -ψ(t -t δ )| > π, 1 otherwise, (26)
where t δ symbolizes the signal sampling period. The quadrotor pirouette maneuvers are performed autonomously thanks to the quaternions-based control law developed in ref. [START_REF] Oliva-Palomo | Nonlinear ellipsoid based attitude control for aggressive trajectories in a quadrotor: Closed-loop multiflips implementation[END_REF].

Experimental results

The internal control algorithm for quadrotor navigation was programmed using the Fl-AIR (Framework libre AIR) C++ libraries, 29 and uploaded to a Parrot AR drone 2 with a completely re-flashed firmware, also based on the Fl-AIR framework.

The brute attitude commands were measured by a sensor-equipped bracelet. 30 This device is equipped with three main sensors; a gyroscope, an accelerometer, and an array of eight electromyographic (EMG) sensors. The safety signal treatment and gesture interpretation algorithms were coded on Python2, with a communication layer based on the PyoConnect library. 31 The armband communicates its sensor data via bluetooth into a ground station. This data is handled by the Python program which processes the attitude references and the EMG measures interpretation routines. Data output from this algorithm is handed over to the internal UAV controller via UDP (User Datagram Protocol) using wireless communications. This program handles the commands for the drone attitude and contains the control laws needed for its operation. see Figure 10.

Attitude safety restrictions:

The first flight test consisted on controlling the vehicle attitude using arm gestures, at some moments, the user performed high inclinations which could result in dangerous movements if managed incorrectly. However, the proposed algorithm restricts such rotations by following [START_REF] Kucukyildiz | Design and implementation of a multi sensor based brain computer interface for a robotic wheelchair[END_REF] and [START_REF] Fernandez | Natural user interfaces for human-drone multi-modal interaction[END_REF], where the angular limits were set at θ lim = φ lim = 15 • . Figure [START_REF] Monajjemi | Hri in the sky: Creating and commanding teams of uavs with a vision-mediated gestural interface[END_REF] represents the quadrotor attitude behavior. The effects of the safety pitch and roll bounding, translated into quaternion references can be appreciated in Figures 11b and11c, while Figure 11d indicates a complete rotation over the yaw angle by a continuous change of the q 3 value from 1 to -1. q 0 q d0 (a) First test q 0 quaternion component, switching its value from -1 to 1 each time a full 360 • rotation is performed. (c) First test q 2 , this represents the quaternion y component. At the beginning and end of the test, rotations around the user's body axis were performed, resulting in multiple 360 • yaw rotations, since the user movements are not restricted over the z axis, the given reference is tracked integrally.

Time [s]

Time [s]

Time [s]

To give a better illustration of the attitude behavior, the Euler representation for the same test can be observed in Figures 12 to 14 Note from the detailed zoom on the pitch and roll signals, that a smooth transition happens between near-zero poses and the maximal permitted attitude value. This behavior is an effect of the attenuation functions from ( 18)- [START_REF] Choi | Wearable gesture control of agile micro quadrotors[END_REF].

Remark also that the desired values are thoroughly maintained very close to zero when the vehicle is desired to hover in a fixed position. This happens regardless of the operator's involuntary small movements, which occur due to natural oscillations of the human arm when trying to hold a fixed pose. Discontinuities in the roll and pitch angles are never present due to the imposed constraints in the algorithms, as well as those from natural human anatomy. However, discontinuities in yaw movements using Euler representation appear whenever a full turn is performed, since the value of this angle suddenly changes from 180 to -180 deg, as can be seen in Figure 14. However, when using quaternion representation these discontinuities are not present, as seen in Figure 11d.

Time [s]

Time [s]

EMG commands:

In the second test, the user performed muscular gestures corresponding to a triple-loop, a double-loop, and a single loop consequently, Figure 15 illustrates attitude quaternion performance of this experiment. User's arm attitude commands (b) Quaternion component q 1 , following only the piloting references. (c) Quaternion component q 3 , maintaining the bracelet reference. It is worthy of mention that, since this approach attenuates the effects of involuntary movements. Novice users (which are unaware of all the algorithms that run to provide this intuitive interaction) tend to require less time to grasp the movements required to interact with the vehicle, and also display less signs of mental fatigue and stress, compared to using a classical joystick.

Time [s]

Time [s]

Time [s]

Conclusion & Future work

A safe and intuitive navigation approach for semi-autonomous flight of a quadrotor was proposed in this paper. The scheme is composed by two main components. Firstly, a gesture-based attitude reference is computed to adapt orientation signals that ensure a safe operation of the quadrotor. This is achieved by distinguishing small involuntary movements from piloting gestures and limiting extreme rotations that could be hazardous.

Secondly, EMG gesture sequences were used to trigger commands for performing predefined tasks with the drone. Safety measures and customizable sensitivity parameters made the interface easier to handle for inexperienced users by reducing the learning curve and overall achieving a more intuitive command scheme.

The proposed algorithms were validated in experimental flight tests where a user commanded a quadrotor, tested the proposed safety measures, and performed a series of gestures, including multiple loop maneuevers. Future work will consist on identified customized hand gestures using electromyographic signals that can be measured with this bracelet. A machine learning approach has been considered to identify a gestural profile for each individual user through computational intelligence. The aim will be to enable each operator to use the gestures that are more convenient for their personal preferences.

Figure 1 :

 1 Figure 1: Reference frames for quadrotor attitude reference.

Figure 2 :

 2 Figure 2: From left to right, greater values θ M and φ M are required to reach tilt limit a as sensitivity values S θ and S φ decrease.

Figure 3 :

 3 Figure 3: Examples of poses, respectively: a fist, fingers spread, folded wrist. Image via https://support.getmyo.com

  EMG signal when the muscle is tighten.

Figure 4 :

 4 Figure 4: Resting and tense muscular EMG measurements for one sensor

Figure 5 :

 5 Figure 5: Example of the custom pose, fingers are to be held tightly in place as if firmly holding a spherical object.

1 2 3 Figure 6 :

 36 Figure 6: Example of the gesture sequence to be performed in order to trigger a triple loop command.

Figure 7 :

 7 Figure 7: φ R with safety limit put in 1.047 rad (60 • ).

Figure 9 :

 9 Figure 9: Default preprogrammed poses. From left to right poses 1 through 5 respectively. Image via https://support.getmyo.com

Figure 10 :

 10 Figure 10: Communication process involved in the armband-UAV interface.

  First test q 1 , this represents the x component of the quaternion.

  First test q 3 , representing the vehicle rotation over its z axis.

Figure 11 :

 11 Figure 11: Quadrotor attitude quaternion tracking

  . Notice how the saturation occurs in θ d and φ d whenever the 15 degrees (0.261 radians) is reached. A close-up view of the pitch and roll signals is included to better illustrate such behavior.

Figure 12 :Figure 13 :

 1213 Figure 12: Roll response using φ d from the bracelet, reference signal is bounded to safe values between ±15 • .

Figure 14 :

 14 Figure 14: Yaw response using ψ d from the bracelet. Notice how discontinuities appear in yaw Euler representation when a full 360 • turn is performed.

  Notice how the sign of q 0 is inverted whenever a loop is performed Time[s]

  q 2 component, sinusoidal oscillations indicate when a pirouette is performed.

Figure 15 :

 15 Figure 15: Quadrotor attitude tracking during a looping experiment In contrast, close-ups of the Euler angles equivalent responses of this experiment are depicted in Figure16, here, two undesired effects are revealed, since the pirouettes are performed over the y axis, Figures16a and 16creveal a Gimball-lock effect, where multiple roll and yaw angles are possible when the pitch angle reaches a singular value. Figure16billustrates a triple pitch loop, passing through discontinuities three consecutive times.

  Close up of the φ euler angle during the triple loop maneuver. Notice the discontinuities in φ and the Gimball lock in φ d . Time [s]

  Close up of the θ angle triple loop maneuver, a triangular ramp behavior is the result of the quaternion to Euler angles conversion.Time [s]

  Close up of the ψ angle. Notice how ψ diverges from ψ d due to the quaternion to Euler angles transformation.

Figure 16 :

 16 Figure 16: Euler angles representation of the quadrotor attitude during looping tests

table :

 :

	ρ value	Gesture	Number of loops
	ρ = 0	No gesture detected	One Loop
	ρ = 2	Up, down, up	Two loops
	ρ = -2	Down, up, down	Three loops
	otherwise	Unassigned gesture	One Loop

Table I :

 I Gesture assignment to detection function

Table II :

 II getmyo.com Predefined poses and correspondent action.

	P numeric value	pose name	pose action
	0	resting position	neutral reference
	1	fist	unused
	2	wave in	unused
	3	wave out	unused
	4	spread fingers	unused
	5	double tap	unlock device, trigger loop
	6	unknown	lock device if not worn

Acknowledgments

This work was done in the context of a PhD thesis supported by the French M.E.S.R.I, and the Mexican CONACYT program for postgraduate scholarships.

The authors would also like to thank the French National Network of Robotics Platforms (ROBOTEX, ANR-10-EQPX-44).