1 Introduction

Quadcopters have been the most preferred multi-rotor aerial robot configuration for civilian applications (Aijun and Shamshirband, 2016; Tofigh et al., 2018; Derrouaoui et al., 2022). Due to their simplicity and versatility, quadcopters have attracted the attention of a large part of control and robotic scientific communities in front of other types of UAVs (Shraim et al., 2018). However, quadcopters have some disadvantages; for example, it is an underactuated system, unstable, with nonlinearities and fast dynamics as well as couplings between their different loops. Nevertheless, these disadvantages represent a challenge for the control scientific community (Saeed et al., 2015). One of the main problems for commercial multi-rotors is that their inner control architecture is not conceived for compensating aggressive wind-gust or rotors failures. This problem makes the aerial vehicles not safe for their use on civil applications (or in populated areas). The solutions given in the literature solve only one problem. For example; for dealing with external high disturbances, robust (and/or adaptive) controllers have been proposed (Lopez-Sanchez et al., 2021; Bisheban and Lee, 2021; Fang et al., 2018; Izaguirre-Espinosa et al., 2019), in the case of rotors failures some solutions are given using fault-tolerant control methodologies (Song et al., 2019; Pan et al., 2021; Ban et al., 2020; Ortiz-Torres et al., 2020).

In particular, robustness issues may be critical for quadcopter control since it can be subjected to undesired nonlinear dynamics and external disturbances. In order to weaken the effect of wind gusts, some authors have proposed complex control techniques to achieve stability. In Yang et al. (2020), Jin et al. (2020) and Labbadi and Cherkaoui (2020) adaptive controllers with different structures were proposed and verified by simulations and experiments on test a bench. However, others researchers preferred to apply a Disturbance Observer Based Control (DOBC) strategy for attenuating external/internal disturbances. Among the most used DOBC techniques, it is worth to highlight the followings (Guo and Liang Zhao, 2011; Huang and Xue, 2014; Chen, 2004). In these works, the Disturbance Observer (DOB) uses the transfer function of the system to compare the analytical desired performance with the real one and then, the difference between these inputs of these systems is taken as the disturbance. Despite several works found in the literature that propose guaranteeing robustness of the system, few of them bounds the control inputs for limiting the energy applied in the system. This is because in some cases, bounding the control input only guarantees the robustness in a small range of external disturbances (Chen et al., 2020).

Bounding the control input is a challenge when implementing theoretical control results in real systems. This is due to the fact that, if the control signal exceeds the control inputs limits, it may lead to undesirable behavior of the system and therefore loose the stability. The maneuvering flight of quadrotors may lead to actuator saturation, which commonly affects the flight quality, including trajectory-tracking accuracy. To address actuator saturation during the maneuvering flight of quadrotors, an attitude controller based on the conditioned super-twisting algorithm (CSTA) was designed in Chang et al. (2023). The authors replace the sign function by a hyperbolic tangent function, which suppresses the chattering of the CSTA. In Tripathi et al. (2020) the anti-windup approach was proposed and applied for the autonomous landing problem for UAVs. This anti-windup algorithm was based on the property of convergence for marginally stable linear plants with saturated inputs. Furthermore, in Faessler et al. (2017) an iterative thrust-mixing scheme based on the LQR approach, to compute the desired single rotor thrusts and a prioritizing motor-saturation, was validated in real-time tests. In Smeur et al. (2018), a cascade integration of Incremental Nonlinear Dynamic Inversion (INDI) for the attitude and position control of micro aerial vehicles is addressed. Wind tunnel experiments show that the vehicle can enter and leave the 10 m/s wind tunnel flow with only 21 cm maximum position deviation on average.

In most of all these works, the desired collective thrust and body torques need to be converted into four single rotor thrusts. Consequently, it can be applied by means of the mapping from motors commands to rotor thrusts, i.e., thrust mapping (Faessler et al., 2017). For autonomous navigation, aerial vehicles need robust control systems to compensate the adverse effects produced by parametric and non-parametric uncertainties, unknown dynamics and atmospheric disturbances (Azar et al., 2021; Belmouhoub et al., 2022). In flight real-time applications the robot is exposed to these undesired situations, therefore, the controller computes a large amount of energy for counteracting them. Thus, if this energy is sent without a priori knowledge and during large periods of time, the actuators can be overheated and damaged leading to poor performance or undesirable crashes. This situation happens because they have physical constraints that often are not considered when computing the control law, e.g. maximum angular velocity in a motor.

