Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Interest in using drones (that is, unmanned aerial vehicles—UAVs—with the capacity to fly semi- or fully autonomously thanks to an on-board computer and sensors [1]) for scientific investigations dates back to the 1970s. Since then, billions of dollars have been poured into research and development of military and experimental drones. Indeed, during the last years, an increased use of flying drones has been noticed. The invention of light materials, low energy consumption machines, and high performance processing units led to the construction of flexible flying robots. They can be used in a variety of applications such as vehicle tracking, traffic management and fire detection [2, 3]. Within the family of the vertical take-off and landing (VTOL) drones, unmanned quadrotor helicopters [4] that base their operation in the appropriate control of four rotors have received a growing attention, mainly due to their capability to outperform most of other types of helicopters on the issues of maneuver ability, survivability, simplicity of mechanics, and increased payloads [5]. In fact, there are several advantages to quadcopters over comparably-scaled helicopters: the simplicity of their mechanical structure, the use of four small propellers resulting in a more fault-tolerant mechanical design capable of aggressive maneuvers at low altitude, good maneuver ability, and increased payload [6]. Untapping the potential of quadrotors requires, however, advanced control designs so as to achieve precise trajectory tracking combined with effective disturbance attenuation, particularly since quadrotor’s model is highly nonlinear and their flight performance can be influenced by sudden wind gusts especially during flights in low altitudes. Moreover, the application studied in this chapter, which is the control of multiple quadrotor robots that cooperatively grasp and transport a payload in two dimensions, adds difficulty to the problem. Although the problem associated to quadrotor control has been addressed by many publications (such as those focused in PID control [7], sliding mode control [8], \(\displaystyle H_\infty \) control [9] and bounded control [10]), the novelty of the work presented herein is the application and subsequent comparison of model predictive control (MPC) [11] and linear-quadratic regulator (LQR) control techniques. To the best knowledge of the authors of this article this has not been realized before, a fact which further supports the interest of this work. Such a comparison is valuable since LQR permits to perform an optimal control law with short execution times while MPC deals with physical constraints and predictions. Execution time and physical constraints being important issues to take into account, while facing the control problem discussed in this chapter, the proposed application and comparison of MPC and LQR techniques therefore represents a useful framework aimed to provide researchers in the area with additional control possibilities.

To reach these ends, the chapter is organized as follows: Sect. 11.2 describes the system under study, while Sect. 11.3 presents the dynamic model. In Sect. 11.4, the control problem is motivated and control methodologies are developed. Section 11.5 shows and discusses the simulation results. Finally, the conclusions are exposed in Sect. 11.6.

2 System Under Study

The system under study is composed of two drones which aim to carry a load. The main feature of this system is that load carrying drones present mechanic links. These mechanic links depend on the way the drones carry the load. Therefore, it is proposed to describe this kind of system as a ball and beam system lifted by the drones. The mass center of the ball and beam models the load mass center. Figure 11.1 shows a scheme of the proposed system.

Fig. 11.1
figure 1

Drone ball and beam system

As observed in Fig. 11.1, drones are assumed to be quadrotors. The quadrotors comprises four propellers each one. The quadrotor trajectory is regulated by the angular speeds of the propellers resulting in a lift force which is referred to as \(\displaystyle f_1\) for drone 1 and \(\displaystyle f_2\) for drone 2 in Fig. 11.1. The ball and beam systems are lifted by the couple of drones by means of rigid cables with a fixed length equal to h. The beam length is equal to 2L. In addition, it is supposed that the beam is nondeformable.

For sake of simplicity, in this work it is assumed that the drones only move in the XZ plane. Specifically, the x position of the drones is fixed, while the degree of freedom is the altitude \(\displaystyle z_1\) for drone 1 and \(\displaystyle z_2\) for drone 2. Thus, the longitudinal distance between the drones is fixed to the value of the beam length (2L). The angles formed by the vertical axis and the rigid cables are denoted as \(\displaystyle \phi _1\) for drone 1 and \(\displaystyle \phi _2\) for drone 2 and the angle formed by the beam and the horizontal axis is denoted \(\displaystyle \theta \).

