APPLICATION OF DISTRIBUTED CONTAINMENT CONTROL TO MULTI-ROBOT SYSTEMS

This thesis proposes the application of a distributed containment control algorithm to a team of mobile robots. The containment controller this thesis builds on [1] was developed for generic linear multi-agent system and tested in simulation only. In this thesis, I particularize the controller for the case of multiple mobile robots by including it into a two-layer control scheme. The high-level controller computes a desired position for the mobile robots, that is then used as reference trajectory for the low-level controller. The resulting control system is implemented as a fully distributed system on a team of mobile robots and validated in simulations and experiments. Additionally the containment controller is tested in a multi-layer control scheme in which the leaders perform encircling control and the followers perform the proposed containment control. Parts of this thesis were submitted to the IEEE Robotics and Automation Letters with option of presenting at the IEEE International Conference on Robotics and Automation 2022.


Introduction
In recent years, advances in small computers as well as a growing field of potential applications lead to an increased research interest in distributed control algorithms for multi-robot systems. The multi-robot systems discussed in this thesis consist of several mobile robots communicating with each other while moving in space. A variety of coordination problems have been proposed over time which can be solved by a group of mobile robots [2]. In formation control the goal is that different robots stay at a fixed relative position to its neighbors. Coverage control is concerned with the goal of optimizing the coverage of an area with the lowest number of robots or cover the largest area possible with a given number or robots. Another common problem is consensus control where the goal is for all robots to reach the same state. In most papers this is discussed under constrains like high communication latency or changing communication networks. The main focus of this thesis is on a specific problem for distributed control in multi-agent systems called containment control. It describes a control problem where a group of follower agents converges into the convex hull defined by the state of several leader agents [3].
One exemplary application of containment control is given in [4] with a group of vehicles crossing a hazardous area where only some agents have the sensor ability to detect the hazards. The latter take the role of leaders and mark the safe area in which the followers must remain.
In this thesis I will place an emphasis on distributed multi-robot containment control. Here I will show a widely applicable controller introduced in [1] and particularize it for the problem of mobile robots. Additionally I will give a brief introduction into an encircling controller proposed in [5]. Afterwards I will show several simulations and experiments to validate the function of the containment controller as well as the interaction of the two in a multi layer formation controller.
This thesis will be concluded by a discussion of open questions and interesting avenues for future work.
Since the introduction of the first containment control problem in [6], many distributed solutions have been proposed for many different types of systems and operative conditions.
A popular approach is to focus the study to the control of single and double integrator systems. For example, in [7] a distributed containment controller using only the location of agents and not their velocity or acceleration is proposed. The authors of [8] introduce dispersion behavior into the distributed containment controller. Similarly, group dispersion is used to avoid collisions in [9]. In [10] several distributed containment control algorithms for multiple stationary leaders as well as leaders with identical and different velocities are introduced. A special emphasis on function under disturbances is placed in [4] where a distributed observer is used as part of the distributed containment controller to estimate the weighted average of the leaders' speed.
In [11] a group of robot leaders performs distributed formation control while the followers use a distributed containment control algorithm to stay within the convex hull spanned by the leaders. The authors of [12] consider a distributed containment control algorithm functioning in the presence of anonymous adversarial agents using time-varying graphs.
Other authors have proposed more general control laws designed to work on generic linear systems. In [13], only relative states and relative state estimates are used for the computation of the control input. In [14] the system dynamics are limited to to the first and second order. Second order linear systems are discussed also in [15] where the problem of input saturation is addressed by using sliding mode control and relative pose measurements. Z-Transforms are used to give sufficient conditions for distributed containment control. Fixed time delays for the communication are considered in [16]. The authors of [17] introduce a distributed containment controller for heterogeneous linear systems where even the dimension of the state can vary from agent to agent. An adaptive distributed observer is used in [18] to enable distributed containment control for nonidentical networks with external disturbances. In [1], the authors develop a distributed containment controller for generic systems with heterogeneous and unknown linear dynamics.
Few papers deal with nonlinear dynamics. The authors of [19] use a neural network approximator to estimate the non linear system dynamics. [20] reduces communication between agents with a distributed event-triggered containment control algorithm. In [3], the authors tackle the distributed containment control problem with a two layer approach in which the top layer does the containment control while the lower level performs fault-tolerant tracking control. In [21], a two-level cooperative control architecture is proposed to achieve a containment formation, and paired with a lyapunov analysis.
In most of the works mentioned above [1,3,4,6,7,8,12,13,14,15,16,17,18,19,20] the proposed controllers are validated only in simulation, while only few papers provide experimental result on a robotic system. In [21] a team of two ground robots is used with bidirectional communication between the robots and virtual leaders. Ground robots are also used in [9] and [10]. Multirotor aerial vehicles are used in [11], but the authors do not take advantage of the increased dimensionality and limit the problem to a bi-dimensional plane.
Another interesting aspect is the limitations on the leaders' movements assumed in several papers. For example, the leaders are required to remain stationary in [8], [10], and [14], while leaders with identical input are required in [9] and [10]. A paper that assumes little limitations both on the motion of the leaders and on the system model is [1] which is not only applicable to generic linear systems but also does not require knowledge of the followers system matrix. Moreover, in general the model of the different follower robots can be different between robots.

