 Kurdistan Journal of Applied Research (KJAR) Print-ISSN: 2411-7684 | Electronic-ISSN: 2411-7706 Website: Kjar.spu.edu.iq | Email: kjar@spu.edu.iq Hybrid Onboard Smartphone Sensors Measurements to Improve Heading Estimation for Indoors Positioning Solutions Haval D. Abdalkarim Halgurd S. Maghdid Network Department Department of Software Engineering Computer Science Institute Faculty of Engineering Sulaimani Polytechnique University Koya University Sulaimani, Iraq Koya, Erbil., Iraq haval.darwesh@spu.edu.iq halgurd.maghdid@koyauniversity.org Volume 4 – Issue 2 – December 2019 DOI: 10.24017/science.2019 .2.5 Received: 20 September 2019 Accepted: 15 October 2019 Abstract In the last decade, there is a significant progression and huge demand in using technology; specifically, those technologies are embedded in smartphones (SP). Examples of these technologies are embedding various sensors for multi-purposes. Positioning sensors (Accelerometer, Gyroscope, and Magnetometer) are one of the significant technologies. Besides this, indoor positioning services on smartphones are the main advantage of these sensors. There are many indoor positioning applications, for instance; billing, shopping, security and safety, indoor navigation, entertainment applications, and other point-of-interest (POI) applications. Nevertheless, precise position information through current positioning techniques is the main issue of these applications. The pedestrian dead reckoning (PDR) technique is one of the techniques in which the integration of onboard sensors is used for locating smartphones. Estimated distance, heading, and typical speed can be measured to determine the estimated position of the smartphone via using the PDR technique. The PDR technique offers a low positioning accuracy due to existing accumulated errors of the embedded sensors. To solve this issue, this article proposes a hybrid multi-sensors measurement to reduce the existing sensors drifts and errors and to increase estimated heading accuracy of the smartphone. Further, the sensors’ measurements with the previously estimated position are fused by using KALMAN Filter to determine the current location of the smartphone in each step of walking with better angular displacement accuracy. Proposed algorithm depends on increasing estimated angular displacement of the smartphone using combination of the integrated sensors’ measurements. Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 51 The achieved positioning accuracy through the proposed approach and based on trial experiments is around 2 meters, which is equivalent to 10% improvement in comparison with state of the art. Keywords: localization; sensors; heading estimation; fusing multi-sensor. 1. INTRODUCTION The developing and progressing of onboard smartphone sensors and wireless devices have made researchers in academia and big technology companies such as Google to enable various services, specifically in the 21st century [1]. Among all these services, the location-based- service (LBS) is one of the attracted services. Several LBS applications are produced for better facility and serving. Generally, the position of a device, when outdoors, could be defined via using the Global Navigation Satellite System (GNSS). Still, for indoor environments, such service by using GNSS cannot provide accurate positioning due to the weakness or blocking of the GNSS signals. Thus, tracking indoor mobile-devices become a significant issue. Equally, there are different services which they are based on the ability to track indoor people. Examples of such kind of services are patient tracking in hospitals, the guidance of people in airports, shopping in malls, and localizing elderly people. In this manner, the conducted researches predict indoor location service market value to go as high as 10 billion USD in 2020 [1]. To this end, various technologies on smartphones are used to enable such services. Wi-Fi [2], Bluetooth [3], Near-Field Communication (NFC) [4], Ultra-Wideband (UWB), and inertial sensor [5] are the examples of the utilized onboard technologies. However, each of these technologies has its limitations. For example, Wi-Fi offers poor positioning accuracy. The Bluetooth, NFC, and UWB provide limited coverage signals and need massive cost due to the necessity of deploying extra hardware. Inertial sensors technology provides a temporary positioning accuracy at a lower cost. Therefore, integrating these technologies into a single positioning solution would be a possible approach at the expense of their advantages. To solve these issues mentioned above a hybrid solution based on Wi-Fi RSS and onboard PDR is proposed in [3]. The solution depends on using KALMAN Filter (KF) to integrate two independent positioning techniques. However, the obtained positioning accuracy within 2.5 meters via the integrated solution is not enough for most of the indoors LBS applications. Therefore, in this article, a new approach is proposed to improve the positioning accuracy. The approach is to improve the heading estimation by using the obtained KF parameters. As a rule of thumb, with the PDR technique, the heading could be estimated by using gyroscope sensor readings. The readings will offer accurate heading estimation for a short time. However, for a long period of time, due to the existing huge drift-error of the sensor, the heading estimation is useless. This is because, within 5 minutes of walking in the same direction, the error of the heading estimation of the smartphone is around 40⁰ which causes a huge positioning error [6]. Also, according to [4] magnetometer and accelerometer measurements together could be used for estimating the smartphone heading as well as for a long time of period will offer a good heading estimation. In this article, MACC is designated as a name for both Magnetometer and ACCelerometer sensors. However, within a short period of time, the gravity will make fluctuation readings over MACC measurements, due to the existence of material around the smartphone and then it will accumulate errors in the sensors reading [7]. To mitigate this issue, this study proposes a new method of heading estimation via fusing multi sensors- measurements from gyroscope with MACC sensors. This will be on taking the advantages of the sensors’ readings and avoiding the limitations. The fusing approach can also improve the heading estimation. Figure 1 shows the principles of PDR. The structure of the article is organized as bellow: section 2 is a background about the PDR localization technique. Section 3 presents our proposed algorithm in detail. Section 4 demonstrates the experiment setup. And finally, section 5 concludes the achievements of the Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 52 study and future works. Figure 1: Positioning of the smartphone with PDR. Where; Xk, Yk position of the smartphone in X and Y coordinates. Dk covered distance of the smartphone from position k1 to position k2. Θ displacement angle of the smartphone. 2. STATE OF ART In this section, we review the PDR technique for indoor positioning using onboard sensor measurements and present the limitations of existing PDR-based solutions when used indoors [4] [6] [8]. Typically, the PDR technique is a simple and inexpensive technique. Since it does not need additional hardware and it depends on the heading estimation and distance between any two steps of walking. However, the accuracy of the obtained position will be degraded over a short time. Therefore, the PDR should be integrated with other positioning techniques to overcome the existing limitations, including accumulated error and drift error. Fortunately, because these sensors are built-in on the smartphone, they can be easily and smoothly integrated with other positioning techniques to improve accuracy [4]. The performance of PDR will be decreased due to the poor sensors’ measurements and high magnetic interference caused to sensors. To address this issue, a study in [9] proposed a novel algorithm to improve the heading estimation of the sensors to increase the accuracy of PDR. In the study, a simplified calibration of the magnetometer is used by calculating the anticipated velocity along the moving direction using the frequency domain velocity features and implementing direction limitations to available routes rather than free space position limitations. Also, the study recommends a high-dimensional particle filter, namely MPF, which involves location, heading, parameters of step length, movement label, lifespan, number of present particles and the weight variable based on external measurements. The results achieved an average positioning error of fewer than 2.5 meters. Further, the achieved positioning accuracy is provided by 1) reducing the available interference from the surrounding environment, and 2) improving heading estimation by decreasing the ambiguities of the sensors. Therefore, a robust algorithm for heading estimation and precise positioning is introduced. The proposed algorithm is highly remarkable due to using onboard inertial sensors for positioning. However, the performance of the system is extremely decreased since the algorithm needs lots of processing and calculation. In another work [4], a new algorithm is presented to estimate smartphone position in different situations where the smartphone is placed with hand, in a pants pocket, swaying, and calling near the ear. In the study, a comparison between the PDR gait model and state of the art is analyzed from the three aspects: 1) position estimation, 2) heading estimation, and 3) step detection. A set of experiments are conducted on basic smartphone position situations. Instead of using only pseudo-velocity measurements, a gait model and the motion constraints are used to provide pseudo-measurements. This is to increase positioning accuracy and to provide a new PDR algorithm. The main idea of the algorithm is that the initial position of the smartphone is detected by integrating acceleration (twice) and angular rate measurements. This is followed by (X0, Y0) (X1, Y1) (X2, Y2) (Xi, Yi) θ1 θ4 Initial Point Distance Heading Xk = Xk-1 + Dk * Cos (θk) Yk = Yk-1 + Dk * Sin (θk) Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 53 defining the current position, velocity, and attitude of the smartphone at each step walking. The algorithm relies on reducing tri-accelerometer bias error by using a hand calibration method (which is static calibration), also calibrating tri-magnetometer by using an ellipsoid fitting method via an extended KF. The proposed algorithm showed that better performance and accuracy for position and heading estimation of the smartphone could be obtained. Further, the step detection technique is more accurate than normal PDR except with the calling situation since it produced low position accuracy. However, the inertial sensors still suffer from misalignment angle estimation, and the accumulated error of the sensors should be specified to tackle the alignment issue. On modern smartphones, compass and gyroscope sensors can be used for finding heading of the device, according to the study in [7]. However, the accuracy of the gyroscope is higher than the compass while the compass is subject to errors due to magnetic materials around. In the study, using a gyroscope for estimating the heading is analyzed instead of a compass. The constant bias error of the gyroscope will be zero when taking the long-term average of the output of the rotation. Once the bias is known, each output value will be subtracted from the gyroscope. According to the results of the paper, heading estimation of the smartphone using the gyroscope shows a better attitude than using the compass. Again, the problem of the proposed algorithm is also gyroscope is subject to error, which may cause huge drifts and produce imprecise position accuracy. Our proposed method of heading estimation does work without the need for pre- defined constraints or pre-installed localization infrastructure and does away with static calibration. The uniqueness of this method is to provide a new heading estimation that fuses onboard smartphone sensors by taking advantage and mitigating the limitations of the sensors. The fusion process is to provide better positioning accuracy, and it is based on using KF parameters. Besides, the KF parameters are calculated when various localization techniques including PDR technique and Wi-Fi RSS-based technique, are integrated. 3. PROPOSED ALGORITHM The smartphone progression and enhancements lead to more precise location-based services’ applications. To take advantage of a variety of applications, smartphone position detection is in demand. In open-sky areas, GNSS is the preferable way to detect smartphone position as satellite signals can be received easily. Though in urban areas or indoor situations, the signal of the GNSS satellites will be blocked, and it cannot employ position detection effectively [10]. Moreover, according to researches, smartphone users spend most of their time indoors. Thus, the issue is with localizing smartphone in covered areas using an influential technique with the lowest cost and minimum hardware requirements. Various algorithms and technologies presented for localization, for instance, Wi-Fi, Cellular Network Signal, Bluetooth, NFC, and built-in sensors are the broadest technologies [4]. However, each of these technologies, if they are used as a stand-alone technology, cannot be dependable due to having its limitations. Therefore, in this study, a combination of inertial sensors combined with Wi-Fi RSS values is proposed to estimate smartphone position. Using an embedded sensor of a smartphone is a low cost, and without poverty of any extra appliances’ technique for positioning [11]. Typically, orientation such as spinning and turning (heading) of the smartphone can be detected using the gyroscope sensor [12]. A distance displacement between any two steps of the smartphone can be estimated using accelerometer sensors. Accelerometer uses mechanical motion to detect acceleration such as shaking or tilting. The strength of the earth’s magnetic field can be measured using the magnetometer sensor. Note, the direction of the smartphone can also be estimated using the MACC sensors measurements. However, the sensor is subject to noises due to earth gravity and the surrounded material in the vicinity; as a result, noticeable changes in the sensor measurements can be detected [13] [14] [15]. To solve this issue, as a preprocessing step of the proposed algorithm, a low pass filter is applied on the MACC sensors measurements to remove movements cause. Figure 2 shows estimated heading via MACC sensor measurements before and after applying a low pass filter. Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 54 Further, the sensor measurements and Wi-Fi RSS values are also can be combined by using KALMAN Filter (KF) at each step of walking to improve the smartphone position. The KF is a well-organized, efficient method for combining reading from multiple sources. Generally, KF consist of two stages, which are: the first stage is known as the prediction stage, which predicts the current position of the smartphone using noisy sensor measurement. Mainly, the accuracy of the prediction stage is frail. The second stage is called the update stage, which corrects the predicted position using measurement information from the collected WAPs RSS values. KALMAN Gain (KG) is an influential part of KF. In this study, the KG is used to remove errors that exist in the results of sensor measurement to increase positioning accuracy [3]. Figure 3, expresses KALMAN filter stages with equations of each stage. Figure 2: Heading Estimation using MACC Sensor. Figure 3: Principles of KALMAN Filter. Xo P0 Initial State X k-1 P k-1 Previous State Initial State becomes Previous Xk − = 𝐴 ∗ 𝑋𝑘−1 + 𝐵 ∗ 𝑈𝑘 + 𝑊𝑘 Pk − = 𝐴 ∗ 𝑃𝑘−1 ∗ 𝐴 𝑇 + 𝑄𝑘 New Predicted State 𝐾 = Pk − ∗ 𝐻 𝐻 ∗ Pk − ∗ 𝐻𝑇 + 𝑅 Kalman Gain 𝑌𝑘 = 𝐶 ∗ 𝐾𝑘 + 𝑍𝑘 Sensor Measurements 𝑋𝑘 = Xk − + 𝐾 ∗ (𝑌𝑘 − 𝐻 ∗ 𝑋𝑘) 𝑃𝑘 = (𝐼 − 𝐾 ∗ 𝐻) ∗ Pk − State and Covariance Update X k P k Output of Update State Current State becomes Previous Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 55 Where: A and B are adaptations matrices used to convert input state to process state. Xk-1 is the previous state. U is the control variable matrix. W represents the predicted state noise matrix. 𝑷𝒌 − is the predicted error covariance matrix. Q is the predicted error noise, keeps the state covariance matrix becoming too small or going to 0. Y is the measurement state. C is an adaptation matrix, to convert input state to process state. Z is measurement noise. K is the Kalman Gain. R is the sensor noise or measurement covariance matrix. H is a conversion matrix to make sizes consistent. I is the identity matrix. Generally, the proposed algorithm in this study is as follows: initially, the smartphone position is estimated by calculating the distance displacement (between any two walking steps) via using readings of the accelerometer and calculating the heading of the smartphone according to the North Pole. The heading of the smartphone is estimated using the MACC sensor (integration between accelerometer and magnetometer) combined with gyroscope measurements to improve heading accuracy. Both MACC and gyroscope sensors are subject to interference and may suffer from fluctuation. To settle the measurements, KG is used. In each step of the walking, KG value is compared to the previous value; depending on the error ratio of KG. For example, more weight is given to the MACC if a huge drift exists in the gyroscope. Contrariwise, if high fluctuation exists in the MACC sensor, Gyroscope measurement will be more dependent. Figure 4 shows a flowchart of how KG controls the combination of the sensor measurements. To normalize values in between 0 and 1, min-max normalization is used. Equation 1 expresses the heading calculation using sensor measurements. Finally, both sensor measurements integrated to introduce a new precise estimated heading. This is followed by estimating the smartphone position (x’, y’) by using the PDR technique, which uses the calculated distance displacement and the estimated heading. The Wi-Fi RSS values will be used to correct/update the estimated position (x’, y’) by using KF to produce a new improved position. Figure 5 shows a block diagram of the study proposed algorithm. The Wi-Fi RSS values are used to calculate the distance between the smartphone position and the WAP location at each step of walking. The distance calculation is based on the proximity technique [3]. This distance calculation is useful to update the estimated smartphone position (x’ and y’) when there is an unpredictable error with the sensor measurements. Figure 4: Sensor measurements weighting based on KG values. Start KG Values (K) K (i) < K (i-1) Ratio 1(i) = K (i) – K (i-1) Yes K (i-1) < K (i) No Ratio 2(i) = K (i-1) – K (i) Yes No Exit Data 1(i) = 𝑅𝑎𝑡𝑖𝑜1(𝑖)−𝑀𝑖𝑛 (𝐾)(𝑖) 𝑀𝑎𝑥 (𝐾)(𝑖)−𝑀𝑖𝑛 (𝐾)(𝑖) 𝑌 Data2(i) = 𝑅𝑎𝑡𝑖𝑜2(𝑖)−𝑀𝑖𝑛 (𝐾)(𝑖) 𝑀𝑎𝑥 (𝐾)(𝑖)−𝑀𝑖𝑛 (𝐾)(𝑖) 𝑌 X (i) = Data 1(i) – Data 2(i-1) X (i) = Data 1(i-1) – Data 2(i) X (i) = Data 1(i-1) – Data 2(i-1) Exit Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 56 Figure 5: General Block Diagram of Proposed Algorithm 𝑯𝒆𝒂𝒅𝒊𝒏𝒈 (𝑯) = 𝑿 × (𝑴𝑨𝑪𝑪 (𝒋,𝒎𝒂𝒙𝒊𝒏𝒅𝒙(𝒊,𝒋)) − 𝑴𝑨𝑪𝑪 (𝒋,𝒎𝒂𝒙𝒊𝒏𝒅𝒙(𝒊−𝟏,𝒋)) ) + (𝟏 − 𝑿) (𝑮𝑮 (𝒋,𝒎𝒂𝒙 𝒊𝒏𝒅𝒙(𝒊,𝒋)) − 𝑮𝑮 (𝒋,𝒎𝒂𝒙 𝒊𝒏𝒅𝒙(𝒊−𝟏,𝒋)) ) (1) Where; H heading changes of the smartphone. MACC heading change readings of Accelerometer and Gyroscope. GG heading change readings of Gyroscope. max.indx(i) value of the sensor in i position. max.indx(i-1) value of the sensor in i-1 position. 4. EXPERIMENT SETUP For the experiment environment, four tests placed in Sulaimanyah University Computer Science building, which is a rectangular shape. Two smartphones are used for collecting data, a Samsung Galaxy S4 mini and a Samsung Galaxy S7 Edge. Ten WAPs are placed around the building, including six Mikrotik, three Linksys, and one TP-Link. The WAPs signals have normally covered the building. An android application created with Android Studio 3.3.1 and installed on the smartphones for reading measurements from the smartphone sensors as well as reading WAP RSS values. Exact position walked during the tests produced using MATLAB 2018a and collected data simulated to show the performance of the estimated position based on the smartphone sensors. The methodologies and the practical part of the algorithm include the following. The test area of the building is around 179 meters are marked every 50cm for each step of walking (which is the length of the normal walking step). Consequently, the real position of the smartphone can be mapped easily; furthermore, the number of steps can be counted. The android application on the smartphones named (TestSensor) is used to collect x, y, and z-axis sensor measurements of the smartphone, together with the WAPs signal received by the smartphone. Then the readings are saved in a CSV file that can be imported later to the MATLAB program. The smartphone-user runs the TestSensor application and starts to walk normally on marked points in the testbed area as well as holding the smartphone in his hand. At the beginning of the tests, the Galaxy S4 is used. After completing seven trials and processing the data in MATLAB. Significant drifts detected in gyroscope sensors of the smartphone. As can be seen in Figure 6, the true position, and the estimated position using gyroscope are drawn, respectively. The Acc x , Acc y , Acc z Mag x , Mag y , Mag G x , G y , G z Acceleromete r Magnetomete r Gyroscope RSS 1 , RSS 2 , RSS 3 , … WAP s RSS Distance Measurement (D) Heading Estimation H MACC Heading Estimation H Gyro Estimate Position (X’, Y’) Heading H KG (MACC + Gyro) Distance D RSS  Distance Between SP & WAP Kalman Filter Kalman Gain Value Current Position X Y Heading Study Contribution Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 57 figures show that gyroscope sensors of the Galaxy S4 mini is suffering from errors and cannot be used anymore for the positioning of the smartphone. This is due to old material of the gyroscope sensor. Age of the device (sensor chips) may affect quality and reliability of the sensor measurements, that may make the sensor not usable and dependable for localization. The same scenarios are repeated by using Galaxy S7 Edge. After completing the survey, data collected by the application saved in a CSV file, again. The Excel file imported to a MATLAB program. In the MATLAB true position of the test is simulated. This is to do the comparison process of the true position with the estimated position via the proposed approach. For each trial, the initial position of the smartphone is defined along the test area via three different heading estimation methods such as 1) using only the MACC sensor, 2) using only the gyroscope sensor and 3) using MACC plus gyroscope fusion measurements. The fusion of MACC and gyroscope is utilized to estimate the heading of the smartphone. The measurements of all heading estimation methods, separately, are integrated with WAP RSS values using KF to estimate the position of the smartphone. Figure 6: Heading and Position estimation with the gyroscope of the Galaxy S4 Mini. 5. RESULTS To compare the proposed algorithm with state-of-the-art methods, the heading estimation error and the positioning accuracy are used as positioning-performance metrics. From the conducted experiments, Figure 7-a shows the estimated heading using only MACC (drawn graph-line in blue color) and gyroscope (drawn graph-line in red color), and figure 7-b shows estimated heading using MACC, gyroscope, and the fusion approach (drawn graph-line in green color). Results show that the MACC sensor measurements suffer from fluctuation issue, and the estimated position is imprecise. As can be noted from Figure 7-b, the heading estimation of MACC at the beginning of the test is between 160 to 200 degrees. While heading estimation in the same area of the gyroscope is in between 100 and 120 degrees. In spite of that, the heading estimation via the proposed approach is more precise, as shown in figure 7-b which is, in most cases, within 100 degrees. Also, the MACC average position estimation error (positioning accuracy) of all the four tests is 2.3609 meters. The localization of the smartphone using the Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 58 gyroscope reading shows better accuracy. The mean positioning accuracy of the gyroscope for all the tests is 2.0561m. Achieved results of such indoor localization solution using only integrated sensor with Wi-Fi measurements (such as in [3] Indoor human tracking mechanism using integrated onboard smartphones Wi-Fi device and inertial sensors which is published in Oct 2018) was within 2.5m, while accomplished results of state of art is less than 2.1m. Further, the fusion method from both sensors shows great accuracy and precise position. The result of the average positioning accuracy of the proposed approach is 2.0100m which is equivalent to 10% improvement. Note: for all the three methods, the estimated position is updated by the Wi- Fi RSS values. Figure 7: Estimated heading using MACC, gyroscope, and fusion between both. For further analysis, Table 1 shows a comparison between the positioning accuracy of the test results. While Table 2 shows the heading estimation comparison in the tests. True heading, estimated heading using MACC, gyroscope, and proposed algorithm are presented. The mean error for each test is shown. Because of the headings have fluctuation in every sample, a fixed number cannot be used. So, the mean of error degree is used. As shown from the results, the average heading accuracy of the proposed approach in all four tests is about 182.06 while the average heading accuracy of MACC is 210.07 and for gyroscope is 197.06 (203.92 combined). With the proposed algorithm, the heading accuracy is 21 degrees higher than the average accuracy of both other methods. In addition to that, the positioning accuracy of the proposed approach is almost 2 meters, and it is about 19 cm less than the average of the other two methods. Acquiring above accuracy without employing any extra hardware is a great achievement. Graphically, Figure 8 shows the true position (drawn graph-line in black color) along with the estimated position based on MACC, gyroscope, and fusion between both sensors with Wi-Fi RSS values. The graph line in blue color indicates the estimated position where only MACC measurements are used to calculate the heading at each step of walking. While the graph line in red color indicates the estimated position of the smartphone, where the gyroscope sensor measurement is used to calculate the smartphone heading. The green line indicates the estimated position via the developed fusion approach (our proposed approach) where the heading is calculated based on both MACC and gyroscope measurements. Also, the spot circles with the filled-red color indicated the place of the WAPs in the building. A B Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 59 Table 1: Positioning Accuracy Using MACC, Gyroscope, and Fusing. Test Name Accuracy with MACC Accuracy with Gyroscope Accuracy with Fusion Suli-1 2.3453 2.0399 1.8456 Suli-3 2.4127 2.0094 1.9512 Suli-4 2.2318 1.9344 1.9239 Suli-5 2.4536 2.2405 2.3192 Average 2.3609 2.0561 2.0100 Average 2.2085 Table 2: Heading Accuracy (in Degree) When MACC, Gyroscope, and Fusing are Separately Used Test Name True Headings Heading with MACC Heading with Gyroscope Heading with Both Suli-1 90 180 270 179.34 270.28 314.48 (254.7) 112.65 223.02 287.98 (207.88) 95.37 203.68 264.04 (187.69) Suli-3 90 180 270 118.64 202.18 254.55 (191.79) 98.83 207.23 274.18 (193.41) 87.03 193.88 263.5 (181.47) Suli-4 90 180 270 109.92 211.65 269.73 (197.1) 101.15 235.63 291.55 (209.44) 99.95 201.12 241.61 (180.89) Suli-5 90 180 270 85.73 219.31 293.68 (199.57) 77.92 181.61 272.99 (177.5) 90.08 181.99 262.56 (178.21) Average 180 210.79 197.06 182.06 203.92 Figure 8: Positioning using MACC, gyroscope, and fusion of both. In the above figure real position (which is a rectangular path of 179 meters) taken by the smartphone is drawn in black color. Estimated position of the smartphone based on Accelerometer and Magnetometer is sketched in blue line. While, the red color indicates estimated position of the smartphone detected by the Gyroscope. Estimated position of the smartphone depending on the proposed algorithm is shown in green line. Also, WAPs and start point position is indicated in the graph. Kurdistan Journal of Applied Research | Volume 4 – Issue 2 – December 2019 | 60 6. CONCLUSION A positioning solution for indoor an environment is presented. The solution depends only on utilizing built-in smartphone sensors along with the received Wi-Fi signals information. In addition, by consolidating measurements of the inertial sensors as well as Wi-Fi transceivers, the smartphone position accuracy inconstancy is improved. The PDR technique (using the built- in sensors measurements) is integrated with the WAPs RSS values via KF to estimate the smartphone position. Further, a precise heading of the smartphone is estimated by using the fusion process of sensors measurements (MACC and gyroscope). This is to improve smartphone position estimation accuracy. The obtained accuracy (2 meters) from consolidating sensors of all the tests is elegant due to precise localization accuracy without using any extra hardware. However, such positioning accuracy is not enough for most of the LBS applications on smartphones. Therefore, our next future work is to 1) combining other positioning technique (including map-matching technique) with the proposed solution to provide further improvements, 2) avoiding the issue of the style of holding smartphones by a user and improving step detection within PDR technique will be our future work, as well. REFERENCE [1] C. Langlois, S. Tiku and S. Pasricha, "Indoor Localization with Smartphones: Harnessing the Sensor Suite in Your Pocket," in IEEE Consumer Electronics Magazine, vol. 6, no. 4, pp. 70-80, Oct. 2017. [2] A. Correa, M. Barcelo, A. Morell and J. L. Vicario, "A Review of Pedestrian Indoor Positioning Systems for Mass Market Applications," Sensors, vol. 17, no. 8, p. 1927, Aug 2017. [3] S. A. Maghdid, H. S. Maghdid, S. R. HmaSalah, K. Z. Ghafoor, A. S. Sadiq and S. Khan, "Indoor human tracking mechanism using integrated onboard smartphones Wi-Fi device and inertial sensors," Telecommunication Systems, pp. 1-12, 2018. [4] J. Kuang, X. Niu and X. Chen, "Robust Pedestrian Dead Reckoning Based on MEMS-IMU for Smartphones," Sensors, vol. 18, no. 5, p. 1391, May 2018. [5] Z.-A. Deng, G. Wang, D. Qin, Z. Na, Y. Cui and J. Chen, "Continuous Indoor Positioning Fusing WiFi, Smartphone Sensors and Landmarks," Sensors, vol. 16, no. 9, p. 1427, Sep 2016. [6] V.-C. Ta, "Smartphone-based indoor positioning using Wi-Fi, inertial sensors and Bluetooth" M. S. thesis, School of Mathematics, Sciences and Technologies of Information, Computer Science, University Grenoble Alpes, Saint- Martin-d'Hères, France, 2017. Accessed on: Sep, 12, 2019. Available: https://tel.archives-ouvertes.fr/tel- 01883828. [7] J. Ying, K. Pahlavan and L. Xu, "Using Smartphone Sensors for Localization in BAN, Medical Internet of Things (m-IoT) - Enabling Technologies and Emerging Applications," 28 5 2019. [Online]. Available: https://www.intechopen.com/books/medical-internet-of-things-m-iot-enabling-technologies-and-emerging- applications/using-smartphone-sensors-for-localization-in-ban. [8] W. Sakperea, M. Adeyeye-Oshinb and N. B. Mlitwac, "A state-of-the-art survey of indoor positioning and navigation systems and technologies," South African Computer Journal vol 29, no. 3, pp. 145-197, 2017. [9] L. Pei, D. Liu, D. Zou, L. F. C. Ronald, Y. Chen and Z. He, "Optimal Heading Estimation Based Multidimensional Particle Filter for Pedestrian Indoor Positioning," IEEE Access, vol. 6, pp. 49705-49720, 2018. [10] J. Kuang, X. Niu, P. Zhang and X. Chen, "Indoor Positioning Based on Pedestrian Dead Reckoning and Magnetic Field Matching for Smartphones," Sensors, vol. 18, no. 12, p. 4142, Nov 2018. [11] Z. Zhou, T. Chen and L. Xu, "An Improved Dead Reckoning Algorithm for Indoor Positioning Based on Inertial Sensors," in Proc. International Conference of Electrical, Automation and Mechanical Engineering (EAME 2015), 2015, pp. 369-371. [12] Y. Liu, M. Dashti, M. A. A. ABd Rahman and J. Zhang, "Indoor Localization using Smartphone Inertial Sensors," in Workshop on Positioning, Navigation and Communication (WPNC), Dresden, Germany, 2014. [13] A. Solin, S. Cortes, E. Rahtu and J. Kannala, "Inertial Odometry on Handheld Smartphones," in Proc. International Conference on Information Fusion, FUSION 2018, 2018, pp. 1361-1368. [14] V. Marotto, A. Serra, D. Carbouni, M. Sole, T. Dessì and A. Manchinu, "Orientation Analysis through a Gyroscope Sensor for Indoor Navigation Systems," in Proc. The Fourth International Conference on Sensor Device Technologies and Applications, 2013, pp. 85-90. [15] R. Zhang, A. Bannoura, F. Hoflinger, L. M. Reindl and C. Schindelhauer, "Indoor Localization Using A Smart Phone," 2013 IEEE Sensors Applications Symposium, SAS 2013 - Proceedings, pp. 38-42, Sep 2017.