Performance Improvement Design of Bluetooth Low Energy-Based Wireless Indoor Positioning Systems

)e systematic design of wireless indoor positioning systems can offer another essential approach to achieving the required performance objectives aside from using suitable location determination algorithms. )is manuscript investigates Bluetooth Low Energy(BLE-) based wireless indoor positioning systems and how adjusting the system design parameters can affect their location determination performance. Without placing emphasis on sophisticated location determination algorithms, this work provides guidelines for how a system designer can control the balance among multiple positioning performance metrics. For example, a balance between the number of installed reference nodes and the accuracy performance can be chosen to control deployment costs, such as the installation expense, infrastructure expense, and installation time. To demonstrate our baseline study, we compare three different designs of BLE wireless indoor positioning system that utilize location determination algorithms based on proximity, trilateration, and scene analysis. )ese designs are also compared over two different building sizes, which are medium and large. )e design model and performance analysis data were based on our actual implementation of the hardware and software system for a BLE wireless indoor positioning system. Specifically, the received signal strength indication data were collected from our prototype reference nodes. )e findings from our study indicated that a proximity-based system can only provide fair location accuracy performance (average error distance of 5m to 7m) making it unsuitable for applications that require high accuracy. For medium location accuracy performance (average error distance of 3m to 5m), the trilateration-based system can achieve the highest efficiency in terms of number of installed reference nodes over the accuracy.)e trilateration-based system can reduce the number of installed reference nodes by 154% to achieve the same level of accuracy as the scene analysisbased system. For good location accuracy performance (average error distance≤ 3m), the scene analysis-based system yields the highest scalability performance in terms of installed reference nodes. )e scene analysis-based system can reduce the number of reference nodes by 40% and 113% to achieve the same accuracy performance when compared with trilateration and proximitybased systems, respectively. Finally, the validation results from the actual installation of Bluetooth-based indoor positioning systems confirmed that our proposed framework can help the system designers to achieve the required performance goal.


Introduction
e successful utilization of wireless indoor positioning systems (IPSs) has been attested in smart manufacturing or Industry 4.0 in recent years [1]. e development and implementation of many other interesting indoor locationbased applications, such as in healthcare, building management, and disaster preparedness, are expected to increase the global IPS market size significantly from USD 6.1 billion in 2020 to USD 17.0 billion by 2025 [2]. Indoor localization technologies based on Wireless Local Area Network (WLAN), ZigBee, Ultra-WideBand (UWB), Visible Light Communication (VLC), and Bluetooth Low Energy (BLE) are examples of wireless IPSs that exploit wireless communication technologies to solve the indoor localization infrastructure problem. ese technologies were introduced in response to the lack of reference signals, which are an essential part of the positioning infrastructure, available from global navigation satellite systems (GNSS). e main reason for this shortcoming is that the GNSS signal cannot penetrate well inside buildings [3]. Many researchers have worked on improving the IPSs using various location determination algorithms to achieve the goal of greater location accuracy [4,5]. However, designing an IPS infrastructure that considers the accuracy performance requirements as a major design objective can represent another approach to be investigated by researchers.
ere are two basic approaches that have been used to design wireless IPSs: the existing infrastructure design approach and the new installation design approach [3]. e first approach involves using the existing wireless network infrastructure to estimate a target location. e advantage of this approach is that it eliminates expense and the need to develop a special network infrastructure. is results in a less time-consuming design, which is the first process for deploying IPSs [5]. Examples of existing researches that focus on the development of IPSs using the existing infrastructure design approach are in [6,7]. e authors of [6] presented the development of IPSs based on WLAN fingerprinting, which can solve the problem of missing access points (APs) inside AP-dense shopping malls. e authors exploited the existing IEEE 802.11 b standard WLAN infrastructure in a large venue, which had 1,734 APs installed. In another study, the authors of [7] proposed an indoor positioning solution based on the available WLAN infrastructure in public indoor spaces such as airports. eir system aimed to provide a standalone indoor positioning service that operated with 220 different service set identifiers (SSIDs) emitted from APs.
However, this type of design approach requires an intelligent positioning algorithm in order to compensate for the lack of sufficient positioning infrastructure. More precisely, the existing infrastructure cannot achieve an acceptable radio signal requirement for the IPSs, such as minimum received signal strength (RSS) from the APs. e main reason why the existing wireless communication infrastructure such as WLAN cannot support the location determination performance goal for the IPSs is that it was originally designed only for data communication purpose. In other words, the network was designed to satisfy the data rate or the user's capacity requirements with minimum interference among APs [3]. erefore, adjusting the number of existing APs or relocating them to improve the IPS's performance can lead to major changes or degradations in the network performance of existing telecommunications networks, such as by reducing the quality of service, capacity, and coverage [4].
For the second design approach, a new installation design can be developed to improve location determination performance, and the system designer could have more flexible control over both communication and positioning systems. For instance, the density of wireless APs used as communication or reference nodes (RNs) for positioning can be efficiently determined by applying various optimal node placement designs for the IPSs [3]. In [8], the aim of the indoor positioning applications was to determine whether the object was inside or outside a room; therefore, the RNs could be deployed with low density. In related literature, many IPSs have been designed to accommodate new hardware installation for their positioning infrastructure. e authors of [9] proposed an indoor positioning system based on Bluetooth technology. A total of 56 Bluetooth nodes were installed inside a shopping mall to capture a variety of relevant metrics related to consumer behavior, such as shopping duration per visit. In [10], the authors presented an optimizing sensor placement approach for indoor localization in an ambient assisted-living environment called Smart-Condo. eir work focused on how to achieve the maximum coverage of the sensing field in the living room through optimal sensor placement. e goal of their IPS was to track the location and movement of individuals within their living spaces, such as if the presence in the bathroom correlated to personal hygiene activities. ese examples of design approaches take advantage of new infrastructure installation that allows more efficiency and flexibility in the delivery of location-based services.
In the recent literature, works related to the IPS design problem that concentrate on RN placement problems either focus on enhancing the efficiency of the system design approach or investigate the impacts of RN placement [11][12][13][14][15].
ese existing works propose different system design solutions to meet their required localization goals. In terms of system design, a number of positioning performance metrics have been taken into account, such as improving system robustness [11], maximizing radio signal coverage [12], reducing the effect of noise and interference [13], minimizing estimating error [14], and addressing similar location fingerprint information [15]. However, a design objective in terms of what the required number of RNs should be and their optimum locations for achieving a target positioning performance goal under different indoor positioning algorithms has not yet been investigated in the existing works.
Based on these knowledge gaps, how to balance a sufficient number of installed RNs and achieve location accuracy to meet the required performance goals for different indoor positioning applications is still an open research problem in the current literature. Due to the number of technology, technique, and algorithm combinations for IPSs, seeking to provide the exact design analysis for the stated problem is no trivial matter. erefore, this work selects the example of an indoor positioning system based on Bluetooth Low Energy [16] technology since we have already developed and deployed a prototype of this system in our own research center. is wireless technology is intended for short-range wireless transmission with low energy consumption and low cost [16,17].
However, our design approach is a framework that could be applicable to other IPSs as well. e results of our design analysis are in the form of an approximation chart which can be considered as the recommended baseline for finding performance design points. e system designer can use the chart to strike a balance between accuracy, the number of RNs, the fingerprint granularity, suitable application, and the dimensions of the service area. e design analysis in this work is based on three different groups of indoor positioning algorithms, which are proximity, trilateration, and scene analysis. Note that the proposed Robust-Maximum Summation of Max RSSI (R-MSMR) developed previously [11] is used in this work to design the wireless IPS infrastructure. e remainder of this article is organized as follows. In Section 2, we explain our prototype Bluetooth Low Energybased indoor positioning system used in this work. en in Section 3, we describe our proposed framework for creating a recommended baseline for designing IPSs. Section 4 details the experimental environment and the setup parameters used in this work, while the experimental results are reported and discussed in Section 5. e developed design baseline is validated with the actual implementation of an indoor positioning system in our research facility. Finally, the conclusion and discussion of our proposed framework and future work are presented in Section 6.

