Xiangyu-Gao / Radar-multiple-perspective-object-detection

Codes and template data for paper "RAMP-CNN: A Novel Neural Network for Enhanced Automotive Radar Object Recognition"
MIT License
51 stars 18 forks source link

Confused about the function of "produce_RV_slice" #9

Open monroyaume5 opened 1 year ago

monroyaume5 commented 1 year ago

I just can't figure out why you split the radar data into two parts with the n_vel as the dividing line. And I also don't understand what the 2chirps mean in the RV spectrum's output format [range, velocity, 2chirps]. Could you give a little bit of explanation about these two questions?

for i in range(data.shape[0]):
    for j in range(data.shape[1]):
        win_data1[i, j, :] = np.multiply(data[i, j, 0:n_vel], hanning_win)
        win_data2[i, j, :] = np.multiply(data[i, j, n_vel - 1:], hanning_win)
Xiangyu-Gao commented 1 year ago

That's a good question. A little bit of background here is the number of chirps in one frame is 255, and n_vel is equal to 128. What we want to do here is mimic the micro-Doppler processing: process the first 128 chirps to extract the Doppler, use the last 127 chirps to extract the Doppler, and then concatenate them along the time dimension. Imagine that with more frames being processed and concatenated in this way, it presents more features on Doppler-time, however with a loss of Doppler resolution.

Hope this helps.

monroyaume5 commented 1 year ago

Thank you for the kind response! Another question is that I try to calculate the radar velocity resolution by using the configuration you presented in your paper, but I cannt get the exact same result as yours. I got Tc=130us and Vres=0.058m/s. So could you please also give me a hint what i am going wrong? Regards,

radar_configs = {
    "startFreqConst_GHz": 77.0,
    "bandwidth_GHz": 0.67,
    "chirpDuration_usec": 60.0,     # single chirp per antenna
    "freqSlopeConst_MHz_usec": 21.0,  # slope: MHz/us
    "numAdcSamples": 128,   # samples
    "digOutSampleRate": 4000.0,     # sampling rate: Ksps
    "numLoops": 255,     # chirp loops
    "framePeriodicity_msec": 33.33333,  # frame rate 30 fps
    "frameRate": 30
}

Tc = 1./(radar_configs['numLoops']*radar_configs['frameRate']) *1e6
print('Tc= ',Tc, '\n') # Tc=  130.71895424836603 
Lambda = scipy.constants.c/radar_configs['startFreqConst_GHz']
print('Lambda= ',Lambda, '\n')# Lambda=  3893408.5454545454 

Vres = Lambda/(2*radar_configs['numLoops']*Tc) * 1e-3
print('Vres= ',Vres, '\n') # Lambda=  Vres=  0.05840112818181818 
image
Xiangyu-Gao commented 1 year ago

I guess the issue is that Tc is not 130us. Please try to use the Tc value provided by the paper, which was obtained from the hardware configuration.