# An Indoor Positioning Algorithm for Wearable Device Using Deep Learning Regression Prediction Model in IoT Applications

Authors: Aichuan Li; Shujuan Yi
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

To solve the problem of low positioning accuracy and ease environmental impact of wearable devices in the Internet of things, a wearable device indoor positioning algorithm based on deep learning was proposed. Firstly, a basic model of deep learning composed of an input layer, hidden layer, and output layer is proposed to realize the continuous prediction and positioning with higher accuracy. Secondly, the automatic stacking encoder is trained with signal strength data, and features are extracted from a large number of signal strength samples with noise to build the location fingerprint database. Finally, the stacking automatic coding machine is used to obtain the signal strength characteristics of the points to be measured, which are matched with the signal strength characteristics in the fingerprint database, and the location of the points to be measured is estimated by the nearest neighbor algorithm. The experimental results show that the indoor positioning algorithm based on the stacking automatic coding machine has higher positioning accuracy, and the average error of points on the complete path can reach within 3 m in 93% cases.


---

## Body

## 1. Introduction

With the development of computer technology, smart phones and other smart wearable devices with a variety of sensors have been popularized in everyday life, and people’s demand for indoor positioning services is increasingly strong. Indoor positioning is a position estimation technique for indoor environment [1–4]. Due to the influence of complex indoor radio transmission environment, indoor building layout, personnel mobility, and other factors, the indoor signal fading model cannot be established accurately, so its progress lags far behind the outdoor positioning technology. Outdoor Positioning technology based on GPS (Global Positioning System) and cellular base station has been very mature and has been widely deployed and applied [5]. Low-cost and high-precision indoor positioning solutions have become a research hotspot. Wi-Fi is a widely used wireless communication technology, which can effectively solve the blocking problem with GPS and base station buildings. A large number of wireless Access Points (APs) are deployed in indoor environments such as schools, shopping malls, and airports [6, 7]. However, due to the indoor complex environment, the accuracy is affected by obstacles, non-line-of-sight propagation, noise, and other factors, and there is a certain positioning error [8, 9]. Therefore, it is of major practical significance and practical value to study indoor positioning algorithm of smart wearable devices.Many domestic and foreign experts and scholars have conducted deep research on the indoor positioning algorithm of smart wearable devices. Literature [10] uses the k-nearest neighbor interpolation (KNN) method to search the most similar K location data from fingerprint database and average its location. Literature [11] improves it and uses the weighted KNN method. In [12], the random forest algorithm also achieves excellent positioning accuracy. In [13], deep learning algorithm is utilized to realize indoor positioning through Wi-Fi. Zhihua et al. [14] proposed an indoor fingerprint system for deep learning of Channel state information (CSI), which verified the broad prospect of deep learning in the field of indoor positioning. However, traditional machine learning methods are very sensitive to data and often require data normalization, filtering, and other preprocessing. Moreover, they are easy to overfit and lead to bland generalization ability, which will affect the prediction performance of the network over time. However, with the increasing demand for positioning accuracy and the increasing amount of data, meaningful learning is a promising solution. Therefore, the above algorithms still have some room for innovation and improvement [15–18].A wearable device indoor positioning algorithm based on arcane learning is proposed. By using deep learning and automatic encoder, the hidden structural features of data can be extracted by direct learning without preprocessing, and problems such as overfitting can be effectively avoided improving network generalization ability [19–22]. Its main innovations are as follows:(1)
Most of the existing methods, continuous positioning, cannot achieve high accuracy, and the algorithm, using a basic deep learning model composed of input layer, hidden layer, and output layer, by setting the input-output approximately equal, learning the parameters of network weights, and then establishing the encoding mode, achieves a higher accuracy of continuous prediction location.(2)
Most of the existing methods, easy from the problem of fitting result in weak generalization ability, and the algorithm using the signal strength data of stacked automatic coding machine for training, and from a lot of signal with noise characteristics, strength of samples is taken to establish the position fingerprint database, which effectively solves the fitting result in weak generalization ability problem.(3)
Most of the existing methods do not estimate the location of the point to be measured, but the proposed algorithm uses the stack automatic coding machine to obtain the signal strength characteristics of the point to be measured, matches the signal strength characteristics with the fingerprint database of the location, and estimates the location of the point to be measured by the nearest neighbor algorithm.Experimental results show that the proposed indoor positioning algorithm of wearable devices based on subconscious learning has higher positioning accuracy, and the average error of points on the complete path can reach within 3 m in 93% of cases.


