# Design of Adaptive Kalman Consensus Filters (a-KCF)
## 4 Adaptive Kalman Consensus Filtering
\begin{split} 2(C_{i}\dot{e}_{i})^{T}\sum_{j\in N_{i}}\gamma_{ij}(C_{i} \dot{e}_{j}-C_{i}\dot{e}_{i})+2\sum_{j\in N_{i}}\gamma_{ij}\dot{\gamma}_{ij}= 0\\ 2\sum_{j\in N_{i}}\gamma_{ij}(C_{i}\dot{e}_{i})^{T}(C_{i} \dot{e}_{j}-C_{i}\dot{e}_{i})+2\sum_{j\in N_{i}}\gamma_{ij}\dot{\gamma}_{ij}= 0\\ \sum_{j\in N_{i}}\gamma_{ij}((C_{i}\dot{e}_{i})^{T}(C_{i} \dot{e}_{j}-C_{i}\dot{e}_{i})+\dot{\gamma}_{ij})=0\end{split}  \tag{10}\]  
Therefore, the local adaptation law is now provided by  
\[ \begin{split}\dot{\gamma}_{ij}&=-(C_{i}\dot{e}_{i })^{T}(C_{i}\dot{e}_{j}-C_{i}\dot{e}_{i})\\ &=-(C_{i}\dot{e}_{i})^{T}C_{i}(\dot{x}_{j}-\dot{x}_{i}).\end{split}  \tag{11}\]  
\(\qed\)  
**Remark 1**. : _The choice of the structure of \(W_{i}\) is not necessarily unique; it is only necessary for it to be possible to cancel out the \(\Pi_{i}\) term in Equation (8), along with the arbitrary matrix \(Y_{i}\), which has an appropriate dimension such that \(Y_{i}\dot{e}_{i}\) and \(Y_{i}\dot{e}_{j}\) are available signals for the estimation process. Here, we choose \(Y_{i}=C_{i}\) for simplification._  
Furthermore, if we examine the derivative of \(\dot{V}_{i}\), then we find that  
\[ \begin{split}\dot{V}_{i}&=e_{i}^{T}A_{i}^{T}\Pi_{i }^{-1}e_{i}+e_{i}^{T}\Pi_{i}^{-1}A_{i}e_{i}\\ &=e_{i}^{T}(A_{i}^{T}\Pi_{i}^{-1}+\Pi_{i}^{-1}A_{i})e_{i}=-e_{i}^ {T}\Omega_{i}e_{i}.\end{split}  \tag{12}\]  
However, we can only argue that  
\[\dot{V}_{i}=-e_{i}^{T}\Omega_{i}e_{i}\leq-\lambda_{min}(\Omega_{i})\|e_{i}\|_ {2}^{2}\leq 0. \tag{13}\]  
This means we need additional arguments to guarantee that the convergence of \(|e_{i}|\) reaches zero, as \(\dot{V}_{i}\) is only negative semi-definite. Thus, in order to show that each individual error dynamic asymptotically converges to zero, we need to examine the collective error dynamics for all agents. Let us denote \(\mathbb{E}=\left[e_{1}\quad e_{2}\quad...\quad e_{n}\right]^{T}\) as the collective error vector; now, we can write the collective error dynamics in the following form (without noise):  
\[\mathbb{E}=\frac{d}{dt} \begin{pmatrix}e_{1}\\ \vdots\\ e_{n}\end{pmatrix} = \begin{bmatrix}A_{1}&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&A_{n}\end{bmatrix} \mathbb{E}+ \begin{bmatrix}W_{1}&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&W_{n}\end{bmatrix} \cdot(\Gamma\otimes I_{m})\cdot\mathbb{E} \tag{14}\]  
where \(A_{i}=A-K_{i}C_{i}\) and  
\[\Gamma= \begin{bmatrix}-\sum_{j\in N_{1}}\gamma_{1j}&\gamma_{1j_{1}}&\cdots& \gamma_{1j_{N_{1}}}\\ \gamma_{2j_{1}}&-\sum_{j\in N_{2}}\gamma_{2j}&\cdots&\vdots\\ \vdots&\cdots&\ddots&\vdots\\ \gamma_{n\
eq j_{1}}&\cdots&\cdots&-\sum_{j\in N_{n}}\gamma_{nj}\end{bmatrix} . \tag{15}\]  
**Remark 2**. : _The row sum of \(\Gamma\) is zero; furthermore, the sum of the off-diagonal entries in each row is equal to the negative value of the corresponding diagonal entry. The operator \(\otimes\) denotes the Kronecker product, while \(I_{m}\) denotes a \(m\times m\) identity matrix._  
**Theorem 1**. : _Consider a wireless sensor network consisting of n agents which form a communication topology \(\mathcal{G}(\mathcal{V},\mathcal{E},\mathcal{A})\). Each agent adaptively estimates the states of a linear dynamic system with the structure governed by Equation (4) using the local adaptation law in Equation (11). Each \(A_{i}=A-K_{i}C_{i}\) satisfies the Lyapunov equation as in Equation (7). Then, the collective dynamics of the estimation errors in Equation (14) (without noise) represent a stable system. Furthermore, the adaptive Kalman consensus filter (a-KCF) and the adaptation law law can be implemented through Algorithm 1, which generates a stable estimation system._  
Proof. : The error dynamics can now be written as  
\[\mathbb{E}=\mathbb{A}\mathbb{E}+\mathbb{W}\cdot(\Gamma\otimes I_{m})\cdot \mathbb{E} \tag{16}\]  
where  
\[\mathbb{A}= \begin{bmatrix}A_{1}&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&A_{n}\end{bmatrix} ,\qquad\mathbb{W}= \begin{bmatrix}W_{1}&\cdots&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&W_{n}\end{bmatrix}  \tag{17}\]  
and \(\Gamma\) is defined as in Equation (15).