In this work, we propose a simple and efficient robust bounded control algorithm for handling aggressive wind-gust and rotor failures. The control architecture is composed of a disturbance observer and a nominal controller (e.g. controller of a commercial aerial vehicle). Our control design considers the bound of the physical actuators for (1) obtaining optimal bounded control inputs and (2) preventing the saturation of the motors when the system requests extra energy to counteract aggressive disturbances. To the best of our knowledge, this is the first time that disturbances rejection, rotors failures compensation and optimal bounds for actuators are included together in one control algorithm. Our architecture is validated also experimentally in real-time flights under unconventional conditions for high wind-gusts and Loss of Effectiveness (LoE) in two rotors.

The rest of the paper is organized as follows: in Sect. 2, the dynamic model of quadrotor is recalled. The optimal bounded robust control scheme is addressed in Sect. 3. Experimental real-time tests to demonstrate the good performance of the proposed architecture, are provided in Sect. 4. Finally, conclusion and future work are discussed in Sect. 5.

Notation vectors are expressed by bold lower case letters, i.e., \({\varvec{v}}\), while matrices are represented by bold upper case letters, e.g. \({\varvec{R}}\). Therefore, scalar letters will be denoted by normal lower case letters.

2 Problem formulation

The dynamic model of a quadcopter can be described by representing the vehicle as a 3D rigid body, which is driven by forces and torques generated by the propellers, see Fig 1. Therefore, the nonlinear model of the quadcopter using the Newton–Euler formalism can be expressed as Castillo et al. (2005)

$$\begin{aligned} \begin{aligned}&\dot{{\varvec{\xi }}}(t) = {\varvec{v}}(t), \\&{m}\ddot{{\varvec{\xi }}}(t) ={\varvec{R}}(t){\varvec{F}}(t) -mg{\varvec{e}}_z, \\&\dot{{\varvec{R}}}(t) = {\varvec{R}}(t)\hat{{\varvec{\Omega }}}(t), \\&{\varvec{J}}\dot{{{\varvec{\Omega }}}}=-{\varvec{\Omega }}(t)\times {\varvec{J}}{\varvec{\Omega }} (t)+{\varvec{\tau }}(t), \end{aligned} \end{aligned}$$
(1)

where \({\varvec{\xi }} (t)\) denotes the vector position of the vehicle with respect to the inertial frame \({\mathscr {I}}\), \({\varvec{v(t)}}\in {\mathscr {I}}\) describes its linear velocity, \({\varvec{\Omega }} (t)\) represents the angular velocity of the body defined in \({\mathscr {B}}\), and m is its total mass. The constant moment of inertia is \({\varvec{J}}\) expressed in \({\mathscr {B}}\), \({\varvec{\tau }}(t) \triangleq [u_2,u_3,u_4]\) expresses the torques applied in the rigid body, \(\hat{{\varvec{\Omega }}}(t)\) introduces the skew-symmetric matrix of \({\varvec{\Omega }} (t)\), \({\varvec{R}}(t)\) means the rotation matrix from the body \({\mathscr {B}}\) to the inertial \({\mathscr {I}}\) frames, and \({\varvec{F}}(t)\triangleq [0,0,u_1]\) is the force vector applied to the robot.

Fig. 1
figure 1

Quadcopter aerial vehicle representation. \({\mathscr {I}} = \{x_I, y_I z_I \}\) denotes the inertial frame, and \({\mathscr {B}} = \{x_B, y_B,z_B \}\) the body frame attached to center of mass of the vehicle. \(f_i\) expresses the force applied of motor i

In this work, it is assumed that the thrust \(f_i \approx k_f w_{M_i}^2\), and torque, \(\tau _{M_i} \approx k_\tau w_{M_i}^2\), of each propeller are directly controlled by the angular rate of the motor, \(w_{M_i}\), with \(k_f\) and \(k_\tau \) are aerodynamic thrust and torque factors, respectively. Therefore, from (1) and Fig. 1, \({\varvec{F}}\) and \({\varvec{\tau }}\) can be written as \({\varvec{F}}=[0, 0, \sum _{i=1}^{4}f_i]^T\) and \({\varvec{\tau }}=[l(f_1+f_4)-l(f_2+f_3), l(f_1+f_2)-l(f_3+f_4),k_\tau (-f_1+f_2-f_3+f_4)]^T\), with l representing the distance from the center of mass to the point where the force is applied.

Thus, the following relation for the control inputs can be established based on the angular rate of the rotors

