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
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