Hybrid TOA Trilateration Algorithm Based on Line Intersection and Comparison Approach of Intersection Distances †

: The ever-growing mobile station (MS) localization technologies provide an increasingly important role in all aspects of the wireless cellular systems and Internet of Things (IoT). The accurate MS location information is the basis in connection of different devices in IoT. The MS localization techniques based on time of arrival (TOA) trilateration algorithm, which determines the location of MS using an intersection point of three circles based on distances between MS and base stations (BS) and coordinates of BSs, have been actively studied. In general, the distance between the MS and BS is calculated by counting the number of delay samples or measuring the power of the received signal. Since the estimated distance (radius of a circle) between MS and BS is commonly increased, three circles may not meet at a single point, resulting in the estimation error of MS localization. In order to improve this problem, in this paper, we propose the hybrid TOA trilateration algorithm based on the line intersection algorithm for the general case for intersection of three circles and the comparison approach of intersection distances for the specific case where a small circle is located inside the area of two large circles. The line intersection algorithm has an excellent location estimation performance in the general case, but it does not work in the specific case. The comparison approach of intersection distances has good performance only for the specific case. In addition, we propose the mode selection algorithm to efficiently select a proper mode between the general and specific cases. The representative computer simulation examples are provided to verify the localization performance of the proposed algorithm.


Introduction
In recent years, a localization technique, which is one of the core techniques in the wireless communications, has been rapidly developed with a variety of applications.The Internet of Things (IoT) is a novel paradigm that integrates different kinds of technologies, such as Bluetooth, Internet, Zigbee, Infrared, Wi-Fi, 3G, and General packet radio service (GPRS), and it enables those technologies to provide the location of the objects in different ways [1,2].Since various users and objects in different environments require the accurate location information in the modern wireless communications, the effective location detection algorithms with the high performance are dramatically developed.The location of a mobile station (MS) plays an important role in wireless communication systems, which attracts significant research interests.More and more researchers focus on the accurate MS localization with a low cost and high performance; such that human beings can benefit from an accurate MS positioning in their day to day life.
The location is the significant foundation for human beings to understand the real world and they want to obtain the location information to be available everywhere with the development of the relevant technologies.Although the location information itself does not provide a meaningful service, it is utilized to a variety of areas including a location-based service (LBS) [3][4][5].LBS supports various services based on the geographical location of MS with the exact localization information at the right place in real time, such as fleet management, emergency services, location tracking services, etc., and it must satisfy some of the privacy-related issues to the location of MS [6][7][8].
Geo-location, position location, and radiolocation are the commonly used terms to express the location of an object or user.Geo-location locates objects in terms of well-known global or local coordinates without employing Global Navigation Satellite System (GNSS), which has the advantage of low-cost implementation at the BS.Position location utilizes the coordinates of objects in two or three-dimensional space, which is mostly applicable in the incident detection and wireless network management.Radiolocation uses a radio frequency (RF) signaling scheme to locate the objects, which has penetrating property through obstacles and propagating property for the long distance [9,10].
The localization scheme is used both in indoor and outdoor environments.In an indoor localization, the wireless local area network (WLAN) and Ultra-wideband (UWB) are well studied, but the accuracy of the indoor localization is affected by line of sight and multipath propagation [11].For an outdoor localization, the Global Positioning System (GPS) is the most well-known outdoor localization technique, which requires various high technologies to solve some problems related to the direct line-of-sight to the satellite, consuming a lot of the energy, high cost, time synchronization, and interference suppression [12].The other techniques, such as received signal strength (RSS), time of arrival (TOA), time difference of arrival (TDOA), and angle of arrival (AOA) schemes, have been studied to efficiently calculate the MS location by means of measuring the radio signal traveling between MS and BSs in their respective fields [13][14][15].The RSS-based localization has a low cost and complexity and it is widely employed, but the stability of signal strength is occasionally poor, resulting in an inaccuracy of localization.The angle-based solution requires only two BSs to determine the MS location, whereas time-based method requires at least three BSs; however, the angle-based method generally has worse localization performance than that of the time-based method, because it is difficult to calculate the accurate angle between MS and BSs [16][17][18].The hybrid TOA/AOA scheme is utilized in the multipath effects, the hybrid TOA/TDOA/AOA scheme is used in the data fusion architecture, and the hybrid TDOA/AOA scheme is a representative method to improve the performance of the position accuracy [19][20][21][22].
The TOA trilateration method is one of the representative location estimation algorithms.It determines the MS location at an intersection point of three circles with their centers corresponding to BS coordinates and radii corresponding to distances between MS and BSs.Since we generally estimate the distance between MS and BS by counting the number of delay samples, which is an integer number, or measuring the power of the received signal, commonly, the estimated distance is slightly increased and three circles may not intersect at a single point, causing the estimation error for the accurate MS location.In order to improve this MS location error problem, recently, the shortest distance algorithm [23] and the line intersection algorithm [24] have been proposed for the general case.Normally, the line intersection algorithm has better performance than the shortest distance algorithm, because the shortest distance algorithm does not consider the increasing factor of the estimated circles but the line intersection algorithm does consider it.However, the line intersection algorithm may be degraded for the specific case, where a small circle is located inside the area of two large circles, and it intersects two large circles at four intersection points.In order to improve the MS localization Energies 2019, 12, 1668 3 of 26 performance for the specific case, the comparison approach of intersection distances has been proposed in [25].This algorithm calculates four distances between two neighbor intersections among four intersection points of a small circle with two large circles, and compares them.We select the shortest distance from the compared result, and determine the averaged coordinate of two intersection points corresponding to the shortest distance as the estimated location of MS.
The line intersection algorithm and the comparison approach of intersection distances have good performances for estimating the MS location in the general case and the specific case, respectively.In this paper, we propose a hybrid approach for efficiently and accurately estimating the MS location; it is based on the line intersection algorithm employed only for the general case and the comparison approach of intersection distances employed only for the specific case.While the line intersection algorithm has an excellent estimation performance in the general case but it has worse performance in the specific case, the comparison approach of intersection distances has good estimation performance in the specific case but it has worse performance in the general case.For the optimized estimation performance, we should select one of both algorithms according to each case.Thus, in this paper, we also propose a mode selection algorithm for using the line intersection algorithm or the comparison approach of intersection distances, according to two cases.In order to select a proper mode between both approaches, this mode selection algorithm considers four intersection points related to a small circle and other two large circles.Note that we consider three circles with a small circle and two large circles in the specific case.For the proposed method, we calculate the distance between one of four intersection points and the center of the circle which is not related to the corresponding intersection.We repeat this calculation for all four intersections and obtain four distances from the calculated results.Finally, this mode selection algorithm compares each distance to the radius of the large circle, which is not related to the corresponding intersection.If all four distances are shorter than the corresponding radii, we determine that it is the specific case and select the comparison approach of intersection distances for the advanced TOA trilateration technique.However, if at least one distance is longer than them, we determine that it is the general case and select the line intersection algorithm [26].
The rest of the paper is arranged as follows: Section 2 describes problems or issues of the TOA trilateration method for estimating the MS location, and Section 3 presents the advanced TOA trilateration algorithms such as the line intersection algorithm for the general case and the comparison approach of intersection distances for the specific case.Section 4 describes the hybrid TOA trilateration algorithm, based on the line intersection algorithm and the comparison approach of intersection distances, and mode selection algorithm for distinguishing the general case and the specific case.The performance of the proposed hybrid localization algorithm is illustrated by computer simulation results with various scenarios in Section 5. Finally, conclusions are outlined in Section 6.

