On the Design of Outdoor Leader-Follower UAV-Formation Controllers From a Practical Point of View

This work presents a control structure designed to autonomously guide two of-the-shelf quadrotors navigating in outdoor environments, as a leader-follower formation. The objective is to show how simple is to design controllers to guide the two vehicles when taking into account practical assumptions and simplifications in their model. This way, the main contribution of the paper is to show how practical knowledge obtained from real experiments using of-the-shelf quadrotors, translated to the assumptions and simplifications applied to its model, can help in the design of a suitable controller. The basic premise is that the quadrotor is driven by high-level commands that excite its degrees of freedom. The control system here designed following such reasoning is implemented in a ground station that allows manual or automatic control of the leader vehicle, with the follower one always automatically controlled. Experimental results in real outdoor scenarios, subject to unpredicted disturbances, validate the assumptions and simplifications applied to the model of the quadrotor, and the proposed control structure as well.


I. INTRODUCTION
The application of control techniques to unmanned aerial vehicles (UAVs) is an interesting research topic, and has been extensively explored. Thus, a lot of results regarding different control techniques adopted to guide the autonomous navigation of such vehicles have already been published. A few of them, illustrating different control approaches and results associated to quadrotors, are those reported in [1]- [6]. Nevertheless, such proposals are generally difficult to understand, and thus replicate, especially for novice readers, due to the complexity of their structure and mathematical description. As an extension, complex control techniques have also been proposed to guide groups of UAVs navigating in a coordinated way, thus generating what is nowadays The associate editor coordinating the review of this manuscript and approving it for publication was Haibin Sun . called formation control or control of multi-robot systems. As one can see, for instance, in the works reported in [7]- [16], complexity is still a characteristic of the control techniques adopted.
This work also addresses the topic of guiding a multi-robot system, specifically a system composed by two quadrotors navigating as a leader-follower formation. The focus is on the design and implementation of a control structure for a quadrotor navigating as the follower UAV, in a leader-follower formation, in outdoor environments, under the incidence of wind disturbances. The main contribution of the paper is the proposal of a control architecture based on a simplified UAV model, to guide the vehicle when flying according to the leader-follower paradigm.
Hereinafter the paper discusses relevant aspects of the state of the art to give theoretical support to the methodology adopted to design the proposed controllers, as well VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ as presents and discusses results obtained from real flights using the proposed control structure, which validate the proposed control structure as well as the simplified model adopted to the quadrotor. Specifically, Section II presents some related works dealing with leader-follower formations of UAVs, whereas Section III briefly outlines the experimental setup used to run the validation experiments, and introduces a simplified model to represent the UAVs. In the sequel, Section IV presents the proposed automatic flight controllers, whereas Section V describes the software organization adopted to run the navigation experiments. Thereafter, Section VI shows some experimental results that validate the proposed control system, and, finally, Section VII highlights some remarks on the development of this work and stresses the performance of the control system designed with basis in the UAV simplified model in outdoor formation flights.

