CAPTURE: A Mobile Based Indoor Positioning System using Wireless Indoor Positioning System

— The existence of mobile devices as a location pointing device us-ing Global Positioning System (GPS) is a very common thing nowadays. The use of GPS as a tool to determine the location of course has a shortage when used indoors. Therefore, the used of indoor location-based services in a room that leverages the use of Access Point (AP) is very important. By using the information of the Received Signal Strength (RSS) obtained from AP, then the location of the device can be determined without the need to use GPS. This technique is called the location fingerprint technique using the characteristics of received RSS’s fingerprint, then use it to determine the position. To get a more accurate position then authors used the K-Nearest Neighbor (KNN) method. KNN will use some of the data that obtained from some AP to assist in positioning the device. This solution of course would be able to determine the position of the devices in a storied building.


Introduction
The abundance of location-based services that thrive in this era relies heavily on the ability of the use of the Global Positioning System (GPS) [1,2]. GPS offers an excellent ability when used outdoors, but because of limitations in the use of the transmission line-of-sight (LOS), then the use of GPS is less effective when used indoors, especially in the multi-stored building [3]. One technology that can be utilized to recognize indoor locations is by using wireless technology (for example, using WIFI) contained within a building [4,5]. The method of determining location using wireless network can be done more quickly and be more efficient use of power source. It is said to be more efficient because when compared with other methods, the method of using WIFI network uses less information so that the resources to the cost used was not too big when compared to the use of GPS technology [6,7].
There are many ways to determine the position in indoor environment, by utilizing 802.11 b/g Wireless Local Area Network (WLAN) technology, Bluetooth, Radio Frequency Identification (RFID) and the others [8]. In many ways to determine position at indoor environment, the RSS fingerprint method is one of the most popular methods [9]. The fingerprint method utilizes the Received Signal Strength Indicator (RSSI) obtained from Access Point (AP). The obtained RSSI information will be used in determining positions using signal strength. In general, the fingerprint method is divided into two phases, first is the training phase and the mapping phase. The first phase is a training phase, where will be the process of recording RSSI data in each room in a building that is done by the user. Furthermore, the data already obtained in the training phase can be utilized to map the location of a device using the aid of the classification method as in this case, by using K-Nearest Neighbor (KNN) [10]. Furthermore, the steps in an indoor positioning system can be seen in Fig. 1.  Apart from the advantages, location recognition using the fingerprint method of course also has limitations. For example, the limitations of signal strength received by the device heavily depend on the existing environmental model, the used chipset, the antenna on the smartphone and the position of the user's smartphone itself [4,11].
In this paper, to determine the position, the authors combine the method of fingerprint and KNN method for positioning the device. Where, the classification of positions will be made from some RSS data that obtained from some AP that exists around the user's position.

2
Literature Review and Related Works

Earlier Researchers
Yungeun Kim, et al. in a paper entitled "Smartphone-based Wi-Fi tracking system exploiting the RSS peak to overcome the RSS variance problem" [12], Stated that there was little difference in the RSS fingerprint-based system in the training phase and during the mapping phase of the location. This difference leads to significant performance degradation from the user's point of view, device placement, and environmental changes. Therefore, the author tries to integrate the existing system with Pedestrian Dead Reckoning (PDR) method. Once combined with the PDR, the problems that exist in the RSS fingerprint can be slightly reduced by utilizing data from accelerometer sensors and a digital compass. Hyunmin Cho, et al. in a study entitled "RSS-based indoor localization with PDR location tracking for wireless sensor networks" [13], proposed a new algorithm in a location-based system indoors. This algorithm improves the accuracy of the RSS system by combining it with PDR. PDR is used to reduce errors contained in RSS. From the results of tests conducted, showed that the proposed algorithm is very significant in reducing the errors contained in the RSS system. Maissa Ben Jamâa, et al. in a study entitled "EasyLoc: RSS-based localization made easy" [14], proposed a system called EasyLoc. EasyLoc is a system that utilizes RSS systems for indoor location recognition. EasyLoc has two stages: the online calibration stage and the location recognition stage. EasyLoc trims the mapping stage of distance on RSS-based systems, but still lacks when it ensures the correctness of decisions taken.