## 2. Framework of Proposed Algorithm

Based on deep learning indoor location algorithm for wearable devices, the location information of mobile devices in the environment is described by the signal strength of various signal sources (such as routers, iBeacon, and RFID). Firstly, based on the principle of deep learning, the autoencoder compresses data, extracts feature or reduces noise, and trains with the autoencoder to establish the position fingerprint database. Finally, it matches the signal intensity features in the fingerprint database, uses the nearest neighbor algorithm to estimate the location of the points to be measured, and chooses the best matching position. Figure1 shows the overall flow chart of the proposed algorithm.Figure 1
Indoor location algorithm for wearable devices using deep learning.


## 3. Deep Learning Models

The profound learning model is similar to the three-layer structure of the traditional neural network. It is a multilayer network composed of an input layer, hidden layer, and output layer. Concentrated learning enables gradient to be transmitted effectively through the layer-by-layer training method. Therefore, deep neural network usually contains multiple hidden layers, which improve network expression ability. As shown in Figure2, the adopted model is mainly divided into the following three parts: auto encoder, multilayer perceptron, and deep learning regression prediction model [23].Figure 2
Deep learning model.


### 3.1. Autoencoder

An autoencoder can be utilized to compress data, extract features, or reduce noise. The basic idea of deep learning and the characteristics of the network are utilized to directly construct a network structure that can express the original data. By setting the approximate equality of input and output, the parameters and weights of the network are drawn, and then the deep autoencoder model is constructed [24].


### 3.2. Multilayer Perceptron

Multilayer perceptron (MLP), also known as concentrated prefeedback network, is a typical deep learning model [25]. MLP has multiple layers of nodes, where each layer is fully connected to the next layer. Each node in the hidden layer is operated with a nonlinear activation function, and the network is trained using a backpropagation model.


#### 3.2.1. Activation Function

Sigmoid function or S-type function is commonly used in neural networks. The Sigmoid function can compress the real number into the interval of [0, 1], which is under a strong explanatory power. However, when the neuron approaches 0 or 1, saturation will occur, leading to gradient dispersion. Therefore, the weight should be initialized carefully:(1)fx=11+ex.Tanh function: this function has good data control ability and maps real numbers to the interval of [−1, 1], but there is still saturation problem. The formula of Tanh function is(2)fx=ex−e−xex+e−x.Relu function is a linear correction unit, which is 0 whenx < 0 and 1 when x > 0. Relu converges faster, but Relu is also more fragile. Large gradient flow may lead to the permanent failure of neurons, which can be avoided by selecting an appropriate learning rate or interlayer batch regularization. The formula is as follows:(3)fx=max0,x.


#### 3.2.2. Backpropagation Algorithm

The training sample set isx1,y1,…,xm,ym, where m is the number of samples and the sample set is utilized to train the neural network. The loss function in the experiment is(4)JW,b;x,y=12hW,bx−y2.The key step of the gradient descent method is tantamount to calculate the partial derivatives, the weightW, and the bias item b of the network, and their iterative formulas are(5)Wij1=Wij1−α∂∂Wij1JW,b,bi1=bi1−α∂∂bij1JW,b,where a is the learning rate.


### 3.3. Deep Learning Regression Prediction Model

Indoor fingerprint location scheme can only predict and estimate discrete fingerprint points [26]. In order to achieve more accurate continuous prediction location, a regression prediction model is built by using meaningful learning. The linear regression model can be expressed as(6)fx=wTx+b.where x represents the input, w represents the weight, and b represents deviation. w and b are trained as minimized objective functions. The model first processes input data and then performs pretraining. When the output layer is achieved, the model will propagate back. The algorithm stops when it converges.


## 3.1. Autoencoder

An autoencoder can be utilized to compress data, extract features, or reduce noise. The basic idea of deep learning and the characteristics of the network are utilized to directly construct a network structure that can express the original data. By setting the approximate equality of input and output, the parameters and weights of the network are drawn, and then the deep autoencoder model is constructed [24].


## 3.2. Multilayer Perceptron