II. RELATED WORKS
Four classical paradigms are commonly adopted to address the problem of controlling a multi-robot system, also known as a multi-robot formation. They are the virtual structure, the behavior-based, the consensus-based and the leaderfollower paradigms. This work focuses on the leader-follower control paradigm, proposing a control architecture to guide a leader-follower formation of two quadrotors. The leader-follower (L-F) formation is a control strategy in which the leader is the agent responsible for conducting the follower. Therefore, the follower has the role of mimicking the movement of the leader. All information required for its navigation is referred to the leader. Thus, the leader is the most important agent in the formation, since its failure can compromise the mission accomplishment. There are several techniques to deal with leader malfunctioning and to assure that the formation remains running, but they are out of the scope of this work.
The concepts of the leader-follower approach are often used in other paradigms of formation control. The indication of a leader in a virtual structure or of an agent who dictates the meeting point in a consensus-based approach, for instance, are good examples [8], [17]- [19]. Besides, the L-F strategy allows that a follower vehicle be the leader of another agent, in a leader-follower formation involving three or more inline vehicles, thus configuring a cascade L-F approach. In this work, however, the L-F approach is used on its basic formulation, involving just two agents, a leader and one follower. This means that there is a relationship among the pose of the two agents and the formation itself, and the control strategy is designed according to this relationship.
Regarding control techniques adopted to control multirobot systems, in [20] a sliding mode controller guides a group of quadrotors, which are stabilized and controlled by a non-singular fast terminal sliding mode technique. The strategy is numerically validated for a set of five UAVs, navigating longitudinally in a predefined altitude. In [17] an interactive L-F configuration states that the leaders react with respect to the followers, applying consensus-based concepts. One or several UAVs lead, while other UAVs are followers, and the proposed interaction matrix establishes how a UAV interacts with its neighbors. In turn, an adjacency matrix is used in [8] to represent how quadrotors arranged as a group share information. A consensus-based approach drives the L-F formation, while an almost linear control law (obtained after performing a static feedback linearization on the altitude and attitude) ensures the simultaneous convergence of the UAVs. Similarly, graph theory models the interaction of the agents in [21], and a backstepping controller guarantees their convergence in a finite-time. The closed-loop stability, in the sense of Lyapunov, is proven.
In [19] simulations illustrate a L-F formation following a given set of waypoints. In such a case, the formation-control problem is decoupled into horizontal and vertical motions, and a model predictive control generates the reference for the leader UAV, while the follower one uses its flight information to predict the path and achieve the formation pattern.
Considering scenarios with external disturbances, a flatness based finite time controller guides, in simulation, a leader follower formation in [22]. Assuming the existence of obstacles, the authors of [23] propose a rapidly-exploring random tree algorithm that computes a free-of-collision path for a UAV, which is followed by another one. The proposal runs in ROS-Gazebo environment, with obstacles modeled as round pillars. In such a case, there is no explicit mathematical relationship between the UAVs. Moreover, the follower UAV sees the leader one as an obstacle that should also be avoided during navigation.
To the best of our knowledge, most articles dealing with leader-follower formations are just numerically validated, or show real experiments run in a controlled and wellstructured scenario. Thus, we understand that as our experimental results were gathered in outdoor environments, under unpredicted disturbances (such as wind gusts), they are also a valuable contribution. However, the main contribution is the design of the UAV controllers with basis on a simplified model.

III. THE UAV FORMATION SETUP
The hardware used in this work consists of two parts. The first one consists of a portable computer, hereinafter named Ground Station (GS), in which the control algorithms are run. The other part consists of two commercial quadrotors AR.Drone 2.0 of Parrot Drones SAS (see Figure 1). These quadrotors were chosen mainly because of its moderate acquisition cost (about US$ 450) and of the worldwide availability for buying. In addition, the AR.Drone quadrotor has important features that make easier the development of computer codes for its guidance, as described in [24], [25]. Moreover, its on-board computer has native codes that guides the quadrotor in important maneuvers, such as takeoff and landing, besides taking care of controlling the attitude of the vehicle.

A. GS-UAV COMMUNICATION
The communication between the ground station and an AR.Drone quadrotor is performed according to a set of protocols detailed in [25]. After turning on the quadrotor one can create a wi-fi link and establish an information sharing among the GS and the quadrotor itself, in such a way that the GS can require sensory data from the UAV and send control signals to it. In this work this is done for two quadrotors, the leader one and the follower one, such that we have two wi-fi links for the communication between the GS and the two UAVs. For each one the available sensory data is packed in the vector q = z v x v y v z φ θ ψ lat lng T , where z is the altitude (in m) in the global frame, v x , v y and v z are the linear velocities (in m s −1 ) in the body frame, and φ, θ and ψ are the Euler angles (in rad) in the global frame. As for lat and lng, they are the latitude and longitude (in • ), in the geographical frame.
To move the AR.Drone, its on-board computer receives and interprets four normalized control commands, arranged as the vector u = u φ u θ uż uψ T , where u φ and u θ represent the rolling and pitch commands, while uż and uψ are the commands for altitude and yaw rates, all of them normalized to the interval −1.0, +1.0 [25].

