Channel sounding output shows the exact same data for longer durations

Hi,
I am testing the Nordic samples for different environments, and started noticing this strange thing, that sometimes the data output is the same as the previous output. This happens most often in the case of an NLOS path with obstacles in between. Is this because of the median filter? And if it is, the size of the filter is 9, so shouldn't I get new data after 9 windows? 

I call this function every 500ms, and the procedure and config parameters are the same as in the sample.

distance_on_ap = get_distance(ap);

I am attaching the log, which shows multiple data outputs being the same.

[0.000002 0.000002] *** Booting nRF Connect SDK v3.1.1-e2a97fe2578a ***
[0.004583 0.004581] *** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
[0.009077 0.004495] I: Node index value now: 0
[0.011913 0.002835] 
[0.012696 0.000783] I: 2 Sectors of 4096 bytes
[0.015389 0.002694] I: alloc wra: 0, f70
[0.017517 0.002127] I: data wra: 0, 10
[0.019485 0.001969] I: SoftDevice Controller build revision: 
[0.023635 0.004150] I: fc de 41 eb a2 d1 42 24 |..A...B$
[0.027316 0.003681] I: 00 b5 f8 57 9f ac 9d 9e |...W....
[0.031027 0.003711] I: aa c9 b4 34             |...4    
[0.037075 0.006048] I: HW Platform: Nordic Semiconductor (0x0002)
[0.041601 0.004526] I: HW Variant: nRF54Lx (0x0005)
[0.044800 0.003199] I: Firmware: Standard Bluetooth controller (0x00) Version 252.16862 Build 1121034987
[0.053295 0.008495] I: No ID address. App must call settings_load()
[0.058077 0.004781] I: Bluetooth initialized
[0.060921 0.002844] I: HCI transport: SDC
[0.063186 0.002265] I: Identity: F7:D7:FB:5A:83:FE (random)
[0.067147 0.003961] I: HCI: version 6.1 (0x0f) revision 0x3069, manufacturer 0x0059
[0.073487 0.006340] I: LMP: version 6.1 (0x0f) subver 0x3069
[0.078350 0.004863] Saved Address1 - 00:00:00:00:00:00 (public)
[0.082639 0.004290] Saved Address2 - 00:00:00:00:00:00 (public)
[0.086957 0.004318] I: NUS Client module initialized
[0.089922 0.002965] I: Scan module initialized
[0.093012 0.003089] I: Unfiltered scan started with NUS and RAS filters
[12.175560 12.082549] I: Filters matched. Address: F9:B1:53:59:F9:F5 (random) connectable: 1
[12.281482 0.105922] New Device F9:B1:53:59:F9:F5 (random) connected, total connected: 1
[13.283487 1.002006] I: Pairing completed: F9:B1:53:59:F9:F5 (random), bonded: 0
[13.288112 0.004624] I: Security changed: F9:B1:53:59:F9:F5 (random) level 2
[13.382382 0.094270] I: MTU exchange success (498)
[14.082741 0.700360] I: Service discovery completed for NUS
[14.582345 0.499603] I: Service discovery completed for RAS
[14.682624 0.100280] I: Read RAS feature bits: 0x1
[14.832551 0.149927] I: CS capability exchange completed.
[14.982305 0.149754] I: CS config creation complete. ID: 0
[14.985534 0.003229] I: CS Config: ID=0, MainMode=2, SubMode=1, Role=0, RTT=0
[14.990562 0.005028] I:   Steps: min=2, max=5, mode0=3, repetition=0
[14.994835 0.004273] I:   Channel: sel_type=0, map_rep=3, ch3c_shape=0, ch3c_jump=2
[15.000356 0.005522] I:   Timing: IP1=60us, IP2=20us, FCS=60us, PM=10us
[15.182386 0.182029] I: CS security enabled. CS device count changed to 1
[15.432702 0.250316] I: CS procedures enabled:
[15.434597 0.001895]  - config ID: 0
[15.436080 0.001483]  - antenna configuration index: 0
[15.439122 0.003043]  - TX power: 0 dbm
[15.440882 0.001760]  - subevent length: 28198 us
[15.444134 0.003252]  - subevents per event: 1
[15.445836 0.001702]  - subevent interval: 0
[15.448059 0.002223]  - event interval: 2
[15.449876 0.001817]  - procedure interval: 5
[15.452133 0.002256]  - procedure count: 0
[15.454136 0.002004]  - maximum procedure length: 1000
[16.293937 0.839801] I: 10.428604,11.728958,10.659940,10.428604
[16.332586 0.038649] Data from Reflector 1
[16.797732 0.465146] I: 10.424860,11.728958,10.819839,10.424860
[17.301273 0.503541] I: 10.246812,11.728958,11.043911,10.246812
[17.805632 0.504359] I: 10.246812,11.568581,11.080951,10.246812
[18.309207 0.503575] I: 10.246812,11.807596,11.189236,10.246812
[18.813403 0.504196] I: 10.246812,11.519273,11.361871,10.246812
[19.317244 0.503841] I: 10.246812,11.442602,11.208906,10.246812
[19.820930 0.503686] I: 10.565058,11.562057,11.488099,10.565058
[20.324703 0.503773] I: 10.571355,11.442602,11.365742,10.571355
[20.828694 0.503991] I: 10.405935,11.548784,11.396701,10.565058
[21.332437 0.503743] I: 10.430644,11.560492,11.396701,10.614476
[21.836297 0.503860] I: 10.246812,11.548784,11.396701,10.518903
[22.340605 0.504308] I: 10.437897,11.548784,11.318693,10.628981
[22.843920 0.503316] I: 10.100430,11.154770,11.396701,10.518903
[23.348301 0.504381] I: 10.246812,11.154770,11.643724,10.636471
[23.851994 0.503693] I: 10.528732,11.365986,11.760858,10.539578
[24.355999 0.504005] I: 10.528732,11.122096,11.760858,10.539578
[24.859979 0.503979] I: 10.539578,11.281457,11.898395,10.539578
[25.364003 0.504024] I: 10.551575,11.325351,11.916749,10.563572
[25.867980 0.503977] I: 10.539578,11.281457,11.898395,10.539578
[26.332695 0.464715] Data from Reflector 1
[26.372478 0.039783] I: 10.551575,11.325351,11.765561,10.563572
[26.876673 0.504195] I: 10.536720,11.325351,11.572276,10.539578
[27.380206 0.503532] I: 10.246812,11.560117,11.644342,10.246812
[27.884224 0.504019] I: 10.533861,11.560117,11.765561,10.533861
[28.389671 0.505447] I: 10.561098,11.433569,11.878540,10.561098
[28.894373 0.504702] I: 10.561098,11.433569,11.933719,10.561098
[29.400506 0.506134] I: 10.563736,11.433569,11.878540,10.566373
[29.904222 0.503715] I: 10.246812,11.554188,11.625605,10.246812
[30.408350 0.504128] I: 10.246812,11.490433,11.283225,10.246812
[30.911817 0.503468] I: 10.246812,11.490433,11.283225,10.246812
[31.415777 0.503960] I: 10.246812,11.490433,11.508859,10.246812
[31.919657 0.503880] I: 10.372084,11.490433,11.508859,10.497355
[32.423466 0.503809] I: 10.246812,11.834984,11.616957,10.246812
[32.927216 0.503749] I: 10.246812,11.834984,11.636680,10.246812
[33.431189 0.503973] I: 10.372084,11.927058,11.362134,10.497355
[33.935256 0.504067] I: 10.393195,11.927058,11.362134,10.539578
[34.439165 0.503908] I: 10.246812,11.927058,11.616957,10.246812
[34.944228 0.505064] I: 10.246812,11.467483,11.780732,10.246812
[35.447588 0.503359] I: 10.246812,11.685080,11.820181,10.246812
[35.951646 0.504058] I: 10.246812,11.685080,11.847354,10.246812
[36.332069 0.380424] Data from Reflector 1
[36.455575 0.123506] I: 10.497803,11.685080,11.915361,10.497803
[36.959327 0.503752] I: 10.539578,11.685080,11.847354,10.539578
[37.463652 0.504325] I: 10.539578,11.448826,11.847354,10.539578
[37.967461 0.503809] I: 10.518690,11.448826,11.764025,10.539578
[38.471196 0.503735] I: 10.576267,11.382164,11.494042,10.612955
[38.974999 0.503803] I: 10.613153,11.253088,11.494042,10.613351
[39.478715 0.503716] I: 10.617725,11.253088,11.330136,10.622101
[39.982915 0.504200] I: 10.613351,11.253088,11.226156,10.613351
[40.486596 0.503680] I: 10.246812,11.506598,11.183123,10.246812
[40.990697 0.504102] I: 10.246812,11.506598,11.147090,10.246812
[41.494736 0.504038] I: 10.246812,11.506598,11.183123,10.246812
[41.998568 0.503832] I: 10.246812,11.751382,11.183123,10.246812
[42.501936 0.503368] I: 10.246812,11.755133,11.595972,10.246812
[43.006647 0.504711] I: 10.246812,11.662065,11.807734,10.246812
[43.510177 0.503529] I: 10.246812,11.662065,11.807734,10.513433
[44.014031 0.503854] I: 10.246812,11.735944,11.841802,10.246812
[44.518554 0.504523] I: 10.246812,11.693618,11.919746,10.246812
[45.022301 0.503747] I: 10.246812,11.571343,11.481201,10.246812
[45.526527 0.504226] I: 10.246812,11.090935,11.414865,10.246812
[46.031658 0.505131] I: 10.246812,11.090935,11.481201,10.246812
[46.332187 0.300529] Data from Reflector 1
[46.535203 0.203015] I: 10.393195,11.090935,11.481201,10.539578
[47.039570 0.504368] I: 10.539578,10.818111,11.559724,10.574934
[47.543096 0.503526] I: 10.246812,11.090935,11.701444,10.539578
[48.046838 0.503742] I: 10.246812,11.440374,11.962551,10.539578
[48.550930 0.504092] I: 10.246812,11.503380,11.753627,10.539578
[49.054748 0.503818] I: 10.246812,11.503380,11.701444,10.246812
[49.558720 0.503972] I: 10.246812,11.708960,11.747775,10.246812
[50.062753 0.504033] I: 10.246812,11.708960,11.747775,10.246812
[50.566598 0.503845] I: 10.246812,11.606626,11.582480,10.246812
[51.070450 0.503852] I: 10.246812,11.493896,11.402202,10.246812
[51.573940 0.503489] I: 10.246812,11.003367,11.255365,10.246812
[52.078055 0.504116] I: 10.246812,11.027905,11.255365,10.246812
[52.582004 0.503948] I: 10.246812,11.078766,11.255365,10.246812
[53.085811 0.503808] I: 10.246812,11.301930,11.355404,10.246812
[53.589748 0.503937] I: 10.246812,11.301930,11.378729,10.246812
[54.093731 0.503983] I: 10.396606,11.878736,11.996021,10.546402
[54.597234 0.503504] I: 10.246812,11.993827,11.355404,10.559799
[55.101017 0.503783] I: 10.559799,11.944654,11.355404,10.610246
[55.605053 0.504035] I: 10.246812,11.944654,11.349087,10.246812
[56.109568 0.504515] I: 10.385657,11.380331,11.349087,10.524503
[56.332071 0.222503] Data from Reflector 1
[56.613456 0.281385] I: 10.246812,11.380331,11.349087,10.246812
[57.117441 0.503984] I: 10.246812,11.344364,11.336962,10.246812
[57.621593 0.504153] I: 10.385657,11.344364,11.393527,10.524503
[58.125449 0.503855] I: 10.385657,11.064683,11.711980,10.524503
[58.629577 0.504128] I: 10.393195,11.064683,11.711980,10.539578
[59.133600 0.504024] I: 10.392078,11.035592,11.340331,10.537345
[59.638736 0.505136] I: 10.246812,11.373967,11.340331,10.246812
[60.143087 0.504351] I: 10.246812,11.373967,11.297441,10.246812
[60.649752 0.506665] I: 10.537345,11.482042,11.340331,10.537345
[61.153709 0.503957] I: 10.537345,11.373967,11.561806,10.537345
[61.657725 0.504015] I: 10.539578,11.128202,11.561806,10.539578
[62.161585 0.503861] I: 10.246812,11.160110,11.561806,10.246812
[62.665208 0.503623] I: 10.246812,11.160110,11.558068,10.246812
[63.169054 0.503846] I: 10.246812,11.430098,11.558068,10.246812
[63.673003 0.503949] I: 10.541793,11.430098,11.452071,10.542496
[64.176791 0.503788] I: 10.541793,11.899332,11.613012,10.542496
[64.680735 0.503944] I: 10.569303,11.899332,11.613012,10.596109
[65.184724 0.503988] I: 10.569303,11.551393,11.613012,10.596109
[65.688753 0.504030] I: 10.512934,11.426038,11.540646,10.600280
[66.192641 0.503888] I: 10.539995,11.292442,11.626135,10.567056
[66.331621 0.138979] Data from Reflector 1
[66.696539 0.364918] I: 10.406934,11.292442,11.626135,10.567056
[67.200453 0.503914] I: 10.246812,11.292442,11.600792,10.246812
[67.703834 0.503381] I: 10.246812,11.292442,11.600792,10.246812
[68.207961 0.504126] I: 10.246812,11.292442,11.600792,10.246812
[68.711591 0.503630] I: 10.246812,11.399449,11.618345,10.246812
[69.215754 0.504163] I: 10.246812,11.243635,11.739872,10.246812
[69.719689 0.503936] I: 10.246812,11.243635,11.765384,10.246812
[70.223582 0.503892] I: 10.246812,11.243635,11.909936,10.246812
[70.727523 0.503942] I: 10.393195,11.358844,11.922301,10.539578
[71.231414 0.503891] I: 10.393195,11.358844,11.922301,10.539578
[71.735461 0.504047] I: 10.539578,11.358844,11.996285,10.539578
[72.239002 0.503541] I: 10.539578,11.337955,11.967607,10.539578

