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.

MMWCAS-RF-EVM: Extracting Data out of MMWAVE studio to MATLAB

Part Number: MMWCAS-RF-EVM
Other Parts Discussed in Thread: MMWCAS-DSP-EVM, , AWR2243

Hi,

I am trying to figure out how to extract the ADC data so that I can further process it on MATLAB. However, I am running into some issues while doing so. I've managed to do a setup with a Corner Reflector (CR) positioned about 3m away from the MMWCAS-RF-EVM, (do note that this is attached to the MMWCAS-DSP-EVM and connected to my PC). I've managed to collect the data and viewed it with the in-built radar studio post-processing.

The result is shown below:

Note that the closer detection of the CR is correct, and the further detection might be due to some metallic object behind the CR. Anyway, I would like to process the information outside of the mmWave studio software, Hence referring to C:\ti\mmwave_studio_03_00_00_14\mmWaveStudio\MatlabExamples\singlechip_raw_data_reader_example, I tried to run the Matlab code, but was faced with this error from Matlab

Hence, by checking the .setup.json file (which you obtain via clicking the transfer files button) I noticed that no data was available! files are left blank. 

Do note that the Matlab processing is done on another PC, hence the file path is very different from the default, Do note that I have copied the respective files over to the MATLAB PC.

{
  "createdByVersion": "3.0.0.14",
  "createdOn": "2021-10-15T16:59:06.8767107+08:00",
  "configUsed": "C:\\Users\\Gabriel\\Google Drive\\DSO\\RPP2\\MMW-RF-EVM\\test_data_1.mmwave.json",
  "captureHardware": "TDA2XX",
  "mmWaveDevice": "awr2243",
  "operatingFreq": 77,
  "mmWaveDeviceConfig": {
    "RS232COMPort": "",
    "RS232BaudRate": "",
    "radarSSFirmware": "C:\\Users\\Gabriel\\Google Drive\\DSO\\RPP2\\MMW-RF-EVM\\xwr22xx_metaImage.bin",
    "masterSSFirmware": ""
  },
  "capturedFiles": {
    "numFilesCollected": 0,
    "fileBasePath": "C:\\Users\\Gabriel\\Google Drive\\DSO\\RPP2\\MMW-RF-EVM\\test_data_1",
    "files": []
  }
}

Could someone kindly advise me on how to extract the data out of mmwave studio to MATLAB? Do note that i am currently using the C:\ti\mmwave_studio_03_00_00_14\mmWaveStudio\Scripts\Cascade\Cascade_Configuration_TestSource.lua script, hence no Tx beamforming or MIMO is used. 

Your help is much appreciated!! Thank you!

  • Hello Gabriel, 

    Thankyou for the detailed explanation of your issue. This definitely helps us understand the issue better and know the exact status of debug. 

    Let us first make sure we have all the required files before running the MATLAB post processing scripts. Now since you were able to view the post processed files in mmWave Studio, I'm assuming the captured raw data file has already been transferred to your studio PC. If you open that folder, are you able to see the below mentioned files?

    Now since you mentioned that your MATLAB PC is different, did you copy this entire folder (as shown above) to your concerned PC? 

    Detailed instructions on the usage of the MATLAB script have also been documented in the readme.txt file (if you haven't referred to it as of now). 

    Meanwhile I will also try out this experiment myself and let you know my insights. 

    Thankyou for reaching out. Hoping to discuss and clarify things out for you soon.

    Regards,

    Ishita

  • Hi Ishita, 

    No problem, thank you for helping me with this issue. I really appreciate it.

    Yes, I did copy the entire folder, previously only the master, slave(1,2,3) data and idx files were inside the subfolder while the logfile, setup.json and mmwave.json were in the main folder. I have since moved all of them to a singular folder called test_data_1 as shown in the screen capture below.

    Now the matlab script from C:\ti\mmwave_studio_03_00_00_14\mmWaveStudio\MatlabExamples\singlechip_raw_data_reader_example, under point 2a

    2. From Matlab prompt run post processing script, e.g.

    a. Generate raw ADC data and radarCube data only:

    rawDataReader('C:\jsonScript\awr14\awr14xx.setup.json','adcData', 'radarCube', 0)

    Hence i ran the same line, with changes to the file directory as shown:

     

    When running this rawDataReader script in MATLAB, I get the same error as before, Bin File is not available, now looking at line 115 in the matlab script if the numBinFiles is <1, this will result in the error. 

    Hence now looking at the test_data_1.setup.json code, 

    {
      "createdByVersion": "3.0.0.14",
      "createdOn": "2021-10-15T16:59:06.8767107+08:00",
      "configUsed": "C:\\Users\\Gabriel\\Google Drive\\DSO\\RPP2\\MMW-RF-EVM\\test_data_1\\test_data_1.mmwave.json",
      "captureHardware": "TDA2XX",
      "mmWaveDevice": "awr2243",
      "operatingFreq": 77,
      "mmWaveDeviceConfig": {
        "RS232COMPort": "",
        "RS232BaudRate": "",
        "radarSSFirmware": "C:\\Users\\Gabriel\\Google Drive\\DSO\\RPP2\\MMW-RF-EVM\\xwr22xx_metaImage.bin",
        "masterSSFirmware": ""
      },
      "capturedFiles": {
        "numFilesCollected": 0,
        "fileBasePath": "C:\\Users\\Gabriel\\Google Drive\\DSO\\RPP2\\MMW-RF-EVM\\test_data_1",
        "files": []
      }
    }

    I have ensured that the config used, firmware and file base path (which points to the test_data_1 folder in the very first picture) are all valid. 

    At the end of the day, I just would want to extract the raw data to matlab for future processing. Be it through this script or through other scripts.

    I may do another test run in the following days just to ensure that there isnt anything wrong with the setup.

    Thank  You

    Gabriel Gan

  • Hello Gabriel,

    Thanks again for the detailed description. 

    I just noticed that you're using the "singlechip_raw_data_reader_example" for your usecase. This example MATLAB script only applies to Single chip AWR2243 device and not a 4-chip cascaded device that you're using. Sorry for my oversight here. 

    Since you want to extract data out and understand the format, you could refer to the following thread : https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/901469/mmwcas-dsp-evm-what-is-data-format-of-master-slave-bin-files-from-linux-cascade-radar-board/3343633#3343633 

    You could take reference from the example MATLAB scripts for 4-chip cascade and parse or post-process the captured raw data using mmWave Studio. 

    Hope this helps you get started. 

    Regards,

    Ishita