# Distributed Extended Kalman Filtering Based Techniques for 3-D UAV Jamming Localization
## 5 Extension of the Centralized Extended Kalman Filter (EKF-Centr) for the 3-D Localization  
In the centralized EKF, every node near the jamming region may receive the jamming signal and transfer the collected data to a centralized base station, where the EKF is employed. Therefore, the EKF-Centr is designed to receive the jamming information at each time step \(k\) from all of the boundary nodes (say total \(B_{i}\) boundary nodes). Thus, the state vector \(\mathbf{x}_{k}\) and \(\mathbf{A}_{k}\) the Jacobian matrix remains the same as appeared in Equations (18) and (20), respectively. However, the measurement vector incorporates the power measurements from all \(B_{i}\) boundary nodes, which is,  
\[\mathbf{h}=[v_{x},v_{y},v_{z},a_{x},a_{y},a_{z},P_{I_{B_{i}}}^{1},P_{I_{B_{i}} }^{2},\cdots,P_{I_{B_{i}}}^{B_{i}}]^{T} \tag{48}\]  
Additionally, the covariance matrix of measurement noise \(\mathbf{R}_{\mathbf{k}}\)  
\[\mathbf{R}_{\mathbf{k}}=diag\left(\sigma_{v_{x}}^{2},\sigma_{v_{y}}^{2}, \sigma_{v_{z}}^{2},\sigma_{a_{x}}^{2},\sigma_{a_{y}}^{2},\sigma_{a_{z}}^{2}, \sigma_{P_{I_{B_{i}}}^{2}}^{2},\cdots,\sigma_{P_{I_{B_{i}}}^{B_{i}}}^{2}\right) \tag{49}\]  
Consequently, the Jacobian matrix for the measurement will become:  
\[\mathbf{H}_{k}\overset{\Delta}{=}\frac{\partial\mathbf{h}}{ \partial\mathbf{x}_{\mathbf{k}}}\Big{|}_{(\widehat{x}_{j,k-1},\widehat{y}_ {j,k-1},\widehat{z}_{j,k-1})}=\begin{bmatrix}0&0&0&1&0&0&0&0&0\\ 0&0&0&1&0&0&0&0\\ 0&0&0&0&0&1&0&0\\ 0&0&0&0&0&0&1&0\\ 0&0&0&0&0&0&0&1&0\\ 0&0&0&0&0&0&0&0&1\\ \frac{\partial P_{I_{B_{i}}}^{1}}{\partial x_{j}}&\frac{\partial P_{I_{B_{i}}}^{ 1}}{\partial y_{j}}&\frac{\partial P_{I_{B_{i}}}^{1}}{\partial z_{j}}&0&0&0&0& 0\\ \end{bmatrix} \tag{50}\]Similar to the previous case, in order to evaluate the partial derivatives in the above, we utilize the distance of jammer from each boundary node. Thus, for the \(i\)-th boundary node, the jammer's distance is given by:  
\[d_{IB}^{i}=\sqrt{(x_{B}^{i}-x_{I})^{2}+(y_{B}^{i}-y_{I})^{2}+(z_{B}^{i}-z_{I})^{2}} \tag{51}\]  
Therefore, the first derivative of jamming power with respect to jammer's position will become:  
\[\frac{\partial P_{IB}^{i}}{\partial x_{I}}\Big{|}_{\delta_{I,k-1}}=C_{IB}^{i} \frac{x_{B}^{i}\widehat{x}_{I,k-1}}{(x_{B}^{i}+\widehat{x}_{I,k-1})^{2}+(y_{B} ^{i}+\widehat{y}_{I,k-1})^{2}+(z_{B}^{i}+\widehat{z}_{I,k-1})^{2}} \tag{52}\]  
\[\frac{\partial P_{IB}^{i}}{\partial y_{I}}\Big{|}_{\delta_{I,k-1}}=C_{IB}^{i} \frac{y_{B}^{i}\widehat{y}_{I,k-1}}{(x_{B}^{i}+\widehat{x}_{I,k-1})^{2}+(y_{B }^{i}+\widehat{y}_{I,k-1})^{2}+(z_{B}^{i}+\widehat{z}_{I,k-1})^{2}} \tag{53}\]  
\[\frac{\partial P_{IB}^{i}}{\partial z_{I}}\Big{|}_{z_{I,k-1}}=C_{IB}^{i} \frac{z_{B}^{i}\widehat{z}_{I,k-1}}{(x_{B}^{i}+\widehat{x}_{I,k-1})^{2}+(y_{B }^{i}+\widehat{y}_{I,k-1})^{2}+(z_{B}^{i}+\widehat{z}_{I,k-1})^{2}} \tag{54}\]  
where \(C_{IB}^{i}\) is the constant for the \(i\)-th node and is given by:  
\[C_{IB}^{i}=\frac{10n}{ln10} \tag{55}\]  
In summary, the proposed EKF-Centr algorithm for the 3D localization can be implemented using the Equations (13)-(17) with the aid of Equations (50), (52)-(55).  
**Remark 1**.: _At this stage, it is important to contrast the major differences among the two proposed algorithms (the DEKF and the DEKF-DR) and the conventional EKF-Centre. By observing the Jacobian matrix \(\mathbf{H}\), it can be deduced that the size of \(\mathbf{H}\) is adjusted, depending on the number of nodes utilized in the localization process. In the DEKF, there is only one boundary node to detect the jammer's location with the aid of received power only in distributed mechanism. In the EKF-Centr, there are \(B_{i}\) nodes utilized to locate the jammer's location by sending all of the information to a centralized node. Finally, in the DEKF-DR, a single boundary node along with an edge node is used in distributed fashion._