CHAPTER 3
Problem Setting The multi-robot system discussed in this thesis consists of a group F = {1, . . . , N } of N followers and a group R = {N + 1, . . . , N + M } of M virtual leaders. Each follower is a unicycle-type mobile robot with non-linear dynamics [22]: (2) The communication between leader k ∈ R and follower i ∈ F is marked with The goal of the containment control algorithm is to achieve containment con-trol as defined in [17] as: My solution to this problem is an application of the containment controller for multi-agent systems presented in [1].
In the rest of this document I will use the following symbols. I describes the identity matrix of arbitrary dimension, O describes the zero matrix of arbitrary dimension, and S n + denotes the sets of symmetrical and positive definite n × n matrices.

Background Containment Control
In this section I provide for completeness an overview on the setup and main findings of [1].

System Descriptions
The authors of [1] propose a containment control algorithm applicable to linear multi-agent systems with the following characteristics. N heterogeneous followers are each described with the following linear uncertain system model: where the unknown system matrix A i ∈ R n×n and the known input matrix B i ∈ R n×n u,i are constant. x i ∈ R n is the state of the i-th follower, and u i ∈ R n u,i the control input.
There are M homogeneous leaders with the generic k-th leader described as: with constant and known system matrices A 0 ∈ R n×n and B 0 ∈ R n×nu,r . s k ∈ R n is the k-th leaders' state and r k ∈ R nr the bounded input signal. The input signal r k is measurable for followers neighboring the leader as indicated in the ∆ k matrix.
The following linear system generates the leaders input: where A r ∈ R nr×nr is constant.

Assumptions on Agent Dynamics and Communication Topology
The authors of [1] state several assumptions regarding the system dynamics as well as communication among the agents.
Assumption 3: The interaction graph G among the follower agents is undirected and connected. Moreover, there is at least one follower that each leader has a directed path to it.

Control Algorithm
The error signal used in the controller is defined as: This distributed observer based adaptive control protocol is proposed by [1]: r i ∈ R nr is the distributed observer state of the leader's input signals r k . L ∈ R nr×nr is a controller coefficient.K 1i ∈ R n×n u,i is the estimation of K 1i ∀i ∈ F and is influenced by the controller coefficients γ ∈ R + and P ∈ S n + . The followers control input u i is dependent on K 2i which can be derived from Assumption 1, and on K 3 ∈ R nr×n which is another controller coefficient. These four coefficients are designed according to the following equation (10).

LMI Condition to Determine the Controller Coefficients
Equations (7)- (9) implement an observer for the leader's input as well as a control algorithm for the follower robots that depends on several parameters. These must be properly selected to achieve the desired containment control behavior. In particular any γ > 0 can be selected, while the following Linear Matrix Inequality (LMI) needs to be fulfilled for all followers in order to obtain lim t→∞ e i (t) = 0 according to [1]: where λ i (H) are the eigen-values of the matrix and the variables are the positive definite matricesP ∈ S n + and Q ∈ S nr + as well as the rectangular matricesK 3 ∈ R nr×n andL ∈ R nr×nr . The controller coefficients are calculated as: A proof for the stability of this controller can be found in [1].

