Trilateration Method For Estimating Location in RSSI-Based Indoor Positioning System Using Zigbee Protocol

Wireless network technology that is used today is developing rapidly because of the increasing need for location information of an object with high accuracy. Global Positioning System (GPS) is a technology to estimate the current location. Unfortunately, GPS has a disadvantage of low accuracy of 10 meters when used indoors. Therefore, it began to be developed with the concept of an indoor positioning system. This is a technology used to estimate the location of objects in a building by utilizing WSN (Wireless Sensor Network). The purpose of this study is to estimate the location of the unknown nodes in the lecturer room as an object and obtain the accuracy of the system being tested. The positioning process is based on the received signal strength (RSSI) on the unknown node using the ZigBee module. The trilateration method is used to estimate unknown node located at the observation area based on the signal strength received at the time of testing. The result shows that the path loss coefficient value at the observation area is 0.9836 and the Mean Square Error of the test is 1.251 meters, which indicates that the system can be a solution to the indoor GPS problem.

INTRODUCTION GPS (Global Positioning System) is the most widely used localization system with all its good features. Unfortunately, out of all the advanced features, GPS technology has some drawbacks. Both the performance and accuracy are quite poor when it is used indoors or inside buildings. The GPS being 5-10 meters off is not a big deal when driving on the road. But inside buildings, it has an error estimation up to 10 meters and it can be a problem in location estimation [1]. The reason is that radio waves emitted by GPS satellites cannot propagate thick objects, such as building walls. An indoor positioning system is a technology that is being developed using WSN (Wireless Sensor Network). The purpose of that is to improve the quality of room mapping information by estimating objects that are applied to sensor nodes in wireless sensor networks [2]. WSN is the development of wireless technology that is supported by microcontroller devices to perform certain functions. There are several types of communication technologies at WSN, i.e., Bluetooth [3], Wi-Fi [4], and ZigBee [2], [5]. A comparison of their performa nce shows that ZigBee has advantages in nominal range, network size, and power consumption [6]. Therefore, ZigBee is more efficient for indoor positioning system networks.
The location in an indoor positioning system is estimated by measuring the distance between the fixed sensor node (anchor node) and moving sensor node (unknown node). There are three methods to measure the distance, and they are RSSI (Received Signal Strength), AOA (Angle of Arrival), and TOA (Time of Arrival) [7]. Distance measurement by the RSSI method is less accurate than the AOA and TOA methods, but the RSSI method can work well without any additional device [8]. Therefore, the RSSI method is more practical for measuring distances on the indoor positioning system. After measuring the distance, the estimation of location can be calculated from the measurement of distance into the coordinate point using the trilateration and multilatera tion methods. The difference between both of them is the number of used anchor nodes. The trilateration method uses three nearest anchor nodes to estimate the location and multilateration method uses more than three anchor nodes [9] [7]. The trilatera tion method has a lower accuracy of estimated location [8], but trilateration method is enough for a small room or building coverage.
Based on these problems, this paper proposes the design scheme for location estimation in an indoor positioning system using the ZigBee protocol. In this scheme, the anchor node reference the unknown node using the Received Signal Strength Indicator (RSSI) and the location is estimated from the distance measurement of three nearest anchor nodes to the unknown node by using the trilateration method.

II. RESEARCH METHOD
This study was conducted in the lecturer room of the Faculty of Telecommunications and Electrical Engineering of Institut Teknologi Telkom Purwokerto, Central Java. The indoor positioning system in this study consists of testing parameters, as shown in Table  1.  Figure 1 shows the layout of the observation area. The room has a length of 18 meters and a width of 8 meters. There are several obstacles in the room, such as the cubical room with a height of 1.5 meters, sofa and table, and building poles.
In this study, the steps of location estimation in the indoor positioning system divided into three steps, as shown below.

