*3.2. Adaptive Outline for Control Purposes*

Adaptive control is a viable solution to avoid the use high-gain feedback or high frequency switching control actions for providing stability to many dynamic systems subjected to parametric uncertainty, unmodeled dynamics, and external disturbances [27]. In this work, we use a class of artificial neural networks for performing the tuning process

of the control gains. The B-spline artificial neural networks are suitably integrated into adaptive motion controllers, where the tracking errors and their derivatives are used as the inputs of each network. The Bs-ANN functioning is based on the constant learning process of the physically system variables, therefore, have been successfully used to deal with system non-linear terms and uncertainty [28].

A B-spline function is a polynomial mapping defined by its extremes which uses a linear combination of the mono-variable and multi-variable basis functions. The B-spline networks, as depicted in Figure 2, are associative networks capable to adjust iteratively their synaptic weights for reproducing a specific function. The author in [29] proposes the following output:

$$\begin{array}{rcl} y & = & \mathbf{a} \mathbf{w}, \quad \mathbf{w} = \begin{bmatrix} w\_1 \ w\_2 \dots \ w\_h \end{bmatrix}^T, \quad \mathbf{a} = \begin{bmatrix} a\_1 \ a\_2 \dots \ a\_h \end{bmatrix} \end{array} \tag{27}$$

where *wq y aq* are the *q*-th weight and the *q*-th basis function input, respectively; the quantity of synaptic weights is denoted by *h*. Each individual network output *y*(*t*) is used in this work for computing dynamically the control gains. In this study, we introduce different experiments where the output of the neural networks differs: in experiments 1, 2, 4, and 5, it is computed just one control parameter while in experiment 3, three control parameters are computed by the adaptive scheme.

**Figure 2.** Three layer B-spline artificial neural network structure, Bs-ANN.

The actual output vector value minus the desired value defines the minimization error, which is used as the key term for the learning process. In this work, the following instantaneous learning rule has been adopted [30]

$$w\_{\bar{l}}(t) = w\_{\bar{l}}(t-1) + \frac{\ell e\_{\bar{l}}(t)}{||\mathbf{a}(t)||\_2^2} a\_{\bar{l}}(t) \tag{28}$$

Here, represents the learning rate and *ei*(*t*) stands for the instantaneous output error. The adaptive process is achieved by the continuous training and the updating of the synaptic weights values considering the evolution of the inputs values. The Bs-ANN internal layer is constituted just by the basis functions, where the limits should be properly bounded by the adequate selection of the knot vector and basis function shape. In this proposal, four third order basis functions are employed for the adaptive scheme: two concerning the tracking error and two for the error derivative, as shown in Figure 2. It is important to mention that offline training of the Bs-ANN is performed for finding parameters during the adaptive scheme design process, in order to carry out the quadrotor to stable scenarios at the begging of the online training. To select properly these parameters, several quadrotor operational conditions are considered. The training data includes the transient and steady state response of the system, within the advantages of the proposed neural strategy, is that these data can come from an exact or approximate mathematical model or otherwise be measured data from the real system (inputs, outputs, control signals, etc.).

Thereafter, the control structure is summarized as follows: firstly, only the quadrotor position measurements are included as a feedback in order to determine the tracking errors. Later, integral reconstructors are suitably integrated for computation of the error derivatives which are used as inputs in the adaptive scheme for computing the control parameters and gains. Posteriorly, the virtual controllers *vx* and *vy* within the robust controller block are used for solving the under-actuation problem. Finally, the force and torque control inputs are injected to the system as variations of angular velocity of their four rotors, as portrayed in Figure 3.

**Figure 3.** General structure of the adaptive robust motion control scheme.
