Distance measurement from IQ samples and error estimation

Hello and thank you for your help.

I am working on a project that uses distance measurement (DM) on nRF52840 DKs. I have a few questions regarding the implementation of DM.

1. I found that the source code for the conversion of IQ samples to DM readings is not available publically. Can I check how this code works? In particular, when is a measurement considered a timeout (nan value on UART terminal) and does it have to do with the quality of IQ samples or the number of samples received within a timeframe? I tried to find the source code on the nrfconnect GitHub, but if there is somewhere else I should look, please let me know as well, thank you.

2. I found that some conditions such as large concerete structures in the line of sight of the DKs performing DM cause the measurement to be quite inaccurate (16.5m measurement from a mean of 50 readings for an actual distance of 8.0m), but the quality of the reading is still marked as "ok". Is there any way that has already been developed to estimate the confidence level of DM that accounts for such conditions?

I'm currently working on the nRF52840 DKs, using nRFConnect SDK v2.2.99. The code I am running is the sample code for distance measurements modified to output high precision results only.

Thank you.

Parents
  • Hi, 

    It seems like you are using the nrf_dm_high_precision_calc function to estimate distance since this sometimes can return NaN when it is not able to do an estimation with the measurements provided.

    The algorithm uses these tone_sinr_indicators to determine the quality of collected IQ measurements. If multiple of the tones are of quality worse than medium then the nrf_dm_high_precision_calc will likely return NaN.

    You might want to look at the levels of these tone_sinr_indicators to figure out what the quality of the measurements is, there is one sinr_indicator per tone measured, i.e., 75 indicators for both initiator and reflector per each ranging. Perhaps you can use the quality indicators to create an even stricter requirement than what the nrf_dm_high_precision_calc does.

    I think in the case of the concrete wall measurements, one reason why you are seeing much larger estimated distances could be that there is basically no line-of-sight, and possibly a path that goes around the concrete wall somehow is the strongest path measured. Such scenarios are known to be quite difficult to handle when doing distance estimation.

    As a side note; it is also possible to try to create a distance estimate algorithm on your own to use the IQ samples that are provided by the library to estimate a distance. Maybe you can do something better for the use cases you are addressing. 

    Regards,
    Amanda H.

Reply
  • Hi, 

    It seems like you are using the nrf_dm_high_precision_calc function to estimate distance since this sometimes can return NaN when it is not able to do an estimation with the measurements provided.

    The algorithm uses these tone_sinr_indicators to determine the quality of collected IQ measurements. If multiple of the tones are of quality worse than medium then the nrf_dm_high_precision_calc will likely return NaN.

    You might want to look at the levels of these tone_sinr_indicators to figure out what the quality of the measurements is, there is one sinr_indicator per tone measured, i.e., 75 indicators for both initiator and reflector per each ranging. Perhaps you can use the quality indicators to create an even stricter requirement than what the nrf_dm_high_precision_calc does.

    I think in the case of the concrete wall measurements, one reason why you are seeing much larger estimated distances could be that there is basically no line-of-sight, and possibly a path that goes around the concrete wall somehow is the strongest path measured. Such scenarios are known to be quite difficult to handle when doing distance estimation.

    As a side note; it is also possible to try to create a distance estimate algorithm on your own to use the IQ samples that are provided by the library to estimate a distance. Maybe you can do something better for the use cases you are addressing. 

    Regards,
    Amanda H.

Children
Related