$$\begin{aligned} \bar{{\textbf{u}}} = \begin{bmatrix} u_1\\ u_2\\ u_3\\ u_4 \end{bmatrix}= \begin{bmatrix} k_f&{}k_f&{}k_f&{}k_f\\ k_f l&{} -k_f l&{}-k_f l&{}k_f l\\ k_f l&{}k_f l &{}-k_f l &{}-k_f l \\ -k_{\tau }&{} k_{\tau }&{} -k_{\tau }&{} k_{\tau } \end{bmatrix} \begin{bmatrix} \omega _{M_1}^2\\ \omega _{M_2}^2\\ \omega _{M_3}^2\\ \omega _{M_4}^2 \end{bmatrix}. \end{aligned}$$
(2)

Bounding the controller without degrading the closed-loop system performance is a challenge, and several works have been proposed in the literature (Sun et al., 2017; Cabecinhas et al., 2012; Li et al., 2017; Wang et al., 2021; Gruszka et al., 2013; Konstantopoulos et al., 2016). Nevertheless, most of them only consider the bound in the control laws without taking into account their actuators allocation. In this work, we propose an optimal bounded control algorithm for quadrotor aerial vehicles. The control law is composed by two parts; one dedicated to stabilize the vehicle when it is close to ideal conditions. The second one is capable of estimating and compensating the endogenous and exogenous properties of the system, such as undesired dynamics (produced by fault in motors) or external perturbations. In addition, the controller is developed to find the optimal values of the control law to avoid saturation or overheat the actuators. The proposed optimal bounded robust control architecture is depicted in Fig. 2.

3 Optimal bounded robust control scheme

System (1) can be also expressed as a perturbed nonlinear system with the form

$$\begin{aligned} \dot{{\textbf{x}}}(t)= & {} {\textbf{A}}{\textbf{x}}(t)+{\textbf{B}}\bar{\textbf{u}}(t) +{{\textbf{f}}({\textbf{x}},\bar{\textbf{u}},t)}+{\textbf{d}}(t) \end{aligned}$$
(3)

where \({\textbf{A}}\in \mathbb {R}^{nxn}\) and \({\textbf{B}}\in \mathbb {R}^{nxm}\) are the system matrices, \({\textbf{x}}(t) =[{\varvec{\xi }}, {\varvec{\eta }}]^T\in \mathbb {R}^{n}\) and \(\bar{\textbf{u}}(t)\in \mathbb {R}^m\) are the state and control vectors respectively, \({{\textbf{f}}({\textbf{x}},\bar{\textbf{u}},t)}:\,\mathbb {R}^{n}\times \mathbb {R}\times \mathbb {R}^{+}\rightarrow \mathbb {R}^{n}\) defines an unknown non-linear function, and \({\textbf{d}}(t):\mathbb {R}^{+}\rightarrow \mathbb {R}^{n}\) denotes the vector of unknown external disturbances. \({\varvec{\eta }}\) represents the attitude vector of the vehicle, with \( \mathbf {\Omega } = {\textbf{W}}_\eta \dot{\mathbf {\eta }}\) and \({\textbf{W}}_\eta \) defines the standard kinematics relation between \(\mathbf {\Omega }\) and \({\varvec{\eta }}\). The full state is assumed to be measurable. The equations of the model (1) can be written in the form of (3) as Bouabdallah et al. (2004):

$$\begin{aligned} {\textbf{A}}= \begin{bmatrix} {0_6}&{}&{}{I_6}\\ {0_6}&{}&{}0_6 \end{bmatrix},~ {\textbf{B}}= \begin{bmatrix} {0_6}\\ \bar{{\textbf{B}}} \end{bmatrix}, {\textbf{f}}= \begin{bmatrix} {0_6}\\ \bar{{\textbf{f}}} \end{bmatrix}, ~ {\textbf{d}}= \begin{bmatrix} {0_6}\\ \bar{{\textbf{d}}} \end{bmatrix} \end{aligned}$$

where \(\bar{{\textbf{d}}} = [{\textbf{d}}_{\xi }, {\textbf{d}}_{\eta }]^T\), \(\bar{{\textbf{B}}}= [m^{-1},m^{-1}, (m^{-1}-g), I_x^{-1},I_y^{-1}, I_z^{-1}]^T\) and \(\bar{{\textbf{f}}}\) is composed by \({\bar{f}}_1 = \frac{\cos \phi \sin \theta \cos \psi + \sin \phi \sin \psi }{m}u_1\), \({\bar{f}}_2=\frac{\cos \phi \sin \theta \sin \psi - \sin \phi \cos \psi }{m}u_1\), \({\bar{f}}_3 = \frac{u_1}{m}(1-\cos \phi \cos \theta )\), \({\bar{f}}_4 = \frac{(I_y-I_z)}{I_x}\dot{\theta }\dot{\psi } - \frac{J}{I_x}\dot{\theta } \Omega \), \({\bar{f}}_5 = \frac{(I_z-I_x)}{I_y}\dot{\psi }\dot{\phi } + \frac{J}{I_y}\dot{\phi } \Omega \) and \({\bar{f}}_6 = \frac{(I_x-I_y)}{I_z}\dot{\theta }\dot{\phi }\).