Problem Formulation for TOA Trilateration
The TOA trilateration technique, which is one of the geometric approaches, determines the MS location using signals received at MS, transmitted from BSs [27][28][29].Based on the received signals, it estimates distances between MS and BSs, and makes three circles with centers corresponding to coordinates of BSs and radii corresponding to the estimated distances.Finally, it calculates an intersection point of three circles and determines the MS location to the calculated point.The mathematical computations for the trilateration algorithm are provided in detail in [30][31][32][33].
The true distance between MS and ith BS is given by where (x, y) and (x i , y i ) are coordinates of MS and of ith BS, respectively.However, in the real communication system, the distance between MS and BS is generally estimated by counting the number of time delay samples or measuring the power of the received signal.The number of time delay samples is calculated by where n i is the number of delay samples, "ceil" is the round up function in order to make the integer value, c is the speed of light, f s is the sampling rate.Note that we must employ "ceil" function, because the left side in ( 2) is an integer number but (r i /c) × f s in the right side of (2) is not an integer value.
The estimated distance between MS and ith BS, R i , is given by From this process, the estimated distance between MS and BS is slightly increased comparing to the original distance, and three circles based on the estimated distances may not meet at a single point, causing the serious estimation error.In order to overcome this problem, we propose a hybrid TOA trilateration algorithm based on the line intersection algorithm for the general case and the comparison approach of intersection distances for the specific case, in the next section.