A. RSSI Measurement
The first step is to measure the RSSI between the anchor node and the unknown node at all coordinate points in the whole of the room, as shown in Fig. 2. Received Signal Strength Indicator (RSSI) is an indicator of the signal strength received by a wireless device at a reference point [10]. RSSI can be expressed as the ratio between the received signal of a node at a certain point to the received signal at a reference point, which can be written as follows (1) [11].  (1) where P RX is the receiver's power (watt) and P reff is the power received at the reference point (watt). Suppose both of them are known in dBm units, then In this study, the anchor node was set as a reference point (Tx) and it was placed on the wall of a building at 2.5 meters above ground level. Unknown node was set as a receiver node (Rx) with a height of 1.5 meters and it moved at intervals of 1 meter starting from 1 meter to 18 meters (room length) from the anchor node. In every 1 meter of movement, there were 20 RSSI data measured. After RSSI between the anchor node and the unknown node was measured from 1 meter to 18 meters, the anchor node was shifted at one meter interval and at each interval, the RSSI was measured again in the same way. The RSSI measurements were carried out until the anchor node is shifted at all around the room.

B. Measuring Distance Using Path Loss Coefficient
In the second step, data of RSSI was calculated to obtain the path loss coefficient (n) and then it was used to measure distances. The RSSI-based indoor positioning method is calculated by sensing the received signal and measuring the total power received so that it can produce an estimated distance between the target object and the position sensor. The value received indicates the signal strength provided by the Link Quality Indicator (LQI) as the RSSI value. The RSSI process is transmission power that is configured on a transmission device (P TX ), which directly affects the input power on the receiving device (P RX ). The use of RSSI is one of the most frequently encountered approaches for positioning purposes. The radio path loss long-distance propagation model considers the received power (PRX) as a function of the distance of the transmitter to the receiver with the addition of rank. This model is a deterministic propagation model that gives the average value expressed as (3) [12].
PRX : power received at the receiver (Watt) PTX : power received in reference distance (Watt) GTX : gain transmitter (Watt) GRX : gain receiver (Watt) λ : wavelength (meter) d : distance of transmitter to the receiver (meter) n : path loss exponent If (1) and (3) are substituted for P RX and P reff , then the logarithmic form will be obtained as follows (4) [11].
Based on (4), 0 is the distance from the transmitter to the reference point. For RSSI calculations, signal strength is very important to measure the distance between nodes. However, many factors affect the signal strength. They are shadowing, multipath fading, antenna effects and the effect of the transmission equipment itself. Therefore, a channel model is needed to reduce propagation losses. Normal shadowing log channel modeling is the development of the path -loss log distance propagation model to deal with the problem of a barrier between the transmitter and receiver. The path loss coefficient (n) is as follows (5) [13].
n : path loss coefficient P 0 : power received at reference distance (dBm) P RX : power received at d meter distance (dBm) 0 : reference distance of 1 meter : variable distance (m) X σ : the difference of the average of P RX with the average of P RX 0 of each location obtained from the measurement.
The value of the path loss coefficient (n) only applies in the area of observation where the RSSI is measured at that time. If the measurement of signal strength is carried out elsewhere, it is necessary to look for a new path loss coefficient value. After obtaining n, the measured distance between nodes is stated as follows (6) [13].

C. Location Estimation Using Trilateration Method
In the last step, the distance measurement was used to estimate the location of unknown nodes based on the distance of the anchor node to the unknown node located at the three nearest anchor nodes. In this study, there were four anchor nodes placed at four points in the room, as shown in Fig. 3, and unknown nodes were placed at 20 random points, as shown in Fig. 4. Three of the four anchor nodes were used to estimate the unknown location using the trilateration method with the concepts, as shown in Fig. 5.  The trilateration method requires three reference nodes called anchor nodes to get the estimated position of a point. That point is in the middle of the intersection of the three circles with the center point ( , ) , = { 1,2,3 } , and the distance to the intersection point. is obtained from the conversion of measurement data to distance as written in (6). Fig. 2 shows an illustration of the three-point trilateration method with respect to a three-circle intersection. Points A ( 1 , 1 ) , B ( 2 , 2 ) , and C ( 3 , 3 ) is the reference nodes of the node that estimates its location. The reference node is called the anchor node, while the node that estimates its location is called the unknown node. Here, the unknown node is assumed to be a 3-point intersection. If ( , ) is the unknown node position, then based on the Pythagoras we get (7) [14].
Then location estimation results are compared with actual unknown node coordinates to get system position estimation errors. Suppose (xest, yest) is the estimated value of the unknown node location and (xreal, yreal) is the actual coordinate value, the average estimation error of the unknown node position is called Root Mean Square Error (RMSE) given in (12) as follows [16].  (12) where M is the number of reference points. As explained above, there were 20 reference point n this study, as shown in Fig. 4.

