Skip to main content
. 2019 Apr 23;19(8):1912. doi: 10.3390/s19081912
Algorithm 2. Anomaly-aware Node Localization (ANLoC) Algorithm
Input: The sampled EDM matrix M, the index set Ω, the parameters λ1, λ2 and threshold θ, the initial number of Gaussian components nc. The coordinates of anchor nodes {a1,a2,,ana}(nad+1), where na denotes the number of anchor nodes.
Output: Coordinates of all unknown nodes  {ai|i=na+1,na+2,n}.
1. Calculate the true underlying EDM matrix D^ by using Algorithm 1;
2. Double centering the matrix D^:
  S=0.5×JD^J, where J=I1·1T/n and I is identity matrix;
3. Perform SVD decomposition on matrix S:
[H,Λ,Κ]=svd(S);
4. Calculate relative coordinates:
T=[t1,t2,,tn]=Λd·HdT
   where tid×1, Λd= Λ(1:d,1:d), Hd=H(:,1:d);
5. Calculate the coordinate transformation matrix Q:
  Q=[a2a1,a3a1,,anaa1]/[t2t1,t3t1,,tnat1];
6. Calculate and output coordinates of all unknown nodes:
ai=Q·(tit1)+a1,i=na+1,na+2,n.