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.

Estimation of the range and Velocity (in meters) From range FFT and doppler FFT

Other Parts Discussed in Thread: DCA1000EVM, AWR1843

Hello,

I have a question concerning the calculation of the distance and the speed:

After doing the FFT of distance, how to estimate the distance (range in meters) from range FFT ?

And after doing the doppler FFT, how to estimate the speed of an object (in meters) (phase difference (ω)) from the doppler FFT ?

Thank you,

Ben Hassine

  • Hello,


    Thanks for your reply, I had looked at this link and it helped me a lot. But, I want more details to know how the FFTs and estimates are done in the code (from OOB).

    I used DCA1000EVM and awr1843 to get raw_adc_data.bin, then I used the matlabexample script found in mmwavestudio "rawDataReader" to see how the distance FFT is done.

    Then I ran the script "verify_data". This script will print the distance profile peak information for verification.

    As I can see, rawDataReader returns a radarcube data matrix and it's clear.


    The "verify_data" script will estimate from the radarcube data matrix range profile peak : it will return only one object (which corresponds to the peak value).


    I want to know how the OOB demo estimates different objects (distances) and not just one from the distance FFT? 

    then I applied the doppler FFT on the "cube radar data matrix".


    ( As I read, I need to find the value of the bin peak multiplied by the frequency resolution gives the phase difference 'w' from which the velocity can be calculated)  is this correct ????

    And I want to know how the OOB demo estimates the different velocity ( not just one).

    Here you can find the modified data verification code to calculate the distance and apply Doopler FFT to calculate W and velocity : 

    verfied_data_modified.txt
    %
    % Introduction
    %     This verification script takes radarCube mat file as input. It
    % randomly selects one chirp data to search for the peak. The peak
    % information is printed for user for verify the object.
    %
    %
    % Requirement for the test
    %     The captured bin files should be generated from mmwave studio with a
    % corner reflector at a certain range. Run post_processing script to parse
    % the JSON file and bin file(s) to generate radarCube mat file for this
    % test.
    %
    % Syntax:
    %    verify_data('radarCubeMatFileName')
    %
    function verify_data(radarCubeMatFile)
    % constant parameters
    c = physconst('LightSpeed');% Speed of light in air (m/s)
    fc = 77e9;% Center frequency (Hz)
    lambda = c/fc;
    pii=pi;
        try
            % Load radar cube data
            load(radarCubeMatFile);
        catch
            error("Error reading input *.mat file");
        end
    
        % Get radar cube params
        radarCubeParams = radarCube.dim;
        rfParams = radarCube.rfParams;
    
        % Radom select frame/chirp/rxChan
        frameIdx = ceil(radarCubeParams.numFrames * (rand));
        chirpIdx = ceil(radarCubeParams.numChirps * (rand));
        rxChan = ceil(radarCubeParams.numRxChan * (rand));
    
        fprintf('radarCube data verification after processing the captured bin file...\n');
        fprintf('-------------------------------------------------------------------\n');
        fprintf('Input radar cube File contains %d frames, %d chirps per frame, %d Rx Channel of data.\n', ...
                                    radarCubeParams.numFrames, ...
                                    radarCubeParams.numChirps, ...
                                    radarCubeParams.numRxChan);
      
    
    
                               
                                % Load radarCube data and estimate velocity
         for frameIdx=1:8
       
            for chirpIdx=1:384
           
                for rxChan = 1:4    
                    frameDataa = radarCube.data{frameIdx};
                    win_dop =reshape(frameDataa(chirpIdx,rxChan,:),256,1).* 1;%hann(Nd);                                
                    DopData(chirpIdx,rxChan,:)=fftshift(fft(win_dop,256));
                    
                  %  frameData = radarCube.data{frameIdx};
                    dopplerData(:) = DopData(chirpIdx,rxChan,:);        
                    dopplerProfile = abs(dopplerData);
                    
                    [peakVall, peakIdxx] = max(dopplerProfile);
                    
                     V = (lambda*peakIdxx*rfParams.dopplerResolutionMps)/(4*pii*0.0001);
            
            fprintf('Result: \n \tpeak doppler index = %d\n \tpeakVal = %f\n \tpeak doppler = %f(Mps)\n vitesse= %f(Mps)', ...
                                    peakIdxx, round(peakVall,2), ...
                                    peakIdxx*rfParams.dopplerResolutionMps, V);
                                
                               
                                
                                
                                
                       
    
                    
                end           
            end
            
                figure(1);
        plot(abs(dopplerData));
    
         end
         
         
                                
                                   % Load radarCube data and estimate range
     
        for frameIdx=1:8
       
            for chirpIdx=1:384
           
                for rxChan = 1:4    
                    frameData = radarCube.data{frameIdx};
                    rangeData(:) = frameData(chirpIdx,rxChan,:);        
                    rangeProfile = abs(rangeData);
                    
                                   
        [peakVal, peakIdx] = max(rangeProfile);
        fprintf('\tframe= %d, \tchirp=%d, \trxChan=%d\n',...
                                    frameIdx, chirpIdx, rxChan);
                     
        fprintf('Result: \n \tpeak range index = %d\n \tpeakVal = %f\n \tpeak range = %f(meter)\n', ...
                                    peakIdx, round(peakVal,2), ...
                                    peakIdx*rfParams.rangeResolutionsInMeters);
    
                end
            end
            
      % Debug Plot
        
        figure(2);
        plot(abs(rangeData));
                        
     
        end
        
    
    
    end
    

     

    Thank you,

    Ben Hassine

  • Hi,

    The best way to better understand the oob is to see the demo documentation.

    It is probably easier to understand the overall processing in an earlier version,  SDK 2.1

    Please see

    Millimeter Wave (mmw) Demo for XWR16XX

    Please see

    Data Path - 1st Dimension FFT Processing - Range FFT

    Data Path - 2nd Dimension FFT Processing - Doppler FFT

    Data Path - Direction of Arrival FFT Calculation