0
\$\begingroup\$

I am a total beginner in working with RTOS and Zephyr and nRF devices. I would like to build a Wireless Sensor Network which consists of 3 nodes (maybe set in a Bluetooth Mesh) whose primary objective is to measure the RSSI values from each of them to a moving beacon and transmit the values to a computer running MATLAB. The computer running the MATLAB program should, then, indicate the position (in x and y coordinates) on a real-time updated map of the moving beacon.

I have successfully flashed the "nrf_dm" example on two boards and have visualised the RSSI value of one in respect to the other in the VSCode Terminal. Also, I have flashed the "peripheral_hr" example on another board and have successfully plotted the value of the "heartrate" in a real-time updated figure in MATLAB.

So I have several questions:

  1. Is this possible?

If yes,

  1. Which examples can I further look into in order to achieve this?

The application is destined for indoor asset tracking and even though the accuracy of RSSI trilateration is around 1m I will be trying to improve it by Kalman Filtering in MATLAB.enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ RSSI is not a particularly good method for distance measurement as it tends to be slow and inaccurate. Time of flight is a more robust technique. \$\endgroup\$
    – Kartman
    Commented Jul 23, 2023 at 13:03
  • 1
    \$\begingroup\$ To expand on Kartman's statement, consider that RSSI, being a measure of signal strength, depends on a lot more than just distance. If there are objects between the transmitter and receiver, they can degrade the received signal strength, and if there are objects around the transmitter and receiver (forming a sort of "corridor" that can guide the signal like a (really bad) waveguide), it can enhance the received signal strength. Both of these effects are deterministic and correlated with the signal and can't be removed by Kalman filtering; Kalman filtering only removes uncorrelated noise. \$\endgroup\$
    – Hearth
    Commented Jul 23, 2023 at 15:11
  • \$\begingroup\$ I am aware that this is not the most accurate solution to my problem, but my project does not require accuracy and is a proof of concept one of working with nRF5340 devices in a wireless signal network. I thought that it is easier this way, the RSSI being part of the bluetooth signal. \$\endgroup\$
    – Andreiul
    Commented Jul 23, 2023 at 19:08

1 Answer 1

1
\$\begingroup\$

Estimating distance from received signal strength (RSSI) appears easy in theory, but in practice suffers from several sources of inaccuracy:

  • Propagation loss will be significantly affected by reflections and scattering from objects in the vicinity.
  • If the beacon is body-worn, there will be large losses in certain directions due to absorption in tissues.
  • Small Bluetooth devices generally use chip or PCB trace antennas which do not have a uniform omnidirectional radiation pattern. Dips of 3, 6 or even 20 dB in the pattern are not unusual, causing overestimation of the distance in certain directions. This applies to the beacon as well as the receiving units.

Time-of-flight measurement technology is potentially more accurate. Until recently, this was the province of ultra-wideband (UWB) radio designs operating at higher frequencies (3 - 10 GHz). However, the nRF5340 now has an experimental implementation of time-of-flight in the nrf_dm example you tried.

You can't use a simple beacon with 3 receivers for this protocol, as the transmitter and receiver have to synchronize and exchange data back and forth to measure the propagation delay. They also require calibration. You would have to create your own protocol for performing these 3 measurements at successive time intervals.

Since you describe yourself as a "total beginner", your idea of starting with RSSI measurements might be better as long as you don't expect much accuracy. It will at least tell you when the beacon is close to one of the receiving stations with decent reliability.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your input. I am aware that RSSI localisation lacks accuracy, but the only thing which I want to obtain are the 3 values of RSSI measured from the beacon to each node and then these values must be periodically transferred to the computer running MATLAB (at 1 second, let's say). I am looking for a method to do this. \$\endgroup\$
    – Andreiul
    Commented Jul 25, 2023 at 12:28
  • \$\begingroup\$ @Theodor I think it may be easier to program the 3 fixed sites as beacons. The movable unit would scan and record RSSI of the advertisements (you can tell the beacons apart by their Bluetooth IDs). The movable unit also has to act as a peripheral with the PC running Matlab as the central, to relay the data. You're going to have to combine various firmware pieces to get this combined operation. \$\endgroup\$ Commented Jul 25, 2023 at 21:51
  • \$\begingroup\$ Yes, I guess you are right, it will be much easier this way. So the 3 beacons will be continuously broadcasting (there should already be an example provided by nRF for this which I should be able to flash without major modifications to it) and then I have to program the movable unit to scan for all the beacons in its vicinity, monitor the RSSI of the ones with pre-programmed MAC IDs and transmit them as a heartrate message (maybe) to the laptop running MATLAB. \$\endgroup\$
    – Andreiul
    Commented Jul 26, 2023 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.