Fig. 2
figure 2

Block diagram of the control structure. \({\textbf{u}}_{n}\) and \({\textbf{u}}_{\zeta }\) correspond to the nominal control action and the control rejection part, respectively, \(\xi _d\) is the desired reference. \(\xi \), \(\eta \) means the position and attitude states. \({\bar{u}}\) and \(u^*\) represent the proposed controller and the set of its optimal and bounded values, respectively. The quadratic problem block deals with the motors constraints and \(\zeta \) represents external disturbances

Assumption 1

The nonlinear function \(\frac{\partial [{\textbf{f}}(x, {{\bar{u}}})+{\textbf{B}}{{\bar{u}}}]}{\partial {{\bar{u}}}}\ne 0\), for all \(({\textbf{x}},\bar{\textbf{u}}) \in \mathbb {R}^{n} \times \mathbb {R}^m\).

Assumption 2

The lumped disturbance \({\textbf{f}}(x, {{\bar{u}}})+ {\textbf{d}}(t)\) is bounded as well as its derivative.

3.1 Control law

The goal is to regulate the state x(t) of the closed-loop system so that it asymptotically tracks the state of the reference model

$$\begin{aligned} \dot{{\textbf{x}}}_q(t) = {\textbf{A}}_q {\textbf{x}}_q(t)+ {\textbf{B}}_q r_q(t), \end{aligned}$$
(4)

where \({\textbf{x}}_q \in \mathbb {R}^{n}\), \({\textbf{A}}_q \in \mathbb {R}^{n\times n}\) and \({\textbf{B}}_q \in \mathbb {R}^{n \times m}\) are the state vector, the state matrix and the control vector, respectively and \(A_q\) a Hurwitz matrix.

The goal is that \({\textbf{x}}\rightarrow {\textbf{x}}_{q}\), therefore, the following error can be proposed

$$\begin{aligned} {\textbf{e}}=({\varvec{\xi }}- {\varvec{\xi }}_q, {\varvec{\eta }} - {\varvec{\eta }}_q)^\top = {\textbf{x}}-{\textbf{x}}_{q}. \end{aligned}$$
(5)

Differentiating (5) and using (3), (4) such that adding and subtracting \({\textbf{A}}_q {\textbf{x}}\) it holds that

$$\begin{aligned} \dot{{\textbf{e}}} = {\textbf{A}}_{q} {\textbf{e}}- \Gamma , \end{aligned}$$
(6)

with

$$\begin{aligned} \Gamma= & {} {\textbf{A}}{\textbf{x}}-{\textbf{A}}_q {\textbf{x}}- {\textbf{B}}_{q}r_q + {\textbf{B}}\bar{\textbf{u}}+ {\textbf{f}}({\textbf{x}},\bar{\textbf{u}},t) + {\textbf{d}}(t) \end{aligned}$$

Observe that if \(\Gamma \rightarrow 0\) then (6) will be asymptotically stable. Hence, \(\bar{{\textbf{u}}}\) can be proposed as

$$\begin{aligned} \bar{\textbf{u}}= & {} {\textbf{B}}^{+}\left[ \overbrace{\left[ ({\textbf{A}}_q - {\textbf{A}}){\textbf{x}}+ {\textbf{B}}_q r_q \right] }^{{\textbf{u}}_n} -\underbrace{\left[ {\textbf{f}}({\textbf{x}},\bar{\textbf{u}},t) + {\textbf{d}}(t) \right] }_{{\textbf{u}}_{\zeta }}\right] \end{aligned}$$
(7)

where \({\textbf{B}}^{+}=({\textbf{B}}^{T}{\textbf{B}})^{-1}{\textbf{B}}^{T}\) corresponds to the pseudo-inverse of \({\textbf{B}}\). The first part of the proposed control law concerns to the reference tracking performance of the linear system (4). On the other hand, \({\textbf{u}}_\zeta \) will contain the non-linear part of the controller. Then, the goal will be to compute \({\textbf{u}}_n\) and \(u_{\zeta }\). \({\textbf{u}}_n={\textbf{K}}{\textbf{x}}(t)+{\textbf{B}}^+{\textbf{B}}_{q} \textbf{r}_q(t)\), with \({\textbf{K}}={\textbf{B}}^+({\textbf{A}}_q - {\textbf{A}})\) representing the control part for stabilizing the system in ideal conditions.

