# Observer-Based Consensus Control for Heterogeneous Multi-Agent Systems with Output Saturations
## 4 Simulations
### Leader-Following Case  
In this subsection, we consider a group of four agents (1), i.e., \(\mathcal{V}=\{1,2,3,4\}\), and a leader agent (22) with [18]  
\[A_{1} =\left[ \begin{array}{cc}0&1\\ -2&-0.8\end{array} \right],A_{2}=\left[ \begin{array}{cc}0&1\\ -1.5&-1\end{array} \right],A_{3}=\left[ \begin{array}{cc}0&1\\ -1&-1.2\end{array} \right],A_{4}=\left[ \begin{array}{cc}0&1\\ -0.5&-1.4\end{array} \right],\] \[B_{1} =\left[ \begin{array}{cc}0\\ 1\end{array} \right],B_{2}=\left[ \begin{array}{cc}0\\ 0.5\end{array} \right],B_{3}=\left[ \begin{array}{cc}0\\ 1.2\end{array} \right],B_{4}=\left[ \begin{array}{cc}0\\ 1.4\end{array} \right],C_{i}=C=\left[ \begin{array}{cc}0&1\end{array} \right], \tag{41}\] \[S =\left[ \begin{array}{cc}0&1\\ -1&0\end{array} \right],R=\left[ \begin{array}{cc}1&0\end{array} \right],\]  
Figure 5: The trajectories of the controlled outputs and the measured outputs using the proposed algorithm (8). Figure 6: The output errors between agents using the proposed algorithm (8) with \(\beta=1,5,10,100\). which satisfies Assumption 2 and Condition 1 in Assumption 4. Then, we can choose the non-singular matrix \(T_{i}=I_{2}\), \(\forall i\in\mathcal{V}\) and the positive semi-definite matrix \(P_{i}\) satisfying Lemma 1 as follows:  
\[P_{1}=\left[ \begin{array}{cc}1.00&0.27\\ 0.27&0.60\end{array} \right],P_{2}=\left[ \begin{array}{cc}1.03&0.41\\ 0.41&0.97\end{array} \right],P_{3}=\left[ \begin{array}{cc}0.88&0.53\\ 0.53&1.52\end{array} \right],P_{4}=\left[ \begin{array}{cc}0.50&0.47\\ 0.47&2.30\end{array} \right]. \tag{42}\]  
Moreover, by solving the linear equations in Assumption 1, we have  
\[\Pi_{i}=\Pi=\left[ \begin{array}{cc}0&-1\\ 1&0\end{array} \right],\Gamma_{1}^{T}=\left[ \begin{array}{c}0.8\\ -1\end{array} \right],\Gamma_{2}^{T}=\left[ \begin{array}{c}1\\ -0.5\end{array} \right],\Gamma_{3}^{T}=\left[ \begin{array}{c}1.2\\ 0\end{array} \right],\Gamma_{4}^{T}=\left[ \begin{array}{c}1.4\\ 0.5\end{array} \right]. \tag{43}\]  
In this simulation, we consider the communication topology between the agents given in Figure 7. 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}{cccc}3&-1&-1&-1\\ -1&2&0&-1\\ -1&0&1&0\\ -1&-1&0&2\end{array} \right],\alpha_{10}=\alpha_{20}=1,\alpha_{30}=\alpha_{40 }=0, \tag{44}\]  
and \(\lambda(L)=\{0,1,3,4\}\) and \(\lambda(L)=\{0.4,1.2,3.6,4.9\}\). We next construct the observer-based consensus algorithm (24) applying Theorem 2. From Condition 1, we choose \(H_{i}=\beta_{i}T_{i}^{-1}P_{i}^{-1}\bar{\mathcal{C}}_{i}^{T}\) with \(\beta_{i}=\beta=20\), \(T_{i}=I_{2}\), and \(P_{i}\) given in (42). We next choose \(W\) satisfying Lemma 5 as  
\[W=\left[ \begin{array}{cc}6.49&-0.50\\ -0.50&6.49\end{array} \right]. \tag{45}\]  
Then, from Condition 2, we choose \(F=\tau W^{-1}R^{T}R\) with \(\tau=3\) such that \(\tau\lambda_{1}(L)=1.2>1\). Finally, we choose the gain matrix \(K_{i}=-[100\ \ 100]\), \(\forall i\in\mathcal{V}\) such that \(A_{i}+B_{i}K_{i}\) is Hurwitz  
In this simulation, we choose the initial conditions of the followers as follows:  
\[ \begin{split} 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],\delta_{i}(0)=\left[\begin{array}{c}0\\ 0\end{array}\right],\forall i\in\mathcal{V},\\ w_{1}(0)=\left[\begin{array}{c}2\\ -1\end{array}\right],w_{2}(0)=\left[\begin{array}{c}0\\ 0\end{array}\right],w_{3}(0)=\left[\begin{array}{c}-1\\ -2\end{array}\right],w_{4}(0)=\left[\begin{array}{c}0\\ 2\end{array}\right].\end{split}  \tag{46}\]  
The initial condition of the leader is chosen as \(x_{0}(0)=[0.5,-0.5]^{T}\) such that Assumption 4 is satisfied. The simulation results are given in Figures 8-10. In Figure 8, the solid line shows the trajectories of the reference generators, while the dashed line shows the trajectory of the leader.