Average Consensus on Arbitrary Strongly Connected Digraphs with Time-Varying Topologies

Average Consensus on Arbitrary Strongly Connected Digraphs with Time-Varying Topologies

Kai Cai and Hideaki Ishii Kai Cai is with Department of Electrical and Computer Engineering, University of Toronto, Toronto, ON, M5S 3G4, Canada. kai.cai@scg.utoronto.ca. Hideaki Ishii is with Department of Computational Intelligence and Systems Science, Tokyo Institute of Technology, Yokohama 226-8502, Japan. ishii@dis.titech.ac.jp. This work was supported in part by the Ministry of Education, Culture, Sports, Science and Technology in Japan under Grants-in-Aid for Scientific Research, No. 21760323 and 23760385.

We have recently proposed a “surplus-based” algorithm which solves the multi-agent average consensus problem on general strongly connected and static digraphs. The essence of that algorithm is to employ an additional variable to keep track of the state changes of each agent, thereby achieving averaging even though the state sum is not preserved. In this note, we extend this approach to the more interesting and challenging case of time-varying topologies: An extended surplus-based averaging algorithm is designed, under which a necessary and sufficient graphical condition is derived that guarantees state averaging. The derived condition requires only that the digraphs be arbitrary strongly connected in a joint sense, and does not impose “balanced” or “symmetric” properties on the network topology, which is therefore more general than those previously reported in the literature.

Surplus-based averaging, distributed consensus, jointly strongly connected dynamic topology.

I Introduction

The average consensus problem of multi-agent systems has attracted much attention in the literature (e.g., [1, 2, 3]). The problem can be described as follows. Consider a network of agents whose state is at discrete time . Every agent interacts locally with its neighbors for the exchange of state information, and based on the obtained neighbors’ states it updates its own to a new value according to a prescribed algorithm. One aims at designing distributed algorithms by which agents may iteratively update their states such that asymptotically, where is the average of the initial states and .

In [4] we proposed a novel algorithm which provably achieves average consensus on general strongly connected, static networks. This result extends [2, 3] in that it does not require the “balanced” property on the network topology which can be restrictive as every agent needs to maintain exactly equal amounts for incoming and outgoing information. This is realized by augmenting for each agent an additional variable , which we call “surplus”. Each surplus at time keeps track of the state change of agent , in such a way that is time-invariant (here ) despite that the state sum is in general not. The idea was originated in [5] for dealing with a quantized averaging problem.

A more interesting, yet more challenging, scenario is where the agents’ network topology is dynamic, as opposed to static. In real networks, many practical factors could result in a dynamic topology. There can be unpredictable communication issues like random packet loss, link failure, and node malfunction. There might also exist deterministic, supervisory switchings among different modes of the network. A gossip-type randomized dynamic topology has been considered in [4], where we proved that an arbitrary strongly connected topology in expectation is necessary and sufficient for our surplus-based algorithm to achieve average consensus in mean-square and almost surely. In this note, we focus on dynamic network topology varying in some deterministic fashion, and design an extended surplus-based algorithm to achieve state averaging in a uniform sense (defined below). Parts of the results here are contained in the conference precursor [6].

Our main contribution is that the required connectivity condition on time-varying network topology is weakened, as compared to those previously reported in the literature. In [2], it was shown that a sufficient connectivity condition for average consensus is that the network topology at every time (possibly different) should be both strongly connected and balanced. By contrast, supported by surplus variables, we justify that average consensus can be uniformly achieved if and only if the dynamic network is jointly strongly connected (the precise definition is given in Section II). Thus for one, the “balanced” requirement at every instant is dropped; for the other, “strongly connected” is needed only in a joint sense. As to the convergence proof, we use a Lyapunov-type argument, in the spirit of [7]. Extending the algorithm in [4], we introduce a new switching mechanism, which gives rise to a suitable Lyapunov function for state evolution. Finally, when the derived result is specialized to the static network case, we effectively relax a conservative requirement on a parameter of the algorithm in [4].