Indoor Positioning Using Bluetooth Low Energy
Bluetooth technology has been primarily developed for short-range wireless transmission with low power consumption and low cost [16,17]. en starting with the release of the Bluetooth 4.0 specification [17] in 2010, Bluetooth Low Energy (BLE) is an attractive wireless technology that can be applied to indoor positioning systems. Over the subsequent years, BLE has been applied for location-based services, ranging from proximity detection to positioning in real-time location system (RTLS) [18]. Moreover, the BLE technology is readily available on almost all portable devices such as smartphones and electronic development kits [4]. e widespread adoption of BLE technology such as Bluetooth beacons [19] allows end users to enjoy easy access to many important features of IPSs such as navigation and tracking services. us, this current research adopts the BLE technology and takes the new installation design approach to investigate how the systematic design of an IPS can be applied to achieve a required performance objective for different indoor location-based applications. Figure 1 illustrates the system architecture of our BLEbased indoor positioning system. In this work, the developed IPS is a real-time location system in which Bluetooth tags (attached to objects or held by users) are tracked for their location inside an area with Bluetooth locators. Note that the Bluetooth tag is equivalent to the target node, while the Bluetooth locator is referred to as the reference node (RN) in this work. e four main components of our system consist of target nodes, reference nodes (RNs), a communication network, and a processing unit. e first component is the target node, such as a BLE tag. It is an active RFID card that can continuously broadcast a BLE's beacon signal as a BLE message. e BLE messages (with their tag ID) or beacons are typically transmitted periodically over a short duration. e interval between beacon transmissions can be set anywhere between 100 milliseconds and up to five seconds. Figure 2(a) illustrates a target node used in this work. It is a common off-the-shelf (COTS) Bluetooth beacon card from Minew Tech [20]. e dimensions of the device are approximately 90 mm × 60 mm × 4 mm. We can configure this BLE tag's beacon broadcast interval and transmit power via any mobile phone with a Bluetooth interface. e BLE tag is based on an nRF52 series chipset from Nordic Semiconductor [21]. Note that the broadcasting interval of the BLE tag was set to one second in our system. e transmit power and typical receiver sensitivity for the BLE tag (target node) were set to +0 dBm and −93 dBm, respectively. With these settings and specifications, the range of these BLE transceivers for indoor use with non-line-of-sight (NLOS) is approximately 25 meters based on our experiment. e second component of the systems is a group of RNs or Bluetooth locators. ese are embedded system devices that can support two wireless technologies, which are BLE (IEEE 802.15.1) and WLAN (IEEE 802.11 b/g/n). Both interfaces are operated in 2.4 GHz unlicensed Industrial Scientific and Medical (ISM) bands. e BLE interface on the device is used to communicate with the BLE tag for assisting with location finding, a.k.a. a Bluetooth locator. e WLAN interface is used for data communication with a server called a processing unit which helps with estimating the location of the tag.
is RN device was developed by the National Electronics and Computer Technology Center (NECTEC) as shown in Figure 2(b). Its Bluetooth interface is based on the nRF52 series chipset [21], while the WLAN or Wi-Fi IEEE 802.11 b/g/n interface is based on the MediaTek MT7688 chipset [22]. e RN device requires a micro-USB-based power input of 5.1 V/2.5 A and it is always on with no sleeping interval. e dimensions of the RN device are approximately 120 mm × 170 mm × 30 mm. Note that, in this work, we utilized all three advertising channels (channel numbers 37, 38, and 39) of the IEEE 802.15.1 standard for the BLE devices (both target node and RN) to avoid interference from WLAN networks inside the buildings. e transmit power and typical receiver sensitivity of the Bluetooth interface for the RN device were set at +4 dBm and −93 dBm, respectively. e main operation of the RN is to collect the beacon signal or BLE message from the target node and determine the received signal strength indication of the message with a timestamp. Every three seconds, the RN will gather a number of BLE messages with their RSSIs and put these data in a WLAN message. en, the WLAN message will be sent as a report message to the processing unit via the Wi-Fi communication network. e WLAN message consists of BLE tag IDs such as UUID, measured RSSIs, and timestamps. Note that, in our experiment, we only gather the data for stationary nodes.
Every RN in the area of the IPS will send report messages to the processing unit via the Wi-Fi communication network as shown in Figure 1. Since the RNs are installed all over the area and the beacon message from a BLE tag can be received by multiple RNs near the tag, multiple report messages can be combined at the processing unit for location estimation. e processing unit can be a cloud server or a local server. It does not have to be in the same Wi-Fi network. e processing unit is a centralized positioning server that consists of a location engine or location estimation algorithm, dynamic database, and display system. In this system, the positioning or location estimation is done at the centralized server to reduce the workload at the limited computing capacity of the RN devices. Also, in this work, we set the height for the RN device at 2.5 meters above the floor and for the target node at 1 meter above the floor. Table 1 summarizes the hardware specifications of the reference and target nodes used in this study.