Multilayer perceptron (MLP), also known as concentrated prefeedback network, is a typical deep learning model [25]. MLP has multiple layers of nodes, where each layer is fully connected to the next layer. Each node in the hidden layer is operated with a nonlinear activation function, and the network is trained using a backpropagation model.


### 3.2.1. Activation Function

Sigmoid function or S-type function is commonly used in neural networks. The Sigmoid function can compress the real number into the interval of [0, 1], which is under a strong explanatory power. However, when the neuron approaches 0 or 1, saturation will occur, leading to gradient dispersion. Therefore, the weight should be initialized carefully:(1)fx=11+ex.Tanh function: this function has good data control ability and maps real numbers to the interval of [−1, 1], but there is still saturation problem. The formula of Tanh function is(2)fx=ex−e−xex+e−x.Relu function is a linear correction unit, which is 0 whenx < 0 and 1 when x > 0. Relu converges faster, but Relu is also more fragile. Large gradient flow may lead to the permanent failure of neurons, which can be avoided by selecting an appropriate learning rate or interlayer batch regularization. The formula is as follows:(3)fx=max0,x.


### 3.2.2. Backpropagation Algorithm

The training sample set isx1,y1,…,xm,ym, where m is the number of samples and the sample set is utilized to train the neural network. The loss function in the experiment is(4)JW,b;x,y=12hW,bx−y2.The key step of the gradient descent method is tantamount to calculate the partial derivatives, the weightW, and the bias item b of the network, and their iterative formulas are(5)Wij1=Wij1−α∂∂Wij1JW,b,bi1=bi1−α∂∂bij1JW,b,where a is the learning rate.


## 3.2.1. Activation Function

Sigmoid function or S-type function is commonly used in neural networks. The Sigmoid function can compress the real number into the interval of [0, 1], which is under a strong explanatory power. However, when the neuron approaches 0 or 1, saturation will occur, leading to gradient dispersion. Therefore, the weight should be initialized carefully:(1)fx=11+ex.Tanh function: this function has good data control ability and maps real numbers to the interval of [−1, 1], but there is still saturation problem. The formula of Tanh function is(2)fx=ex−e−xex+e−x.Relu function is a linear correction unit, which is 0 whenx < 0 and 1 when x > 0. Relu converges faster, but Relu is also more fragile. Large gradient flow may lead to the permanent failure of neurons, which can be avoided by selecting an appropriate learning rate or interlayer batch regularization. The formula is as follows:(3)fx=max0,x.


## 3.2.2. Backpropagation Algorithm

The training sample set isx1,y1,…,xm,ym, where m is the number of samples and the sample set is utilized to train the neural network. The loss function in the experiment is(4)JW,b;x,y=12hW,bx−y2.The key step of the gradient descent method is tantamount to calculate the partial derivatives, the weightW, and the bias item b of the network, and their iterative formulas are(5)Wij1=Wij1−α∂∂Wij1JW,b,bi1=bi1−α∂∂bij1JW,b,where a is the learning rate.


## 3.3. Deep Learning Regression Prediction Model

Indoor fingerprint location scheme can only predict and estimate discrete fingerprint points [26]. In order to achieve more accurate continuous prediction location, a regression prediction model is built by using meaningful learning. The linear regression model can be expressed as(6)fx=wTx+b.where x represents the input, w represents the weight, and b represents deviation. w and b are trained as minimized objective functions. The model first processes input data and then performs pretraining. When the output layer is achieved, the model will propagate back. The algorithm stops when it converges.


## 4. Positioning Algorithm

### 4.1. Stack Automatic Coding Machine

