Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1443: FFT on the collected data

Part Number: IWR1443

Hi,

I collected the data using IWR1443Boost EVM and converted them into a matrix using TI MATLAB code. Thereafter, I deleted three rows out of four collected for each receiver(RX). I reshaped the data and filled it up and down to make the data as shown in this thread image(Thread for 1D FFT). Finally, I performed the FFT along the row as discussed in the thread and generated the below plot. I also plotted the FFT following the vital sign lab(version 1.4)(link to vital sign lab) instructions provided on page 7. The collected data configuration was: Numer of Chirp loop=128, Number of frames=8, and ADC samples=256.

   

I would be grateful if you could check which generated FFT plot is correct. I am curious why these two plots are different. 

As a beginner, I am totally unaware of the detailed data structure of a given EVM and how to process those data for provided applications like vital sign recognition, people counting, etc. I read the documents on SDK, mmwave studio, ADC raw data capture, Programming Chirp parameter, and vital sign lab pdf(version 1.4). However, I could not find a detailed way how to process the radar data like applying FFT(1,2 or 3D). It would be great if I could be shown how to process the data well.

Regards

Deepu

  • Hi Deepu, 

    I collected the data using IWR1443Boost EVM

    What data are you collecting here? Did you collect raw ADC data using the 1443BOOST+DCA1000?

    and converted them into a matrix using TI MATLAB code

    What code are you referring to here?

    If I'm being honest I'm not sure if either of these graphs look correct. I would recommend you start by pointing the radar at a corner reflector in a open space to ensure you aren't just capturing a noisy environment.

    I don't know of any documentation which goes into more detail for the Vital Signs processing than that which you have linked but there is a People Counting Implementation Guide which covers the processing chain used in that demo. Additionally, the source code for most of our demos is provided in the Radar Toolbox so if you wish to see a more in depth look at how the processing is done you are welcome to view the source code itself. 

    Regards,

    Josh

  • Hi Josh,

    My goal was to collect vital sign data. To learn about the FFT plots, phase, phase unwrapping, etc., I collected RAW ADC data simply using iwr1443 and DCA1000. No person was sitting in front of the radar. 

    I used the TI MATLAB code(swra581) given in section 9.1 to convert the ADC data into a matrix.

    I could understand this line could you please elaborate on this: Josh Dye said: I would recommend you start by pointing the radar at a corner reflector in a open space to ensure you aren't just capturing a noisy environment.

    Regards

    Deepu

  • Hi Deepu,

    I just want to first confirm that you are collecting good data. I'm thinking that it may help if you capture the data facing a large open space when there is nothing in front of the sensor except for a corner reflector at a set distance. This will give a strong signal which should be identifiable in the data. The large open space will eliminate any unwanted reflections. If you don't have a corner reflector you should be able to make or find online.

    Best Regards,

    Josh

  • Hi Josh,

    Thank you for the helpful suggestion. 

    I generated the FFT plot following the vital sign lab(document) instructions given on page 7. As shown in the document, I performed Range-FFT on each frame consisting of the number of chirps and stored them as Slow Time VS range Bins(fast time) matrix. My Chirp configuration was: adcSample = 256, numChirps = 128, and numFrames = 8. In this way, each frame had 32768 samples. The picture-1 and 2 show the FFT plotted using 32678 samples with differences in frequencies that can be noticed from the frequency axis. 

    I would appreciate it if you could verify if any of the correct plots.

                                           Picture-1                                                                                        Picture-2

    It is unclear whether a single chirp from a frame has been used for Range-FFT calculation or all the chirps. Please clarify.

    Regards

    Deepu

  • Hi Deepu,

    Did you collect this data in the way that Josh has asked? With the single corner reflector in a large open space? We can't really comment on whether the data "looks right" without some context about the scene you're trying to image.

    I would note though that if you're taking a 32678 point FFT, then you're likely using all 256 samples from all 128 chirps. It appears to me that you're taking a 1D FFT of this, which does not make sense, as each chirp should have its own separate 1D FFT of 256 samples to generate the range FFT, and the samples of the range FFT at any given range for each chirp (128 samples) are the inputs to the doppler FFT, which determines velocity. See our fundamentals of radar PDF or videos for more information.

    Best

    Nate

  • Hi Nate,

    Yes, I used a corner reflector to collect the data with a default setting of mmwave Studio that is adcSample=256, numChirp loop=128, and numFrame=8. The total collected samples were 262144. As you said, have a separate chirp to take 1D FFT. I reshaped the total data into a matrix of 1024 rows and 256 columns. This matrix would consist of all the samples (1024 * 256 = 262144). Then I performed the 1D FFT on each row consisting of 256 samples and calculated the frequency and magnitude. Please see the below pic for FFT and the attached small python code with data. 

    I would request you, please help me out.

    I bought several radars with data capture devices for my project, but I am unable to proceed further due to not analyzing the data through FFT.

    import pandas as pd
    import numpy as np
    import matplotlib.pyplot as plt
    from scipy.io import loadmat
    import matplotlib.axes as ax
    from scipy.signal import butter, lfilter,find_peaks
    from scipy import interpolate
    from scipy.signal import stft
    
    adcsample=256
    numChirp=128
    numFrame=8
    datalength=adcsample*numChirp*numFrame #
    sampling=6250
    
    
    #Read the file
    data = loadmat("Recorded_data/corner_reflector/test1/adc_data.mat")
    print(data.keys())
    data=data['ans']
    
    
    # Delete the unnecessary rowsdd
    deleted_rows_data=np.delete(data,[1,2,3],axis=0)
    
    
    
    # Reshape the data into Fast Time(ADC Sample) vs Slow time(1 chirp)
    reshaped_data=np.reshape(deleted_rows_data, (1024, 256))
    
    
    # # Perform FFT on the data
    fft_data=np.fft.fft(reshaped_data, axis=1)
    print("Shape after FFT: ", fft_data.shape)
    # print("Dimension after FFT: ",data.ndim)
    fft_freq = np.fft.fftfreq(fft_data.shape[1], d=1/adcsample)
    print("Shape of FFT-Freq : ", fft_freq.shape)
    print("Dimension of FFT-Freq frequency: ", fft_freq.ndim)
    # print("FFT frequency: ", fft_freq)
    
    magnintude=np.abs(fft_data)
    # log_magnitude=np.log10(magningude)
    plt.plot(fft_freq,magnintude[1])
    plt.xlabel('Frequency (Hz)')
    plt.ylabel('Magnitude (dB)')
    plt.title('FFT of adcSample * numChirp * numFrame = 256*128*8')
    plt.show()
    plt.savefig('test1.png')
    adc_data.mat.zip

    Regards

    Deepu

  • Hi Deepu,

    It is a holiday in the US until January 3rd. Expect delayed responses until then. Thank you.

    Best,

    Nate

  • Hi,

    I've been anticipating your response. I am unable to progress because I do not understand how to process data.

    Regards

    Arjun

  • Hi Arjun,

    Did you reference the training content linked by Nate? These materials should give you a better insight to how the processing is done. 

    As mentioned by Nate, the range FFT should be performed on each chirp (256 samples). This should be done with the data from a single frame. 

    Best Regards,

    Josh

  • Hi Josh,

    Yes, I checked that content and have written a program for FFT using 256 samples. Can you please check the above code and suggest me accordingly?

    Regards

    Arjun

  • Hi Arjun,

    Please note, it is outside of the scope of these forums for us to debug your own custom code. I recommend you take a look at this thread that shows how to parse and compute 1D FFT with raw data. You can reference the sample MATLAB code provided which may help you understand better. 

    Best Regards,

    Josh