In addition, observe that \({\textbf{u}}_{\zeta } \) is a function of unknown variables, i.e., \({\textbf{u}}_{\zeta } = {\textbf{f}}({\textbf{x}},\bar{{\textbf{u}}},t)+{\textbf{d}}(t)\), and therefore it is difficult to estimate this parameter in this form. However, using (3), it can be rewritten as

$$\begin{aligned} {\textbf{u}}_{\zeta } = {\textbf{B}}^+ [ {\textbf{A}}{\textbf{x}}+ {\textbf{B}}\bar{\textbf{u}}- \dot{{\textbf{x}}}]. \end{aligned}$$
(8)

From (8), we can deduce that the unknown dynamics and disturbances can be estimated from the known dynamics of the systems and control signal. Computing \({\textbf{u}}_\zeta \) in the form (8) is not causal but \({\textbf{u}}_\zeta \) will be implemented in a micro-controller. Hence for solving it, the Laplace transform is applied. Then, (8) becomes

$$\begin{aligned} {\textbf{u}}_{\zeta }(s)= {\textbf{G}}_{f}(s) {\textbf{B}}^+ [ {\textbf{A}}{\textbf{x}}(s)+{\textbf{B}}\bar{\textbf{u}}(s) -s {\textbf{x}}(s)]. \end{aligned}$$
(9)

Assume \({\textbf{G}}_{f}(s)\) is a strictly proper stable low-pass filter with unity gain and zero pahse shift over the spectrum of the uncertain term \({\textbf{f}}({\textbf{x}},{\bar{\textbf{u}}},t) + {\textbf{d}}(t)\). From Assumption 2, the asymptotic stability of the closed-loop system for multi-rotor vehicles can be demonstrated as in Zhong and Rees (2004).

3.2 Bounded observer

In quadrotor systems the real control inputs are related with the energy computed by the motors using the relation of the control inputs \(\bar{\textbf{u}}\), as can be stated in (2), for obtaining the angular velocities of each motor. This relation is often obtained when the control laws \(\bar{\textbf{u}}\) need to be transformed into the real control inputs, i.e., the actuators (motors). For the quadrotor vehicle it can be expressed as

$$\begin{aligned} {\textbf{M}} = {\textbf{H}}\bar{\textbf{u}}, \end{aligned}$$
(10)

with

$$\begin{aligned} {\textbf{M}} = \begin{bmatrix} M_1(t) \\ M_2(t) \\ M_3(t) \\ M_4(t) \end{bmatrix}; \hspace{1cm} \bar{\textbf{u}}= \begin{bmatrix} u_1(t) \\ u_2(t) \\ u_3(t) \\ u_4(t) \end{bmatrix} = \begin{bmatrix} u_{n_1}+u_{\zeta _1}\\ u_{n_2}+u_{\zeta _2}\\ u_{n_3}+ u_{\zeta _3}\\ u_{n_4}+ u_{\zeta _4} \end{bmatrix}; \end{aligned}$$

and \({\textbf{H}}\) denotes the allocation control matrix with the form

$$\begin{aligned} {\textbf{H}}= \begin{bmatrix} 1&{}\quad 1&{}\quad 1&{}\quad -1\\ 1&{}\quad -1&{}\quad 1&{}\quad 1\\ 1&{}\quad -1&{}\quad -1&{}\quad -1\\ 1&{}\quad 1&{}\quad -1&{}\quad 1 \end{bmatrix} \end{aligned}$$

Notice that (10) represents the real robust control input applied to the ith actuator (\(M_i\)) for controlling the aerial vehicle. If the vehicle is affected by external disturbances or undesired dynamics, the controller needs to be able to estimate and compensate them. However, when the quadrotor is dealing with aggressive and constant perturbations or repetitive missions (tests), the motors can be overheated in several cases, resulting in a physical damage or degradation on its performance. For avoiding that, it is necessary to compute a set of the optimal bounded control inputs, \({\textbf{u}}^*\), from \(\bar{\textbf{u}}\).

Hence, \({\textbf{u}}^*\) can be obtained as

$$\begin{aligned} {\textbf{u}}^*= {\varvec{\delta _M}}^T\bar{{\textbf{u}}}, \end{aligned}$$
(11)

where \({\varvec{\delta _M}}^T=[\delta _1~\delta _2~\delta _3~\delta _4]\) with \(\delta _i\) defining a factor for fulfilling the rotors constraints. The bounds for the motors control inputs can be found solving the following quadratic problem

