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.

TMDXIDDK379D: TripFlagDMC Triggering issue in Build level 3

Part Number: TMDXIDDK379D
Other Parts Discussed in Thread: TMDSCNCD28379D, LAUNCHXL-F280025C, CONTROLSUITE, C2000WARE-MOTORCONTROL-SDK, C2000WARE, TMDSHVMTRINSPIN

I am working to control BLDC  currently working my way through the TMDXIDDK379D, which has 6 build levels. I am on build level 3, First two build levels are completed successfully. In level 3 which asks you to adjust IdTesting, Iqtesting and speedref (ref doc : Quick Response Control of PMSM Using Fast Current Loop) The default current value that would trip this flag is set to 8A,  IdTesting = 0 , IqTesting = 0.03, and Speedref = 0.3 had been set. 

My problem in build level 3 is TripFlagDMC triggers shutdown when i turn motor variable "runmotor' to motor run. but the current draw from the power supply is around 1A, well below the threshold of 8A. 

I don't understand what would cause this flag to trigger, and I cant find an expression to monitor the LEM current sense module.

1. Controller board- TMS320F280049C

2 Inverter board - ST Evaluation Board (STEVAL-IPM07F)

3. Motor - BLDC - DPN57BLS94.004

Thank you

  • Hi Ajay,

    The overcurrent limits should get verified in build level #2, but you're saying it's only tripping when running build 3? Checking the CMPSS (comparator) status register values should give a hint into what is causing the trip as well.

    My problem in build level 3 is TripFlagDMC triggers shutdown when i turn motor variable "runmotor' to motor run. but the current draw from the power supply is around 1A, well below the threshold of 8A. 

    Maybe there is a spike of current above 8A? Are you able to set a trip on your supply itself to verify this?

    Best,

    Kevin

  • Hi kevin,

      This is my build level 2 results, in this level motor starts to run slowly in open loop. initially it starts to vibrate, after adjusting Vd, Vq and speedref values motor runs smoothly. i set my current limit to 3A because here I'm using max 3A motor.

       we can see in the Graph Id and Iq current feedback, positional information generated and based on encoder. after verifying all these (Build level 2 results) i moved to 3rd build level.

    (Fig : 1)

       After completing level 2 I'm just changed my build level 2 to 3 and debug the program. then i set enableFlag to 1 the isrTicker variable is incrementally increased. once i turn motor variable "runmotor' to motor run TripFlagDMC triggers shutdown. here i attached my level 3 results (Fig : 2) and CMPSS status register values ( Fig : 3)

         (Fig : 2)

           

    (Fig : 3)

        

    Maybe there is a spike of current above 8A? Are you able to set a trip on your supply itself to verify this?

         yes, may be there is a possibilities of current spikes but i haven't faced any problem in level 2 so i don't  set any trip on my supply.

    whether it is caused due to lowering my current limit values ? if i increase the current limit how my motor is protected from over current because I'm using 3A motor? or is that i have to change any Idref, Iqref and PID variables (kp,ki values)?

    In that program default current sense is LEM sense method, But my hardware has only capable of shunt sense method. if i changed sense method LEM to shunt it shows me an error message. so i set current sense method to LEM in program and ADC reads the values measured from shunt sense method. Here i attached shunt sense method diagram (Fig :4 ). I'm using STEVAL-IPM07F compact motor drive power board.

    (Fig :4 )

    Thanks,

    Sathish P

  • Hi Sathish,

    I see that COMPSTS register of CMPSS1 is 0x0200, meaning it latched/tripped low. This should be the root cause and would be good to debug the reason further.

        // *******************************************************
        // Current limit setting / tuning in Debug environment
        // *******************************************************
        LEM_curHi = 2048 + LEM(curLimit);
        LEM_curLo = 2048 - LEM(curLimit);
        SHUNT_curHi = 2048 + SHUNT(curLimit);
        SHUNT_curLo = 2048 - SHUNT(curLimit);
    
        configureCMPSSFilter(CMPSS1_BASE, LEM_curHi, LEM_curLo);      // LEM - V
        configureCMPSSFilter(CMPSS3_BASE, LEM_curHi, LEM_curLo);      // LEM - W
    #if(CGND == HOT)
        configureCMPSSFilter(CMPSS2_BASE, SHUNT_curHi, SHUNT_curLo);  // SHUNT - V
        configureCMPSSFilter(CMPSS6_BASE, SHUNT_curHi, SHUNT_curLo);  // SHUNT - U
    #endif

    In that program default current sense is LEM sense method, But my hardware has only capable of shunt sense method. if i changed sense method LEM to shunt it shows me an error message. so i set current sense method to LEM in program and ADC reads the values measured from shunt sense method.

    When you say shunt sense method do you mean low-side sensing (bottom of half-bridge), like is documented for the IDDK? Or some other method?

    Best,

    Kevin

  • Hi Kevin,

         What is the reason for CMPSS to get tripped? Because I'm new to this to debug reason.

    When you say shunt sense method do you mean low-side sensing (bottom of half-bridge), like is documented for the IDDK? Or some other method?

    Yes, you are right. Here I'm using low side sensing method.

    Thanks

    Sathish 

  • Hi Sathish,

    What is the reason for CMPSS to get tripped? Because I'm new to this to debug reason.

    It's a comparator in the device that will trip on a configured High/Low input voltage, the input voltage being the current sensing signals in this case. It is shown to be tripping Low in your register reads.

    Yes, you are right. Here I'm using low side sensing method.

    OK, some code changes should be required for the current sense calculations then. Not sure of the specific changes required off the top of my head. Build level 2 still senses the phase currents despite being open-loop control, did you confirm they looked OK?

    Best,

    Kevin

  • Hi Kevin,

         Build level 2 still senses the phase currents despite being open-loop control, did you confirm they looked OK?

          In build 2 the phase current senses is equal to actual current flowing to the motor. I have confirmed this with regulated power supply. The current measured in LEM sense method (FIG : 1 & 2) and actual current (ensured with power supply (FIG : 3)) flowing through motor winding are equal.

    (FIG : 1) - A-phase Current Feedback

    (FIG : 2) - B-phase Current Feedback

    (FIG : 3) - Current measured from power supply

          After verifying all of these i moved to level 3. But once i turn motor variable to run the trip flag trips to shutdown. I can't able to run the motor in closed loop. In open loop motor works fine.

    Please suggest me a better way to solve this.

    Thank you,

    Sathish

  • Hi Sathish,

    I noticed in your earlier build 2 image that your speedRef and speed1.Speed (actual) are different. One is positive and one is negative. Resolving this issue first may be required, as they should be the same.

    Best,

    Kevin

  • Hi Kevin,

     As you said now only we noticed that  two values are different. we are solved that issue by changing motor sequence now SpeedRef and Speed1.Speed values are same. Here our results in Level 2 (FIG :1)

    (FIG :1)

       

       Please guide us further to proceed. For control the motor in closed loop(Level 3).

    Thank you,

    Sathish

  • Hi Sathish,

    Does the comparator still trip in build 3 after this fix? If so, I think you'll need to adjust the way LEM_curLo and LEM_curHi are calculated since your hardware is different. I had pointed out this section of the code earlier.

    Best,

    Kevin

  • Hi Kevin,

            With respect to our previous discussion we adjusted LEM current values. I had highlighted the values that are changed.

    uint16_t clkPrescale      = 20;
    uint16_t sampWin         = 30;
    uint16_t thresh             = 18;
    uint16_t LEM_curHi       = LEM(4.0);
    uint16_t LEM_curLo       = LEM(0.001);
    uint16_t SHUNT_curHi   = SHUNT(8.0);
    uint16_t SHUNT_curLo   = SHUNT(8.0);

           

                  I have found these current limit values from my hardware's databrief. Kindly confirm calculated current values are right? or else guide us how to calculate. Here i attached shunt resistor (Low side sensing) connection in my hardware. In this R25, R26, R27 are my shunt resistor.

    And i also changed SAMPLING_METHOD from SINGLE_SAMPLING to DOUBLE_SAMPLING.

    #define CGND                                COLD
    #define BUILDLEVEL                       FCL_LEVEL3
    #define SAMPLING_METHOD           DOUBLE_SAMPLING 
    #define FCL_CNTLR                        PI_CNTLR 
    #define CURRENT_SENSE               LEM_CURRENT_SENSE
    #define POSITION_ENCODER          QEP_POS_ENCODER 

          After these steps TripFlagDMC triggering issue resolved. But the motor is not running in closed loop control.

          when i turn motor variable "runmotor' to motor run the motor starts one rotation initially, after that motor continuously vibrating forward and back.so motor evaluation board (STEVAL-IPM07F) starts to heat rapidly then i adjusted ref q-axis current (M_IQ_LN5) but it isn't work. I had checked all motor and encoder connection everything is fine. if i run the motor in open loop it works properly.  
     

     This is our motor parameters that we used. 

    #define RS                       0.52f        // Stator resistance (ohm)
    #define RR                       NULL        // Rotor resistance (ohm)
    #define LS                        0.00165f   // Stator inductance (H)
    #define LR                        NULL        // Rotor inductance (H)
    #define LM                       NULL         // Magnetizing inductance (H)
    #define FLUX                    4.9f           // BEMF constant (V/Hz)
    #define POLES                  4               // Number of poles
    #define ENC_SLOTS          2500         // Numer of slots in the encoder

    #define M_ID_START        0.2f           // alignment reference d-axis current
    #define M_IQ_LI5             0.10f         // reference q-axis current for level5
    #define M_IQ_LN5            0.03f        // ref q-axis current for no level5

     

      Here we attached our motor working video for your information.

          Datasheet of BLDC motor used here,

    Thanks,

    Sathish

  • Hi Satish,

    OK. I will review and get back to you soon.

    Best,

    Kevin

  • Hi Satish,

            With respect to our previous discussion we adjusted LEM current values. I had highlighted the values that are changed.

    These values should be OK since they set the limits very High/Low. You may later want to adjust the calculation below in 'fcl_f2837x_tmdxiddk_settings.h'.

    //
    // Current sensors scaling
    // LEM    1.0pu current ==> 12.0A -> 2048 counts ==> 8A -> 1365
    // SHUNT  1.0pu current ==> 9.95A -> 2048 counts ==> 8A -> 1647
    //
    #define LEM(A)     (2048 * A / BASE_LEM_CURRENT)
    #define SHUNT(A)   (2048 * A / BASE_SHUNT_CURRENT)

    when i turn motor variable "runmotor' to motor run the motor starts one rotation initially, after that motor continuously vibrating forward and back.so motor evaluation board (STEVAL-IPM07F) starts to heat rapidly then i adjusted ref q-axis current (M_IQ_LN5) but it isn't work. I had checked all motor and encoder connection everything is fine. if i run the motor in open loop it works properly.  

    This makes me thing the motor phases being sensed (U,V,W) may be in the wrong order or the eQEP polarity may be wrong. Are you able to check the DAC outputs (position and current) in build-level 2. Can you compare current readings output of DAC with that of a current probe?

     This is our motor parameters that we used. 

    Flux / BEMF value seems incorrect, but I can't tell if this value actually gets used in the SW project. Seems not.

    Best,

    Kevin

  • Hi Kevin,

               This makes me thing the motor phases being sensed (U,V,W) may be in the wrong order or the eQEP polarity may be wrong. Are you able to check the DAC outputs (position and current) in build-level 2. Can you compare current readings output of DAC with that of a current probe?

           we swapped motor phases now the motor starts to run but not smoothly. It makes acoustic noise while running also vibrating, So that we tune the motor by adjusting Iq ref and Speedref values to achieve smooth running but the condition remains same. also the torque was very low we can easily hold the rotor shaft in closed loop condition.

    #define M_ID_START        0.2f  // alignment reference d-axis current
    #define M_IQ_LI5            0.10f // reference q-axis current for level5
    #define M_IQ_LN5           0.10f // ref q-axis current for no level5

           How to tune the motor to achieve smooth run and increase the torque? Can you please share the calculation to calculate PWM frequency, Iq ref and Id ref values?

    Thank you,

    Sathish 

  • Hi Satish,

    I have a few suggestions that should make this evaluation process simpler.

    1. Use TMDXIDDK379D hardware with TMDSCNCD28379D. The example project and hardware (with some minor soldering changes) can support low-side shunt for current sensing, but just doesn’t have the same fast response performance and can’t use the dual sample mode as using LEM sensor or inline shunt. However, using FCL on such applications with low-side shunt has little purpose.
    2. Evaluate with different C2000 and low-side sensing evaluation boards. Suggest using the Universal Motor Lab and respective hardware: https://www.ti.com/lit/spruj26
      1. Use LAUNCHXL-F280025C and select a DRVx board for low-side sensing inverter

    Best,

    Kevin

  • Hi Kevin, 

    Shall we proceed,  control suite HVIPM servo project porting to 49c or 79d launch pad...we plan to use 79d  or 84D based on processor availability for our custom board...In future we plan to use same IPM Hardware for AC motor and Bldc motor for our different machinery application.  

    Below path.. 

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.0\HVPM_Sensored

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.0\HVPM_Sensored_Servo

     In that SW, the high side PWM ( 1A,2A,3A) signals are updated through SVGEN function. But how the low side PWM ( 1B,2B,3B) signals had been updated? We haven't find any CMPA value updating function in SW for low side. Whether it is updated by SVGEN or constant CMPA values?

     If the low side PWM signals are updated by SVGEN then how high side and low side signals are updated in proper sequence? Because high side gate and low side gate in same leg shouldn't be turned on at the same time.

    Regards

    Sathish 

  • Hi Satish,

    You should install and use the C2000WARE-MOTORCONTROL-SDK product instead of using ControlSUITE. It is much more up to date, ControlSUITE doesn't get updated any longer. See folder below for the solution you mention.

    C:\ti\c2000\C2000Ware_MotorControl_SDK_4_00_00_00\solutions\tmdshvmtrinspin

    The hardware intended to be used for this project is TMDSHVMTRINSPIN and a ControlCARD.

    You could try porting the project from F28004x to F2837x/38x.

    Best,

    Kevin

  • Hi Kevin,

    General Doubt : 

    In that SW (TMDXIDDK379D), the high side PWM ( 1A,2A,3A) signals are updated through SVGEN function. But how the low side PWM ( 1B,2B,3B) signals had been updated? We haven't find any CMPA value updating function in SW for low side. Whether it is updated by SVGEN or constant CMPA values?

      If the low side PWM signals are updated by SVGEN then how high side and low side signals are updated in proper sequence? Because high side gate and low side gate in same leg shouldn't be turned on at the same time.

        As per previous discussion we will go with  universal motor control. Can you please suggest steps to follow to port program to delfino (28379D).

        We going to add 3 voltage sense circuit in our hardware by some solder changes (as per your suggestion). so totally we have VDbus, 3 current sense, 3 voltage sense. 

    Thanks,

    Sathish 

  • Hi Satish,

    In that SW (TMDXIDDK379D), the high side PWM ( 1A,2A,3A) signals are updated through SVGEN function. But how the low side PWM ( 1B,2B,3B) signals had been updated? We haven't find any CMPA value updating function in SW for low side. Whether it is updated by SVGEN or constant CMPA values?

    ePWM A and B outputs will be complimentary signals. You only need to update CMPA value like below for both HIGH/LOW side PWM signals.

    // -----------------------------------------------------------------------------
    // Computed Duty and Write to CMPA register
    // -----------------------------------------------------------------------------
        EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_A,
                            (uint16_t)((INV_PWM_HALF_TBPRD * svgen1.Tc) +
                                        INV_PWM_HALF_TBPRD));
        EPWM_setCounterCompareValue(EPWM2_BASE, EPWM_COUNTER_COMPARE_A,
                            (uint16_t)((INV_PWM_HALF_TBPRD * svgen1.Ta) +
                                        INV_PWM_HALF_TBPRD));
        EPWM_setCounterCompareValue(EPWM3_BASE, EPWM_COUNTER_COMPARE_A,
                            (uint16_t)((INV_PWM_HALF_TBPRD * svgen1.Tb) +
                                        INV_PWM_HALF_TBPRD));

      As per previous discussion we will go with  universal motor control. Can you please suggest steps to follow to port program to delfino (28379D).

    It would be simpler to start with using LAUNCHXL-F280025C board / device instead of porting to F2837x. Porting to F2837x device will take time, you'll have to consider peripheral/device/clocking differences.

    There is a section 3.3 Porting Reference Code to New C2000 MCU in the Universal Motor Lab document (SPRUJ26).

    Best,

    Kevin

  • Hi kevin,,

    Thanks for the update...

    We plan start with porting F28379D launchpad.,

    we already using F28384d in our custom board that too in our production line for our different machine application for past one year...

    our goal of motor control project is to control two BLDC in place of Commerical VFD drive in market. 

    Previous all discussion is using IPM module (TMDXIDDK379D) we plan to control single BLDC and through IPC communication same project to control another BLDC..this was our initial plan.

    we quite confuse with universal motor control or Dual-Axis Motor Control...

    so based on our discussed we follow universal motor control start porting.

    Thanks, and Regards

    Sathish

  • Hi Satish,

    OK understand. TMDXIDDK379D kit is more for High-voltage motor applications and it seems you are using low voltage motors, so other options would be better.

    Previous all discussion is using IPM module (TMDXIDDK379D) we plan to control single BLDC and through IPC communication same project to control another BLDC..this was our initial plan.

    we quite confuse with universal motor control or Dual-Axis Motor Control...

    We do have a dual-axis motor control example and documentation with F2837x device, maybe this is what you've already found. It uses 3-phase GaN inverter boosterpack which has in-line sensing (not low-side). It manages to control two motors with a single CPU + CLA of the F2837x device.

    C:\ti\c2000\C2000Ware_MotorControl_SDK_4_00_00_00\solutions\boostxl_3phganinv\f2837x

    https://www.ti.com/lit/spraco3

    If this is too confusing, or you want to evaluate with a low-side sensing solution "out of the box", then the Universal Lab should be a better starting point. It may be good to evaluate with the LAUNCHXL-F280025C + DRV Boosterpack first.

    Best,

    Kevin

  • Hi Kevin,

                   We plan to control motor with dual-axis motor control\boostxl_3phganinv\f2837x. If we need any further clarification we will get back to you. now this resolved my issue.

    Thanks,

    Sathish