# Beyond Stochastic Gradient Descent for Matrix Completion Based Indoor Localization
## 2 System Model  
In a system where our approach is adopted, each sensor node uses the following 2 steps to find its position (Figure 1). * Step 1: Refine and complete the squared distance matrix. Step 2: Once the matrix is completed, the coordinates of the node can be retrieved using the classic trilateration process. RSSI measurements corresponding to different sensor nodes are used to construct an RSSI matrix. From the RSSI values, the Euclidean Distance Matrix containing the distance information between each pair of sensor nodes \(X\) is built. Due to the limitation of radio communication range, the matrix of RSSI measurements is partially known. Thus, the matrix \(\mathbf{X}\) is incomplete (only a small number of \(\mathbf{X}\) entries are available) and can be affected by noise. This incomplete matrix can not efficiently serve for localization. It should be completed. Let us define the matrix \(\mathbf{X}_{true}\) which is the complete EDM. Therefore, the problem is how to recover the unknown elements of \(\mathbf{X}\) giving a small number of known entries of \(\mathbf{X}\). Assume that \(m\) is the number of nodes with known positions named 'Anchor nodes'. In contrast, \((n-m)\) is the number of sensors with unknown positions. \(n\) is the total number of sensor nodes (anchor nodes and unknown nodes) placed in the indoor environment. \(U_{i}\) is the \(i\)th unknown node where \(i=1,2,...,(n-m)\). \(A_{j}\) is the \(j\)th anchor node where \(j=1,2,...,m\). \(\mathbf{X}\) is the \((n\times n)\) Euclidean distance matrix. It can be partitioned as follows:  
\[\mathbf{X}= \begin{bmatrix}\mathbf{X}_{11}&\mathbf{X}_{12}\\ \mathbf{X}_{21}&\mathbf{X}_{22}\end{bmatrix} , \tag{1}\]  
where \(\mathbf{X}_{22}\) is the distance sub matrix between each pair of anchor nodes. It is obtained by calculating the exact distance between each pair of anchors. \(d_{A_{j}A_{j}}=||C_{A_{i}}-C_{A_{j}}||_{2}\) is the pairwise distance between anchor node \(i\) (\(A_{i}\)) and anchor node \(j\) (\(A_{j}\)). \(C_{A_{i}}\in\mathbb{R}^{3}\) are the location coordinates of anchor node \(i\). \(\mathbf{X}_{11}\) is the \((n-m)\times(n-m)\) distance sub matrix between each pair of unknown nodes. \(\mathbf{X}_{12}\) and \(\mathbf{X}_{21}\), where \(\mathbf{X}_{12}=\mathbf{X}_{21}^{T}\), are the distance sub matrices between each pair of anchors and unknown nodes. Figure 1: Algorithm details considering the sensor network consisting of seven sensor nodes from which three are anchors. \(\mathbf{X}_{11}\), \(\mathbf{X}_{12}\) and \(\mathbf{X}_{21}\) are obtained from RSSI measurements using the log normal shadowing propagation model which is used to express the pathloss measurements in dBs [32]:  
\[pl_{ij}=pl_{0}+20 log_{10}(f)+10 log_{10}(\frac{d}{d_{0}}), \tag{2}\]  
where \(pl_{0}\) is the pathloss value at a reference distance \(d_{0}\), \(\varrho\) is the pathloss exponent, \(f\) is the used frequency, \(d\) is the distance between node \(i\) and node \(j\). The used propagation parameters are defined later in Section 4. Since pairwise distances are dependant because of the dependency of RSSI in the indoor environments, this matrix should have low rank which motivates the use of matrix completion algorithms. After completing the Euclidean distance matrix, a trilateration process is adopted by each unknown node in order to estimate its location [10]. A reminder of this method is introduced below. A combination of estimated distances is required. In this combination process, we use only the distance estimated submatrix \(\hat{X}_{12}\) which contains the distances between the unknown nodes and all anchor nodes. The completion of the total matrix brings more distance information. Distances are estimated from each other due to the fact that columns are dependant (low rank matrix). \[\mathbf{\hat{X}}_{12}= \begin{bmatrix}d_{11}^{2}&d_{12}^{2}&.&.&d_{1m}^{2}\\ d_{21}^{2}&d_{22}^{2}&.&.&d_{2m}^{2}\\.&.&.&.&.\\ d_{(n-m)1}^{2}&d_{(n-m)2}^{2}&.&.&d_{(n-m)m}^{2}\\ \end{bmatrix}