Stacking automatic coder is comprised of several autoencoders. An automatic encoder is an efficient encoding artificial neural network for unsupervised learning (as shown in Figure3), which can extract features from high-dimensional data and reduce the data dimension, so as to improve the positioning accuracy of location fingerprint method and reduce the time required for positioning.Figure 3
An example of an automatic coder.The input layer of the automatic encoder to the hidden layer (encoding layer) is the encoding part, and the hidden layer to the output layer is the decoding part. The hidden layerh is calculated from input layer v and utilized to calculate reconstructed output layer u′. The calculation method is as follows:(7)h=11+exp−wv−b,uu′=11+exp−w′h−b′,where w and w′ are, respectively, the connection weights between the input layer and the hidden layer and between the hidden layer and reconstructed output layer. In order to decrease the number of parameters and control the complexity of the model, the weight matrix w′ is limited to the transpose of the weight matrix w, that is, w′=wT. b and b′ are the bias units of the hidden layer and reconstructed output layer, respectively; h is the hidden layer unit data. The training of the automatic coding machine is to minimize the reconstruction error between u′ and u obtained through the input layer v. The smaller the error is, the closer the reconstructed output layer is the input layer. The hidden layer can better express the information of the input layer to reach the purpose of feature extraction.Multiple automatic encoders are stacked to form a stacked automatic encoder. Figure4 shows the network with K-100-80-50 structure, which consists of three automatic encoders stacked on top of each other. The first automatic encoder has K-100-K structure, the subsequent automatic encoder has 100-80-100 structure, and the third automatic encoder has 80-50-80 structure. The input of the first automatic coding machine is the K-dimensional vector v=vi|i=1,2,…,K, and the input layer of the N automatic coder is the hidden layer of the N−1 automatic coder N=2,3. The number of stacked automatic encoders is 3 and the number of hidden layer neurons of each automatic encoder is empirical values.Figure 4
Structure of the stacking automatic encoder.voffline=vji|j=1,2,…,J;i=1,2,…,K is trained at the input of the stacking automatic coding machine of structure A in Figure 3. J is the amount of data strips collected in the offline phase, and each dimension of each piece of data corresponds to an RSS of fixed AP or iBeacon. After the training, the new fingerprint database data were obtained:DATAoffline=hjioffline3|j=1,2,…,J;i=1,2,…,n=dataji|j=1,2,…,J;i=1,2,…,n, where n represents the dimension of data processed by the automatic stacking encoder.


### 4.2. Nearest Neighbor Method

Put online phase datavonline=vionline|i=1,2,…,K as the input layer, and the structure in Figure 3(a) is used for a forward propagation, where the parameters w and b are the DATA trained in the offline phase, and DATA=hionline3|i=1,2,…,n=DATAi|i=1,2,…,n is the input data of the classifier nearest neighbor method.The AP and iBeacon corresponding to the RSS of each dimension of the original fingerprint database and thevonline phase DATA online are the same, and the information expressed by each dimension of the new fingerprint database and the online DATA is also corresponding. In the new fingerprint database DATAoffline and online DATA, the nearest neighbor method is used to calculate the online phase data and the Euclidean distance of the i data in the new fingerprint database [27]:(8)dj=∑i=1nDATAi−dataij2,where dataji represents the i dimension data of the j data in the new fingerprint database, datai represents the i dimension data in the online phase, and n represents the dimension of the data processed by the stack automatic encoder. Finally, depending on the order of Euclidean distance dj from small to large (the smaller the distance, the higher the similarity of the two kinds of data), the coordinate of the sampling point with the smallest distance is the positioning result.


## 4.1. Stack Automatic Coding Machine

Stacking automatic coder is comprised of several autoencoders. An automatic encoder is an efficient encoding artificial neural network for unsupervised learning (as shown in Figure3), which can extract features from high-dimensional data and reduce the data dimension, so as to improve the positioning accuracy of location fingerprint method and reduce the time required for positioning.Figure 3
An example of an automatic coder.The input layer of the automatic encoder to the hidden layer (encoding layer) is the encoding part, and the hidden layer to the output layer is the decoding part. The hidden layerh is calculated from input layer v and utilized to calculate reconstructed output layer u′. The calculation method is as follows:(7)h=11+exp−wv−b,uu′=11+exp−w′h−b′,where w and w′ are, respectively, the connection weights between the input layer and the hidden layer and between the hidden layer and reconstructed output layer. In order to decrease the number of parameters and control the complexity of the model, the weight matrix w′ is limited to the transpose of the weight matrix w, that is, w′=wT. b and b′ are the bias units of the hidden layer and reconstructed output layer, respectively; h is the hidden layer unit data. The training of the automatic coding machine is to minimize the reconstruction error between u′ and u obtained through the input layer v. The smaller the error is, the closer the reconstructed output layer is the input layer. The hidden layer can better express the information of the input layer to reach the purpose of feature extraction.Multiple automatic encoders are stacked to form a stacked automatic encoder. Figure4 shows the network with K-100-80-50 structure, which consists of three automatic encoders stacked on top of each other. The first automatic encoder has K-100-K structure, the subsequent automatic encoder has 100-80-100 structure, and the third automatic encoder has 80-50-80 structure. The input of the first automatic coding machine is the K-dimensional vector v=vi|i=1,2,…,K, and the input layer of the N automatic coder is the hidden layer of the N−1 automatic coder N=2,3. The number of stacked automatic encoders is 3 and the number of hidden layer neurons of each automatic encoder is empirical values.Figure 4
Structure of the stacking automatic encoder.voffline=vji|j=1,2,…,J;i=1,2,…,K is trained at the input of the stacking automatic coding machine of structure A in Figure 3. J is the amount of data strips collected in the offline phase, and each dimension of each piece of data corresponds to an RSS of fixed AP or iBeacon. After the training, the new fingerprint database data were obtained:DATAoffline=hjioffline3|j=1,2,…,J;i=1,2,…,n=dataji|j=1,2,…,J;i=1,2,…,n, where n represents the dimension of data processed by the automatic stacking encoder.


