*3.2. Observations*

Figure 2 shows the experimental results from two different experiments, performed by a female participant and a male participant in different indoor environments. For each case, the figure presents the average RSSI values for different angles under four specific distances between a participant and the RNs.

**Figure 2.** RSSI values versus angle for different distances. (**<sup>a</sup>**,**b**) illustrate the mean of multiple data points collected by two different participants from two separate indoor environments.

As can be observed from Figure 2, there is a similar trend in the ups and downs of the RSSI values for the different angle positions. The general trend shows the highest RSSI values when the body is placed at 0◦ , which is the straight LOS between the transmitter and the receiver. Then, the RSSI values start decreasing with the body's rotation throughout the first quarter (Q1) and reach the lowest at around the ending of Q1 and the starting of the second quarter (Q2). They then start rising and continue throughout Q2 and reach a small peak at around the ending of Q2 and starting of the third quarter (Q3). Then, again, the RSSI values start falling until the end of Q3 and start of the fourth quarter (Q4) where they reach the lowest once more. After that, the RSSI values continue to increase until they become straight LOS again, where the values reach the peak. Thus, for most of the cases, the lowest RSSI values are found at the angle positions just after the angle 90◦ and just before the angle 270◦ .

To further understand the reason for the results obtained above, Figure 3 illustrates the body position for each quarter, as well as a graphical representation of the electromagnetic waves when arriving at the body and the sensor.

**Figure 3.** Body position and the status of the electromagnetic waves for different angle positions in each quarter. (**a**) at 0◦, (**b**) at 45◦, (**c**) just after 90◦, (**d**) at 180◦, (**e**) just before 270◦, and (**f**) at 315◦.

When the body is placed with an angle of 0◦ with respect to the LOS with the transmitter, as in Figure 3a, the electromagnetic wave arrives directly to the antenna without major interference. The antenna used for the experiments in Figure 1 was a common dipole antenna connected to the XBee receptor node, with vertical orientation. We can assume for 0◦ that the signal is mostly perpendicular to the chest surface, and therefore also the sensor surface. From 0◦ to 45◦ (clockwise orientation), the low variability among the measured RSSIs at the receptor may be explained due to their closeness to the LOS between the transmitter nodes and the body. On the other hand, after the angle values of 45◦ , the variability among the consecutive RSSI values starts to increase, which can be explained using Figure 3b. The body as a transmission medium can be seen as a charged object with higher conductivity (higher loss) and low penetration depth. This low penetration depth means that the signal is highly attenuated inside the conductive body, due to muscles and tissue, and the effect of the electromagnetic wave is highly concentrated on the surface. This influences the signal in such a way that the body guides the surface wave and behaves as a reflector for space waves [22]. These surface waves are explained due to the diffraction of the electromagnetic signal. The diffracted wave's components are propagated along a curved surface, such as the body [23]. This means, as in Figure 3b, if the signal arrives first to the shoulder, the surface-propagated component can affect the direct vertical electromagnetic components that arrive at the antenna and change the RSSI value. On the other hand, some electromagnetic waves are also reflected on the surface. From all the reflected wave components, the one with the biggest amplitude has the same angle as the incident wave [24]. Such interactions between the reflected, incident, and diffracted waves influence the difference in the values obtained for specific angles and the variability of the data as well. The diffracted and reflected wave components may constructively or negatively interfere with the original signal from the transmitter. This explains the distribution of data observed in Figure 2 for some angles in Q2 and Q3.

In Figure 3c–e, it is shown, for Q1 and Q2, how the shadowing effect affects the value of the RSSI in Figure 2. Depending on the penetration depth and the shape of the human body, the signal is attenuated in a nonuniform way inside the body. This explains, then, the variability and the lower values presented for each distance in Q2 and Q3, especially at the angle positions just after 90◦ and just before 270◦ . However, something important shall be mentioned. It is observed from Figure 3 that the lowest value on each of the tests is not at 180◦ . As depicted in Figure 3c–e, due to the body geometry and position, the shadowing influence in 180◦ is physically lower than the shadowing in an angle position in Q2 and Q3. For 180◦ in Figure 3d, the waveform shall travel through the distance (a length from back to chest) inside the body. In the case of Figure 3c,e, the signals become more attenuated when travelling through a distance D1 (higher than D2, since it is the length from the back part of the shoulder to chest), which explains the results obtained for the values between 195◦ to 270◦ . Finally, once the body is placed with a heading angle towards Q4 (Figure 3f), the reflected space components and the diffracted surface components can affect (by component cancellation) the RSSI value, with less attenuation than in Figure 3c–e. The last is proved in Figure 2, which shows the trend of increasing in Q4 and the variability of the signal being reduced. Thus, it is clear from the above observations that, on top of the other factors, the user's body has a significant impact on RF signal and RSS values, which is crucial to consider for RSSI fingerprinting-based indoor positioning applications.