There are well-known results (existence of a spanning tree jointly, e.g., [7, 8]) for achieving a general consensus over dynamic networks, as well as new conditions of cut-balanced in [9]. To further achieve the special average consensus on the initial state, either the state sum is kept invariant or there is a way of tracking the changes of the state sum. We consider arbitrary strongly connected dynamic topologies where the state sum is time-varying in general, and propose additional surplus update dynamics to keep track of the state changes of individual agents. The surplus values are used in turn to influence the state update dynamics, thereby forcing the states to converge to, and only to, the initial average value.

We note that [10, 11] also addressed average consensus on general dynamic networks by employing auxiliary variables. In [10], an auxiliary variable is associated to each agent and a linear “broadcast gossip” algorithm is proposed; however, the convergence of that algorithm is not proved. Reference [11] also uses extra variables, and a nonlinear (division involved) algorithm is designed and proved to achieve state averaging on non-balanced digraphs. The idea is based on computing the stationary distribution for the Markov chain characterized by the agent network, and is thus different from consensus-type algorithms [1, 2, 3]. Moreover, the dynamic networks considered are of randomized type; consequently the algorithms and results are not directly applicable to the deterministic time-varying case studied in this note. In addition, [12] presents distributed algorithms which iteratively update a column-stochastic matrix into a doubly-stochastic one, and then embeds this matrix update into a standard consensus state update to achieve average consensus. Since the time-varying update matrices used are all column-stochastic, the state sum is invariant in [12]; this is different from the case of time-varying state sum we study here. Finally, centralized and distributed algorithms are designed in [13] to make a general static topology balanced. The algorithm may in principle be used also for dynamic networks, which would require a complete execution at each time for different topologies. This requirement might be strong for applications where networks vary fast.

The rest of the paper is organized as follows. First, in Section II we formulate the average consensus problem for deterministic time-varying networks. Then an extended surplus-based algorithm is designed in Section III, and the corresponding convergence result presented and proved in Section IV. A numerical example is shown in Section V, and finally in Section VI we state our conclusions.

Ii Average Consensus Problem

First, a review of graph notions relevant to this note is provided; and then, the average consensus problem on deterministic time-varying networks is formulated.

For a network of agents, we model their time-varying interconnection structure at time by a dynamic digraph : Each node in stands for an agent, and each directed edge in represents that agent communicates to agent at time . For each node , let denote the set of its “in-neighbors”, and the set of its “out-neighbors”. Also we adopt the convention and .

For the dynamic digraph , we introduce a notion of joint connectivity over some finite time interval. In a node is reachable from a node if there exists a sequence of directed edges from to which respects the direction of the edges. We say is strongly connected if every node is reachable from every other node. For a time interval define the union digraph ; namely, the edge set of is the union of those over the interval . A dynamic digraph is jointly strongly connected if there is such that for every the union digraph is strongly connected.

The “joint” type connectivity notions have appeared in many previous works, e.g., [7, 14, 8]. In particular, to achieve a general consensus (where the consensus value need not be the initial average ), the following joint connectivity is essential. A node is called a globally reachable node if every other node is reachable from . A dynamic digraph jointly contains a globally reachable node (or a spanning tree) if there is such that for every the union digraph contains a globally reachable node. It is shown in [7, 14, 8] that a general consensus can be uniformly achieved on a dynamic digraph if and only if jointly contains a globally reachable node. This joint connectivity notion is weaker than the above “jointly strongly connected” notion, because a strongly connected union digraph is equivalent to that every node of is globally reachable. This notion is, however, too weak to achieve average consensus, as we will see in the necessity proof of our main result; there we show that the “jointly strongly connected” notion is, indeed, a necessary and sufficient condition for uniformly achieving average consensus.

We present several additional graph notions, which will be needed in the necessity proof of our main result. For and a nonempty subset of , we say is closed if every node in is not reachable from any node in at time . Also, the digraph is called the induced subdigraph by . Lastly, a strong component of is a maximal induced subdigraph of which is strongly connected.

The average consensus problem on deterministic time-varying networks is formulated as follows.

Definition 1.

A network of agents achieves uniform average consensus if for all there exists such that for every ,

The above definition of average consensus is in a “uniform” sense with respect to . For studying consensus on deterministic time-varying networks, this uniform consensus notion is typical, e.g., [7, 8].

