Page 1 of 1

Inverter Firmware v5.12.R

Posted: Thu Oct 07, 2021 8:56 am
by johu
Seems like there is still some bug fixing to do. Will attach 5.13.R to this thread before publishing on github

Here we go again. This is a bugfix firmware of 5.11.R. Both sine and FOC are tested now.

Binaries here: https://github.com/jsphuebner/stm32-sin ... ag/v5.12.R

Repeating release notes:
  • Fixed integer overflow in temperature sensing
  • Added Epcos temp sensor
  • Fixed filter rounding error in SetTorquePercent
  • Fixed misinterpretation of pot2 configuration (would result in no regen)
  • 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

Re: Inverter Firmware v5.12.R

Posted: Thu Oct 07, 2021 3:59 pm
by ZooKeeper
Thank you Sir!

Re: Inverter Firmware v5.12.R

Posted: Thu Oct 07, 2021 7:08 pm
by arber333
Yeah... about that SINE code...
Tonight i went for a drive and setup my brake regen to 60% with 30% for throttle off regen. As soon as i had to stop at the crossroads Mazda went full regen slip at 0Hz! Its like meeting a wall. I inspected my settings and i found brkrampstr still at 50Hz!
This means your new regen process ignores minimal regen ramp. I consider the car undrivable since at low speed you can fully stop only from regen. It sounds good but its really annoying because rest of traffic doesnt know your sudden stop.

Johu can you examine brkrampstr function?

Other functions work good.

tnx

Re: Inverter Firmware v5.12.R

Posted: Tue Oct 12, 2021 8:55 am
by johu
Thanks :) See above, attached bugfix

Re: Inverter Firmware v5.12.R

Posted: Wed Oct 13, 2021 12:08 pm
by arber333
johu wrote: Tue Oct 12, 2021 8:55 am Thanks :) See above, attached bugfix
Hm, do you need me to send you a graph of any parameters? Would that help and which parameters would that be?

A

Re: Inverter Firmware v5.12.R

Posted: Wed Oct 13, 2021 12:51 pm
by johu
arber333 wrote: Wed Oct 13, 2021 12:08 pm Hm, do you need me to send you a graph of any parameters? Would that help and which parameters would that be?
Does the issue persist in that version? I mean 5.13.R attached to the opening thread.

Re: Inverter Firmware v5.12.R

Posted: Wed Oct 13, 2021 2:17 pm
by arber333
johu wrote: Wed Oct 13, 2021 12:51 pm
arber333 wrote: Wed Oct 13, 2021 12:08 pm Hm, do you need me to send you a graph of any parameters? Would that help and which parameters would that be?
Does the issue persist in that version? I mean 5.13.R attached to the opening thread.
I will test today, thats why i wanted to ask specificaly which parameters would help you further if the problem remains.

Re: Inverter Firmware v5.12.R

Posted: Thu Nov 04, 2021 8:06 am
by bexander
I tested this SW for the first time yesterday and can conclude that the accelerator pedal behaves differently.
When set to "DualCAN" I get full regen as soon as I put pedal below the mid point. When set to "CAN" I get no regen at all below mid point.
With the old 5.06 I had the desired behavior with linear increase in regen with decreased acc pedal below mid point.
Isn't "DualCAN" suppose to be dual values for redundancy?
What has changed and what can I do to fix this so I don't slam the regen when I go slightly below acc pedal mid point?

Re: Inverter Firmware v5.12.R

Posted: Thu Nov 04, 2021 4:18 pm
by bexander
Here is a short plot,
2021-11-03-103437_1024x600_scrot.png
EDIT:
Attached my parameter file as well,
Prius_MGR_FW5_13FOC_2021_11_05.json
(1.38 KiB) Downloaded 121 times

Re: Inverter Firmware v5.12.R

Posted: Thu Nov 04, 2021 9:30 pm
by vwbrady
probably a dumb question, but will regen work on any openinverter based VCU with this firmware update, including Damien's discontinued Leaf VCU?

Re: Inverter Firmware v5.12.R

Posted: Fri Nov 05, 2021 2:33 pm
by johu
bexander wrote: Thu Nov 04, 2021 8:06 am I tested this SW for the first time yesterday and can conclude that the accelerator pedal behaves differently.
When set to "DualCAN" I get full regen as soon as I put pedal below the mid point. When set to "CAN" I get no regen at all below mid point.
With the old 5.06 I had the desired behavior with linear increase in regen with decreased acc pedal below mid point.
Isn't "DualCAN" suppose to be dual values for redundancy?
What has changed and what can I do to fix this so I don't slam the regen when I go slightly below acc pedal mid point?
Are you sending anything to pot2? If so, pot2 will scale your regen as well. Check pot2min and pot2max

Re: Inverter Firmware v5.12.R

Posted: Fri Nov 05, 2021 2:37 pm
by bexander
Yes, I'm sending the same value to pot2 as to pot1 and both pot1 and pot2 parameters set 0-775 min-max , so they have the same value.
Using 5.06 the DualCAN worked well this way but now it has changed I guess.

Re: Inverter Firmware v5.12.R

Posted: Sat Nov 06, 2021 1:14 pm
by johu
Strange, will check

Re: Inverter Firmware v5.12.R

Posted: Sat Nov 06, 2021 6:01 pm
by yaroslav
Hello.
1.I would like to know how Jon Volk mods work for ACIM and whether there will be a description of the new parameters.
2. Today I checked OCURLIM set a small current, the protection did not completely turn off the PWM, but began to limit the current by jerks in the motor, should it be so?

Re: Inverter Firmware v5.12.R

Posted: Sat Nov 06, 2021 6:41 pm
by jon volk
The mod basically adds another value for fweak at low throttle input. You can bypass it by setting fweakstrt to the same value as fweak. So at the default fweakstrt value of 400, and let’s use a value of 250 as fweak. The fweak value that the software uses from 0-30% throttle is 400, then it linearly ramps down to 250 with throttle application being 250 at 100%..or maybe90%. I’d have to look at the code again. In the case of the TESLA LDU, and seemingly some other applications, having a static fweak value would result in low speed oscillation and jerkiness. Setting fweakstrt to 250 in the above example would omit this functionality.

I’ll try updating the wiki this weekend.

EDIT: Wiki updated with fweakstrt description