Other Parts Discussed in Thread: TMS320F28069M
Hello,
I am using TI InstaSpin FOC software on a TMS320F28069M, integrated in a high voltage board with PMSM motor.
Actually I am faced to the task, to calculate the current, which my board sinks from the supply.
Because there is no current sensor in the supply line, the idea is to do the calculation from given signals of TI InstaSpin FOC software.
Following the thread
https://e2e.ti.com/support/microcontrollers/c2000/f/902/p/470634/1693712#1693712
there is given the approach over calculating motor-power and divide this by the supply voltage:
motor power + inverter losses = buss power.
P_motor = (Vd * Id + Vq * Iq) * 1.5
P_buss = P_Motor * 1.04 (assuming 4% inverter losses)
I_buss(avg) = P_buss / V_buss
After I implemented this calculations in a cyclic task and did some tests I found out, that it works in principal, but that there is a systematical mismatch dependant from supply voltage.
I.e. on the test rig, when the motor is operating in a constant load situation (speed, torque= constant) and the supply voltage is increased from min. to max. supply level, the calculated power (P_motor) is decreasing.
Monitoring the input signals for the P_motor calculation, I found out, that the signals Iq and Id stay constant during the test, but the signals Vq and Vd decrease with increasing supply voltage. In effect the calculated motor power decrease, instead staying constant.
From my understanding, the Vq and Vd signals should not vary, when Iq and Id are constant (at constant motor speed and torque).
In fact, the power which is delivered from the supply does not vary, but the calculated motor power varies with changing supply voltage.
Below some results from the measurement.
First 3 columns show the values from the power supply.
Next 4 columns show the InstaSpin FOC signal values.
The last 2 columns show the calculated power and supply current (losses ignored).
| calculated Power Supply [W] |
measured Power Supply [V] |
measured Power Supply [A] |
InstSpin I_q [A] |
InstSpin I_d [A] |
InstaSpin V_q [V] |
InstSpin V_d [V] |
calculated Motor Power [W] |
calculated Input current [A] |
ratio motor power calc./ input |
| 3150 | 250 | 12,6 | 18 | 4,8 | 173,16 | 93,24 | 5346,648 | 21,39 | 0,58915418 |
| 3164 | 280 | 11,3 | 18 | 4,8 | 155,4 | 79,92 | 4771,224 | 17,04 | 0,6631422 |
| 3180 | 300 | 10,6 | 18 | 4,8 | 142,08 | 75,48 | 4379,616 | 14,60 | 0,72609105 |
| 3185 | 325 | 9,8 | 18 | 4,8 | 128,76 | 71,04 | 3988,008 | 12,27 | 0,79864434 |
| 3185 | 350 | 9,1 | 18 | 4,8 | 119,88 | 62,16 | 3684,312 | 10,53 | 0,86447619 |
| 3225 | 375 | 8,6 | 18 | 4,8 | 115,44 | 62,16 | 3564,432 | 9,51 | 0,90477249 |
| 3200 | 400 | 8 | 18 | 4,8 | 106,56 | 57,72 | 3292,704 | 8,23 | 0,97184563 |
| 3239 | 410 | 7,9 | 18 | 4,8 | 102,12 | 53,28 | 3140,856 | 7,66 | 1,03124753 |
| 3234 | 420 | 7,7 | 18 | 4,8 | 97,68 | 48,84 | 2989,008 | 7,12 | 1,08196432 |
What is the fundamental mistake in this scenario ?
Friendly regards
Martin