Received Signal Strength (RSS)

Olivia's Pc
3 min readOct 9, 2019

In this article, we will discuss the concept related to received signal strength (RSS)and explain how we can collect the RSS data from the BLE devices with this App.

Received signal strength (RSS) tells the receiver the strength of the received signal. That is, the power of the signal at the receiving end. As shown in the Figure above, suppose that the transmitter transmits the packet at power of x dBm, then the RSS at the receiving end would be x-PL(distance), where PL denotes the path loss. More precisely, the path loss model indicates the power loss to transmit a packet for a certain distance. Let d be the distance, PLref be the reference path loss at reference distance, then we can describe the path loss model as follows:

Then, by subtracting the transmit power with the path loss, we can obtain the RSS value. In BLE context, the RSS is measured in dBm. We can convert the dBm to mWatt using the following equation, and vice versa.

For smartphone OS such as Android, it provides us a quick access to the RSS value when the smartphone receives the BLE packet. Using the Android.Bluetooth SDK, we can retrieve the value via the RSSI variable.

The RSS values can provides some insights about the BLE transmitter. One simple example is that it can help us to estimate the distance between our smartphone and the BLE transmitter. We can collect the RSS values at every distance, and then use a curve fitting method to fit a ranging model. Alternatively, we can apply a simple machine learning method, such as linear regression to learn the ranging model.

We can play with the RSS values collected by the smartphone to train a ranging model using linear regression. To collect your own RSS dataset, we can use this App (download link). With the App, we can collect the BLE data from all the nearby BLE devices. It saves the collected data in our local drive. The file is saved in .csv format. We can later export the files to Matlab or Python for further analysis.

BLE Scan

The good thing about the App is that it lets us to define the scan duration. Hence, we can collect as many data as we like for each distance. Note that we need sufficient training sample for each distance to for the machine learning method to learn a decent model.

The App will log all the BLE packets it received. Hence, it is important for us to jot down the name or Mac address of our BLE transmitter. After that, we can filter out those unrelated BLE data during data pre-processing.

After we done with the data collection, we can enter a filename to save the data. We can define a specify filename for each distance, for example, “d10” for distance 10cm, “d100” for 1m, and so on. After that, we can consolidate all these data for training and testing purposes. We will talk more on training a ranging model using a simple linear regression method in our next article.

** this topic is part of the BLE series for beginner **

--

--