Parents
  • Hi,

    sometimes the data output is the same as the previous output
    Is this because of the median filter? And if it is, the size of the filter is 9, so shouldn't I get new data after 9 windows? 

    It could be, since the median (middle when sorted) value out of the 9 values in the window, could be the same several times in a row, if the new and old (falling out of the window) values are either both higher than the current median or lower than the current median. If this is the reason for repeated values, then you should expect only a few repeats, yes, since the repeated value would slide out of the window.

    Please note also how in the Bluetooth: Channel Sounding Initiator with Ranging Requestor sample, in the while loop near the bottom of main(), it waits for the sem_distance_estimate_updated semaphore signalling that distance estimates are updated. If you do not use such a mechanism, but rather get the current value every time interval regardless, then you may also get the same output several times in a row, simply because the underlying data structure containing measurements has not been changed in the mean time. From what you describe, I assume this is mostly what you are currently seeing.

    Regards,
    Terje

Reply
  • Hi,

    sometimes the data output is the same as the previous output
    Is this because of the median filter? And if it is, the size of the filter is 9, so shouldn't I get new data after 9 windows? 

    It could be, since the median (middle when sorted) value out of the 9 values in the window, could be the same several times in a row, if the new and old (falling out of the window) values are either both higher than the current median or lower than the current median. If this is the reason for repeated values, then you should expect only a few repeats, yes, since the repeated value would slide out of the window.

    Please note also how in the Bluetooth: Channel Sounding Initiator with Ranging Requestor sample, in the while loop near the bottom of main(), it waits for the sem_distance_estimate_updated semaphore signalling that distance estimates are updated. If you do not use such a mechanism, but rather get the current value every time interval regardless, then you may also get the same output several times in a row, simply because the underlying data structure containing measurements has not been changed in the mean time. From what you describe, I assume this is mostly what you are currently seeing.

    Regards,
    Terje

Children
Related