Containment Control Particularization
The controller presented above has been developed for linear systems, however our robots have nonlinear dynamics. Its application to our system can be done Tracking System through the control system architecture presented in Figure 1, that presents the control system running on each robot. It is structured as a two layer system, in which a reference trajectory is generated for the robots through the developed controller. At this aim, the i-th robot communicates with its communication neighbors to obtain their state and their control inputs (for the leaders only).
The generated trajectory is then used as a reference signal for an Input/Output Controller (IOC) that generates the linear velocity v i and angular velocity ω i for the robot as described in [23]. Using the error the desired velocity is calculated, where k i is a positive proportional gain. The linear and angular velocities for the robots are calculated using their orientationφ i : where b > 0 is a parameter.
The implementation of the containment controller to generate the reference signals first required the selection of a linear system that would respect Assumptions 1-3, and would lead to a solvable LMI (10). and K T 2i = I. Assumption 2 is fulfilled with B 0 being the identity matrix and the controllability matrix therefore having full rank i.e., the system (A 0 , B 0 ) is stabilizable. Assumption 3 is a condition on the communication graph, therefore it is not affected by the system matrices. It will be fulfilled later in the simulations and experiments sections. Note that choice of A i is only limited to linear systems, but is not limited to an integrator dynamics. In chapter 7 I will discuss how it can be used as a parameter of the system to improve the closed loop behavior.
With these choices the LMI from (10) is reduced to: Choosing A r = O leads toṙ k = 0 which means that the leaders have a constant velocity. This limitation in general is not given in [1] but caused by the chosen system dynamics. In section 6.2 I will show that slow changes in velocity do not affect the stability and behavior of the controller.
The implementation of the controller on our mobile robots required a time discrete version of it. I start with the discrete system dynamics at time step m of length ∆t: with the discrete input matrices B i,d ∈ R n×n u,i : B i,d = B i = I and B 0,d ∈ R n×nr : B 0,d = B 0 = I, the discrete follower's system matrix A i,d ∈ R n×n : A i,d = I + ∆tA i = I, and the discrete leader's system matrix A 0,d ∈ R n×n : A 0,d = I + ∆tA 0 = I. The k-th leader input is given as with a separate algorithm supplying the input v k,m ∈ R nr . As above, A r,d = I + ∆tA r = I. The discrete error signal is defined similar as in (6): The continuous control algorithm described in equations (7)- (9) is discretized as: where the controller coefficients P , K 3 , and L are the same as the continuous case. can publish data which can then be received by neighboring robots subscribing to the topics. Other topics are used to communicate the ground truth location of the robots. The simulated robots are differential drive robots with two independently actuated wheels and an omnidirectional caster wheel as shown in Figure 2. The simulated environment consists of a simple infinite plane.

Simulation of Ten Followers and Five Leaders
To validate the proposed controller I implemented a distributed simulation in Gazebo using five virtual leaders and ten simulated unicycle-style robots with the dynamics described in (1) as followers. The selected communication graph shown in Figure 3 has the following Laplacian matrix L:  trajectory. This is corroborated also by the plot of the distance d i between each robot and the convex hull Co(R) spanned by the leaders reported in Figure 5.
Since a negative value of d i indicates that robot i is within Co(R), from the plot it is possible to observe that all robots eventually converge to and remain in the convex hull.
It must be noted that at the beginning of the simulation the reference signals moves fast compared to maximum velocity that the robots can exert, causing a significant error in the IOC. This is visible in Figure 6 that shows the absolute error |ε i | for each follower over time t, with a sharp increase of the errors at the beginning followed by a steady decrease. This is due to the fact that most robots starts relatively far from the convex hull (1 − 3m). Therefore the containment controller must recover a large initial error that is subsequently translated into error for the IOC.