$$\begin{aligned}{} & {} \min _{{\varvec{\delta _M}}}~~\frac{1}{2} {\varvec{\delta _M}}^{T} {\textbf{Q}}{\varvec{\delta _M}} + {\textbf{c}}^{T} {\varvec{\delta _M}} \end{aligned}$$
(12)
$$\begin{aligned}{} & {} st.~~{\textbf{A}}_M {\varvec{\delta _M}} \le {\textbf{b}}, \end{aligned}$$
(13)

where \({\textbf{Q}}\in \mathbb {R}^{n\times n}\) is symmetric, \({\textbf{c}}\in \mathbb {R}^{n}\), \({\textbf{A}}_M \in \mathbb {R}^{p\times n}\), \( {\textbf{b}}\in \mathbb {R}^{p}\) are matrices and vectors that define the optimization problem (Nocedal and Wright, 2006). These parameters are obtained for finding the minimum of the quadratic problem with a cost-to-go function defined as

$$\begin{aligned} f_o= \sum _{i=1}^{4}Q_i({\bar{u}}_i-u_{i}^*)^2, \end{aligned}$$
(14)

where \(Q_i\) is a weight value penalizing the control input. Developing the above equation, it follows that

$$\begin{aligned} f_o = \sum _{i=1}^{4}Q_i({\bar{u}}_i^2-2\delta _i {\bar{u}}_i^2+\delta _i^2 {\bar{u}}_i^2). \end{aligned}$$
(15)

From (15), note that the first term \({\bar{u}}_i^2\) in parentheses does not affect the computation of the minimum of the quadratic problem, thus, it can be neglected. Developing (15) for \(i=1:4\) and rewriting them in matrix form, it yields

$$\begin{aligned} f_o=\frac{1}{2} {\varvec{\delta _M}}^{T} {\textbf{Q}}{\varvec{\delta _M}} + {\textbf{c}}^{T} {\varvec{\delta _M}}, \end{aligned}$$

with

$$\begin{aligned} \begin{aligned} {\textbf{Q}}&= \begin{bmatrix} Q_1 {\bar{u}}_1^2 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad Q_2{\bar{u}}_2^2 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad Q_3{\bar{u}}_3^2 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad Q_4{\bar{u}}_4^2\\ \end{bmatrix}, \hspace{0.5cm} {\varvec{c}}&= \begin{bmatrix} -Q_1{\bar{u}}_1^2\\ -Q_2{\bar{u}}_2^2\\ -Q_3{\bar{u}}_3^2\\ -Q_4{\bar{u}}_4^2\\ \end{bmatrix}. \end{aligned} \end{aligned}$$

let us introduce the constraints on the motors control inputs with the form , where \(\bar{\sigma }_i\) and are the upper and lower bounds of the motors, respectively. Moreover, define \(u_0^*\) as the equilibrium point of the aerial robot at hover position, in other words, the \(u_1\) needed to compensate the weight of the vehicle.

For finding condition (13), consider the case of the motor \(M_1 \le \left| \sigma _1 \right| \). Thus, taking into account the weight compensation \(u_0^*\) and using (10) with the optimal value of \(\bar{\textbf{u}}\) (11), it follows that

$$\begin{aligned} \left| \delta _1 \right| \left| {\bar{u}}_1 \right| + \left| \delta _2 \right| \left| {\bar{u}}_2 \right| + \left| \delta _3 \right| \left| {\bar{u}}_3 \right| - \left| \delta _4 \right| \left| {\bar{u}}_4 \right| \le \left| \sigma _1 \right| - u_0^*. \end{aligned}$$
(16)

Rewriting the previous equation in a general form, it follows that

$$\begin{aligned} \left| \sum _{i=1}^{4}\pm \delta _{i}{\bar{u}}_i \right| \le \left| \bar{\sigma }_i \right| - u_0^*. \end{aligned}$$
(17)

Therefore, using (17) for all the motors (\(i \in \left[ 1,4 \right] \)), it is possible to find the values of Eq. (13) as

Notice that with the previous equations it is possible to obtain the optimal bounded values \({\textbf{u}}^*\) by solving the optimization problem (12) with constraints (13).

Once obtained these values in \({\textbf{u}}^*\), the disturbance observer (9) can be rewritten in terms of the optimal inputs (11) as

$$\begin{aligned} {\textbf{u}}_{\zeta }(s)= {\textbf{G}}_{f}(s) {\textbf{B}}^+ [ {\textbf{A}}{\textbf{x}}(s)+{\textbf{B}}{\textbf{u}}^*(s) -s {\textbf{x}}(s)] \end{aligned}$$
(18)