Advanced TOA Trilateration Algorithms
In this section, we present two advanced TOA trilateration algorithms employed in the hybrid localization algorithm proposed in the next section.The first one is the line intersection algorithm, which has an excellent estimation performance in the general case but does not have good performance in the specific case.In this paper, the specific case is defined as where a small circle is located in the area of two large circles.Another algorithm is the comparison approach of intersection distances, which has good estimation performance comparing to the line intersection algorithm in the specific case, but does not have good performance in the general case.

Line Intersection Algorithm
In the general case, the true location of MS, based on the ideal TOA trilateration approach, is shown in Figure 1.Since the estimated distance between MS and BS is generally increased compared to the original distance, three circles based on the estimated distances may not meet at a single point, causing the serious estimation error for the MS location.In order to solve this problem, we consider the line intersection algorithm for the enhanced TOA trilateration, which estimates the MS location using the intersection point of three intersection lines connecting two intersection points of specific two circles.Three intersection lines must meet at a point and this single intersection point becomes the estimated location of MS as shown in Figure 2. In the general case, the line intersection algorithm has an excellent estimation performance for the MS location comparing to the shortest distance algorithm, because it considers the increasing factor of the estimated circles.The line intersection algorithm for estimating the MS location in the general case is summarized in Table 1.
Energies 2019, 12, x FOR PEER REVIEW 4 of 26 where i n is the number of delay samples, " " ceil is the round up function in order to make the integer value, c is the speed of light, s f is the sampling rate.Note that we must employ "ceil" function, because the left side in ( 2) is an integer number but ( ) × i s r c f in the right side of (2) is not an integer value.The estimated distance between MS and i th BS, i R , is given by From this process, the estimated distance between MS and BS is slightly increased comparing to the original distance, and three circles based on the estimated distances may not meet at a single point, causing the serious estimation error.In order to overcome this problem, we propose a hybrid TOA trilateration algorithm based on the line intersection algorithm for the general case and the comparison approach of intersection distances for the specific case, in the next section.

Advanced TOA Trilateration Algorithms
In this section, we present two advanced TOA trilateration algorithms employed in the hybrid localization algorithm proposed in the next section.The first one is the line intersection algorithm, which has an excellent estimation performance in the general case but does not have good performance in the specific case.In this paper, the specific case is defined as where a small circle is located in the area of two large circles.Another algorithm is the comparison approach of intersection distances, which has good estimation performance comparing to the line intersection algorithm in the specific case, but does not have good performance in the general case.

Line Intersection Algorithm
In the general case, the true location of MS, based on the ideal TOA trilateration approach, is shown in Figure 1.Since the estimated distance between MS and BS is generally increased compared to the original distance, three circles based on the estimated distances may not meet at a single point, causing the serious estimation error for the MS location.In order to solve this problem, we consider the line intersection algorithm for the enhanced TOA trilateration, which estimates the MS location using the intersection point of three intersection lines connecting two intersection points of specific two circles.Three intersection lines must meet at a point and this single intersection point becomes the estimated location of MS as shown in Figure 2. In the general case, the line intersection algorithm has an excellent estimation performance for the MS location comparing to the shortest distance algorithm, because it considers the increasing factor of the estimated circles.The line intersection algorithm for estimating the MS location in the general case is summarized in Table 1.Table 1.Line Intersection Algorithm.

1.
Calculate the estimated distance between each BS and MS after counting the number of time delay samples, given by: Generate three circle equations based on the estimated distance: x y a x by c , where 2 , 2 , and Estimate the location of MS, ( )

Comparison Approach of Intersection Distances
As we mentioned earlier, in the specific case, a small circle is located inside the area of two large circles, as shown in Figure 3.Although the line intersection algorithm has an excellent performance for estimating the MS location in the general case, it does not have good estimation performance in the specific case.In order to improve the estimation performance for the MS location in the specific case, we employ the comparison approach of intersection distances.This algorithm focuses on comparing distances between two neighboring points of four interior intersections related to a small circle, among six entire intersection points, as shown in Figure 4. Two distances are calculated from two intersecting points of the small circle with one large circle to the neighboring intersection points of the small circle with another large circle.After calculating two distances, we compare them and select the shorter distance.Finally, this approach determines the averaged coordinate of two intersection points corresponding to the shorter distance as the estimated MS location.Although the comparison approach of intersection distances does not have the good performance for estimating the MS location in the general case, it has the good estimation performance comparing to the line intersection algorithm in the specific case.This algorithm is summarized in Table 2.  Table 1.Line Intersection Algorithm.

