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.

CCS/TMS320F280049C: FOC algorithm for single shunt PMSM motor

Part Number: TMS320F280049C
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE, TMDSHVMTRINSPIN

Tool/software: Code Composer Studio

Hello Team,

Our application runs PMSM motor with single-shunt resistor using FOC algorithm. We are highly relying on
FOC library, as provided in "controlSUITE" ,"\\<path>\controlSUITE\development_kits\TMDSHVMTRKIT5X_v1.0\HVACI_Sensorless_2805x",by Texas.

We are currently using "F280049C" series controller ,can you please suggest or help with the below parameters to be used.

//

#define LR // Rotor inductance (H)
#define LM // Magnatizing inductance (H)

#define BASE_FREQ 200 // Base electrical frequency (Hz)

// 

Kindly suggest us any alternate library feasible to our requirement .

  • For this part, the same source FOC code can be reused after taking care of any peripheral register specific modifications. To your query on motor inductances, the value remains the same as long as the motor is same.  

  • Glad to hear from you,

    Our concern is whether we are limiting ourselves only to this library or do we need to follow other alternate.

    Since this library is outdated, we are requesting you to suggest the updated or suitable library

    for FOC algorithm to run PMSM sensorless motor. 

    Advance Thanks !!

  • The basic philosophy of FOC is still the same. However, there are many subtle variants to this to fit certain performance reqs. The one we provided in the example is the basic algorithm with QEP position sensing which will certainly control the motor with FOC. 

  • We are using sensor-less PMSM motor , which does not have any encoder or sensor to determine the position.

    1. Can you suggest us any lib for such requirement ?  

    2. Currently we are relying on this FOC lib, is it feasible for us ?

    Thanks 

  • 1. InstaSPIN from TI is a comprehensive FOC library for sensorless solution. and is available on specific C2000 parts such as the one you use. This library is built in the ROM in device (source code is not open) and is supported by TI examples in MCSDK @

    C:\ti\c2000\C2000Ware_MotorControl_SDK_3_00_01_00\solutions\tmdshvmtrinspin\f28004x

    There is another example available in controlSUITE @

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Enhanced_Sensorless_2803x

    This has reduced low speed performance compared to InstaSPIN, but again, depending on your use case, you may want to consider this.

    2.Yes. 

  • Thank you Ramesh for elaborating the scenario in a detailed manner.

    We have designed our own driver/dev-kit, and has below change as shown in figure.

    Our design implements single shunt control system as shown in below figure [single-shunt] ,but your proposed kit implements 3-shut control system.

    1. Does " InstaSPIN  comprehensive FOC library " support our single shunt control system design?

    2. If  "InstaSPIN  comprehensive FOC library " doesn't support our design,is there an alternate from TI?

  • The InstaSPIN-FOC codes in MC_SDK just support 2 or 3-shunt feedback. For single-shunt, you need special 3-phase current reconstruction algorithm by using single dc-link current based on PWM switch states. You need additional logic for immeasurable vector area during low modulation and sector transition.

    The one more thing you need to consider for single-shunt is ADC SOC timing. For 2 or 3-shunt, SOC trigger point for currents is SVPWM zero vector (ePWM zero count in MC_SDK) to get average switching current. But, for single-shunt, SOC trigger point should be located at active vector. It means that you have to modify PWM and ADC settings in MC_SDK.

    I think the following application report will be helpful for understanding single-shunt with InstaSPIN-FOC.

    SPRACT7 (Title: Sensorless-FOC for PMSM With Single DC-Link Shunt)

    Thanks,

    Steve

  • Thanks Steve and Ramesh.

    You were very helpful in understanding and estimating our requirement. 

    Thanks once again for the support. 

  • Hello Team,

    We are planning to modify our hardware design to suit the given (by TI) " InstaSPIN-FOC library" in c2000ware or controlSuite.

    We have two design approaches as mentioned in below figure.Help us in choosing one of the below designs to suit the " InstaSPIN-FOC library".

  • Either one fits, but would recommend the three resistor model. You can always ignore the third when you decide.

  • As Ramesh mentioned, both are OK. If you measure motor winding currents directly at phase nodes instead of the shunts at low-side switches, over-modulation logic for immeasurable duty cycle is not need because inline currents at phase nodes always flow regardless of PWM duty. 

    If you have to check motor earth leakage current, the three current sensors are required. If not, you can use two resistor model and the remaining current can be calculated by KCL(Kirchhoff's Current Law).

    FYI. InstaSPIN-FOC just needs three-phase current (Ia, Ib, Ic) for torque control. Current measurement topology has nothing to do with InstaSPIN-FOC itself. The reference code was implemented with low-side 2 or 3-shunt, but absolutely inline current sensing like your topology will work with InstaSPIN-FOC, and will show better performance at high modulation index.

    Regards,
    Steve

  • Below figure shows two variants of using 3-resistors. As we know  " InstaSPIN-FOC library" fits for 3-shunt resistor(fig 2) logic. But in your earlier reply you

    are stating that the same  " InstaSPIN-FOC library" works for 3-Inline resistor(fig 1).

    1. Can you reassure that for 3-Inline resistors (fig 1) the same  " InstaSPIN-FOC library"  works ?

    2. If same  " InstaSPIN-FOC library" works how is this  taken in  " InstaSPIN-FOC " algorithm ?

  • Here is my answer.

    1. Yes. No problem.

    2. Both currents are same motor winding current at zero vector. So there is nothing you have to change the code if you keep same current sensing polarity.

    Please refer to the InstaSPIN Users Guide(SPRUH1) section 5 and 17.

    Regards,
    Steve