Localization of heating, ventilation, and air conditioning by Walking in Smart Building

Energy saving has been explored over the past decades. Since most of the energy consumption in a building is from the air condition system, the air conditioners in a building are often controlled through a heating, ventilation, and air conditioning (HVAC) system. To control each HVAC unit individually, the locations of HVAC units are essential information. However, manual location identification requires significant labor for a large number of Internet of Things (IoT) devices deployed in a building. In this paper, we propose a Bluetooth low energy (BLE)-based HVAC unit localization method. We assume that a BLE module is attached to each HVAC unit, and then the locations of HVAC units can be estimated using the signal strength of the BLE module, which is observed by site survey of a worker. Our method requires a floor plan containing the physical locations of HVAC units and matches BLEs to the locations on the floor plan by estimation. The site survey can be carried out without visiting the entire site. Instead, the worker is required to follow several walking paths, which reduces the labor cost and time. We evaluated our method in a real office building with 26 BLEs on two floors. The results show that 70% of the BLEs were matched to their correct physical locations.


Introduction
Since smart building technologies are becoming more innovative, they are expected to provide energy efficiency and resident comfort simultaneously using information and communication technologies. Such buildings commonly have a heating, ventilation, and air conditioning (HVAC) system, which can be used to provide services such as HVAC control based on the presence of residents. To realize these services, HVAC units and sensors should connect to the network for more efficient management and control. However, it is necessary to map their network addresses (IDs) with the physical locations to control the HVAC system. Currently, the mapping procedure is carried out manually. For instance, workers turn on HVAC units one by one, and the physical address of each HVAC unit that is turned on is shown on the controller screen. Then, the workers can map the physical address onto the layout map. However, there may be tens of thousands of HVAC units in a large building. Thus, this procedure is unrealistic as it is very time consuming, and it incurs a high labor cost for both the configuration and the validation. Let us assume a hotel or an office building that contains a large number of small rooms with one or more HVAC units inside. Unfortunately, some rooms may not be allowed to access owing to privacy and administrative reasons, and workers may only be allowed to use public hallways. Consequently, they cannot enter these restricted areas to identify the locations of HVAC units.
In this paper, we propose a semiautomatic position estimation method that links network IDs and their physical positions, which will contribute significantly to reduce the management cost. We attach Bluetooth low energy (BLE) modules used in the location estimation technology based on radio field intensity to HVAC units to identify their locations. We assume that we can obtain a floor plan of the building with the locations of HVAC units from the owner or construction manager. Then, we send one tester carrying a smartphone to collect received signal strength indicators (RSSIs) of the BLEs. The tester walks along given routes that are calculated from the floor plan information. Our method focuses on the RSSI peak of each BLE ID while walking in two directions to estimate the potential list of HVAC locations that contain a set of BLE IDs that are possible to be located for each HVAC location.
We evaluated our method in a real office building with 26 BLEs on two floors. The results show that 70% of the BLEs were matched to their correct physical location.

RSSI-based localization
RSSIs are one of the observable characteristics of wireless technologies as they broadcast radio signals to communicate with each other through air. As RSSIs can reflect the distance between the radio transmitter and the radio receiver, they have been utilized for device localization for many years. (1)(2)(3)(4) There are two general categories in the location estimation technique. The first method is a multilateration mathematical method that relies on a signal propagation model (1) to estimate the distance between the Wi-Fi device and at least three surrounding reference access points (APs). The second method estimates the location by matching the observed RSSIs with an RSSI fingerprint database that is prepared offline. Place Lab, (5) Horus, (6) DeepFi, (7) and WiDeep (8) are in this category. However, fingerprinting requires a large amount of human effort to collect RSSI fingerprints in many positions. Jun et al. (9) and Liu et al. (10) reduced the number of collection locations by dividing a floor plan into regions, each of which had its own AP sequence ranked by RSSIs. Although the size of the region affects the number of RSSI collecting locations and the distance error, the AP sequence method itself is robust to environmental noise. (9) There are some studies on how to reduce the human effort required for radio map construction, taking advantage of AP locations. For example, Jingxue et al. (11) and He et al. (12) proposed practical methods of reducing the number of collection locations required to construct a radio map. Specifically, they collected RSSIs at some locations to build the radio map and applied a path loss model (1) to estimate RSSIs at other locations using the AP locations. Amano et al. (13) applied a crowdsourcing technique to estimate the virtual locations of APs and a simulation technique to generate a 3D radio map. However, the virtual AP locations are on the wall of the building because they emphasize the radio map outside the building. In summary, these methods cannot directly be applied to our case. However, the knowledge and experiences of RSSIs are helpful in designing our algorithm.

