Any Explanation for this?

Discussion in 'XeThru Embedded Platform (XEP)' started by Georg Michel, Aug 28, 2018.

  1. Georg Michel

    Georg Michel New Member

    Hi,

    here's a phenomenon that I don't understand. I record 10000 baseband CIRs in an almost static environment (only some sleepy developers). The frame_offset is +10 samples, i.e. decreased range. Then I calculate the variance of these almost identical CIR's. This is the blue curve in the attached figure. We nicely see the strong direct pulse which should not be considered anyway. Note it is variance, not magnitude.

    Then I increase the range by setting frame_offset to -20. I record again two different quasi-static environments. These are the yellow and green curves. As expected, the direct pulse vanishes. The first strong green peak and the smaller yellow peaks result from real echoes. But the right green double peak - which is identical to the yellow double peak - does not originate from radar echoes. This double peak depends only on the frame_offset. How can this happen? Is it a bug of XEP 3.4.7 or a deature of X4?

    Thanks
    Georg

    Figure_1-1.png
     
  2. Georg Michel

    Georg Michel New Member

    Here's some additional info: The right double peak of the variance results from a spurious (i.e. non-real) echo. So the variance is just larger because the magnitude is larger. This spurious echo depends only on the frame_offset.

    Maybe it can be cancelled out by some algorithm. But I would like to understand it.

    Cheers
    Georg
     
  3. Øyvind Dahl

    Øyvind Dahl New Member Staff Member

    Hey Georg,
    I'm not familiar with CIR variance, so I'm not sure what we are looking at in this plot. But since you have a strong real echo at around range bin 30, could it be multi-path echoes you're seeing?

    Best,
    Oyvind
     
  4. Georg Michel

    Georg Michel New Member

    Hi Øyvind,

    definitely not. The yellow curve has a different echo around bin 30, but the spurious peaks are absolutely identical for yellow and green. This echo (same position as the variance double peak above) is always there, independent of the antenna orientation. If it was real, then it should change when I rotate the antenna. You can try the following by just entering some negative integer for bin_offset. I think I used -20 in the plot above. You can do with the antenna whatever you like, this echo will only change when you change bin_offset.



    def getcir(nframes=10000, pps=60, iterations=1, fps=1205, bin_offset=1):

    device_name="COM7"
    reset(device_name)
    mc = pymoduleconnector.ModuleConnector(device_name)
    xep = mc.get_xep()
    xep.x4driver_init()
    xep.x4driver_set_dac_min(949)
    xep.x4driver_set_dac_max(1100)
    xep.x4driver_set_pulses_per_step(pps)
    xep.x4driver_set_pif_register(trx_dac_step, 0x00) # single sweep
    xep.x4driver_set_iterations(iterations) # multiple of 4
    xep.x4driver_set_frame_area_offset(bin_offset*5.144e-2*2)
    xep.x4driver_set_downconversion(1)
    xep.x4driver_set_fps(fps)
    clear_buffer(mc)
    st = datetime.datetime.now()
    u = np.zeros([nframes,len(xep.read_message_data_float().get_data())])
    for i in range(u.shape[0]):
    u[i,:] = np.array(xep.read_message_data_float().get_data())
    print(datetime.datetime.now()-st)
    xep.x4driver_set_fps(0)
    clear_buffer(mc)
    mc.close()
    reset(device_name)
    return (u[:, :u.shape[1]//2]+1j*u[:, u.shape[1]//2:])