File: 1701.00021.txt

package info (click to toggle)
python-pattern 2.6%2Bgit20180818-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 93,888 kB
  • sloc: python: 28,119; xml: 15,085; makefile: 194
file content (2591 lines) | stat: -rw-r--r-- 67,282 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

1

Distributed Finite-Time Termination of Consensus in the Presence of Delays
Mangal Prakash*, Saurav Talukdar*, Sandeep Attree, Vikas Yadav, and Murti V. Salapaka
*Both authors have contributed equally

arXiv:1701.00021v3 [math.OC] 21 Jun 2017

Abstract--Linear consensus iterations guarantee asymptotic convergence, thereby, limiting their applicability in applications where consensus value needs to be used in real time to perform a system level task. It also leads to wastage of power and communication resources. In this article, an algorithm is proposed which enables each node to detect in a distributed manner and in finite number of iterations, when every agent in the network is within a user specified threshold of the consensus value (approximate consensus) and hence terminate further communications and computations associated with consensus iterations. This article develops a distributed algorithm for achieving this approximate consensus in presence of random time-varying bounded communication delays. Moreover, the article instantiates the algorithm developed to distributively determine the average of the initial values held by agents in finite number of iterations. Specifically, this algorithm relies on distributively determining the maximum and minimum of values held by the agents. The approach presented here offers several advantages, including reduced computational complexity, and hence, is suited for hardware implementation. An experimental test bed of Raspberry-Pi agents that communicate wirelessly over neighborhoods is employed as a platform to demonstrate the effectiveness of the developed algorithm.
Index Terms--Consensus with delays, average consensus with delays, approximate consensus, maximum consensus, minimum consensus.
1. INTRODUCTION In recent times networks have gained widespread adoption for representing and analyzing large scale systems. Applications of the networks framework span multiple disciplines that include economics, neuroscience and social sciences [1] and emerging science and technology, including, "internet of things" [2]. Multi agent systems whose dynamics are governed by a network topology, often collaborate with each other in order to achieve system level objectives. Increasingly in applications, the size of the system imposes severe restrictions on resources that include computational capacity as well as communication bandwidth [3]. Due to these limitations coordination of multiple agents in large scale networked system calls for distributed algorithms. A problem that has received considerable attention in coordination of multi-agent systems addresses the consensus problem, where how agents can compute a common value determined by initial values held by agents in a distributed manner is devised and analyzed [3], [4]. Here, all agents
M. Prakash, S. Attree and M. V. Salapaka are with the Department of Electrical and Computer Engineering, University of Minnesota, Minneapolis, MN, 55455, USA e-mail: {praka027,murtis}@umn.edu.
S. Talukdar is with the Department of Mechanical Engineering, University of Minnesota, Minneapolis, MN, 55455, USA e-mail: taluk005@umn.edu.

in the network strive to attain a common value of interest by sharing information with their neighbors in the network, which defines the communication layer. Consensus has found applications in parallel computers [5], distributed coordination of mobile autonomous agents [6], distributed data fusion in sensor networks [7], large scale power networks [8] and many more. A special case of consensus is that of average consensus where agents converge to the average of the initial conditions held by agents through local communication [4], [9]. There is considerable research toward algorithms for distributively reaching consensus with contributions from communications, control and computer science areas [10].
The convergence to the consensus value, in presence or absence of delays, when linear strategies are used is typically achieved asymptotically [11], [12], [13], [14], [15]. Here, agents keep updating their states and communicating with their neighbors forever leading to wastage of power and computational resources, which is untenable in resource constrained applications such as sensor networks where the resources available for each agent is limited. Moreover, in many real time applications including the power grid, distributed finitetime termination of consensus iterations is essential as the consensus value when determined is used in real-time by local systems to perform important tasks [16]. In such situations, it is necessary for each node to detect in finite-time, if approximate consensus is achieved within a specified error margin and thus, terminate computation as well as communication.
Distributed termination of the average consensus in finite time in the presence of time-varying but bounded delays is presented in [17]. [17] relies on computing and storing Hankel matrices at every iteration, which can be computationally expensive if the size of matrix is large; here the size depends on the network size as well as the number of iterations needed for convergence. We introduce a computationally efficient approach for finite time termination of consensus and average consensus both. We use maximum and minimum consensus to distributively determine the proximity (within a prespecified tolerance) of each node to the consensus/ average consensus value. Numerous applications of maximum and minimum consensus in other areas are reported in literature. [18] uses maximum consensus for synchronization of wireless sensor networks. Zhang and Li demonstrated the application of minimum consensus for tackling shortest path planning problem in graphs [19]. However, we explore a niche application of using the maximum and minimum consensus in an innovative manner to arrive at a distributed finite time termination criterion of consensus/ average consensus in the presence of fixed as well as time-varying link delays.

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

2

Contributions: This article develops and analyzes an algorithm, where agents exchange information with other agents in their neighborhoods in the presence of unknown, time-varying but uniformly bounded communications delays, to achieve approximate consensus/average consensus (i.e, a termination criterion which can be used by agents to terminate computations distributively while realizing the consensus/ average consensus value is within the prespecified error tolerance). The algorithm depends on iteratively computing the maximum and minimum of the values held by agents with a small computational footprint. It is worth noting that the presentation in the manuscript is focused on the case of fixed communication delays to keep the discussion simple and the extension for the case of time varying communication delays is presented in the Appendix. Furthermore, the algorithm developed is instantiated to the average consensus problem as well and explicit bounds on the error from the average value due to finite-time termination of the average consensus protocol are determined. To the best of the knowledge of authors, the distributed finitetime termination algorithms developed here are simpler and computationally less expensive than other existing algorithms till date. The performance of the algorithms is illustrated using prototype networks of Raspberry Pis, where agents experience uncertainty in the communication channels. The algorithms proposed in this article for distributed finite time termination of consensus/ average consensus are generalizations and nontrivial extensions of the delay free framework presented in [20], which is the conference proceedings article by the authors. Notably, the algorithm presented in [20] fails when delays are present on communication channels and hence, the necessity arises for implementing the algorithm presented in this article.
The rest of the paper is organized as follows. In Section 2, the dynamics of the consensus algorithm executed by each agent is presented along with the needed notations, definitions and assumptions. In Section 3, the distributed finite-time stopping criterion for consensus algorithm based on maximum and minimum consensus protocols is developed. The average consensus protocol in presence of delays is presented in Section 4, followed by the development of distributed finitetime stopping criterion for average consensus protocol. The performance of the proposed distributed finite-time algorithms illustrated through simulations as well as with experiments on real communication networks realized through Raspberry Pi devices is presented in Section 5. Finally, the conclusions are presented in Section 6.
2. THE CONSENSUS PROTOCOL: BACKGROUND, DEFINITION AND ASSUMPTIONS
In this section definitions and notations needed for subsequent development (for details refer [21] and [22]) are provided. Consider the following definitions:
- Directed and Undirected Graph : A directed graph G is a pair {V, E} where V is a set of vertices or nodes and E is a set of edges, which are ordered subsets of two distinct elements of V . If an edge from j  V to i  V exists then it is denoted as (i, j)  E. An undirected graph G

is a pair {V, E} where V is a set of vertices or nodes and E is a set of edges such that for every pair of distinct nodes i  V and j  V , if (i, j)  E then (j, i)  E. - Directed Path : In a directed graph, a directed path from node j to i exists if there is a sequence of distinct directed edges of G of the form (i, k1), (k1, k2), ..., (km, j). - Strongly Connected Graph : A directed graph is strongly connected if it has a directed path between each pair of

distinct nodes i and j. - In-neighbor of node: Given a graph G = {V, E} (directed
or undirected), a node j  V is said to be an in-neighbor of node i  V if (i, j)  E. The set of in-neighbors of node i  V is denoted by Ni- := {j : (i, j)  E}. - Diameter of Graph : The longest shortest distance between any pair of nodes in a graph is the diameter of the graph

and is denoted by D. - Stochastic Matrices: A real n  n matrix A = [aij] is
called a row stochastic matrix if 1  aij  0 for 1 
n

i, j  n and aij = 1 for 1  i  n. A real n  n

j=1
matrix A = [aij] is called a column stochastic matrix
n
if 1  aij  0 for 1  i, j  n and aij = 1 for

1



j



n.

A

real

n



n

matrix

A

=

i=1
[aij ]

is

called

a

doubly stochastic matrix if it is both row stochastic and

column stochastic.

- Non-negative Matrix and Primitive Matrix: A nonnegative matrix is a matrix all of whose entries are greater