AP localization
AP localization is beneficial for finding the locations of rogue APs. (14) Hence, there have been studies on the AP localization. For example, Satoh et al. used a directional antenna and the relative distance calculated from RSSIs to estimate AP locations. (15) Han et al. proposed a method of observing the trend of RSSIs collected from neighboring points to calculate the direction of APs. (16) They calculated the direction for each AP to locate it from an outdoor environment. Therefore, their technique does not have limitations such as a lack of location service, multipath, fading, and shadowing.
Shen et al. proposed AP localization by applying the Rayleigh lognormal model, (18) which is a signal propagation model emphasizing the fading and multipath in signal propagation. (17) Even though the Rayleigh lognormal model has good results for an indoor environment, the model does not consider obstacles such as walls and ceilings, which have an impact on the signal strength. In our case, BLE-attached HVAC units are installed above the ceiling, and we collect the RSSIs outside some rooms if the tester has no access permission. As a result, we cannot apply the Rayleigh lognormal model to estimate the relative location because there are several obstacles in our case.
These device localization methods cannot directly be applied to our case as we need to identify the locations of stationary BLE devices installed in HVAC units, without anchor point, or fingerprint information. From this viewpoint, this work is more related to AP localization, where devices are used to localize Wi-Fi access points or BLE beacons in the environment. For example, Wi-Fi AP localization methods, assuming that RSSIs are collected at many locations by a crowdsourcing technique, were proposed in Refs. 19 and 20. Specifically, Chintalapudi et al. proposed that the RSSIs of APs were estimated by collecting RSSIs from each AP to Wi-Fi devices at many locations. (19) The GPS-fixed locations obtained when a tester walks close to windows during the calibration phase were also leveraged.
Our goal is to determine the correspondence between the known locations of HVAC units on a floor plan and their BLE IDs. Since the methods in Refs. 19 and 20 rely on crowdsourcing approaches, where the RSSIs near the APs are eventually obtained, some devices need to be close to APs. However, in our case, it may be impossible for a tester to enter some rooms.

Pedestrian dead reckoning (PDR)
PDR is a popular technique for indoor device localization. It estimates the trajectory of a human by analyzing the number of steps and the head direction of a human holding a smartphone from its embedded sensors. (21,22) Although it is beneficial for smartphones being a self-contained system, its demerit is that the location error due to noise from the sensors is accumulated. (21,22) To cope with this demerit, a technique of resetting location errors by identifying a landmark in the building was proposed in Ref. 21.
In our proposed method, instead of using PDR, we estimate the tester location by providing a set of walking paths for the tester and counting the number of steps. The location error can be reset every time the tester starts walking on a new path. Moreover, our approach does not require the fine-grained location of the human on each path. Hence, we will calculate only the number of steps, which is sufficient to roughly estimate the location of the tester on the given path.

Background
In a building, HVAC units have been used to manage indoor temperature and indoor air quality to improve living quality. Most techniques require the location of the HVAC units as primary information to enable the HVAC management system. Currently, HVAC units are equipped with an Ethernet module for connecting to the central network. The general location identification method requires a worker to go to the location of the HVAC unit and then turn it on. After that, the HVAC unit will connect to the central server, and the worker can see the latest network ID connected to the central server. Consequently, the worker can match the HVAC unit to the location. This operation is repeated until every HVAC unit is identified.
This manual approach is ineffective when a large number of HVAC units are deployed in a large building owing to time-consuming, heavy workload. Thus, we leverage the advantage of a radio signal to perform the localization of HVAC units automatically. We attach a wireless module such as a BLE module to each HVAC device. Hence, we can estimate the locations of HVAC units by analyzing the wireless information from the BLE module.