Design of Performance Improvement Baselines
In this section, we present the framework used for designing the indoor positioning systems (IPSs). e outputs of the framework are the design results which will be used as the baselines for our positioning performance comparison and performance improvement. is section is divided into five subsections: overview of the framework, automatic map assignment, reference node placement design process, empirical regression model, and performance evaluation. Figure 3 illustrates an overview of the system design framework for IPSs which will be used to provide the performance improvement baselines. is framework is divided into four stages: input assignment, placement design, empirical regression model, and performance evaluation. Using the proposed framework as a tool to create a design baseline for a particular type of IPS, the system designer can fine-tune its localization performance metrics, such as accuracy and number of reference nodes, to strike a balance for a certain indoor positioning application. e first stage of the framework starts with generating a set of input parameters for the system design by using the proposed auto map assignment.

Overview of Recommended Design Baseline Framework.
is process automatically determines the initial inputs for designing the IPS, which will be discussed in Section 3.2. After obtaining the input parameters from the first stage, the optimization design approach developed in our previous work [11] is used in the second stage for designing the RN placement of the IPS. A brief description of the design approach will be discussed in Section 3.3. Next, in the third stage, the proposed empirical regression model is used to generate the RSS vector for the target locations and the location fingerprinting database. e parameters of the regression model were extracted from real measurement data of our prototype indoor positioning system. en, the indoor positioning algorithm in the fourth stage is used to evaluate the performance results of the optimal RN placement in which the evaluation output is an average error distance of the estimated locations. Note that an evaluated algorithm is selected from one of the three positioning algorithms: proximity, trilateration, and scene analysis. is fourth stage will be discussed in Section 3.5. Finally, we obtained the RN placement result (number of required RNs) and the accuracy performance (average error distance), which are used to create the recommended baseline for designing the IPS.

BLE Tag
Reference node 1   convert the pixel domain of the image to the actual x, y-coordinate domain corresponding to the dimensions of the building. en, the results will be used for assigning the wall coordinates for the service area. e edges/boundaries of polygon areas in the image are detected, and these are used to create the uniform virtual grids inside the polygon areas. e distance between the two closest physical positions of the virtual grids is determined by the STP granularity (G s ). ese virtual grids are sets of the locations for the STPs that will be used for designing the RN placement in the next step. Figure 4 shows the results of the AMA process inside our laboratory building. e black crosses inside the polygon area represent the locations of the virtual grids, i.e., the STPs. In this case, the value of the STP granularity is set to two meters (i.e., G s � 2 meters 2 ).
Next, to obtain the candidate sites (CSs) for installing the RNs, the CS selection procedure is used to determine the sets of the RN candidate locations on the wall. Instead of considering a large number of continuous coordinate locations on the wall, in this work, we only selected the discrete coordinate locations on the wall that have the closest distance to the virtual grid locations under the threshold distance condition. Specifically, the threshold distance between the two closest locations must be less than half the size of the STP granularity. Consequently, the candidate locations of the RN are assigned on the wall whereby these locations are close to the virtual grid locations. Figure 4 also shows the candidate locations of the RN that are assigned on the wall, which are denoted by the red circles. Finally, we obtained two sets of input parameters that will be used for designing the RN placement. ese sets are the signal test points (STPs) and the candidate sites (CSs).

RN Placement Design.
For the reference node (RN) placement design, the previously proposed Robust-Maximum Summation of Max RSSI (R-MSMR) system design [11] is used to put a suitable number of RNs in place and to determine their optimum locations.
eir placements are provisioned to support different localization algorithm requirements. e R-MSMR design is based on the Binary Integer Linear Programming (BILP) approach in which the proposed design employs the simulated annealing (SA) approach to solve the design problem for wireless IPSs. e objective function of the R-MSMR design is to determine a maximizing summation of the maximum RSS at the STPs received from the installed RNs in the service area. e objective function is written in where S ij represents a binary {0, 1} variable that equals 1 if the STP i is assigned to RN j; P ij represents the RSS that STP i receives from RN j; T denotes a set of STPs; and B represents a set of CSs. e R-MSMR design process consists of two phases. Phase I is used to generate a good starting solution that provides a sufficient number of installed RNs (N S ) (i.e., a minimum starting number), which is calculated based on the dimension of the service area. In Phase II, the simulated annealing (SA) approach is used to determine the optimal locations of the RNs based on the number of RNs obtained   from Phase I. Finally, the optimal RN placement solution for the IPS is obtained. More details and explanations about the operation of the R-MSMR design can be found in [11]. Note that we assigned the accuracy index (α) differently according to the calculation requirements of different indoor positioning algorithms when designing the RN placement. For example, in scene analysis algorithm, each STP must be able to receive signals from at least four installed RNs in the service area in order to handle the symmetrical RSS problem [23]. is means that the accuracy index of the IPS infrastructure for scene analysis is equal to four. us, in this study, the accuracy index is set to α � 1 for proximity, α � 3 for trilateration, and α � 4 for scene analysis.

