# Efficient Distributed Method for NLOS Cooperative Localization in WSNs
## 3 Distributed Framework  
In order to approach the solution of convex optimization Problem (12) in a distributed way, we built the consensus form to formulate Problem (12) and design a parallel distributed algorithm based on ADMM. Problem (12) cannot be directly applied to parallel ADMM because it involves matrix calculation. We built the consensus form to decompose large-scale Problem (12) into \(N+M\) subproblems with independent variables. Then, we could design the ADMM framework to solve these subproblems in a parallel way. In this section, we prove the feasibility of decomposing Problem (12) and provide the concrete procedure of the parallel distributed algorithm. The consensus form could independently represent the connections between each sensor and its neighbors in the whole network by duplicating a new vector of each node \(j\) at neighbor node \(i\). Let \(\mathbf{z}_{i}=\left[(\mathbf{z}_{i})_{j}^{\text{T}}\right]^{\text{T}}\in\mathbb{R}^{ (\tilde{\mathcal{N}}_{i}+1)d},i\in\mathcal{S}\cup\mathcal{A}\) be the local variable, where \(\tilde{\mathcal{N}}_{i}\) represents the length of \(\mathcal{N}_{i}\). Component \((\mathbf{z}_{i})_{j}\) has the same dimension as \(\mathbf{x}_{i}\). Each of these local variables consists of selected elements of global variable \(\mathbf{x}=\left[\mathbf{x}_{1}^{\text{T}},\mathbf{x}_{2}^{\text{T}},\ldots,\mathbf{x}_{N+M}^{ \text{T}}\right]^{\text{T}}\). Mapping from the local variable to the global variable is  
\[ \begin{cases}(\mathbf{z}_{i})_{1}=\mathbf{x}_{i}\\ (\mathbf{z}_{i})_{j}=\mathbf{x}_{l}\end{cases} i\in\mathcal{S}\cup\mathcal{A},\;l\in \mathcal{N}_{i},\;j=2,\ldots,\tilde{\mathcal{N}}_{i}+1 \tag{13}\]  
when we put the elements of neighbor set \(\mathcal{N}_{i}\) in corresponding vector \(\mathbf{N}_{i}\) in an ascending order, the relation between \((\mathbf{z}_{i})_{j}\) and \(\mathbf{x}_{l}\) is \(l=\mathbf{N}_{i}(j-1)\). \(\mathbf{N}_{i}(j)\) means the \(j\)th element of \(\mathbf{N}_{i}\). In other words, \((\mathbf{z}_{i})_{j}\) is the duplication of \((j-1)\)th neighbor node at node \(i\). Therefore, Problem (12) has an equivalent form:  
\[ \begin{split}\min&\sum_{i=1}^{N+M\tilde{\mathcal{N}}_{ i}+1}\sum_{j=2}^{\text{T}}\frac{1}{2}\text{dist}^{2}((\mathbf{z}_{i})_{1}-(\mathbf{z}_{i})_{ j},\text{C}_{i,l})\\ \text{s.t.}&\mathbf{z}_{i}-\mathbf{\tilde{x}}_{i}=0,\forall i \in\mathcal{S}\cup\mathcal{A}\\ &(\mathbf{z}_{k})_{1}=\mathbf{x}_{k},\forall k\in\mathcal{A}\end{split}  \tag{14}\]  
where \(\mathbf{\tilde{x}}_{i}\) is the linear function of \(\mathbf{x}\). We denoted local objective function as \(F_{i}(\mathbf{z}_{i})=\sum\limits_{j=2}^{\hat{N}_{i}+1}\frac{1}{2}\mathrm{dist}^{ 2}((\mathbf{z}_{i})_{1}-(\mathbf{z}_{i})_{j},C_{i,l})\). Obviously, total objective function \(F(\mathbf{z})=\sum\limits_{i=1}^{N+M}F_{i}(\mathbf{z}_{i})\) is separable. Then, we could rewrite Problem (14) in another, simpler form:  
\[ \begin{split}\min&\sum\limits_{i=1}^{N+M}F_{i}( \mathbf{z}_{i})\\ \text{s.t.}&\mathbf{z}_{i}-\mathbf{A}_{i}\mathbf{x}=0,\forall i \in\mathcal{S}\cup\mathcal{A}\\ &\mathbf{z}\in\mathcal{R}_{z}\end{split}  \tag{15}\]  
where \(\mathcal{R}_{z}\) is a linear space satisfying  
\[\mathcal{R}_{z}=\{\mathbf{z}|(\mathbf{z}_{k})_{1}=\mathbf{x}_{k},\forall k\in \mathcal{A}\} \tag{16}\]  
Matrix \(A_{i}\) indicates the linear relation between local variable \(\mathbf{z}_{i}\) and global variable \(\mathbf{x}\), of which the form is  
\[\mathbf{A}_{i}= \begin{bmatrix}\mathbf{e}_{1}\\ (\mathbf{e}_{l})_{l\in\mathcal{N}_{l}}\end{bmatrix} \otimes\mathbf{I}_{d} \tag{17}\]  
where \(\mathbf{e}_{l}\) is the \(l\)th unit-row vector in \(\mathbb{R}^{N+M}\), \(\mathbf{I}_{d}\) is an identity matrix of order \(d\), and \(\otimes\) is a Kronecker product. By introducing an indicator function \(G_{z}(\mathbf{z})\) of \(\mathcal{R}_{z}\), Problem (14) can be rewritten in a general consensus form as  
\[ \begin{split}\min& F(\mathbf{z})+G_{z}(\mathbf{z})\\ \text{s.t.}&\mathbf{z}-\mathbf{A}\mathbf{x}=0\end{split}