Abstract
In indoor positioning problems, GPS technology used in outdoor positioning needs to be improved due to the characteristic features of wireless signals. There currently needs to be a generally accepted standard method for indoor positioning. In this study, an ecosystem consisting of Beacon devices, Bluetooth intelligent devices, and Wi-Fi access points has been created to propose an effective indoor location determination method by using Wi-Fi and BLE technologies in a hybrid way. First, RSSI (Received Signal Strength Indicator) data were collected using the fingerprint method. Then, Kalman Filter and Savitzky Golay Filter are used in a hybrid manner to reduce the noise on the obtained signal data and make it more stable. In the first part, using the collected data from Wi-Fi and Beacon devices, the Non-linear least squares method (NLLS), including Levenberg-Marquardt (LM), is used for indoor tracking. In the second part, a fingerprinting-based approach is tested. K Nearest Neighbor (KNN) and Support Vector Machine (SVM) algorithms estimate the area where the client is located. Each algorithm’s accuracy rate are calculated on different training and test data and presented.
Introduction
The interest and investment in location-based services are increasing day by day in the world. Many applications used frequently in our daily lives depend on location services and provide specific services aiming to contribute to business processes with collected location information. These location services are provided outdoors via the Global Positioning System (GPS) or base station signals. We all know that GPS signals offer good performance in outdoor localization systems. Still, it is challenging to detect the position of things in an indoor environment due to the weakness of GPS signals [54]. Because inside a building, the signals can be collected in regional, temporary, small, or large areas. In addition, they encounter problems such as deviation, reflection, distortion, noise, out of sight, inability to provide time synchronization, and collision, which may affect signal communication accuracy [49]. Therefore, the studies on indoor positioning systems are increasing daily, and the research for low-cost solutions continues.
Location detection and tracking are essential in the design of smart homes. By tracking the location in a house, a person’s and object’s mobility can be monitored. Thus, the disabled, elderly, children, and pets in a smart home can be easily observed and monitored [35]. In addition, lost objects would be found, and objects whose location has been determined would be available to other things. The development of indoor positioning systems based on single wireless technology in the first studies. These solutions are based on wireless technologies such as WiFi, Bluetooth, Radio Frequency Identification (RFID) [56]. However, each technology has certain limitations for supporting an indoor positioning or tracking system. These limitations have made the interoperability of some wireless technologies even more prominent in indoor positioning. A hybrid system can take advantage of the strengths of each technology individually to achieve better positioning performance. Many studies have been carried out to observe the hybrid usability of technologies in indoor tracking.
It is vital to propose a system based on technologies that may already be located within a building in indoor tracking systems. Including devices not located in a building or that will cause high costs to be used in a proposed system will reduce the usability of the relevant system. For this reason, in this study, the use of WiFi access points found in almost every home is selected as the primary technology. The number of access points is limited to “1” based on generally 1 access point in each house. However, in blind spots where WiFi signals cannot reach, beacon devices that emit BLE signals were used. Beacon devices are preferred because they can be easily placed anywhere and do not continuously emit signals. In addition, it has been tried to reduce the cost consumption by using beacon signals that do not emit signals continuously at specific periods.
Many different methods are used for indoor tracking in wireless technology-based location determination. The most crucial factor to be considered in the design of an indoor tracking approach is detecting mobility. Devices used in a network can be fixed and mobile, as well as active fixed, passive fixed, active mobile, and passive mobile [48]. Deterministic or probabilistic positioning methods can be used for location determination in indoor networks [11]. Compared to deterministic methods, probabilistic methods perform more accurate location detection and demand more information. However, due to their high computational density, they are useless for small-capacity devices like sensors [49]. Since the devices found in smart homes are generally designed for personal use without high processing power, the use of deterministic methods will be more effective for mobility detection. Deterministic methods consist of Trilateration, Lateration, Triangulation, Angulation, Scene Analysis, Dead Reckoning, and Proximity algorithms [49]. Deterministic methods can estimate location faster by using classical measurement techniques. Therefore, a fast-running process is fundamental to providing a functional indoor positioning system. The fingerprint method, one of the deterministic methods frequently used in the literature, is based on the extraction of the building’s signal map. The location is usually determined using machine learning techniques on the extracted signal map. Therefore, signal comparison can be performed using basic computational methods in fingerprint technique. However, indoor positioning performed using basic computational techniques may provide low accuracy due to the effects on the signals.
For this reason, location detection is usually performed using machine learning and deep learning techniques in the fingerprinting method. Furthermore, some machine learning models are used on collected data to predict better the location of users, items, or connections [22]. But machine learning methods require a considerable amount of labeled data for the training phase [23]. In the literature, it is observed that generally, more than 1000 data should be used for training machine learning and deep learning algorithms.
The main motivation behind this study is to propose an indoor localization approach for small areas in smart homes that do not require large amounts of data.
This study contains two different approaches and consists of two distinct parts.
In the first part, a Lateration-based indoor tracking method is proposed, and people in a smart home are localized using different scenarios. First, the data are filtered using Kalman and Savitzky Golay Filters to remove the effects on the signals and obtain the original signal values in the first approach. Then, the mobile user’s location is estimated using Non-Linear Least Squares Method (NLLS), which includes Levenberd Marquardt algorithm.
In the second part, a signal map was constructed using the fingerprinting method to test the proposed filters’ effectiveness. K-Nearest Neighbor and Support Vector Machine, machine learning methods were used with a limited number of data for indoor localization [4]. The collected data was kept as small as possible, based on the relatively low level of mobility in a house, unlike in areas such as factories, hospitals, schools etc. The environment consists of a hallway and a room and contains 6 Beacon devices and 1 WiFi access point. The devices are fixed at specific points accordingly. To collect RSSI data, related homes are divided into specific areas and equal grid areas with two different scenarios. This study aims to achieve high performance with fewer data in a smart home design. The proposed method’s fundamental elements consist of a WiFi access point, BLE devices, and a mobile phone for collecting data. A mobile application has been developed on the Android platform. The RSSI signal data of WiFi and BLE devices are managed by using this application. In an ideal environment, the RSSI value only depends on the distance between the two devices. However, environmental factors significantly affect RSSI values and have high noise levels as a result [45]. Therefore, RSSI data have been filtered by using Kalman filter and Savtzkiy-Golay filter to reduce the noise [45]. Collected data are stored on a database MongoDB Realm. It aims to calculate the client’s estimated position to draw the followed path and finally compare these with the real position and real path. Non-Linear Least Squares Method (NLLS), including Levenberg-Marquardt (LM) algorithm, is used for estimating points and regions followed by the client in the test environment. Also, it is drawn the paths followed by the estimated and actual points and makes a comparison between them.
The main contributions of this work are presented as follows:
We utilize an effective filtering phase using Kalman and Savitzky–Golay filters to reduce the noise effect on AP Wi-Fi signals and to obtain more meaningful representations of the AP Wi-Fi signals. Kalman filter and Savitzky–Golay filter are used as a single and hybrid manner to compare their efficiency.
For the indoor localization problem, we propose a hybrid approach to combine Wi-Fi and BLE technologies and two different approaches. In the first approach, Lateration technique is utilized. Location estimation is realized by using Non-Linear Least Squares Method (NLLS), including Levenberg-Marquardt (LM), and the efficiency of the related approach is compared with the fingerprinting technique by using machine learning algorithms.
Thus, it enables us to reveal the differences and localization capability on filtered signals between NLLS, including LM and machine learning algorithms KNN and SVM which is not available in the literature.
W, S, and random routes are created for scenarios to encounter different effects on signals that can take place on various routes for indoor tracking.
A novel dataset is constructed for fingerprinting based second approach. Using a limited amount of data, the location of mobile users is estimated. Hence the efficiency of the Kalman and Savitzky–Golay filter and hybrid data usage is presented.
In this paper, a comprehensive literature review is presented in Section 2. Section 3 introduces the methodology of the work. The results are discussed in Section 4. The paper concludes with a general discussion of results and possible future work.
Related works
In the literature, there are many studies carried out from different perspectives for indoor positioning. Ambient assisted living studies [6,16,31,36], multi-user detection [38], localization of mobile robots [33], predicting the activity [29] are some of these perspectives. However, in our study we have focused on designing an indoor localization system for smart homes. Hence in this part, an overview of the literature related to the present work is provided on indoor localization in smart homes. Ivanov Rosen [20] conducted a study for smart buildings based on BLE beacons. In his study he presents different scenarios for measuring the efficiency of non-adaptive Kalman filter in pre-process step and trilateration-based approach using Non-Linear Least Squares. As a difference, we used hybrid technologies, hybrid filtering in pre-processing step and presenting the comparison of lateration based and fingerprinting based approaches. The related publications on smart homes are both briefly mentioned and given in Table 1.
Ahvar et al. [2] conducted a survey study that covers user location discovery (ULD) techniques by considering the technical characteristics and user contentedness. The advantages and disadvantages of the methods are mentioned using ten different evaluation metrics. Mocrii et al. [30] provided a detailed literature survey related to internet of things (IoT) based smart home technologies including system architectures, security applications, communications and related softwares.
Publication details and a comparison of related works
Publication details and a comparison of related works
(Continued)
Bergeron et al. [7] developed a novel indoor positioning system to be utilized in a smart home for tracking the objects using passive RFID technology. In the study, a classification approach is adopted in the positioning problem and random forest algorithm is utilized. For static case, an accuracy of 97% is obtained without using a filter and for dynamic case (considering human interference) an accuracy of 75% is obtained utilizing pre and post filters. Gholizadeh-Tayyar et al. [15] proposed a novel technique for target tracking (i.e. elder or disabled inhabitant) in smart homes. Their approach provides an optimization of number and placement of the sensors to be utilized in the smart home environment. A novel integer linear programming (ILP) algorithm is developed to perform the target tracking process. A real dataset is created using an approximately 70 m2 lab and a randomly generated data is utilized for testing. A 98% of network reliability is provided. Thakur and Han [46] conducted an indoor localization study by using activity logging in smart home environment. A smart home dataset including various human activites (such as going to bed, preparing breakfast and dinner, taking shower etc.) in an IoT environment is utilized. Random forest algorithm is applied to perform the indoor localization process and 83.02% of precision is obtained. Roy et al. [40] investigated the location and activities of the inhabitants in a smart environment by minimizing their uncertainties in order to lower the energy consumption. In this context, a predictive framework is developed. In the study, obtaining the location and path predictions of the inhabitants with high accuracy (over 80%) leads to a cost-effective energy consumption. Xiong et al. [53] developed a smart home control system by predicting attitude and location of inhabitants based on image pattern recognition and fingerprint matching combination. Li et al. [27] conducted a study to realize a novel secure WiFi fingerprint-based localization system in indoor environments using homomorphic encryption. Since the privacy of the personal data is an important issue in indoor smart systems, the contribution of the study is high. An improved indoor tracking system is introduced by Jain et al. [21] using active RFID technology based on a colony based localized method. Backtracking algorithm is implemented to realize the localization process. In the study, the prediction error is lowered by over 50% when it is compared to the literature. Kim et al. [25] examined the applicability of low-cost long range (LoRa) radio technology for the indoor localization in smart home environment. According to their experimental studies, a high precision localization is obtained by means of an lower than 25 cm. Fahim et al. [12] constructed a new Android application for smartphones in order to provide an assistance for elder people in a smart home environment. The application assists the inhabitants in terms of reminding the critical daily issues by tracking the daily life activities of them. Wang et al. [50] proposed a differential privacy-based indoor localization technique (DP3) in order to maintain the privacy during the localization process. Their approach is based on WiFi fingerprint-based localization. Experimental results show that applying DP3 algorithm slightly increases the localization error while it contributes to the preservation of privacy. Thakur and Han [47] carried out a comprehensive study on indoor localization problem. The study consists of three parts: activity-based indoor localization and zone-based localization using Bluetooth Low Energy (BLE) technology, and lastly, a comparative study for indoor localization problem considering different machine learning approaches. Accuracies of 81.36% for activity-based approach and 81.13% for zone-based approach are obtained. Nath et al. [32]developed a voice based indoor localization system for smart home environments using Raspberry Pi and Arduino platforms and ultrasonic sensors. Alhamoud et al. [3] studied on occupancy detection, identification and localization of inhabitants in a smart home environment using smartphones via Bluetooth technology. In the study, four different algorithms are utilized namely, multilayer perceptron, support vector machine, K-means clustering and peak RSSI algorithm and results are compared. According to the results, almost 100% accuracy is obtained. Bergeron et al. [8] presented a new indoor positioning system that utilizes passive RFID technology in order to track simple objects in a smart home environment. In the localization process, decision tree approach is implemented and an average accuracy of 80% is obtained. Wang et al. [51] proposed a novel algorithm which tracks different inhabitants (for multi-resident apartments) and predicts the number of inhabitants simultaneously.
In the literature, there are different studies that have not been carried out directly on smart homes but suggest an indoor localization approach.
The methodology of the study is presented in two main parts: Fingerprint-based positioning approach by using machine learning techniques and lateration based indoor tracking by using non-linear least squares method and Levenberd Marquardt algorithm.
Fingerprinting based approach
Fingerprint method, which is among the scene analysis methods, is one of the most frequently used for indoor location determination. Basically, location determination is the process of extracting the signal maps of the desired area and determining the location by considering this signal map. The fingerprint method consists of two stages: the offline stage, where the signal map of the relevant area is extracted, and the online stage, where the location detection process is performed by taking the information of the mobile user. Fingerprinting method is presented in Fig. 1.