1.
Calculate the estimated distance between each BS and MS after counting the number of time delay samples, given by:

2.
Generate three circle equations based on the estimated distance: where

Comparison Approach of Intersection Distances
As we mentioned earlier, in the specific case, a small circle is located inside the area of two large circles, as shown in Figure 3.Although the line intersection algorithm has an excellent performance for estimating the MS location in the general case, it does not have good estimation performance in the specific case.In order to improve the estimation performance for the MS location in the specific case, we employ the comparison approach of intersection distances.This algorithm focuses on comparing distances between two neighboring points of four interior intersections related to a small circle, among six entire intersection points, as shown in Figure 4. Two distances are calculated from two intersecting points of the small circle with one large circle to the neighboring intersection points of the small circle with another large circle.After calculating two distances, we compare them and select the shorter distance.Finally, this approach determines the averaged coordinate of two intersection points corresponding to the shorter distance as the estimated MS location.Although the comparison approach of intersection distances does not have the good performance for estimating the MS location in the general case, it has the good estimation performance comparing to the line intersection algorithm in the specific case.This algorithm is summarized in Table 2.
7. Take two intersection points corresponding to the selected shorter distance.
8. Calculate the averaged coordinate of two intersection points and determine it as the estimated MS location, given by:

Performance Analysis between Two Advanced TOA Trilateration Algorithms
In the general case, it is clear that the location estimation performance of the line intersection algorithm is better than that of the comparison approach of intersection distances, observed from Figure 2 and Figure 4.In this section, we show that the comparison approach of intersection distances has better estimation performance than the line intersection algorithm, in the specific case.

Performance Analysis between Two Advanced TOA Trilateration Algorithms
In the general case, it is clear that the location estimation performance of the line intersection algorithm is better than that of the comparison approach of intersection distances, observed from Figure 2 and Figure 4.In this section, we show that the comparison approach of intersection distances has better estimation performance than the line intersection algorithm, in the specific case.

1.
Initialize the circles C1, C2, and C3, based on centers of BSs and radii equal to estimated distances.

2.
Find all six intersections coordinate points, I, J, K, I , J , and K .

3.
Take two intersection points (J , K ) of a small circle C3 with two large circles, C1, and C2, and calculate the distance between two points (distance between J and K ). 4.
Repeat step 3 for another intersection points (J, K).

5.
Compare two distances (distance J K , and distance JK).

6.
Select the shorter distance between the two distances.7.
Take two intersection points corresponding to the selected shorter distance.8.
Calculate the averaged coordinate of two intersection points and determine it as the estimated MS location, given by: , and ŷC = J y + K y 2 .

Performance Analysis between Two Advanced TOA Trilateration Algorithms
In the general case, it is clear that the location estimation performance of the line intersection algorithm is better than that of the comparison approach of intersection distances, observed from Figures 2 and 4. In this section, we show that the comparison approach of intersection distances has better estimation performance than the line intersection algorithm, in the specific case.
Based on the true distance between the MS and BSs, three circles meet at a single point, and results of the line intersection algorithm and the comparison approach of intersection distances should be the same as the single intersection point.Additionally, the considered two intersection points in Figures 2 and 4, and Table 2, J and K, meet at the same single point.However, as the estimated distances are increased from original distances, the true position of MS, the estimated results of both algorithms, two intersection points, J and K, do not meet at the same point.Two intersection points, J and K, and the estimated MS position of the line intersection algorithm form a triangle as shown in Figure 5a, instead of meeting at the same point.The estimated MS position based on the comparison Energies 2019, 12, 1668 7 of 26 approach of intersection distances is located in the middle of a line connecting J and K, as shown in Figure 5b.From the figure, we observe that the distance between the true position of MS and the estimated position based on the line intersection algorithm is much longer than the distance between the true position of MS and the estimated position based on the comparison approach of intersection distances.In other words, the performance for estimating the MS location of the comparison approach of intersection distances is better than that of the line intersection algorithms, in the specific case where a small circle is located inside the area of two large circles.