## 4.2. Nearest Neighbor Method

Put online phase datavonline=vionline|i=1,2,…,K as the input layer, and the structure in Figure 3(a) is used for a forward propagation, where the parameters w and b are the DATA trained in the offline phase, and DATA=hionline3|i=1,2,…,n=DATAi|i=1,2,…,n is the input data of the classifier nearest neighbor method.The AP and iBeacon corresponding to the RSS of each dimension of the original fingerprint database and thevonline phase DATA online are the same, and the information expressed by each dimension of the new fingerprint database and the online DATA is also corresponding. In the new fingerprint database DATAoffline and online DATA, the nearest neighbor method is used to calculate the online phase data and the Euclidean distance of the i data in the new fingerprint database [27]:(8)dj=∑i=1nDATAi−dataij2,where dataji represents the i dimension data of the j data in the new fingerprint database, datai represents the i dimension data in the online phase, and n represents the dimension of the data processed by the stack automatic encoder. Finally, depending on the order of Euclidean distance dj from small to large (the smaller the distance, the higher the similarity of the two kinds of data), the coordinate of the sampling point with the smallest distance is the positioning result.


## 5. Experimental Results and Analysis

In order to verify the indoor effect of the wearable equipment indoor location algorithm proposed in this paper, the location area includes corridors and offices, and the office is equipped with desks, chairs, bookcases, and other office items. Seven Moto 360s were selected as the research objects. The signal was collected by a New Pad S97 tablet computer for 30 consecutive times. Two groups were collected at a time interval of 0.5 seconds. As a result, there are six groups of data in each location and 180 times of signal acquisition.


### 5.1. Regression Predictions by Using Deep Learning Model

Indoor location scene usually adopts the location method founded on fingerprint. 140 fingerprint points in indoor environment were collected and studied to estimate additional registration points. Fingerprint-based localization is a multiclassification problem. Traditional machine learning can achieve good results for binary classification problems but with the increase of data dimension of multiclassification problems. Machine learning becomes quite difficult. For better generalization, machine learning methods have a tendency to make strong task-specific assumptions. At the same time, the saturation ofS function limits the number of hidden layers, so the expression ability of a neural network is insufficient. The core idea of deep learning is tantamount to assume that data are composed of factors or features. Meaningful learning aims to overcome a series of difficulties such as “dimensional disaster” and “gradient dispersion” in machine learning, so as to achieve better results in multiclassification problems.A multilayered neural network classifier with five hidden layers is constructed based on the deep learning framework. In order to prevent gradient dispersion, Relu is adopted as the activation function of the hidden layer and Xavier is used to initialize the weight. The number of samples in the test set is 100, and the simulation results have shown that the positioning accuracy can reach 90%.


#### 5.1.1. Comparison between Single Hidden Layer and Three Hidden Layers

In both networks, the autoencoder is not used, and Relu is adopted as the activation function for the hidden layer. Regression fitting is carried out on the test set to predict the results of coordinate points, as shown in Table1. It can be observed in the table that the prediction effect of multiple hidden layers is obviously better than that of single layer, but the positioning error is still large.Table 1
Comparison of results of single hidden layer and three hidden layers.
Hidden layerSingle hidden layerThree hidden layersMean positioning error (m)0.3360.268The error is less than 0.25 m registration point (%)19.551.8


