# A Low Energy IoT Application Using Beacon for Indoor Localization
## 4 The Proposed Approach  
Authors should discuss the results and how they can be interpreted from the perspective of previous studies and of the working hypotheses. The findings and their implications should be discussed in the broadest context possible. Future research directions may also be highlighted. Indoor localization can generally be approached in two different ways:  
* Precise Indoor Localization (PIL);
* Zone-Based Indoor Localization. The first approach requires the exact identification of the user's position with an accuracy below one meter. However, to obtain a precise position, the beacons are not sufficient. In fact, it is necessary to use additional instruments, such as an accelerometer, which can be used to calculate the distance travelled by the user over time; a compass, which can be used to know the user's direction at any time; or a gyroscope that can provide information on user rotation change. The second approach is based on the subdivision of the area of interest into N-zones and then identifying in which n-th zone the user is present. Bluetooth low-energy devices, due to the large variations in the RSS parameter that leads to a distance calculation subject to errors, do not allow precise localization; therefore, the zone-based approach must be used. The starting idea is to exploit a system consisting of three master devices to obtain the RSSI values relating to the single slave device to be located and convert these values into distance. Each master, positioned in known points a priori, obtains and processes the RSSI values by converting the signal power value into distance. Processing takes place via a microprocessor that receives RSS values as input, returning as output the value of the distance between the mobile node and the fixed node whose position in space is known. Subsequently, using the trilateration technique, the coordinates (x, y) are obtained by means of a program written in C language. The aim of the project is to create a system for locating the position of a user in an indoor environment in the area of interest. To develop this system, it is necessary to first define the type of architecture to be used within the indoor \begin{table}
\begin{tabular}{c c c} \hline \hline
**Name** & **Maximum Distance** & **Maximum Output Power** \\ \hline Class 1 & Until 100 m & 20 dBm = 100 mW \\ Class 2 & Until 10 m & 4 dBm = 2.5 mW \\ Class 3 & Until 5 m & 0 dBm = 1 mW \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Bluetooth range. structure of interest: you can imagine designing a generic hardware system, having the configuration as shown in Figure 1. As can be understood from the figure, the user will have to wear a wearable that is able to be detected via Bluetooth connectivity by the master modules. Each reference device will have to receive RSS values from the wearable, convert them into distance and store them in a text file. When we talk about a generic electronic system, it is necessary to define and analyze both the hardware side and the software side in order to better understand its operation. The project has as its main objective the creation of an indoor localization system that uses Bluetooth modules for user localization. The system, as we will see, foresees a certain number of reference nodes--positioned in points known a priori--and a mobile node. The first paragraph describes all the devices used and shows the various connections made. Subsequently, the development environment for programming the Arduino boards will be shown. Finally, the last paragraph describes the environmental characterization; then the values of the signal propagation constant and the RSSI at 1 m from the source will be obtained. In Figure 2, the architecture of the proposed system is shown. The on-board system represents the wearable device and corresponds to the device to be located, i.e., a battery-powered HC-05 Bluetooth module. The ground system is composed of the three reference Bluetooth modules, each  
Figure 1: The proposed approach. Figure 2: System architecture.