Representation of fingerprint-based localization.
Offline Phase: Also called as training phase or calibration phase. At this stage, the extraction of the signal maps of the area where the location is desired to be determined takes place. Signals to be used in the map to be created can be any signal that exists in the environment such as WiFi, ultrasound, sensor, infrared (IrDA) and can help determine location. indoor space in the collection of signals. Different techniques are used according to their structural features. The generally accepted basic method is to divide the area to be positioned into certain intervals called grids and to collect the values of the signal intensities from these intervals and save them in the database containing the signal maps. The size of the grid areas varies according to the level of sensitivity to be achieved and the structural features of the building. While the signal can be collected from the midpoints of the relevant areas, there are also studies in which the average of the signal intensity values taken from the edge points and midpoints is used or data collection is carried out by wandering randomly within the grid area. The data collected from the grid areas and included in the database are passed through a classification algorithm selected in accordance with the problem in the offline phase. K nearest neighbor, neural networks, Markov chains, decision trees etc. Many techniques have been used for this purpose. As a result of the operation of the classification algorithms, the characteristics of the signal values in each grid area are learned and a unique comparison map of the area to be determined is formed.
Online Stage: This stage is also called the positioning stage. The signal values of a mobile user navigating in the building are instantly compared with the signal map on the server, which was learned by the classification algorithm in the offline phase. From target mobile user. It represents the location of the class target, where the instantaneously received signal information matches the signal map in the database.
In this study, fingerprint-based approach is tested by using two different machine learning approaches: KNN (K-Nearest Neighbor) and SVM (Support Vector Machines). While KNN method classifies samples according to their similarity, SVM method is based on statistical measurements. Related methods are among the basic approaches in machine learning. Detailed explanations of the corresponding approaches are provided as follows.
The K-Nearest Neighbor (K-Nearest Neighbor-KNN) algorithm is a supervised learning method, also known as distance-based classifier, which classifies samples according to their similarity, proposed by T.M. Cover and P.E. Hart in 1967. KNN algorithm, its classes use data from a given sample set. The distance of the new data, which will be added to the sample data set, is calculated according to the existing data, and its k number of close neighbors are examined. The KNN algorithm needs a distance measurement function to perform the classification process. Although there are many distance measurement functions that can be used specifically for the problem, the basic functions are Euclidean, Minkowski and Manhattan functions. Related functions to show D distance are seen in Equation (1), Equation (2) and Equation (3), respectively [13].
The KNN algorithm has two phases: training and testing. The KNN algorithm obviously does not require any training steps to classify the data. The training phase usually involves storing the data vector coordinates along with the class label. The class label is generally used as an identifier for the data vector. This is used to classify data vectors in the testing phase. Given data points for testing, the purpose of the KNN algorithm is to find the class label for the new point.
The KNN algorithm has two phases: training and testing. The KNN algorithm obviously does not require any training steps to classify the data. The training phase usually involves storing the data vector coordinates along with the class label. The class label is generally used as an identifier for the data vector. This is used to classify data vectors in the testing phase. Given data points for testing, the purpose of the KNN algorithm is to find the class label for the new point.
Support Vector Machines (SVM) is a machine learning method based on strong statistical theories, first proposed by Vladimir Vapnik in 1995 for classification and regression type problem solving. In traditional machine learning methods, problems such as the requirement of a large number of training data, low convergence rate, and local minima are encountered. SVM is also very successful in high-dimensional applications with little data [17].
SVM has the potential to deliver high performance in feature areas with a large number of attributes. This is because in the training phase of SVM, the classified vector size exceeds that of the traditional classifier and is efficient in large classification problems. This situation also provides benefits in error classification. In addition, there are studies showing that an SVM-based classifier has better generalization properties compared to traditional classifiers. While SVM minimizes the risk of structural misclassification in classifier training, traditional classifiers are usually trained to minimize experimental risk [52]. Although the SVM technique was developed as a binary classifier, it is also used in multi-class separation. In the decomposition of multiple classes with SVM; c: c binary SVM models are created to represent the training data defined in the format (
Considering loose variables
Indoor tracking using lateration
Lateration based approaches computes the distance from fixed nodes with known positions to a mobile node using a radio propagation model [44]. In this study the client’s point and regional locations are predicted using the Nonlinear Least Squares Method and Levenberg–Marquardt algorithm after the data collected from Wi-Fi and Beacon devices pass through the Kalman filter. Figure 2 shows the flow diagram of the process step. In this study for Kalman filter used in pre-process step. For increasing the accuracy rate of localization Kalman filter combined with Savitzky–Golay filter and used in a hybrid manner. In the hybrid strategy signals are passed through the results obtained by using the Kalman filter in the pre-process stage are compared with the results obtained by using hybrid filters.

Representation of the flow diagram of indoor tracking process.
Savitzky and Golay filter is a method of data smoothing based approach on local polynomial least-squares fitting. A polynomial is fitted to a series of input samples and the resulting polynomial is evaluated at a single point in them. The approximation interval corresponds to discrete convolution with a fixed impulse response [42]. However, Kalman filter provides the prediction of the next state by considering the current state and measurements. In this study, the efficiency of the pre-processing step has been increased by using a hybrid filter with two different approaches.
The Kalman filter, first proposed by Rudolf Kalman in 1960 for use on linear systems, is a filter designed for single peak distributions that can predict a state in any time period [14,24]. control systems,
It is frequently used in many areas such as direction tracking and estimation. In the examination of a given dynamic linear system, it provides the prediction of the next state by considering the current state and measurements [43]. The Kalman filter can be used not only for estimation, but also for correction or filtering according to the size of the obtained observation values [10]. Filtering operations performed by using all of the observation values.
It is accepted that the estimation feature of the Kalman Filter is used in cases where some of the observation values are used, while correction is used in cases where more than one result is tried to be obtained from the observations. In order to model a system using the Kalman Filter, first of all, a state-space model containing the state equation and measurement equations of the system should be created. In cases where the initial value of the state vector is not known exactly; the corresponding value is guessed by the user.
The Kalman filter consists of two steps: prediction and correction (measurement update). Accordingly, the estimation phase consists of 2 steps, represented by Equation (6) and Equation (7)
The correction (measurement update) phase consists of 3 total steps, represented by Equation (8), Equation (9) and Equation (10), respectively.
Savitzky–Golay filter
Savitzky–Golay Filter (SGF) is presented in 1964 by Abraham Savitzky and Marcel J.E. Golay [37]. filtering techniques are used on average tend to flatten and expand peaks in the data spectrum. It has been developed to reduce the noise in the data and to ensure that the characteristics of the distribution such as relative maximum or minimum. In digital filtering, the following formula is used in order to smooth the average of the data
Non-linear least squares method
The Nonlinear Least Squares method is an optimization technique that can be used to solve a nonlinear problem in which the number of observations is greater than the number of unknown parameters [41]. When there are three or more reference points, this method can be used to solve the position of the receiver as given in Equation (12).
Here, the receiving point is the client, and the reference point is the Bluetooth device. In this equation, using
Non-linear least squares determine a location by calculating different sets of coordinates using available information and then summing the squared error between that point to the reference points [41]. The positioning error formula is given in Equation (13). Where i is the current reference point, (
Levenberd Marquardt algorithm
Levenberg-Marquardt (LM) algorithm, developed by Kenneth Levenberg and Donald Marquardt, is an optimization algorithm that provides a numerical solution to the problem of minimizing a nonlinear function [55]. The Levenberg-Marquardt algorithm is one of the most widely used optimization algorithms. The problem that the Levenberg Marquardt algorithm provides a solution is called Nonlinear Least Squares Minimization. Levenberg-Marquardt algorithm, derived from Newtonian algorithms, performs parameter updating operations with the error vector created for all inputs and the Jacobian matrix. This algorithm uses system resources such as memory more than other algorithms. Despite this, the training of the network takes place in a much shorter time. Education ends when generalization stops healing [18,28]. LM algorithm update is given in Equation (14).
The w, weight vector, I, the identity matrix, and μ specified in Equation (3) are the combination coefficient. J denotes the Jacobian matrix of size
Test environment
When designing a positioning system, it is important to deploy the access points in locations that affect the positioning accuracy. The placement decision has a direct impact on the performance of the system. It is so important to consider BLE beacon placement in a hybrid system due to restrictions in our case to indoor spaces where Wi-Fi infrastructure is already in place [34]. The wall thickness and the curved structure of the area that painted in gray color were ignored in the measurement. The measurements were collected in the home environment. This environment consists of a hall that measured 2.592 m2 and a room that measured 11.48 m2. However, since the aim of the study is to determine the location in small areas, the existing area is divided into different sub-zones in two different scenarios. Thus, the location was determined by creating 10 and 25 different zones in the study.

RSSI – distance graph obtained from Wi-Fi point.
The graph reflecting the RSSI and distance relationship of the Wi-Fi access point is given in Fig. 3. It has been observed that as the distance to the WiFi point increases, the signal strength decreases, and when the distance of approximately 1.5 meters is exceeded, a lower quality RSSI value is measured.
The graph reflecting the RSSI and distance relationship obtained from beacon devices is given in Fig. 4. It has been observed that as the distance to the beacon point increases, the obtained signal strength decreases and a lower quality RSSI value is measured.

RSSI – distance graph obtained from beacon devices.
We placed a Wi-Fi access point and 4 Beacon devices in the room, and 2 Beacon devices in the entrance hall. The information of the devices and their locations are shown in Table 2.
The list of devices in the environment
In Fig. 5, the plan of the environment is given.

The environment.
We have created 2 scenario in the home environment. We have divided the environment into 10 areas for the scenario 1. These areas where the fingerprints is to be created is divided into 2 equal grid areas for the hall, each piece is determined as 1.344 m2, and for the room it is divided into 8 equal grid areas, and each part is determined as 1.435 m2. In Fig. 6, the first scenario of the plan of the environment is given.

Scenario 1 of the environment.
We have divided the environment into 25 areas for the scenario 2. These areas where the fingerprints is to be created is divided into 9 equal grid areas for the hall, each piece is determined as 0.288 m2, and for the room it is divided into 16 equal grid areas, and each part is determined as 0.7175 m2. In Fig. 7, the second scenario of the plan of the environment is given.

Scenario 2 of the environment.
This paper contains 6 study that implemented in the test environment. The first 3 study are implemented with Kalman filter. The last 3 study are implemented with both Kalman filter and SGF filter. For testing proposed Lateration based approach S, W and two different random movement routes are used. S and W movements are selected to encounter different effects on signals that can take place on different routes for indoor tracking. The S and W routes are chosen in order to be more easily followed by the human eye and to increase legibility.
In Fig. 8, the paths followed by the client in 10-region with both estimated and real points are shown.
In Fig. 9, the paths followed by the client in 25- region with both estimated and real points are shown. The path indicated in red represents the predicted path followed by the client with predictive points, the path in blue represents the actual path followed by the client with real points.
The comparison table of the real and estimated points for the S trajectory
The comparison table of the real and estimated points for the S trajectory

The estimated and real trajectory followed by the client on the scenario 1.

The estimated and real trajectory followed by the client on the scenario 2.
The comparison of real and estimated areas is given in Table 4. The accuracy rate calculated on the S trajectory are 84.61% with the correct 11 of 13 area in scenario 1 and 76.92% with the correct 10 of 13 area in scenario 2.
The comparison chart of areas for the S trajectory
The comparison chart of real and estimated points for the W trajectory
In Fig. 10, the paths followed by the client in scenario 1 with both estimated and real points are shown.
In Fig. 11, the paths followed by the client in scenario 2 with both estimated and real points are presented.
The comparison of real and estimated areas is given in Table 6. The accuracy rate calculated on the W trajectory are 81.81% with the correct 9 of 11 area in scenario 1 and 72.72 % with the correct 8 of 11 area in scenario 2.
In Fig. 12, the paths followed by the client in scenario 1 with both estimated and real points are shown.
In Fig. 13, the paths followed by the client in scenario 2 with both estimated and real points are shown.
The comparison of real and estimated areas is given in Table 8. The accuracy rate calculated on the random trajectory are 84.61% with the correct 11 of 13 area in scenario 1 and 76.92 % with the correct 10 of 13 area in scenario 2.

The estimated and real trajectory followed by the client on the scenario 1.

The estimated and real trajectory followed by the client on the scenario 2.
The comparison chart of areas for the W trajectory
In Fig. 14, the paths followed by the client in the scenario 1 with both estimated and real points are shown.
The comparison chart of real and estimated points for the random trajectory

The estimated and real trajectory followed by the client on the scenario 1.

The estimated and real trajectory followed by the client on the scenario 2.
In Fig. 15, the paths followed by the client in the scenario 2 with both estimated and real points are shown. The path indicated in red represents the predicted path followed by the client with predictive points, the path in blue represents the actual path followed by the client with real points.
The comparison of real and estimated areas is given in Table 10. The accuracy rate calculated on the S trajectory are 92.30% with the correct 12 of 13 area in scenario 1 and 84.61 % with the correct 11 of 13 area in scenario 2.
The comparison chart of areas for the random trajectory
In Fig. 16, the paths followed by the client in scenario 1 with both estimated and real points are shown.
In Fig. 17, the paths followed by the client in scenario 2 with both estimated and real points are shown.
The comparison of real and estimated areas is given in Table 12. The accuracy rate calculated on the W trajectory are 81.81% with the correct 9 of 11 area in scenario 1 and 72.72 % with the correct 8 of 11 area in scenario 2.
The comparison chart of real and estimated points for S trajectory

The estimated and real trajectory followed by the client on the scenario 1.

The estimated and real trajectory followed by the client on the scenario 2.
In Fig. 18, the paths followed by the client in scenario 1 with both estimated and real points are shown.
In Fig. 19, the paths followed by the client in scenario 2 with both estimated and real points are shown.
The comparison of real and estimated areas is given in Table 14. The accuracy rate calculated on the random trajectory are 80% with the correct 16 of 20 area in scenario 1 and 65 % with the correct 13 of 20 area in scenario 2.
Mean Absolute Error (MAE), Root Mean Squared Absolute Error (RMSAE), Mean Absolute Percentage Error (MAPE) metrics are calculated and presented for all studies in Table 15. According to Table 15, the highest mean absolute error are observed for the cases Study III and Study VI. Lowest error values are obtained in Study IV.
The comparison chart of areas for S trajectory
The comparison chart of areas for the W trajectory

The estimated and real trajectory followed by the client on the scenario 1.

The estimated and real trajectory followed by the client on the scenario 2.
The comparison chart of areas for the W trajectory
The comparison chart of real and estimated points for the random trajectory

The estimated and real trajectory followed by the client on the scenario 1.

The estimated and real trajectory followed by the client on the scenario 2.
The comparison chart of areas for the random trajectory
Statistical metrics for studies
The summary results including the average error and accuracy rates calculated in this section are given in Table 16.
Summary table of the scenarios
Unlike the outdoor space, the indoor places can have a different sense of semantic position and orbit. Indoor positions tend to have smaller coverage and finer information, such as the room or corridor, as opposed to outdoor settings such as restaurants or offices [39]. The reason for this can be explained by the fact that the signal is more likely to deteriorate or be in more noise in areas located indoors. This possibility can also affect the estimation of the client’s location at the indoor location and the accuracy in the estimation.
Locating using different technologies for indoor positioning is a frequently studied issue. Ali et al. [5] using Long Range (LoRa) technology, and the deep learning method proposed as a solution to the use of fingerprints collected in indoor positioning was used. An average accuracy rate of 85% was achieved in 4 test scenarios. In this study, the fact that the accuracy rate is higher than the accuracy rates in the thesis study indicates that LoRa technology is more stable than WiFi and BLE and is more resistant to environmental changes [19] and consequently, the obtained signals are less degraded and distorted. It can be explained by its little influence.
On the other hand, there are also studies carried out under the headings of orbit privacy protection approach for indoor fingerprint positioning systems. In these studies, false orbits are created in order to protect the confidentiality of the real orbit and the similarities of these orbits with real orbits are compared. Konstantinidis et al. [26] was achieved 87% accuracy by using WiFi signal maps and Temporal Vector Map (TVM), Li et al. [27] was achieved 80%∼85% accuracy by using the WiFi fingerprint method, and Abdelbar et al. [1] has an improvement of up to 49% with variable positioning system error variance.
In fingerprint-based approach, the RSSI data collected from Beacon devices and WiFi point are used to predict the area (door or room) where the client is located by using KNN and SVM algorithms in machine learning. The accuracy scores were calculated separately for different training/test ratios for each algorithm.
Scenario I: The accuracy rates of the data collected from the WiFi point and Beacon devices were calculated separately in the Euclidean, Manhattan, Minkowski distance measurement functions used in the KNN algorithm. The highest accuracy was obtained in the Manhattan measurement function. The accuracy scores are given in Table 17.
The accuracy obtained with the KNN algorithm for WiFi and Beacon
In the data collected from WiFi point, Beacon devices and smart devices, the highest accuracy rate was obtained in the Manhattan measurement function again. The accuracy scores are given in Table 18. We saw that there is an improvement in the accuracy with the addition of smart devices to the environment.
The accuracy obtained with KNN algorithm for WiFi and Beacon and BSD
Scenario II: The accuracy rates of the data collected from the WiFi point and Beacon devices were calculated separately for multiple different functions used in the SVM algorithm. The highest accuracy rate was obtained in the linear function. The accuracy scores are given in Table 19.
The accuracy obtained with the SVM algorithm for WiFi and Beacon
In the data collected from WiFi point, Beacon devices and smart devices, the highest accuracy rate was obtained in the linear function again. The accuracy scores are given in Table 20. We saw that there is an improvement in the accuracy rate with the addition of smart devices to the environment.
The accuracy obtained with SVM algorithm for WiFi and Beacon and BSD
In the studies carried out in the Lateration-based indoor tracking study in the first chapter, various tests were carried out with the pre-processing step recommended in the fingerprint method using less than 1000 data. The highest accuracy was 90.32%, while the lowest was 87.45%. Different studies were carried out in the fingerprint-based approach in the second part. The lowest mean absolute error of 0.22 was obtained in studies reflecting different scenarios, while the highest mean absolute error of 0.35 was achieved. A combination of Kalman filter and Saviztky-Golay filters were analyzed using random, w, and s routes. Accordingly, it has been observed that using a hybrid filter provides higher accuracy than the single use of the Kalman filter. While the KF+SGF approach increased the accuracy rate from 83.67% to 89.09% on average, compared to the scenario with 10 grids, It increased the accuracy rate from 75.52% to 81.18% in the scenario with 25 grids.
In order to create an indoor positioning environment, the anteroom and room in a home environment were used and divided to 10 and 25 sub-zones in this work. There are 6 Beacon devices, 1 Wi-Fi access point and 4 smart devices in this environment. The environment is based on a coordinate system and accordingly smart devices, Beacon devices and Wi-Fi access point are fixed at certain points. RSSI fingerprint data from these devices was collected via a mobile application coded in the Android operating system and stored in the MongoDB Realm database. In pre-process step to reduce the noise on the obtained data, Kalman filter and Savitzky–Golay filters are used by adapting it to the indoor positioning problem.
These data were used on 2 different methods and analyzed in 2 separate sections. In the first part, the results obtained using Nonlinear Least Squares Method and Levenberg–Marquardt algorithm are intended to extract the estimated location, path and zones of the client in the test environment. The areas created to collect RSSI data were determined and divided into grid areas within these areas. In this method, which was studied on two different scenarios, first the test environment was divided into 10 zones, 2 in the hall and eight in the room. Each grid piece in the hall was determined as 1,344 m2, and in the room, each grid piece was determined as 1,435 m2. In this scenario, the average accuracy rate was calculated as 82.75%. In the second scenario, the test environment is divided into a total of 25 zones, as anteroom 9 and room 16. Each grid piece in the hall was determined as 0.288 m2, and in the room, each grid piece was determined as 0.7175 m2. Although it was divided into 2.5 times larger area compared to the first scenario, the average accuracy rate decreased by 9.86% and the average accuracy rate was calculated as 72.89%. In this method, the mean error was calculated as 0.3054 m, regardless of the scenario.
In the second part, the results of the calculations obtained with the machine learning method and the KNN and SVM algorithms are included. When the results obtained were examined, it was seen that the highest accuracy rate of both algorithms was reached when 90% of it was classified as training, and the best accuracy rate was reached in the KNN algorithm. In addition, it has been observed that there is an improvement in the accuracy rates of both algorithms with the participation of BSD in the test environment. This improvement indicates that BSD can play an auxiliary role in indoor positioning.
The accuracy rate obtained in the indoor tracking part of this study is between 75%–89% on average, and the accuracy values obtained in the fingerprint-based approach are in the range of 87%–90% on average. The obtained accuracy rates were found to be very close and consistent with the accuracy rates of other studies compared.
As a future work, both approaches (indoor tracking and fingerprint-based) can be combined, and a hybrid approach can be developed. A fingerprinting-based method can be combined with lateration technique would provide to develop a system localizing people with high sensitivity and low time requirement. Also as a future work, efficiency of different hybrid filters can be used in pre-process phase and their results can be presented.
Conflict of interest
None to report.