with \(G_f(s)=\frac{1}{T_fs+1}\), and \(T_f>T\), being T the sample-time. The asymptotic stability of the closed-loop system for multi-rotor vehicles can be demonstrated as in Sanz et al. (2017).

4 Experimental results

The practical goal of these experiments is to validate the proposed control architecture. To better illustrate the good performance of the optimal bounded robust controller (11), it is compared, in two scenarios, with respect to its nominal form (7). It is worth to mention that both algorithms have a low computational cost, which permits to be implemented in low cost CPU. The experimental tests are performed in a quadcopter vehicle AR Drone 2. Its firmware was modified to work under the software Fl-AIR - free Framework AIR which is open source and runs a Linux-based operating system, capable of implementing a wide range of control schemes, see Lab (2012). An OptiTrack motion capture system was used to estimate the vehicle’s position, while its internal Inertial Measurement Unit (IMU) measures its orientation and angular rates. A video of the experimental results can be seen in https://youtu.be/El7xDcuCas8

The control parameters are presented in the Table 1. Here, \({{\bar{K}}}_{1_i}\), \({{\bar{K}}}_{2_i}\), express the gains of the controller \({\textbf{u}}_n\) for each subsystem, \(i:\phi , \theta , \psi , x, y, z\). Each state in (4) can be considered decoupled and modeled by a double integrator with the form \(G(s)=b/s^2\) such that b can obtained experimentally for each state. For control implementation the following low-pass filter \(G_f=1/(Ts+1)\) is used, with \(T_f\) representing its bandwidth. The Eiquadprog library (LAAS-CNRS, 2009), which uses the algorithm of Goldfarb and Idnani, was implemented for the solution of the convex quadratic problem (12) with constraints (13).

Table 1 Gain parameters used in the experimental tests

The control gains \({\bar{K}}_{1_i}\) and \({\bar{K}}_{2_i}\) of the nominal controller \({\textbf{u}}_n\) were tuned in the following way; first, the yaw control gains are tuned and once this dynamics is stabilized, the pitch (or roll) dynamics is tuned as well. The next step is to tune the control gains of the altitude and later the longitudinal (or lateral) dynamics. In each subsystem, the velocity (angular or translational) needs to be tuned first. The observer parameter \(b_i\) was obtained experimentally using the Pseudo Random Binary Sequence (PRBS) method while the parameter \(T_{f}\) was also tuned experimentally using the condition \(0< T_{f} < 1\).

4.1 First scenario: Aggressive wind-gust

Most of the aerial robot applications are developed in outdoors environments where robustness with respect to wind is a primary task. The goal of the first scenario is to show the performance of the quadcopter while it is at hover, subject to aggressive constant and intermittent wind-gust.

Our experiment is considered aggressive as a result of exposing the quadrotor to wind gusts with an airflow speed of 60 km/h and placed at 1.5m of the source of this wind. Some works in the literature present experimental results with wind disturbances generated with nozzle or fans (or similar) generating up to 6m/s of environmental wind, see for example (Byun et al., 2020; Alexis et al., 2010; Waslander and Wang, 2009). The tool used for emulating the wind gusts in our experiment is a leaf blower Bosch AVS1. The wind used in this work consists of two main components, a static dominant wind direction and strength, and a wind gust model dependent on a standard power spectral density. In the experiment the quadrotor is at hover position (\(x(0)=0,\ y(0)=0,\ z(0)=1 \) all in meters) and the wind-gusts are applied for perturbing the aerial vehicle in different directions. A video of the experimental results can be seen in https://youtu.be/0SrcbkVlmUg.

In Fig. 3 the performance of the vehicle in 3D space subject to high wind-gust is introduced. Notice the better performance of the optimal bounded robust controller \({\textbf{u}}^*\) with respect to \(\bar{{\textbf{u}}}\). The position behavior of the drone is depicted in Fig. 4. In the experiment the wind-gust was directed to the y-axis the firsts 20s. Note that both approaches suffer a degradation in their performance, nevertheless it is clear that when using \({\textbf{u}}^*\), this degradation (specially in z) is smoother.

Fig. 3
figure 3

Scenario 1: Quadrotor position performance when using the UDE-based conntroller and the proposed architecture \({{\textbf{u}}}^*\). Notice that when using the UDE-based conntroller \(\bar{{\textbf{u}}}\), the performance is degraded and thus the error increases. This error is smaller when using the robust bounded controller \({{\textbf{u}}}^*\)

Fig. 4
figure 4