B. THE SIMPLIFIED DYNAMIC MODEL
The mathematical model of quadrotor UAVs is well known in the literature. Usually such models consider the vehicles as rigid bodies in the 3-D space, controlled by high-level signals, such as forces and torques. The way chosen here to make easier to design controllers is to propose a simplified and effective representation (from a practical point of view) of the vehicle. Taking inspiration in [1], the UAV is modeled as a function of high-level control signals, generating the differential equations for the translational and rotational dynamics, in the global frame. In such equations m is the UAV mass, g is the gravity acceleration and the force F represents the total thrust generated by the four rotors. As for the variablesτ φ ,τ θ andτ ψ , the virtual inputs relative to the roll, pitch and yaw torques [26], they are the high-level control signals. Remark 1: Equations (3) and (6), related to the vertical displacement z and heading angle ψ, respectively, are suppressed on the dynamic model, because a PD algorithm similar to the proposed in [3] regulates these variables to constant values.
For modern UAVs, such as the AR.Drone quadrotor, the set of equations (1)-(6) is enough to model and describe them, because they have an on-board computer responsible for performing low-level control of the engines, automatically adjusting its propulsion and orientations, according to the user commands. In summary, the low-level model can be suppressed in the control design. In such a context, it is possible to propose interesting simplifications to the model, considering that in most practical flights the maneuvers occur in near hovering situations (low velocities in the longitudinal and side directions). In other words, the roll and pitch angles are close to zero. Regarding the AR.Drone quadrotor, there indeed are configurable parameters on its on-board computer which allows limiting the maximum longitudinal and side inclinations.
Remark 2: During a hovering maneuver without disturbance or user commands, one can assume that the thrust generated by the propellers is equivalent to the vehicle weight, i.e.
Assuming small angles θ and φ in (1) and (2), so that cos φ ≈ 1, cos θ ≈ 1, sin θ ≈ θ and sin φ ≈ φ, and using (7) one gets Remark 3: Assuming a non-zero value for the yaw angle, notice that φ and θ modify the positions x and y of the UAV, showing that the translational and rotational dynamics are coupled.
Similar simplification can be done regarding the rotational dynamics, represented by (4), (5) and (6). It is important to stress the relationship among the virtual control signals τ φ andτ θ , and the real orientation commands u φ and u θ is rather complex. From the literature perspective, it is clearly explained in [2], [26], [27] and many other works that establish formulas relating the electronic control of the motors and the forces and torques produced by them in the body of the vehicle. Oftentimes those equations involve physical parameters of the vehicle, such as moments of inertia, the axles of the engines, and so on. However, it is difficult to use this method with the AR.Drone quadrotor, since it is not possible to individually control each engine. Actually, one sends a command u φ , for the roll angle, or u θ , for the pitch angle. Such commands are interpreted as a reference by the onboard computer, which is responsible for modifying the speeds of the engines, moving the UAV to a commanded orientation. Such observation indicates that there is a low level controller regulating the UAV attitude (i.e. the orientation angles), what is true when regarding the AR.Drone.
Therefore, this work proposes to consider that the dynamic response of the UAV to the orientation commands u φ and u θ is already controlled, such that its mathematical representation can be approximated by the linear second-order differential equations where ω φ , ζ φ , ω θ and ζ θ are performance parameters of the attitude controller implemented onboard the UAV (the autopilot embedded in the firmware of the AR.Drone). Some tests to identify such parameters were performed, but are not discussed here, since such topic is out of the scope of this work. Nonetheless, the experimental results presented in Section VI help to conclude the validity of this idea (at least for orientations with magnitude not greater than 0.175rad or 10 • , maximum values adopted for θ and φ).
In summary, this discussion allows claiming that it is possible to control the translational dynamic response of the UAV according to (8) and the rotational one according to (9). Under the reported conditions, u φ and u θ become angle references to the controller represented in (9), reasoning that is adopted in the design of the controllers discussed hereinafter.