Problem: Design a distributed algorithm and find a necessary and sufficient connectivity condition on dynamic digraphs such that the agents achieve uniform average consensus.

Iii Surplus-Based Averaging Algorithm

In this section, we present a surplus-based averaging algorithm, which is an extension of the one in [4]. Implementation issues of the algorithm are discussed, and basic properties of the algorithm are shown.

In the algorithm, there are three operations that every agent performs at time . First (sending stage), agent sends its state and weighted surplus to each out-neighbor (weights are specified below). Second (receiving stage), agent receives state and weighted surplus from each in-neighbor . Third (updating stage), agent updates its own state and surplus as follows:


where the parameters used in (1) and (2) satisfy the following items, for every and every :


The parameter , which specifies the amount of surplus used for state update.


The updating weights if , otherwise, and .


The sending weights if , otherwise, and . The last inequality means that the amount of surplus sent to out-neighbors should be strictly less than the total surplus subtracted by the part used for state update.


The switching parameters if , and otherwise. This means that whenever an agent determines to make a positive state update based on the information from in-neighbors, it may use only its surplus for that update.

(P1)-(P4) will enable desired properties of the proposed algorithm. In particular, (P3) and (P4) will establish that all the surpluses are nonnegative; see Lemma 1 below. Note also that at the sending stage of the algorithm, each agent should know its out-neighbors at time , namely the members of .

We discuss the implementation of the above protocol in applications of sensor networks. Let represent a dynamic network of sensor nodes. Our protocol deals particularly with scenarios where information flow among sensors is directed and time-varying. A concrete example is using sensor networks for monitoring geological areas (e.g., volcanic activities), where sensors are fixed at certain locations. At the time of setting them up, the sensors may be given different transmission power for saving energy (such sensors must run for a long time) or owing to geological reasons. Once the power is fixed, the neighbors (and their IDs) can be known to each sensor; at time , each sensor may choose to broadcast its information to all neighbors, or to communicate with a random subset of neighbors, or even not to communicate at all (saving power). Thus, a directed and time-varying topology can arise in this sensor networks application. To implement states and surpluses, we see from (1), (2) that they are ordinary variables locally stored, updated, and exchanged; thus they may be implemented by allocating memories in sensors. Similarly, since the values of the time-varying weights , and parameters , can all be locally determined, these variables may be implemented as sensors’ memories as well.

Now define the adjacency matrix of the digraph by . Then the Laplacian matrix is defined as , where with . It is easy to see that has nonnegative diagonals, nonpositive off-diagonal entries, and zero row sums. Consequently the matrix is nonnegative (by in (P2)), and every row sums up to one; namely is row stochastic.

Also, let (note that the transpose in the notation is needed because for ). Define the matrix , where with . Then is nonnegative (by in (P3) and in (P1)), and every column sums up to one; that is, is column stochastic. As can be observed from (2), captures the part of the update induced by sending and receiving surpluses. Finally, let .

With the above matrices defined, the iteration of states (1) and surpluses (2) can be written in the following matrix form:


Notice that the matrix has negative entries due to the presence of the Laplacian matrix in the -block. Note also that the column sums of are equal to one (here being column stochastic is crucial), which implies that the quantity is a constant for all .

Some other useful implications derived from this algorithm (3) are collected in the following lemma. Define the minimum and maximum states, and , respectively, by

Lemma 1.

In the algorithm (3), the following properties hold:


The surplus is nonnegative, , for every and .


The minimum state is non-decreasing, i.e., if .


The minimum state satisfies for every ; and implies and , i.e., average consensus.


The unique equilibrium of (3) is .

Proof. (i) We show this property by induction on the time index . For the base case , we have for all . Now suppose that , , for all . According to (1) and (2) we derive

It then follows from (P3), (P4), and the induction hypothesis that for all . This completes the induction.

(ii) Let be arbitrary. First consider a node such that . It must hold that . Thus by (1) and (P4), the state update of node is . Next consider a node such that ; there are two cases. Case 1: . Then . Case 2: . Then . Notice that the first two terms of the above summation consist of a convex combination of and , , and hence . In turn . Therefore, the minimum state cannot decrease.