RSS Fingerprint
RSS fingerprint is a method to determine the position of a device in the room without using GPS. RSS fingerprint only uses the signal strength of an AP received by a mobile device [15]. RSS can be said to be superior to the triangulation system because it does not depend on a signal model, and can analyze the position of the various signals around it, depending on the environment of the device using this method. So of course, it can be said RSS technique has its own freedom in its use [16].

Indoor Positioning System
Indoor Positioning System is a way to recognize the location in a building, especially building that have many levels [17,18]. There are meany methods that can be used for Indoor Localization System (ILS) systems, such as RSS Fingerprint, Time of Arrival (TOA), Time Difference of Arrival (TDOA), Angle of Arrival (AOA) and many more. This method is made by utilizing pre-existing technologies, such as utilizing WIFI, ultra-wideband, RFID, and inertial measurement units (IMU) [19].

K-Nearest Neighbor Algorithm
K-Nearest Neighbor (KNN) is a method of classifying an object by using data that has been studied that has the closest distance to the object [3,20]. Distance obtained from this method is often used as a reference for the distance of two samples of existing objects [21]. This algorithm has a purpose to classify new objects to the attributes from sample training data available [22,23].

Research Method
There are several steps taken in doing this research. The steps in this research can be seen in figure 2 below. This research begins with the authors collecting AP data, and room data that exist in a building that will be used as a place of research (in this case is building 3 Universitas Atma Jaya Yogyakarta) as well as the author performs a training phase on the prototype of the application that has been made. After all the data collected, then the data can be used to proceed to the next stage. The flowchart of research methodology can be seen in Fig. 2. In this study, the authors combine RSS fingerprint method with KNN method to get maximum result in the process of location recognition. In the location recognition stage, the app will detect all the APs that are around the device, the app will detect the Basic Service Set Identifier (BSSID) or mac address of an AP and detect the Received Signal Strength Indicator (RSSI). After that the system will sort the data that has been collected based on the best value of RSSI. The system then will perform calculations by calculating the existing data and then the best results will be compared with the data that has been in the database which will then be used as a reference location of the device.

4
Result and Discussion

RSS Fingerprint Analysis
In this stage, the system will use RSS fingerprint method in capturing signal strength data from AP. This stage is the most important stage because this stage is the stage of training so that the system can recognize the position of the device well at the mapping stage. First, the system will detect all the AP and RSSI contained around the device. As an identifier on each AP, the system will use mac address data from each AP.
For this step, authors will test the system at building 3 University of Atma Jaya Yogyakarta at the 2nd floor. In the AP scan results at this location, the system will display a list of three APs that have the best signal. As shown in Table 1, the data taken are the data from the mac address of an AP and its array of signal strengths from the AP. For the training time of each room, it takes about 1 minute to do the scan time.
After getting the array data from the best three AP, then the system will process the RSSI data and then take the best RSSI value from each AP detected. So, the next data will look like in Table 2.
Then the next step is to enter the room data along with data obtained from the AP detected. So, it will form a relation as shown in Fig. 3, where each room will have three AP.
In some conditions, detected APs may amount to just two or fewer as shown in Fig. 4.    Automatically, data from an undetected AP will be set to 0. This will be used during the second stage, stage to mapping the device position, the 0 value of the third RSSI still will be used in the calculation. When the system has finished detecting and enter all the room data along with AP data, then system can proceed to the mapping phase.