Problem definition
In this paper, we assume that there are multiple HVAC units, each of which is equipped with a BLE module. The set of BLE module IDs is denoted as B. We also assume that a 2D floor plan  is given where the walkable areas, walls, furniture, doors, and prohibited areas, which are necessary to determine walkable paths P walk , have already been identified when the localization was performed. Each HVAC location is also given as a point on the floorplan, and we let H denote the set of points corresponding to HVAC locations. Obviously, |B| = |H| holds. Finally, we assume that a tester  walks along the paths in P walk with a BLE-enabled smartphone to collect RSSIs from the BLE modules in B.
The localization problem is to find the correct one-to-one matching function : m B H → and a corresponding set P walk of paths to obtain the matching m, where all the paths are contained in the walkable area of  and consistent with the walls of  (no path is blocked by the walls/ furniture/doors).

Algorithm design
Basically, we try to obtain a matching function m by detecting the location with the strongest RSSI for each BLE on the walking paths. Following Ref. 23, we match the BLE module IDs to the HVAC locations by RSSI peak measurement. When tester  passes three BLEs B = {1-1, 1-2, 1-3} at HVAC locations H = {L 1 , L 2 , L 3 }, the application in the smartphone will perceive RSSIs as shown in Fig. 1(b). We can assign BLE IDs "1-1" to location L 1 , "1-2" to location L 2 , and "1-3" to location L 3 .
However, as shown in Fig. 2(b), it may be challenging to generate a suitable walking path to cover all HVAC locations because the walkable paths in a real environment are limited owing to the floor layout and even furniture. For example, in this figure, locations "2-9" and "2-13" are separated by a locker, and no straight walking path can be designed. Therefore, we will discuss how we can design a walking path to collect RSSIs to see the peak order of BLEs in general buildings clearly.
Before designing an algorithm, we have to investigate more precisely the characteristics of RSSIs when we observe them on a walking path. Therefore, we temporarily placed smartphones at eight locations (A to H) as in Fig. 2(c) and collected the RSSIs from BLEs for 30 s. We found that the RSSI of each BLE is not stable and that it cannot represent the distance between the transmitter and the receiver. Specifically, the RSSI of BLE ID "1-2" seems to be similar to that of BLE ID "1-4" when the smartphone is placed under BLE ID "1-2" (location G) as shown in Fig. 3(a). Consequently, the techniques leveraging the measured RSSI directly to estimate the distance between a transmitter and a receiver cannot be applied. Additionally, when we calculated the average RSSI at the eight locations, we found that the average RSSIs of BLEs located in the same perpendicular alignment to the collection direction have similar trends as shown in Fig. 3(b). In particular, BLE IDs "1-2", "1-4", "1-6", and "1-8" have the same perpendicular alignment, and BLE IDs "1-3", "1-5", "1-7", and "1-9" have the same perpendicular alignment. Hence, the RSSIs from BLE IDs "1-2", "1-4", "1-6", and "1-8" have similar trends, and those from BLE IDs "1-3", "1-5", and "1-7" have also similar trends. We consider that the different trend of the RSSI from BLE ID "1-9" is because it is far from the observation point, and its signal is attenuated by two walls.  Since most buildings are rectangular and hallways are usually in both vertical and horizontal directions, we suppose that, when we walk on one side of the building, the peak of the RSSI from a BLE represents the orthogonal projection of the BLE location onto the walking path on that side of the building. Accordingly, if we consider the peak location on both sides of the building, as in Fig. 4, we can estimate the locations of HVAC units (BLE modules) in the 2D region (i.e., floor plan). We will discuss this topic in Sect. 3.5.
To acquire RSSIs, our method requires the tester carrying a smartphone with our application to survey the RSSI of each BLE in the building. Our application collects the RSSIs in the format <l i , rssi 1,i , rssi 2,i , ..., rssi n,i >, where l i is the location of the collection of data using a simple step counter, assuming that the tester follows the designated walking path, and rssi n,i is the RSSI from BLE ID id n at location l i . To estimate the location where the RSSI data are collected, we apply the roughly controlled PDR proposed in Ref. 23. In particular, we give the walking path including the start and stop positions to the tester, and then estimate the step size (meters per step) and the location of the tester for each step.
Nevertheless, we found that the sample size was insufficient when we walked continuously on the walking path. Specifically, we deployed 26 BLEs in the first and second floors of an office building whose size is 18 × 18 m 2 and set the BLEs to broadcast the advertising beacon every 1 s. Our application cannot receive the beacon every second probably because of signal attenuation and collision. Moreover, the RSSI at one location will not be reliable, owing to fluctuation, as seen in Fig. 3(a), where the RSSI changes with a specific range (±10 dB in the worst case). Therefore, we ask the tester to stop at designated locations and collect RSSIs. We will describe this in detail in the next subsection.