Hybrid Approach Based on Advanced TOA Algorithms
The line intersection algorithm has an excellent location estimation performance for the general case, but it may have the serious location estimation error for the specific case, where a small circle is located in the area of two large circles.Although the comparison approach of intersection distances has worse performance for estimating the MS location comparing to the line intersection algorithm in the general case, it has good performance in the specific case.In this section, we present the hybrid TOA trilateration algorithm based on the line intersection algorithm and the comparison approach on intersection distances, for the optimized location estimation performance.In order to alternately use both algorithms according to the proper case, we also propose the efficient mode selection algorithm.The proposed algorithm compares the distances between the intersection points of the small circle and one large circle, to the radius of another large circle.

Hybrid Algorithm
The line intersection algorithm and the comparison approach of intersection distances have excellent estimation performances for the general case and the specific case, respectively.For the best performance estimating the MS location, these two methods should be employed with a hybrid form, where it employs the line intersection algorithm for the general case and employs the comparison approach of intersection distances for the specific case.This hybrid TOA trilateration algorithm is summarized in Figure 6.

Mode Selection Algorithm
For the optimized location estimation, we must select an algorithm between the line intersection algorithm and the comparison approach of intersection distances, according to the proper case.In this section, we propose a mode selection algorithm for distinguishing the general case and the specific case.If the algorithm selects the general case, the hybrid algorithm is operated to the mode for the line intersection algorithm.However, if it selects the specific case, the hybrid algorithm is operated to the mode for the comparison approach of intersection distances.The comparison approach of intersection distances selects the coordinates of intersection points, J and K, corresponding to the shorter distance.In Figure 5a, two lines connecting two intersection points, J and J , and connecting two intersection points, K and K , obtained from the line intersection algorithm must pass the intersection points J and K, respectively, selected by the comparison approach of intersection distances.
The line equation formed by connecting the original MS location, (x 0 , y 0 ), and the estimated MS location, ( xL , ŷL ), of the line intersection algorithm is given by In order to compare performances of both algorithms, two cases should be considered: Case 1: three points based on the original MS location and the MS locations estimated by two algorithms are placed in a line.
Case 2: three points of them are not placed in a line.For the Case 1, it is easy to show that the performance of the comparison algorithm of intersection distances is better than that of the line intersection algorithm, in the specific case, because the distance between the original MS location and the estimated MS location by the comparison approach of intersection distances is much shorter than the distance between the original MS location and the estimated MS location by the line intersection algorithm (Note that the ( xC , ŷC ) is located between (x 0 , y 0 ) and ( xL , ŷL ) in a line, where we observe that in Figure 5).For the Case 2, substituting ( xC , ŷC ) into variables in the left side of (4), we get: because ( xC , ŷC ) is not located in the line connecting the original MS location and the estimated MS location based on the line intersection algorithm.Therefore, three points of (x 0 , y 0 ), ( xC , ŷC ), and ( xL , ŷL ) form a triangle in Case 2, as shown in Figure 5b.In Figure 5c, we set (x 0 , y 0 ), ( xL , ŷL ), and ( xC , ŷC ) to O, L, and C, respectively, and consider an auxiliary point, M, where the length between O and M is the same as the length between O and C. In general, the length of OM is shorter than OL, because it is included in the line of OL.From this result, the length of OC is generally shorter than the length of OL.In other words, the performance of the comparison approach of intersection distances is better than that of the line intersection algorithm for Case 2 [26].

Hybrid Approach Based on Advanced TOA Algorithms
The line intersection algorithm has an excellent location estimation performance for the general case, but it may have the serious location estimation error for the specific case, where a small circle is located in the area of two large circles.Although the comparison approach of intersection distances has worse performance for estimating the MS location comparing to the line intersection algorithm in the general case, it has good performance in the specific case.In this section, we present the hybrid TOA trilateration algorithm based on the line intersection algorithm and the comparison approach on intersection distances, for the optimized location estimation performance.In order to alternately use both algorithms according to the proper case, we also propose the efficient mode selection algorithm.The proposed algorithm compares the distances between the intersection points of the small circle and one large circle, to the radius of another large circle.

Hybrid Algorithm
The line intersection algorithm and the comparison approach of intersection distances have excellent estimation performances for the general case and the specific case, respectively.For the best performance estimating the MS location, these two methods should be employed with a hybrid form, where it employs the line intersection algorithm for the general case and employs the comparison approach of intersection distances for the specific case.This hybrid TOA trilateration algorithm is summarized in Figure 6.

