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.

AWRL6432BOOST: distortion in the waveform of the IF signal

Part Number: AWRL6432BOOST

Tool/software:

When running the attached lua file on mmwave_studio_04_01_00_06, there was distortion in the waveform of the IF signal.

The setting is configured to transmit two chirps within one burst.

It does not occur in Chirp 1, but it occurs in Chirp 2.

Please tell me the cause and countermeasures.

Chp1


Chp2

  • -- Chirp mode setup and RX data capture/postproc

    local num_rx_channels = 3
    local TxChCtrlBitMask = 3

    -- TX/RX channel config
    xw_status=mws.fecRfPwrOnOff(0,{h_RxChCtrlBitMask=(2^num_rx_channels)-1,h_TxChCtrlBitMask=TxChCtrlBitMask,c_MiscCtrl=1,h_Reserved1=0,w_Reserved2=0})
    assert(xw_status == 0, "ERROR: API failed")

    -- RF Factory Cal to set RX gain, TX backoff
    local rx_gain_db = 36
    local rf_fact_cal_start_freq_mhz = 61000
    local cali_slope_MHzpus = 2.2 --Use 87 for a 4G BW.
    local Tx_BO = 12

    xw_status, w_freqCode = mws.sensConvFreqToCode(0, 0, 0, rf_fact_cal_start_freq_mhz)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, w_slopeCode = mws.sensConvSlopeToCode(0,0,cali_slope_MHzpus)
    assert(xw_status == 0, "ERROR: API failed")

    -- -- VCO & LO dist factory cal + Tx/Rx Factory Cal
    xw_status, response=mws.fecRfBootCal(0,{h_CalCtrlBitMask=238,c_MiscCalCtrl=0,c_CalRxGainSel=rx_gain_db,c_CalTxBackOffSel0=Tx_BO,c_CalTxBackOffSel1=Tx_BO,c_CalTxBackOffSel2=0,c_CalTxBackOffSel3=0,h_CalRfFreq=w_freqCode,xh_CalRfSlope=w_slopeCode,c_TxPwrCalTxEnaMask0=3,c_TxPwrCalTxEnaMask1=1,c_TxPwrCalTxEnaMask2=0,c_TxPwrCalTxEnaMask3=0})
    assert(xw_status == 0, "ERROR: API failed")
    -- Run Cal : setting Tx power and Rx gain cal to default LUT values, overriding rx_gain_db & Tx_BO above
    xw_status, response=mws.fecRfRuntimeCal(0,{h_CalCtrlBitMask=206,h_Reserved0=0,c_TempBinIndex=8})
    assert(xw_status == 0, "ERROR: API failed")


    -- Chirp/profile common configuration
    local rf_start_freq_mhz = 60000
    local num_samples_per_chirp = 256
    local slope_MHzpus = 75
    local Sampling_Rate_Decimator = 8 -- 100/Sampling_Rate_Decimator is the Sampling Rate,
    local ramp_end_time_us = 28
    local idle_time_us = 6
    local tx_start_time_us = 0
    local adc_start_time_us = 0  
    local Num_Skip_Samples = 63
    local MIMO_mode = 1 -- 0, manual 1:tdm-mimo, 4: BPM-MIMO
    local Tx_enable = 3 -- 1: Tx 1 enable, 2: Tx2 enable, 3: Tx1 & Tx2 enable.
    local hpf_sel = 1 -- HPF corner frequency 0: 175KHz; 1: 350KHz; 2:700KHz; 3: 1400KHz
    local hpf_fast_init_duration_us = 1.5
    --local HPF_Fast_Init_Enable =  1
    --local CRD_en = 1 -- 0 or 1 only
    --local CRD_dith_en = 1 -- 0 or 1 only
    local MiscSetting = 0 --(1- HPF_Fast_Init_Enable)+(1-CRD_en)*2 + (1-CRD_dith_en)*4 --  0: CRD Enable/dither dis 2: CRD disable
    local CRD_Slope = 0x277 -- = totalBandInKHz/min(6, (idleTimeInus-1))/457.763

    xw_status, hpf_fast_init_duration_code = mws.sensConvTimeToCode(0,0,hpf_fast_init_duration_us)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, ramp_end_time_code = mws.sensConvTimeToCode(0,0,ramp_end_time_us)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, w_timeCode = mws.sensConvTimeToCode(0,1,10)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status=mws.sensChirpPfComnCfg(0,{c_DigOutputSampRate=Sampling_Rate_Decimator,c_DigOutputBitsSel=0,c_DfeFirSel=0,c_VcoMultiChipMode=0,h_NumOfAdcSamples=num_samples_per_chirp,c_ChirpTxMimoPatSel=MIMO_mode,c_MiscSettings=MiscSetting,c_HpfFastInitDuration=hpf_fast_init_duration_code,h_CrdNSlopeMag=CRD_Slope,h_ChirpRampEndTime=ramp_end_time_code,c_ChirpRxHpfSel=hpf_sel})
    assert(xw_status == 0, "ERROR: API failed")

    -- Chirp/profile timing configuration
    xw_status, idle_time_code = mws.sensConvTimeToCode(0,0,idle_time_us)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, adc_start_time_code = mws.sensConvTimeToCode(0,0,adc_start_time_us)
    assert(xw_status == 0, "ERROR: API failed")
    adc_start_time_code = adc_start_time_code + 1024*Num_Skip_Samples
    xw_status, tx_start_time_code = mws.sensConvTimeToCode(0,0,tx_start_time_us)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, w_slopeCode = mws.sensConvSlopeToCode(0,0,slope_MHzpus)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status, w_freqCode = mws.sensConvFreqToCode(0, 0, 0, rf_start_freq_mhz)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status=mws.sensChirpPfTimeCfg(0,{h_ChirpIdleTime=idle_time_code,h_ChirpAdcStartTime=adc_start_time_code,xh_ChirpTxStartTime=tx_start_time_code,xh_ChirpRfFreqSlope=w_slopeCode,w_ChirpRfFreqStart=w_freqCode,h_ChirpTxEnSel=Tx_enable,h_ChirpTxBpmEnSel=0,w_Reserved1=0,w_Reserved2=0,w_Reserved3=0,w_Reserved4=0,w_Reserved5=0})
    assert(xw_status == 0, "ERROR: API failed")

    -- Frame configuration
    local burst_period_us = 200 -- need to >= (num_chirp_per_burst * (idleTime + RampTime) + 100us)
    local num_burst_per_frame = 32
    local num_chirp_per_burst = 2
    local num_frames = 10
    xw_status, burst_period_code = mws.sensConvTimeToCode(0,0,burst_period_us)
    assert(xw_status == 0, "ERROR: API failed")
    local frame_period_us = 100000
    xw_status, w_ftPeriodCode = mws.sensConvFtPeriodToCode(0, 10240, frame_period_us)
    assert(xw_status == 0, "ERROR: API failed")
    xw_status=mws.sensFrameCfg(0,{h_NumOfChirpsInBurst=num_chirp_per_burst,c_NumOfChirpsAccum=0,w_BurstPeriodicity=burst_period_code,h_NumOfBurstsInFrame=num_burst_per_frame,w_FramePeriodicity=w_ftPeriodCode,h_NumOfFrames=num_frames,w_FrameEvent0TimeCfg=0,w_FrameEvent1TimeCfg=0})
    assert(xw_status == 0, "ERROR: API failed")

    -- Enable RDIF
    xw_status=mws.fecRdifctrl(0,{c_RdifEnable=10,c_RdifCfg=40,h_RdifSampleCount=num_samples_per_chirp,c_TestPatternEn=0,c_LaneRateCfg=0,h_Reserved2=0,h_TestPatrnInitCodeCh0=20,h_TestPatrnInitCodeCh1=20,h_TestPatrnInitCodeCh2=20,h_Reserved3=0,h_TestPatrnIncrCodeCh0=20,h_TestPatrnIncrCodeCh1=20,h_TestPatrnIncrCodeCh2=20,h_Reserved4=0,w_Reserved5=0})
    assert(xw_status == 0, "ERROR: API failed")

    --mws.Calling_WriteAddr_Single(0x51000020,0x0) -- Sets Frac ADC and skip sample to 0 -> ADC start time = 0


    -- ******************* CAPTURE SEQUENCE STARTS HERE ***********************

    -- Remove old ADC bin file if it exists (DCA1000 adds "_Raw_0" to filename)
    local adc_bin_file_directory = RSTD.GetWorkingDirectory() .. [[\..\PostProc\]]
    local adc_bin_file = adc_bin_file_directory .. [[adc_data1.bin]]
    os.remove(adc_bin_file_directory .. [[adc_data_Raw_0.bin]])

    -- Arm DCA1000 for capture (using "Infinite" stop mode which will stop capture automatically once data from device stops)
    xw_status=mws.captureCardStartRecord(adc_bin_file, 1, 1, 4096)
    assert(xw_status == 0, "ERROR: API failed")
    p(1000)

    -- Trigger start of framing
    xw_status=mws.sensorStart(0,{c_FrameTrigMode=0,c_ChirpStartSigLbEn=0,c_FrameLivMonEn=0,c_Reserved=0,w_FrameTrigTimerVal=0,w_Reserved1=0})
    assert(xw_status == 0, "ERROR: API failed")

    -- <<<  CAPTURE HAPPENS HERE >>>

    -- Wait 4 sec
    print("Waiting 4 sec")
    p(4000)

    -- ******************* CAPTURE SEQUENCE ENDS HERE ***********************

    -- Start Matlab Postproc
    xw_status = mws.StartMatlabPostProc(adc_bin_file, 0)
    assert(xw_status == 0, "ERROR: API failed")
  • Hello,

    The CRD slope used in this Lua script is less than the required value.

    Could you check using the 420MHz/us CRD slope i.e CRD Slope magnitude as 0x395 LSB and let us know if the issue persists?

    Formula used for calculating the above values are:

    CRD slope = totalBandInKHz/min(6, (idleTimeInus-1)) in MHz/us.

    In your use case, 2100/min(6,6-1) = 420MHz/us. 

    CRD slope magnitude (in LSB) = (CRD slope)/ (LSB value) = (420MHz/us)/(457.763KHz/us) = 917LSB = 0x395LSB.

    Regards,

    Deexith.

  • Hi, 

    Thank you for your addvice!

    It removed distortion.

    Regards,