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: High Accuracy Range Measurement - 14xx, How to search for more detected peak values in 1D FFT out?

Part Number: IWR1443
Other Parts Discussed in Thread: TIDEP-0091, MMWAVE-SDK

Hi all,

I was experimenting and customizing the source code of "mmWave Training - v1.6.1 /Labs/ High Accuracy Range Measurement - 14xx" to suit a level measurement application. I understand that the implementation uses two step FFT. "1 D FFT for peak search" finds the max peak and use that peak and a "Zoom in FFT for fine peak detection".

According to the docs. of this high accuracy lab, after the 1D FFT, IWR1443 is hardware is configured to search for the max peak and goes to the Zoom in FFT step.

I have a requirement of finding at least two more peaks (ordered according to the magnitude) similar to Level Sense Demo TIDEP-0091 implementation. 

Which memory I should access to achieve this? Also how to access that memory? an example would be very helpful. 

Can I use MMW_HWA_1D_OUT_PING memory to search for more peaks? 

Cheers,

Randy

  • Hi Randy,

    Please make sure you are using the latest mmWave-SDK 1.2 and mmWave Industrial Toolbox 2.2 for your application.

    We'll need some time in order to answer your question although we should have a response for you sometime next week.


    Cheers,
    Akash
  • Randy,

    You will need to search for peaks cased on the data in MMW_HWA_1D_OUT_PING local memory.

    In main.c MmwDemo_dataPathTask, modify MmwDemo_peakSearch(dataPathObj). The current peakSearch is done using HWA statistical blocks-- providing the max value and index, this parameter set needs to be removed. Instead, add your own function to search for peaks. The memory used for peak search can be generated. You can refer to the following function for memory allocation:

    MmwDemo_dcRangeSignatureCompensation in data_path.c

    The zoom-in procedure will need to run the interperlation step on each peak.
    Data output format will be changed as well which will require the visualizer update.

    Let me know if you have more questions.

    Regards,
    Michelle
  • Thanks Michelle for the reply,

    I'm able to find the peaks of 1D FFT (1024 pts) on MMW_HWA_1D_OUT_PING local memory.

    I'm searching for few peaks in 1D FFT before performing the zoom-in FFT. Then it does the zoom-in FFT for the strongest peak which was found by HWA module (didn't modify this part & it remains same as High Accuracy demo. )

    For this application, the accuracy 4 cm is enough for other peaks (just need to know the rough distance to other peaks ), and only one peak needs to be accurate to 1 mm.

    As per my understanding, the hardware assisted peak search (MmwDemo_peakSearch(dataPathObj)) finds the strongest peak.

    When using the HWA peak search, I see the following code is used to read HWA_readStatsReg and fill rangeProcStatus,

    HWA_readStatsReg(dataPathObj->hwaHandle, &(dataPathObj->rangeProcStats), 1);
    
    and dataPathObj->rangeProcStats has the following struc. 
    
    HWA_Stats rangeProcStats; //in data_path.h
    
    typedef struct HWA_Stats_t { //in hwa.h
    uint32_t maxValue; /*!< 24 bits value from MAXnVALUE register */
    uint16_t maxIndex; /*!< 24 bits value from MAXnINDEX register */
    uint8_t iSumMSB; /*!< upper 4 bits of 36-bit value of iSUM; read from ISUMnMSB */
    uint8_t qSumMSB; /*!< upper 4 bits of 36-bit value of qSUM; read from QSUMnMSB */
    uint32_t iSumLSB; /*!< lower 32 bits of 36-bit value of iSUM; read from ISUMnLSB */
    uint32_t qSumLSB; /*!< lower 32 bits of 36-bit value of qSUM; read from QSUMnLSB */
    }HWA_Stats;
    

    When we point out a peak value (which I found by reading the MMW_HWA_1D_OUT_PING memonry) to MmwDemo_processInterpolation (data_path.c) to perform zoom-in FFT, is it enough to set only rangeProcStats.maxIndex in HWA_Stats struct? Or do I need to set the whole struct? If I need to fill in the whole struct, how to find the values for other variables?

    At the moment I'm not worried about modifying the GUI Visualizer as I'm using another MSP432P401 to talk to IWR1443 and get the peak values via SPI similar to Level Sense Demo.

    Thanks

    Randy

  • Hi Randy,

    The HWA_Stats is only for the highest peak which will be feed into interpolation process for fine peak search. The other peak you find has nothing to do with this register.

    I think your question is how to report the other peak values. That needs to be added to the output data structure, see details in function
    MmwDemo_transmitProcessedOutput

    This e2e link will help you understand how the data structure works
    e2e.ti.com/.../2447737

    Once you understand, you can modify it and add the other peaks. I also noticed that current lab set detected object number to 1, that need to be updated as well.

    Let me know if you have any questions.

    Regards,
    Michelle
  • Hi Michelle,

    Sorry if the question is not clear. The question is not on reporting other peak values. 

    My question is about, how to use the "fine peak detection" for peaks "other peaks" which are smaller than highest peaks.

    As I can see, in High Accuracy Demo, "HWA_readStatsReg" reads hardware registers and modify the struc "dataPathObj->rangeProcStats" of "dataPathObj".  Then, that modified "dataPathObj" is passed in to fine peak detection.

    In MmwDemo_dataPathTask (main.c) of high accuracy demo, 

    MmwDemo_processInterpolation(dataPathObj); 

    is called to find the fine peak of highest peak. If I need to find the fine value of a different peak less than the highest one, which information (using dataPathObj) I have to provide to this function?

    rangeProcStats struc is as follows :

    typedef struct HWA_Stats_t {
        uint32_t             maxValue;      /*!< 24 bits value from MAXnVALUE register */
        uint16_t             maxIndex;      /*!< 24 bits value from MAXnINDEX register */
        uint8_t              iSumMSB;       /*!< upper 4 bits of 36-bit value of iSUM; read from ISUMnMSB */
        uint8_t              qSumMSB;       /*!< upper 4 bits of 36-bit value of qSUM; read from QSUMnMSB */
        uint32_t             iSumLSB;       /*!< lower 32 bits of 36-bit value of iSUM; read from ISUMnLSB */
        uint32_t             qSumLSB;       /*!< lower 32 bits of 36-bit value of qSUM; read from QSUMnLSB */
    }HWA_Stats;

    When I point out a peak value to MmwDemo_processInterpolation(dataPathObj) for find peak detection, do I need to fill in the whole struc? or only maxValue, and maxIndex is enough? 

    If I need to fill in the full struc, how to find the rest of the stuff manually when I search peaks manually?

    Some info. is highly appreciated.

    Cheers,

    Randy

  • Randy,

    I don't think you can use the "fine peak detection" for other peaks and I'm not sure why you want to use it for other peaks.

    Previously, you mentioned that you do not need high accuracy for other peaks, why you want to put other peaks index to interpolation process again?

    Please clarify since that will change the data process completely.

    Please understand that the HWA_stats register ONLY record ONE max value using stats block (please check HWA user guide for details). 

    For other peaks, use 1D FFT output data and add your own algorithm to search. Those peaks give you the range value in resolution of 4cm. Just report those values and no need to go through interpolation again.

    Thanks and Regards,

    Michelle

  • Hi Michelle,

    Yes, previously I mentioned 4cm accuracy is enough for other peaks at the moment.

    Since my application is level measurement, for an example: if a low dielectric liquid is in a metal tank, the bottom of the metal tank will give a higher peak than the liquid. That's why I'm asking the possibility of performing a "fine peak detection" of other peaks.

    Sorry if you get the feeling that, I'm changing the initial question.
    I'm just looking the possibility of doing a "fine peak detection" on one of the other peak found from 1D FFT .

    If the interpolation process does not work for the peaks searched manually through 1D FFT data (which is lesser than highest peak), could you please guide me to a method it can be done here?

    Thanks
    Randy
  • Randy,

    I see. I guess you plan to use a loop to feed the interpolation process each peak index. That's fine.
    The parameter interpolation process cares is only the max value and index, the reset is don't care.

    Regards,
    Michelle