Empirical Regression Model.
After obtaining the optimal RN placement solution based on the selected indoor positioning algorithm, two sets of data are generated for performance evaluation. ese two sets are the location fingerprinting database and the test points (i.e., target locations). Note that the location fingerprinting database is only used for the scene analysis algorithm. To generate the fingerprint locations, the AMA technique for generating the signal test points (STPs) described in Section 3.2 is used again in this stage. We assign the distance between the two closest physical positions by fingerprinting granularity (G f ) instead of by the STP granularity (G s ). en, we obtain the fingerprint locations as a uniform grid. To create the test points, the number of test points is computed by using Taro Yamane formulation with a 95% confidence level [24], while their locations are randomly selected inside the edge boundary.
Next, an empirical regression model is used to capture the radio propagation characteristics of the wireless signal inside the indoor environment. en, it is used to create the RSS vectors for the location fingerprinting database and the target locations corresponding to the optimal RN placement obtained from the R-MSMR design. e empirical regression model represents the relationship between the RSS and the physical distance and was derived from the actual set of RSS measured inside the service area. To create the empirical indoor regression model, a total of 8,000 RSS collected from our prototype of the developed reference node are used. e set of collected data inside the service area is given as input data for the curve fitting function in the MATLAB tool [25].
In our study, the numerical fit result that has the best fitted coefficients and goodness of fit statistics was a linear polynomial regression model with three degrees. us, the third-degree polynomial function was applied as the indoor radio propagation model for simulating the RSS vector inside the considered building. e polynomial function of the curve fitting for the BLE devices that is used in this work  (2) Moreover, to make the RSS value close to the real measurement data, this work considers the fluctuation nature of the RSS value by employing the shadow fading that applies the uniform distribution. is uniform signal generating function can provide results closer to those using the real measurement for an indoor environment than other distribution models, such as normal distribution [26]. e empirical regression model with the signal fluctuation is written in (3), where f reg (d) is the RSS generation equation that consists of the empirical regression model at physical distance d as equation (2) and the shadow fading effects with the uniform distribution.
where U(a, b) refers to the shadow fading effects value that is obtained by applying the uniform distribution; a and b denote the upper bound and the lower bound of the RSS fluctuation. In this work, we set the upper bound and the lower bound with the standard deviation values of the collected RSS, which are approximately +5 and −5 dBm, respectively.

Performance Evaluation.
After generating the location fingerprinting database and the test points in the previous stage, the performance of the optimal RN placement associated with the selected indoor positioning algorithm is evaluated in this stage. Each indoor positioning algorithm, which consists of proximity, trilateration, and scene analysis, is used to estimate the test point locations. Brief descriptions of the three different indoor positioning algorithms are as follows.

Proximity Is Simple to Implement by Using Only the RSS Values from the Transmitter (e.g., RN).
is technique provides only relative location information.
e performance of this algorithm depends on a dense grid of antennas to identify the target location. When the target node is detected by a particular RN, it is reported as if the node is at the same location as the RN [27,28]. To determine the position where the target node is located in this work, the proximity algorithm selects the location of the RN that has the highest value of average RSS (s n ) among n RNs as the location where the target node is situated.
is can be written in location � arg max n s n .

Trilateration Uses the Geometric Characteristics of
Triangles to Determine a Target Location. It has two types: lateration and angulation. e lateration method determines the target position by using the relationship of the distances between various transceivers, while the angulation method estimates the target position by exploiting the relationships of the angle direction lines between the transceivers. In this work, triangulation based on the lateration method with an RSS-based (or signal attenuation-based) range estimation is used to estimate the target location [27,28]. e equation of the triangulation based on lateration is given by where d 1 , d 2 , and d 3 refer to the sphere radii of three circles, in which they are equal to the estimated distances between the target location and each RN. Each estimated distance was computed by exploiting the empirical indoor regression model in (2). Finally, the x and y coordinates of the target can be computed by using simplifying equations (5) to (7) that yield the following solutions:

Scene Analysis Utilizes the Characterization of an
Indoor Radio Propagation at Is Associated with the Particular Location. ey require a calibration training phase to compile a radio map of the service area (i.e., the location fingerprint database), before the location estimation algorithm is used to calculate the estimated position during the online estimation phase [27,28]. In this work, the popular and simple distance metric algorithm called the Euclidean distance algorithm was used to estimate the target location.
e Euclidean distance calculation is written in the following equation: where D i is the Euclidean distance between the fingerprint location ith and the target location; note that i � 1, 2, . . ., M, where M is the number of the fingerprint locations. N is the number of installed RNs. e variable r i n denotes the average RSS of the fingerprint location ith received from nth RN.