It is defined two different coordinate reference systems \(\displaystyle x_0Oz_0\) and \(\displaystyle x_BO_Bz_B\). The global coordinate reference system \(\displaystyle x_0Oz_0\) is located in the ground fixed in the x position corresponding to the middle distance between the drones. The local frame \(\displaystyle x_BO_Bz_B\) is located in the beam mass center.

Variables related to the gyroscopic effects are not included in this study, since the control is divided in two levels. The control structure based on two control levels has been previously proposed for tracking positioning of quadrotors [9]. In our case, the high-level control calculates the references for the lift forces \(\displaystyle f_1\) and \(\displaystyle f_2\), while the low-level control is dedicated to the drone stabilization . Herein, the drone stabilization is assumed to be perfectly controlled to be focused on the high-level control.

The main parameters of the system are listed in Table 11.1.

Table 11.1 System parameters

3 Dynamic Model

The system under study presgvented in the previous section is modeled with first principles equations. To that end, the kinematics equations are developed and afterwards the Lagrange–Euler equations are obtained.

3.1 Kinematics Equations

As previously mentioned, two different coordinate reference systems are defined. The local frame position, \(\displaystyle O_B\), at the global frame is

$$\begin{aligned} O_B=\left[ \begin{array}{c} L-h sin\phi _2 - L cos \theta \\ z_2 -h cos\phi _2 - L sin\theta \end{array} \right] . \end{aligned}$$
(11.1)

This matrix represents the transformation from local frame to global frame. The local frame speed, \(\displaystyle \dot{O}_B\), at the global frame is obtained by deriving the position with respect to the time:

$$\begin{aligned} \dot{O}_B=\left[ \begin{array}{c} -h\ \dot{\phi }_2 \ cos\phi _2 + L\ \dot{\theta } \ sin \theta \\ \dot{z}_2+h\ \dot{\phi }_2 \ sin\phi _2-L\ \dot{\theta }\ cos\theta \end{array}\right] . \end{aligned}$$
(11.2)

The ball position and speed at local frame are denoted x and \(\displaystyle \dot{x}\) and using the transformation matrices Eqs. (11.1) and (11.2), the position and speed at global frame, \(\displaystyle x_0\) and \(\displaystyle z_0\), are:

$$\begin{aligned} \begin{array}{ll} \left[ \begin{array}{c} x_0 \\ z_0 \end{array} \right] =\left[ \begin{array}{c} L-hsin\phi _2 -L cos\theta -x cos\theta \\ z_2-hcos\phi _2- Lsin\theta -xsin\theta \end{array} \right] , \\ \left[ \begin{array}{c} \dot{x}_{0} \\ \dot{z}_{0} \end{array} \right] =\left[ \begin{array}{c} -h\ \dot{\phi }_2 cos\phi _2 + (L+x) \dot{\theta } sin\theta -\dot{x} cos\theta \\ \dot{z}_2+h \dot{\phi }_2 sin\phi _2 -(L+x) \dot{\theta } cos\theta - \dot{x}sin\theta \end{array}\right] . \end{array}\end{aligned}$$
(11.3)

Given that the longitudinal distance between the drones is fixed, the angle \(\displaystyle \theta \) can be expressed as a function of angles \(\displaystyle \phi _1\) and \(\displaystyle \phi _2\):

$$\begin{aligned} \left[ \begin{array}{c} sin\theta \\ cos\theta \end{array}\right] =\frac{1}{2L}\left[ \begin{array}{c} z_2-z_1+hcos\phi _1-h cos\phi _2 \\ 2L-hsin\phi _1-hsin\phi _2 \end{array} \right] . \end{aligned}$$
(11.4)

Replacing \(\displaystyle \theta \) in Eq. (11.3), the ball position and speed at global frame result in:

$$\begin{aligned} \begin{array}{lcl} \left[ \begin{array}{c} x_0 \\ z_0 \end{array} \right] &{}=&{}\left[ \begin{array}{c} x+ \frac{hs\phi _1-hs\phi _2}{2}-\frac{x(hs\phi _1+hs\phi _2)}{2L} \\ \frac{z_2+z_1-hc\phi _1-hc\phi _2}{2}+\frac{x(z_2-z_1+hc\phi _1-hc\phi _2)}{2L}\end{array}\right] , \\ \\ \left[ \begin{array}{c} \dot{x}_0 \\ \dot{z}_0 \end{array}\right] &{}=&{}\left[ \begin{array}{c} \frac{(x-L)h\dot{\phi }_1c\phi _1-(x+L)h\dot{\phi }_2c\phi _2}{2L}-\frac{\dot{x}(2L+hs\phi _1+hs\phi _2)}{2L} \\ \left( \begin{array}{c} \frac{(L+x)(\dot{z}_2+h\dot{\phi }_2s\phi _2)+(L-x)(\dot{z}_1+h\dot{\phi }_1s\phi _1)}{2L}+ \\ +\frac{\dot{x}(z_2-z_1+hc\phi _1-hc\phi _2)}{2L}\end{array}\right) \end{array} \right] , \end{array} \nonumber \\ \end{aligned}$$
(11.5)

where \(\displaystyle c\theta \) and \(\displaystyle s\theta \) correspond to \(\displaystyle cos\theta \) and \(\displaystyle sin\theta \), respectively.

3.2 Lagrange–Euler Equations

The motion equations can be expressed by the Lagrange-Euler formulation based on the kinetic and potential energy concepts:

$$\begin{aligned} \left[ \begin{array}{c}\frac{d}{dt} \frac{\partial \mathscr {L}}{\partial \dot{x}}-\frac{\partial \mathscr {L}}{\partial x}\\ \frac{d}{dt} \frac{\partial \mathscr {L}}{\partial \dot{z}_1}-\frac{\partial \mathscr {L}}{\partial z_1} \\ \frac{d}{dt} \frac{\partial \mathscr {L}}{\partial \dot{z}_2}-\frac{\partial \mathscr {L}}{\partial z_2} \\ \frac{d}{dt} \frac{\partial \mathscr {L}}{\partial \dot{\phi }_1}-\frac{\partial \mathscr {L}}{\partial \phi _1} \\ \frac{d}{dt} \frac{\partial \mathscr {L}}{\partial \dot{\phi }_2}-\frac{\partial \mathscr {L}}{\partial \phi _2}\end{array}\right] =\left[ \begin{array}{c} 0\\ f_1 \\ f_2 \\ 0 \\ 0 \end{array}\right] , \end{aligned}$$
(11.6)

where \(\displaystyle \mathscr {L}\) is the Lagragian of the system. The Lagragian is calculated as the difference between kinetic and potential energies. The equations are obtained by the software MAXIMA.

The system kinetic and potential energies are the addition of the ball, beam, and drone kinetic and potential energies. The ball kinetic energy, \(\displaystyle T_b\), beam kinetic energy, \(\displaystyle T_B\), and drone kinetic energies, \(\displaystyle T_{d1}\) and \(\displaystyle T_{d2}\) are:

$$\begin{aligned} \begin{array}{lllllllll}&T_b=\frac{1}{2}m_b\left[ \begin{array}{cc} x_0 y_0 \end{array} \right] \left[ \begin{array}{c} x_0 \\ y_0 \end{array} \right] \, &{}T_B=\frac{1}{2}\rho \int ^l_{-l} \Vert \dot{S}_0(s)\Vert ^2\ ds, \\ &{}T_{d1}=\frac{1}{2}m_{d1}\dot{z}_1^2 , &{}T_{d2}=\frac{1}{2}m_{d2}\dot{z}_2^2 , \end{array} \end{aligned}$$
(11.7)

being \(\displaystyle m_b\) the ball mass, l the beam volume, \(\displaystyle m_{d1}\) the drone 1 mass, \(\displaystyle m_{d2}\) the drone 2 mass and \(\displaystyle \rho \) the beam density. The beam density \(\displaystyle \rho \) is equal to the ratio between the beam mass, \(\displaystyle m_B\), and the beam volume l. The variable \(\displaystyle \dot{S}_O\) corresponds to the speed of a generic point of the beam at the global coordinate reference system. The ball potential energy, \(\displaystyle U_b\), the beam potential energy, \(\displaystyle U_B\), and the drone potential energies, \(\displaystyle U_{d1}\) and \(\displaystyle U_{d2}\), are expressed as