(iii) Suppose on the contrary that for some . This implies that . But since , one obtains , a contradiction to the property (i). Hence we conclude that for all . And when , we must also have owing again to (i). Therefore and for all .

(iv) For every , substituting and into equations (1) and (2) yields and . Hence is an equilibrium of (3). For uniqueness, suppose is another equilibrium. Then by in (1) we have for all . Since according to (i), it must hold that and , for all . So is of the form , (otherwise ). However, ; this contradicts that is a time-invariant quantity for the algorithm (3).

Iv Convergence Result and Proof

In this section, we present our main result and provide its proof.

Theorem 1.

Using the algorithm (3), a network of agents achieves uniform average consensus if and only if the dynamic digraph is jointly strongly connected.

Comparing our derived graphical condition with the one in [2], we drop the balanced requirement at every moment on one hand, and need strongly connected property only in a joint sense on the other hand. Also, for the special case of static digraphs, we can use the algorithm (3) with a fixed constant parameter ; there will still be switching in the updates. However, the original algorithm in [4] may not converge because this value might be too large for the algorithm to remain stable (in [4], is required to be sufficiently small (conservative bounds available) to ensure convergence of the designed algorithms). Finally, the proof techniques in [4] and here are very different: [4] relied on matrix perturbation theory, while here a Lyapunov-type argument is used, below.

We note that there have been efforts in the literature addressing time-varying consensus/averaging problems with second order dynamics. In [15], an “accelerated gossip” algorithm is designed which relies heavily on symmetry of undirected graphs. The algorithm studied in [14], on the other hand, is based on the assumption of dwell-time switching of the time-varying topology. By contrast, we study general dynamic digraphs that vary at every discrete time instant and each resulting update matrix (3) is not nonnegative.

We now proceed to the proof of Theorem 1, for which we rely on the following Lyapunov result (cf. [7, Theorem 4 and Remark 5]). For any given , let

Lemma 2.

Consider the algorithm (3). Suppose that continuous functions and satisfy the following conditions:

(i) is bounded on bounded subsets of , and positive definite with respect to the average consensus point (i.e., and if );

(ii) is also positive definite with respect to the average consensus point (i.e., and if );

(iii) there exists a finite time such that for every ,

Then, the network of agents achieves uniform average consensus.

Lemma 2 is an application of the more general result [7, Theorem 4 and Remark 5] to the dynamic system (3) with the equilibrium . Note that the function in Lemma 2 corresponds to a compound of two functions and in [7, Theorem 4], where is a set-valued function on and assigns a nonnegative real number to every element in the image of . For the proof of Lemma 2, refer to that of [7, Theorem 4]; see also [16, Section 4.5]. In the sequel, we will construct two functions that satisfy the conditions in Lemma 2.

First consider , in (5), given by


Clearly depends continuously on . Take any finite ; then both and are finite. Thus is bounded on any bounded subsets of . Since for all , we obtain by (ii), (iii) of Lemma 1 that is non-increasing (i.e., if ), and positive definite with respect to the average consensus point (i.e., and if ).

Second, for a given let , in (5), be


where the infimum is taken over all sequences satisfying

for a given . Thus , , are the pairs of states and surpluses possibly reachable from in time steps.

Lemma 3.

The function in (7) is continuous in .

Proof. For given , consider an arbitrary sequence satisfying

First, we show that each , , is a continuous function of . According to (1) and (2), it suffices to show that each of the functions and , , is continuous in . For this, let and . By (P4)

Clearly is continuous in . Since is a linear function of , function is continuous in . Now substituting the term from (1) into (2), we derive that is continuous in . It then follows from (1) that is also continuous in .

Second, the sequence depends continuously on . This is because each function , , is continuous, and there is only a finite number of possible switching sequences of digraphs. Thus, it follows from (6) that the expression depends continuously on . Finally, by the infimum definition of (7), we conclude that the function is continuous in .

Now from (7), one may easily see that the function if ; so . The following result will be vital, which asserts that there always exists a finite such that the function is positive definite with respect to the average consensus point , provided that the digraph is jointly strongly connected.