Encircling Controller
Controlling the leaders manually or with open loop control is possible as seen before but not ideal. To show how the leaders could be controlled by a different controller I will use a formation control algorithm. I chose an encircling controller as an example proposed in [5]. This formation controller has the goal of moving all robots on a circle with a given radius and a fixed velocity around a specified center.
The full integration of the encircling controller, the containment controller and the underlying proportional controller of the IOC leads to a multi-layer formation control and communication network, with a set of robots (leaders) that are able to communicate long range to a base station to receive global commands on the trajectory of the center, radius and speed of the encircling, while another set (followers) needs only local communication to perform containment control.
In the following I will give a short introduction into the encircling controller used before showing the full multi-layer formation controller in section 5.3.

Problem Setting Encircling Controller
Each of the N robots encircling the target is represented by a kinematic point R 1 , . . . , R n with first-order dynamics. The absolute number N is not used in the controller design and is not known to the robots. Due to the circular nature of the control task cylindrical coordinates will be used to denote the location The encirclement task is described by the following conditions: where ρ * is the desired radius andφ i (t) the average phase of the neighbors of robot i at time t. ω i (t) denotes the angular velocity at robot i at time t and is supposed to reach the desired angular velocity ω * .
The encircling controller requires, like the containment controller, a connected communication graph. Due to the low number of robots used in this thesis I will always use a fully connected communication graph. For details on the communication requirements consult the original publication proposing this controller [5].

Background Encircling Control
The goal of the encircling controller proposed in [5] is for every robot to have a phase equal to the average to it's neighbors phase as shown in (32) and on a set radius. This average is defined as which can be simplified toφ where C is the circular matrix with the first row [0 1 2 0 . . . The cylindrical coordinates of the robots' location and orientation can be considered linear and decoupled. Therefore a separate controller for each component can be designed.

Controller IOC Robot i
Tracking System The controller for each of the components can be given aṡ with the positive gains k ρ , k φ , k z . It converges exponentially to the values given in (31) to (33) for any initial condition.

Particularization Encircling Control
As the containment controller earlier, the encircling controller is discretized.
The three linear decoupled proportional controller equations (38)-(39) become with the controller gains k ρ , k z , k φ and all variables at time step m or the previous time step m − 1.
As before the output of the encircling controller needs a control system architecture consisting of the controller that generates a reference trajectory and an Input/Output Controller (IOC) which has the linear and rotational velocity for that specific robot as an output. The architecture is shown in Figure 7.
The controller output in (40)-(42) gives the output in cylindrical coordinates and not in the cartesian coordinates needed by the rest of the control system. The cylindrical coordinates are converted to cartesian coordinates using where x i,m is the set point passed on to the IOC.

Simulation of Three Robots with a Moving Center
To test the implemented encircling controller, I set up a simulation using three robots circling around a moving point. The center point c was controlled using open loop control.
As I am using only three circling robots in this test, the communication graph is fully connected. The center point c moves with a velocity of v c = 0.005 · 1.5 + 2 sin(0.05t + π) 0.005 · 1.5 + 2.0 sin(0.05t) T m/s in a sinusoidal motion, where t is the time since the start of the simulation in seconds. The desired radius is set at ρ * = 4 m and the desired rotational speed at ω * = 0.05 rad/s. The gains are chosen as k ρ = 0.25 and k ω = 0.05. The resulting trajectories of the simulation can be seen in Figure 8. The error calculated within the controller between the desired radius ρ * and the radius of the desired location x i given by the controller is shown in Figure 9. Figure 10 shows the error between the phase of x i and the desired phaseφ i . We can observe that the errors don't converge towards zero but oscillates around zero. This is mainly caused by the changing velocity of the center. The time constant of the center's movement is too small for the encircling controller. Therefore, the encircling controller can not follow the fast oscillations of the center point. While the phase error plot shows a smooth line for the first 500 seconds a jittery motion is observable after this time.
This is presumably caused by the simulation itself and can not be explained by the controller's behavior.