Mode Selection Algorithm
For the optimized location estimation, we must select an algorithm between the line intersection algorithm and the comparison approach of intersection distances, according to the proper case.In this section, we propose a mode selection algorithm for distinguishing the general case and the specific case.If the algorithm selects the general case, the hybrid algorithm is operated to the mode for the line intersection algorithm.However, if it selects the specific case, the hybrid algorithm is operated to the mode for the comparison approach of intersection distances.
In order to correctly select the proper case, the proposed mode selection algorithm calculates four distances related to centers of two large circles and four intersection points of a small circle with two large circles.Each distance is calculated from the center of each large circle to the intersection of the small circle with another large circle, defined as: where (x l , y l ) is a coordinate of the center of the lth large circle and (α k , β k ) is the coordinates of the kth intersection point of the small circle with another large circle.Next, the distances related to the lth large circle are compared to the radius of the lth large circle; distances.Otherwise, it selects the general case mode and the hybrid algorithm is operated to the line intersection algorithm.
Figure 7 shows the flow chart of the mode selection algorithm and Table 3 summarizes the detail steps of the proposed algorithm.Using the proposed mode selection algorithm, we can alternatively employ both advanced TOA trilateration algorithms, according to the proper case between the general case and the specific case, with the optimized performance for estimating the MS location.), it selects the specific case mode and the hybrid algorithm is operated to the comparison approach of intersection distances.Otherwise, it selects the general case mode and the hybrid algorithm is operated to the line intersection algorithm.
Figure 7 shows the flow chart of the mode selection algorithm and Table 3 summarizes the detail steps of the proposed algorithm.Using the proposed mode selection algorithm, we can alternatively employ both advanced TOA trilateration algorithms, according to the proper case between the general case and the specific case, with the optimized performance for estimating the MS location.

Computer Simulations
In this section, we provide computer simulation scenarios, the error model, and simulation results, to verify the localization performance of the proposed hybrid TOA trilateration algorithm.

Simulation Scenarios
For the simulation scenario, we consider the three fixed BSs and one movable MS, and two different sets of coordinates for BSs.Two different sets for the general case and the specific case are assumed as follows: 1.First set:
In addition, the MS coordinates are randomly chosen within ranges between -100 and +100 for the first case, −500 and +500 for the second case, and −1000 and +1000 for the third case, respectively.The unit of each coordinate is a meter (m) and we consider the different sampling rates of 10 MHz, 50 MHz, 100 MHz, 500 MHz, and 1 GHz.

Computer Simulations
In this section, we provide computer simulation scenarios, the error model, and simulation results, to verify the localization performance of the proposed hybrid TOA trilateration algorithm.

Simulation Scenarios
For the simulation scenario, we consider the three fixed BSs and one movable MS, and two different sets of coordinates for BSs.Two different sets for the general case and the specific case are assumed as follows: 1.
In addition, the MS coordinates are randomly chosen within ranges between −100 and +100 for the first case, −500 and +500 for the second case, and −1000 and +1000 for the third case, respectively.The unit of each coordinate is a meter (m) and we consider the different sampling rates of 10 MHz, 50 MHz, 100 MHz, 500 MHz, and 1 GHz.

1.
Find the two intersection points (J, J ) formed by the small circle C3 intersected with the large circle C2.

2.
Calculate the distances from the center of the large circle C1 (x1, y1) to the two intersection points (J, J ), it is given by

3.
Find the two intersection points (K, K ) formed by the small circle C3 intersected with the large circle C1.

4.
Calculate the distances from the center of the large circle C2 (x2, y2) to the two intersection points (K, K ), it is given by:

5.
Compare the increased radius of C1, R For comparing the performance of the proposed hybrid TOA algorithm and conventional method, which calculates the averaged coordinates of three inner intersection points among entire six intersections, we considered three scenarios for the occurrence possibility of the general case and the specific case as follows: 1.
First scenario: 90% general case and 10% specific case.
Note that the occurrence possibility of the general case is much higher than that of the specific case.Since the conventional method does not distinguish the general case and the specific case, in this paper, we assumed that it calculates the averaged coordinate of three interior neighbor intersection points among entire six intersections of the three estimated circles for the general case, and it calculates the averaged coordinate of a small triangle related to the three closest neighbor intersection points for the specific case, as the estimated MS location coordinate.Furthermore, we compared the performance of the proposed hybrid TOA algorithm and only line intersection algorithm, in the range from 80% to 100% of the occurrence possibility for the general case (in this case, the range of the occurrence possibility for the specific case is from 20% to 0%).
For verifying the stable and accurate performance of the proposed hybrid TOA algorithm, we performed simulations 1000 times for obtaining each result for all conditions, with the randomly chosen MS coordinates.All presented simulation curves are based on the averaged value of results which are repeated 1000 times.