Stand and walk scheme
Even though we would like to ask the tester to collect RSSIs by walking continuously, the beacons received by such walking may be inadequate. One reason is that the number of beacon collisions will increase when we densely deploy BLEs in a building. Therefore, we take the average RSSI at each location to obtain more stable and reliable measurements. Hence, the tester needs to stop at designated locations for some time to collect more beacons and calculate the average RSSI before resuming walking again. It is almost impossible for the tester to stand at the correct locations when numerous locations are given to measure RSSIs on a map owing to inaccurate indoor localization deployment. For instance, we need to collect the RSSI at an interval of 1 m to observe the change in RSSI clearly when adjacent HVAC units are close to each other (about 2-3 m). The application gives a walking path on the map. It also shows the current location of the tester on the map. Then, the tester has to go to the starting point of the given walking path from the current location. Considering the case that the tester misunderstands the collection location l i , we apply the roughly controlled PDR (23) during the data collection to address this problem.
To apply the roughly controlled PDR to the data collection, we give walking path p j to a tester with the start point p j,start and end point p j,step on a smartphone application, as illustrated in Fig. 5. The tester goes to the start point and pushes the start button, and our application starts increasing the step count p j,count . After the tester walks p step steps and stops walking for p stand s to collect the RSSIs, the tester repeats this "stand and walk scheme" until he/she reaches the end point. When the tester reaches the end point, he/she presses the stop button to finish recording the RSSIs on walking path p j . After that, the application estimates the step size w stepsize = p j .length/p j,totalcount , where p j .length and p j,totalcount are the total distance of walking path p j and the number of total steps, respectively. To record the location where the tester stands to collect the RSSIs, we define the location l i = (p j , l r,i ) as a pair comprising walking path p j and the relative distance from the start point, l r,i = p j,court × w stepsize .
In reality, the time that the tester spends on our survey method depends on how often he/she needs to stand to collect data and how long he/she collects the RSSIs at each point. Specifically, the tester may spend more time if she/he stands for a long time to collect the RSSIs at every step. However, the RSSI data will be insufficient if they are collected only for a short time. Moreover, the trend of the RSSIs will not be seen if the number of steps p step is increased because the tester may skip the RSSI peak from some BLE modules. Hence, the number of steps p step before collecting the RSSIs and then the time p stand spent collecting the RSSIs should be configured according to the site, and we will show their effect in Sect. 4.

