Page 1 of 1

Inverter Firmware v5.11.R

Posted: Thu Sep 30, 2021 9:46 am
by johu
Obsolete: this version had bugs and is superseded by 5.12.R

I released a new inverter firmware. As always only the FOC version as I cannot test the sine version myself. So please some test it with the attached files.

The changes are:
  • Limiting q and d controller outputs to sane values to avoid stuttering and over current trips
  • First save CAN map then parameters to be compatible with 2k flash pages
  • Dynamically switch over to BMW i3 SPI comms when so configured
  • Boot loader pin commands changed to new semantics
  • Fix FOC current offset calibration
  • Adding support for outlander front motor temp sensor
  • Using float math for slow functions (should make no functional difference, just easier to maintain)
  • Bugfix temperature derating
  • Clearing precharge output after some delay of closing DC switch
  • Added Jon Volk mods for ACIM
  • Removed M3 detection for now, detected Prius MG1 MCU as Tesla
  • Support precharge during bootloader
  • Remove heatcurrent code
  • Do not disable PWM in neutral gear (would cause over current when enabling again)
  • Added ffwstart parameter which defines where field weakening controller starts to ramp up
https://github.com/jsphuebner/stm32-sin ... ag/v5.11.R

The single largest improvement is the ffwstart parameter. It lets you dial up fwkp to -300 which greatly improves high speed performance at least for the Leaf motor while not causing oscillation at low speed. ffwstart can be chosen quite lax, just a good deal before the field weakening is actually necessary. I set it to 200 Hz.

EDIT: attached follow up version 5.12.R for testing.
EDIT2: also added Epcos temp sensor

Re: Inverter Firmware v5.11.R

Posted: Fri Oct 01, 2021 3:13 pm
by yaroslav
Hi johannes, can you add the EPCOS temperature sensor to the new firmware

Re: Inverter Firmware v5.11.R

Posted: Fri Oct 01, 2021 4:32 pm
by arber333
johu wrote: Thu Sep 30, 2021 9:46 am I released a new inverter firmware. As always only the FOC version as I cannot test the sine version myself. So please some test it with the attached files.
But attached sine firmware is for us to test with acim? Confirm please?

tnx

Re: Inverter Firmware v5.11.R

Posted: Fri Oct 01, 2021 7:21 pm
by yaroslav
arber333 wrote: Fri Oct 01, 2021 4:32 pm
johu wrote: Thu Sep 30, 2021 9:46 am I released a new inverter firmware. As always only the FOC version as I cannot test the sine version myself. So please some test it with the attached files.
But attached sine firmware is for us to test with acim? Confirm please?

tnx
I'll try to do it one of these days

Re: Inverter Firmware v5.11.R

Posted: Sat Oct 02, 2021 1:54 pm
by RetroZero
Thanks Johu 👍

Re: Inverter Firmware v5.11.R

Posted: Sat Oct 02, 2021 5:10 pm
by yaroslav
I tested the firmware, there is no regen

Re: Inverter Firmware v5.11.R

Posted: Sat Oct 02, 2021 6:30 pm
by jon volk
You’ll need to command much higher regen with fweakstrt set to a high value. If you set that equal to fweak I assume your regen will be as previous. I’m going to add something in to ramp fweak value back down in proportion to potnom going negative.

Re: Inverter Firmware v5.11.R

Posted: Mon Oct 04, 2021 3:50 pm
by johu
Ok, good to know that's the culprit

Re: Inverter Firmware v5.11.R

Posted: Mon Oct 04, 2021 3:51 pm
by johu
yaroslav wrote: Fri Oct 01, 2021 3:13 pm Hi johannes, can you add the EPCOS temperature sensor to the new firmware
Ah sorry, overlooked that. Will do.

Re: Inverter Firmware v5.11.R

Posted: Mon Oct 04, 2021 6:26 pm
by yaroslav
jon volk wrote: Sat Oct 02, 2021 6:30 pm You’ll need to command much higher regen with fweakstrt set to a high value. If you set that equal to fweak I assume your regen will be as previous. I’m going to add something in to ramp fweak value back down in proportion to potnom going negative.
It even seemed to me that the dynamics improved, I installed fweakstrt the same as fweak, but there is still no regen, there was a regen on the firmware version 4.9

Re: Inverter Firmware v5.11.R

Posted: Tue Oct 05, 2021 11:43 am
by johu
Ok, regen works in FOC firmware but not in sine. So it must be in the sine-only code. Searching...

Re: Inverter Firmware v5.11.R

Posted: Tue Oct 05, 2021 3:02 pm
by johu
Ok, the problem should be in both versions. Setting pot2min=pot2max=4095 no longer results in full regen. Will fix.

Re: Inverter Firmware v5.11.R

Posted: Tue Oct 05, 2021 6:24 pm
by johu
Alright, try that

Re: Inverter Firmware v5.11.R

Posted: Wed Oct 06, 2021 8:17 pm
by yaroslav
Hi Johannes. Tested the firmware, regen appeared. The temperature sensor also works. Thank you!