Error Model for Performance Evaluation
In general, the performance of the location estimation algorithm is evaluated by the mean square error (MSE).The error between the true and the estimated MS position is calculated as: where (x t , y t ) and ( x, ŷ) are the true MS and the estimated MS coordinates, respectively, and MSE for estimating the MS location is given by: where E[] is an expectation operator.Also, the error between the true and the estimated distance is calculated as: where r is the real distance and R is the estimated distance between MS and BS.And MSE of distance is given by: These equations are used for the performance evaluation of simulation results.

Simulation Results
In this subsection, we provide computer simulation results for verifying the performance of the proposed hybrid TOA trilateration algorithm and comparing performances of the proposed and the conventional algorithms.

Simulation Results for the First Set
Based on the first set in scenarios, MSE curves for the estimated distances between MS and BSs versus different sampling rates, of the first, the second, and the third cases, are shown in Figure 8a-c, respectively.From the figures, we can observe that the performance of estimating the distance between MS and BS based on a higher sampling rate is better than that based on the lower sampling rate.That is, for estimating the distance between MS and BS, the TOA method based on the higher resolution has better performance than that based on the lower resolution, because the sampling rate is related to the resolution for the TOA method.Figure 9a-c) show MSE curves for the estimated MS locations versus different sampling rates of First scenario (90% general case and 10% specific case) for the first, the second, and the third cases, respectively.Figures 10 and 11 show MSE curves versus different sampling rates for them of Second scenario (95% general case and 5% specific case) and Third scenario (99% general case and 1% specific case), respectively.From those figures, we observe that MSE curves based on the proposed hybrid TOA algorithm are lower than them based on the conventional algorithm.That is, the proposed location estimation algorithm has the better performance than the conventional algorithm, for all sets and scenarios.These results verify that the proposed hybrid TOA algorithm well compensates the location estimation error of the conventional TOA method.Figure 12a-c show MSE curves for the estimated MS locations based on the proposed hybrid TOA algorithm and only line intersection algorithm (employing the line intersection algorithm for all case), in the range from 80% to 100% of the occurrence possibility for the general case, for the first, the second, and the third cases, respectively.From Figure 12, we observe that the MSE curves based on the proposed algorithm is lower than them based on only line intersection algorithm, for all cases.That is, the proposed hybrid algorithm has better performance for the MS location estimation than only line intersection algorithm, for all case, because the lower MSE curve means the lower location estimation error in figures.

Simulation Results for the Second Set
Next, we provide computer simulation results based on the second set in scenario.Figure 13 a-c show MSE curves for the estimated distances between MS and BSs versus different sampling rates, of the first, the second, and the third cases, respectively, which have similar results to the Figure 8. MSE curves for the estimated MS locations versus different sampling rates, of First scenario for the first, the second, and the third cases are shown in Figure 14a-c, respectively.Figures 15 and 16 show MSE curves for them versus different sampling rates, of Second scenario and Third scenario, respectively.From those figures, we can observe that the location estimation performance of the proposed algorithm is better than that of the conventional algorithm, because MSE curves based on the proposed algorithm is lower than those based on the conventional algorithm.Figure 17a-c show MSE curves for the estimated MS locations, based on the proposed hybrid algorithm and only line intersection algorithm, in the range from 80% to 100% of the occurrence possibility for the general case, for the first, the second, and the third cases, respectively.From the figures, we verified that the proposed hybrid algorithm has better performance for estimating the MS location than only line intersection algorithm, because MSE curves based on the proposed hybrid algorithm are lower than them based on only line intersection algorithm, for all cases.Note that all results in this subsection are similar to them in 5.3.1, (the first set).
Energies 2019, 12, x FOR PEER REVIEW 18 of 26 MSE curves for the estimated MS locations versus different sampling rates, of First scenario for the first, the second, and the third cases are shown in Figure 14a-c, respectively.Figure 15 and Figure 16 show MSE curves for them versus different sampling rates, of Second scenario and Third scenario, respectively.From those figures, we can observe that the location estimation performance of the proposed algorithm is better than that of the conventional algorithm, because MSE curves based on the proposed algorithm is lower than those based on the conventional algorithm.Figure 17a-c show MSE curves for the estimated MS locations, based on the proposed hybrid algorithm and only line intersection algorithm, in the range from 80% to 100% of the occurrence possibility for the general case, for the first, the second, and the third cases, respectively.From the figures, we verified that the proposed hybrid algorithm has better performance for estimating the MS location than only line intersection algorithm, because MSE curves based on the proposed hybrid algorithm are lower than them based on only line intersection algorithm, for all cases.Note that all results in this subsection are similar to them in 5.3.1, (the first set).

