# Hybrid Approach for Indoor Localization Using Received Signal Strength of Dual-Band Wi-Fi
## 5 Proposed Ranging Method  
In this study, we propose a deep regression model for dual-band RSS ranging. The model's structure is shown in Figure 4. The input of the model is the dual-band RSS vector, \(\mathbf{r}_{i}\). The model has several hidden blocks, each of which is composed of a fully connected (FC) layer, a batch normalization layer, and a rectified linear unit (ReLU) activation function. The FC layer is a structure in which one node is connected to all other nodes in the adjacent layer. It allows for nonlinear regression along with a nonlinear activation function. Although the FC layer is simple and powerful, it is vulnerable to overfitting.To solve this problem, a batch normalization layer was inserted into each hidden block. The use of the batch normalization layer mitigates internal covariate shift phenomenon, which is the changes in the input data distribution affect the training procedure. Typically, batch normalization  
Figure 3: Proposed hybrid range-based localization scheme. makes the neural network more stable and prevents the overfitting problem and increases the learning efficiency [44]. When the number of nodes of the FC layer of the \(l\)-th hidden block is \(M^{(l)}\), an input is represented as \(\mathbf{a}_{l}=[a_{1},\dots,a_{M^{(l)}}]^{\mathrm{T}}\), and the output of the FC layer is expressed as follows:  
\[\mathbf{y}^{(l)}= \begin{bmatrix}y_{1}^{(l)}\\ \vdots\\ y_{M}^{(l)}\end{bmatrix} =\mathbf{W}_{l}\cdot\mathbf{a}_{l}+\mathbf{b}_{l}, \tag{8}\]  
where \(\mathbf{W}_{l}\) is an \(M^{(l-1)}\times M^{(l)}\) matrix representing the weights of the nodes in the FC layer, and \(\mathbf{b}_{l}\) is a vector representing biases. These are parameters that can be trained using data-driven learning. With the mini-batch size \(K_{B}\), the batch normalization result \(\bar{y}_{m}^{(l)}\) for the \(j\)-th sample is expressed as follows:  
\[\bar{y}_{m}^{(l)}=\gamma_{m}^{(l)}\cdot\left(\frac{y_{m,j}^{(l)}-\mu_{m,\mathrm{ B}}}{\sqrt{\sigma_{m,\mathrm{B}}^{2}+\epsilon}}\right)+\beta_{m}^{(l)}, \tag{9}\]  
where \(j\in[1,K_{B}]\), \(y_{m,j}^{(l)}\) is the \(m\)-th node of the FC layer in the \(l\)-th hidden block. \(\mu_{\mathrm{B}}\) and \(\sigma_{\mathrm{B}}^{2}\) denote the sample mean and sample variance of \(y_{m}^{(l)}\) in the mini-batch, respectively. The parameters \(\gamma_{m}^{(l)}\) and \(\beta_{m}^{(l)}\) are the scaling factors and shift factors, respectively, and these are also updated through the learning process. By re-centering and re-scaling the data for each layer, after batch normalization, the ReLU activation function is applied. The use of ReLU activation function mitigates the gradient vanishing problem that may occur in the  
Figure 4: Neural network structure for deep regression. FC layer, and allows the neural network with deep structure to be trained efficiently [45]. After the ReLU activation, the output of the \(l\)-th hidden block is as follows:  
\[o_{m}^{(l)}=\left\{ \begin{aligned} 0,&\text{if}\ \ \tilde{y}_{m}^{(l)}<0\\ \tilde{y}_{m}^{(l)},&\text{otherwise}\end{aligned} \right. \tag{10}\]  
The regression layer after the total of \(L\) hidden blocks is the FC layer with one node, which performs the linear combination of the \(L\)-th hidden block's output. The proposed regression model can be trained with supervised learning by using the dual-band RSS vector and the ground truth distance value as a label. Let the ground truth distance be \(d_{i}\), which corresponds to the \(i\)-th RSS vector; then, the mean square error (MSE) \(E\) with the model output can be expressed as follows:  
\[E=\sqrt{(y_{i}-d_{i})^{2}}. \tag{11}\]  
To train the proposed model, the gradient of the MSE in (11) with respect to each parameter is computed by using the back-propagation algorithm, and the parameters of the model are updated to minimize the average MSE for the training dataset. The overall process of the proposed localization method is summarized in Algorithm 1.