than or equal to zero. A primitive matrix is a square

nonnegative matrix if it is irreducible and has only one

eigenvalue of maximum modulus which is positive.

Consider a directed graph G = {V, E}. For every (i, j)  E, a weight pij > 0 is associated which represents the weight, node i gives to any information received from node j. P = [pij] represents the weight matrix associated with graph G. If (i, j) / E then pij = 0. In this article, the problem of consensus and average consensus on a network

of agents in presence of delays on communication links is

studied. The following section assumes that delays on the

links are fixed and the extension of the results for the time

varying but bounded communication delay case can be found

in Appendix B. The consensus problem under consideration

here admits the following assumptions.

A1. Graph G is strongly connected. A2. Weight matrix P associated with the graph G is row
stochastic.

A3. Each edge in G has a fixed delay, that is, for any two nodes i,j  V such that (i, j)  E, the delay on the link (i, j) is ij(k) = ij for all time instants k.
A4. (i, i)  E and ii = 0 for all i  V. A5. The delay in the network is bounded and finite, that is,

ij  ,   R, for all i, j  V . The nodes do not have the knowledge of the delay as-

sociated with the edges in their in-neighborhood. Now, the

consensus update rule for a directed network of agents in-

teracting according to a fixed communication topology in the

presence of fixed communication delays on the communication

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

3

channels is presented. Under the assumptions A1-A5, agent i updates its state xi(k + 1) at (k + 1)th iteration by taking a weighted linear combination of its own value and possibly delayed values of its in-neighbors received at kth iteration. The update rule is described by:

xi(k + 1) = piixi(k) +

pij xj (k - ij ),

(1)

jNi-

where, Ni- is determined by the graph G = {V, E}. Let x(k) denote the column vector of all nodal states. Based on the update rule (1), consensus is defined as follows.

Definition 1. (Consensus): A system of n agents is said to have achieved consensus if for any set of initial conditions x(0)  Rn, there exists   R such that klimxi(k) =  for i = 1, 2, ..., n.

Note that  does not depend on the node index i. It should be noted from (1) that at any update iteration k, from each of its in-neighbors node i will receive one packet of information; albeit lagged information from a neighbor if there is a delay in the communication channel.

Theorem 2.1. [12], [13] Update rule given by (1) under the assumptions mentioned in Section 2 achieves consensus.

3. MAX-MIN CONSENSUS ALGORITHMS In this section, first results based on the consensus update algorithm given by (1) are established and then Maximum and Minimum consensus algorithms are defined and their convergence is established. Subsequently a discussion on determining a distributed finite-time stopping criterion to detect if consensus is reached is provided. Let for node i, the maximum over all values held by its neighbors including itself currently and in the  past instants be given by,

{qi, qi } := arg max xj(k - r),

(2)

j Ni- {i}

r={0,1,2,...,}

for some qi  {0, 1, 2, ..., }, qi  Ni-  {i}. Thus, xqi (k - qi ) is the maximum value in the neighborhood of node i in the horizon of  into the past starting from iteration k. Similarly, let for node i, the minimum over all values held by its neighbors including itself, currently and in the  past instants be given by,

{si, si } := arg min xj(k - r),

(3)

j Ni- {i}

r={0,1,2,...,}

for some si  {0, 1, 2, ..., }, si  Ni-  {i}. Thus, xsi (k - si ) is the minimum value in the neighborhood of node i in the horizon of  into the past starting from iteration k. Furthermore, consider the maximum and minimum over all nodal values over the horizon {k - , ..., k - 1, k} in the past as given by,

M (k)

:=

max
jV

xqj (k

-

qj ),

(4)

and,

m(k)

:=

min
sV

xqs (k

-

qs ).

(5)

Lemma 3.1. Consider the update rule (1). Then for all time instants k  k and for all i  V ,

xi(k

)  max
jV

xqj (k - qj ) = M (k),

and,

(6)

xi(k

)



min
sV

xqs (k

-

qs )

=

m(k).

(7)

Proof. See Appendix A for proof.

Lemma 3.1 establishes that the value held by an agent in the future is always bounded above by the maximum over the current and delayed values over a horizon  of all the nodal states. Moreover, the value held by the agent is bounded below by the minimum over the current and delayed values over a horizon  of all nodal states.
Lemma 3.2. Consider a strongly connected graph G = {V, E} running consensus protocol given by (1) with an initial condition x(k). Let i be a node such that xi(k) < M (k) and let j be a node such that xj(k) > m(k), then for all time instants k  k, xi(k ) < M (k) and xj(k ) > m(k).
Proof. See Appendix A for proof.

Lemma 3.2 establishes that if the value held by an agent

i at the present instant of time is strictly less (greater) than

the maximum (minimum) over the current and delayed values

over a horizon  of all the nodal states, then the value of agent

i continues to be strictly less (greater) than this maximum

(minimum) for all future instants.

Consider the maximum and minimum value in the network,

which is defined as, max

min
iV

xi(k)

respectively.

x(k)

:=

max
iV

xi(k)

and

min

x(k)

:=

Lemma 3.3. Consider a strongly connected graph G =

{V, E} with an update rule for the consensus protocol given

by (1) with an initial condition x(k) such that min x(k) <

max x(k). Then for all k  k +D(+1), max x(k ) < M (k)

and min x(k ) > m(k).

Proof. See Appendix A for proof.

Lemma 3.3 establishes that if the maximum value over all nodal states at the present instant is strictly greater than the minimum value over all nodal states at the present instant, then the maximum (minimum) over all nodal states after D(1 + ) instants in the future will be strictly less (greater) than the present maximum (minimum) over the current and delayed values over a horizon  of all the nodal states.
Define by T  := D(1 + ) + . Note that T  is a constant for a fixed interconnection topology.
Theorem 3.1. Consider a strongly connected graph G = {V, E} with an update rule for the consensus protocol given by (1) and an initial condition x(lT ) such that min x(lT ) < max x(lT ), where l  0. Then, M ((l+1)T ) < M (lT ) and m((l + 1)T ) > m(lT ).

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

4

Proof. Using k = lT  in Lemma 3.3, it follows that for k  lT  + D(1 + ),

max x(k ) < M (lT ).

(8)

By definition,

M ((l

+

1)T )

=

max
jV

xqj ((l

+

1)T 

-

qj ).

Since the index ((l + 1)T  - qj )  lT  + D(1 + ), it follows that

proved. Preceding results are utilized to develop a finite-time termination criterion for the consensus protocol.
Define T~ := ( + 1). Note that in the subseDefnt discussions, these two notations will be used interchangeably. ine the queindicator function for the link from node j  V to node m  V at time k as

Ik,mj ( ) =

1, 0,

if mj(k) =  if mj(k) = ,

M ((l + 1)T ) < M (lT ). The rest of the proof is left to the reader.

Theorem 3.1 implies that M (lT ) is a strictly decreasing sequence and m(lT ) is a strictly increasing sequence as a function of the index l.
Corollary 3.1. Consider a strongly connected graph G = {V, E} running consensus protocol given by (1) with an initial condition x(lT ) such that min x(lT ) < max x(lT ), where, l  0. Then, (a) max x((l + 1)T ) < M (lT ) and min x((l + 1)T ) > m(lT ). Also, (b) max x((l + 1)T ) - min x((l + 1)T ) < M (lT ) - m(lT ).

Proof. The proof of (a) follows directly from Theorem 3.1. The proof of (b) is a direct consequence of (a).

Corollary 3.2. Consider the consensus protocol given by (1)

with 1, 2,

each node ...n. Then

converging to the sequences

{M, i.(el.T,kli)m}lxNi(kan)d={m(folTr

all i = )}lN

converge to  as l  . Further, the sequence {M (lT ) -

m(lT )}lN  0 as l  .

Proof. From the hypothesis it follows that, there exist  such that,

klimxi(k) = , for all i = 1, 2, ...n. Further, M (lT ) and m(lT ) are subsequences of convergent sequence x(k) and hence converge to the same limit . Thus both M (lT ) and m(lT ) converge to  as l  . This implies,

M (lT ) - m(lT )  0 as l  .

Corollary 3.1 (b) and Corollary 3.2 together imply that max x((l + 1)T ) - min x((l + 1)T )  0 as l  . In what follows an algorithm is devised which converges to max x((l + 1)T ) and min x((l + 1)T ) in finite number of iterations with the finite-time stopping criteria based on the difference between max x((l+1)T ) and min x((l+1)T ) and evaluating whether the difference is less than the user specified error tolerance. Towards this end, the maximum/ minimum consensus protocol are developed in the following subsection and the finite-time convergence of maximum/ minimum consensus protocols in presence of fixed communication delays is

