Page 1 of 1

Suggestion for "iacmax" parameter

Posted: Tue Jul 26, 2022 6:30 pm
by catphish
I am doing some tuning and I notice that there is currently no spot value for instantaneous AC current. There are a couple of approximations in the form of i1rms and i2rms, but I think it would be very useful to have an instantaneous value for the peak AC current. This can be calculated quite easily as follows:

Code: Select all

i3 = - i1 - i2
imax = sqrt(i1 * i1 + i2 * i2 + i3 * i3) / sqrt (1.5)
The result of this calculation is demonstrated in the attached chart. I would suggest that GetIlMax could be replaced with this calculation as this will return what the max phase current *will* be, even if that peak hasn't been reached yet in any particular phase. This might also reduce oscillation when derating on AC current.
imax.png
On a related note, I'm confused by why a SVM offset calculation is used in GetIlMax. As far as I know, SVM offset shouldn't impact current readings.

Re: Suggestion for "imax" parameter

Posted: Tue Jul 26, 2022 7:46 pm
by johu
Sounds like a good idea.
On a related note, I'm confused by why a SVM offset calculation is used in GetIlMax. As far as I know, SVM offset shouldn't impact current readings.
I noticed a familiar 3*fstat ripple on ilmax which is compensated by more or less subtracting third harmonic. Sketchy, I know

Re: Suggestion for "iacmax" parameter  [SOLVED]

Posted: Sun Jan 15, 2023 7:14 pm
by catphish
I've written a patch to replace ilmax with my suggested version. On paper it should be perfect, but it's hard to confirm / demonstrate because the current sensors in the prius inverter have too much noise and DC offset to work well with my small test current.

https://github.com/catphish/stm32-sine/ ... 0131439f5f

The original version actually works very well, but in theory this version is more "correct".

Edit: This has now been merged into openinverter.