$$\begin{aligned} \begin{array}{llllllll} &{}U_b=m_b\ g \ y_o , &{} &{}U_B=m_B\ g \ O_{B,z} ,&{} \\ &{}U_{d1}=m_{d1}\ g \ z_{1} , &{} &{}U_{d2}=m_{d2}\ g \ z_{2} , &{} \end{array} \end{aligned}$$
(11.8)

where g is the acceleration of gravity and \(\displaystyle O_{B,z}\) is the z position of the local frame which is placed at the beam mass center.

3.3 State-Space Model

The previous model is linearized at an operating point for control purposes. The operating point corresponds to a ball position equal to (0, 0), drone altitudes \(\displaystyle z_1\), \(\displaystyle z_2\) equal to 0 and null system speeds (ball, beam, and drones). Moreover, it is considered as new variables \(\displaystyle F_1\) and \(\displaystyle F_2\) to represent the lift forces. These variables are equal to zero at equilibrium, and are calculated as

$$\begin{aligned} \begin{array}{llllllll} &{}F_1&{}=&{}f_1-m_{d1}\ g- \frac{m_b+m_B}{2} \ g , \\ &{}F_2&{}=&{}f_2-m_{d2}\ g- \frac{m_b+m_B}{2} \ g . \end{array} \end{aligned}$$
(11.9)

As a result, the linear model in matrix form is

$$\begin{aligned} \begin{array}{llllllll} &{}\underbrace{\left[ \begin{array}{c} \ddot{x}(t) \\ \ddot{z}_1(t) \\ \ddot{z}_2(t) \\ \ddot{\phi }_1(t) \\ \ddot{\phi }_2(t) \end{array} \right] }_{{\dot{\varGamma }}}=\mathbf {A} \ \underbrace{\left[ \begin{array}{c} x(t) \\ z_1(t) \\ z_2(t) \\ \phi _1(t) \\ \phi _2(t) \end{array}\right] }_{{{\varGamma }}}\,+\,\mathbf {B} \ \underbrace{\left[ \begin{array}{c} F_1(t) \\ F_2(t) \end{array} \right] }_{\mathbf {U}},&\end{array} \end{aligned}$$
(11.10)

where matrices \(\displaystyle \mathbf {A}\) and \(\displaystyle \mathbf {B}\) are given by

$$ \begin{array}{l} \mathbf {A}=\left[ \begin{array}{ccccc} 0 &{} \frac{g(2m_B+m_b)}{4Lm_B} &{} -\frac{g(2m_B+m_b)}{4Lm_B} &{} \frac{g(m_B+m_b)}{4m_B} &{} -\frac{g(m_B+m_b)}{4m_B} \\ a_1 &{} 0 &{} 0 &{} 0 &{} 0 \\ -a_2 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} -\frac{gm_b}{4Lhm_B} &{} \frac{gm_b}{4Lhm_B} &{} -\frac{g(m_B+m_b)}{hm_B} &{} -\frac{g(m_B+m_b)}{2hm_B} \\ 0 &{} \frac{gm_b}{4Lhm_B} &{} -\frac{gm_b}{4Lhm_B} &{} -\frac{g(m_B+m_b)}{2hm_B} &{} -\frac{g(m_B+m_b)}{hm_B} \end{array}\right] , \\ \mathbf {B}=\left[ \begin{array}{cc} 0 &{} 0 \\ \frac{8m_B + 3m_b + 12m_{d2}}{p} &{} -\frac{4m_B + 3m_b}{p}\\ -\frac{4m_B + 3m_b}{p} &{} \frac{8m_B + 3m_b + 12m_{d1}}{p}\\ 0 &{} 0\\ 0 &{} 0 \end{array}\right] , \end{array} $$

and where

$$ \begin{array}{l} a_1=\frac{3gm_b(2m_B+m_b+2m_{d2})}{p}, \quad a_2=\frac{3gm_b(2m_B+m_b+2m_{d1})}{p}, \\ p=L(2m_Bm_b+(8m_B+3m_b)(m_{d1}+m_{d2})+12m_{d1}m_{d2}+4m_B^2), \end{array} $$

