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.

AWR1843BOOST: MMWave Studio radar beamforming

Part Number: AWR1843BOOST

Tool/software:

Hi!

I'm working with the AWR1843BOOST radar board and the DCA1000 to collect raw adc data via mmwave studio (version 2.1.1.0). I can collect data normally but I would like to implement some beamforming in my data collection. I've been looking at some resources but I'm getting a lot of varying information. I therefore just wanted to ask if you could point me to some straight forward instruction on how to implement the beamforming with the AWR1843BOOst board via mmwave studio gui or a lui script. I specifically want to beamform the radar towards only two angles (20 degrees and -20 degrees) and don't want to point it anywhere else throughout my data recordings. Is there a way to go between these 2 angles in an interleaved way and store the raw adc data? Furthermore is there any matlab code that allows the processing of the beamformed adc data?

Thank you!

  • Hi again, 

    I found this lua script which does the beamforming to point to 1 angle. I was hoping to just get some tips on how to get it to point to two angles (-20 and 20 degrees). I was thinking of using 2 Chirp Phase Shifter Configs to go between these two angles but i'm not sure if this would work or how to implement that. Any help with how to alter the code for my purpose would be appreciated. Thanks again.

    BSS_FW = "C:\\ti\\mmwave_dfp_01_02_00_01\\rf_eval\\rf_eval_firmware\\radarss\\xwr18xx_radarss_rprc.bin"
    MSS_FW = "C:\\ti\\mmwave_dfp_01_02_00_01\\rf_eval\\rf_eval_firmware\\masterss\\xwr18xx_masterss_rprc.bin"
    
    
    file_path = "C:\\ti\\raw_data_capture"
    
    adc_data_path1 = file_path.."\\AOP_adc_data_profile_bf.bin"
    raw_data_path1 = file_path.."\\AOP_adc_data_profile_bf_Raw_0.bin"
    pkt_log_path1  = file_path.."\\AOP_profile_bf_pktlogfile.txt"
    
    COM_PORT = 6
    
    --reset and connect
    ar1.FullReset()
    ar1.SOPControl(2)
    ar1.Connect(COM_PORT,921600,1000)
    
    --download BSS FW
    if (ar1.DownloadBSSFw(BSS_FW) == 0) then
        WriteToLog("BSS FW Download Success\n", "green")
    else
        WriteToLog("BSS FW Download failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- Download MSS FW
    if (ar1.DownloadMSSFw(MSS_FW) == 0) then
        WriteToLog("MSS FW Download Success\n", "green")
    else
        WriteToLog("MSS FW Download failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- SPI Connect
    if (ar1.PowerOn(1, 1000, 0, 0) == 0) then
        WriteToLog("Power On Success\n", "green")
    else
       WriteToLog("Power On failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- RF Power UP
    if (ar1.RfEnable() == 0) then
        WriteToLog("RF Enable Success\n", "green")
    else
        WriteToLog("RF Enable failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- Channel Config
    if (ar1.ChanNAdcConfig(1, 1, 1, 1, 1, 1, 1, 2, 1, 0) == 0) then
        WriteToLog("ChanNAdcConfig Success\n", "green")
    else
        WriteToLog("ChanNAdcConfig failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- LDO Bypass Enable
    ar1.RfLdoBypassConfig(0x3)
    
    -- ADC Config
    if (ar1.LPModConfig(0, 0) == 0) then
    	WriteToLog("Regualar mode Cfg Success\n", "green")
    else
    	WriteToLog("Regualar mode Cfg failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- Enable Per Chirp Phase Shifter
    if (ar1.SetMiscConfig(1) == 0) then
    	WriteToLog("Per Chirp Phase Shifter Enable Success\n", "green")
    else
    	WriteToLog("Per Chirp Phase Shifter Enable failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- RF Init
    if (ar1.RfInit() == 0) then
        WriteToLog("RfInit Success\n", "green")
    else
        WriteToLog("RfInit failure\n", "red")
    end
    RSTD.Sleep(1000)
    
    -- Data Path Config
    if (ar1.DataPathConfig(513, 1216644097, 0) == 0) then
        WriteToLog("DataPathConfig Success\n", "green")
    else
        WriteToLog("DataPathConfig failure\n", "red")
    end
    if (ar1.LvdsClkConfig(1, 1) == 0) then
        WriteToLog("LvdsClkConfig Success\n", "green")
    else
        WriteToLog("LvdsClkConfig failure\n", "red")
    end
    if (ar1.LVDSLaneConfig(0, 1, 1, 0, 0, 1, 0, 0) == 0) then
        WriteToLog("LVDSLaneConfig Success\n", "green")
    else
        WriteToLog("LVDSLaneConfig failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- Profile Config
    if (ar1.ProfileConfig(0, 77, 100, 6, 60, 0, 6, 0, 0, 0, 0, 29.982, 0, 256, 10000, 0, 0, 30) == 0) then
        WriteToLog("ProfileConfig Success\n", "green")
    else
        WriteToLog("ProfileConfig failure\n", "red")
    end
    if (ar1.ChirpConfig(0, 0, 0, 0, 0, 0, 0, 1, 1, 1) == 0) then
        WriteToLog("ChirpConfig Success\n", "green")
    else
        WriteToLog("ChirpConfig failure\n", "red")
    end
    if (ar1.FrameConfig(0, 0, 8, 128, 40, 0, 1) == 0) then
        WriteToLog("FrameConfig Success\n", "green")
    else
        WriteToLog("FrameConfig failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- Configure Chirp Based Phase Shifter
    if (ar1.SetPerChirpPhaseShifterConfig(0, 0, 0, 23, 45) == 0) then
        WriteToLog("Chirp Based Phase Shifter Configuration Success\n", "green")
    else
        WriteToLog("Chirp Based Phase Shifter Configuration failure\n", "red")
    end
    RSTD.Sleep(500)
    
    -- Connect DCA1000
    if (ar1.SelectCaptureDevice("DCA1000") == 0) then
        WriteToLog("SelectCaptureDevice Success\n", "green")
    else
        WriteToLog("SelectCaptureDevice failure\n", "red")
    end
    if (ar1.CaptureCardConfig_EthInit("192.168.33.30", "192.168.33.180", "12:34:56:78:90:12", 4096, 4098) == 0) then
        WriteToLog("CaptureCardConfig_EthInit Success\n", "green")
    else
        WriteToLog("CaptureCardConfig_EthInit failure\n", "red")
    end
    if (ar1.CaptureCardConfig_Mode(1, 2, 1, 2, 3, 30) == 0) then
        WriteToLog("CaptureCardConfig_Mode Success\n", "green")
    else
        WriteToLog("CaptureCardConfig_Mode failure\n", "red")
    end
    if (ar1.CaptureCardConfig_PacketDelay(100) == 0) then
        WriteToLog("CaptureCardConfig_PacketDelay Success\n", "green")
    else
        WriteToLog("CaptureCardConfig_PacketDelay failure\n", "red")
    end
    RSTD.Sleep(1000)
    
    ----------------------------- Capture 1 -----------------------------
    --Start Record ADC data
    ar1.CaptureCardConfig_StartRecord(adc_data_path1, 1)
    RSTD.Sleep(1000)
    
    --Trigger frame
    ar1.StartFrame()
    RSTD.Sleep(15000)
    
    --Packet reorder utility processing the Raw_ADC_data
    WriteToLog("Please wait for a few seconds for Packet reorder utility processing .....!!!! \n", "green")
    ar1.PacketReorderZeroFill(raw_data_path1, adc_data_path1, pkt_log_path1)
    RSTD.Sleep(10000)
    WriteToLog("Packet reorder utility processing done.....!!!! \n", "green")
    

  • Hi,

    That thread does not use mmwave studio like I am so it was not really helpful for my case. I'm currently using the lua script I sent that steers the radar into one direction using phase shifter for three transmitters. It seems to work and I can view the signal in the PostProc. I'm using the raw adc data however for my project and I usually convert the binary file to an array using the matlab code provided in texas instrument documentation. I was wondering if you could point me to some documentation that describes how the data is stored in raw adc format when we use the phase shifter so that i may alter the matlab code to convert the bianary data into my usual array. Thanks.

  • Hi, there:

    Glad that you were able to figure out how to program phase shifter.  The binary data format can be found at figure 11 at below document: 

    https://www.ti.com/lit/an/swra581b/swra581b.pdf

    Best,

    Zigang

  • Thank you! Can I just ask a question for clarification when processing the raw adc data. When I enable the phase shifter, with all the transmitters activated at once with the phase shift values applied, as well as all the receivers activated, I'm assuming I'll get 4 "channels" as opposed to the usual case in TDM MIMO where the TXRX pairs result in 12 channels. Is my assumption correct and if it is, does that mean that data is stored as stated in the document with each RX following each other (as in RX0, RX1, RX2, RX3)? Would I be correct in using the below code to process the data when using the Phase Shifter config? Sorry for all the questions, I've just previously worked with TDM MIMO with all the 12 channels activated so i'm trying to make sense of how this new way of recording data is stored. Thanks for the help.

    %%% This script is used to read the binary file produced by the DCA1000
    %%% and Mmwave Studio
    %%% Command to run in Matlab GUI - readDCA1000('<ADC capture bin file>') 
    
    function [retVal] = readDCA1000(fileName)
    %% global variables
    % change based on sensor config
    
    numADCSamples = 2048; % number of ADC samples per chirp
    numADCBits    = 16;   % number of ADC bits per sample
    numRX         = 4;    % number of receivers
    numLanes      = 2;    % do not change. number of lanes is always 2
    isReal        = 0;    % set to 1 if real only data, 0 if complex data
    
    %% read file
    % open and read .bin file containing ADC data
    
    % open the adc_data.bin file
    fid     = fopen(fileName, 'r');
    
    % read the adc data in the file
    % and represent it using signed 16-bit integer precision
    adcData = fread(fid, 'int16');
    
    % if the ADC is set to 12 or 14 bits per sample, compensate for sign extension
    if numADCBits ~= 16
        l_max = 2^(numADCBits-1)-1;
        adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;
    end
    
    % close the adc_data.bin file
    fclose(fid);
    
    % fileSize is the total number of data samples in the adc_data.bin file
    fileSize = size(adcData, 1);
    % fileSize = 2*512*255*514*4; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    % perform reshaping for the real data
    % for real data, filesize = numADCSamples*numChirps*numRx
    if (isReal == 1)
        numChirps = fileSize/numADCSamples/numRX;
        LVDS = zeros(1, fileSize);
        
        %create column for each chirp
        LVDS = reshape(adcData, numADCSamples*numRX, numChirps);
        
        %each row is data from one chirp
        LVDS = LVDS.';
    else
        % for complex data
        % complex data consists of both the in-phase component (I) and the quadrature phase component (Q)
        % therefore, filesize = 2 * numADCSamples*numChirps*numRx
    
        numChirps = fileSize/2/numADCSamples/numRX;
        
        % because Rx0I(0) will be combined with Rx0Q(0) to form one complex number -> Rx0I(0) + jRx0Q(0)
        % each receiver in LVDS will have half the number of entries it has in adcData 
        LVDS      = zeros(1, fileSize/2);
        
        %combine real and imaginary part into complex data
        %read in file: 2I is followed by 2Q
        counter = 1;
        
        % recall that in the adc_data.bin file, data is stored as follows:
        % Rx0I(0)
        % Rx0I(1)
        % Rx0Q(0)
        % Rx0Q(1) etc
        for i=1:4:fileSize-1
            LVDS(1,counter)   = adcData(i) + sqrt(-1)*adcData(i+2); % sqrt(-1) = j 
            LVDS(1,counter+1) = adcData(i+1)+sqrt(-1)*adcData(i+3); % sqrt(-1) = j
            
            % every block of four samples Rx0I(0), Rx0I(1), Rx0Q(0) and Rx0Q(1)
            % produces 2 complex samples, hence the counter increments by 2
            counter = counter + 2;
        end
        
        % at this point, LVDS is one long 1x(fileSize/2) row vector
        
        % create column for each chirp
        LVDS = reshape(LVDS, numADCSamples*numRX, numChirps);
        %each row is data from one chirp
        LVDS = LVDS.';
    end
    
    % organize data per RX
    % Each row in adcData will represent data from a single receiver 
    adcData = zeros(numRX, numChirps*numADCSamples);
    
    for row = 1:numRX
        for i = 1:numChirps
            adcData(row, (i-1)*numADCSamples+1:i*numADCSamples) = LVDS(i, (row-1)*numADCSamples+1:row*numADCSamples);
        end
    end
    
    % return receiver data
    retVal = adcData;

  • HI, there:

    Yes, you are right.  You will no longer have 12 visual antennas as TDM mode.  For TX beamforming, you will only have 4 total receive channels. 

    We can not review your MATLAB code,  you can plot your ADC samples cross chirps to see whether they are close to each other.  You can also plot the range-doppler FFT output and see whether the peak signal align with your point target used for testing.  That are the methods I usually use for verify my data parsing script. 

    Best,

    Zigang