Inverter Firmware 5.27.R

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

Inverter Firmware 5.27.R

Post by johu »

Yay, new release. This is the first one with catphish code, very thankful that he now maintains sine code.

When upgrading to this version your canspeed will be off by one, as the new speed 125k has been added. You need to manually set it to the desired speed again.
As always there is the possibility of overspeeding the motor especially when it's unloaded. Set fwcurmax=0 for unloaded tests.

  • Removed ManualMode in FOC, now always adding manualid and manualiq to controller calculated values
  • Added manualstart parameter, has the same effect as pulling start pin high
  • Don't apply backwards regen if motor is already turning backwards
  • Make sine output filter "filterConst" a configurable value "sinefilter"
  • Improve ilMax calculation
  • Add an option to scale voltage and slip simultaneously with throttle
  • New CAN module:
    • gain factor is now in floating point format, no more awkward multiplication by 32 for RX items
    • More than 8 items can be mapped to one message
    • An optional offset can be added between -128 to 127
    • Various commands (save, load, stop) can be issued via CAN (see here: viewtopic.php?t=2907)
    • Full json parameter dump available via CAN
  • Make maximum modulation index variable to allow over modulation
  • Bugfix: tmpm and tmphs were unfiltered
  • Added separate proportional gain parameter for id-controller
  • Scale creep torque with inverse brake pressure (if brake pedal configured)
  • Corrected ids of id/iq to make it mappable to CAN
https://github.com/jsphuebner/stm32-sin ... ag/v5.27.R

As always I haven't published sine binaries on github until somebody tests them
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Inverter Firmware 5.27.R

Post by arber333 »

johu wrote: Thu Jun 01, 2023 6:16 pm Yay, new release. This is the first one with catphish code, very thankful that he now maintains sine code.
As always I haven't published sine binaries on github until somebody tests them
Hi i have just tested this code version in Mazda. I never had a chance to test the previous version though.
I am rather pleased with behaviour at low RPM. It actually takes effort to reduce vibration because of transmission backlash.

My hardware:
ACIM motor 28kW at 260Vdc
AB encoder
400A IGBTs
maxC=400A
overcurrent -600A
single throttle
no CAN

My observations:
- smooth takeoff just after braking to full stop!
- generally smooth takeoff
- after RPM rise there is grumbling from the motor. Sounds like sine is skewed a bit. Previous version 5.20R had no grumbling.
- that grumbling sound is present when hard accelerating from more than 2000rpm, DC amps from 120A - 200A
- what is sinecurve? I have tried it at "voltage" as well as "simultaneous" and the latter gives less grumbling apparently

Let me know which parameters you would like me to record.
params.json
(1.54 KiB) Downloaded 72 times
User avatar
catphish
Posts: 955
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 94 times
Been thanked: 179 times

Re: Inverter Firmware 5.27.R

Post by catphish »

arber333 wrote: Sun Jun 04, 2023 11:17 am - what is sinecurve? I have tried it at "voltage" as well as "simultaneous" and the latter gives less grumbling apparently
Sinecurve is a feature I added. It changes the way voltage and slip increase with throttle:

* VoltageSlip - this is the default and the original behaviour from older versions. The first half of the throttle increases voltage but keeps slip at fslipin. Then the second half of the throttle increases slip up to fslipmax.
* Simultaneous - this new behaviour increases slip and voltage at the same time across the whole range of the throttle. I added this because I suspected that current and slip should increase proportionally, and for me it seemed to provide smoother throttle response.

I will add this new parameter to the wiki.
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Inverter Firmware 5.27.R

Post by arber333 »

catphish wrote: Sun Jun 04, 2023 5:24 pm Sinecurve is a feature I added. It changes the way voltage and slip increase with throttle:
...
I will add this new parameter to the wiki.
Well thanks.

It seems i get smoother start when my regen setting is at 30%. If more car starts to lurch again just before stop.
That growling or shaking at acceleration seems to be aclimit in effect. Seems my motor maxslip wants to pull more than 400A and inverter tries to cut that off. I am not sure how to smooth that off as it is quite disturbing when accelerating.
User avatar
johu
Site Admin
Posts: 5768
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1009 times
Contact:

Re: Inverter Firmware 5.27.R

Post by johu »

Thanks for testing, I published the sine binaries now.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 170 times
Contact:

Re: Inverter Firmware 5.27.R

Post by Bratitude »

switch direction when coasting still deliver torque in the wrong direction. ie if coasting forwarded and switch to rev it'll pull forward when throttle is pressed
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
johu
Site Admin
Posts: 5768
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1009 times
Contact:

Re: Inverter Firmware 5.27.R

Post by johu »

It will only accept a direction change below dirchangerpm.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
catphish
Posts: 955
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 94 times
Been thanked: 179 times

Re: Inverter Firmware 5.27.R

Post by catphish »

johu wrote: Sat Jul 01, 2023 10:06 pm It will only accept a direction change below dirchangerpm.
I always assumed it would go into neutral and stay there. Maybe that would be a safer behaviour in that case.
User avatar
Romale
Posts: 448
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 208 times
Been thanked: 45 times

Re: Inverter Firmware 5.27.R

Post by Romale »

I forget to ask if the description of the parameters has been updated? after all, a lot has been added, some have been renamed, and some have disappeared. or maybe it is in some new place?
evil neodymium :twisted:
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 170 times
Contact:

Re: Inverter Firmware 5.27.R

Post by Bratitude »

