# Efficient Distributed Method for NLOS Cooperative Localization in WSNs
## 4 Solution to the Subproblem
### Anchor Nodes  
For anchor nodes \((z_{i})_{1}=\mathbf{x}_{i},i\in\mathcal{A}\), Problem (22) becomes an equality-constrained optimization problem for \(i\geq N+1\),  
\[\begin{split}\min&\;h(\mathbf{z}_{i})+g(\mathbf{z}_{i})\\ \text{s.t.}&\;\;\mathbf{T}_{i}\mathbf{z}_{i}=\mathbf{x}_{i}\end{split} \tag{35}\]  
Our approach solving this problem was to eliminate the equality constraint via the equation  
\[\{\mathbf{z}_{i}|\mathbf{T}_{i}\mathbf{z}_{i}=\mathbf{x}_{i}\}=\{\mathbf{Q}_{i}\mathbf{\beta}_{i}+\mathbf{ \hat{z}}_{i}|\mathbf{\beta}_{i}\in\mathbb{R}^{\mathcal{N}_{i}d}\} \tag{36}\]  
where \(\mathbf{\hat{z}}_{i}=\left(x_{i}^{\mathrm{T}},\underbrace{0,\ldots,0}_{\mathcal{ N}_{i}d}\right)^{\mathrm{T}}\), \(\mathbf{Q}_{i}\) has the form of  
\[\mathbf{Q}_{i}=\left[\begin{array}{cc}\mathbf{e}_{1}^{d}-\mathbf{e}_{2}^{d}&\mathbf{0}_{1} \\ \mathbf{0}_{2}&\mathbf{I}_{\mathcal{N}_{i}d}\end{array}\right] \tag{37}\]  
where \(\mathbf{e}_{i}^{d}\), \(i=1\) or \(2\) is the \(i\)th unit vector in \(\mathbb{R}^{d}\), \(\mathbf{I}_{\mathcal{N}_{i}d}\) is an identity matrix with order \(\mathcal{N}_{i}d\), and \(\mathbf{0}_{i}\), \(i=1\) or \(2\) is a zero matrix.  
With Equation (36), we form eliminated optimization problem  
\[\begin{split}\min&\;\hat{h}(\mathbf{\beta}_{i})+\hat{g}(\mathbf{ \beta}_{i})\\ \Rightarrow&\;\min&\;h(\mathbf{Q}_{i}\mathbf{\beta}_{i}+\mathbf{ \hat{z}}_{i})+g(\mathbf{Q}_{i}\mathbf{\beta}_{i}+\mathbf{\hat{z}}_{i})\end{split} \tag{38}\]  
which is an unconstrained problem with variable \(\mathbf{\beta}_{i}\). Then, we could derive the solution of equality-constrained Problem (35) according to Equations (34).  
Introducing the affine structure does not change the convexity and continuity of the functions. The gradient of the \(\hat{g}(\mathbf{\beta}_{i})\) function is still Lipschitz-continuous. The gradient of \(\hat{g}(\mathbf{\beta}_{i})\) is  
\[\
abla\hat{g}(\mathbf{\beta}_{i})=c\left[\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i}\mathbf{ \beta}_{i}+\mathbf{Q}_{i}^{\mathrm{T}}(\mathbf{\hat{z}}_{i}-\mathbf{A}_{i}\mathbf{x}^{t}+\mathbf{ \tilde{\lambda}}_{i}^{t})\right] \tag{39}\]  
Hence, the new Lipschitz constant could be obtained by the following inequality:  
\[\begin{split}\|\
abla\hat{g}(\mathbf{x})-\
abla\hat{g}(\mathbf{y})\|& =\|c\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i}\mathbf{x}-c\mathbf{Q}_{i}^{\mathrm{T}} \mathbf{Q}_{i}\mathbf{y}\|\\ &=|c|\|\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i}(\mathbf{x}-\mathbf{y})\|\\ &\leq|c|\
u_{\max}(\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i})\|\mathbf{x}-\mathbf{ y}\|\\ \Rightarrow\frac{\|\
abla\hat{g}(\mathbf{x})-\
abla\hat{g}(\mathbf{y})\|} {\|\mathbf{x}-\mathbf{y}\|}\leq|c|\
u_{\max}(\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i})=L_{ \hat{g}},\forall\mathbf{x},\mathbf{y}\in\mathbb{R}^{d\tilde{\mathcal{N}}_{i}}\end{split} \tag{40}\]  
where \(\
u_{\max}(\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i})\) is the maximal eigenvalue of \(\mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i}\).  
By using the conclusion of Equation (32) to Equation (34),the accelerated proximal algorithm for the local subproblem of the anchor nodes is presented as follows:  
\[\begin{split}\mathbf{\omega}_{i}^{(k-1)}=\xi_{i}^{(k-1)}-\mu_{k}c[ \mathbf{Q}_{i}^{\mathrm{T}}\mathbf{Q}_{i}\xi_{i}^{(k-1)}+\mathbf{Q}_{i}^{ \mathrm{T}}(\hat{\mathbf{z}}_{i}-\mathbf{A}_{i}\mathbf{x}^{t}+\tilde{\mathbf{\lambda}}_{i}^{t}) ]\\ \mathbf{\eta}_{i}^{(k)}=\frac{\hat{\mu}_{k}}{1+\hat{\mu}_{k}}(\omega_{i }^{(k-1)}+\mathbf{Q}_{i}^{\mathrm{T}}\hat{\mathbf{z}}_{i})+\frac{\hat{\mu}_{k}}{1+ \hat{\mu}_{k}}(\mathbf{H}_{i}\mathbf{Q}_{i})^{\mathrm{T}}\mathbf{P}_{\mathrm{C}_{i}}( \mathbf{H}_{i}(\mathbf{Q}_{i}\mathbf{\omega}_{i}^{(k-1)}+\hat{\mathbf{z}}_{i}))\\ \mathbf{\xi}_{i}^{(k)}=\mathbf{\eta}_{i}^{(k)}+\frac{k-1}{k+2}(\mathbf{\eta}_ {i}^{(k)}-\mathbf{\eta}_{i}^{(k-1)})\end{split} \tag{41}\]