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.

TMS320F28069M: How to Calculate Supply Current from InstaSpin FOC signals

Part Number: TMS320F28069M

Hello,

I am using TI InstaSpin FOC on the MCU TMS320F28069M to calculate the supply current.

I followed this thread to calculate it:

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/556743/calculate-supply-current-from-instaspin-foc-signals

Using the solution that it seems to work,

// calculate inverter output power in kW
gMotorVars.Power_coef = _IQmpy(_IQ(1.0*1.5/0.96), gMotorVars.VdcBus_kV); // _IQ(1.0*1.5/0.96) for MW16

gMotorVars.Power_kW = _IQmpy((_IQabs(_IQmpy(gMotorVars.Vd, gMotorVars.Id_A)) + _IQabs(_IQmpy(gMotorVars.Vq, gMotorVars.Iq_A))), gMotorVars.Power_coef);

gMotorVars.Iin_A = _IQdiv(gMotorVars.Power_kW, gMotorVars.VdcBus_kV);

I observed that the current is almost twice compared to the current read from a power supply.

Why to convert gMotorVars.Vd and gMotorVars.Vq to real voltage value, it uses gMotorVars.VdcBus_kV and not USER_IQ_FULL_SCALE_VOLTAGE_V as it does with the current?

I've implemented this option and the results are not the expected one too.

Best Regards,

Gorka