2D localization
In this work, we observe the locations of RSSI peaks of each BLE from two sides of a building. For easy explanation, we define the longer side of the building as the "horizontal side" and the shorter side as the "vertical side". As mentioned earlier, we assume that the floor plan and the HVAC locations on the floor plan have already been identified. We believe that every large building has a floor plan. Another fundamental piece of information is the walkable paths, and we also assume that the floor plan also provides this information. If the floor plan does not provide the walkable paths, they can be generated by some indoor floor plan construction methods (24,25) or can be analyzed manually. Then, we can select the possible walking paths p i ∈ P walk with attribute p i .direction ∈ {"horizontal", "vertical"} from the walkable paths.
For a large building, the tester may not complete a survey within a limited time if the stand and walk scheme is performed on every walking path. Therefore, we calculate and rank the capability of each walking path to estimate the BLE localization. After that, we give the best set of walking paths to the tester, which cover all the HVAC locations from both sides of the building (vertical and horizontal). To reduce the number of walking paths that our method gives to the tester, we calculate the peak location of each BLE and verify which BLE ID is most reliable after the tester stops at the end point of every given path. Our method gives the walking path until the peak locations of all BLE IDs are reliable. The path selection method is given in Algorithm 1. give p i to tester 24: end if 25: end if 26: end for Table 1 Conditions for determining whether RSSIs from BLE at HVAC location L collected on walking path p i are reliable. The algorithm starts by calculating p i .list H , a list of BLEs whose RSSIs can be detected along walking path p i . We can perceive reliable RSSIs from these BLEs if we collect RSSIs along every path. Specifically, we consider that the RSSI of a BLE is reliable if two conditions given in Table 1 are satisfied. Concretely, to assess whether walking path p i is appropriate for observing the correct peak location of the RSSI from the BLE attached to each HVAC L ∈ H, we use the perpendicular distance F dist (L, p i ) between HVAC location L and walking path p i , which can be calculated from the floor plan. There may be some HVAC locations from which perpendicular lines cannot be drawn, as shown in Fig. 6. We can also obtain the number of obstacles F obst (L, p i ) such as walls and doors between physical location L and walking path p i .
In Table 1, there are three conditions for determining which RSSIs from the BLEs can be collected reliably. The first condition is that the perpendicular distance F dist (L, p i ) from HVAC location L to walking path p i should be less than β a (β a = 12 m in this paper). The second condition is that the perpendicular distance F dist (L, p i ) from HVAC location L to walking path p i should be less than β b (β b = 6 m in this paper) and the number F obst (L, p i ) of obstacles between HVAC location L and walking path p i should be less than two. Otherwise, the RSSI of the BLE location is regarded as unreliable.
When the capability list for each walking path is estimated, the walking path with the most significant number of HVAC locations in its capability list is given to the tester. Once the tester finishes walking on the path, the next path is given to the tester. This is repeated until the reliable RSSI data for all the physical locations in H are obtained. Figures 7(a) and 7(b) show the walking paths along which we request the tester to collect the RSSI data. Specifically, the blue circles are actual locations of BLE modules that are deployed in this paper, and the red arrows are walking paths. Note that extracting the locations of the HVAC units in the floor plan is beyond the scope of this study.
Hence, the locations of the BLEs are given as inputs. However, the receiver can receive the beacon from surrounding BLE transmitters over a wide area. Specifically, we will observe the peak locations of BLEs S2, S3, S4, and S5 at the beginning of walking path P2 in Fig. 7(b) when the tester walks on the walking path. As a result, some invalid RSSI peak locations will be introduced into the calculation process. To tackle this problem, we use the capability list p i .list H in our location estimation method. In particular, we will be able to observe the RSSI peak locations of BLEs at HVAC locations S2, S3, S4, and S5 if the tester walks on path P3 in Fig.  7(a) and path P1 in Fig. 7(b) Therefore, we use the RSSI data of these paths to identify BLE IDs located at HVAC locations S2, S3, S4, and S5.
Accordingly, we select HVAC location L if L is in the capability list of horizontal walking path p i and vertical walking path p j (L ∈ p i .list H and L ∈ p j .list H ). We analyze the RSSI data from each BLE ID id k ∈ B received when the tester walks along horizontal walking path p i and vertical walking path p j to find its RSSI peak. We define the 2D peak location when walking along vertical walking path p j . We ignore the RSSIs from some BLE IDs when the average RSSIs from these BLE IDs are weaker than a threshold δ 1 (δ 1 = −85 dB in this paper). Then, we calculate the distance error , , ,

Device-location matching
After generating candidate BLEs for each physical HVAC location, we start matching the BLE IDs to the physical locations. Again, this approach generates a matching function (2) Each BLE ID matched to a location is in the potential candidate list. After calculating set  of all possible matching functions, we calculate the matching score for each matching function M ∈  by using Eq. (3), where the distance between the estimated location of id i and HVAC location L j is the cost metric.
We select k matching functions with the lowest scores as acceptable combinations. Then, we calculate the frequency matrix M freq = (m freq,ij ) from the acceptable combinations, which represents how many times the BLE IDs "id i " are matched to the physical location "L = j". For example, BLE Id "id 1 " is matched to location "L 1 " eight times out of 10 acceptable combinations. After the frequency matrix for selecting matching results is computed, we normalize the frequency to be in the range of 0 to 1. We apply the threshold to select the perfect matching θ m = 3.6. Then, the BLE ID id i is mapped to location L = j when m freq,ij is greater than 0.6.

