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.

TMS320F28069F: Motorware : functions at the end part of user.c

Part Number: TMS320F28069F
Other Parts Discussed in Thread: MOTORWARE

Hello,

I have a question the Motorware software package.

It is specifically on a few functions provided at the end part of the file of user.c.

They are listed as follows:

_iq USER_computeTorque_Ls_Id_Iq_pu_to_Nm_sf(void)

_iq USER_computeTorque_Flux_Iq_pu_to_Nm_sf(void)

_iq USER_computeFlux_pu_to_Wb_sf(void)

_iq USER_computeFlux_pu_to_VpHz_sf(void)

_iq USER_computeTorque_Nm(CTRL_Handle handle, const _iq torque_Flux_sf, const _iq torque_Ls_sf)

_iq USER_computeTorque_lbin(CTRL_Handle handle, const _iq torque_Flux_sf, const _iq torque_Ls_sf)

I can not figure out the theoretical background on the above-listed six USER functions.

Would you please explain it to me or provide me with some references if possible?

Thank you for your guidance

With regards,

G. Kim

  • As you see the code in user.c, these functions are used to convert the per-unit value to an SI unit and calculate the electrical magnetic torque of the motor. Below two formulas are for your reference, you may find more information about the formula of torque calculation in some motor drive/control papers or books.

    Te=(3/2)*p*(Flux*Iq+(Ld-Lq)*id*iq), Ld!=Lq
    Te=(3/2)*p*(Flux*Iq), Ld=Lq
  • Hi Yanming Luo,

    Tnahk you for your review.

    I need explanation on the following functions.

    They seem not be explained in the InstaSPIN user's Guide.

    _iq USER_computeTorque_Ls_Id_Iq_pu_to_Nm_sf(void)

    _iq USER_computeTorque_Flux_Iq_pu_to_Nm_sf(void)

    _iq USER_computeFlux_pu_to_Wb_sf(void)

    _iq USER_computeFlux_pu_to_VpHz_sf(void)

    Thank you for your guidance.

    With regards,

    G. Kim

  • As replied to you, the function name should be very clear to show what it does, and you just know all the variable in instaSPIN algorithm use the per-unit, these functions are to calculate the coefficient for convert the PU value to SI value, to calculate Flux with V/Hz unit, Flux with Wb unit, Torque with Nm.
  • Hi Yanming Luo,

    Thank you for your review.

    With respect to the function of _iq USER_computeTorque_Flux_Iq_pu_to_Nm_sf(void), I can not understand the following codes well:

    (1) float_t maxFlux = (USER_MOTOR_RATED_FLUX*((USER_MOTOR_TYPE==MOTOR_Type_Induction)?0.05:0.7));

    It seems that a constant of 0.05 or 0.7 is multiplied to USER_MOTOR_RATED_FLUX in accordance with the USER_MOTOR_TYPE of ACIM or PMSM, respectively. How was the constant of 0.05 or 0.7 derived?

    (2) float_t lShift = -ceil(log(FullScaleFlux/maxFlux)/log(2.0));

    I can not understand this code at all.

    Thank you for your guidance.

    With regards,

    G. Kim

  • These codes correspond to instaSPIN-FOC FAST algorithm in ROM that is used to convert the value from PU to SI, you may follow the function to use it in any instaSPIN-FOC projects.