# Adaptive DCS-SOMP for Localization Parameter Estimation in 5G Networks
## 4 Proposed Method
### Adaptive Search in DCS-SOMP Approach for 3D Parameter Estimation
```
0:\(y,\mathbf{\omega}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{\phi}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{ \tilde{g}}^{(0)},\mathbf{\theta}^{(0)},\mathbf{q}_{az},\mathbf{q}_{el},K,L,N\)
0:\(\mathbf{\phi}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu z},\mathbf{\eta}_{1}^ {\mu z},\mathbf{\phi}_{1}^{\mu z},\mathbf{\eta}_{1}^{\mu z}\)
1:R\({}_{1}\leftarrow\mathbf{y}\)
2:for\(l\gets 1\) to \(L\)do
3:\(\tilde{h}_{l},\leftarrow-1\)
4:\(\max_{\alpha\prime}\leftarrow-1\)\(\triangleright\) Maximum Correlation
5:for\(m\gets 1\) to \((q_{az}\mathbf{\phi}_{d})^{2}\)do
6: corr \(\gets 0\)
7:for\(n\gets 1\) to \(N\)do
8: corr \(\leftarrow\) corr \(+\frac{[\mathbf{\tilde{g}}^{(0)}_{l}\|\mathbf{\eta}^{\mu}\|^{T}\mathbf{R}_{[n]}]}{[\mathbf{ \tilde{g}}^{(0)}_{l}\|\mathbf{\tilde{g}}^{(0)}\|_{2}}\)
9:endfor
10:if corr \(>\max_{\alpha\prime}\)then
11:\(\tilde{h}_{l}\gets m\)
12:endif
13:endfor
14: Determine \(\mathbf{\phi}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu z},\mathbf{\eta}_{1}^{\mu z}\) and \(\mathbf{\eta}_{1}^{\mu l}\) from (9) and (11)
15: Determine \((\mathbf{\phi}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu l})\) from (10)
16: Determine \((\mathbf{\theta}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu l})\) from (12)
17: Using [\(\mathbf{\mathbf{R}}_{l},\mathbf{\phi}_{1}^{\mu z},\mathbf{\eta}_{1}^{\mu z},\mathbf{\gamma}_{1}^ {\mu l},\mathbf{\tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{K}, N,\mathbf{q}_{az},\mathbf{q}_{el}\)] as input, fine-tune \([\mathbf{\phi}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu l},\mathbf{\theta}_{1}^{\mu z},\mathbf{\eta} _{1}^{\mu z},\mathbf{\eta}_{1}]\) using Algorithm 2
18:for\(n\gets 1\) to \(N\)do
19: Determine \(\beta_{l}[n]\) from (13)
20: Determine \(\mathbf{\mathbf{R}}_{l+1}[n]\) from (14)
21:endfor
22: Determine \(\mathbf{\mathbf{\tau}}_{l}\) from (16)\(\triangleright\) Execute solely if the adaptive step is not called
23:endfor
```  
**Algorithm 2** Adaptive Search  
```
0:\(\mathbf{\mathbf{R}}_{l},\mathbf{\iota}_{l}^{\mu z},\mathbf{\iota}_{l}^{\mu},\mathbf{\gamma}_{1}^ {\mu z},\mathbf{\phi}_{1}^{\mu},\mathbf{\tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{ \tilde{g}}^{(0)},K,N,\mathbf{q}_{az},\mathbf{q}_{el}\)
0:\(\mathbf{\phi}_{1}^{\mu z},\mathbf{\phi}_{1}^{\mu z},\mathbf{\eta}_{1}^{\mu z},\mathbf{\eta}_{1}^ {\mu z},\mathbf{\eta}_{1}^{\mu z},\mathbf{\eta}_{1}^{\mu z},\mathbf{\eta}_{1}^{\mu z}\)
1:for\(k\gets 1\) to \(K\)do
2: Determine \([\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^{k}]\) from (17)
3: Determine \([\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^{k}]\) from (18)
4: Determine \([\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^{k}]\) from (19)
5: Determine \([\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^{k}]\) from (20)
6:\(\mathbf{\tilde{g}}^{(k)}\leftarrow[\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^ {k}]\)\(\triangleright\)\(q_{az}\) values uniformly spaced
7:\(\mathbf{\tilde{g}}^{(k)}\leftarrow[\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^ {k}]\)\(\triangleright\)\(q_{cl}\) values uniformly spaced
8:\(\mathbf{\tilde{g}}^{(k)}\leftarrow[\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^ {k}]\)\(\triangleright\)\(q_{cl}\) values uniformly spaced
9:\(\mathbf{\tilde{g}}^{(k)}\leftarrow[\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kend}^ {k}]\)\(\triangleright\)\(q_{cl}\) values uniformly spaced
10:for\(n\gets 1\) to \(N\)do
11: Determine \(\mathbf{\omega}^{(0)}[n]\) from (23)
12:endfor
13:\(\tilde{h}_{l}\leftarrow-1\)\(\triangleright\) Maximum Correlation
14:\(\max_{\alpha\prime}\leftarrow-1\)
15:for\(m\gets 1\) to \((q_{az}\mathbf{q}_{d})^{2}\)do
16: corr \(\gets\) 1 to \(N\)do
17: corr \(\leftarrow\) corr \(+\frac{[\mathbf{\omega}^{(n)}_{l}\|\mathbf{\eta}^{\mu}\|^{T}\mathbf{R}_{[n]}]}{[\mathbf{\omega}^{(n)}_{l} \|\mathbf{\tilde{h}}_{2}}\)
19:endfor
20:if corr \(>\max_{\alpha\prime}\)then
21:\(\tilde{h}_{l}\gets m\)
22:endif
23:endfor
24: Determine \(\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kstart}^{l}\) and \(\mathbf{\tilde{g}}_{kstart}^{l}\) from (9) and (11)
25: Determine \((\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kstart}^{l})\) from (10)
26: Determine \((\mathbf{\tilde{g}}_{kstart}^{k},\mathbf{\tilde{g}}_{kstart}^{l})\) from (12)
27:for\(n\gets 1\) to \(N\)do
28: Determine \(\beta_{l}[n]\) from (13)
29:endfor
30: Determine \(\mathbf{\gamma}_{l}\) from (16)
31:endfor
```  
**Algorithm 3** Algorithm 3: Adaptive Search  
```
0:\(\mathbf{\tilde{g}}_{k},\mathbf{\omega}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{ \tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},\mathbf{ \tilde{g}}^{(0)},\mathbf{\tilde{g}}^{(0)},K,N,\mathbf{q}_{az},\mathbf{q}_{el}\)
0:\(\mathbf{\tilde{g}}_{kstart}

## 5 Results

In this article, we conducted simulations using MATLAB(r) software version R2012b (used under an academic license) installed in a computer running Windows 11 as the operating system and with the following hardware configurations: 2.5 GHz Intel Core i5-10300H processor, 16 GB RAM, and NVIDIA GTX 1650 as the dedicated video card.