Figure 1 .
Figure 1.The MS location estimation based on the ideal TOA trilateration in the general case.Figure 1.The MS location estimation based on the ideal TOA trilateration in the general case.

Figure 1 .
Figure 1.The MS location estimation based on the ideal TOA trilateration in the general case.Figure 1.The MS location estimation based on the ideal TOA trilateration in the general case.

Figure 2 .
Figure 2. The concept of the line intersection algorithm.

Figure 2 .
Figure 2. The concept of the line intersection algorithm.

Figure 3 .
Figure 3.The MS location estimation based on the ideal TOA trilateration in the specific case.

Figure 4 .
Figure 4. Concept of the comparison approach of intersection distances in the specific case.

Figure 3 .
Figure 3.The MS location estimation based on the ideal TOA trilateration in the specific case.

8 .Figure 3 .
Figure 3.The MS location estimation based on the ideal TOA trilateration in the specific case.

Figure 4 .
Figure 4. Concept of the comparison approach of intersection distances in the specific case.

Figure 4 .
Figure 4. Concept of the comparison approach of intersection distances in the specific case.

Figure 5 .
Figure 5. (a) Comparison of the original circles and the extended circles.(b) Enlarged version focusing on the small circle.(c) Triangle formed by the three points of the original MS location and the estimated two locations of the advanced TOA trilateration algorithms.

Figure 5 .
Figure 5. (a) Comparison of the original circles and the extended circles.(b) Enlarged version focusing on the small circle.(c) Triangle formed by the three points of the original MS location and the estimated two locations of the advanced TOA trilateration algorithms.

11 d and 12 d are compared to 1 R , and 21 d and 22 d are compared to 2 R
k th intersection point of the small circle with another large circle.Next, the distances related to the l th large circle are compared to the radius of the l th large circle; .If all distances related to the l th large circle are shorter than the radius of the l th large circle ( 11dand 12 d are shorter than 1 R , and 21 d and 22 d are shorter than 2 R

Figure 6 .
Figure 6.Flow chart of the proposed hybrid algorithm based on the line intersection algorithm and comparison approach of intersection distances.

Figure 6 . 2 Figure 7 .
Figure 6.Flow chart of the proposed hybrid algorithm based on the line intersection algorithm and comparison approach of intersection distances.

Figure 7 .
Figure 7. Flow chart of the mode selection algorithm.

Figure 8 .
Figure 8. MSE curve of the estimated distance for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 8 .Figure 9 .
Figure 8. MSE curve of the estimated distance for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 9 .
Figure 9. MSE curves for the estimated MS locations based on the proposed hybrid algorithm and the conventional algorithm, of the first scenario for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 10 .
Figure 10.MSE curves for the estimated MS locations based on the proposed hybrid algorithm and the conventional algorithm, of the second scenario for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 10 .Figure 11 .
Figure 10.MSE curves for the estimated MS locations based on the proposed hybrid algorithm and the conventional algorithm, of the second scenario for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 11 .
Figure 11.MSE for the estimated MS locations based on the proposed hybrid algorithm and the conventional algorithm, of the third scenario for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 12 .
Figure 12.MSE curves for the estimated MS locations based on the hybrid TOA algorithm and only line intersection algorithm, for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 12 .
Figure 12.MSE curves for the estimated MS locations based on the hybrid TOA algorithm and only line intersection algorithm, for (a) the first case, (b) the second case, and (c) the third case, for the first set.

Figure 16 .Figure 16 .
Figure 16.MSE curves for the estimated MS locations based on the proposed hybrid algorithm and the conventional algorithm, of the third scenario for (a) the first case, (b) the second case, and (c) the third case, for the second set.

Table 2 .
Comparison Approach of Intersection Distances.

Table 2 .
Comparison Approach of Intersection Distances.
1 , to d 11 and d 12 .6. Compare the increased radius of C2, R 2 , to d 21 and d 22 .7. a. d 11 < R 1 and d 12 < R 1 , and d 21 < R 2 and d 22 < R 2 estimated distance between MS and ith BS ( xL , ŷL ) estimated MS using line intersection algorithm ( xC , ŷC ) estimated MS using comparison approach of intersection distances (x l , y l ) coordinate of the center of the lth large circle (α k , β k ) coordinates of the kth intersection point of the small circle with another large circle