#### 5.1.2. Autoencoder

As can be observed in the data distribution, in order to improve the positioning accuracy, it is necessary to carry out feature extraction and noise reduction processing for the data. Therefore, before the data are input into the profound learning regression network, the autoencoder processing is carried out to extract the high-dimensional features of the data and reduce the impact of noise. Table2 lists the comparison results of autoencoder positioning accuracy in the three hidden deep regression prediction networks using Tanh activation function.Table 2
Comparison of positioning results of autoencoder.
Auto encoderNoYesMean positioning error (m)0.21280.1789The error is less than 0.25 m registration point (%)5776


#### 5.1.3. Comparison of Activation Functions of Different Hidden Layers

The selection of the activation function of the hidden layer will also largely complete action on the positioning accuracy. Relu function, which performs well in the classification task, is not so effective as Sigmoid and other functions in the case of uneven data distribution due to its weak ability to control data. Since Tanh is equivalent to the extended form of Sigmoid function, its center is symmetric about the zero point. Tanh tends to achieve better results than Sigmoid. The specific results are presented in Table3.Table 3
Comparison of positioning accuracy of activation functions of different hidden layers.
The activation functionReluSigmoidTanhMean positioning error (m)0.27160.21580.1796The error is less than 0.25 m registration point (%)355676


### 5.2. Comparisons of Positioning Accuracy with Several Other Algorithms

Under the same experimental conditions, the positioning algorithms in the literature [10, 12–14] are also implemented, which can be used to compare and verify the advantages of the proposed positioning algorithms in constructing the relationship between positioning features and positioning coordinates. The positioning effects of these algorithms are shown in Figure 5.Figure 5
The average positioning error comparison between several positioning algorithms.From Figure5, we can see that the average positioning accuracies of algorithms in literature [13] and [14] and the algorithm based on deep learning are higher than those in literature [10] and [12], which reflects the advantages of deep learning in constructing positioning features and position relations. When the number of acquisitions is 60, the average positioning error of the proposed algorithm is 1.85 m, which is basically smaller than that of other algorithms when the number of samplings is 150. At this time, the average positioning errors of the algorithms in [6, 9, 10] and [8] are 1.87 m, 1.97 m, 1.99 m, and 2.29 m, respectively.Figure6 shows the cumulative probability distribution curve of the average positioning errors of several positioning algorithms when the number of signal sampling is 120. When the average positioning error is less than or equal to 2 m, the cumulative probability of indoor positioning algorithm combined with deep learning is 76.34%. The cumulative probabilities in the literature [13], [14], [10], and [12] are 69.44%, 66.67%, 63.90%, and 54.13%, respectively. When the average positioning error is less than or equal to 3 m, the cumulative probability of each algorithm is 93.67%, 83.11%, 81.37%, 79.57%, and 76.78%, respectively. Therefore, the proposed indoor positioning method can provide smaller errors and stable positioning results.Figure 6
The average positioning error’s cumulative probability distribution of several positioning algorithms.


### 5.3. Comparisons of Calculation Time with Several Other Algorithms

In order to verify the real-time performance of the algorithm, the running time of several indoor location algorithms in references [10, 12–14] is tested. Table 1 shows the running time of these algorithms. From Table 4, we can see that the running time of the proposed algorithm and of algorithms in the literature [13] and [14] is longer than that in the traditional literature [10] and [12] and the algorithm in literature [12] is the shortest. However, the positioning accuracy of literature [12] algorithm is poor, which can be seen from Figures 5 and 6.Table 4
Time consumption of several positioning algorithms (ms).
AlgorithmN = 30N = 60N = 90N = 120N = 150N = 180Proposed algorithm297.476350.721398.991451.081502.766552.004Literature [13]301.350357.109408.329459.231513.221565.171Literature [14]302.701353.281405.421458.341508.217557.124Literature [10]6.213102.334166.210217.662275.329327.371Literature [12]60.001101.219159.296241.002266.737319.534As can be seen from the comparison results of location accuracy and calculation time, the proposed algorithm can achieve the highest location accuracy while maintaining acceptable calculation time. Thus, compared with other algorithms, the proposed algorithm has the best comprehensive performance.


