Hello,
I am trying to measure the power consumed by a motor. I am using a launchpadXL-F28027 with a boostXL-DRV8301 and a BLDC motor. I am using example project proj_lab05a. In the mainISR, I read back the currents:
// 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));
Eventually, I want to multiply this Is by gMotorVars.VdcBus_kV (divided by 1000 to get watts). The currents that are read vary a lot, so I apply a low-pass filter:
Is_lowpassed += _IQmpy(_IQ(0.001), gMotorVars.Is_A - Is_lowpassed);
Iq_lowpassed += _IQmpy(_IQ(0.001), gMotorVars.Iq_A - Iq_lowpassed);
The Iq_lowpassed matches the Iq_ref_A. The Is_lowpassed is slightly higher due to Id current.
The problem I am experiencing right now, is that the Is_lowpassed does not match the actual current as measured by a multimeter. Here are some measurements I have taken:
iq_ref Actual Is
0.5 0.082 0.64
1 0.216 1.27
1.5 0.429 1.9
2 0.75 2.53
2.5 1.216 3.16
3 1.757 3.79
If I use the Is values, and multiply it by the bus voltage, I get a power that's way more than what the PSU is delivering. What am I missing here?
PS I couldn't format this post properly as the inserting windows wouldn't load..