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.

TMS320F28379D: understanding some fast current loop parameters

Part Number: TMS320F28379D
Other Parts Discussed in Thread: TMDXIDDK379D

Hello, I have a few questions about the fast current loop library parameters. I have customized the tmdxiddk379d example solution code for my own hardware and motor. I'm having an issue where I can only get the motor speed up to 3100 RPM when I give a 3600 RPM speed command. The motor is rated for 3600 RPM. At 3100 RPM, There is a large phase current that is close to the rated value, even at light loading levels. My suspicion is that this is a back EMF issue and that at these high speeds the phase voltages are no longer able to overcome the back emf produced by the pmsm, which prevents the motor from going any faster. I have a few questions about a couple of fast current loop parameters that will hopefully help me resolve this issue.

1) First, in the fcl_f2837x_tmdxiddk_settings.h file, where the motor parameters are defined, what unit for FLUX does the control algorithm assume? I've pasted below the #define motor parameter code for the TEKNIC_2310PLN04K. 

//
// Define the electrical motor parameters (Teknic Servomotor)
//
#elif(USER_MOTOR == TEKNIC_2310PLN04K)
#define RS          0.381334811         // Stator resistance (ohm)
#define RR          NULL                // Rotor resistance (ohm)
#define LS          0.000169791776      // Stator inductance (H)
#define LR          NULL                // Rotor inductance (H)
#define LM          NULL                // Magnetizing inductance (H)
#define FLUX        0.0398557819        // BEMF constant (V/Hz)
#define POLES       8                   // Number of poles
#define ENC_SLOTS   1000                // Numer of slots in the encoder

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

Is the value in V line to neutral pk, V line to neutral rms, V line to line rms, V line to line pk, etc.? It seems that if I get this unit wrong it would effect my performance at higher speeds. I plug this value into the FCL_params.BemfK value in my main script, as you can see in the code below. My FLUX has currently been set at 0.5178 V line to neutral pk / Hz.

2) My second question relates to the calculation of the maxModIndex. From the initFCLVars() function below, my maxModIndex value is 0.879. This is calculated from a switching frequency of 60 kHz using single sampling mode and the default FCL_COMPUTATION_TIME of 1.00 (us). This seems like it would also be an issue at higher speeds with larger back emfs generated by the motor, because the modulation index directly impacts the inverter output phase voltages. It seems to me that maxModIndex should be as close to 1 as possible, but the only way to do that is to further decrease the FCL computation time to be as close to zero as possible, which obviously can't reach zero. 

//Function that initializes the variables for Fast current Loop library
void initFCLVars()
{

#if(SAMPLING_METHOD == SINGLE_SAMPLING)
    maxModIndex = (TPWM_CARRIER - (2 * FCL_COMPUTATION_TIME)) / TPWM_CARRIER;
    FCL_params.carrierMid = maxModIndex * INV_PWM_HALF_TBPRD * 0x10000L;
#elif(SAMPLING_METHOD == DOUBLE_SAMPLING)
    maxModIndex = (TPWM_CARRIER - (4 * FCL_COMPUTATION_TIME)) / TPWM_CARRIER;
    FCL_params.carrierMid = INV_PWM_HALF_TBPRD * 0x10000L;
#endif
    FCL_params.adcScale   = ADC_PU_PPB_SCALE_FACTOR * LEM_TO_SHUNT;
    FCL_params.sdfmScale  = SD_PU_SCALE_FACTOR * SDFM_TO_SHUNT;
    FCL_params.cmidsqrt3   = FCL_params.carrierMid * sqrtf(3.0f);

    FCL_params.tSamp = (1.0F / SAMPLING_FREQ);
    FCL_params.Rd    = RS;
    FCL_params.Rq    = RS;
    FCL_params.Ld    = LS;
    FCL_params.Lq    = LS;
    FCL_params.BemfK = FLUX; // 0.8 default
    FCL_params.Ibase = BASE_SHUNT_CURRENT; // LEM sensing is scaled to match
                                           // with shunt sensing
    FCL_params.Wbase = 2.0 * PI * BASE_FREQ;
    FCL_params.wccD  = CUR_LOOP_BANDWIDTH;
    FCL_params.wccQ  = CUR_LOOP_BANDWIDTH;

    return;
}

So a few questions about this.

What is the range on which the modulation index is defined? Does it go from 0 to 1?

Where does the equation come from the calculates the maxModIndex? I would like to learn more about this.

Can I overwrite the equation and specify my own maxModIndex (e.g., set it to 1)? What will happen if I do so?

Finally, what is the carrierMid value and what does it do? My value calculates to ~24 million.

Any assistance or direction towards further TI reading resources on this would be much appreciated. Also, I just noticed that 3100 RPM is ~86% of my full speed (3600 RPM), and given that my maxModIndex is 0.88, it seems that the modulation index is what is limiting my speed?

  • 1. All of the units are as shown in the comments of the parameter in the header file. And the value is line to neutral for Rs, Ls and Flux, and also is the peak value for Flux.

    2. The modulation index is between 0.0 and 1.0, but the maximum modulation index depends on the FCL execution time on the device and the PWM frequency. The maximum value equals to the (PWM period - FCl execution time)/ pwm period. The detailed description can be found in the related applications as below.

    Quick Response Control of PMSM Using Fast Current Loop

    EtherCAT-Based Connected Servo Drive Using Fast Current Loop on PMSM

    Finally, what is the carrierMid value and what does it do? My value calculates to ~24 million.

    You don't need to change the equation, just need to set the PWM_FREQUENCY to a value as you want. The variable is based on the PWM period to be used for calculating the PWM output CMPA values.

    As the answer to question 2 above. You may try to increase the dc bus voltage if possible.

    Or you can try to change the coefficients "0.5" and "0.8" in the codes below, but must keep the sqrt(a^2 + b^2) < 1.0

    pi_id.Umax = 0.5 * maxModIndex;             // a=0.5
    pi_id.Umin = -0.5 * maxModIndex;

    pi_iq.Umax = 0.8 * maxModIndex;            // b=0.8
    pi_iq.Umin = -0.8 * maxModIndex;

  • Thank you, that is helpful. A few follow up questions:

    1) From my code snippet above, The maximum mod index is (PWM period - 2 * FCL execution time)/ pwm period, whereas the equation you shared does not have the 2 multiplier in front of the FCL execution time. Where does the 2 come from? It seems intuitive to me that the equation you shared is correct, because a duty cycle is calculated once each PWM period, which would put the max mod index at ~0.94.

    2) Additionally, should I put my own FCL_COMPUTATION_TIME value in to the equation based on the fclLatencyinMicrosec value? Mine is currently at 1.36 us, but I think I can shorten the ADC sampling window slightly to get it down further.

    Thank you, I have already previously changed the b value from 0.8 to 1.0, and that seemed to help with the issue.

    I also just noticed from this thread that the bemfk value is in p.u., whereas above I was plugging in the V line to neutral pk value. I will try increasing the bemfk value closer to 1 and see if that helps my issue as well.

  • 1. That depends on the PWM timer counting mode. The up-down counting mode should use the "2" in the equation as shown in the example project.

    2. Yes.

  • Thank you, that helped clarify the use of some of the parameters.