## 5.1. Regression Predictions by Using Deep Learning Model

Indoor location scene usually adopts the location method founded on fingerprint. 140 fingerprint points in indoor environment were collected and studied to estimate additional registration points. Fingerprint-based localization is a multiclassification problem. Traditional machine learning can achieve good results for binary classification problems but with the increase of data dimension of multiclassification problems. Machine learning becomes quite difficult. For better generalization, machine learning methods have a tendency to make strong task-specific assumptions. At the same time, the saturation ofS function limits the number of hidden layers, so the expression ability of a neural network is insufficient. The core idea of deep learning is tantamount to assume that data are composed of factors or features. Meaningful learning aims to overcome a series of difficulties such as “dimensional disaster” and “gradient dispersion” in machine learning, so as to achieve better results in multiclassification problems.A multilayered neural network classifier with five hidden layers is constructed based on the deep learning framework. In order to prevent gradient dispersion, Relu is adopted as the activation function of the hidden layer and Xavier is used to initialize the weight. The number of samples in the test set is 100, and the simulation results have shown that the positioning accuracy can reach 90%.


### 5.1.1. Comparison between Single Hidden Layer and Three Hidden Layers

In both networks, the autoencoder is not used, and Relu is adopted as the activation function for the hidden layer. Regression fitting is carried out on the test set to predict the results of coordinate points, as shown in Table1. It can be observed in the table that the prediction effect of multiple hidden layers is obviously better than that of single layer, but the positioning error is still large.Table 1
Comparison of results of single hidden layer and three hidden layers.
Hidden layerSingle hidden layerThree hidden layersMean positioning error (m)0.3360.268The error is less than 0.25 m registration point (%)19.551.8


### 5.1.2. Autoencoder

As can be observed in the data distribution, in order to improve the positioning accuracy, it is necessary to carry out feature extraction and noise reduction processing for the data. Therefore, before the data are input into the profound learning regression network, the autoencoder processing is carried out to extract the high-dimensional features of the data and reduce the impact of noise. Table2 lists the comparison results of autoencoder positioning accuracy in the three hidden deep regression prediction networks using Tanh activation function.Table 2
Comparison of positioning results of autoencoder.
Auto encoderNoYesMean positioning error (m)0.21280.1789The error is less than 0.25 m registration point (%)5776


### 5.1.3. Comparison of Activation Functions of Different Hidden Layers

The selection of the activation function of the hidden layer will also largely complete action on the positioning accuracy. Relu function, which performs well in the classification task, is not so effective as Sigmoid and other functions in the case of uneven data distribution due to its weak ability to control data. Since Tanh is equivalent to the extended form of Sigmoid function, its center is symmetric about the zero point. Tanh tends to achieve better results than Sigmoid. The specific results are presented in Table3.Table 3
Comparison of positioning accuracy of activation functions of different hidden layers.
The activation functionReluSigmoidTanhMean positioning error (m)0.27160.21580.1796The error is less than 0.25 m registration point (%)355676


## 5.1.1. Comparison between Single Hidden Layer and Three Hidden Layers

In both networks, the autoencoder is not used, and Relu is adopted as the activation function for the hidden layer. Regression fitting is carried out on the test set to predict the results of coordinate points, as shown in Table1. It can be observed in the table that the prediction effect of multiple hidden layers is obviously better than that of single layer, but the positioning error is still large.Table 1
Comparison of results of single hidden layer and three hidden layers.
Hidden layerSingle hidden layerThree hidden layersMean positioning error (m)0.3360.268The error is less than 0.25 m registration point (%)19.551.8


## 5.1.2. Autoencoder

As can be observed in the data distribution, in order to improve the positioning accuracy, it is necessary to carry out feature extraction and noise reduction processing for the data. Therefore, before the data are input into the profound learning regression network, the autoencoder processing is carried out to extract the high-dimensional features of the data and reduce the impact of noise. Table2 lists the comparison results of autoencoder positioning accuracy in the three hidden deep regression prediction networks using Tanh activation function.Table 2
Comparison of positioning results of autoencoder.
Auto encoderNoYesMean positioning error (m)0.21280.1789The error is less than 0.25 m registration point (%)5776


## 5.1.3. Comparison of Activation Functions of Different Hidden Layers