IV. THE FLIGHT CONTROLLERS
In this section flight controllers are proposed for the leader and the follower quadrotors, adopting the UAV model inspired in [1] and previously described. Figure 2 illustrates the formation setup composed by the leader and the follower UAVs, whose variables are related to the world frame. As for the variables involved, it is considered a subscript 1 for the leader and 2 for the follower, to refer to the vehicles.
To control the translational dynamics it is adopted a hierarchical control structure, similar to those in [26] and [28]. In such strategy, an external control loop is used to control the positions x and y, generating desired orientation signals, which in turn represent angular references for an internal control loop for φ and θ (not transparent to the user).

Remark 4 (Independent Controllers):
In closed-loop if the convergence of the orientation is faster than that of position, then the control system make the errors null in steady-state, as stated by the principle denominated Time-Scale Separation [28]. Therefore, it is feasible to design independent controllers for the translational and rotational dynamics of UAVs.

A. THE CONTROLLER OF THE LEADER UAV
Applying the approach of independent controllers, the leader UAV is first considered. Thus, the external control loop is established, which defines φ d 1 and θ d 1 as auxiliary control signals, representing the desired orientations for its internal loop. Then, (8) is rewritten as where the subscript 1 identifies refers to the leader vehicle. Adopting matrix notation (10) becomes from where one can design the auxiliary control signals using the technique of inverse dynamics. In such control law X 1 d = x 1 d y 1 d T is the desired position for the leader UAV, X 1 = x 1 y 1 T is its current position (estimated by the sensors onboard the UAV), andX 1 = X 1 d −X 1 is the position error. As for κ D 1 = diag{2.0, 2.0} and κ P 1 = diag{2.0, 2.0}, they are diagonal positive definite matrices correspondent to the derivative and proportional gains of the controller, respectively. Introducing (12) in (11), the closed-loop dynamics of the translational error becomes The result is that this linear error dynamics hasX 1 = 0 as equilibrium, which is asymptotically stable, since κ P 1 and κ D 1 are positive definite matrices, meaning thatX 1 → 0 when t → ∞.
In practice the control signals calculated in (12) should be limited, guaranteeing a bound in the required inclinations, thus preventing big inclinations due to great control errors. Such a limit is defined as where is a saturation function, for which the value of 0.175rad was selected after running some trial experiments. In such condition it is assumed that the internal loop controlling the orientation of the vehicle is able to track any orientation given by (14). The practical effect of the saturation function is the truncation of the desired inclination, which assumes momentarily a constant inclination, moving towards the desired position.
Finally, the orientation references are sent to the internal control loop as In such case, introducing these signals in (9), the rotational dynamics becomes which suggests that the internal loop controller implemented in the computer onboard the AR.Drone will be able to track a desired reference of orientation, with the performance determined by the parameters of the model.

