# Measurement and Analysis of RSS Using Bluetooth Mesh Network for Localization Applications
## 5 Analysis of RSS Measurements Using Bluetooth Mesh Network
### Path Loss Models
The distances between the transmitter and each of the receiver locations are determined either by direct tape measurement wherever possible or through building layout map-based calculations. Measurement data are then used to determine the model parameters \(\alpha\) and \(\sigma_{x}\) using the linear regression method [8,19]. When performing linear regression based on the model in (4), the measurement data collected from \(N\) locations are organized into the 2-D vectors on the \(x\)-\(y\) plane,  
\[(x[n],\,y[n])=(-10\log_{10}(\frac{d[n]}{d_{0}}),\,\bar{P}_{r}(d[n])[\text{dBm} ]), \tag{5}\]  
for \(n=1\), 2,..., \(N\). The slope \(\alpha\) is determined through linear regression line fitting with the measurement dataset. However, the intercept \(\bar{P}_{r}(d_{0})[\text{dBm}]\) is determined through separate measurements, and it is not fitted through linear regression. As discussed in Section 3, in path loss modeling, \(\bar{P}_{r}(d[n])[\text{dBm}]\) is the local average RSS measurement at the \(n\)th location. The local average is determined by combining multiple RSS measurements through diversity combining techniques over time, frequency, or space to remove small-scale fading effects [8,19]. Since the results shown in Figure 14 are derived using one random data sample from only one receiver, these results represent the case where no local averaging or diversity combining is employed. In the rest of this section, we present several path loss modeling results derived using different local diversity combining schemes. By comparing these results, we intend to identify the one that performs the best in reducing the residue linear regression fitting errors. Figure 15 presents the path loss models derived using median of 6 random data samples from one receiver, which represents time diversity combining since 6 data samples are collected over time by the same receiver at the same location. The model parameters are summarized in Figure 6.0 Comparing the results in Figures 14 and 15, we can see that time diversity combining is ineffective in reducing variations in the RSS measurement data. Such an observation is reasonable intuitively since there were no visible movements around the measurement locations and thus the channel was generally static without noticeable time-dependent variations. As we mentioned earlier, combining multiple data from one receiver at each location (i.e., time diversity combining) has less impact in reducing variations in data due to the static condition of the channel during our measurement. To make a better observation of this effect, in Figures 18 and 19, we present the standard deviation values of linear regression fitting errors (i.e., \(\sigma_{\chi_{0}}\) for the path loss models from 1 to 10 m and \(\sigma_{\chi_{1}}\) for the path loss models above 10 m) with respect to the sample size, where the sample size is defined as the number of data samples from each of the six receivers. At each of the receiver positions, 60 RSS measurements are collected by each of the six receivers, including 20 measurements for each of the three advertising channels. Therefore, to generate the results in Figures 18 and 19, for each sample size \(N_{s}\), we repeated the path loss modeling process 10 times by randomly drawing \(N_{s}\) number of data from the available dataset. Then, the mean of \(\sigma_{\chi_{0}}\) and \(\sigma_{\chi_{1}}\) are plotted versus sample size in Figures 18 and 19, respectively. The vertical lines on each result data point in the figures represent the plus/minus standard deviation of \(\sigma_{\chi_{0}}\) and \(\sigma_{\chi_{1}}\) over several repeated modeling processes using randomly selected data samples. From the results shown in Figures 18 and 19, we can observe that when the data from each individual advertising channel are used in modeling, the sample size almost has no impact on the standard deviation of the linear regression residual fitting errors (i.e., \(\sigma_{\chi_{0}}\) and \(\sigma_{\chi_{1}}\)).