The selection of the activation function of the hidden layer will also largely complete action on the positioning accuracy. Relu function, which performs well in the classification task, is not so effective as Sigmoid and other functions in the case of uneven data distribution due to its weak ability to control data. Since Tanh is equivalent to the extended form of Sigmoid function, its center is symmetric about the zero point. Tanh tends to achieve better results than Sigmoid. The specific results are presented in Table3.Table 3
Comparison of positioning accuracy of activation functions of different hidden layers.
The activation functionReluSigmoidTanhMean positioning error (m)0.27160.21580.1796The error is less than 0.25 m registration point (%)355676


## 5.2. Comparisons of Positioning Accuracy with Several Other Algorithms

Under the same experimental conditions, the positioning algorithms in the literature [10, 12–14] are also implemented, which can be used to compare and verify the advantages of the proposed positioning algorithms in constructing the relationship between positioning features and positioning coordinates. The positioning effects of these algorithms are shown in Figure 5.Figure 5
The average positioning error comparison between several positioning algorithms.From Figure5, we can see that the average positioning accuracies of algorithms in literature [13] and [14] and the algorithm based on deep learning are higher than those in literature [10] and [12], which reflects the advantages of deep learning in constructing positioning features and position relations. When the number of acquisitions is 60, the average positioning error of the proposed algorithm is 1.85 m, which is basically smaller than that of other algorithms when the number of samplings is 150. At this time, the average positioning errors of the algorithms in [6, 9, 10] and [8] are 1.87 m, 1.97 m, 1.99 m, and 2.29 m, respectively.Figure6 shows the cumulative probability distribution curve of the average positioning errors of several positioning algorithms when the number of signal sampling is 120. When the average positioning error is less than or equal to 2 m, the cumulative probability of indoor positioning algorithm combined with deep learning is 76.34%. The cumulative probabilities in the literature [13], [14], [10], and [12] are 69.44%, 66.67%, 63.90%, and 54.13%, respectively. When the average positioning error is less than or equal to 3 m, the cumulative probability of each algorithm is 93.67%, 83.11%, 81.37%, 79.57%, and 76.78%, respectively. Therefore, the proposed indoor positioning method can provide smaller errors and stable positioning results.Figure 6
The average positioning error’s cumulative probability distribution of several positioning algorithms.


## 5.3. Comparisons of Calculation Time with Several Other Algorithms

In order to verify the real-time performance of the algorithm, the running time of several indoor location algorithms in references [10, 12–14] is tested. Table 1 shows the running time of these algorithms. From Table 4, we can see that the running time of the proposed algorithm and of algorithms in the literature [13] and [14] is longer than that in the traditional literature [10] and [12] and the algorithm in literature [12] is the shortest. However, the positioning accuracy of literature [12] algorithm is poor, which can be seen from Figures 5 and 6.Table 4
Time consumption of several positioning algorithms (ms).
AlgorithmN = 30N = 60N = 90N = 120N = 150N = 180Proposed algorithm297.476350.721398.991451.081502.766552.004Literature [13]301.350357.109408.329459.231513.221565.171Literature [14]302.701353.281405.421458.341508.217557.124Literature [10]6.213102.334166.210217.662275.329327.371Literature [12]60.001101.219159.296241.002266.737319.534As can be seen from the comparison results of location accuracy and calculation time, the proposed algorithm can achieve the highest location accuracy while maintaining acceptable calculation time. Thus, compared with other algorithms, the proposed algorithm has the best comprehensive performance.


## 6. Conclusion

A wearable device indoor positioning algorithm based on subconscious learning was proposed to achieve continuous predictive positioning with higher accuracy. The stacking automatic coding machine was used to obtain the signal strength characteristics of the points to be measured, which were matched with the signal strength characteristics in the fingerprint database of the position, and the position of the points to be measured was estimated by the nearest neighbor algorithm. Experimental results show that in 93% of cases, the average error of points on the complete path can reach within 3 m. The future research direction is to continue to study the problem of large maximum positioning error and other fusion methods of Wi-Fi and iBeacon to solve the problem of huge amount of computational data. Expand the richer positioning strategy to adapt to more diverse indoor application scenarios, and test and improve the proposed method to a wider range of practical environments.



---

*Source: 8842784-2020-12-08.xml*