#### **4. Overview of the Proposed System**

Figure 4 presents the architecture of the proposed system that follows the traditional fingerprinting scheme. It is mainly composed of two phases: offline training phase and online localisation phase. However, the core contributions lie in the profiling of the query fingerprints by correcting the RSSI and in the fusion of IMU-aided landmarks with classical K-NN method during the online localisation phase. More specifically, when matching a query from a target, the rectification of the queried fingerprint is performed to mitigate

the user's BSE on signal RSSI by leveraging the geometrical features from the indoor floor plan, named landmark.

**Figure 4.** Proposed architecture of RSSI fingerprinting-based indoor localisation with user's body shadowing compensation.

#### *4.1. Offline Training Phase*

Although the traditional way of creating a radio map is to partition the area of interest into grids of uniform size followed by the radio fingerprint data collection along a straight path within those grids, this type of manual collection of fingerprint incurs the radio map with RSSIs which have human body shadowing error with them. To exclude this error from the collected RSSI, this study utilised a self-directed car to collect radio fingerprints for radio map. The details of the car, along with its working principle, can be found in our previous work [25]. The car can produce a radio map having nonuniform grids with curved path which have better coverage within the selected area, thus making the system more realistic for real-life localisation applications. Suppose *R ij* is the set of RSS values collected from RN *j* in the *ith* entry of the radio map; therefore

$$\widetilde{R}\_{ij} = \left\{ r\_{ijk} : k \in \mathcal{N}\_s \right\} \tag{1}$$

where *rijk* is the *kth* sample and *Ns* is the total number of samples from a particular RN for a specific collection point. Together with the coordinate of the collection point, Equation (1) becomes

$$\{\mathbf{x}\_{i\prime}, y\_{i\prime}\left(\mathcal{R}\_{ij}: j \in \mathcal{N}\_{\text{RN}}\right) : i \in \mathcal{N}\_{\text{CP}}\}\tag{2}$$

where *xi* and *yi* are the 2D coordinates of the *ith* fingerprint, *NRN* is the total number of RN that can be accessed from *ith* collection point, and *NCP* is the total number of individual fingerprint tuples in the radio map. As several RSS measurements are collected from each RN for every RP, the mean value of RSS is calculated as

$$R\_{ij} = \frac{1}{N\_s} \sum\_{k=1}^{N\_s} \tilde{R}\_{ijk} \tag{3}$$

where *Rij* is the mean RSS value recorded in the database. Therefore, the final formations of an entry in the radio map can be defined as

$$\left\{ \left. \mathbf{x}\_{i\prime} \, y\_{i\prime} \left( \mathcal{R}\_{ij} : j \in \mathcal{N}\_{\text{RN}} \right) : i \in \mathcal{N}\_{\text{CP}} \right\} \right. \tag{4}$$

#### *4.2. Online Localisation Phase*

As shown in Figure 4, the online phase consists of three main modules: landmark identification module, body effect compensation module, and location estimation module. The landmark identification module detects motion modes from IMU data and recognises indoor landmarks by leveraging a landmark graph. The body effect compensation module estimates the angle between a wearable device and an RN by utilising the detected landmarks, the landmark graph, and the previously estimated location. Then, this module corrects a query fingerprint by compensating the RSSI based on a user's body shadowing compensation model. Finally, the K-NN algorithm computes the current location of a target by searching the closest match from the radio map based on the corrected query fingerprint. The detailed descriptions of the three modules for the online localisation phase are presented in Sections 5–7, respectively.