Lemma 4.

Suppose that the dynamic digraph is jointly strongly connected. There exists a finite such that if is strictly positive, then is also strictly positive.

In the proof of Lemma 4, we will derive that a valid value is , where is the period when the dynamic network is jointly strongly connected. This value is the one we will use in the proof of Theorem 1. Lemma 4 indicates that the function satisfies for . We postpone the proof of Lemma 4, and provide now the proof of Theorem 1.

Proof of Theorem 1. (Sufficiency) Suppose that is jointly strongly connected. Then it follows from Lemmas 3 and 4 that the function defined in (7) and the function defined in (6) satisfy the conditions in Lemma 2. Therefore uniform average consensus is achieved.

(Necessity) Suppose that is not jointly strongly connected. Namely for every there exists such that the union digraph is not strongly connected. Thus during this interval , there are some nodes not globally reachable; denote the number by . Case 1: (i.e., there is no globally reachable node). Then has at least two distinct closed strong components, say with nodes and with nodes such that (by [8, Theorem 2.1]). Consider a state-surplus pair such that the nodes in have states , those in have states , and ; all surpluses are zero, . In this case, no update of state or surplus will occur. One computes that ; let and , . Then but . Therefore uniform average consensus is not achieved.

Case 2: . We denote by the set of all globally reachable nodes. Then is the unique closed strong component in (again by [8, Theorem 2.1]). Consider a state-surplus pair such that the nodes in have states , those in have states , and ; all surpluses are zero, . In this case, no update will occur for the states in . Let , , and . Then but . Therefore uniform average consensus is not achieved. 

In the necessity proof above, Case 2 shows that even if jointly contains a globally reachable node (e.g., [7, 14, 8]), uniform average consensus cannot be achieved for certain state and surplus conditions. In fact, state averaging requires the stronger connectivity notion: jointly strongly connected .

Finally we prove Lemma 4. By the definitions of in (7) and in (6), it must be shown that there exists a finite such that for every time the minimum state satisfies . The proof is organized into two steps. First we show that if some nodes have positive surpluses, then all nodes in the network will have positive surpluses after a finite time. Second, we show that using positive surpluses, the nodes having the minimum state will increase their values after a finite time. Although some other nodes may decrease their state values, it is justified that the minimum state of the whole network increases. The proof relies mainly on the graphical condition of jointly strong connectedness as well as the state and surplus update dynamics (1) and (2).

Proof of Lemma 4. Fix an arbitrary time , and denote by the minimum state at this time. Assume (i.e., average consensus is not yet reached); thus is strictly positive. It must be shown that is also strictly positive, for some finite . This amounts to, by the definitions of in (7) and in (6), showing that . We proceed in two steps.

Step 1: We prove the following claim, which asserts that positive surpluses can diffuse across the network under jointly strongly connected topology.

Claim. Suppose that at time there are surpluses strictly positive, say , and . Then , for every .

To prove the claim, we introduce a set , , given by


By the assumption of the claim, is a proper subset of (namely, ). First, owing to the surplus update (2), together with (P1) and (P3), any strictly positive surplus cannot decay to zero in finite time. This indicates , . Next, since is jointly strongly connected, there is an instant in the interval such that a directed edge exists, for some and some . Then agent receives surplus of the amount , and hence is strictly contained in . Repeating this argument leads to the conclusion that , which shows the claim.

Step 2: Applying the above claim, we establish that the minimum state of the network increases after a finite time . To this end, let another set , , be


Then is the set of agents whose states are equal to at time . First, owing to the state update (1), together with (P2) and (P4), any cannot decrease to in finite time. This implies , . Next, we will establish that when the topology is jointly strongly connected of period , there exists such that is strictly contained in , (that is, has strictly less agents than ).

We distinguish three cases. (i) . Under jointly strongly connected topology, there is a directed edge , and , for some time . Then by (1) and (P4) we have . So is strictly contained in . (ii) is a proper subset of . It follows from the above claim that . Then by the same argument as in case (i) we obtain that is strictly contained in . (iii) . Owing again to jointly strongly connected topology, there is a directed edge , with and (here is the maximum state at time ), for some time . Then by (1), (2), and (P4) we have , and thereby . Now applying the derivation in case (ii) leads us to that is strictly contained in . Summarizing the above three cases, and letting , we obtain that is strictly contained in .