From Eq. (11.10), the following state-space model is obtained:

$$\begin{aligned} \begin{array}{llll} &{}\underbrace{\left[ \begin{array}{c}\ddot{{\varGamma }}\\ \dot{{\varGamma }} \end{array} \right] }_{\dot{\mathbf {X}}}=\underbrace{\left[ \begin{array}{cc} \mathbf {M} &{} \mathbf {A}^T \\ \mathbf {I} &{} 0 \end{array}\right] }_{\mathbf {A_{sys}}} \underbrace{\left[ \begin{array}{c} \dot{{\varGamma }}\\ {\varGamma } \end{array} \right] }_{\mathbf {X}}+\underbrace{\left[ \begin{array}{c} \mathbf {B}^T \\ 0 \end{array}\right] }_{\mathbf {B_{sys}}} \underbrace{\left[ \begin{array}{c} F_1 \\ F_2 \end{array}\right] }_{\mathbf {U}} .&\end{array} \end{aligned}$$
(11.11)

Vector \(\displaystyle \mathbf {X}\) is the state vector which contains the speeds and positions of the ball and drones and the system is represented by matrices \(\displaystyle \mathbf {A_{sys}}\) and \(\displaystyle \mathbf {B_{sys}}\). Matrix \(\displaystyle \mathbf {M}\) includes damping factors which affects the angular movement of the rigid cables modeled by variables \(\displaystyle \phi _1\) and \(\displaystyle \phi _2\). The damping factors avoid infinitive bouncing associated to ideal pendulum problem. Thus, this matrix is

$$\begin{aligned} \mathbf {M}=\left[ \begin{array}{cc} 0 &{} 0 \\ 0 &{} \left[ \begin{array}{cc} -\mu &{} 0 \\ 0 &{} -\mu \end{array}\right] \end{array}\right] . \end{aligned}$$
(11.12)

4 Control Problem

The control objective of this system is to maintain the ball in the equilibrium point on the beam by means of regulating the drone altitudes. As previously mentioned, the system control is divided in two levels. The high-level control calculates the lift force to track an altitude reference that depends on the ball position and the altitude of the other drone, while the low-level control is dedicated to the drone stabilization. The low-level control is integrated in each drone and calculates the angular speeds of the four rotors to obtain a total lift force equal to the reference provided by the high-level control. The control problem is schemed in Fig. 11.2.

Fig. 11.2
figure 2

Control scheme

As observed in Fig. 11.2, it is considered that the stabilization controllers are feedback control strategies. The angular speeds, \(\displaystyle \omega _i\), of the four rotors are measured and the lift force, \(\displaystyle f_1\) or \(\displaystyle f_2\), is estimated. Then the control loop is closed by obtaining the error between the reference of the lift force and the estimated lift force. This work focuses on the high-level control and it is assumed that the drone stabilization is perfectly controlled. In addition, the closed-loop scheme of the high-level control receives a reference vector, \(\displaystyle \mathbf {Y}_{ {ref}}\), to be tracked. The system output vector, \(\displaystyle \mathbf {Y}\), comprises all the states that are measured. We assumed that all the states included in vector \(\displaystyle \mathbf {X}\) are measured, that is, the ball position, x, and speed, \(\displaystyle \dot{x}\), the drone altitudes, \(\displaystyle z_1\) and \(\displaystyle z_2\), and speeds, \(\displaystyle \dot{z}_1\) and \(\displaystyle \dot{z}_2\), and the angles \(\displaystyle \phi _1\) and \(\displaystyle \phi _2\) and its angular speeds \(\displaystyle \dot{\phi }_1\) and \(\displaystyle \dot{\phi }_2\).

It is proposed herein to compare different optimal control techniques to evaluate the difficulties associated to this system. In particular, linear-quadratic regulator (LQR) and model predictive control (MPC) are developed. LQR allows to solve online optimization control problems with fast execution time and low computational effort, while MPC deals with physical constraints and predictions. Both control methodologies present interesting features for this control problem. For aerial application, short execution times with low computation effort are demanding but at the same time, handling physical constraints is required to avoid collisions and instable scenarios caused by disturbances. These controllers are detailed in the next subsections.