A. Maximum and Minimum Consensus Protocols The Maximum Consensus Protocol denoted by MXP com-
putes the maximum of the given initial node conditions z(0) = [z1(0) z2(0)....zn(0)]T in a distributed manner. It takes z(0) as an input and generates a sequence of node values based on the following update rule for node m for k  0,
zm(k + l) = zm(k + l - 1), l  {k + 1,    , k + }, (9)

zm((k + 1)T~) = jNmm -ax{m}{zm((k + 1)T~ - (r + 1))I(k+1)T~-r,mj (r)}r=0,1,...,.
(10) where, the indicator function is defined as in (9).
The Minimum Consensus Protocol denoted by MNP computes the minimum of the given initial node conditions y(0) = [y1(0) y2(0)....yn(0)]T in a distributed manner. It takes y(0) as an input and generates a sequence of node values y(k) based on the following update rule for k  0:
ym(k + l) = ym(k + l - 1), l  {k + 1,    , k + }, (11)

ym((k + 1)T~) = jNmm -in{m}{ym((k + 1)T~ - (r + 1))I(k+1)T~-r,mj (r)}r=0,1,...,.
(12)

where, the indicator function is defined as in (9).

Note that (9) maintains value of zm at zm((k - 1)) till the kth epoch k+l, l  {1, 2, ..., } ends. On the other hand (10) updates zm at time instances which are multiples of T~=  + 1 based on recent information from the neighbors and itself.

Effectively every zm update takes place once after every  iterations. Similarly, every ym update takes place once after every  iterations. MNP is similar to MXP since the minimum over a set of values is the negative of the maximum of the

negative of the values. Next, results are established which will

be useful to prove the convergence of MXP and MNP running

through the update rules (9), (10), (11) and (12) in finite-time.

Let

z~

:=

max
iV

zi(0)

and

Let

y~

:=

min
iV

yi(0).

Lemma 3.4. Consider a directed graph G = {V, E} with fixed delays with uniform bound  and an update rule for the Maximum Consensus Protocol (MXP) given by (9) and (10)

and the Minimum Consensus Protocol (MNP) given by (11)

and (12).

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

5

(a)

Then, for all k

>

0,

max
iV

zi(k

)

=

z~

and

min
iV

yi(k

)

=

y~.

(b) Let for some k, zj(k) = z~, that is, node j has the

maximum value in the network at the kth time instant.

Then, for all instants k > k, zj(k ) = z~, that is node j

continues to be the maximum for k > k.

(c) Let for some k, yj (k) = y~, that is, node j has the minimum value in the network at the kth time instant.

Then, for all instants k > k, yj (k) = y~, that is node j

continues to be the minimum for k > k.

Proof. (a) The proof is left to the reader. (b) The proof follows from the fact that if the maximum value at the current iteration is held at node j, then node j continues to hold the maximum value in future iterations as well, as the update step of the MXP (10) includes the past value of node j. (c) The proof is similar to the proof of (b).

Let,

(j) := max z(T (j)), (j) := min y(T (j)), and (j) := (j) - (j).

Lemma 3.6. Consider the consensus protocol given by (1)

with each node converging to , i = 1, 2, ...n. Then the sequences

i.e(j.,)kliamndxi((kj))

=  for all converge to

 as j  . Further, the sequence (j)  0 as j  .

ProafNonoordft.keal lIilfmthi{ax=tm,(ki1n),(}x2j k,i)=(..ka1.nn),id,=Vthce(onjfn)ovitrearfragoelelllssoiuwt=bosse1tq,h,u2ate,thn.ak.clt.inemiss.,omkfliamc xonxxviie((rkkg))en==t sequences max xi(k) and min xi(k) respectively. Thus, (j) and (j) converge to the same limit . This implies that, (j)  0 as j  .

Lemma 3.5. Consider a directed graph G = {V, E} with

fixed delays with uniform bound  and an update rule for

the Maximum Consensus Protocol (MXP) given by (9) and

(10) and that for for the Minimum Consensus Protocol (MNP)

given by

(11)

and

(12).

Let

z1

(0)

=

max
jV

zj (0)

and

y1

(0)

=

min
jV

yj (0).

Then,

for

all

k



D(1

+

),

and

any

m



V

,

(a) zm(k) = z1 (0). (b) ym(k) = y1 (0).

Proof.

(a)

As

z1 (0)

=

max
jV

zj (0)

it

follows

from

Lemma

3.4

that

z1 (k) = z1 (0) for all k  0. Consider any node i  V . Since the graph G is strongly connected, there exists a directed path (2, 1)(3, 2)...(i, d) connecting i and 1. It follows from the update rule (9) and (10) that within  iterations, 2 will have received the value z1 (0) and thus, z2 ( + 1) = z1 (0); and for any k   + 1, z2 (k) = z1 (0). Using the above steps for 3, 4, ..., d, i, it follows that,

zi(k) = z1 (0) for any k  d( + 1) Thus if k  D(+1)  d(+1); zi(k) = z1 (0). Since D is the diameter of the graph G, it follows that, for k  D( + 1),

zm(k)

=

z1 (0)

=

max
jV

zj (0)

for

all

m



V.

(b) The proof is similar to the proof of (a). This proves the theorem.

B. Distributed finite-time Algorithm for Terminating Consensus protocol
In this section, an algorithm based on Maximum-Minimum Consensus for stopping the consensus protocol distributively in finite-time is proposed using the results derived in the previous sub-sections. At time instants T (j) = jT , for j = 1, 2, ... MXP and MNP protocols are reset with initial conditions x(jT ), thus z(T (j)) = x(T (j)) and y(T (j)) = x(T (j)).

It should be noted that Lemma 3.6 is a consequence of Corollary 3.2.

Algorithm 1: Finite-time termination of consensus in presence of uniformly bounded delays

1 Input: 2 x(0), D, , , P ; 3 Initialize: 4 k := 0; 5 l := 1; 6 zi := xi(0); 7 yi := xi(0); 8  := 1; 9  := 0; 10 Repeat:

// Initial condition

11 12

xi(k + 1) = piixi(k) if k + 1 =  + l(1 +

+)thjeNni-

pij xj

(k

-

ij )

/* maximum and minimum consensus updates

given by (10) and (12) for each node

iV

*/

13

zi

:=

max
j Ni- {i}

zi;

14

yi

:=

min
j Ni- {i}

yi;

15

l := l + 1

16

end

17 emit: xi(k + 1), yi and zi 18 if k + 1 = T  then

19

if zi - yi <  then

20

break ;

// stop xi, yi and zi updates

21

else

22

zi := xi(T );

23

yi := xi(T );

24

 :=  + 1;

25

l := 1 ;

// Reset

26

 :=  + k

27

end

28

end

29 k := k + 1

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

6

Theorem 3.2. Algorithm 1 converges in some finite-time Tc < , that is, Algorithm 1 reaches line number 20. Mathematically, given any  > 0, there exists Tc  N such that (j) < .
Proof. It follows from Lemma 3.6 that (j)  0 as j  . Thus, for any given  > 0, there exists an integer j0 such that (j) <  for all j  j0. This implies that the Algorithm 1 converges in finite-time Tc = T (j0).
Remark 1. If  = 0, Algorithm 1 and the results presented above reduce to those presented in [20].
Remark 2. All the results presented till this point for consensus and max-min consensus hold true even for uniformly bounded time varying delays under the assumption that only one packet of information from each neighbor can be processed at any time instant in the update rule (1). The asymptotic convergence of consensus under random delay model with at most one packet of information being processed at any time instant by any node is established in [12], [13] and [23]. The contribution here is that Algorithm 1 is valid even for these communication models for finite-time termination of consensus. The results and proofs for this communication model can be found in Appendix B.

4. AVERAGE CONSENSUS PROTOCOL

Average consensus problem is a special case of consensus where all the nodes converge to the average of the initial conditions. and is defined as follows.

Definition 2. (Average Consensus) A system of n agents is

said to have achieved average consensus if for any initial

condition x(0) 1, 2, ..., n.



Rn,

klimxi(k)

=

n i=1

xi

(0)

n

for

all

i

=