Experiment
An experiment was conducted in two office buildings with sizes of 18 × 18 m 2 and 26 × 24 m 2 . We deployed 13 BLEs on the upper side of the ceiling on the first floor and another 13 BLEs on the upper side of the ceiling on the second floor (26 BLEs in total) of the first building, and deployed 20 BLEs on the upper side of the ceiling on the third floor of the second building. These BLEs were placed in plastic boxes individually. Therefore, we provided 46 plastic boxes and deployed them close to HVAC units, as in Figs. 2(a), 2(b), and 8(c). In each plastic box, we provided a power supply for the BLE module.
To perform an experiment based on the stand and walk scheme, we developed an android application to collect the RSSIs of the BLEs. During the collection of the RSSIs, we requested the tester to carry the NEXUS6P and walk on the assigned walking path. Note that the experiment was conducted in an uncontrolled environment, i.e., other people carried out their normal activities during collection.

Evaluation
In this experiment, we measured the performance of our algorithm in terms of precision and recall. Specifically, after we created the candidate list, which was a set of BLE IDs for each BLE location, we calculated the true positive TP, which was 1 if there was a correct answer in the candidate list and 0 otherwise. We also calculated the false positive FP and false negative FN. Finally, we calculated the precision and recall as ( )

Walking path selection
In this section, we discuss the effect of path selection. First, we assumed that the walking paths had been identified from the floor plan. There are 20 walking paths on the first floor and 15 walking paths on the second floor. After that, we applied our path selection method. We were able to reduce the number of walking paths that need to be given to the tester, as shown in Table 2.

Performance of candidate estimation using 2D peak localization
In this section, we discuss the performance of our 2D localization. We gave the selected walking paths to the tester through our smartphone application. The tester performs the stand and walk scheme following the instructions on the smartphone application. In this experiment, the tester stopped for 20, 15, and 10 s to collect RSSIs after walking one step, and we measured precision and recall, the results of which are given in Table 3. Table 2 Walking distances required to collect RSSIs before and after applying path selection. We found that the results for the data collected with the p stand of 10, 15 and 20 s were similar. Although the average value is sensitive to noise, the results obtained from other methods such as the median and mode were the same. The reason is that the RSSIs of each BLE were unstable, and the tester carried one device and stood for p stand s to collect the RSSIs. When we use the median and mode to remove outliers, we need to collect sufficient data at the same time. For example, it is necessary to carry many phones to collect the data, and this method will create a burden on the tester.
In our algorithm, there is another parameter, the distance between collection locations, which is necessary to adjust. To measure the effectiveness of the distance between collection locations, we set the standing time to collect the RSSIs to 10 s. Then, we investigated three scenarios in which the tester walks one, two, and three steps before stopping to collect the RSSIs, and we measure precision and recall, the results of which are given in Table 4.
In this experiment, the tester spent 20, 10, and 7 min for collecting the RSSIs on the first floor and spent 16, 8, and 5 min for collecting the RSSIs on the second floor when the tester stopped 10 s after walking one, two and three steps, respectively. We can see that the recall values in Table 4 decrease when we increase the gap between collection locations by increasing the walking step p step . The reason is that when the tester increases the walking step p step , he/she will not collect the RSSIs at the peak location. This increases the error of the estimated peak location compared with that when p step = 1. As a result, the peak locations of many BLE IDs will be projected to the same location.
On the basis of the above results, we applied the parameters p step = 1 and p stand = 10 to the data collection from the second building. We found that the recall cannot be 1.0 when we apply the parameter δ 2 = 5, as in the first building, to the second building's dataset. As a result, we set δ 2 to 7 (δ 2 = 0.27 × width of the building) so that there are many candidates for each location, as shown in Table 5. Table 4 Performance of our algorithm for generating candidate list with different numbers of steps before standing to collect RSSIs.

