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.

# TMS320F28027F: How to monitor Motor current ?

Part Number: TMS320F28027F
Other Parts Discussed in Thread: CONTROLSUITE, MOTORWARE

Hi everyone

I am using C:\ti\controlSUITE2_DMC Rev\development_kits\HVMotorCtrl+PfcKit_v2.1\HVACI_Scalar

I am trying to have the current of motor (like all of VFD's which they can display).

because in V/F control method we don't have theta value of motor so we can not use this equation.

// read Id and Iq vectors in amps
gMotorVars.Id_A = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
gMotorVars.Iq_A = _IQmpy(CTRL_getIq_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));

// calculate vector Is in amps
gMotorVars.Is_A = _IQsqrt(_IQmpy(gMotorVars.Id_A, gMotorVars.Id_A) + _IQmpy(gMotorVars.Iq_A, gMotorVars.Iq_A));

so my question is how to get Motor Current ?

is that ok if I calculate it such a way?

Ia,Ib,Ic into CLARKE transformation so we will have I_alpha and I_beta

and we calculate

MotorCurrent = Sqrt((I_alpha *I_alpha ) +(I_beta *I_beta ));

shall we do that?

thanks for attention.

Dave.

• What current do you want to monitor? Are there any current sensor to sample the phase current on your hardware board? If the three-phase currents are sampling, the motor vector current is equal to sqrt(2 * (Ia*Ia + Ib*Ib +Ic*Ic) /3) directly. Or Sqrt((I_alpha *I_alpha ) +(I_beta *I_beta )) as you mentioned above.

• Hi dear Luo
sorry for delay response I Got corona virus Delta type .

for your question:"What current do you want to monitor? I want to monitor Drive current just like any VFD's and have current Fault .
(for example I have a motor with 24A so if my motor draw higher current I need to have fault in my drive).
Are there any current sensor to sample the phase current on your hardware board? Yes we have 3 LA 100 p (LEM sensor)
"