In [24], it is shown that average consensus can be reached by using the ratio of two consensus updates as described below. First the assumptions and algorithm developed in [24] are discussed. Consider a directed graph with n nodes which satisfies the following assumptions. B1. Weight matrix P associated with the directed graph is
primitive and column stochastic. B2. The directed graph is strongly connected. B3. Any node i in the directed graph has access to its own
value at any instant k without any delay. B4. The delay on the directed edge connecting any two nodes
i and j in the directed graph is bounded by some constant , i.e., ij   < .
Theorem 4.1. ([24]) Suppose the assumptions B1-B4 are satisfied. Let xi(k) and wi(k) be the result of iterations



xi(k+1) = piixi(k)+

pijxj(k-r)Iij(r), and (13)

jNi - r=0

Let the initial conditions be given by x(0) =

[x1(0) x2(0)...xn(0)]T and w(0) = 1n where 1n is a

n  1 column vector of all ones. Then the ratio of

wi(k) for all

asymptotically converges to j = 1, ..., n where j(k) :=

klimj (k) = xj (k)/wj (k).

xi

(k) and

n i=1

xi

(0)

n

In order to satisfy the column stochastic assumption of

Theorem 4.1 and to extend Algorithm 1 (which requires row

stochasticity) for average consensus, doubly stochastic weight

matrices are chosen. A square matrix is irreducible if and only

if its associated graph is strongly connected [25]. Using Perron

Frobenius Theorem, it follows that doubly stochastic weight

matrix P is primitive [22]. Using Theorem 4.1 it can be shown

that running two consensus protocols given by (13) and (14),

the average consensus can be asymptotically achieved with

the initial conditions as x(0) = [x1(0) x2(0)...xn(0)]T and

w(0) = 1n where 1n is a n  1 column vector of all ones.

Thus the ratio of xj(k) and wj(k) asymptotically converges

to

n i=1

xi

(0)

n

=

c,

for

all

j

=

1, ..., n.

A. Distributed finite-time Algorithm for terminating Average Consensus Protocol

An MXP and an MNP associated with (13) are executed.

Another MXP and MNP associated with (14) are also ex-

ecuted. By Theorem 3.1, both (13) and (14) converge. Let

kal lilmi =xi

(k) =  for all i 1, 2, ..., n. Using

= 1, 2, ..., n and Theorem 3.2, the

kcliomnswenis(uks)

=  for protocol

given by (13) can be stopped in some finite-time Tc1 when | xi(Tc1) -  |< . Also, using Theorem 3.2, the consensus protocol given by (14) can be stopped in some finite-time Tc2 when | wi(Tc2) -  |< . Using Theorem 4.1 given > 0, (the bound within which the deviation of states from average

of initial conditions is permitted),  can be chosen such that

stopping the consensus protocols given by (13) and (14) in

finite-time depending on chosen , will ensure that average

consensus can be achieved within a positive constant of the

average of initial conditions c in finite-time. The deviation

from average of initial conditions by stopping the consensus

protocols (13) and (14) in finite-time is now quantified in the

following discussion.

It is shown in [24] that

lim
k

xi(k) wi(k)

=

c

=

 

.

(15)

Since, the two consensus protocols given by (13)and (14)

terminate when they reach within some specified bound  > 0,

xi(k) and wi(k) may not converge to  and  respectively

but instead attain ~ and ~ respectively as the terminal values.

The the

croantisoenswxuiis

will deviate from c protocols given by

(=13)anddep(e1n4d)inagre

on when stopped.

The deviation from average can be quantified explicitly as a

function of , ~ and ~, all of which are known values once  is specified. The deviation is quantified by (16) below.

wi(k + 1) = piiwi(k) +


pijwj(k - r)Iij(r). (14)

jNi - r=0

~ ~

-

~ ~

(

1 1

- +

 ~  

)



xi wi

-

c



~ ~

-

~ ~

(

1 1

+ -



~ 

)



(16)

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

7

1

2

1

2

4

3

3

4

5

(a)

(b)

Figure 1: (a) Directed ring network of 4 nodes (b) A general representative network of 5 nodes.

Given the error tolerance within which the convergence to average of initial conditions is desired,  should be chosen to satisfy the bounds in (17) and (18),

xi wi

-

c



~ ~

-

~ ~

(

1 1

- +



~ 

)





,

(17)

xi wi

-

c



~ ~

-

~ ~

(

1 1

+ -

 ~  

)



-

.

(18)

This implies that given

and wi(k), | appropriately

wxtioi((kke))ns-urce|

 that

t~~thhee-eerr~~rro(orr11+-ftro~ol)em,ratnhceceaanvebrfeaogrcehxioiss(ekans)

small as desired. A detailed derivation of (16) is given in

Appendix C.

Using the Algorithm 1, distributed finite-time termination

algorithm for average consensus is presented next.

Algorithm 2: Finite-time termination of average consensus in presence of uniformly bounded delays 1 Given (the permitted deviation from average of initial
conditions), Choose appropriately  for stopping the consensus updates given by (13) and (14) 2 Run Algorithm 1 for both (13) and (14) maintained by each node i  V 3 Stop Algorithm 1 for both (13) and (14) together, i.e. for any node Algorithm 1 terminates only when both (13) and (14) have met the termination criterion . This terminates Algorithm 2 4 Use (16) to check the deviation of the so computed value from the actual average of initial conditions. If the deviation is within desired bound , stop. Else repeat Steps 1-3 with a smaller value of .

5. RESULTS AND DISCUSSION A. Simulation Results
Here results of Algorithm 2 for finite-time termination of average consensus on the ring network shown in Figure 1(a) and a representative 5 node network shown in Figure 1(b) in presence of fixed communication delays is presented. The

communication weight matrix for the ring network is chosen

to be,





1/2 1/2 0 0

P

= 

0 0

1/2 0

1/2 1/2

1/02 ,

1/2 0 0 1/2

and, for the 5 node network the weight matrix is chosen to be





2/5 1/5 1/5 1/5 0

P = 111///555

2/5 1/5
0

1/5 2/5 0

0 0 2/5

112///555 .

0 1/5 1/5 2/5 1/5

For the ring network in Figure 1(a), the delay on the edges are





0100

 = 00

0 0

2 0

01 .

2000

The initial conditions are set as x(0) = [50 70 150 30]T . The

error tolerance for deviation from average of initial conditions

is set to = 0.1. The stopping bound is set to  = 0.01

for both the consensus algorithms given by (13) and (14).

For the network in Figure 1(a), the consensus algorithm given

by (13) converges to the value 42.85 in 166 iterations and the consensus algorithm given by (14) converges to the value

0.57 in 166 iterations. Accordingly the ratio of (13) and (14)

converges to 74.99 in 166 iterations as shown in Figure 2. The average of the initial conditions is 75 and thus, the

deviation from the average achieved by implementing finite-

time termination algorithm on ratio consensus is well within

the bounds given by (16), (17) and (18).

For the network in Figure 1(b) the delay on the edges are





02100

 = 210

0 0 0

0 0 0

0 0 0

300 .

03000

The initial conditions for this network are set as x(0) = [1000 0 200 100 700]T and the error tolerance for deviation from average of initial conditions is again set to be = 0.1. The consensus algorithm given by (13) converges to the value 270.3 in 40 iterations. For this network, the consensus algorithm given by (14) converges to the value 0.6757 in 40 iterations. Accordingly the ratio of (13) and (14) converges to 399.9974 in 40 iterations as shown in Figure 3. The average of the initial conditions is 400 and thus, the deviation from the average achieved by implementing finite-time termination algorithm on ratio consensus is well within the bounds given by (16), (17) and (18).
Table I presents the results for comparison of Algorithm 2 with the distributed finite-time algorithm proposed in [17]. The computational complexity is listed in terms of the total number of nodes in the network and it can be seen that the

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

8

160
75.02

1000

140

75.01

800

Agent value

75

120

74.99

600

100

74.98

140

150

160

400

80

Agent 1 Agent 2 Agent 3 Agent 4 Agent 5

Agent value

60

Agent 1

Agent 2

Agent 3

40

Agent 4

Error margin

20

0

50

100

150

Number of iterations

Figure 2: Simulation results for Maximum-Minimum consensus based distributed finite-time termination of average consensus for the ring network of 4 nodes shown in Figure 1(a).

1000

400.1

800 400

Agent value

600
400
200
0 0

399.9

25

30

35

40

Agent 1 Agent 2 Agent 3 Agent 4 Agent 5 Error margin

10

20

30

40

Number of iterations

Figure 3: Simulation results for Maximum-Minimum consensus based distributed finite-time termination of average consensus for the network of 5 nodes shown in Figure 1(b).

proposed algorithm is more efficient in terms of both CPU as well as memory requirements.