Scenario 1: System performance during flight tests

Figures 5 and 6 depicts the performance of the disturbance estimations and the motors control input. Notice the relation between these figures. When the disturbance estimation is computed in the controller for compensating these undesired dynamics, notice that the nominal controller \(\bar{\textbf{u}}\), computes higher values exceeding the limits constraints in actuators (in our case is 1). However, when the vehicle is controlled by \({\textbf{u}}^*\), observe that the aforementioned problem does not appear.

Fig. 5
figure 5

Scenario 1: Estimation of the wind disturbance on the attitude system. Observe that without the optimal control input, the estimation of the perturbations are bigger producing more instability into the system

Fig. 6
figure 6

Scenario 1: Rotors control action’s performances, when aggressive wind-gust is applied during a hover position. Notice that if the optimal control is not solved, the input applied to motors of the vehicle will exceed the security limit, 1 in our case, that can produce their saturation and/or damage of the actuators. However, when using our proposed solution, this constraint is never reached guaranteeing that the actuators will not be damaged

Fig. 7
figure 7

Scenario 2: 3D state performances in flight tests

4.2 Second scenario: Loss of effectiveness in rotors when performing a trajectory

conducting electrical inspections with drones has been an application developed through the last years. In this kind of tasks, the vehicle needs to be robust with respect to many factors, as wind-gust, possible loss of effectiveness in rotors (repetitive tasks), among others.

Fig. 8
figure 8

Scenario 2: Attitude disturbance estimation and motor control action performances

The goal of the second scenario is to show the performance of the quadcopter when two LoE in motors \(M_1\) and \(M_2\) occur while performing a desired trajectory emulating conduct electrical inspection. In this experiment, the efficiency in \(M_1\) is reduced \(40\%\) at time \(t\sim 28\)s and, later, at time \(t\sim 44\)s, the efficiency in \(M_2\) is reduced \(20\%\). A helical trajectory with the form \(x_r(t) = t\), \(y_r(t) = a\sin (t)\) and \(z_r(t) =a\cos (t)\) was chosen as desired trajectory, where a indicating the radius of the circumference. The initial conditions are defined as \(\xi _r(0)=[-1,\ 1,\ 2]^T\) in meters. A video of this experiment can be seen at https://youtu.be/rp0u8eeerh0.

Figures 7 and 8 show the performance of the quadcopter, while tracking the helical trajectory subject to LoE in two rotors. The behavior of the vehicle in 3D space is presented in Fig. 7. Notice from this figure that when the first LoE (\(40\%\)) in rotor \(M_1\) was injected, the practical stability, when using \(\bar{{\textbf{u}}}\), is compromised perturbing the drone. Moreover, this controller was not capable of guaranteeing stability of the system and therefore, it was not possible to apply the second LoE in rotor \(M_2\) because the aerial robot crashed. Nevertheless, when using \({\textbf{u}}^*\), the quadcopter can continue tracking the desired reference and even though, compensate a second LoE (\(20\%\)) in rotor \(M_2\) at time \(t\sim 44\) s.

Figure 8 introduces the behavior of the disturbance estimation and the motor control inputs. Observe from these figures that when using \({\textbf{u}}^*\), the vehicle suffers a small degradation on their performance without exceeding the physical constraints of the motors and even though, it can overcome the second LoE around \(t\sim 44\)s allowing to continue tracking the desired reference and landing safely.

5 Conclusions

An optimal bounded robust control algorithm was developed in this paper. This controller was conceived to be robust with respect to uncertain dynamics and external and unknown perturbations. Its structure contains two parts, one for stabilizing the aerial vehicle close to the ideal conditions (small angles) and the second one for estimating and compensating unknown dynamics. For improving robustness and avoid saturating the actuators of the system, the obtained controller of this scheme was bounded solving a quadratic problem in the control inputs and taking into account the motors constraints.

The proposed architecture was proved, in practice, when several wind-gust were applied while the vehicle was at hover. In addition, the scheme was also validated when loss of effectiveness (LoE) in rotors appears. Here, the practical goal was to track a desired trajectory while two LoE (one of \(40\%\) and the second of \(20\%\)) in two different motors were applied. Practical validations demonstrated the good performance of the proposed optimal bounded robust controller. Future work includes the analysis of the bounded stability region of the overall system. This implies that the bounds of the lumped term of the Eq. (3) should be addressed. In addition, the analysis of the term \(T_f\) and its variation w.r.t. time of the closed loop system will be explored for aerial transportation of suspended payload applications. Finally, the practical stability of the proposed approach when total rotor faults occurs will be investigated.