# Measurement and Analysis of RSS Using Bluetooth Mesh Network for Localization Applications
## 5 Analysis of RSS Measurements Using Bluetooth Mesh Network
### Path Loss Models
In addition, when the sample size is one, the results of all channels (i.e., without differentiating three advertising channels) are not as good as the ones obtained using individual advertising channels, which confirms some findings in the literature (see for example [5, 15]). However, when RSS data are collected without differentiating three advertising channels, it is possible to decrease \(\sigma_{\chi_{0}}\) and \(\sigma_{\chi_{1}}\) by increasing the sample size, which can be observed from the results marked as all channels in Figures 18 and 19. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & \(\mathbf{P_{r}(1)}\) [dBm] & \(\mathbf{\alpha_{0}}\) & \(\mathbf{\sigma_{\chi_{0}}}\) & \(\mathbf{\alpha_{1}}\) & \(\mathbf{\sigma_{\chi_{1}}}\) \\ \hline Channel 37 & \(-36\) & 2.13 & 3.32 & 7.21 & 5.00 \\ Channel 38 & \(-35\) & 2.11 & 3.54 & 6.47 & 4.71 \\ Channel 39 & \(-29\) & 2.30 & 3.93 & 6.55 & 5.06 \\ All channels & \(-35\) & 1.92 & 2.75 & 6.78 & 4.35 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Two-segment path loss model parameter values derived using the median of six random data samples from each of the six receivers. Figure 17: Two-segment path loss models derived using the median of six random data samples from each of the six receivers. From the results, we can also conclude that a sample size of 3 is a reasonable choice to consider in practice. When sample size is larger than 3, receivers will need to take more time to collect data and there is almost no visible decreases in the values of \(\sigma_{X_{0}}\) and \(\sigma_{X_{1}}\) as shown in the figures. Such an observation is critical and immensely valuable in practice because it indicates that using six-receiver configuration (as shown in Figure 6) and a sample size of three or more, it is better to randomize three advertising channels without differentiating the channels. Such an approach is inherently space-time-frequency diversity combining since at each location measurement data are combined by determining median of the data over space (using six receivers), time (multiple measurements by each receiver), and frequency (using three widely spaced advertising channels). Furthermore, almost all the BLE devices that are available in the market do not provide an easy way to differentiate advertising packets received from different channels, which is why in this research we programmed ESP32 BLE development boards with our own custom designed communication protocols to make it possible to parse channel information from received packets. Therefore, randomizing three advertising channels without the need to parse channel information from received packets represents a major advantage in practical implementations. Figure 19: Mean of \(\sigma_{X_{1}}\) in the two-segment path loss models derived using the median of data samples from six receivers. The vertical lines on each result data point in the figure represent the plus/minus standard deviation of \(\sigma_{X_{1}}\) over several repeated modeling processes using randomly selected data samples. Figure 18: Mean of \(\sigma_{X_{0}}\) in the two-segment path loss models derived using the median of data samples from six receivers. The vertical lines on each result data point in the figure represent the plus/minus standard deviation of \(\sigma_{X_{0}}\) over several repeated modeling processes using randomly selected data samples. Reducing the path loss model residual fitting errors (i.e., \(\sigma_{\chi_{0}}\) and \(\sigma_{\chi_{1}}\)) leads to more accurately correlating RSS measurements to distance. Such an improvement is fundamentally important in achieving reliable performance when using localization techniques that are based on RSS measurements and path loss models. Therefore, the six-receiver configuration and the space-time-frequency diversity combining scheme that are presented in this paper can be especially useful in practice to achieve improved performance with the RSS-based localization techniques.