B. THE CONTROLLER OF THE FOLLOWER UAV
The controller adopted to guide the follower UAV comes from a formation controller, whose objective is to guide the follower vehicle so that the desired leader-follower formation is kept. First of all, the formation is defined as a Cartesian virtual structure. In this case it is characterized by X f = X 1 − X 2 , where X 1 = x 1 y 1 T is the global position of the leader vehicle and X 2 = x 2 y 2 T is the position of the follower one. An important detail is that the two UAVs are supposed to fly in the same altitude, so that just the coordinates x and y are considered. Taking the second time derivative of such relationship it comes thatẌ f =Ẍ 1 −Ẍ 2 , which can be written, using the same notation of (11), as from where one gets the formation controller as with µ =Ẍ f d + κ D fẊ f + κ P fX f being an auxiliary control signal, where X f d characterizes the desired formation, X f is the current formation (determined from the positions of the UAVs given by their sensors),X f = X f d − X f characterizes the formation error and κ D f = diag{2.0, 2.0} and κ P f = diag{2.0, 2.0} are positive definite diagonal matrices representing the derivative and proportional gains of the formation controller, respectively. Introducing the controller characterized in (18) in (17), one gets the dynamics of the formation error, which is which allows characterizing the equilibriumX f = 0 as asymptotically stable, since κ D f and κ P f are positive definite diagonal matrices. As a consequence,X f → 0 when t → ∞.
To conclude, the control signals obtained using (18) represents the desired orientations for the follower vehicle, what means to make V. THE EXPERIMENTAL ARCHITECTURE Figure 3 illustrates the flow-diagram of the architecture required to run the experiments. The algorithms correspondent to the blocks encapsulated in the dashed-line box were programmed in the ground station computer. The vehicles are represented as AR.Drone 1 (Leader) and AR.Drone 2 (Follower).
Regarding the leader vehicle one should inform the system whether it will be manually guided by a human operator or automatically guided by a flight controller. Case the manually guided option is chosen the commands U d 1 are directly sent to the AR.Drone 1 by the human operator through a smartphone or other control device. If the option is for the automatic control of the leader vehicle, the Trajectory Generator block provides the desired values for the navigation, which can be constant or time-varying values (respectively in the cases of positioning or trajectory-tracking tasks). The control is performed according to the hierarchical structure of Subsection IV-A, implementing (12) and (14) in the block Position Controller of Figure 3. The signals at the output of such block are sent to the Ar.Drone 1, which executes the internal orientation control loop in the code implemented in its onboard computer, which is not accessible to the designer.
There is a Kalman Filter block for each vehicle, which refers to an implementation based on [29], [30]. In this block the code correspondent to a state estimator is detailed, showing a method to feedback sensory data, such as positions and velocities of the UAV, in global coordinates, to the controllers. In the implementation of such block the calculation considers a data fusion involving raw data provided by a GPS module and by the inertial sensors, all of them provided by the onboard computer of the UAV in the data package q.
As for the follower UAV, in the Formation Generator block one should declare the desired structure for the formation, X f d , which is controlled through the Formation Controller block, representing the implementation of (18) and (20). The signals at the output of such block are sent to the AR.Drone 2. It should be stressed that this last block also uses data correspondent to the AR.Drone 1. In such a case the GS shares the sensory information from the Kalman Filter 1 block and the computed (or manually set) control signals.

VI. EXPERIMENTAL RESULTS AND DISCUSSION
In this section two experiments involving the ideas so far discussed are run, showing the practical validity of the assumptions considered. In both experiments the desired structure for the formation is which means that the follower vehicle should assume the same position of the leader, in the x direction, while staying 4 m apart of it, in the negative y direction. As for the z coordinate, the follower always stays at the same altitude of the leader, in this work.

A. AUTOMATIC NAVIGATION OF THE LEADER THROUGHOUT WAYPOINTS
In this experiment the leader is automatically controlled by the controller designed in Subsection IV-A, whereas the formation control is performed through the controller designed to the follower vehicle, described in Subsection IV-B. The objective is to navigate throughout a set of four waypoints, characterized as the vertices of a square with 3 m of side. Along the experiment the values of x d 1 and y d 1 are modified each t = 10 s, to change from one to the next vertex of the square, according to the following sequence observe that both vehicles converge to the desired value x d 1 , as characterized by the specification adopted for the formation. As for the y coordinate, while the leader UAV converges to the desired value y d 1 , the follower UAV performs a similar movement, but 4 m aside the leader, as expected from the formation specification. Such results confirm that the follower UAV mimics the movement of the leader one, preserving the specified formation, in this case just a difference of 4 m in the y coordinate. By its turn, Figure 4(b) shows a comparison of the desired values for the formation (which are constant) with the values obtained from the data acquired by the sensors along the experiment. As one can notice, in spite of the oscillations in the curve, mainly due to the numerical errors inherent to the inertial sensors and to the GPS module, there is a convergence to the desired values correspondent to the formation. Such remarks lead to the conclusion that the controllers of the external loop of the leader and follower UAVs are able to accomplish the proposed task.
As for the rotational dynamics, Figures 4(c) and 4(d) show the orientations of the two vehicles along the experiment. The values called reference values are those resulting from (14) and (20), which are compared with the sensory data. One should notice that at each change of x d 1 or y d 1 great position errors are introduced, generating a saturation of the actuators of the vehicles. Even under such situation, however, it is possible to perceive in the curves the capability of the system to recover the reference orientation values. Thus, it is possible to confirm the convergence of the orientations to the reference values, even facing tracking imperfections, associated to noisy sensors. Even so, the real responses of the vehicles follow what was expected, from the analysis of the previous sections, in terms of the operation of the internal loop of orientation control, showing that the theoretical assumptions and simplifications adopted in the control design are consistent with the practical flight exposed in Figure 4. Finally, to allow the reader to better understand the experiment, a video of it is available in https://youtu.be/BU5piIVdP7w.

