# Distributed Average Consensus Algorithms in d-Regular Bipartite Graphs: Comparative Study
## 4 Experiments and Discussion
### Research Methodology and Applied Metric for Performance Evaluation  
This subsection is concerned with the applied research methodology and metric for performance evaluation of the analyzed distributed consensus algorithms. All the experiments were carried out in Matlab2018b (Producer: MathWorks, Location: Natick, MA, USA) using built-in Matlab functions and software designed by the authors of this paper (downloadable at [84]). As mentioned earlier in this paper, we generated random \(d\)-regular bipartite graphs with the graph order \(n=30\) and various degrees \(d\). Specifically, \(d\) took the following values in our experiments:  
\[d=\{2,3,4,5,10\} \tag{22}\]  
Obviously, higher values of \(d\) result in better connectivity of generated graphs. In our experiments, we only used connected topologies since the algorithms were unable to estimate global aggregate functions in disconnected graphs (note that data can only be separately aggregated in segregated components in disconnected topologies) [52]. For every examined \(d\), we generated 100 unique regular bipartite graphs in order to ensure the high credibility of our presented contributions (executing experiments in numerous various graphs is a common procedure in top-quality papers from the field [85; 86; 87]). Overall, we, thus, examined the algorithms in 500 unique graphs in this paper.  
Figure 7: Example of spectrum of weight matrix \(\mathbf{W}\) of each examined algorithm.  
In order to evaluate the performance of the analyzed algorithms, we applied a commonplace metric used in top-quality papers in the field. Specifically, we quantified the algorithms' performance using the convergence rate expressed as the number of iterations required for all the agents in MAS to achieve the consensus. In this case, the examined algorithms were bounded by a stopping criterion to border their execution time. In this paper, we applied the stopping criterion defined in (23), where \(\mathcal{P}\) took the values from (24) [65; 66].  
\[\mid max\{\mathbf{x}(k)\}-min\{\mathbf{x}(k)\}\mid<\mathcal{P} \tag{23}\]  
\[\mathcal{P}=\{10^{-2},10^{-4},10^{-6}\} \tag{24}\]  
Clearly, for lower values of \(\mathcal{P}\), the final estimates were assumed to be more precise but at the cost of decelerating the algorithms. Later in this paper, the precision \(10^{-2}\) is referred to as a low precision, \(10^{-4}\) as a medium precision, and \(10^{-6}\) as a high precision. See Figure 8, where the maximum error of an estimate (expressed in percentages %) is depicted for each applied precision. From the figure, we can see that the low precision of the applied stopping criterion ensures that the error did not exceed 30%, the medium precision guaranteed an error lower than 0.3%, and the high precision resulted in very accurate estimates since its maximum estimation error was even lower than 0.003%.  
Note that we only calculated and depicted the averaged value of the applied metric for each \(d\) and each precision of the applied stopping criterion in Section 4.2.  
In order to simulate sensor-measured initial values, we generated the initial inner states of all the agents in MAS as IID (independent and identically distributed) random scalar values with the standard Gaussian distribution, i.e. [52]:  
\[x_{i}(0)\sim N(0,1),\ for\ \forall v_{i}\in\mathbf{V} \tag{25}\]  
As stated above, both GMH and CW are easily modifiable algorithms since the entries of their weight matrices \(\mathbf{W}\) contain the mixing parameter \(\epsilon\)[51]. In our experiments, it took the values from (26) in the case of CW and (27) if GMH was applied.  
\[\epsilon=\{0.1\frac{1}{\Delta},0.2\frac{1}{\Delta},0.3\frac{1}{\Delta},0.4 \frac{1}{\Delta},0.5\frac{1}{\Delta},0.6\frac{1}{\Delta},0.7\frac{1}{\Delta}, 0.8\frac{1}{\Delta},0.9\frac{1}{\Delta}\} \tag{26}\]  
\[\epsilon=\{0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9\} \tag{27}\]  
Later in this paper, we refer to \(0.1\frac{1}{\Delta},0.2\frac{1}{\Delta},...\) from (26) as MD 0.1, MD 0.2,... etc., and 0.1, 0.2... from (27) as GMH 0.1, GMH 0.2,..., etc.