Full text
DIPLOMARBEIT CONSENSUS ALGORITHMS FOR NETWORKED CONTROL ausgef¨ uhrt zum Zwecke der Erlangung des akademischen Grades eines Diplomingenieurs unter der Leitung von Ao. Univ.Prof. Dipl.-Ing. Dr. Gerald Matz Univ.Ass. Dipl.-Ing. Dr. Valentin Schwarz Dipl.-Ing. G´abor Hann´ak Institut f¨ ur Nachrichtentechnik und Hochfrequenztechnik eingereicht an der Technischen Universit¨ at Wien Fakult¨ at f¨ ur Elektrotechnik und Informationstechnik von Jorge Almela Miralles Wien, Juli 2014
Acknowledgement Dedicado a mi familia, por su apoyo a mi aventura lejos de casa. Pre Janu, za jej bezpodmieneˇcn´u podporu a za to, ˇze mi cel´y ˇcas verila. To Gerald, Valentin and G´abor, for giving me the opportunity of working and completing my thesis with them.
Abstract This thesis deals with distributed consensus algorithms for multi-agent networks. The goal of consensus algorithms is to achieve a consensus for a specific task. In our case we consider a setting where network agents should meet at a single point. This rendezvous algorithm is well known in literature. We mainly focus on two dimensional random geometric networks, but one dimensional networks and regular scenarios are also considered. For the performance study we pay special attention to the convergence properties and the ability of the agents to reach the consensus point. All tasks carried out by the nodes are distributed, in other words, there is no need of external agents for coordinating or deciding. In addition to the consensus algorithms the effect of using control within these networks is also studied. With these control contributions we try to improve the overall performance of the system. We will try to control the dynamics of the nodes and also apply temporal delays to the movement. Finally, we present some numerical results where we can observe how different settings and parameters affect the behavior of the whole system. Keywords: Multi-agent wireless networks, consensus algorithms, constant weights, Metropolis- Hastings weights, random geometric graphs, control formation, MSE.
Zusammenfassung Diese Diplomarbeit befasst dich mit verteilten Konsensalgorithmen in Netzwerken mit mehreren Agenten. Das Ziel dieser Algorithmen ist das Erreichen eines Konsenses f¨ ur eine gegebene Aufgabe. In dieser Arbeit besch¨ aftigen wir uns mit Netzwerken, dessen bewegliche Agenten sich in einem Punkt des Raumes treffen wollen. Algorithmen, welche genau diese Aufgabe meistern, werden Rendezvous-Algorithmen genannt und geh¨ oren zu den Konsensalgorithmen. Unser Fokus liegt auf zweidimensionalen geometrischen Graphen mit zuf¨ alliger Knotenverteilung, wobei auch eindimensionale und regul¨ are Strukturen untersucht werden. Bei der Auswertung der G¨ ute dieser Algorithmen konzentrieren wir auf die Konvergenzeigenschaften und auf die Erfolgsrate, dass sich alle Agenten in genau einem Punkt treffen. Im Netzwerk ist keine zentrale Recheneinheit vorhanden, somit werden alle Schritte der Algorithmen verteilt von den Agenten ausgef¨ uhrt. Des weiteren untersuchen wir Kontrollmethoden wie Lenkung und zeitliche Verz¨ ogerung, welche sicherstellen sollen, dass sich alle Agenten in einem Punkt treffen. Zum Schluss wird der Einfluss der Parameter auf die eingef¨ uhrten Kontroll- und Konsensalgorithmen durch diverse Simulationen anschaulich gemacht.
Abstract Spanish version En este proyecto contemplamos el desarrollo de nuevos algoritmos de consenso para redes inal´ambricas con m´ultiples agentes, as´ı como, el planteamiento de modificaciones sobre los mismos con el fin de optimizarlos. El objetivo de los algoritmos de consenso es conseguir cooperativamente un acuerdo para una determinada tarea. Nos centramos en redes de dos dimensiones con distribuciones aleatorias de sus nodos, tambi´en analizamos redes unidimensionales y tratamos algunos casos de redes con distribuci´on regular. Hemos estudiado algoritmos de consenso extra´ıdos de otros trabajos cient´ıficos, cuyo rendimiento hemos comparado con otros desarrollados por nosotros mismos. Hemos llevado un seguimiento especial a las propiedades de convergencia y a la capacidad de los agentes de reunirse en un punto. Todas las tareas que realizan los agentes son distribuidas, es decir, no hay ninguna necesidad de que un agente externo intervenga para coordinar o decidir los movimientos. Adem´as de los algoritmos de consenso, tambi´en hemos analizado el efecto de aplicar control para tratar de mejorar el comportamiento de las redes. Este proceso de control est´a justificado por la necesidad de mejorar la efectividad de los algoritmos de consenso y est´a dirigido a controlar el movimiento de los nodos y a la aplicac´on de ciertos retardos al mismo. Tras estudiar cuidadosamente los algoritmos de consenso y las modificaciones realizadas sobre ellos, pasamos a mostrar algunos de los resultados num´ericos, gr´aficas y figuras donde se puede observar como la elecci´on de diferentes inicializaciones o par´ametros de entrada afectan al comportamiento general del sistema.
Contents List of Abbreviations 3 1 Introduction 5 1.1 Motivating Example .............................. 7 2 Prerequisites 8 2.1 Graph Theory ................................. 9 2.1.1 Definitions .............................. 9 2.1.2 Adjacency Matrix ........................... 12 2.1.3 Degree Matrix ............................. 13 2.1.4 Laplacian Matrix ........................... 15 2.2 Network Topology ............................... 17 2.2.1 Other Network Topologies ....................... 17 3 Consensus Algorithms 18 3.1 Problem Statement .............................. 19 3.2 Consensus in Discrete -Time and Matrix Theory ................ 20 3.3 Algorithm ................................... 22 1
2 3.4 Convergence Conditions ............................ 23 3.5 Weight Design ................................ 24 3.5.1 Structure and Meaning ........................ 25 3.5.2 Symmetric and Non-Symmetric Weight Matrices ........... 25 3.5.3 Traditional Designs .......................... 26 3.5.4 Novel Design ............................. 28 4 Modifications of Rendezvous 33 4.1 Relaying .................................... 34 4.2 Delay ..................................... 38 4.3 Thresholding ................................. 40 4.4 Dispersion ................................... 42 5 Simulation Results 47 5.1 Simulation Setup ............................... 48 5.2 Comparing Weight Matrices .......................... 49 5.2.1 MSE Performance ........................... 50 5.2.2 Average Distance Traveled ...................... 52 5.2.3 Trajectories .............................. 55 5.2.4 One Dimensional Scenarios ...................... 57 5.3 Modifications Of Rendezvous ......................... 58 5.3.1 Dispersion .............................. 63 5.4 Regular Matrices ............................... 65 5.4.1 One Dimensional Scenarios ...................... 66 5.4.2 Two Dimensional Scenarios ...................... 68 6 Conclusions and Outlook 70
3 Bibliography 72
List of Abbreviations •CW: Constant weights •MH: Metropolis Hastings weights •RV: Rendezvous weights •AW: Angular weights •MSE: Mean-squared error •W: Weight matrix •1D: One dimensional scenario •2D: Two dimensional scenario 4
Chapter 2. Prerequisites 11 •Neighbor set and degree The neighbor set of a given node i,N(i), contains agents within its range. The neighbor set for an undirected graph can be defined as N(i) = {j∈ V : (j, i)∈ E} (2.3) where we see that (2.3) means that the node jbelongs to the neighbor set of iif and only if there is an edge between them. The number of elements in the neighbor set of iis the degree of node i d(i), i.e., d(i) = |N(i)|. In our example Fig. 2.1 the neighbor set of node 1 is N(1) = {2,3}and its degree d(1) = 2. •Connectivity In graph theory it is said that two nodes are connected if there is at least a path joining them. Therefore a graph Gis connected if there is a path from each node to all others. In any other case Gwould be disconnected. Furthermore, for the case of undirected graphs we can say that if there is a path between each pair of nodes then the graph is always strongly connected. Now in Fig. 2.3 there is a comparison between a connected and an unconnected graph. We can appreciate how in the graph ait is possible to reach from any node any other, whereas with the graph bthis is not possible, i.e., from 1 it is not feasible to reach 6.
Chapter 2. Prerequisites 12 (a) Connected (b) Unconnected Figure 2.3: Comparing graphs 2.1.2 Adjacency Matrix The adjacency matrix Ais a way to define a graph Gby setting the entries of the matrix which correspond to connected edges to one and the others to zero. The adjacency matrix Ahas I×Ientries where I=|V| is the number of nodes of the graph. The equation (2.4) describes the construction of A. [A]ij = 1 if (i, j)∈ E 0 else (2.4) Since the edges are bidirectional, for undirected graphs the adjacency matrix Ais always symmetric. For a better understanding, let us define the adjacency matrix Aof the network of Fig. 2.4. This graph will help us along Sections 2.1.2 to 2.1.4, and we will support the theoretical explanation with practical results. Using Fig. 2.4 is easy to define the corresponding adjacency matrix A. For node 1 there are two links with node 2 and node 3. This leads to set the entries of the first row of Aas follows: a12 =a13 = 1 a14 =a15 =a16 =a17 =a18 = 0
Chapter 2. Prerequisites 13 Figure 2.4: Undirected graph There are not self loops, thus aii = 0 for all i. Eventually, the adjacency matrix Ais: [A]ij = 01100000 10110000 11011000 01101000 00110110 00001001 00001001 00000110 By simple visual check it is possible to notice that the matrix is symmetric as expected. 2.1.3 Degree Matrix The degree matrix Dof a graph Gis a diagonal matrix containing the number of neighbors. Again, the dimension is I×I. The entries of the diagonal of this matrix can be calculated with the sum of the elements of the rows or columns of the adjacency
Chapter 2. Prerequisites 14 matrix and the rest of the elements equal to 0, then the matrix is constructed as in (2.5). [D]ij = N(i) if i=j 0 else (2.5) and consequently the degree matrix takes the following structure, [D]ij = d(1) 0 · · · 0 0d(2) .... . . . . .......0 0· · · 0d(I) As a piece of example, taking Fig. 2.4 it is possible to obtain the matrix below. [D]ij = 20000000 03000000 00400000 00030000 00004000 00000200 00000020 00000002 If we now count the number of neighbors of each node we will see that they correspond to its value on the diagonal, i.e., N(1) = D11.
Chapter 2. Prerequisites 15 2.1.4 Laplacian Matrix The last possible representation of a graph Gwhich is going to be presented is the Laplacian matrix L, which is a I×Imatrix. For an undirected graph the entries of the Laplacian matrix Lare given by [L]ij = d(i) if i=j −1 if i6=jand (i, j)∈ E 0 else It can be also represented as the difference of the degree matrix Dand the adjacency matrix A: L=D−A.(2.6) Since the the degree matrix Dis diagonal and the adjacency matrix Ais symmetric the result will be a symmetric Laplacian matrix L. There are some spectral properties of the Laplacian matrix Lwhich shall be mentioned: •The sum of each row of the Laplacian matrix is zero, therefore the right eigenvector of Lis 1. L1 = 0. •For undirected graphs, the Laplacian matrix is positive semi-definite, i.e., for all x∈ RI, xTLx ≥0. •According to Gershgorin theorem all eigenvalues of Lin the complex plane are located in a closed disk centered at ∆ + 0jwith a radius of ∆ = dmax(i), i.e., the maximum degree of the graph.
Chapter 2. Prerequisites 16 •For undirected graphs the Laplacian matrix is symmetric and has Ireal eigenvalues which can be ordered in ascending order as 0 = λ1≤λ2≤. . . λi≤2∆. The zero eigenvalue is known as the trivial eigenvalue of L. The second eigenvalue λ2needs to be greater than zero for a connected graph. It is known as the algebraic connectivity of the network, moreover, it is a measure of performance/speed of consensus algorithms. It is possible to know the number of components of the graph which are disconnected because it coincides with the number of 0 eigenvalues. For getting a better understanding of the concepts presented before, it is time to use Fig. 2.4 and give a practical example. Using (2.6) the resulting matrix L is: [L]ij = 2−1−1 0 0 0 0 0 −1 3 −1−10000 −1−1 4 −1−1 0 0 0 0−1−1 3 −1 0 0 0 0 0 −1−1 4 −1−1 0 0000−1 2 0 −1 0000−1 0 2 −1 00000−1−1 2 Finally, the eigenvalues are obtained λi={0,0.5,2,2.1,3,4,4.8,5.6}for i∈[1,8], there is only one zero eigenvalue, hence can be concluded that the graph is connected. The algebraic connectivity in this case is λ2= 0.5.
Chapter 2. Prerequisites 17 2.2 Network Topology In this Section the random geometric topology will be described following some of the ideas given in [14], because it is the topology used for the simulations. In Fig. 2.5 it is possible to see a random geometric graph. A random geometric graph is G= (V,E), Figure 2.5: Random geometric graph where I=|V| is the number of nodes which are randomly distributed, in our case, over the unit square. The maximum length of the edges will be the connectivity radius ror the range, that means that the maximum Euclidean distance between two connected nodes iand jwill be d(i, j) = r. Then the adjacency matrix of a random geometric graph is as below: aij =aji = 1 if d(i, j)≤r, 0 else. 2.2.1 Other Network Topologies For some cases, special network distributions will be needed. Concretely, in this thesis we will use a linear distribution for analyzing the behavior of the consensus algorithms in one dimensional scenarios and also regular grid topologies to study possible improvements on the performance when the nodes are evenly distributed.
3 Consensus Algorithms In this work one of the main goals is the analysis of consensus algorithms for multi-agent networked systems, and concretely, their application in Rendezvous problems and control formation. It is possible to learn more about consensus algorithms for multi-agent networks in [15]. In networks of agents, consensus means to cooperatively reach an agreement taking into account diverse interests depending on the state of the agents. Hence, we will use distributed computation. As a consequence, we can achieve benefits such as higher efficiency or better computational capabilities. The distributed algorithms are widely used in applications like surveillance, spaced-based interferometers, reconnaissance systems or distributed re-configurable sensor networks. 18
Chapter 3. Consensus Algorithms 19 3.1 Problem Statement In this section we will explain the framework of study and the objectives. Let us assume that there is a network with Irandomly distributed wireless agents equipped with memory and computing capabilities. These agents have the same communication range and know the current state of their neighbors. Therefore the network can be studied as an undirected graph of Inodes with a random geometric initial state. Moreover, we will assume the graph to be always initially connected. Once the scenario is initialized the nodes must cooperatively reach consensus using a consensus algorithm and a weight matrix Wamong one of the designs we will present in Section 3.5. Therefore the nodes will move, and their new positions will be a linear combination of the positions of the neighbors and themselves. In most of the cases the objective for us will be achieving Rendezvous, so the aim with which the weight matrix Wwill be designed is making the nodes to converge in a single point. However, we will use control formation as a case of study for improving the performance (further explanation in Section 4) and then the goal for the weight matrix Wwill be making the nodes keep a distance dbetween them. We recall that the only available information for them is their current state and the current state of their neighbors. Hence, the consensus algorithm is launched as a distributed application because all the nodes decide where to move based on the information they have. Finally, when the objectives and the scenario are explained, it is important to know that the main problems we are coping with are the following: •The movement of the nodes can sometimes lead to the disconnection of the network, having as a result local consensus instead of a unique Rendezvous point. •Some of the weight designs make the nodes movement too slow making unfeasible
Chapter 3. Consensus Algorithms 20 to converge. Additionally, in Section 4 some control features will be implemented in order to improve the performance of the algorithm, and face the mentioned problems. In Section 5 we will show the actual performance of these modifications and whether they help or not. At the end we will analyze what happens if the network is regular and not random geometric, concretely hexagonal and squared grids and, despite we will focus in two dimensional scenarios, also linear distributions will be studied. For the case of one dimensional networks we will develop a special algorithm which will be run over regular and random scenarios. 3.2 Consensus in Discrete -Time and Matrix Theory Here we will present a framework for analysis of convergence of consensus algorithm for networks with fixed topology in discrete time following the guidelines stated in [3]. As said we will focus on discrete time consensus algorithm, where kdenotes each iteration. Let us define the inputs of the algorithm with rithe position of the agent iat time 0, where x[0] is the initial inner state vector containing all the agents positions at time 0: xi[0] = ri. Let also the weight matrix W[k]∈RI×Ibe a square matrix with entries wij . Then the consensus algorithm is as xi[k] = wii[k]xi[k−1] + X j∈Ni wij[k]xj[k−1], i = 1, . . . , I (3.1)
Chapter 3. Consensus Algorithms 27 where Iis the identity matrix and Lis the Laplacian matrix of the graph. We see from the construction of the weight matrix how the entries of the row are d(i)+1− d(i) so the sum is always 1. Then the WCW matrix is always row stochastic, and since the Laplacian of an undirected graph has a symmetric structure, WCW will be double stochastic. Consequently, this method achieves averaged consensus. •Metropolis-Hasting weights The second method presented is the Metropolis-Hastings (MH). We followed the design presented in the works [5,20], where is also possible to find more relevant information about this weight matrix. The most remarkable property is that is the weight matrix in this thesis with the faster convergence. Analyzing the following matrix construction, [WMH]ij = 1 max{di,dj}if i∈ Nj 1−Pi6=j[WMH]ij if i=j 0 else is possible to appreciate how here the distribution of the nodes in the network is taken in consideration. As said, for high values of the entries of the weight matrix the nodes move faster, but on the other hand this values cannot be over 1 ∆. This problem is solved in the constant weight matrix by using always the maximum degree of the whole network, however in the MH case it is used the degree of each node. This leads to have faster convergence because nodes with lower number of neighbors will not be penalized in their speed of movement by the node with the higher degree of the net. This weight matrix is also symmetric thanks to the method of construction and since the graph is undirected the neighboring nodes have the same degree no matter from which side of the edge we would approach. Recall that the self-weights
Chapter 3. Consensus Algorithms 28 are chosen so the sum of the weights at each node is 1. Hence averaged consensus can be achieved. •Rendezvous This weight matrix is constructed following the study made by Carlos H. Caicedo- N´u˜nez and Miloˇs ˇ Zefran [4]. As it possible to see in (3.7), the scheme is similar to the constant weight matrix, WRV =I−α(I−˜ A),(3.7) where the constant αhere also affects the convergence speed. For RV αis defined with the following boundaries: α∈(0,1) The design of the adjacency matrix [ ˜ A] is as follows, [˜ A]ij >0 if [A]ij = 1 (3.8) such that X i [˜ A]ij = 1 (3.9) where it is not necessary to have a symmetric structure. Due to (3.8) the WRV matrix will not necessarily be double stochastic. However the stochasticity is ensured with (3.9), as a result with WRV is possible to reach consensus. The direct consequence of this new conditions is that the consensus is not agreed in the average point. 3.5.4 Novel Design •Angular weights The problem of the connectivity encouraged the decision of creating a design
Chapter 3. Consensus Algorithms 29 which would favour the weights wij of the nodes angularly more isolated. For this new approach the weights are built as the sum of the two smallest angles formed by the vector i→jfor the case of the entry wij. In example (3.10) is easy to appreciate how the weights [w]ij are computed for the graph in Fig. 3.1. Figure 3.1: Angular weights wij ∼αjk +αlj 2(3.10) The process followed for calculating the weights is the next: (i) Creating a matrix with the vectors between all the connected nodes. (ii) Using the matrix of the step 1 was possible to create a new matrix for storing this time the angles between connected nodes. (iii) Sort the angles and take only the two smallest for each case. (iv) Eventually, is obtained a matrix I×Iwith the coefficients for each edge. This matrix will be called coefficient matrix C. These coefficients sum to 2π in each row, but are normalized to obtain a row stochastic matrix W. In Fig. 3.2 and Fig. 3.3 the effect of the new weight design can be appreciated, it is seen that the trajectory of the nodes is quite different. In the case of the traditional methods the node iin the middle would move towards the position
Chapter 3. Consensus Algorithms 30 Figure 3.2: Traditional trajectory Figure 3.3: Angles trajectory where there is a higher concentration of neighbors, while for the angular design the new position of the node imoves to the more angular isolated neighbor. This effect leads to avoid the network disconnection. Finally, some other important features are that this design is non symmetric, thus only row stochastic, and what is more, the transmission of state information is the same as with the other weight designs since only the node position is required. The main drawback of the angular weights is the computational cost. •Modifications of angular weights –Symmetric angular weights It is possible to symmetrice the angular weight design by means of the coefficient matrix C. The process is as in (3.11). Csym =C+CT 2(3.11) When the weight matrix is created from these new symmetric coefficients the result is a symmetric matrix and therefore double stochastic. –Distance-Angular weights In this case two different coefficient matrices are used in order to include the effect of the distance. Let us Cang be the angular coefficients and Cdist be the distance coefficients. Then Cdist is created dividing the matrix Dcontaining
Chapter 3. Consensus Algorithms 31 the distance between every pair of nodes by the maximum distance. Finally Cis the multiplication element by element of Cang and Cdist. •Line weights This is a special case of matrix which has been developed for one dimensional scenarios. As said, we will mainly focus on two dimension random scenarios, nevertheless we will also study some special distributions such as regular grids and both regular and random one dimensional scenarios. For the design of this new weight matrix we have exploited a characteristic which only one dimensional scenarios have, all the agents will be contained in a line and there will always be two nodes, one at each side, which will define the limits of the node distribution. Therefore the idea is shrink the set of nodes starting from the boundaries and keeping the nodes in the middle fixed. To be more precise, the value of the weights will be as below, [WL]ij = 1 max{di,dj}if i∈ Njand i∈ B(G) 1−Pi6=j[WL]ij if i=j 0 else where B(G) represents the nodes on the boundary of G, or in other words, the nodes which only have neighbors on one side. Analyzing the structure of the weight matrix, we realize that (3.5) is fulfilled and so will be stochastic. Condition (3.6) is also accomplished, thus the weight matrix will be stable.
Chapter 3. Consensus Algorithms 32 We expect that this procedure will let us avoid the disconnection of the network and achieve consensus in a point near but not by its own nature the average.
4 Modifications of Rendezvous In this chapter, we present some modifications for the RV consensus method. The objective of these changes is to improve the rate of success reaching rendezvous and the convergence properties, or in other words, make the nodes meet faster and ensure that all nodes meet at one point. To achieve these goals, several extensions have been developed. For instance controlling the dynamics, adding delays or reorganizing the network before starting the consensus algorithms. 33
Chapter 4. Modifications of Rendezvous 34 4.1 Relaying The first modification is based on relaying information. The idea came in response of the need of obtaining a larger connectivity in order to increase the probability of achieving rendezvous. Relaying creates virtual edges between so far not connected nodes and therefore increases the connectivity. Hence, each node gains more knowledge of the environment and this prevents the agents to move to positions that cause the graph to get disconnected. Another option is to introduce a delay before moving to gather more information, which is discussed in the next section. Because of relaying the adjacency matrix will change, but strictly speaking this new adjacency matrix will not model the real graph because some edges will appear as a consequence of the relaying. Therefore, the adjacency matrix is virtual and is constructed as, Av=( N X k=1 Ak!>0)−I(4.1) where Avis the virtual adjacency matrix and Nis the maximum delay. The operator used in (4.1) is defined as {M>0}ij = 1 if [M]ij >0 0 else. The meaning of ijth entry of N X k=1 Ak is the number of different paths from ito jwhen we can hop at most ktimes. For understanding why we need the sum in (4.1), we illustrate with a simple example in Fig. 4.1. We see all the possible paths for N= 2. If we do not use the sum, node 1 cannot reach 2 and therefore there is no path between them. This is because Ak represents the number of possible ways to reach a node from any other when we hop
Chapter 4. Modifications of Rendezvous 35 strictly ktimes. In our example it is obvious that, for k= 2 it is impossible to go from the red node to the blue and stay, it can only reach its initial position and the green node. So the solution is to sum up as in (4.1) and to make it more clear the structure of Aand A2for the example in Fig. 4.1 is the next. A= 0 1 0 1 0 1 0 1 0 A2= 1 0 1 0 2 0 1 0 1 It is evident that for the graph in Fig. 4.1 the equation (4.1) produces a fully connected virtual adjacency matrix when k≥2. We have seen that the zero pattern of Avwill be different from Afor k > 1, and since there will be more edges, which is equal to less zeros in Avthan in A, we obtain a higher connectivity. In order to apply relaying it is necessary to move only every certain number of iterations. As a result the agents can exchange state information with second or higher order neighbors and decide a more precise movement because they have more information. As a consequence, all neighbors have to wait for the message of node ibefore they can move, and this is time consuming. Moreover, in each iteration all |N(i)|neighbors have to additionally spread the position of node i. Therefore the communication load increases significantly 1 + |N(i)| 1. Despite the drawbacks, it is important to notice that every kfirst iteration, when the nodes do not move, are necessary for computing (4.1). The reason why we say that the movement will be more accurate is because the RV weight matrix will be created using the zero pattern of Av, which we recall that contains more non-zero entries. Eventually
Chapter 4. Modifications of Rendezvous 36 Figure 4.1: Feasible paths everything reduces to the idea of having more information for taking better decisions. The relaying effect is seen in Fig. 4.2. It is seen that the final consequence of relaying is the appearance of a virtual connectivity range rvwhich is rv≤2r, where ris the connectivity range. We see that rvcannot be 2rin random geometric topologies because this would need an infinite number of nodes at a distance equal to the connectivity range. However, in the case of some regular network topologies, this condition in fulfilled, therefore rv= 2r. In Fig. 4.3 we see a non-regular and a regular distribution where the connectivity range for each node is ri=rfor all i. We see that node 1 can not reach the node 5 because the neighbor node in its direction is at a distance smaller than the connectivity range in Fig. 4.3(a). Therefore, despite node 5 is at a distance 2r from 1 it cannot be reached. In the other example illustrated in 4.3(b) all nodes at a distance 2rfrom 1 can be reached, since all the neighbor nodes are distributed at the same distance rfrom 1. The performance of the relaying is considered in Section 5. We expect to keep the networks connected and achieve consensus in one point more often than with the raw RV algorithm.
Chapter 4. Modifications of Rendezvous 43 separation between neighboring nodes. The consensus weight matrix for dispersion is W0=DF−d11T+dI, where the diagonal contains zeros. To guarantee the row stochastic property, we add a diagonal matrix which makes the sum of the row 1, W=W0+ (I−diag(W01)). If we analyze the structure of the weight matrix we notice that it contains negative entries. These entries correspond to the nodes which are closer than dand therefore need a repulsive effect in order to reach the objective distance between them. This is not enough to avoid clustering as we will explain in more detail later in this section. Fig. 4.6 shows how a regularly distributed network may look. We can see how the nodes keep a distance which is or tends to d. Ideally all of the nodes are equally spaced because the goal is a regular network distribution. The dispersion method cope with some issues which make the system unstable or lead to unsatisfactory results. We describe the solutions we have implemented here: •Oscillations: Having an inappropriate or too large speed of convergence provokes undesired oscillations which makes consensus unreachable. As explained in Section 3.5.1, large diagonal entries cause a slow movement of the nodes. Therefore, before adding the values to the diagonal for making the Wmatrix stochastic, we divide the W0matrix by a constant c > 1. W=1 cW0+ (I−1 cdiag(W01))
Chapter 4. Modifications of Rendezvous 44 •Range: The connectivity range affects the formation of the network. Having a large connectivity range provokes a grouping of nodes in clusters of approximate radius d. The reason why this occurs with high values of connectivity range is because the nodes in the middle of the network pull nodes on the boundary towards them. These nodes on the boundary try to be at a distance dto the nodes in the middle but on the way they drag other nodes which were in the middle. The result are the above mention clusters of nodes. This effect can be counteracted by setting a connectivity range similar to the separation objective d. •Stucked nodes: Sometimes nodes which are too close and surrounded by many others have difficulties for reaching the separation d. This problem has been addressed by boosting the negative entries of the weight matrix. This means that the nodes are forced to move further and we expect that this will also help to separate the clusters of nodes which may appear in the different scenarios due to the random nature of the initial graph topology. •Exceeding the limits: Finally we consider the case when nodes try to cross the boundary of the prescribed area of the network. This is very likely for dispersion since it has an spreading effect. Two approaches how to handle this phenomenon are described in the following. The first approach is making the coordinate which steps out of the frame to change its value to the maximum possible. The effect can be seen in Fig. 4.7, where the coordinate xis going out of bounds, but instead we keep the coordinate yand fix xto be the maximum possible value. The second approach is assuming that we have a solid surface, so the node will bounce. This means that the node will continue its way by only changing the sign of direction in the axis which is reaching the limit, as can be seen in Fig. 4.8.
Chapter 4. Modifications of Rendezvous 45 Figure 4.6: Network after dispersion Figure 4.7: Limiting
Chapter 4. Modifications of Rendezvous 46 Figure 4.8: Bounce In Section 5 we will see the performance of RV and AW in networks where we applied formation control algorithm. RV will present poor results whereas AW achieves an outstanding successful rate.
5 Simulation Results In this chapter we show the results of the simulations obtained. The objective is first to compare the different weight matrices, and then to check how the proposed modifications affect the performance. Then we will test the behavior of the consensus algorithms under special circumstances like regular networks or one dimensional scenarios. 47
Chapter 5. Simulation Results 48 5.1 Simulation Setup Before showing the results we explain the settings used. Some of the parameters change along the different simulations because they depend on the needs or they are used for checking how their variation affect the performance. These are for instance the step-size α, the number of agents I, the number of iterations kor the communication range r. For us αis the step-size. It defines how fast the nodes can move and therefore affects the speed of convergence, αstays always within the limits described in Sections 3.2 and 3.4. The number of agents I, the number of iterations k, with special attention to the maximum number of iterations kmax, or the communication range r, are used for tuning the algorithm and testing which are the best settings depending on the objectives. Let us define ras the maximum reachable Euclidean distance, following again the definition in the work [21], this yields that the maximum distance dwhich can be covered is d=|x2+y2| ≤ r, where xand yare the distance covered in each coordinate. The communication range is decided using the equation, r=crA I−1, where Ais the area of the frame, Iis the number of nodes and cis a constant which determines the communication scope of the agents. In most of the simulations the number of scenarios used are 1000, however sometimes will vary. We use a large number of random scenarios for averaging and achieving more realistic results. In some subsections we will provide a table with the parameters used. Other parameters are fixed, in order to unify all the results as much as possible. The area under study is always A= [0,1] ×[0,1]. Furthermore, the initial graph is random geometric and always connected at the beginning but in the cases of control formation
Chapter 5. Simulation Results 49 and the study of regular matrices. In control formation having initially unconnected graphs helps, indeed, for studying if these graphs can get connected. The mean-squared-error (MSE) is defined as the mean-squared distance of the agents to the average position. The average position is calculated as the sum of the positions of all the nodes and then dividing by the number of nodes, and repeating for each iteration. The process for calculating the MSE starts with the average squared error (ASE) [14], ASE[k] = 1 IX i |xi[k]−¯ s[k]|2,(5.1) where ¯ s[k] is the average position at iteration k, and then using the equation (5.1) the MSE is as follows MSE[k] = 1 CI X cX i |xci[k]−¯ sc[k]|2, where Cis the number of scenarios. Therefore the MSE we use is also averaged by the number of scenarios in order to gain accuracy. 5.2 Comparing Weight Matrices All along this section we are going to explain the results obtained for every different weight matrix design. Furthermore, we will compare the trajectories of the nodes for different weight matrix designs and over the same scenarios, highlighting the differences. The settings used in this section are shown in Table 5.1. Parameter Value I100 kmax 150 r0.24 No. of scenarios 1000 Table 5.1: Parameters Section 5.2
Chapter 5. Simulation Results 50 5.2.1 MSE Performance In this section, we will use the mean-squared error (MSE) for measuring which weight matrix is better. With the MSE it is possible to check not only if a method converges faster, but also which method is achieving consensus with higher probability because it will result in a lower average MSE. To be more clear, if for the last iteration the normalized number of neighbors is 1 then the network is fully connected and the consensus can be achieved. In Fig. 5.1 and Fig. 5.2 we see two plots. The first with the evolution of the MSE over the iterations for the four studied weight matrices and the second with the normalized number of neighbors over the iterations. Now let us focus on Fig. 5.1, where are shown all the scenarios, regardless of whether the graphs are connected. We see how AW outperforms the other methods both in convergence speed and in MSE performance. Among the traditional methods rendezvous is the best because it achieves consensus with a higher probability but MH converges faster. With respect to the number of neighbors, Fig. 5.1 shows a high dependence of the MSE improvement on the number of neighbors. Fig. 5.2 is similar to Fig. 5.1 but for only connected scenarios, or in other words, scenarios with which in the end we can reach consensus. It is possible to see that only RV and AW can achieve consensus. For the case of RV only a few scenarios converge and we can observe some artifacts in the number of neighbors plot due to this circumstance. Comparing RV and AW we can see that initially RV converges faster but eventually AW achieves better MSE results.
Chapter 5. Simulation Results 51 101102 −14 −12 −10 −8 MSE over all scenarios MSE iteration k 101102 0 0.5 1 Normalized number of neighbors Neighbors / (I−1) iteration k Legend: CW MH RV AW Figure 5.1: Averaged mean squared error 100101102 −14 −12 −10 −8 MSE iteration k MSE over connected scenarios 100101102 0 0.5 1 Normalized number of neighbors Neighbors / (I−1) iteration k Legend: RV AW Figure 5.2: Averaged mean squared error over connected scenarios
Chapter 5. Simulation Results 52 5.2.2 Average Distance Traveled This section gives some hints about why AW has a better performance. And one possible reason lies in the initial speed of the nodes. First we will study the average traveled distance in general and then moving on to the average distance between nodes. The averaged travelled distance is the sum of distance the nodes move divided by the number of nodes while the average distance between nodes is the sum of the distance between each pair of connected nodes divided by the number of nodes time the number of edges. Let us start with the average traveled distance, note that we again distinguish all the scenarios and connected scenarios in Fig. 5.3 and Fig. 5.4. In Fig. 5.3 we can realize how AW has a different behavior than the other methods. AW starts with slow movements and increases the speed as long as the connectivity increases. This helps to preserve the structure of the network and avoids early disconnection. On the other hand MH and RV start fast and the isolated nodes get often disconnected. Regarding CW the performance is relatively poor and, despite the slow speed of movement, the network suffers from disconnection. Fig. 5.4 shows again similar results than Fig. 5.3 but for connected scenarios. Again, since only a few scenarios converge for RV, we see some artifacts. The second approach is the evolution of the distance between nodes. This time only RV and AW are analyzed. In Fig. 5.5 we have considered all the scenarios and also the distance between nodes which may not have and edge between them, while Fig. 5.6 show the distance between nodes which are connected. We can see how the distance between nodes with RV is reduced faster, whereas for AW at the beginning this distance stays almost constant. In Fig. 5.5 there is a saturation effect for RV when measuring the distance between all nodes because there are more scenarios which can not reach consensus. In Fig. 5.6 for the same reason irregular peaks appear for RV between con-
Chapter 5. Simulation Results 59 0.16 0.18 0.2 0.22 0.24 50 60 70 80 90 100 1 1.5 2 2.5 Agents Rendezvous Range Number of graph elements Figure 5.15: Number of graph elements depending on the connectivity range and the number of nodes 0.16 0.18 0.2 0.22 0.24 50 60 70 80 90 100 1 1.2 1.4 1.6 1.8 2 Number of graph elements Line Range Agents Figure 5.16: Number of graph elements depending on the connectivity range and the number of nodes
Chapter 5. Simulation Results 60 0 50 100 150 200 −40 −35 −30 −25 −20 −15 −10 iteration k MSE Convergence speed Legend: RV Line Figure 5.17: Convergence speed of RV and line weights Fig. 5.18 and Fig. 5.19 we compare the evolution of the MSE over 100 iterations of the different modifications. It is clear that for both only connected scenarios and all the scenarios the delayed versions are giving a great performance. On the other side, the methods which add a constraint in the distance traveled are even counter-productive. For the delayed versions not only the MSE is good but also the convergence is faster and also the speed with which the number of neighbors grow. Regarding the distance traveled, we have decided to show only the threshold method because the delayed versions converge faster and in a reduced number of steps. We see in Fig. 5.20 and Fig. 5.21, that plotting only connected scenarios does not vary the distance traveled but the curve for all the scenarios is smoother because few scenarios converge for the threshold modification. In Fig. 5.22 appear the percentage of networks achieving rendezvous, as expected the AW and the delayed versions of RV are getting the best results.
Chapter 5. Simulation Results 61 100101102 −14 −12 −10 −8 MSE over all scenarios MSE iteration k 100101102 0 0.5 1 Normalized number of neighbors Neighbors / (I−1) iteration k Legend: RV Thres 0.03 Thres 0.01 Relay Del 2 Del 4 Figure 5.18: Mean-squared error over all the scenarios 100101102 −14 −12 −10 −8 MSE iteration k MSE over connected scenarios 100101102 0 0.5 1 Normalized number of neighbors Neighbors / (I−1) iteration k Legend: RV Thres 0.03 Thres 0.01 Relay Del 2 Del 4 Figure 5.19: Mean-squared error over connected scenarios
Chapter 5. Simulation Results 62 10 20 30 40 50 60 0 0.005 0.01 0.015 0.02 0.025 0.03 Average distance traveled iteration k Distance Legend: RV Thres 0.03 Thres 0.01 Figure 5.20: Average traveled distance over all the scenarios 0 20 40 60 0 0.005 0.01 0.015 0.02 0.025 0.03 Average distance traveled iteration k Distance connected nets Legend: RV Thres 0.03 Thres 0.01 Figure 5.21: Average traveled distance over connected scenarios
Chapter 5. Simulation Results 63 0.18 0.2 0.22 0.24 0.26 0.28 0 10 20 30 40 50 60 70 80 90 100 connectivity % Connected networks Legend: AW Delay Relay RV Thres MH CW Figure 5.22: Succesful rendezvous 5.3.1 Dispersion In this section we will discuss the advantages of using dispersion before running the rendezvous algorithm. Despite it is one of the suggested modifications, a different section is used due to its particularities. In first place we need to prove that dispersion is worthy and then in which range because the network we obtain after the dispersion can have different distance dbetween the nodes. Hence, in this section we analyze which values of dare useful for our consensus purpose. The settings used are the same that for the rest of the section, with the exception of the connectivity range, which is used as a variable with the values r={0.16,0.24}. Before showing the results, in Fig. 5.3.1 we see the effect of dispersion over a random geometric graph. It may help to better understand the purpose of applying the dispersion. Using dispersion gives advantages or drawbacks depending, as we can see in Fig. 5.24 and Fig. 5.25, on the chosen separation distance d. The method used for
Chapter 5. Simulation Results 64 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 (a) Before dispersion 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 (b) After dispersion Figure 5.23: Graph dispersion 0 0.05 0.1 0.16 0.18 0.2 0.22 0.24 −0.05 0 0.05 0.1 0.15 Dispersion distance MSE relative to rendezvous Connectivity range MSE Figure 5.24: Mean-squared error compared to RV comparing with the raw RV is subtracting the MSE value and the number of graph elements obtained for the raw RV method to all the other sets of results with different dispersion distances, thus if the result is negative the dispersion helped otherwise was counter-productive. In both figures we can see the same tendency, when the distance chosen is to high we have a negative maximum because the nodes are spread too far from each other. On the other hand, if we choose dtoo small the problem is that the dispersion creates many different swarms disconnected. Therefore we have a trade-off and dmust be selected taking into account these two constraints.
Chapter 5. Simulation Results 65 0 0.05 0.1 0.16 0.18 0.2 0.22 0.24 −5 0 5 10 15 Dispersion distance Number of graph elements relative to rendezvous Connectivity range Number of graph elements Figure 5.25: Number of graph elements compared to RV 5.4 Regular Matrices To conclude our study of the consensus algorithms we are going to analyze the behavior over regular networks. In particular, in 1D space and over grids for the 2D case. In this section the definition of the connectivity range is changed, now we define it as the initial distance among nodes times a constant c∈[1,3]. We will use 2 different sets of parameters, one for 1D and other for 2D. Considering that we use regular scenarios, it is not necessary to average because there is no need to counteract the effect of any random assets. In this whole section we will focus on if the network stays connected, therefore we will plot the number graph elements after a number of iterations sufficient to get consensus. As explained in Section 2.2.4, having more than one graph element means that the network has suffered from disconnection.
Chapter 5. Simulation Results 66 Parameter Value I4-100 kmax 200 r c ×d Table 5.4: Parameters Section 5.4.1 5.4.1 One Dimensional Scenarios The algorithms used for this special case are RV and line weights. As explained in Section 3.5.5 the line method is an approach specially designed for the one dimensional environment. We developed it because for 1D scenarios the AW presents issues since the angles are always 0 or 180 grades. We will plot the number of graph elements depending on different settings. The values for the settings we will use are in Table 5.4. In Fig. 5.26 we have the results for RV over a 1D scenario. We see how when we have a large number of agents and a small connectivity range the connectivity of the network is affected, ant thus the number of graph elements is bigger. It is possible to appreciate how the number of agents affects more than the connectivity range for RV in 1D. Now let us focus on the line weights we specifically designed for 1D. Line weights outperform RV since the graph elements are 1 for every setting. This can be seen in Fig. 5.27.
Chapter 5. Simulation Results 67 1 1.5 2 2.5 30 20 40 60 80 100 0 10 20 30 40 Agents Range/Distance Number of graph elements Figure 5.26: Rendezvous weights 1 1.5 2 2.5 30 20 40 60 80 100 1 1.2 1.4 1.6 1.8 2 Number of graph elements Range/Distance Agents Figure 5.27: Line weights
Chapter 5. Simulation Results 68 Parameter Value I50-100 kmax 100 r c ×d Table 5.5: Parameters Section 5.4.2 5.4.2 Two Dimensional Scenarios We test in this section RV and AW, since in previous sections they have proved to be the most effective algorithms for reaching consensus. We seek in this section, as in the section before, whether regular graphs stay connected or not under certain settings. The settings used are in Table 5.5. Now the results for the RV algorithm are shown in Fig. 5.28. When we have a low number of agents and a high connectivity range we achieve the best results, however what is indeed interesting is that the connectivity range affects more than the number of nodes. Only with high connectivity ranges is possible to reach the objective of having one graph element. This contrast with the 1D case where the number of agents affects more than the connectivity range. The results for the AW show a clear result, for regular networks as long as the initial graph is connected consensus is always achieved. In Fig. 5.29 is possible to appreciate how for all the values of range and number of nodes the number of graph elements is always one.