Multi-Layer Formation Control
After confirming the performance of the encircling controller in section 5.2 I will show in this section the full multi-layer formation control algorithm made by using an encircling controller to control the leaders of the containment controller.
The connected communication graph among the followers is shown in Figure 11, and it has the following Laplacian matrix L for the communication between the followers: with the leader-follower weights Note that the selected communication graph respects Assumption 3. The controller coefficients P , K 3 and L are obtained as   Figure 11: Communication graph in the simulation with the leaders l k controlled by an encircling controller and the followers f i . The node b is the base station. The communication between the leaders for the encircling controller is shown by the dotted arrows, the communication between leaders and followers for the containment controller by the normal arrows.  For an experimental implementation a system of three virtual leaders and three ∼ 20cm differential drive mobile robots was used. The robots shown in Figure 14 are equipped with an arduino Romeo board to perform the low-level control tasks and compute the odometry, and an ODROID-XU4 for high-level control tasks and communication through a Wifi module. The original robots were built as part of [24].

Nonholonomic Constraints
The robot's are limited in their movement by nonholonomic constraints. These don't apply to a pure unicycle robot, but to the robot's used in all simulations as well as experiment's done in this thesis. If I would use robot's with four ideal unsteerable wheels, the robot's only degree of freedom would be to move on the line of their current orientation. Ideal wheels can only rotate around their horizontal axle and can not slip sideways or rotate around the vertical axis. Steering a robot with four fixed wheels can only be done like a tank with tracks which requires slipping. By using two interdependently controllable wheels and an omnidirectional uncontrolled caster wheel the robot's can be steered without slipping and are closer to the theoretical unicycle model. Therefore the robots were adapted by removing two of the original wheels and substituting them with a caster.
The robots move in a 10m × 10m area equipped with an Optitrack motion capture system that provides the position of the robots needed in the control law.

Experiment of Containment Control with Three Followers and Three Virtual Leaders
The communication graph, depicted in Figure 15, is described by the matrices: The corresponding controller coefficients computed by solving the LMI in (18) are: This choice of velocities creates a triangular convex hull that rotates about its center of mass and slowly drifts with a linear motion, as visible in Figure 16.
The fully distributed controller was executed by the ODROID-XU4 on each robot.
Communication between the robots and the calculation of the virtual leader's position was managed by a ground station computer hosting a shared ROS master node. Each follower only subscribed to and received information from neighboring robots as described by the communication graph (49). Figure 16 shows the measured trajectoryξ i (colored, solid lines), the reference trajectories computed by the containment controller x i (colored, dashed) and the position of the virtual leaders s k (black, dashed). As in simulation, the plot shows that the followers reach and stay within the convex hull spanned by the virtual leaders plotted for t = 0s and t = 186s (gray, dotted and dot-dashed respectively).
Notably, the tracking error of the IOC in this case is lower with respect to the simulation. This happens because the robots start from a configuration that is closer to the convex hull. Therefore the reference trajectories move slower with respect to the simulation case. The distance d i of robot i to the convex hull is plotted in Figure 17 with negative values indicating the robot being inside the convex hull. Screenshots of the video showing the moving robots are in Figure 18-        In general, the controller showed the expected behavior being able to solve the containment control problem and drive the robots inside the convex hull. This applies both in case that the virtual leaders move according to Assumption 1, that allows for each leader to move with a different constant velocity (simulation), and also when that assumption is violated as shown in the experiment where a circular motion component is added to the velocity of the leaders.
However, it is also evident from the plots in Figure 6 that a limited robot velocity can cause the tracking error in the lower level IOC to increase significantly at the beginning of the control task if the robots start in a configuration that is far from the convex hull. One possible solution to this problem could be to try to "slow down" the dynamics of the reference trajectories by changing the selected Note that the computational requirements grow linearly with the number of neighbors each robot is connected to. This could lead to problems in larger systems with many followers and densely connected communication networks. However one potential solution to this problem would be the artificial elimination of redundant connections within the communication graph as long as Assumption 3 is still fulfilled.
In the future, on the one hand, we plan to investigate improvements to the control scheme presented in this paper by studying the effects of different values of A i on the closed loop system, and by studying the problem of reduction of the connections in the communication graph. On the other hand, we plan to implement the 3D equivalent version of this controller on drones.
The multi-layer control scheme simulated could be expanded to different types of controllers for the leaders. Additionally an experimental implementation would be interesting.