dear Luo it has been more than 2 month working on current sensor to get accurate value sadly I could not do that :( .I sort to you to answer my question please bear with me to solve my issue .

I calculate motor vector current  buy using  Sqrt((I_alpha *I_alpha ) +(I_beta *I_beta )) .

I have some questions:

Question1:I think motor vector current  value should be equal to DC BUS Current (which I measure by multi meter). Am I right?

(they are not the same,  DC BUS Current which I measure by multi meter is 2Amps whereas motor vector current is 6 Amps  )

Question2:do you think this might be  form measuring the PWM pulse not continuous current  while the DC BUS Current is continuous ?

Question3: how to make this value accurate and close to  DC BUS Current in order to use this value for current fault in my drive?

Thanks for attention.

Regards,

Dave,

• So sorry to hear this. Hope all is well with you now.

Question1:I think motor vector current  value should be equal to DC BUS Current (which I measure by multi meter). Am I right?

No. Both have different values.

Question2:do you think this might be  form measuring the PWM pulse not continuous current  while the DC BUS Current is continuous ?

Question3: how to make this value accurate and close to  DC BUS Current in order to use this value for current fault in my drive?

You have to add a dc bus current sensor. Or calculate the output power of the inverter by using the motor phase current, and then calculate the dc bus current by using (inverter power/dc bus voltage/invert convert efficiency).

• Hi dear Luo

thanks for your sympathy. and useful information!

Dear Luo if I can solve my problem, we can bring our drive to the market ,so please help me to solve it... thanks in advance !

as you mentioned :

calculate the output power of the inverter by using the motor phase current, and then calculate the dc bus current by using (inverter power/dc bus voltage/invert convert efficiency).

I have some question

Question 1:I want to know if I get your point correctly, Let's assume drive ferq is set to 30Hz(Max ferq/volt 60Hz) which means the output voltage is equal to DC Bus/2 ==> (600 / 2 = 300v)

motor vector current =6A

p=v*i

inverter power 1800=300v*6A

(inverter power/dc bus voltage/invert convert efficiency).

DC Bus Current 1800Watt / 600Volt / invert convert efficiency (0.9)= 3.3A

Question 2:Did I calculation right? please correct me if I did some thing wrong .thanks

Question 3:how to calculate motor phase current from motor vector current ?

Question 4:what is invert convert efficiency ?(I just put 0.9 to solve my equation but I do not know what it is)

please bear with me to solve this problem ,thanks

Regards.

Dave.

• If you want to achieve a precise dc bus current, you have to add a current sensor on the dc bus (dc+) or dc link (dc-).

In generally, an inverter doesn't need to know the dc bus current for motor control, and doesn't need to monitor the dc bus current as well. You only need to sample and monitor the phase current of the motor.

Q1, Q2: Not fully correct. You might find the formula in the textbook about motor drive or power electrics.

Q3: You should have current sensor for sampling the phase current. If not, you don't know the vector current. I think that could be vector voltage if you ware using scalar v/f control.

Q4: It could be 0.80~0.95 that depends on the inverter hardware like power device, used switching frequency. You need to test the efficiency.

• Dear Luo ,

dear Luo, all I need is to set current value to have fault in higher value

for example our inverter can support 10kw motor and we connect it to 7.5kw motor so we want to set current fault to 17A (considering motor voltage is 380V )  . in this case we need to measure  motor current .

Q1:can it be done by monitoring  phase current of the motor?

You only need to sample and monitor the phase current of the motor.

good ! I got one step close to my answer as you mentioned we need to just monitor phase current.

now we have hall effect LEM sensor in each phase (A,B,C),so my questions is

Q2:How to get the phase current of the motor?

Thanks for attention

Regards.

Dave.

• 1. Connect the output of the hall sensor to ADC input with a sampling deal circuit that convert the output signals of the hall sensors to a right range value, and then configure the ADC to sample the phase.

2. You might take a look at the FOC example project in controlSUITE, motorWare or motorcontrol SDK though these examples use ADC to sample the phase current with shunt resistor, but the method should be the same.

3. You should use the peak current to implement the over-current fault protection by checking the ADC convert values. Actually, you need to add some external comparator to do the protection as well.

• Dear Luo,
good day .

1. Connect the output of the hall sensor to ADC input with a sampling deal circuit that convert the output signals of the hall sensors to a right range value, and then configure the ADC to sample the phase.

I have Done that.

2. You might take a look at the FOC example project in controlSUITE, motorWare or motorcontrol SDK though these examples use ADC to sample the phase current with shunt resistor, but the method should be the same.

I am actually using it ,I combined the V/F and FOC , please kindly take a look at the picture .

regardless whether it is FOC or VF the sample is taken in every PWM cycle (in this case 10khz)

as I said in this thread

we calculate motor vector current  value

we have Ia,Ib,Ic into CLARKE transformation so we will have I_alpha and I_beta

```// run Clarke transform on current

// read Id and Iq vectors in amps
User_Iq_Full_Scale_A=USER_IQ_FULL_SCALE_CURRENT_A;
gMotorVars.Id_A = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(User_Iq_Full_Scale_A));
gMotorVars.Iq_A = _IQmpy(CTRL_getIq_in_pu(ctrlHandle), _IQ(User_Iq_Full_Scale_A));

// calculate vector Is in amps
gMotorVars.Is_A = _IQsqrt(_IQmpy(gMotorVars.Id_A, gMotorVars.Id_A) + _IQmpy(gMotorVars.Iq_A, gMotorVars.Iq_A));```

motor vector current = Sqrt((I_alpha *I_alpha ) +(I_beta *I_beta ));

my question is:

Question1 :How to convert  "motor vector current " into  "  the phase current of the motor  "?

3. You should use the peak current to implement the over-current fault protection by checking the ADC convert values. Actually, you need to add some external comparator to do the protection as well.

my drive has hardware fault detection comparator , but what I need is to have parameter in drive that can be set to have flexible value to protect "smaller motor rate" from damage.  (for example power of drive is 10kw but our motor is 5.5kw) .

So I should drive Current (that you mentioned it is motor phase current ) to compare it to drive parameter to get fault in higher current..

I hope you understand what meant.

if you have any question fell free let me know.

thanks for attention.

Dave.

• Question1 :How to convert  "motor vector current " into  "  the phase current of the motor  "?

Why don't you need to convert the vector current to the phase current? The sensing current by hall sensors is the real phase current of the motor. You can use the sampling value for over-current protection directly, you just need to convert the rate current of the motor to the maximum peak current of the motor. And also, the motor manufacturer also provides the maximum peak current of the motor in its spec. datasheet.

• HI dear Luo

Why don't you need to convert the vector current to the phase current?

as you may know over-current protection in  drive parameters parameter has time ,for example once over-current occur after 6 second drive goes to over-current fault condition .and this value can be set from 1sec to 60 sec,

it is a lot easier to have one value ("DC"  vector current )than 3 sinusoidal.

I have some question .

question 1: the value of every phase current is sinusoidal ,How to change sinusoidal value to DC Value (in order to become easier to analyze it ).

two ways come to my mind;

please kindly take a look at this picture.

is that right for calculating RMS value of sinusoidal phase current?

other way..

2. RMS = Vp-p * 0.3536;

is there any other way to do so?

thanks for attention

regards.

Dave.

• To implement over current protection for power device on inverter, you'd better to use the sampling current instantaneous value.

Yes, you can use the RMS value to limit the power output of the inverter or the motor, not over current protection. You can calculate the RSM with the 1st way you mentioned above by using the average square root in a period.

• dear Luo

thanks for helping me so far

As the last question

As I mentioned for me it a lot easier to convert  "motor vector current" because I already have it and it is somehow square value(it is not sinusoidal).

so I have a question

question 1: please kindly take a look at to see if my calculation is correct.

to convert  "motor vector current" into "the motor phase current"

shall we use this equation:

I(pk) = (motor vector current )/sqrt(3);

I(rms) = I(pk) / sqrt(2);

for example.

let's assume  motor vector current =6A

so

I(pk) = 6A/1.7320 = 3.4A

I(rms) =  3.4A / 1.41 = 2.4A

so the phase current would be 2.4A

Am I right?

Regards.

Dave.

• If you want to achieve a precise value, the first method using square root average value should be much better.

• Dear Luo,

Thank you very much for helping me to get my answers !

Best wishes :).

Dave.