Moreover, controllers are implemented in CPUs on-board, and therefore discrete control laws are studied. The sampling time is a design parameter which has to be appropriately chosen. It is important to remark that in this control scenario composed by two control levels, each control level may present different sampling time. Specifically, the low-level control is performed faster than the high-level control for this application. Accounting for possible hardware limitations, a sampling time of 200 ms is set for this study. Note that the optimal controllers require the system model for design. The dynamic model presented in Eq. (11.11) is in continuous time and it has to be discretized for a 200-ms sampling time resulting in

$$\begin{aligned}&\mathbf {X}(k+1)=\mathbf {A_{d}}\ \mathbf {X}(k)+\mathbf {B_{d}}\ \mathbf {U}(k) ,&\end{aligned}$$
(11.13)
$$\begin{aligned}&\mathbf {Y}(k)=\mathbf {C_{d}}\ \mathbf {X}(k)+\mathbf {D_{d}}\ \mathbf {U}(k) ,&\end{aligned}$$
(11.14)

4.1 Linear-Quadratic Regulator

LQR is an optimal and feedback control law which minimizes every sampling time the following objective function J:

$$\begin{aligned} J=\sum ^{\infty }_{k=0} \left( \mathbf {X}(k)^T\mathbf {Q} \mathbf {X}(k)+ \mathbf {U}(k)^T \mathbf {R} \mathbf {U}(k) \right) , \end{aligned}$$
(11.15)

where \(\displaystyle \mathbf {X}\)(k) and \(\displaystyle \mathbf {U}\)(k) are the state and input vectors at instant k and matrices \(\displaystyle \mathbf {Q}\) and \(\displaystyle \mathbf {R}\) are weighting matrices. Given that the system is modeled by the discrete-time state-space model presented in Eqs. (11.13), (11.14), the analytical optimal control sequence results in

$$\begin{aligned} \mathbf {U}(k)=-\mathbf {F} \ \left( \mathbf {X}(k)-\mathbf {X_{ref}}(k) \right) , \end{aligned}$$
(11.16)

where

$$\begin{aligned} \mathbf {F}=\left( \mathbf {R}+\mathbf {B_{d}}^T\ \mathbf {P} \ \mathbf {B_{d}} \right) ^{-1}\ \mathbf {B_{d}}^{T}\ \mathbf {P}\ \mathbf {A_{d}} , \end{aligned}$$
(11.17)

being \(\displaystyle \mathbf {P}\) the unique positive definite solution to the discrete-time algebraic Riccati equation (DARE):

$$\begin{aligned} \mathbf {P}=\mathbf {Q}+\mathbf {A_{d}}^T \left( \mathbf {P}-\mathbf {P}\mathbf {B_{d}} \left( \mathbf {R}+\mathbf {B_{d}}^T \mathbf {P} \mathbf {B_{d}} \right) ^{-1} \mathbf {B_{d}} \mathbf {P} \right) \mathbf {A_{d}}. \end{aligned}$$
(11.18)

4.2 Model Predictive Control

Model predictive control has been successfully applied to many industrial processes [11] and drone applications such as [9]. The controller calculates the optimal control action taking future predictions and constraints into account. The optimization is repeated each sampling time with a moving horizon. MPC is generally formulated with state-space models as

$$\begin{aligned} \min _{{\varepsilon }(k+m+1),\mathbf {U}(k+m)} \sum ^{N-1}_{m=1} {\varepsilon }(k+m+1)^T \ \mathbf {Q} \ {\varepsilon }(k+m+1) + \mathbf {U}(k+m)^T \ \mathbf {R} \ \mathbf {U}(k+m) , \end{aligned}$$
(11.19)

where

$$\begin{aligned} {\varepsilon }(k+m+1)=\mathbf {X}(k+m+1)-\mathbf {X_{ref}}(k+m+1) , \end{aligned}$$
(11.20)

