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.

TMS320F280025C-Q1: Universal Motor Control Lab: Input Current

Part Number: TMS320F280025C-Q1
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi Team,

One of my customers is using TI C2000 F280025C-Q1 in their design for Electronic Coolant Pump EE. Most of the SW dev is already done but they are now stuck at achieving the optimal performance of the pump. This would require some tuning in the FOC/SW Algo parameters in the Universal Motor Control Lab (in C2000WARE MCSDK). We need help with the following questions-

1. Do we have any parameter/variable in the SW which directly correlates with the input DC current drawn by the system?

2. Based on above- How do we make the input current constant/within narrow range (11.9-12.2A). Right now, the input supply current varies highly and the peak goes to 13.9A

3. How do we enable the comparator module which is currently disabled in the SW for OV current protection. Do we have any parameters for over current fault detection?

4. How do we change from speed control loop to torque control loop in the FOC algorithm?

Please let us know if you need any more info.

Regards,

Sai.

  • Hello Sai,

    1. Do we have any parameter/variable in the SW which directly correlates with the input DC current drawn by the system?

    The current version of the FOC algorithm utilizes three-phase currents and the DC bus voltage, but it does not use the DC bus current.

    2. Based on above- How do we make the input current constant/within narrow range (11.9-12.2A). Right now, the input supply current varies highly and the peak goes to 13.9A

    In a typical FOC loop, maintaining a constant input current is not a primary objective. However, this can be achieved through additional techniques. You could:

    Install a large capacitor at the DC link to smooth out current fluctuations.

    Implement a feedback control system that monitors the input current and adjusts the inverter's operation in real-time to maintain constant current.

    Use a DC-DC converter with constant current control mode at the input stage of the inverter.

    3. How do we enable the comparator module which is currently disabled in the SW for OV current protection. Do we have any parameters for over current fault detection?

    You will need to activate the corresponding CMPSS connected to the phase current ADCs. To adjust the protection threshold, modify the "motorSetVars_M1.overCurrent_A" value.

    4. How do we change from speed control loop to torque control loop in the FOC algorithm?

    Universal motor control employs Field Oriented Control (FOC), which features a current inner loop and a speed outer loop. The speed control loop involves a PI controller that produces a torque reference based on the difference between the desired and actual speeds. To directly control the torque by adjusting the current in the motor windings, you need to bypass the Speed Control PI Loop and set the torque reference directly using either an external command or a calculated value.

    Note that in the FOC inner current loop, the q-axis current (iq) is directly proportional to the torque. In universal motor control, you can set “DMC_BUILDLEVEL” to “DMC_LEVEL_3” to evaluate the motor's closed current loop operation.

    Best Regards,

    Masoud

  • 1. Do we have any parameter/variable in the SW which directly correlates with the input DC current drawn by the system?

    2. Based on above- How do we make the input current constant/within narrow range (11.9-12.2A). Right now, the input supply current varies highly and the peak goes to 13.9A

    Let me share my personal experience.

    My application need constant power. In the literrature/forum, you will easily find a power calculation formula which allow calculation of the power from FOC signals (Vd, Vq, Id, Iq). Based on this and DC voltage, you can calculate the input current.

    Then to maintain it constant, you can add a new PID regulator or act on the current setpoint.

    Using this I'm able to have around 1% to 2% accuracy (it degrades a bit with high field weakening and/or high overmodulation index).

  • Hi Masoud,

    We successfully include the CMPSS module and adjusted the OVER current value also in LEVEL 4. 

    The module over current fault will be occurred above the OVER current value.

     When we tried in DMC LEVEL 3 settings the followings point observed,

    1. Pump is working fine without load.

    2. While we run in loaded condition, the pump gets turned OFF (above 10.1 A) due to module over current error.

    The below settings available in code.

    #define USER_M1_ADC_FULL_SCALE_CURRENT_A      (40.000f)

    DRV 8343 current gain 10

    #define USER_MOTOR1_MAX_CURRENT_A          (10.1f)

    #define USER_MOTOR1_OVER_CURRENT_A         (20.0f) 

    We changed the max current value (12.0f) , as well but the pump gets OFF due to module over current.

    Kindly suggest for LEVEL 3 running condition.

    Regards,

    B.Punitha

  • Hi Punitha,

    The "USER_MOTOR1_MAX_CURRENT_A" is the maximum current that the motor can handle in amperes. It is utilized for PI tuning in the current and speed loops.

    On the other hand, "USER_MOTOR1_OVER_CURRENT_A" represents the threshold for over-current in the motor, also in amperes. This value is crucial for calculating the DAC values of the CMPSS peripheral, which then triggers the PWM's trip zone fault handling. Typically, this parameter is set between 50% to 300% of the rated motor current. If it exceeds the maximum peak current value of the motor, which is defined as "USER_M1_ADC_FULL_SCALE_CURRENT_A * 0.475f", then the maximum peak current is used instead. In your case, with USER_MOTOR1_OVER_CURRENT_A = 20, it surpasses the maximum peak current of 19A.

    Do you experience overcurrent faults right at the beginning of the motor spinning, or is it a continuous load issue? It might be necessary to adjust the setting for USER_MOTOR1_OVER_CURRENT_A.

  • Hi sir,

    Yes.. we are facing over current fault right at the beginning of the motor spinning.

    May I know how to calculate the ADC FULL SCALE CURRENT value in macro?

    Thanks and regards 

    B. Punitha

  • "USER_M1_ADC_FULL_SCALE_CURRENT_A" is the value that represents the highest current that can be measured by the ADC in Amps (A). It is important to set this parameter correctly as it determines the scaling of the ADC readings. Make sure to adjust it according to the maximum current you expect at the input of the ADC, taking into account the gain of your measurement circuit.

    Best Regards,

    Masoud

  • Dear ti team,

       We are using shunt resister as 5 mohm.

    We are using the below settings in code

    ADC FULL SCALE CURRENT VALUE - 40 A

    Current gain - 10

    MAX CURRENT - 10.1 A

    OVER CURRENT value increases upto 30A

    At that time also I got the same issue at the beginning stage of pump. 

    Also we tried to run the code in LEVEL 3 without the fault function ie.., commented CMPSS and fault function. In that condition also pump gets OFF and come out from debug mode.

    Kindly guide us to solve the above issue and to run the pump running in LEVEL 3 condition.. IS there any other parameters we have to check for running in LEVEL 3 mode?

    Advance thanks and regards,

    B. PUNITHA 

  • Hi PUNITHA,

    Have you had a chance to verify the current sensing signals in open loop control by opting for DMC_LEVEL_2 as DMC_BUILDLEVEL?

    Make sure to select the appropriate scale factor according to your board. Based on the values you provided, the ADC scale factor for current should be 66A.

    Additionally, ensure you choose the correct sign for the scale factor "USER_M1_SIGN_CURRENT_SF". If the noninverting (+) pin of the op-amp is grounded in the current feedback circuit, the parameter value should be -1.0f. If the inverting pin (-) is grounded, the value should be +1.0f.

    Best Regards,

    Masoud

  • Hello Masoud Farhadi,

    Please provide feedback for the below points.

    1.Pump rated Voltage & current is 24V, 12A. while increasing pump output pressure from 0 to 1.5bar (increasing Torque), current is almost constant. while increasing pump output pressure from 1.5 to 2.1bar (increasing Torque), Current increased abnormally. we need to make it as constant current while increasing output pressure from 1.5 to 2.1bar (increasing Torque) also. 

    2. Is constant power mode or torque control mode available in C2000?

  • Hello,

    1- Constant current is achievable at "DMC_BUILDLEVEL” equal to “DMC_LEVEL_3” by tuning reference currents.

    2- C2000 motor control SDK does not have a direct torque control (DTC) reference code.

    Best Regards,

    Masoud