Finally, since there are at most agents in , for we have . This implies with .

V Numerical Example

Fig. 1: Periodically time-varying topology: a b c d a b c d .
Fig. 2: Convergence trajectories of states and surpluses obtained by applying the algorithm (3) for the topology in Fig. 1
Fig. 3: Convergence time comparison between the algorithm (3) and the one in [4]. Consider digraphs with nodes derived from complete graphs with nodes by removing edges , . Thus are strongly connected, non-balanced digraphs, and we consider static since the algorithm in [4] applies only to this case. For simplicity choose and . Run both algorithms on digraphs with different , and with initial states randomly selected from , initial surpluses . Find the convergence times to be the minimum times when , and each sample point on the displayed curves is the average convergence time of algorithm executions. Comparing the two curves we see that the convergence time of algorithm (3) is approximately twice as much as the one in [4], which is due to the former’s enforcement on nonnegative surpluses that produces undesirable switchings.

We provide a numerical example to illustrate the convergence result of the algorithm (3). Consider the periodically time-varying digraph , with period , displayed in Fig. 1. No single digraph is strongly connected, but is jointly strongly connected. For simplicity, we apply the algorithm (3) by choosing the parameters and weights to be constant: for all agents and all edges . It is easily verified that this choice satisfies the requirements (P1)-(P3).

For the initial state and the initial surplus , the state and surplus trajectories are displayed in Fig. 2. Observe that every state converges to the desired average , and every surplus is always nonnegative and vanishes eventually. Also we see that there are considerable switchings in both states and surpluses due to the enforcement of nonnegative surpluses, which may undesirably slow down the convergence speed. Indeed, in a simulation study displayed in Fig. 3, we compare the algorithm (3) to the one in [4] (the latter poses no restriction on nonnegative surpluses), and find that the convergence time of algorithm (3) is approximately twice as much as the one in [4] for a class of digraphs. An important future study then would be to find appropriate (possibly time-varying) values of the parameters and weights so as to reduce switchings and accelerate convergence.

Vi Conclusions

We have proposed a new surplus-based algorithm which enables networks of agents to achieve uniform average consensus on general time-varying digraphs that vary in some deterministic fashion. Our derived graphical condition does not require balanced or symmetric network topologies, and is hence more general than those previously reported in the literature. Future research will target convergence speed analysis of the algorithm as well as the design of fast surplus-based averaging algorithms.


  • [1] D. P. Bertsekas and J. N. Tsitsiklis, Parallel and Distributed Computation: Numerical Methods.   Prentice-Hall, 1989.
  • [2] R. Olfati-Saber and R. M. Murray, “Consensus problems in networks of agents with switching topology and time-delays,” IEEE Trans. Autom. Control, vol. 49, no. 9, pp. 1520–1533, 2004.
  • [3] L. Xiao and S. Boyd, “Fast linear iterations for distributed averaging,” Systems & Control Letters, vol. 53, pp. 65–78, 2004.
  • [4] K. Cai and H. Ishii, “Average consensus on general strongly connected digraphs,” Automatica, vol. 48, no. 11, pp. 2750–2761, 2012. Also in Proc. 50th IEEE Conf. on Decision and Control and European Control Conf., pp. 1956-1961, 2011.
  • [5] ——, “Quantized consensus and averaging on gossip digraphs,” IEEE Trans. Autom. Control, vol. 56, no. 9, pp. 2087–2100, 2011.
  • [6] ——, “Average consensus on arbitrary strongly connected digraphs with dynamic topologies,” in Proc. American Control Conf., no. 14-19, Montreal, Canada, 2012.
  • [7] L. Moreau, “Stability of multi-agent systems with time dependent communication links,” IEEE Trans. Autom. Control, vol. 50, no. 2, pp. 169–182, 2005.
  • [8] Z. Lin, Distributed Control and Analysis of Coupled Cell Systems.   VDM Verlag, 2008.