# Efficient Distributed Method for NLOS Cooperative Localization in WSNs
## 3 Distributed Framework
 \tag{18}\]  
where \(\mathbf{z}\) is the shorthand notation for \(\left[\mathbf{z}_{1}^{\mathrm{T}},\mathbf{z}_{2}^{\mathrm{T}},\ldots,\mathbf{ z}_{N+M}^{\mathrm{T}}\right]^{\mathrm{T}}\), and \(\mathbf{A}=[\mathbf{A}_{1};\mathbf{A}_{2};\ldots;\mathbf{A}_{N+M}]\). Before deriving the ADMM framework, we needed to build the augmented Lagrangian function of Problem (18)  
\[ \begin{split} L(\mathbf{z},\mathbf{x},\mathbf{\lambda};\mathbf{c})& =[F(\mathbf{z})+G_{z}(\mathbf{z})]+\mathbf{\lambda}^{\mathrm{T}}( \mathbf{z}-\mathbf{A}\mathbf{x})+\sum\limits_{i}\frac{1}{2}c\|\mathbf{z}_{i}-\mathbf{A}_{i} \mathbf{x}\|^{2}\\ &=\sum\limits_{i}\left[F_{i}(\mathbf{z}_{i})+G_{z_{i}}(\mathbf{z }_{i})+\mathbf{\lambda}_{i}^{\mathrm{T}}(\mathbf{z}_{i}-\mathbf{A}_{i}\mathbf{x})+\frac{1} {2}c\|\mathbf{z}_{i}-\mathbf{A}_{i}\mathbf{x}\|^{2}\right]\end{split}  \tag{19}\]  
where \(\mathbf{\lambda}\) is a vector consisting of Lagrangian multipliers, and \(c\) is the given penalty parameter. Indicator function \(G_{z}(\mathbf{z})\) can be written as the sum of numerous subfunctions, namely, \(G_{z}(\mathbf{z})=\sum\limits_{i}G_{z_{i}}(\mathbf{z}_{i})\), by decomposing linear space \(\mathcal{R}_{z}\) as the Cartesian product of \((N+M)\) closed convex sets \(\mathcal{R}_{z_{1}},\mathcal{R}_{z_{2}},\ldots,\mathcal{R}_{z_{N+M}}\):  
\[\mathcal{R}_{z}=\mathcal{R}_{z_{1}}\times\mathcal{R}_{z_{2}}\times\ldots \mathcal{R}_{z_{N}}\times\mathcal{R}_{z_{N+1}}\times\ldots\times\mathcal{R}_{z _{N+M}}\]  
Indicator functions of sets \(\mathcal{R}_{z_{1}},\ldots,\mathcal{R}_{z_{N}}\) equal to identity matrices. Convex sets \(\mathcal{R}_{z_{N+1}},\ldots,\mathcal{R}_{z_{N+M}}\) have the affine form of  
\[\mathcal{R}_{z_{k}}=\{\mathbf{z}_{k}|\mathbf{T}_{k}\mathbf{z}_{k}=\mathbf{x}_{ k}\},\forall k\in\mathcal{A} \tag{20}\]  
where \(\mathbf{T}_{k}\) is a matrix satisfying \(\mathbf{T}_{k}=\left(1,\underbrace{0,\ldots,0}_{\hat{N}_{k}}\right)^{\mathrm{T}} \otimes\mathbf{I}_{d},k\in\mathcal{A}\). Thus, we can conclude that the objective function, constraints, and penalty term are separable for each sensor. Distributed optimization could be obtained by applying the ADMM method to Problem (18). The local updates are handled in an alternate way that can be separately optimized for variables \(\mathbf{z},\mathbf{x}\), and \(\mathbf{\lambda}\), as follows, for \(\forall i\in\mathcal{S}\cup\mathcal{A}\)  
\[ \begin{split}\mathbf{z}_{i}^{t+1}&\in\underset{\mathbf{z}_{ i}}{\text{argmin}}\left[F_{i}(\mathbf{z}_{i})+G_{z_{i}}(\mathbf{z}_{i})+\frac{1}{2}c\|\mathbf{z}_{i}- \mathbf{A}_{i}\mathbf{x}^{t}+\tilde{\mathbf{\lambda}}_{i}^{t}\|^{2}\right]\\ \mathbf{x}^{t+1}&\in\underset{\mathbf{x}}{\text{argmin}} \left(\sum_{i}\frac{1}{2}c\|\mathbf{z}_{i}^{t+1}-\mathbf{A}_{i}\mathbf{x}+\tilde{\mathbf{ \lambda}}_{i}^{t}\|^{2}\right)\\ \tilde{\mathbf{\lambda}}_{i}^{t+1}&\in\tilde{\mathbf{ \lambda}}_{i}^{t}+c(\mathbf{z}_{i}^{t+1}-\mathbf{A}_{i}\mathbf{x}^{t+1})\end{split}  \tag{21}\]  
where \(\tilde{\mathbf{\lambda}}_{i}=\mathbf{\lambda}_{i}/c\) is the scaled dual variable. \(\mathbf{z}_{i}-\)updates and \(\tilde{\mathbf{\lambda}}_{i}-\)updates can be independently carried out in parallel for each node \(i\). The concrete implementation steps are shown as follows. (1) Initialize variables \(\mathbf{z}_{i}^{0},\mathbf{x}^{0},\tilde{\mathbf{\lambda}}_{i}^{0}\) for all nodes. (2) Each node updates its local variables \(\mathbf{z}_{i}^{t+1}\) according to the first step of Problem (21), corresponding to the action  
\[\mathbf{z}_{i}^{t+1}\in\underset{\mathbf{z}_{i}}{\text{argmin}}\left[F_{i}(\mathbf{z}_{i} )+G_{z_{i}}(\mathbf{z}_{i})+\frac{1}{2}c\|\mathbf{z}_{i}-\mathbf{A}_{i}\mathbf{x}^{t}+\tilde{ \mathbf{\lambda}}_{i}^{t}\|^{2}\right] \tag{22}\]  
If we put indicate function \(G_{z_{i}}(\mathbf{z}_{i})\) in the constraints, Problem (22) can be written in an equivalent form:  
\[