being N the prediction horizon, \(\displaystyle \mathbf {Q}\) and \(\displaystyle \mathbf {R}\) the weighting matrices. The error \(\displaystyle {\varepsilon }\) is defined as the difference between the state vector \(\displaystyle \mathbf {X}\) and the reference \(\displaystyle \mathbf {X_{ref}}\) since the output vector \(\displaystyle \mathbf {Y}\) is equal to the state vector. The optimization problem is subject to the system dynamic model presented in Eq. (11.14) and the following system constraints:

$$\begin{aligned} \underline{\mathbf {X}} \le \mathbf {X}(k) \le \overline{\mathbf {X}},\ \underline{\mathbf {U}} \le \mathbf {U}(k) \le \overline{\mathbf {U}}, \ \underline{\mathbf {Y}} \le \mathbf {Y}(k) \le \overline{\mathbf {Y}} . \end{aligned}$$
(11.21)

The variable vectors denoted with an over line contain the upper limits, while the variable vectors with an under line contains the lower limits. Particularly, the constraints included in this problem are the beam length that limits the ball position, x, and maximum and minimum values for the lift forces, \(\displaystyle f_1\) and \(\displaystyle f_2\), imposed by rotor physical constraints. Values of 30 and \(\displaystyle -35\) N are chosen for the upper and lower lift force bounds, respectively.

5 Simulation Results

This section is dedicated to compare and discuss the simulation results for LQR and MPC . First, preliminary simulations are performed in order to tune the weighting matrices, \(\displaystyle \mathbf {Q}\) and \(\displaystyle \mathbf {R}\), for the controllers with the objective to achieve fast performance with nonaggressive control actions. The best values for both matrices and both controllers correspond to

$$\begin{aligned} \begin{array}{lcl} \mathbf {Q}&{}=&{}\mathbf {I}_{n_x\times n_x} , \\ \mathbf {R}&{}=&{}0.004\,\mathbf {I}_{n_u\times n_u} . \end{array} \end{aligned}$$
(11.22)

Furthermore, for the MPC the prediction horizon, N, is another design parameter. The prediction horizon directly influences on the computational demand, that is, the higher the prediction horizon the higher the computational demand is. Otherwise, MPC and LQR have the same performance for a sufficiently higher N. Then it is achieved a tradeoff with a prediction horizon set at 12 samplings.

Figure 11.3 compares LQR and constrained MPC simulated for initial drones altitudes equal to 4.5 and 3.5 m for drone 1 and drone 2.

Fig. 11.3
figure 3

Comparison of LQR and MPC controllers on simulations

Figure 11.3a shows the performance of the ball position for LQR in red, for MPC in blue, and bounds in magenta dash lines. Note that both controllers are able to regulated the ball position and stabilized the ball in the equilibrium point set at \(\displaystyle x=0\). However, LQR violates the constraints imposed by the beam length and at time 1.75 s the ball falls from the beam. Figure 11.3b, c show the drone altitudes, \(\displaystyle z_1\) and \(\displaystyle z_2\). The altitude references for both altitudes are maintained constant at 2 m during all the simulation. LQR and MPC appropriately regulate the altitudes. As seen in the figures, MPC is slightly slower due to the constraints. Figure 11.3d, e present the simulation results for the drone lift forces. MPC performs inside the bounded region for all the simulation, while LQR violates the constraints at the beginning of the simulation imposed to the drone 1 lift force.

