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.

TMS320F28377D: IDDK_PM_Servo_F2837x project

Part Number: TMS320F28377D

Hello,

We purchased the DesignDRIVE Development Kit IDDK v2.2.1 and I have a question on the  IDDK_PM_Servo_F2837x project.

With reference to the IDDK_PM_Servo_F2837x project, the file of IDDK_PM_Servo_F2837x.c contains the Feedbacks OFFSET Calibration Routine where the variables of offset_SDFM1 and offset_SDFM2 are calculated as follows:

     offset_SDFM1 = K1*offset_SDFM1 + K2*(temp=SDFM1_READ_FILTER1_DATA_16BIT)*SD_PU_SCALE_FACTOR;
     offset_SDFM2 = K1*offset_SDFM2 + K2*(temp=SDFM1_READ_FILTER2_DATA_16BIT)*SD_PU_SCALE_FACTOR;

With respect to the statements listed above, I cannot figure out their calculation logic.

Please explain me the detailed calculation background for the variables of offset_SDFM1 and offset_SDFM2.

Thank you for guidance.

G. Kim

  • The equation represents a first order digital filter, where a fraction of the newest sample and fraction of the previous output are added to get the newest output. You can google it for more theoretical details.

  • Dear Ramesh,

    Thank you for your review.

    I have one more question with respect to the codes.

    I cannot figure out why the constant value of SD_PU_SCALE_FACTOR is multiplied.

    I have found out that the constant value of SD_PU_SCALE_FACTOR is defined as (1/2^15) in the header file.

    The constant value of SD_PU_SCALE_FACTOR is also used in the function currentSensorSuite() as follows:

     current_sensor[SD_CURRENT_SENSE-1].As    = ((temp=SDFM1_READ_FILTER1_DATA_16BIT)*SD_PU_SCALE_FACTOR -
                                                                                       offset_SDFM1) * SDFM_TO_SHUNT;
     current_sensor[SD_CURRENT_SENSE-1].Bs    = ((temp=SDFM1_READ_FILTER2_DATA_16BIT)*SD_PU_SCALE_FACTOR -
                                                                                       offset_SDFM2) * SDFM_TO_SHUNT;

    Thank you for your guidance.

    G. Kim

  • SD_PU_SCALE_FACTOR is used to normalize the current fbk based off the shunt resistor and internal gain of the sigma delta modulator. This helps to get the fbk value of current to be within -1 and +1. In order to have identical performance regardless of the method of current sensing used, another scaling is done so that all current feedbacks represent the same value as that inverter bottom side SHUNT_CURRENT_SENSING, and this scale is SDFM_TO_SHUNT.