Thanks for that nice summary.
While this might be trivial in BLDC mode, things in FOC seem to be a lot different.
Can you explain how I get value pairs like :
144.6A Motor current
105A Battery current
at 95% duty.
(these were recorded by a VESC75/300 R2, so I didnt consider measurement errors…yet)
So my understanding was like:
Battery current * sqrt(2) = Motor current
Because (i thought) motor current is the sinusoidal peak current and to get the RMS you divide it by the square root of 2.
My calculator tells me that something is wrong: 105A*1,41 = ~148A. Which is a bit far from the recorded ~145A.
But things in the code also look much different…
The motor current gets calculated like:
state_m->i_abs = sqrtf(SQ(state_m->id) + SQ(state_m->iq));
(so I dont really see the sinusoidal peak here )
And the Battery current gets calculated like:
state_m->i_bus = state_m->mod_d * state_m->id + state_m->mod_q * state_m->iq;
So battery current is: percent of i_d + percent of i_q. Which kind of makes sense since it is absolute state of current being fed, independent of the motor momentary powered phases. Just how the current is split at the moment and by the mod you get the percentage of Voltage in combined with the split between d and q current.
Still I dont get what the motor current represents then, it does not seem to be the sinusoidal peak if you look at the code. Still if you look from the power side: 95%*145A is way beyond the input of 105A.
So could you please enlighten me/us?