In order to test in more detail the LQR , several simulations are performed and presented in Fig. 11.4. The weighting matrices are modified and the lift forces are saturated to the maximum and minimum values only for the case of the LQR. In Fig. 11.4a, the ball position performances are presented where red, magenta, and green dash lines correspond to the LQR performance with a weighting matrix \(\displaystyle \mathbf {R}\) equal to \(\displaystyle 0.008\,\mathbf {I}_{n_u\times n_u}\), \(\displaystyle 0.004\,\mathbf {I}_{n_u\times n_u}\), and \(\displaystyle 0.001\,\mathbf {I}_{n_u\times n_u}\), respectively. Matrix \(\displaystyle \mathbf {Q}\) is kept constant and equal to the identity matrix. Moreover, red, magenta, and green solid lines are the LQR performances for the previous weighting matrices including saturations on the maximum and minimum values of the lift forces. As observed in the figure, only the LQR performance for a weighting matrix \(\displaystyle \mathbf {R}\) of \(\displaystyle 0.004\,\mathbf {I}_{n_u\times n_u}\) without saturation avoids the ball to fall. However, after studying Fig. 11.4d, e, LQR with a weighting matrix \(\displaystyle \mathbf {R}\) of \(\displaystyle 0.004\,\mathbf {I}_{n_u\times n_u}\) requires to implement lift forces for drone 1 out of bounds. Therefore, it is demonstrated that even though LQR is a good candidate to regulate this system due to its fast execution time, the system performance under the bounds is not guaranteed.

Fig. 11.4
figure 4

Saturated and nonsaturated LQR with different weighting matrices

5.1 Disturbances

LQR and MPC are tested under disturbances. To that end, simulations are performed with disturbances in the ball position and drone altitudes. In addition, changes in the references are also included in the simulation. The results are compared in Fig. 11.5. The initial conditions are the same as presented in the previous simulations. The ball position is modified to a value of x equal to 0.5 m at time 15 s as seen in Fig. 11.5a. The altitude of drone 1 is modified to values of \(\displaystyle z_1\) equal to 1.2 and 2.7 at time 20 and 28 s as shown in Fig. 11.5b. The altitude references are at the beginning of the simulation equal to 2 m and simultaneously change to a value of 3.5 m at time 30 s and again to 2 m at time 40 s. The references are shown in Fig. 11.5b, c as cyan dash lines. In Fig. 11.5, blue solid lines correspond to the MPC, while red solid lines correspond to the LQR with lift forces saturated. As mentioned in the previous subsection, LQR is not able to perform under the bounded region and the ball falls from the beam at times 1.75, 21, and 29 s. MPC performs under bounds during all the simulation and faster than the saturated LQR as seen in Fig. 11.5a at time 21 s. For both cases, the altitude references are perfectly tracked with a similar rise time.

Fig. 11.5
figure 5

LQR and MPC with disturbances

5.2 Execution Times

Finally, executions times are obtained during simulation to test the suitability of the real-time implementation of MPC for this application. Note that the controllers are simulated using MATLAB in PC with i7-260M CPU under 64 bits Windows platform. Table 11.2 lists the average, maximum and minimum execution times for LQR and MPC. The average time for LQR is 0.01225 ms, while MPC is 5.8 ms. Both average times are far from 200 ms which is the sampling time, and thus a robust online implementation is feasible. Note that the hardware on-board with a real-time software may execute the control laws faster. Due to the fast execution times, the sampling time could be reduced in order to obtain better performance in terms of response speed. Then the prediction horizon for MPC needs to be recalculated for the new sampling time. The prediction horizon depends on the system rise time. Therefore, if the sampling time is reduced, the prediction horizon increases. Also, the MPC execute time increases with the prediction horizon. The reduction of the sampling time needs to be carefully studied.

Table 11.2 Execution times

6 Conclusion

In the present chapter we have presented, modeled, and analyzed a novel application of multiagent drone system dealing with load carrying. The main problem related to this application comes from the mechanical links between the load and the drones which carry it. This system was proposed to be modeled as a ball and beam lifted by to drones and a mathematical model based on first principles was developed. Under the assumption that all the states are measured, LQR and MPC controllers have been analyzed by simulations. LQR presented very fast execution times but it is not guaranteed a performance in the bounded area, that is, that the ball does not fall from the beam as seen in different simulations. On the other hand, MPC deals with constraints and regulates the ball position without violating the constraints imposed in the problem. Moreover, execution times are short enough for this application to guarantee the online implementation.

This work has presented only a preliminary study with centralized controllers which have the knowledge of all the states variables. In future work, we aim at considering a more general setup with a higher number of drones and where only part of the states are locally measured on each drone. In order to reduce the execution time of the MPC and to make the problem scalable in an easy way, distributed MPC strategies should be studied. In addition, a uncertainties and aerodynamic disturbances need to be included in future studies.