Experimental Setups
To provide the recommended design guidelines for IPSs, several aspects of network planning for the IPS system design are investigated, such as the relationship between the number of required RNs and the IPS performance in terms Mobile Information Systems of the accuracy performance. e core investigation of this study can be divided into four objectives: (1) To evaluate the computational complexity of the proposed system design framework (this will be discussed in Section 5.1) (2) To analyze the performance of three different indoor positioning algorithms under different scenarios in terms of the number of installed RNs (this will be discussed in Section 5.2) (3) To provide guidelines on how a system designer can control the balance between multiple positioning performance metrics (this will be discussed in Section 5. e total area per floor for the large building is 3,600 meters 2 . Figures 5 and 6 illustrate the floor layouts of Building M and Building L, respectively. A total number of 113 and 263 test points (i.e., target locations) were randomly selected for Building M and Building L, respectively. For performance evaluation, three different indoor positioning algorithms were tested, which include proximity based on the strongest signal approach, trilateration RSS-based approach, and scene analysis based on the Euclidean distance approach. For the scene analysis approach, three different fingerprinting granularities (G f ) were assigned, which were 2, 3, and 4 meters 2 . e parameters used for the performance evaluation of the IPSs are described in Table 2.
For the R-MSMR system design, we assigned the STP granularity (G s ) to be 2 meters 2 and conducted three value tests of the accuracy index (α) according to the different indoor positioning algorithm requirements. We assigned α value of 1 node for proximity, 3 nodes for trilateration, and 4 nodes for scene analysis. We set the RSS sensitivity threshold (P T ) to be equal to −93 dBm as the typical sensitivity of the wireless transceivers used in this study. We defined the parameter settings of the R-MSMR design on SA terms with the control temperature φ � 0.9, the acceptance probability (P) � 0.8, the finishing temperature τ stop � 0.01, and the number of consecutive iterations that allow the search to proceed without improvement n worse_max � 2,000. Note that in this study we only considered the IPS during normal situations in which all RNs operated properly.
us, the value of its reliability index R � 0. More details and explanations about the operation of the R-MSMR design can be found in [11,29]. e input parameters of the R-MSMR placement design problem are summarized in Table 3.

Results and Discussion
In this section, the recommended baseline of finding performance design points is proposed. First, in Section 5.1, the computational complexity of the proposed system design framework is evaluated. Section 5.2 presents a comparison of three different designs of BLE-based wireless IPS that utilize location determination algorithms based on proximity, trilateration, and scene analysis. Next, in Section 5.3, we provide a baseline framework that system designers can use to achieve their required performance goals, such as selecting the number of RNs to strike a balance for certain indoor positioning applications. Finally, the proposed indoor positioning system design is validated in Section 5.4.

Computational Complexity of the System Design
Framework. Table 4 reports the computational complexity of the proposed system design framework. e four stages for creating the design baseline described in Section 3 were evaluated by using the evaluating run-time complexity of the mathematical big-O notation. A worst-case computational complexity was evaluated to predict the upper bound of the growth rate of stage [30]. e results in Table 4 show that the second stage (RN placement design stage) has the highest computational complexity compared to the other stages in which a worst-case computational complexity of the second stage is O(n 2 log n), where n refers to the dimensions of the service area. is high computational complexity is due to the simulated annealing approach used to solve the optimization design problem. Moreover, when comparing the computational complexity of three different algorithms in the fourth stage (the performance evaluation process), we found that the trilateration algorithm has the highest computational complexity of O(n log n), while the proximity and the scene analysis report a similar computational complexity of O(n). Note that the evaluating run-time complexity does not include the running time requirement to construct databases during the offline phase.

Performance Comparison of Different Indoor Positioning
Algorithms. In this section, we compare the accuracy performance of different IPSs under fixed numbers of RNs. Building M with an area of 1,600 m 2 was used for the performance evaluation of three indoor positioning algorithms which consist of proximity, trilateration, and scene analysis with G f � 2. Our proposed framework as described in Section 3 was used to design three different IPSs in which the number of installed RNs was set at 20, 30, 40, and 50 nodes. Other parameter settings for designing IPSs are shown in Table 3. Figures 7(a), 8(a), and 9(a) illustrate the results of three different placements of 20 RNs obtained from our proposed framework, including proximity, trilateration, and scene analysis algorithms, respectively. e red circles in Figures 7(a), 8(a), and 9(a) represent the locations of the installed RNs, while the green crosses in Figure 9(a) refer to the fingerprint locations with G f � 2 meters 2 . Considering the results in Figures 7(a), 8(a), and 9(a), we observe that the RN placement that deploys the proposed framework can achieve optimal node density while providing radio signal coverage over the service area. is means that the installed RNs are distributed across the service area while maintaining high quality radio signal coverage requirements. In particular, our proposed framework ensures that the number of RSS from a particular RN inside the service area is at least equal to the indoor positioning algorithm requirements.
is is the key to achieving the required performance goals with any IPS.
In Figures 7(a), 8(a), and 9(a), we also observe that all twenty RNs for all three IPSs are placed at similar locations.
is means that proximity and trilateration which have a low number of indoor positioning algorithm requirements (i.e., 1 and 3 of accuracy index) have a large unnecessary number of required RNs. is is non-optimal design for IPSs as the system incurs high deployment costs such as installation expenses, infrastructure expenses, and installation time. For Building M, the proximity and trilateration algorithms can provide an error distance of less than five meters by   e results show the behavior of location determination for three different indoor positioning algorithms. In Figure 7(b), we found that the proximity algorithm provides the lowest accuracy performance.
e average error distance of the proximity algorithm is about 3.73 meters, while the trilateration algorithm and scene analysis algorithm are about 3.47 and 3.02 meters, respectively. e proximity algorithm can provide only a rough estimated location and does not provide the exact location of the target. e proximity algorithm determines the target location by selecting the RN location that has the highest RSS value. We can see that the estimated locations (the red dots) obtained from the proximity algorithm are located at the nearest RNs (the blue crosses) as shown in Figure 7(b). Consequently, the estimated target location is always situated in the boundary of the service area. However, the proximity algorithm is often applied to determine an object at room-level accuracy, such as identifying whether the object is inside or outside the room. us, it is suitable for the indoor location-based applications that do not require high accuracy performance, such as a localization system for a museum that can alert a visitor about the information of a neighboring exhibition [5].  [31] or the estimated distance between the target and the RN is overestimated or underestimated. ese factors result in circles (whose radii are the estimated distances) that do not intersect or are too large with large overlap regions [32]. is is influenced by a noisy channel and the NLOS problem from obstacles inside the building. Figure 9(b) depicts the positioning results of the scene analysis algorithm with 20 RNs. e scene analysis algorithm shows a better accuracy performance than the other algorithms. One advantage of the scene analysis algorithm is that it has a calibration or training phase to collect the real indoor radio propagation in the form of location fingerprints [3]. However, the resolution of the location fingerprints is a trade-off problem in IPSs based on the scene analysis algorithm.
e fine fingerprinting granularity will be very time-consuming during an offline calibration phase, while the coarse fingerprinting granularity will result in poor accuracy performance [23]. Figure 10 illustrates the location performance trend of three different IPSs for Building M. We can see that the increasing number of installed RNs could improve the overall performance of the IPSs. Moreover, we observe that the scene analysis algorithm with G f � 2 yields the highest accuracy performance under the scenarios of 20 and 30 installed RNs in which the average error distance of the scene analysis algorithm is 3.02 and 2.59 meters, respectively. However, when a large number of RNs are installed, the trilateration algorithm provides the highest accuracy performance instead of the scene analysis algorithm. In cases of 40 and 50 installed RNs, the average error distances of trilateration are 2.36 and 2.02 meters, respectively. Unfortunately, this performance gain is achieved at the expense of the unnecessarily large number of RNs installed for the trilateration algorithm. e IPS based on the trilateration algorithm has to add 30 more RNs to improve the average error distance of 1.45 meters (from 20 RNs to 50 RNs). is is an inefficient performance improvement that requires high deployment costs for the IPS, such as installation costs and installation time. us, in the next section, we propose a recommended baseline for finding performance design points to balance between multiple positioning performance metrics.   10 Mobile Information Systems

Design Guidelines for Indoor Positioning Systems.
In this section, we propose the guidelines that a system designer can use to control the balance between the accuracy, the number of RNs, the fingerprint granularity, the suitable application, and the dimensions of the service area. e proposed framework described in Section 3 was used for designing the RN placement based on three different indoor positioning algorithms, which are proximity, trilateration, and scene analysis. Building M with an area of 1,600 m 2 and Building L with an area of 3,600 m 2 were tested, as shown in Figures 5  and 6, respectively. We assigned the fingerprinting granularity G f for scene analysis with 2, 3, and 4 meters 2 areas to  show the different results of the location granularities. For the RN placement design, the number of installed RNs for each IPS started at the minimum number of required RNs as obtained from Phase I of the R-MSMR design [11]. is number of installed RNs will be increased by one until the number of installed RNs is 50 and 70 for Building M and Building L, respectively.
In this work, we assume that there are three performance levels of the IPSs using BLE, which are fair, medium, and good. e levels of positioning performance are divided according to the type of the indoor positioning applications. e first, the fair level, is suitable for indoor positioning applications that do not require a high accuracy results in which the performance level has an error distance of between 5 meters and 7 meters (5 meters ≤ error < 7 meters). ese fair indoor positioning applications require only highlighted locations that users can notice and distinguish immediately, such as for locating an interesting zone in an  exhibition hall [4] and the proximity of gate checking for passengers at the airports [7]. e second, the medium level, provides average accuracy performance results with an error distance of between 3 meters and 5 meters (3 meters ≤ error < 5 meters). e indoor positioning applications for which the medium accuracy level can be applied include the tracking of pallet racking in a warehouse and industrial storage [4]. Finally, the good level is the level with the best accuracy performance, which is in the order of an error distance of less than 3 meters of the actual location (error ≤ 3 m). e kind of indoor positioning applications that are suitable for this good level are those such as estimating the location of important medical equipment in a hospital [4]. Note that the highest performance level of IPSs considered in this study is based on the capability of traditional indoor positioning algorithms. More complex algorithms can provide better location accuracy performance. e level of the location accuracy performance used is summarized in Table 5. Figures 11 and 12 report the accuracy performance of different IPSs for Building M and Building L, respectively. Five performance metrics of the IPSs based on BLE are tested.
e blue solid lines with squares represent the proximity algorithm, while the red solid lines with circles represent the trilateration algorithm, and the purple solid lines with triangles refer to the scene analysis algorithm with G f � 4. e yellow solid lines with dots refer to the scene analysis algorithm with G f � 3, and the green solid lines with diamonds represent the scene analysis algorithm with G f � 2. From the results shown in Figures 11 and 12, we found that the accuracy performance of all IPSs increases in line with the increase in the number of installed RNs as discussed in Section 5.2.
Considering the performance results in Figures 11 and  12, we found that the relationship between the number of RNs and the average error distance for different IPSs is a long tail distribution. e large number of installed RNs returns a small performance improvement. From these results, it is clear that assigning high fingerprinting granularity can improve the accuracy performance of the IPSs for both Building M and Building L, in which scene analysis with G f � 2 is the best IPS compared to low fingerprinting granularities G f � 3 and 4. However, that is more than half of the recording fingerprint locations when compared to deploying low fingerprinting granularity. For example, the 346 fingerprint locations inside Building M must be collected for scene analysis with G f � 2, while scene analysis with G f � 3 and 4 records about 157 and 82 locations, respectively. In other words, scene analysis with G f � 2 takes double the amount of time to construct the location fingerprinting database during the offline training phase. is is a site-survey cost during the deployment period of the IPS based on scene analysis with high fingerprinting granularity.
Moreover, we observe that the positioning performance of scene analysis hardly increases when the number of installed RNs increases. e average error distance of scene analysis is quite stable and corresponds to the value of the fingerprinting granularity. For example, the results in Figure 11 show that the average error distance of scene analysis with G f � 3 (the yellow solid lines with dots) is approximately 3.80 meters when 14 to 50 RNs are installed. is shows an average error distance of higher than 0.8 meters above its fingerprinting granularity (G f � 3) for all numbers of installed RNs. From this observation, the system designer can utilize the value of the fingerprinting granularity to specify the system performance of the IPSs based on scene analysis. For example, the system designer may assign low fingerprinting granularities (e.g., G f � 6) for low location accuracy performance.
From the results in Figures 11 and 12, we found that only the IPS based on proximity can provide fair location accuracy performance, with an error distance of between 5 meters and 7 meters. For example, in the case of Building M as shown in Figure 11, the proximity requires only 7 RNs to provide the average error distance of less than 7 meters (the blue solid lines with squares). is suggests that proximity is more suitable for fair location accuracy performance than trilateration and scene analysis. On the other hand, when considering a high-performance level, such as the good performance level, proximity provides the lowest efficiency in terms of installing RNs for either Building M or Building L. erefore, it is not suitable for location-service applications that require high accuracy due to the larger number of RNs that must be installed inside the service area. For example, in the case of Building M, the proximity-based system must install more than 37 RNs to achieve good location accuracy performance (the blue solid lines with squares), while a system based on scene analysis with G f � 2 (the green solid lines with diamonds) requires only 22 RNs. is is a 68% higher number of required RNs for proximity than for scene analysis. Note that intuitively when increasing the number of installed RNs to approach infinity for the proximity algorithm, the error distance of the IPS should be close to zero. However, the results shown in Figures 11 and  12 indicate that, at 40 to 50 RNs in Building M and at 60 to 70 RNs in Building L, the proximity algorithm has almost constant error performance. e main reason for this is that the number of installed RNs from the design is still small compared to all possible locations in each building. For example, in Building L, there are 760 possible discrete locations as marked by crosses in Figure 4. e ratio of the number of installed RNs over all possible locations can be calculated as 70/760 � 0.092 which is the order of magnitude.
is means that the number of RNs is still smaller compared to the number of all possible locations. us, the error distance still cannot be closer to zero. To lower the error, the number of RNs should be closer to 760 to reduce the error distance. For Building M, there are 346 possible discrete locations. When compared to 50 installed RNs, the similar ratio for Building M can be calculated as 50/346 � 0.144. When comparing the ratios in both Building M and Building L, we can see that the error distance performance in Building M is a little bit better (approximately < 3 m) when the number of RNs is between 40 and 50.
An observation regarding the increasing number of RNs or access points (APs) in the study of Wi-Fi positioning systems was reported in [33], which used the scene analysis algorithm. e author found that there were diminishing returns from adding more RNs or APs whereby doing so would not gain much improvement in accuracy performance for IPSs using the scene analysis algorithm. One possible explanation for this is that the additional signal dimensions from more RNs or APs cannot be used to separate different location fingerprints efficiently in an environment where the RF signal always fluctuates due to fading effect.
Next, we consider the medium location accuracy performance that can achieve an error distance of between 3 and 5 meters. e results in Figures 11 and 12 show that trilateration provides the highest efficiency in terms of installing RNs for either Building M or Building L. For example, inside Building M with an area of 1,600 m 2 , trilateration requires 11 RNs (the red solid lines with circles) in   order to achieve an error distance of less than 5 meters, whereas scene analysis with G f � 4 requires up to 28 RNs (the purple solid lines with triangles). In other words, trilateration can reduce the number of installed RNs by approximately 154% when compared with scene analysis for the same size of service area. is indicates that trilateration has the lowest RN density inside Building M with an area of 1,600 m 2 . From this result, we can conclude that trilateration is suitable for location service applications that require medium location accuracy performance, in which more than half of the wireless infrastructure cost for deploying IPSs can be saved.
Considering the good location accuracy performance with an average error distance of less than 3 meters in Figures 11 and 12, we found that scene analysis with G f � 2 was the most efficient in terms of installing RNs (the green solid lines with diamonds). For instance, the result for Building L in Figure 12 shows that scene analysis with G f � 2 provides the highest scalability performance in terms of installing RNs inside the service area of 3,600 m 2 . It requires 30 RNs to achieve good accuracy performance, whereas trilateration and proximity require up to 42 and 64 RNs, respectively. In other words, the RN density of scene analysis with G f � 2 is approximately 120 m 2 per RN, whereas trilateration and proximity are 85 and 56 m 2 per RN, respectively. is shows that the IPS based on scene analysis provides the highest location estimating performance with the lowest RN density. Specifically, the number of installed RNs is reduced by 40% and 113% when compared to trilateration and proximity, respectively. However, in this case, the system designer must perform the dense data collection of the fingerprint locations to achieve the required performance goal. is is a trade-off between the accuracy performance and the time required to collect the fingerprinting granularity.
Further, we found that only traditional trilateration was able to provide an average error distance of less than 2 meters for both Building M and Building L. For example, from installing 50 RNs inside Building M in Figure 11, trilateration achieved an average error distance of less than 2 meters, whereas other IPSs did not succeed. Nevertheless, this involves increasing the amount of installed RNs for trilateration by 85% (from 27 to 50 RNs) to improve the error distance from 3 meters to 2 meters. Hence, this emphasizes that the increase in the number of installed RNs may be too much and therefore not an efficient performance improvement solution for IPSs, which could lead to overpricing for the installation and effort without gaining sufficient improvement in accuracy performance.
From the relationship between the number of installed RNs and the IPS performance as shown in Figures 11 and 12, we can provide the recommended baseline for finding the performance design points for an IPS based on BLE in Table 6. e system designer can use this baseline table to strike a balance between the accuracy, the number of RNs, the fingerprint granularity, the suitable application, and the dimensions of the service area. For example, if the system designer needs to design an IPS for a location-service application that requires an average error distance of less than 5 meters inside a service area of 3,600 m 2 , the recommended baseline provided in Table 5 suggests that the system designer should employ an IPS based on the trilateration approach, in which the minimum number of required RNs inside the service area is at least 20 nodes. Note that our proposed framework could be applicable for IPSs using other wireless technologies as well. In the next section, we will validate the design baseline/guidelines presented in this section with the actual installation of BLE-based IPSs.

Validation of Indoor Positioning System Design.
To validate the performance of the system design obtained from our proposed framework, a BLE-based IPS that was based on our design guidelines was implemented and evaluated. e location-based application for our NECTEC building was designed for tracking personnel during emergency situations and annual fire drills. e required goal was for the IPS to be able to locate the personnel inside a service area of approximately 3,600 m 2 (a large-sized building as defined in Section 4). e accuracy performance goal was to be able to locate personnel with an average error distance of less than 5 meters or at a room-level accuracy. According to the system design guidelines suggested in Table 6, for a BLE-based IPS with a trilateration algorithm, the minimum number of required RNs is at least 20 nodes.
We evaluated the accuracy performance of a single-floor IPS with two different floor layouts. e 1 st floor and the 3 rd floor of the NECTEC building were tested. e area of the 1 st floor was approximately 3,600 m 2 and the area of the 3 rd floor was approximately 3,700 m 2 . Note that the 1 st floor has a research laboratory and meeting rooms while the 3 rd floor has only office rooms. e floor layouts of the 1 st floor and the 3 rd floor are shown in Figures 13 and 14, respectively. e proposed framework discussed in Section 3 was used to design the RN placement, with the number of RNs set at 23 nodes. e RN placement results obtained from our proposed framework are indicated by the red pentagons in Figures 13  and 14 for the 1 st floor and the 3 rd floor, respectively. Note that we assigned the installation positions of the RNs based on the available wall space. However, the installed positions of the RNs were as close as possible to the design. Examples of installed RNs inside the NECTEC building are shown in Figure 15(a) for the 1 st floor and Figure 15(b) for the 3 rd floor. To evaluate the accuracy performance of the IPS on both floors, thirty test points were randomly selected as shown by the blue dots in Figures 13 and 14 for the 1 st floor and the 3 rd floor, respectively. At each test point, fifty samples of the estimated location results were obtained from a location engine based on the trilateration algorithm at a centralized positioning server. Note that all reference nodes were connected to the Wi-Fi network inside our office building which meant that report messages could be sent to our centralized positioning server inside our building. All location estimation samples of each floor were then averaged to determine the average error distance for that floor. Table 7 compares the location accuracy performance of the IPS obtained from the design baseline in Figure 12 and the actual implementation design. e results in Table 7 indicate that the accuracy performance of the real IPS is similar to the accuracy performance obtained from the baseline IPS. Using 23 RNs, the baseline IPS provided an average error distance of 4.52 meters, while the actual IPS provided error distances of 4.98 meters for the 1 st floor area and 4.13 meters for the 3 rd floor area. ese results indicate that the difference in positioning performance between the baseline IPS and the real IPS is less than half a meter in terms of error distance, that is, 0.46 meters for the 1 st floor area and 0.39 meters for the 3 rd floor area. In particular, the error distance of both actual IPSs did not exceed the specified performance requirement threshold from the design baseline in Figure 12. In this respect, the error distance of both areas was less than five meters. us, we can conclude that the performance of the actual IPSs was in line with the performance prediction obtained from the proposed design baseline.
Based on the results presented in Table 7, it can be seen that the IPS on both floors was able to achieve the required positioning performance goal when the system designer followed the recommendations of the medium location   accuracy performance guidelines and used the design framework that we had developed. In both cases, the accuracy performance did not exceed an error distance of 5 meters. ese validation results confirm that our proposed framework can help system designers to achieve their required performance goals for BLE-based wireless IPSs.

Conclusion
is paper proposed a framework for designing wireless IPSs. System designers can use the framework to control the balance between multiple positioning performance metrics, such as the balance between the accuracy performance and the number of required RNs. e design model and performance analysis data were based on our actual implementation of hardware and software systems for BLE-based wireless IPSs.
e results of analysis reveal that only the proximity algorithm can provide fair location accuracy, which makes it unsuitable for indoor positioning applications that require high accuracy performance. For medium location accuracy performance, the trilateration algorithm provides the highest efficiency in terms of the number of RNs installed for both Building M and Building L. e trilateration algorithm can reduce the number of installed RNs by approximately 154% when compared with the scene analysis algorithm for the same size of service area. is means that more than half of the wireless infrastructure costs for deploying an IPS can be saved. For good location accuracy performance, scene analysis with G f � 2 yields the highest scalability performance in terms of RN installation. e scene analysis algorithm can reduce the number of required RNs by approximately 40% and 113% when compared to the trilateration algorithm and the proximity algorithm, respectively. Moreover, the validation results from the actual installation of the BLE-based IPS confirmed that our proposed framework can help system designers to meet their required performance goals.
Our future works will focus on several aspects of system design and deployment for wireless IPSs based on ultrawideband (UWB) technology. For instance, we could consider the effects of height (z-axis) on the installed RNs, which may influence the performance of IPSs based on UWB technology.

Data Availability
e result data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.