Post Go back to editing

DpdModelConfigGet not working

Category: Software
Product Number: ADRV9029
Software Version: DLL Version: 6.4.0.14

Dear support team,

I'm having an issue with the DpdModelConfigGet() api. The DPD successfully gets trained, but when I get the trained model, all coefficients are zero. I use the following procedure to get the model (similar to the 'DPD model sweep' script): 

mask = int(Types.adi_adrv9010_TrackingCalibrations_e.ADI_ADRV9010_TRACK_TX1_DPD)
flag = Types.adi_adrv9010_TrackingCalEnableDisable_e.ADI_ADRV9010_TRACKING_CAL_DISABLE
link.platform.board.Adrv9010Device.Cals.TrackingCalsEnableSet(mask, flag)

time.sleep(4)

tx_channel = Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX1
dpd_model_t = Types.adi_adrv9025_DpdModelConfig_t()
dpd_model_object = link.platform.board.Adrv9010Device.Dfe.DpdModelConfigGet(tx_channel, dpd_model_t)[1]

Could you please help me understand why the "dpd_model_object" contains all-zero DPD coefficients? How do I get the model that is currently being applied to the tx channel?

  • Please use the below script. User need to disable DPD before trying to save the model coefficients and pass DPD reset with Coeffsave option.

    #################################################################################
    #GUI Version: 4.1.0.21
    #DLL Version: 4.1.0.12
    #Cmd Server Version: 4.1.0.12
    #FPGA Version: 0xD9000007
    #ARM Version: 4.1.0.6(ADI_ADRV9025_ARMBUILD_TESTOBJ)
    #StreamVersion: 7.1.0.2
    #Author: Anand Kumar
    #Precondition: Please edit the path defined by DPD_MODEL_FILE in line 36 to point to the correct location before running this script
    #Description: This script aborts DPD tracking cal on all 4 Tx channels and saves the last set of coefficients from the requested Tx channel 
    # on the ADRV9025 device, that was computed prior to disabling the DPD tracking cal.
    # The coefficients are saved in the format shown below
    #
    #i j k LUT  Coeff_Real Coeff_Img
    #------------------------------
    #0 0 0  0   0.0858723  0.0943778
    #0 0 1  0   0.178297   0.0423065
    #0 0 2  0   0.0375884 -0.000644866
    #0 0 3  0  -0.0865728 -0.0545587
    #0 0 4  0  -0.10611   -0.0389501
    # .......
    #
    #################################################################################
    
    #Import Reference to the DLL
    import System
    import clr
    import time
    from System import Array
    clr.AddReferenceToFileAndPath("C:\\Program Files\\Analog Devices\\ADRV9025 Transceiver Evaluation Software_x64_FULL\\adrvtrx_dll.dll")
    from adrv9010_dll import AdiEvaluationSystem
    from adrv9010_dll import Types
    from adrv9010_dll import Ad9528Types
    
    DPD_MODEL_FILE = "C:\\Users\\pvalavan\\Desktop\\DFERestoreModel_Tx1_25dBm_v3.txt"
    
    lutDictionary = {
    'ADI_ADRV9010_DPD_LUT0' : 0,
    'ADI_ADRV9010_DPD_LUT1' : 1,
    'ADI_ADRV9010_DPD_LUT2' : 2,
    'ADI_ADRV9010_DPD_LUT3' : 3,
    'ADI_ADRV9010_DPD_LUT4' : 4,
    'ADI_ADRV9010_DPD_LUT5' : 5,
    'ADI_ADRV9010_DPD_LUT6' : 6,
    'ADI_ADRV9010_DPD_LUT7' : 7,
    'ADI_ADRV9010_DPD_LUT8' : 8,
    'ADI_ADRV9010_DPD_LUT9' : 9,
    'ADI_ADRV9010_DPD_LUT10' : 10,
    'ADI_ADRV9010_DPD_LUT11' : 11,
    'ADI_ADRV9010_DPD_LUT12' : 12,
    'ADI_ADRV9010_DPD_LUT13' : 13,
    'ADI_ADRV9010_DPD_LUT14' : 14,
    'ADI_ADRV9010_DPD_LUT15' : 15,
    'ADI_ADRV9010_DPD_LUT16' : 16,
    'ADI_ADRV9010_DPD_LUT17' : 17,
    'ADI_ADRV9010_DPD_LUT18' : 18,
    'ADI_ADRV9010_DPD_LUT19' : 19,
    'ADI_ADRV9010_DPD_LUT20' : 20,
    'ADI_ADRV9010_DPD_LUT21' : 21,
    'ADI_ADRV9010_DPD_LUT22' : 22,
    'ADI_ADRV9010_DPD_LUT23' : 23,
    'ADI_ADRV9010_DPD_LUT24' : 24,
    'ADI_ADRV9010_DPD_LUT25' : 25,
    'ADI_ADRV9010_DPD_LUT26' : 26,
    'ADI_ADRV9010_DPD_LUT27' : 27,
    'ADI_ADRV9010_DPD_LUT28' : 28,
    'ADI_ADRV9010_DPD_LUT29' : 29,
    'ADI_ADRV9010_DPD_LUT30' : 30,
    }
    
    def dpdModelSaveToFile( fileName = DPD_MODEL_FILE):    
        dpdModelFromDevice = Types.adi_adrv9025_DpdModelConfig_t();    
        modelFile = open(fileName,'w+')
        cnt = 0
    
        link.platform.board.Adrv9010Device.Cals.TrackingCalsEnableSet(int(Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX1), Types.adi_adrv9010_TrackingCalEnableDisable_e.ADI_ADRV9010_TRACKING_CAL_DISABLE)
        link.platform.board.Adrv9010Device.Cals.TrackingCalsEnableSet(int(Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX2), Types.adi_adrv9010_TrackingCalEnableDisable_e.ADI_ADRV9010_TRACKING_CAL_DISABLE)
        link.platform.board.Adrv9010Device.Cals.TrackingCalsEnableSet(int(Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX3), Types.adi_adrv9010_TrackingCalEnableDisable_e.ADI_ADRV9010_TRACKING_CAL_DISABLE)
        link.platform.board.Adrv9010Device.Cals.TrackingCalsEnableSet(int(Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX4), Types.adi_adrv9010_TrackingCalEnableDisable_e.ADI_ADRV9010_TRACKING_CAL_DISABLE)
        time.sleep(4)
        link.platform.board.Adrv9010Device.Dfe.DpdReset(Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX1, Types.adi_adrv9010_DpdResetMode_e.ADI_ADRV9025_DPD_COEFF_SAVE)
        dpdModelFromDevice = link.platform.board.Adrv9010Device.Dfe.DpdModelConfigGet(Types.adi_adrv9010_TxChannels_e.ADI_ADRV9010_TX1,dpdModelFromDevice)[1]
    
        for cnt in range(dpdModelFromDevice.dpdNumFeatures):
            var = ""
            var += str(dpdModelFromDevice.dpdFeatures[cnt].i) + " "
            var += str(dpdModelFromDevice.dpdFeatures[cnt].j) + " "
            var += str(dpdModelFromDevice.dpdFeatures[cnt].k) + " "
            var += str(lutDictionary[str(dpdModelFromDevice.dpdFeatures[cnt].lut)]) + " "
            var += str(dpdModelFromDevice.dpdFeatures[cnt].coeffReal) + " "
            var += str(dpdModelFromDevice.dpdFeatures[cnt].coeffImaginary) + "\n"
            print var
            modelFile.write(var)
        modelFile.close()
        print "Num coeffs written to file = ",(cnt+1)    
    
    
    #Create an Instance of the Class
    link = AdiEvaluationSystem.Instance	
    connect = False
    
    if (link.IsConnected() == False):
        connect = True
        link.platform.board.Client.Connect("192.168.1.10", 55556) 
        print "Connecting"
    
    if (link.IsConnected()):
        adrv9010 = link.Adrv9010Get(1)
        print "Connected"
        ##### YOUR CODE GOES HERE #####
        dpdModelSaveToFile()
    else:
        print "Not Connected"
    
    if (connect):
        link.platform.board.Client.Disconnect()
        print "Disconnected"

  • Thank you so much! This fixed the issue. I just have two more questions about this:

    1. Is it necessary to disable tracking cal on all channels, or just the channel that was previously enabled? Also is the 'sleep' call necessary?
    2. Is this information documented anywhere? I didn't see anywhere saying that DPD reset with coeffsave option should be called before attempting to save the DPD model.

    Thank you for your help!

  • 1A) Yes, if otherwise the DPD cal might try to apply the latest coefficients on top of the existing coefficients while you are trying to retrieve the existing coefficients.

    2A) This should be part of the SW package. Each API will have its precondition.