Device Positioning Result Analysis
At this stage, the system will calculate the position of the device based on the data that already entered in the previous stage. At the mapping stage, the device will again scan the APs that are around the device. After the scanning process is complete, the device will re-order the three APs with the best signal strength. As a reference, AP data taken is AP data that has been stored in the database before, so, the system can avoid AP data from mobile hotspots that can interfere with the performance of this system. In the calculation section which assists in the calculation part of the device position, a KNN classification method using the formula of Mean Absolute Error (MAE) as shown in the formula 1.
Notes: n = number of objects xi = the value of RSSI in the database yi = the value of RSSI from scanning result i = number of iterations MAE Formula, if it changes to the form of calculation that required by the system then it will look like in the formula 2.
Notes: x1 = the first RSSI value available in the database y1 = the first scanned RSSI value x2 = the second RSSI value available in the database y2 = the second scanned RSSI value x3 = the third RSSI value available in the database y3 = the third scanned RSSI value Based on the data already obtained from the scan result at the training phase, then the calculation process can already be done. Before proceed to the calculation process, the system needs to scan the AP data around the device that is useful to compare with the AP data that has been stored in the database. The AP data will be changed into positive form first. AP scan results can be seen in Table 3.
After that, the system will get AP data with the same MAC address from the database. AP data taken include AP data with MAC 60: 18: 88: CE: 41: B0,28: 6C: 07: 06: C4: 29, 90: C7: D8: C3: 58: 0B as seen in the Table 4.  After finish retrieving the same MAC address data from the database, the next step is to calculate the position of the device. Before doing the calculations, the RSSI number on each AP data taken will be first converted into positive form. The calculation process can be seen in the formula 3.
Then, the result of the calculation for the first row yields a value of 4.33. Then, the next step is to calculate the second-row data.
After complete the calculation process, the system will compare the two values that have been obtained. Looking at the results of calculations, then the results of the first row yields the smallest number of MAE1 = 4.33. The first line of data then can be referred as the data of the device's location. The next step is to take the room data in accordance with the existing room ID on the first line of data, which is room with id number 3 like shown in the Table 5. There are conditions that cause the number of AP detected amounted to two AP only in building 3 Atma Jaya Yogyakarta. So, there is little modification in the formula. For the case when only two AP are detected, then the third AP automatically sets the value to zero. As seen in the data below, where only two AP is detected by the device, AP with MAC 1E: D0: 5A: 40: F8: E7 and AP with MAC D8: 50: E6: A1: 14: 02. More details, detected AP data can be seen in Table 6. Then, the system will retrieve the same AP data as detected from the database. Data taken from the database can be seen in Table 7. Furthermore, the process of recalculation on the RSSI data that has been obtained from the database. Re-use the Euclidean method with the MAE formula as shown in the formula 5.
The result for the MAE1 on first line calculation is 4. Next is to do the calculation for the second-row data.
The result for second line MAE2 is 4.66. Next is to do the calculation for the third-row data.
The result for MAE3 on third line data is 3.33 because the calculation process is complete, then next step is to compare the result of three calculations that have been done, where the value of MAE3 is the smallest value. Next step is to take the room data corresponding to the third-row data which has the room ID 11 as shown in the Table 8. Based on the results of the calculation simulation and the search process, the following is the interface of the system used. There are three fragments that can be used by users such as interface locate, add room and list. Where, in the locate page there is a locate button that serves to find the position of the device, then add room to add a new room and list interface that serves to display all the rooms data. The interface of the system can be seen in Fig. 5.

Conclusion
The results of the RSS fingerprint method implementation and KNN method show that the mobile-based (CAPTURE) wireless positioning system can recognize the indoors location properly by using the wireless 802.11b/g technology. CAPTURE is proven to provide the location of the device and the room data where the device is in the building Bonaventura University of Atma Jaya Yogyakarta. In future CAPTURE is expected to be integrated with other systems, which have more functionality, so the system can provide more benefits to its users. CAPTURE is also expected to be developed into other platforms thus giving users flexibility in the use of systems on devices that have different operating systems.

Authors
Yohanes Erwin Dari is a Magister Teknik Informatika Student at Universitas Atma Jaya Yogyakarta, Yogyakarta, Indonesia. Majoring in computer system and data communication, Universitas Atma Jaya Yogyakarta. He is a software engineer from Universitas Atma Jaya Yogyakarta. His research interests are mobile application, web programming and user interface design.
Suyoto is Professor in Department of Informatics Engineering at Universitas Atma Jaya Yogyakarta, Indonesia. He has more than seventeen years of teaching experience. He received his PhD in 2000 from the National University of Malaysia, Malaysia. His research interests are multimedia, computer graphics, visualization, mobile application and artificial intelligence.
Pranowo is currently a senior lecturer of Departement Magister Teknik Informatika, Universitas Atma Jaya Yogyakarta, Indonesia. He got PhD degree from department of Electrical Engineering and Information Technology, Gadjah Mada University in 2010. His research interests include numerical simulation and modeling, computer vision and parallel programming based on GPU.