# Design of Adaptive Kalman Consensus Filters (a-KCF)
## 4 Adaptive Kalman Consensus Filtering  
In this section, we show our main contribution to this paper, in which we consider adding an adaptation mechanism to the Kalman consensus filtering algorithm shown in Section 3. We name this adaptive Kalman consensus filtering, or a-KCF. The proposed \(i\)th agent estimation structure with adaptive gain \(\gamma_{ij}(t)\) on the consensus term is as follows:  
\[ \begin{array}{l}\hat{x}_{i}(t)=A_{i}\hat{x}_{i}(t)+K_{i}y_{i}(t)+W_{i}\sum_ {j\in N_{i}}\gamma_{ij}(t)(\hat{x}_{j}(t)-\hat{x}_{i}(t))\\ A_{i}=A-K_{i}C_{i};\qquad\hat{x}_{i}(t)\
eq x(0)\quad i=1,...,n\end{array}  \tag{4}\]  
where \(\hat{x}_{i}(t)\) represents the state estimates of the \(i\)th agent and \(\gamma_{ij}(t)\) is the scalar adaptive gain of the estimation differences between the \(i\)th agent and its neighbors. The consensus weighting matrix \(W_{i}\) is designed based on Lyapunov stability analysis, as detailed in the following part. If we consider a scenario in which no noise affects the error dynamics, as proposed in [17], in a similar fashion, we can derive the local error dynamic of the \(i\)th agent using the fact that \(\hat{x}_{j}(t)-\hat{x}_{i}(t)=e_{j}(t)-e_{i}(t)\), as shown below:  
\[ \begin{array}{l}\hat{e}_{i}(t)=A_{i}e_{i}(t)+W_{i}\sum_{j\in N_{i}}\gamma_{ ij}(t)(e_{j}(t)-e_{i}(t))\end{array}  \tag{5}\]  
The basic idea for seeking the adaptive gain \(\gamma_{ij}(t)\) involves consideration of two aspects:  
* The proposed adaptive Kalman consensus filter has stable performance. * The associated error dynamic asymptotically converges to zero. **Lemma 1**. : _The proposed distributed estimator structure of the \(i\)th agent with adaptive gains \(\gamma_{ij},\forall j\in N_{i}\) for each disagreement term is provided by Equation (4). By means of analyzing a Lyapunov function \(V_{i}=e_{i}^{T}\Pi_{i}^{-1}e_{i}+\sum_{j\in N_{i}}\gamma_{ij}^{2}\), where \(\Pi_{i}\) is a symmetric positive definite matrix, the local adaptation law can be derived by satisfying the system stability conditions for both \(V_{i}\) and \(\hat{V}_{i}\), which turns out to be \(\gamma_{ij}=-(C_{i}e_{i})^{T}C_{i}(\hat{x}_{j}-\hat{x}_{i})\)._  
Proof. : We consider the following local Lyapunov function for the \(i\)th agent based on Lyapunov redesign methods\[V_{i}=e_{i}^{T}\Pi_{i}^{-1}e_{i}+\sum_{j\in N_{i}}\gamma_{ij}^{2} \tag{6}\]  
where \(\Pi_{i}\) is a symmetric positive definite solution of the following Lyapunov equation:  
\[A_{i}^{T}\Pi_{i}^{-1}+\Pi_{i}^{-1}A_{i}=-\Omega_{i} \tag{7}\]  
with the assumption that \(\Omega_{i}\) is a symmetric positive definite matrix and all eigenvalues of the matrix \(A_{i}\) have negative real parts. Because \(A_{i}=A-K_{i}C_{i}\), there exist many ways to design \(K_{i}\) in order to satisfy the aforementioned assumption. One possible way is to use the pole placement method to design the value for \(K_{i}\) such that \(A_{i}\) generates an exponentially stable local system. Now, the derivative of \(V_{i}\) is provided by \(\dot{V}_{i}=\dot{e}_{i}^{T}\Pi_{i}^{-1}e_{i}+e_{i}^{T}\Pi_{i}^{-1}e_{i}+2\sum_ {j\in N_{i}}\gamma_{ij}\dot{\gamma}_{ij}\). By substituting \(\dot{e}_{i}\) from Equation (5) into Equation (6), we obtain the following expression:  
\[\dot{V}_{i}=e_{i}^{T}A_{i}^{T}\Pi_{i}^{-1}e_{i}+e_{i}^{T}\Pi_{i}^{-1}A_{i}e_{i }+2\sum_{j\in N_{i}}\gamma_{ij}\dot{\gamma}_{ij}+\sum_{j\in N_{i}}\gamma_{ij}( e_{j}-e_{i})^{T}W_{i}^{T}\Pi_{i}^{-1}e_{i}+e_{i}^{T}\Pi_{i}^{-1}W_{i}\sum_{j \in N_{i}}\gamma_{ij}(e_{j}-e_{i}) \tag{8}\]  
In order to further simplify Equation (8), we can assume the weighted consensus matrix \(W_{i}=\Pi_{i}C_{i}^{T}C_{i}\). Thus, the expression of \(\dot{V}_{i}\) is  
\[\dot{V}_{i}=e_{i}^{T}(A_{i}^{T}\Pi_{i}^{-1}+\Pi_{i}^{-1}A_{i})e_{i}+2(C_{i} \dot{e}_{i})^{T}\sum_{j\in N_{i}}\gamma_{ij}(C_{i}e_{j}-C_{i}\dot{e}_{i})+2\sum _{j\in N_{i}}\gamma_{ij}\dot{\gamma}_{ij} \tag{9}\]  
Therefore, by setting the sum of the last two terms in Equation (9) to equal zero, we can derive the adaptation law shown below:  
\[