B. MANUALLY CONTROLLED LEADER NAVIGATION
In this experiment a human operator guides the leader UAV, from the ground station, whereas the follower UAV mimics the movement of the leader, keeping the specified formation all the time. In this case just the controller designed for the follower vehicle runs in the computer at the ground station. Figure 5(a) shows the global positions correspondent to both vehicles. There one can see, as expected, that the profile correspondent to x and y is quite similar for both UAVs, with the displacement of 4 m in y, thus showing the capability of the formation controller of keeping the specified formation. In Figure 5(b) there is a comparison of the desired values for the formation (constant values) and the values correspondent to the data acquired by the sensors onboard the vehicles along the experiment. As it can be observed, quite low errors in the formation variables are present, thus allowing claiming that the controller designed for the follower vehicle is effective in guiding it to keep the desired formation.
Figures 5(c) and 5(d) show how the leader and follower UAVs orient themselves along the experiment. For the leader UAV the reference orientation values are the commands exhibited in the form of pulses, which were sent by the human operator. For the follower UAV, the reference orientation values are calculated by the control system, according to the necessity to keep the desired aspect of the formation. As one can see, all the variables converge along the curves to reach and keep the desired formation.
Finally, still observing Figure 5, one can confirm that the developed system also presents response coherent with the theoretical analysis of the previous sections. To better understand the experiment, a video of it is available in https://youtu.be/IuX6_bToJDA.

VII. CONCLUSION
This work developed an approach to model quadrotor UAVs and design automatic flight controllers for them, considering two of them navigating according to the leader-follower formation paradigm. The controllers thus designed were tested in outdoor environments, using data provided by inertial sensors and GPS module onboard the vehicles as feedback to close the control loop. The possibility of giving a more practical interpretation to a traditional equation of literature was verified, making the design of controllers a simplified task. The controllers were tested with the UAVs performing real flights, shown in videos, providing a better interpretation of the topics covered. The assumptions and simplifications made to the model of the vehicle were validated in the experiments, where the expected behaviors were in fact observed during the flights. As a final remark it should be stressed that the same control system can be used to guide the leaderfollower formation in trajectory-tracking tasks, without any change.

ACKNOWLEDGMENT
The authors thank CNPq-Conselho Nacional de Desenvolvimento Científico e Tecnológico, an agency of the Brazilian Ministry of Science, Technology, Innovations and Communications that supports scientific and technological development, and FAPES-Fundação de Amparo à Pesquisa e Inovação do Espírito Santo, an agency of the State of Espírito Santo, Brazil, that supports scientific and technological development, for the financial support granted to this research. They also thank UFES-Universidade Federal do Espírito Santo, IFES-Instituto Federal de Educação, Ciência e Tecnologia do Espírito Santo, UFV-Universidade Federal de Viçosa, and FAPEMIG-Fundação de Amparo à Pesquisa de Minas Gerais, for making possible to develop this work.