III. RESULT
The procedure of the first step result in a relationship between the distance between nodes and RSSI. Because the anchor node is placed at the interval of 1 meter along the circumference of the room, there are (18 + 8) x 2 = 52 anchor node placement. Fig. 6 shows the results of RSSI measurements for one anchor node placement. The second step result in the value of the path loss coefficient (n) of the observation area of 0.9836. This path loss coefficient value only applies to this study because it is obtained from the signal strength received by the node in the observation process. So that the other observation process will have a path loss coefficient in accordance with the RSSI data measured.
The third step result in the estimated location of 20 nodes using trilateration method based on node placement in Fig. 4. The comparison and result of the estimated location of 20 unknown nodes and the real location from Fig. 4 is shown in Fig. 7 and Table 2.

IV. DISCUSSION
The line in Fig. 6 is the result of a linear regression analysis to model the relationship between distance and RSSI as follows (13).
= −20.627 − 1.0904 (13) This indicates that the variation in the value of Y (received signal strength) can be explained by the value of X (distance) based on a linear regression of Y over X by 90%. While the variation of Y values that cannot be explained is 10% due to the influence of other variables. They are the reflection, refraction, and scattering that occurs when the signal is propagated.
The value of the path loss coefficient in the second step, which is 0.9836, is the average value of the path loss coefficient at 524 nodes in the observation area. RSSI measurements of each distance have different values so that the value of the path loss coefficient at each node is also different. Each path loss coefficient value was calculated from RSSI measurements by using (4). For example, suppose the RSSI value when d0 (PRX0) is -19.5 dBm and the RSSI value when d (PRX) = -20.2 dBm where the PRX0 value is measured at d0 = 1.4142 m and PRX at d = 2.2361 m, the path loss coefficient value of the node is calculated as follows. All values of the path loss coefficient were calculated in the same way and the final path loss coefficient value of the observation area was found from the average of all values of the path loss coefficient.
The estimated location in Fig. 7 and Table 2 were calculated using (8) and (9). Before that, the distance of an unknown node to three nearest anchor nodes need to be calculated from RSSI measurement using (5). Suppose the RSSI measurement from one unknown node 1 to the three nearest anchor nodes are -26 dBm, -28 dBm, and -28 dBm where 0 of anchor node is -21.0681 dBm at 0 = 1.4142 meters, the distance of the unknown node to the three anchor nodes are calculated as follows. The unknown node 1 in Fig. 4 is in area 2 of Fig. 5, which means the coordinates of the three closest anchor nodes are (9.0), (18.4), and (9.8). By substituting the value of distance d1, d2, and d3 to (10) and (11) and then to (8) and (9), the estimated location of the unknown node can be calculated as follows. Based on the calculation, the value of xest is 11.719 m and yest is 2.00 meter. When it compared with the real location of the unknown node, i.e. (13.5, 2), the squared error (SE) is as follows. = ( 13.5 − 11.719 ) 2 + ( 2 − 2 ) 2 = 3.17 The estimated locations of unknown nodes 2 to 20 in Table 2 were calculated in the same way. The different SE values in Table 2 are caused by the condition of nLOS in the lecturer room. This is due to the existence of obstacles, such as in the form of skates, poles, cupboards, sofas, chairs, tables, and others. They cause reflection, refraction, or scattering in the signal 6 Jurnal Infotel Vol. 12  The RMSE obtained from testing 20 unknown nodes in this study was 1.54 meters. Therefore, it can be concluded that indoor positioning systems has a fairly good level of accuracy. This proves that positioning in the RSSI-based indoor positioning system using the ZigBee protocol is able to overcome the weaknesses of the Global Positioning System with an accuracy of 10 meters in the room [1].

V. CONCLUSION
Location estimation on an RSSI-based indoor positioning system using the ZigBee protocol is able to overcome the weaknesses of the Global Positioning System with the estimated error of 1.54 meters. The location is estimated by the characteristics of the observation area where the relationship between distance and RSSI can be explained by linear regression of Y over X by 90% and the path loss coefficient (n) is 0.9836.