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.

TMS320F2800135: MTPA for IPMSM motor

Part Number: TMS320F2800135
Other Parts Discussed in Thread: C2000WARE-MOTORCONTROL-SDK, C2000WARE

Tool/software:

Hi I have a motor with a saliency ratio of about 2. I determined this by using an LCR meter and finding the minimum and maximum Ls through a full electrical rotation. TI documentation (SPRACF3) states that Ld > Lq, whereas all other sources state Lq > Ld. Using TI's Ld > Lq results in an MTPA kconst value that is negative (obj->kconst = 0.25 * (flux_Wb /(Ls_q_H - Ls_d_H));) which does not play well with the subsequent calculations when Is_ref_A is positive: obj->gconst = obj->kconst / obj->Is_ref_A; and then obj->angleCurrent_rad = acosf(obj->gconst - sqrtf(obj->gconst * obj->gconst + 0.5));

So, I swapped the motor parameters to make Lq the larger inductance value and Ld the smaller one, and this fixes the NaN issue. However, even though my IPMSM motor has a saliency ratio of around 2 which is fairly high, the inductance is quite small (0.000010uH to 0.000020uH) compared to rated flux (0.02 V/Hz or about 0.0032 Wb). The calculations result in gconst around 62, and this results in only about a one degree change in angle, and so extremely small values of Id_ref compared to Iq_ref. Is it true that my IPMSM simply will not benefit noticeably from MTPA due to high flux-to-inductance ratio?

  • TI documentation (SPRACF3) states that Ld > Lq,

    It could be a typo. The MTPA algorithm in the example lab in motor control SDK uses the Lq>Ld to calculate the injection current or vector angle.

    Is it true that my IPMSM simply will not benefit noticeably from MTPA due to high flux-to-inductance ratio?

    Not only MTPA, you may have to add a decoupling for this.

  • Thanks for the response. I will work on implementing DQ decoupling. Is there any sample code for me to use as a reference?

  • Not yet for reference. You can find a lot of the papers on website, and implement it in your project.

  • Understood. I am surprised this is not included in the base code since it is easy to add and provides a more 'complete' control solution with the potential for improved performance on some motors. It could be enabled with a compiler predefined symbol as is done with other features. Also, the code appears to be 'pre-wired' for it with the existing feed-forward terms. In any case, does this look correct to you?

    // obj->Vdq_ffwd_V.value[0] = 0.0f;
    // obj->Vdq_ffwd_V.value[1] = 0.0f;

    obj->Vdq_ffwd_V.value[0] = obj->speed_rps * objUser->Ls_q_H * obj->Idq_in_A.value[1];
    obj->Vdq_ffwd_V.value[1] = -obj->speed_rps * (objUser->Ls_d_H * obj->Idq_in_A.value[0] + objUser->motor_ratedFlux_Wb);

    Thanks.

  • The dq decoupling method has been implemented in the Universal Motor Lab as below, but it was not validated and tested on an IPM motor. You can refere to it.

    #if defined(MOTOR1_DECOUP)
    if((obj->flagMotorIdentified == true) && (obj->flagEnableDecoupleCtrl == true))
    {
    float32_t speed_rps = obj->speed_Hz * MATH_TWO_PI; // unit is rad/s

    obj->V_decoup_max_V = obj->adcData.VdcBus_V * objSets->V_decoup_sf;
    obj->V_decoup_min_V = -obj->V_decoup_max_V;

    // -We*Lq*Iq, SI unit: We(rad/s)*L(H)*I(A)
    obj->Vdq_decoup_V.value[0] =
    __fsat(-speed_rps * objSets->Ls_q_H * obj->Idq_in_A.value[1],
    obj->V_decoup_max_V, obj->V_decoup_min_V);

    // +We*(Ld*Id+flux), SI unit: We(rad/s)*L(H)*I(A), Flux(wb)
    obj->Vdq_decoup_V.value[1] =
    __fsat(speed_rps * (objSets->Ls_d_H * obj->Idq_in_A.value[0] + obj->flux_Wb),
    obj->V_decoup_max_V, obj->V_decoup_min_V);
    }
    else
    {
    obj->Vdq_decoup_V.value[0] = 0.0f;
    obj->Vdq_decoup_V.value[1] = 0.0f;
    }

    obj->Vdq_ffwd_V.value[0] += obj->Vdq_decoup_V.value[0];
    obj->Vdq_ffwd_V.value[1] += obj->Vdq_decoup_V.value[1];
    #endif // MOTOR1_DECOUP

    The detailed introduction about the lab can be found in the lab user’s guide as the links below.

    C2000WARE-MOTORCONTROL-SDK: https://www.ti.com/tool/C2000WARE-MOTORCONTROL-SDK

    Universal Project and Lab User’s Guide: https://www.ti.com/lit/spruj26

    Example lab project at the folder: C:\ti\c2000\C2000Ware_MotorControl_SDK_<version>\solutions\universal_motorcontrol_lab\f28002x

    or                                                         C:\ti\c2000\C2000Ware_MotorControl_SDK_<version>\solutions\universal_motorcontrol_lab\f28003x

    or                                                         C:\ti\c2000\C2000Ware_MotorControl_SDK_<version>\solutions\universal_motorcontrol_lab\f280013x

  • Thank you for the code snippet. I downloaded the latest MotorControl SDK (C2000Ware_MotorControl_SDK_5_02_00_00) and don't see that in the universal_motorcontrol_lab for F280013x, but I will add what you posted. Thanks!