johu wrote: Sat Jul 01, 2023 10:06 pm It will only accept a direction change below dirchangerpm.
🤦🏼‍♂️ thanks. I’ll update wiki
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
johu
Site Admin
Posts: 5768
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1009 times
Contact:

Re: Inverter Firmware 5.27.R

Post by johu »

Some code says more than 1000 words:

Code: Select all

   if (!(Param::GetBool(Param::din_forward) ^ Param::GetBool(Param::din_reverse)))
      selectedDir = 0;

   if ((int)Encoder::GetSpeed() < Param::GetInt(Param::dirchrpm) && !potPressed)
      selectedDir = userDirSelection;
Neutral selection is immediately applied while forward/reverse go via userDirSelection. And userDirSelection is only applied below dirchrpm.
So catpish is right, the intended behaviour, if you drop it to neutral is to stay in neutral until motor drop below dirchrpm and throttle is not pressed.
@Bratitude, what value is that parameter on yours?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 170 times
Contact:

Re: Inverter Firmware 5.27.R

Post by Bratitude »

johu wrote: Sun Jul 02, 2023 6:08 am Some code says more than 1000 words:

Code: Select all

   if (!(Param::GetBool(Param::din_forward) ^ Param::GetBool(Param::din_reverse)))
      selectedDir = 0;

   if ((int)Encoder::GetSpeed() < Param::GetInt(Param::dirchrpm) && !potPressed)
      selectedDir = userDirSelection;
Neutral selection is immediately applied while forward/reverse go via userDirSelection. And userDirSelection is only applied below dirchrpm.
So catpish is right, the intended behaviour, if you drop it to neutral is to stay in neutral until motor drop below dirchrpm and throttle is not pressed.
@Bratitude, what value is that parameter on yours?
100.

have to come to a full stop or it'll keep going in the same direction
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
Audia2electric
Posts: 8
Joined: Mon Jul 31, 2023 5:08 pm

Re: Inverter Firmware 5.27.R

Post by Audia2electric »

Help!
5.27 uploaded to v.6 tesla sdu board. Before upload (5.20) I also activated hillhold and changed idlethrottlim from 50 to 60. After cycle off/on my parameter set is different…I dont have parameterset started with -Motor->
0 boost
1 tweak

As soon as I activate drive inverter clicks and overcurrent is present. Have I uploaded wrong file? see attached..
Returning from hillhold and idlethtrottle don’t help!
Just got car running again with proper coolant flow and pump…shouldnt mess with working system😕
Attachments
IMG_0695.png
IMG_0696.png
IMG_0697.png
IMG_0698.png
IMG_0699.png
IMG_0700.jpeg
User avatar
Romale
Posts: 448
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 208 times
Been thanked: 45 times

Re: Inverter Firmware 5.27.R

Post by Romale »

Audia2electric wrote: Mon Sep 04, 2023 5:26 pm Help!
5.27 uploaded to v.6 tesla sdu board.

shouldnt mess with working system😕
you made a gross mistake and flashed the firmware from the synchronous motor into the asynchronous)) download and update to the firmware marked sine!
evil neodymium :twisted:
Audia2electric
Posts: 8
Joined: Mon Jul 31, 2023 5:08 pm

Re: Inverter Firmware 5.27.R

Post by Audia2electric »

Thanks! Prblm solved! Changed to sin file. Testrun showed very smooth in low acceleration but cutoff probably overcurrent not letting me go hard on throttle. Changed back to 5.20
Any parameter changes needed to be able to run 5.27?
Attachments
IMG_0705.png
IMG_0704.png
IMG_0703.png
User avatar
johu
Site Admin
Posts: 5768
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1009 times
Contact:

Re: Inverter Firmware 5.27.R

Post by johu »

catphish wrote: Sat Jul 01, 2023 11:35 pm I always assumed it would go into neutral and stay there. Maybe that would be a safer behaviour in that case.
Just quoting you so you get a bell :) Any idea on the above?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Romale
Posts: 448
Joined: Fri May 20, 2022 4:16 pm
Location: Romania
Has thanked: 208 times
Been thanked: 45 times

Re: Inverter Firmware 5.27.R

Post by Romale »

johu wrote: Tue Sep 12, 2023 10:48 am Any idea on the above?
switching to neutral when switching off the sw forward should clearly work immediately, regardless of what the motor speed is (isn't that the case now?) but the reverse gear, when turned on, turns on at speeds below those specified in the value (it seems to work like that, I personally used the value of 1000 rpm)
evil neodymium :twisted:
User avatar
catphish
Posts: 955
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 94 times
Been thanked: 179 times

Re: Inverter Firmware 5.27.R

Post by catphish »

Audia2electric wrote: Mon Sep 04, 2023 8:21 pm Thanks! Prblm solved! Changed to sin file. Testrun showed very smooth in low acceleration but cutoff probably overcurrent not letting me go hard on throttle. Changed back to 5.20
Any parameter changes needed to be able to run 5.27?
The immediate problem here is that your fweak value is much too low. Lower fweak = more current. For reference, here is my SDU tune:

Code: Select all

boost = 3200
fweak = 230
fslipmin=1.5
fslipmax = 3.0
fslipconstmax = 3.0
Increase fweak to 250 and go from there.
Audia2electric
Posts: 8
Joined: Mon Jul 31, 2023 5:08 pm

Re: Inverter Firmware 5.27.R

Post by Audia2electric »

Thanks!
I’ll go back to 5.27 and adjust params when its time to start using car when spring and warmer weather is back.
I drive an 2010 Volvo V50 D2 when I cant use the Electric Audi so I really start to miss the little beast now😁
/Mattias
Post Reply