Matching performance
We start this section by generating all possible matching combinations from the candidate lists from the previous section. We also calculate the score for each combination using Eq. (3). After that, we select the matching functions with the k lowest scores and compute the frequency matrix to select the matching result. Note that we set k to 10 in this experiment. After the frequency matrix is computed, we normalize the frequency to range from 0 to 1. We apply the threshold to select the perfect matchings θ m = 0.6, and the perfect matching can be seen in Tables 6(a)-6(c).
In these tables, we mark with green the cases that the BLE ID is matched to the correct location, with red the cases that the BLE ID is matched to the incorrect location, and with gray the case for which we are uncertain whether to match a BLE ID to that location. The results for the first building are shown in Tables 6(a) and 6(b). We cannot match three BLE IDs and two BLE IDs to their correct locations, respectively.
In Table 6(c), there are two locations ("3_03" and "3_04") and two BLE IDs ("302" and "304") that have not yet been matched. For the location "3_04", we can see that the BLE ID "304" is more frequently matched to location "3_04" than the BLE ID "303". Therefore, we match the BLE ID "304" to location "3_04". As a result, there are six incorrect matching pairs.

Discussion
In this paper, we have proposed semiautomatic localization for BLE-attached HVAC units, which requires one worker to hold a smartphone to collect the RSSIs around a building. From the principle of location identification, our approach may also be used to localize any (general) objects that emit a radio signal, such as BLE-equipped Internet of Things (IoT) devices in offices and houses. However, there are issues to be considered. Firstly, a floorplan with object locations may not be available for such general IoT devices. The IoT devices are often moved and used at different locations. Secondly, signal propagation may be affected more by furniture if these devices are located closer to the floor. The assessment of the applicability of the proposed approach to general devices is part of our future work.

Effect of BLE receivers from different manufacturers on our approach
In reality, radio receivers from different manufacturers have different characteristics, such as signal-to-noise ratio and antenna gain. In Ref. 8, the researchers use various devices in state-of-the-art approaches that do not support heterogeneous devices and show the decrease in the accuracy of those approaches. According to Refs. 18 and 19, the distance between a radio transmitter and a receiver is a significant factor of signal strength, and the effect of heterogenous devices can be considered as noise. (8) Therefore, our technique, which examines the trend of RSSIs instead of actual values, is not affected largely by device heterogeneity.

Limitation of survey method
In this study, we provide some guidelines to reduce the walking distance for collecting data. However, it is necessary to stop walking to record the RSSIs to ensure the stability of the RSSI data. This is the reason why the time spent by the worker on collecting RSSIs is increased. For example, 1 h was required to obtain the RSSIs on the first floor in the first building in our experiment.
In the experiment, the parameters of all BLE modules are set with default values, and BLE broadcasts a beacon every second. However, the smartphone may not perceive the RSSIs from each BLE every second. This is because there is always an instability issue of indoor wireless propagation due to fading and shadowing. (18,26,27) Therefore, a higher speed sampling rate does not resolve this problem, and the shorter interval of beacon advertising may increase the risk of data collision.
In a practical situation, we need a method that allows continuous walking to collect RSSIs. There has been some research on leveraging multiple antennas to solve the stability issue of RSSIs. (26,27) We suppose that we can reduce the surveying time by applying these techniques to our approach allowing the worker to walk continuously while collecting the data. Nevertheless, smartphones currently on the market have one antenna. Therefore, we may need to develop multiple BLE modules to record RSSIs and send the data to a smartphone.

Verification in matching
We consider that if an incorrect matching position is within about 3 m from the correct position, such an erroneous matching is acceptable. This is because both the correct and incorrect locations can be regarded as being deployed in the same spot such as a room. In Sect. 4.4, our approach can map at least 70% of BLE IDs to the exact locations, and the incorrect matching results assign the BLE IDs to the wrong positions, which are, however, close to their original positions (within the 2-3 m range). Consequently, the results of our approach are considered acceptable in terms of position matching. However, if there is a case that 100% matching is required, we may rely on the administrators and/or residents of the region to report the problem when they found an abnormal situation.

Conclusions
In this paper, we have presented a method of semiautomatic BLE localization. Our algorithm can reduce the walking area and estimate the location of every BLE without entering every location in the building. It was found that our algorithm can match 70% of BLEs to their correct physical locations. We evaluated our algorithm by deploying BLE modules on the office building. In the future, we will apply a multiantenna technique to reduce the operation time and develop an optimization technique to reduce the complexity of the one-to-one matching algorithm.