Table I: Comparison of the simulation results for the 5 node network using the proposed algorithm and the algorithm in [17].

Algorithm Algorithm in [17]
Algorithm 2

Number of iterations
30 48

Computational

complexity at a node

for an iteration

Time

Space

complexity complexity

O(n2) O(n)

O(n2) O(n)

Next, we demonstrate the applicability of our distributed finite time termination algorithm (Algorithm 1) for termination

200

0

0

10

20

30

40

50

Number of iterations

Figure 4: Simulation results for Maximum-Minimum consensus based distributed finite-time termination in the presence of uniformly bounded time-varying delays for the network of 5 nodes shown in Figure 1(b).

of consensus iterations in the presence of random (time varying) but bounded communication delays on the network shown in Figure 1(b). It is assumed that at each link at each time instant, the delay is a non-negative integer upper bounded by  = 3. All the delays are sampled from a uniform distribution on {0,1,2,3} for the simulation. The initial conditions are set as x(0) = [1000 0 200 100 700]T . Each node determines that the consensus has reached within an error margin of  = 0.01 in 48 iterations. All the nodes converge to a common value of 261.1 (see Figure 4). It is worth noting that the final value at which the consensus protocol converges in presence of time-varying delays depends on the specific realization of the communication delays.

B. Experimental Demonstration In this section, the functionality and efficacy of the proposed
algorithm on a physical network is established. First, the experimental setup is described and then the results and observations are discussed.
Rapsberry Pi devices [26] are used to setup the physical network for experimentation. Each of such devices is a Raspberry Pi 3 model b with configuration of 1.2 GHz CPU, 1 GB RAM and 802.11n Wireless LAN support [27]. Each of the agent nodes in the network is an individual Raspberry Pi device capable of communicating with other agents over Internet via a Wi-Fi network. In a practical setting, all nodes communicate with latency in the communication channel. The distribution of pair-wise communication latency for each node in the experimental realization of the network given in Figure 1(b) is shown in Figure 5. For instance, the box plot labelled as `Agent 1' depicts the latency experienced by Raspberry Pi 1 for several communication requests sent to every other Raspberry Pi in the network i.e. Agents 2, 3, 4 and 5. It can be seen that the network latency ranges from 10ms to 100ms. Data communications happen via HTTP protocol [28], which is designed over TCP/IP [29] and ensures guaranteed, in-order delivery of data packets between the nodes. A NodeJS [30]

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

9

Table II: Experimental results for the 5 node network using

120

delay-free termination algorithm of [20].

Latency in ms Agent value

100 80 60 40 20 0 Agent 1

Agent 2

Agent 3

Agent 4

Agent 5

Agent Agent 1 Agent 2 Agent 3 Agent 4 Agent 5

Initial Value 1000 0 200 100 700

Converged Value 225.05 225.05 225.05 225.05 225.05

Error 174.95 174.95 174.95 174.95 174.95

Figure 5: Distribution of pair-wise latency (in milliseconds) for each node in the network shown in Figure 1(b). based application capable of bi-directional communication for running the consensus algorithm on each Raspberry Pi is developed. NodeJS has an event-driven architecture capable of asynchronous I/O which greatly enhances throughput and scalability in real-time web applications making it an ideal choice for applications targeted by the framework of the article. The application accepts a configuration setup to initialize the consensus algorithm and communicate with other nodes for information exchange, a necessary requirement for a Raspberry Pi to act as an agent. All the agents are initialized by passing the configuration information before starting the consensus protocol, and the agent node will then transmit or receive data from the neighbouring nodes in real-time. The agent node also logs data periodically for analysis.
To illustrate the validity and performance of Algorithm 2, this algorithm is compared with the delay-free termination algorithm presented in [20] . Both the algorithms are tested in presence of constraints and variabilities that a physical network inherits. Figure 6 and Table II illustrate the performance of the delay-free termination algorithm for the 5 node network shown in Figure 1(b) and it can be seen that this algorithm does not terminate near the average of the nodal initial conditions. Next, the distributed finite-time termination of average consensus algorithm in presence of fixed delays is tested on the directed ring network having four agents as depicted in Figure 7(a) and the observed results are presented in Table III. The outcome of the same algorithm when applied to the network of 5 agents shown in Figure 1 (b) are presented in Figure 7(b) and Table IV. The delays and initial conditions for both the cases were set up in the same way as they were for simulations and the error margin i.e.  is also chosen to be 0.01. From Tables III and IV and Figure 7 (a) and 7 (b), it is clear that the finite time termination algorithm terminates when the nodes reach close to the average of the initial conditions, thereby exhibiting behaviour similar to the simulation results, and, hence, validating our approach. It can further be observed that the error margin chosen is quite aggressive and if it was relaxed to 1% of the average value, the algorithm will converge substantially early.
6. CONCLUSION In this article, the problem of consensus and average consensus is discussed in the presence of fixed delays in the network. Under the assumption of a strongly connected graph formed by

1000 800 600

Agent 1 Agent 2 Agent 3 Agent 4 Agent 5 Average

400

200

0

0

10

20

30

40

Number of iterations

Figure 6: Experimental results for delay-free termination algorithm in presence of fixed delays on the network of 5 nodes shown in Figure 1(b).

Table III: Experimental results for 4 node ring network.

Agent Agent 1 Agent 2 Agent 3 Agent 4

Initial Value 50 70 150 30

Converged Value 74.99 74.99 74.99 74.99

Error 0.01 0.01 0.01 0.01

Table IV: Experimental results for representative 5 node network.

Agent Agent 1 Agent 2 Agent 3 Agent 4 Agent 5

Initial Value 1000 0 200 100 700

Converged Value 399.99 399.99 399.99 399.99 399.99

Error 0.01 0.01 0.01 0.01 0.01

the agents in the network, consensus is shown to be achieved asymptotically. A novel Max-Min Consensus based finitetime stopping criterion is introduced to distributively terminate the computation of consensus by the agents when each of them has reached within a pre-specified error bound. Further this algorithm is integrated with ratio consensus algorithm to prove the finite-time convergence to the average of initial conditions. The deviation achieved from the average of initial conditions by using the proposed distributed finite-time stopping criterion is also quantified. Furthermore, proper choice

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

10

Agent value

160 140 120 100
80 60 40 20
0
1000

75.02

75.01

75

74.99

74.98

140

150

160

50

100

Number of iterations

(a)

Agent 1 Agent 2 Agent 3 Agent 4 Error margin
150

400.1

800 400

Agent value

600
400
200
0 0

399.9 25

30 35 40
Agent 1 Agent 2 Agent 3 Agent 4 Agent 5 Error margin

10

20

30

40

Number of iterations

(b)

Figure 7: Experimental results for max-min based distributed finite-time criterion for average consensus protocol in presence of uniformly bounded fixed delays on the networks shown in Figure 1: (a) Ring network of 4 nodes (b) general representative network of 5 nodes.

APPENDIX A PROOFS OF LEMMAS IN SECTION 3 A. Proof of Lemma 3.1 Proof. From (1), we have,

xi(k + 1) = piixi(k) +

pij xj (k - ij ).

j Ni-

It follows that,

xi(k + 1)  piixqi (k - qi ) +

pij xqi (k - qi )

j Ni-

= xqi (k - qi ), and,

(19)

xi(k + 1)  piixsi (k - si ) +

pij xsi (k - si )

j Ni-

= xsi (k - si ).

(20)

By taking maximum over all nodes i  V in (19), it follows that,

xi(k+1)



max
iV

xi(k+1)



max
iV

xqi

(k-qi

)

=

M

(k),

(21)

for all i  V . Similarly, by taking minimum over all nodes in (20), it follows that,

xi(k

+

1)



min
iV

xi(k

+ 1)



min
iV

xsi

(k

- si

)

=

m(k),

(22)

for all i  V . When k = k the proof for (6) and (7) follows from the definitions. For all time instants k > k, the proof for (6) and (7) is reached using strong induction and is presented below.
Define {qm, qm } := arg max xqj (k - qj ) for some qm in
jV
V, qm  {0, 1, 2, ..., }. Thus, xqm (k - qm ) is the maximum value among all nodal states in the horizon of  into the past starting from iteration k, that is, by definition xqm (k - qm ) =
M (k). Using (21), it follows that,

of the tolerance bound for stopping consensus algorithm can facilitate the convergence of average consensus arbitrarily close to the actual average of initial conditions. Furthermore, the practicality and real-time implementation of the proposed algorithm has been verified by testing it on a network of agents (Raspberry Pi devices) communicating over actual communication channels. The simulation and experimental results are in close agreement, thus, establishing the proposed method as a valid and practically attractive algorithm. This article is one of the very few attempts made in the direction of finite-time stopping of consensus and average consensus algorithms. To the best of the knowledge of the authors, the proposed algorithm is the simplest in terms of algorithmic and computational complexity.

xi(k

+

1)



max
jV

xqj (k

-

qj )

=

xqm (k

-

qm ).

(23)

Suppose it is asserted that,

xi(k

)



max
jV

xqj (k

-

qj )

=

xqm (k

-

qm ),

(24)

for k = {k + 2, ..., k + l}.

Thus, xi(k + 2)  xqm (k - qm ),    , xi(k + l) 

xqm (k - qm ), for all i = 1, 2, ..., n. Define {qm, qm } :=

arg max
jV

xqj (k + l - qj )

for

some

qm

in

V, qm



{0, 1, 2, ..., }, that is, among all nodal states

inxqtm he(kho-rizoqm n

) is of 

the maximum value into the past starting

from iteration k + l.

Using

(21),

it

follows

that

xi(k

+

l

+

1)



max
jV

xqj (k

+

l

-

qjC)o=nsxidqemr

(k + l - the case

wqm hen),

for l>

 -  = k. Thus, k + l  k +

and (24), it follows that xi(k +

xqm (k - qm ).

all i = 1, 2, ..., n.

. Then

l l

+-1)qm

k+ k xqm

+l -1.qUmsin>g (k + l - qm

k+ (23)
)

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

11

kkqm +C)o1n=ks-i+mdj ealrV.x-tFhxueqrjqtchm (akesr-emwoqrhkjee), +n=su11pmjp-aoVxslei>kj {.km0T,-1akh,2xe,+n...,.,lTk}-hx+ujs(lq,km -x-q.mqTm i(jhk)e-n, xqm (k + l - qm ). It follows that,

xi(k + l + 1)  xqm (k + l - qm )  xqm (k - qm ).

fHoqom lNlwoowewvseksrf,ur+opamlsp.oTt(shh2eeu3ks)in,<adfnreodkxm+((2k(42l+)1-)t,hlxaq-im t(,k.+qmIlt+)fo1l)lo{wksx+qthm1a,t(.kk..+,<kl-+k+ql}ml,

-
). it

Thus, xi(k + l + 1)  piixi(k + l) + jNi- pijM (k). Hence,

xi(k + l + 1) < piiM (k) +

pijM (k) = M (k),

jNi-

implying, xi(k ) < M (k), for all k  k + 1.

The proof for other inequality is similar to the proof above and is left to the reader.

xqm (k + l - qm )  xqm (k - qm ) = M (k).

It is thus established that, xqm (k - qm ) = M (k).

xi(k +l +1)



xqm

(k +l -qm

)



This proves (6). Similarly, (7) can be proven. This completes

the proof.

B. Proof of Lemma 3.2

Proof. By assumption for time instant k = k, xi(k) < M (k).

For all time instants k > k, the proof is reached using strong

induction. Note that xi(k + 1) = piixi(k) + ij). It follows that,

jNi- pij xj (k -

xi(k + 1)  piixi(k) +

pij

max
jV

xqj (k

-

qj ),

jNi-

or, xi(k + 1)  piixi(k) +

pijM (k).

jNi-

Since, xi(k) < M (k), it implies that,

xi(k + 1) < piiM (k) +

pijM (k),

or, xi(k + 1) < M (k).

jNi-

Suppose it is asserted that,

C. Proof of Lemma 3.3

Proof. Since min x(k) < max x(k), there exists a node i such

that

xi(k)

<

max x(k).

Since

max x(k)



max
jV

xqj (k -

qj ) := M (k), it follows that

xi(k) < M (k).

Consider any node j. By strong connectivity of G, there exists a directed path connecting nodes i and j. Assume the shortest directed path connecting i and j is given by (m1, i)(m2, m1, )    (j, mdj-1). Using (1), it follows that

xm1 (k +  + 1) = pm1ixi(k +  - m1i)+

pm1j xj (k +  - m1j ).
jNm-1 {m1 }\{i}
As (k +  - m1j)  k, using the definition of M (k) and (6), it follows that

xm1 (k +  + 1)  pm1ixi(k +  - m1i)+ jNm -1{m1}\{i}pm1j M (k + ).
However, since M (k + )  M (k), it follows that,
xm1 (k +  + 1)  pm1ixi(k +  - m1i)+ jNm-1 {m1 }\{i}pm1j M (k).
As k +  - m1i  k, using the fact that, xi(k) < M (k) and Lemma 3.2, it follows that

xi(k + l ) < M (k), for l = 2, ..., l.

(25)

It follows that,

xi(k + l + 1) = piixi(k + l) +

pij xj (k + l - ij ).

jNi-

Consider the case when k  k + l - r, where r  {0, 1, ..., }. Then k + 2 -   k + l - r  k. As the index (k + l - r)  {k + 2 - , ..., k}, it follows from the definition of M (k) that,

xj(k + l - r)  M (k). Now consider the case when k < k + l - r. Using (25) and (6) it follows that,

xj (k

+

l

-

r)



max
jV

xqj (k

-

qj )

=

M (k).

xm1 (k +  + 1) < pm1iM (k) +

pm1j M (k).

jNm-1 {m1 }\{i}

Thus, xm1 (k +  + 1) < M (k). Thus, using Lemma 3.2, it follows that for all k  k +  + 1,

Proceeding,

xm1 (k ) < M (k).

xm2 (k + 2 + 2) = pm2m1 xm1 (k + 2 + 1 - m2m1 )+
pm2j xj (k + 2 + 1 - m2j ).
jNm-2 {m2 }\{m1 }
As (k + 2 + 1 - m2j)  (k +  + 1)  k + 1, using (6) it follows that

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

12

xm2 (k + 2 + 2)  pm2m1 xm1 (k + 2 + 1 - m1m2 )+
pm2j M (k).
jNm-2 {m2 }\{m1 }
Note that (k + 2 + 1 - m1m2 )  (k +  + 1) and xm1 (k +  + 1) < M (k). Using Lemma 3.2, it follows that

Thus,

xm2 (k + 2 + 2) < pm2m1 M (k)+
pm2j M (k).
jNm-2 {m2 }\{m1 }

xm2 (k + 2 + 2) < M (k). Thus, it can be concluded using Lemma 3.2, that for all k  k + 2 + 2, xm2 (k ) < M (k). It follows that for all k  k + dj + dj,xj(k ) < M (k). Note that, k + D + D  k + dj + dj, and, thus, for any v  V, v = i, k  k + D + D implies, xv(k ) < M (k). It follows that, for all k  k + D( + 1),

max

x(k

)

<

max
jV

xqj (k

-

qj )

=

M (k).

The proof for other inequality is similar to the proof above and is left to the reader.

APPENDIX B TIME-VARYING DELAY FRAMEWORK The consensus model which incorporates time-varying delays is dealt in [12] and [13]. Under this model, node i  V updates its state at instant k + 1 by:

Furthermore, denote the maximum and minimum over all nodal values over the horizon in the past {k - , ..., k - 1, k} by M (k) and m(k) respectively as in (4) and (5).

Lemma B.1. Consider the update rule (26). Then for all time instants k  k and for all i  V ,

xi(k

)  max
jV

xqj (k - qj ) = M (k),

and,

(27)

xi(k

)



min
sV

xqs (k

-

qs )

=

m(k).

(28)

Proof. From (26), we have

xi(k + 1) = piixi(k) +

pijxj(k - ij(k)).

j Ni-

It follows that,

xi(k + 1)  piixqi (k - qi ) +

pij xqi (k - qi )

j Ni-

= xqi (k - qi ), and,

(29)

xi(k + 1)  piixsi (k - si ) +

pij xsi (k - si )

j Ni-

= xsi (k - si ).

(30)

By taking maximum over all nodes i  V in (29), it follows that,

xi(k+1)



max
iV

xi(k+1)



max
iV

xqi

(k-qi

)

=

M

(k),

(31)

for all i  V . Similarly, by taking minimum over all nodes in (30), it follows that,

xi(k

+

1)



min
iV

xi(k

+ 1)



min
iV

xsi

(k

- si

)

=

m(k),

(32)

for all i  V . It should be noted that (31) and (32) are same as (21) and (22) respectively. Hence, the rest of the proof follows exactly the same way as the proof of Lemma 3.1.

xi(k + 1) = piixi(k) +

pijxj(k - ij(k)), (26)

jNi-

where ij(k)  {0, 1, 2, ..., }. The assumptions A1, A2, A4 and A5 presented in Section

2 are valid for this case as well whereas assumption A3 is

not valid as the link delays are time-varying but uniformly

bounded by some finite integer . It is proven in [12] and

[13] that the consensus update algorithm given by (26) con-

verges asymptotically. To prove the applicability of finite-time

termination algorithm proposed in Section 4 (Algorithm 1) for

the time-varying delay case, the results presented in Section

3 are proved here considering update equation given by (26).

Like the fixed delay case, let for node i, the maximum over all

values held by its neighbors including itself currently and in

the  past instants be denoted by xqi (k-qi ) and the minimum over all values held by its neighbors including itself currently

and in the  past instants be denoted by xsi (k - si ). The

definitions of qi, qi , si and Since, ij(k)  {ij},

si are same as it follows that

in (2) for j

and (3).  Ni-



{i}, xj(k - ij(k))  xqi (k - qi ) and xj(k - rij(k)) 

xsi (k - si ).

Lemma B.2. Consider a strongly connected graph G = {V, E} running consensus protocol given by (26) with an initial condition x(k). Let i be a node such that xi(k) < M (k) and let j be a node such that xj(k) > m(k), then for all time instants k  k, xi(k ) < M (k) and xj(k ) > m(k).

Proof. By assumption for time instant k = k, xi(k) < M. For all time instants k > k, the proof is reached using strong induction. Note that

xi(k + 1) = piixi(k) +

pijxj(k - ij(k)).

jNi-

It follows that

xi(k + 1)  piixi(k) +

pij

max
jV

xqj (k

-

qj ).

jNi-

Then,

xi(k + 1)  piixi(k) +

pijM (k).

jNi-

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

13

Since, xi(k) < M (k), it follows that,

Thus,

xi(k + 1) < piiM (k) +

pijM (k).

jNi-

xi(k + 1) < M (k). Suppose it is asserted that,

xi(k + l ) < M (k), for l = 2, ..., l.

As (k +  - m1j(k + ))  k, using the definition of M (k) and (27), it follows that
xm1 (k +  + 1)  pm1ixi(k +  - m1j(k + ))+ pm1j M (k).
jNm-1 {m1 }\{i}
As (k +  - m1j(k + ))  k, using the fact that, xi(k) < (33) M (k) and using Lemma B.2, it follows that

It follows that

xm1 (k +  + 1) < pm1iM (k) +

pm1j M (k).

xi(k + l + 1) = piixi(k + l) +

pijxj(k + l - ij(k + l)).

jNm-1 {m1 }\{i}

jNi-
Consider the case when k  (k+l-ij(k+l)), then k+2- 

Thus, xm1 (k +  + 1) < M (k). Thus, using Lemma B.2, it follows that for all k  k +  + 1,

(k + l - ij(k + l))  k. As the index (k + l - ij(k + l)) 

xm1 (k ) < M (k).

{k + 2 - , ..., k}, it follows from the definition of M (k) that Proceeding further on the directed path,

xj(k + l - ij(k + l))  M (k). Now consider the case when k < (k + l - ij(k + l)). Using (33) and (27) it follows that

xj (k

+

l

-

ij (k

+

l))



max
jV

xqj (k

-

qj )

=

M (k).

Thus, xi(k + l + 1)  piixi(k + l) Hence,xi(k+l+1) < piiM (k)+
This implies that,

+
j

jNi- pij M Ni- pij M (k)

(k). =M

(k).

xi(k

)

<

max
jV

xqj (k

-

qj )

=

M (k)

for

all

k

 k + 1.

The proof for other inequality is similar to the proof above and is left to the reader.

Like in Section 3, consider the maximum and minimum

value in the network, which is defined as, max x(k) :=

max
iV

xi(k)

and

min

x(k)

:=

min
iV

xi(k)

respectively.

Lemma B.3. Consider a strongly connected graph G =

{V, E} with an update rule for the consensus protocol given

by (26) with an initial condition x(k) such that min x(k) <

max x(k). Then for all k  k +D(+1), max x(k ) < M (k)

and min x(k ) > m(k).

Proof. Since min x(k) < max x(k), there exists a node i such

that

xi(k)

<

max x(k).

Since

max x(k)



max
jV

xqj (k -

qj ) := M (k), it follows that

xi(k) < M (k).

Consider any node j. By strong connectivity of G, there exists a directed path connecting nodes i and j. Assume the shortest directed path connecting i and j is given by (m1, i)(m2, m1)    (j, mdj-1). Using (26), it follows that

xm1 (k +  + 1) = pm1ixi(k +  - m1i(k + ))+
pm1j xj (k +  - m1j (k + )).
jNm-1 {m1 }\{i}

xm2 (k + 2 + 2) = pm2m1 xm1 (k + 2 + 1 - m2m1 (k + 2 + 1))+
pm2jxj(k + 2 + 1 - m2j(k + 2 + 1)).
jNm-2 {m2 }\{m1 }
As (k + 2 + 1 - m2j(k + 2 + 1))  (k +  + 1)  k + 1, using (27), it follows that,

xm2 (k + 2 + 2)  pm2m1 xm1 (k + 2 + 1 - m2m1 (k + 2 + 1)) +
pm2j M (k).
jNm-2 {m2 }\{m1 }
Note that (k + 2 + 1 - m2m1 (k + 2 + 1))  (k +  + 1) and xm1 (k +  + 1) < M (k). Using Lemma B.2, it follows that,

xm2 (k + 2 + 2) < pm2m1 M (k)

Thus,

+

pm2j M (k).

jNm-2 {m2 }\{m1 }

xm2 (k + 2 + 2) < M (k). Thus, it can be concluded using Lemma B.2, that for all k  k + 2 + 2, xm2 (k ) < M (k). It follows that for all k  k + dj + dj, xj(k ) < M (k). Note that, k + D + D  k + dj + dj, and, thus, for any v  V, v = i, k  k + D + D implies xv(k ) < M (k). It follows that, for all k  k + D( + 1),

max

x(k

)

<

max
jV

xqj (k

-

qj )

=

M (k).

The proof for other inequality is similar to the proof above and is left to the reader.

Remark 3. It should be noted that the results of Lemma B.1, Lemma B.2 and Lemma B.3 are exactly the same as that of Lemma 3.1, Lemma 3.2 and Lemma 3.3 respectively and hence the results of Lemma 3.1, Lemma 3.2 and Lemma

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

14

3.3 hold for consensus with time-varying delays as well. Furthermore, the results of Theorem 3.1, Corollary 3.1 and Corollary 3.2 follow directly from the results of Lemma 3.3. Hence, Theorem 3.1, Corollary 3.1 and Corollary 3.2 hold true for consensus with time-varying delay framework.

Using

(34),

(35)

and

(36),

it

follows

that

~- ~+



c



~+ ~-

.

IATthlisusose,,aist~~yi-stoe~~ass(eye11-+ttoh~~as)tewexiitwhx-iai t~~-a(sc11-+~)~~


- 0,

wwxx~~iiii(-11+-c~~c.).

xi wi

-

( ~
~

1+ 1-

 ~ ~

).

A. Max and Min Consensus in Presence of Time-Varying Delays
Like the fixed delay case, the Maximum Consensus Protocol computes the maximum of the given initial node conditions z(0) = [z1(0) z2(0)....zn(0)]T in a distributed manner. It takes z(0) as an input and generates a sequence of node values based on the update rule for node m given by (9) and (10). Similarly, the Minimum Consensus Protocol computes the minimum of the given initial node conditions y(0) = [y1(0) y2(0)....yn(0)]T in a distributed manner. It takes y(0) as an input and generates a sequence of node values based on the update rule for node m given by (11) and (12).
In time-varying delay framework, it is possible that any inneighbor j of node m can be sending multiple packets of zj to node m while it is waiting for  iterations, but each packet received from j during the waiting time contains the same information because node j also updates its maximum consensus state only once in  iterations in accordance with (9) and (10). Similar logic holds for Min consensus protocol.
Remark 4. It is worth noting that the results of Lemma 3.4, Lemma 3.5, Lemma 3.6 and Lemma 3.7 depend solely on Max-Min consensus update rules given by (9), (10), (11) and (12). Since the Max-Min consensus update rules are logically the same for time-varying delay case as well, the results of Lemma 3.4, Lemma 3.5, Lemma 3.6 and Lemma 3.7 hold true for time-varying delay framework. This entails that the results of associated Lemma 3.8 and Theorem 3.2 hold true for time-varying delay framework. This implies that the finite-time termination algorithm for consensus (Algorithm 1) proposed for the fixed delay case can be implemented without any modification even if the delays are time-varying and follow the update rule given by (26).

APPENDIX C QUANTIFYING DEVIATION FROM AVERAGE USING
Algorithm 2

It has been shown in [24] that

lim
k

xi(k) wi(k)

=

c

=

 

(34)

Since, the two consensus protocols given by (13) and (14)

will terminate when they reach within some specified bound

 > 0, xi(k) and wi(k) do not converge to  and  respectively. Instead let ~ and ~ be the terminal values of xi and wi respectively upon termination of Algorithm 2, such that,

 -   ~   + ,

(35)

 -   ~   + .

(36)

ACKNOWLEDGMENT The authors would like to thank the ARPA-E for supporting this research via ARPA-E Award No. DE-AR000071 for the project `A Robust Distributed Framework for Flexible Power Grids'.
REFERENCES
[1] M. Newman, A.-L. Barabasi, and D. J. Watts, The structure and dynamics of networks. Princeton University Press, 2006.
[2] F. Xia, L. T. Yang, L. Wang, and A. Vinel, "Internet of things," International Journal of Communication Systems, vol. 25, no. 9, p. 1101, 2012.
[3] M. Mesbahi and M. Egerstedt, Graph theoretic methods in multiagent networks. Princeton University Press, 2010.
[4] J. N. Tsitsiklis, "Problems in decentralized decision making and computation." DTIC Document, Tech. Rep., 1984.
[5] J. E. Boillat, "Load balancing and poisson equation in a graph," Concurrency: Practice and Experience, vol. 2, no. 4, pp. 289313, 1990.
[6] A. Jadbabaie, J. Lin et al., "Coordination of groups of mobile autonomous agents using nearest neighbor rules," Automatic Control, IEEE Transactions on, vol. 48, no. 6, pp. 9881001, 2003.
[7] L. Xiao, S. Boyd, and S. Lall, "A scheme for robust distributed sensor fusion based on average consensus," in Information Processing in Sensor Networks, 2005. IPSN 2005. Fourth International Symposium on. IEEE, 2005, pp. 6370.
[8] M. Andreasson, D. V. Dimarogonas, H. Sandberg, and K. H. Johansson, "Distributed control of networked dynamical systems: Static feedback, integral action and consensus," Automatic Control, IEEE Transactions on, vol. 59, no. 7, pp. 17501764, 2014.
[9] V. Blondel, J. M. Hendrickx, A. Olshevsky, J. Tsitsiklis et al., "Convergence in multiagent coordination, consensus, and flocking," in IEEE Conference on Decision and Control, vol. 44, no. 3. IEEE; 1998, 2005, p. 2996.
[10] Z. Li and Z. Duan, Cooperative control of multi-agent systems: a consensus region approach. CRC Press, 2014.
[11] P.-A. Bliman, A. Nedic, and A. Ozdaglar, "Rate of convergence for consensus with delays," in Decision and Control, 2008. CDC 2008. 47th IEEE Conference on. IEEE, 2008, pp. 48494854.
[12] M. Cao, A. S. Morse, and B. D. Anderson, "Reaching a consensus in a dynamically changing environment: A graphical approach," SIAM Journal on Control and Optimization, vol. 47, no. 2, pp. 575600, 2008.
[13] M. Cao, A. S. Morse, and B. Anderson, "Reaching an agreement using delayed information," in Proceedings of the 45th IEEE Conference on Decision and Control. IEEE, 2006, pp. 33753380.
[14] K. I. Tsianos and M. G. Rabbat, "The impact of communication delays on distributed consensus algorithms," arXiv preprint arXiv:1207.5839, 2012.
[15] ----, "Distributed consensus and optimization under communication delays," in Communication, Control, and Computing (Allerton), 2011 49th Annual Allerton Conference on. IEEE, 2011, pp. 974982.
[16] A. D. Dominguez-Garcia and C. N. Hadjicostis, "Distributed algorithms for control of demand response and distributed energy resources," in Decision and Control and European Control Conference (CDC-ECC), 2011 50th IEEE Conference on. IEEE, 2011, pp. 2732.
[17] T. Charalambous, Y. Yuan, T. Yang, W. Pan, C. N. Hadjicostis, and M. Johansson, "Distributed finite-time average consensus in digraphs in the presence of time delays," IEEE Transactions on Control of Network Systems, vol. 2, no. 4, pp. 370381, 2015.
[18] J. He, P. Cheng, L. Shi, J. Chen, and Y. Sun, "Time synchronization in wsns: A maximum-value-based consensus approach," IEEE Transactions on Automatic Control, vol. 59, no. 3, pp. 660675, 2014.
[19] Y. Zhang and S. Li, "From simplicity to complexity based on consensus: A case study," arXiv preprint arXiv:1610.09482, 2016.
[20] V. Yadav and M. V. Salapaka, "Distributed protocol for determining when averaging consensus is reached," in 45th Annual Allerton Conf, 2007, pp. 715720.

JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015

15

[21] R. Diestel, Graph Theory. Berlin, Germany: Springer-Verlag, 2006. [22] R. A. Horn and C. R. Johnson, Matrix analysis. Cambridge university
press, 2012. [23] A. Nedic and A. Ozdaglar, "Convergence rate for consensus with
delays," Journal of Global Optimization, vol. 47, no. 3, pp. 437456, 2010. [24] C. N. Hadjicostis and T. Charalambous, "Average consensus in the presence of delays in directed graph topologies," IEEE Transactions on Automatic Control, vol. 59, no. 3, pp. 763768, 2014. [25] J. Ding and A. Zhou, Nonnegative matrices, positive operators, and applications. World Scientific Singapore, 2009. [26] E. Upton and G. Halfacree, Raspberry Pi user guide. John Wiley & Sons, 2014. [27] E. Perahia and R. Stacey, Next Generation Wireless LANS: 802.11 n and 802.11 ac. Cambridge university press, 2013. [28] R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee, "Hypertext transfer protocolhttp/1.1," Tech. Rep., 1999. [29] K. R. Fall and W. R. Stevens, TCP/IP illustrated, volume 1: The protocols. addison-Wesley, 2011. [30] M. Cantelon, M. Harter, T. Holowaychuk, and N. Rajlich, Node. js in Action. Manning, 2014.

