BLE Channel Sounding - changing the number of samples.

I am testing out the Bluetooth Channel sounding sample with the nRF54L15-dk board using the samples of Channel sounding Initiator with ranging requester. How to change the number of samples in the round trip timing method and phase based ranging method. 

 

  • Hello,

    Did you test the sample?

    Running it for a short time gives me this log:

    I: - Round-Trip Timing method: 2.443308 meters (derived from 10 samples)
    I: - Phase-Based Ranging method: 1.531434 meters (derived from 147 samples)
    I: Subevent result callback 1
    I: Ranging data ready 1
    I: Ranging data get completed for ranging counter 1
    I: Estimated distance to reflector:
    I: - Round-Trip Timing method: 3.147821 meters (derived from 9 samples)
    I: - Phase-Based Ranging method: 1.485374 meters (derived from 148 samples)
    I: Subevent result callback 2
    I: Ranging data ready 2
    I: Ranging data get completed for ranging counter 2
    I: Estimated distance to reflector:
    I: - Round-Trip Timing method: 2.866765 meters (derived from 8 samples)
    I: - Phase-Based Ranging method: 1.402294 meters (derived from 149 samples)
    I: Subevent result callback 3
    I: Ranging data ready 3
    I: Ranging data get completed for ranging counter 3
    I: Estimated distance to reflector:
    I: - Round-Trip Timing method: 2.922976 meters (derived from 10 samples)
    I: - Phase-Based Ranging method: 1.530307 meters (derived from 147 samples)
    I: Subevent result callback 4
    I: Ranging data ready 4
    I: Ranging data get completed for ranging counter 4
    I: Estimated distance to reflector:
    I: - Round-Trip Timing method: 3.692898 meters (derived from 11 samples)
    I: - Phase-Based Ranging method: 1.755326 meters (derived from 146 samples)

    So as you can see, the trip time is done using about 10 samples, and the phase-based method is done around 150 times. 

    I am not completely sure, but I suspect it is done in the procedure_params in main(). It doesn't set the numbers directly, but some intervals and lengths and things like that.

    Please note that this sample is not a demo on how good the distance measurement is (because it is pretty bad at this point in time). It is a demonstration of using the technology and fetching the required data. In the future, there will be some more work on the maths used to calculate the actual distance, so that it will be more similar to the performance of the nrf_dm (distance measurement) sample, which uses a proprietary (but similar) technique.

    Best regards,

    Edvin

  • Hello, 

    Not sure if this is what you are looking for, but one way of changing the ratio of main mode to sub mode steps is by changing these two values https://github.com/nrfconnect/sdk-nrf/blob/509fa66004370f00faf13912cc6fced25dda6d6c/samples/bluetooth/channel_sounding_ras_initiator/src/main.c#L423-L424
    For example if I change both to 1, I get roughly as many sub mode steps (RTT steps in this case) as I get main mode steps (PBR steps in this case). Example log from the sample with this change:

    I: Estimated distance to reflector:
    I: - Round-Trip Timing method: 4.592482 meters (derived from 78 samples)
    I: - Phase-Based Ranging method: 0.434500 meters (derived from 79 samples)
    

  • Thankyou. That was exactly what I was looking for. But event if we change the number of samples, there is inconsistant and inaccurate values from RTT and PBR methods. It might take some time for Nordic to develop a consistant working solution for this. 

  • Indeed this is not the final solution for the channel sounding. It is currently just a proof of concept, as I mentioned, to show that we can fetch the raw data correctly. 

    Best regards,

    Edvin

  • Is there any way to combine both the distances from RTT and PBR methods and get the average solution for the distance measurement?

Related