Inverter Firmware v5.11.R

Post Reply
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Inverter Firmware v5.11.R

Post 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
Attachments
stm32_sine.hex
(133.17 KiB) Downloaded 101 times
stm32_sine.bin
(47.32 KiB) Downloaded 116 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: Inverter Firmware v5.11.R

Post by yaroslav »

Hi johannes, can you add the EPCOS temperature sensor to the new firmware
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Inverter Firmware v5.11.R

Post 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
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: Inverter Firmware v5.11.R

Post 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
RetroZero
Posts: 702
Joined: Tue Oct 29, 2019 2:48 pm
Location: France
Has thanked: 311 times
Been thanked: 38 times
Contact:

Re: Inverter Firmware v5.11.R

Post by RetroZero »

Thanks Johu 👍
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: Inverter Firmware v5.11.R

Post by yaroslav »

I tested the firmware, there is no regen
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: Inverter Firmware v5.11.R

Post 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.
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Inverter Firmware v5.11.R

Post by johu »

Ok, good to know that's the culprit
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Inverter Firmware v5.11.R

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: Inverter Firmware v5.11.R

Post 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
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Inverter Firmware v5.11.R

Post by johu »

Ok, regen works in FOC firmware but not in sine. So it must be in the sine-only code. Searching...
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Inverter Firmware v5.11.R

Post by johu »

Ok, the problem should be in both versions. Setting pot2min=pot2max=4095 no longer results in full regen. Will fix.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Inverter Firmware v5.11.R

Post by johu »

Alright, try that
Attachments
stm32_sine.hex
(133.17 KiB) Downloaded 114 times
stm32_sine.bin
(47.32 KiB) Downloaded 118 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: Inverter Firmware v5.11.R

Post by yaroslav »

Hi Johannes. Tested the firmware, regen appeared. The temperature sensor also works. Thank you!
Post Reply