Murti V. Salapka received the B.Tech. degree in mechanical engineering from the Indian Institute of Technology, Madras, in 1991 and the M.S. and Ph.D. degrees in Mechanical Engineering from the University of California at Santa Barbara, in 1993 and 1997, respectively. He was a faculty member in the Electrical and Computer Engineering Department, Iowa State University, Ames, from 1997 to 2007. Currently, he is the Director of Graduate Studies and the Vincentine Hermes Luh Chair Professor in the Electrical and Computer Engineering Department, University of Minnesota, Minneapolis. His research interests include control and network science, nanoscience and single molecule physics. Dr. Salapaka received the 1997 National Science Foundation CAREER Award.

Mangal Prakash received the B.Tech degree in Electrical Engineering from National Institute of Technology, Durgapur, India and MS degree in Electrical Engineering from the University of Minnesota, USA. His research interests include control of network systems, probabilistic inference in graphical models and their applications to biological systems.

Saurav Talukdar received the B.Tech and M. Tech degree in Mechanical Engineering from Indian Institute of Technology, Bombay, India and is a PhD candidate in Mechanical Engineering at the University of Minnesota, Minneapolis, USA. His research interests include learning topology of dynamic systems, multi-agent systems and statistical physics.

Sandeep Attree is a graduate student in electrical and computer engineering at the University of Minnesota. He obtained his B.Tech and M.Tech degrees from Indian Institute of Technology, Kanpur, India. His research interests include network optimization and distributed computing, with applications to smart and autonomous systems.

Vikas Yadav received the B.Tech. degree in electrical engineering from the Indian Institute of Technology, Kanpur, in 2000 and the M.S. and Ph.D. degrees in electrical engineering from Iowa State University, Ames, in 2007. He was with Garmin International Inc. from 2007 to 2013, Qualcomm Technologies Inc. from 2013 to 2015 and LG Electronics from 2015 to 2016. Presently he is a Principle Algorithm Architect at QuickLogic Corp., San Francisco, USA. His research interests include sensor fusion, distributed control design, self-organization and phase transition in large scale systems.