# Observer-Based Consensus Control for Heterogeneous Multi-Agent Systems with Output Saturations
## 4 Simulations
### Leaderless Case  
In this subsection, we consider the leaderless case with 10 agents modeled by harmonic oscillators. The dynamics of each agent is of the form (1) with, for \(i\in\mathcal{V}=\{1,2,...,10\}\),  
\[A_{i}=\left[ \begin{array}{cc}0&1\\ -\psi_{i}&0\end{array} \right],\ \ \psi_{i}=0.5\times i,\ \ B_{i}=B=\left[ \begin{array}{ cc}0\\ 1\end{array} \right],\ \ C_{i}=C=\left[ \begin{array}{cc}0&1\end{array} \right]. \tag{33}\]  
Then, we can choose the non-singular matrix \(T_{i}\) as follows:  
\[T_{i}=\left[ \begin{array}{cc}\sqrt{\psi_{i}}&0\\ 0&1\end{array} \right], \tag{34}\]  
which gives, from (5),  
\[\bar{A}_{i}=\left[ \begin{array}{cc}0&\sqrt{\psi_{i}}\\ -\sqrt{\psi_{i}}&0\end{array} \right],\ \ \ \bar{B}_{i}=\bar{B}=\left[ \begin{array}{ cc}0\\ 1\end{array} \right],\ \ \bar{C}_{i}=\bar{C}=\left[ \begin{array}{cc}0&1\end{array} \right],\ \ P_{i}=P=I_{2}. \tag{35}\]  
We next consider the linear matrix equations (4) in Assumption 1. The analytic solution of (4) is given in [20] as follows:  
\[ \begin{array}{l}S=\left[\begin{array}{cc}0&1\\ -\frac{1}{N}\sum_{i=1}^{N}\psi_{i}&0\end{array}\right]=\left[\begin{array}{ cc}0&1\\ -2.75&0\end{array}\right],\ \ \Pi_{i}=\Pi=I_{2},\\ \Gamma_{i}=\left[\begin{array}{cc}\frac{1}{N}\sum_{j=1}^{N}(\psi_{i}-\psi_{ j})&0\end{array}\right],\ \ R=\left[\begin{array}{cc}0&1\end{array}\right].\end{array}  \tag{36}\]  
In this simulation, we assume that the communication between agents is as ring topology given in Figure 2. We consider \(\alpha_{ij}=1\), if \((i,j)\in\mathcal{E}\) and \(\alpha_{ij}=0\) otherwise. Then, the Laplacian matrix is given by  
\[L=\left[ \begin{array}{ccccccc}2&-1&0&\cdots&0&0&-1\\ -1&2&-1&\cdots&0&0&0\\ 0&-1&2&\cdots&0&0&0\\ \vdots&\ddots&\ddots&\ddots&\ddots&\ddots&\vdots\\ 0&0&0&\cdots&2&-1&0\\ 0&0&0&\cdots&-1&2&-1\\ -1&0&0&\cdots&0&-1&2\end{array} \right], \tag{37}\]  
and \(\lambda_{2}(L)=0.3820\). We next construct the observer-based consensus algorithm (8) applying Theorem 1. From the condition 1, we choose  
\[H_{i}=\beta_{i}T_{i}^{-1}P_{i}^{-1}\bar{C}_{i}^{T}=\beta_{i}\left[ \begin{array} []{cc}\frac{1}{\sqrt{\psi_{i}}}&0\\ 0&1\end{array} \right]\left[ \begin{array}{cc}0\\ 1\end{array} \right]=\left[ \begin{array}{c}0\\ 5\end{array} \right]. \tag{38}\]We next choose \(W=Q=I_{2}\) such that \((S,Q)\) is stabilize and Lemma 4 is satisfied. Then, from the condition 2, we choose  
\[F=\tau QQ^{T}W=10\times I_{2}, \tag{39}\]  
where \(\tau=10\) such that \(\tau\lambda_{2}(L)=3.82>1\). Finally, we choose \(K_{i}=-[100\ \ 10]\) such that Condition 3 is satisfied, i.e., \(A_{i}+B_{i}K_{i}\) is Hurwitz. We conduct the simulation with the initial conditions satisfying Condition 4 as follows:  
\[x_{1}(0) =\left[ \begin{array}{c}7\\ -7\end{array} \right],x_{2}(0) =\left[ \begin{array}{c}3\\ 9\end{array} \right],x_{3}(0) =\left[ \begin{array}{c}-8\\ 3\end{array} \right],x_{4}(0) =\left[ \begin{array}{c}5\\ -8\end{array} \right],x_{5}(0) =\left[ \begin{array}{c}6\\ -6\end{array} \right], \tag{40}\] \[x_{6}(0) =\left[ \begin{array}{c}10\\ 0\end{array} \right],x_{7}(0) =\left[ \begin{array}{c}-4\\ 5\end{array} \right],x_{8}(0) =\left[ \begin{array}{c}0\\ 1\end{array} \right],x_{9}(0) =\left[ \begin{array}{c}-10\\ -3\end{array} \right],x_{10}(0) =\left[ \begin{array}{c}4\\ 7\end{array} \right],\] \[w_{1}(0) =\left[ \begin{array}{c}2\\ -1\end{array} \right],w_{2}(0) =\left[ \begin{array}{c}0\\ -0.5\end{array} \right],w_{3}(0) =\left[ \begin{array}{c}-1\\ -2\end{array} \right],w_{4}(0) =\left[ \begin{array}{c}0.1\\ 2\end{array} \right],w_{5}(0) =\left[ \begin{array}{c}-2\\ 2\end{array} \right],\] \[w_{6}(0) =\left[ \begin{array}{c}1.5\\ -0.5\end{array} \right],w_{7}(0) =\left[ \begin{array}{c}1.4\\ -1\end{array} \right],w_{8}(0) =\left[ \begin{array}{c}-2\\ 2\end{array} \right],w_{9}(0) =\left[ \begin{array}{c}-1\\ 1.5\end{array} \right],w_{10}(0) =\left[ \begin{array}{c}-1\\ -2\end{array} \right],\] \[\hat{x}_{i}(0) =\left[ \begin{array}{c}0\\ 0\end{array}