Inverter Firmware v4.17.R

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

Inverter Firmware v4.17.R

Post by johu »

Decided to draft a release with the recent changes contributed by Nail and myself:
  • Added possibility for a constant power region, set fslipconstmax=fslipmax if you don't want it!
  • Using DMA for serial communication if possible (all boards but Rev1)
  • Calculation of ilrms is now being done by averaging with previous RMS values
  • Do not swallow the new line in echo
  • FP multiplication fixed under LimitCurrent() method. Also, max current is calculated by SVM approach.
  • Fix infinite speed when fmax<20
  • Fmax minimum set to 21
  • brkmax now negative (to be consistent with brknompedal)
The constant power region is a braking change. To disable it set fslipconstmax=fslipmax
Otherwise, here is how it works:
Say you set fweak=100 and fslipmax=3. Then as you reach 100Hz torque will start declining with the square of frequency and thus power will decline linear with frequency. With this version you can counter that decline by allowing slip to become higher than fslipmax.
The parameter fconst now sets the frequency to which a constant power region stretches. The parameter fslipconstmax sets the maximum allowed slip at the frequency.
So now, when fweak is hit (at full throttle) the controller will start to increase slip linearly with every Hz above fweak until it reaches fconst and fslipconstmax.
In my conversion I set fweak=100, fslipmax=3.5, fconst=160 and fslipconstmax=5 and enjoy less drop in power at higher speeds :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3267
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Inverter Firmware v4.17.R

Post by arber333 »

johu wrote: Mon Apr 08, 2019 8:36 pm Decided to draft a release with the recent changes contributed by Nail and myself:
  • Added possibility for a constant power region, set fslipconstmax=fslipmax if you don't want it!
  • Using DMA for serial communication if possible (all boards but Rev1)
  • Calculation of ilrms is now being done by averaging with previous RMS values
  • Do not swallow the new line in echo
  • FP multiplication fixed under LimitCurrent() method. Also, max current is calculated by SVM approach.
  • Fix infinite speed when fmax<20
  • Fmax minimum set to 21
  • brkmax now negative (to be consistent with brknompedal)
The constant power region is a braking change. To disable it set fslipconstmax=fslipmax
Otherwise, here is how it works:
Say you set fweak=100 and fslipmax=3. Then as you reach 100Hz torque will start declining with the square of frequency and thus power will decline linear with frequency. With this version you can counter that decline by allowing slip to become higher than fslipmax.
The parameter fconst now sets the frequency to which a constant power region stretches. The parameter fslipconstmax sets the maximum allowed slip at the frequency.
So now, when fweak is hit (at full throttle) the controller will start to increase slip linearly with every Hz above fweak until it reaches fconst and fslipconstmax.
In my conversion I set fweak=100, fslipmax=3.5, fconst=160 and fslipconstmax=5 and enjoy less drop in power at higher speeds :)
Hi

What happens with phase voltage at that speed? So motor torque is continued throughout the rpm curve? Does that mean more Amps to the windings? I should try this though i was having problems with overtaxing batteries in the higher RPM region. :)

tnx
User avatar
johu
Site Admin
Posts: 5823
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 162 times
Been thanked: 1044 times
Contact:

Re: Inverter Firmware v4.17.R

Post by johu »

Phase voltage is not affected by the change. No, not the full torque is continued but the torque is now supposed to decline linear with speed instead of quadratic. As it is a "constant power" region the battery current will not increase, provided to configure fconst (not too close to fweak) and fslipconstmax (not too much) correctly
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
nailgg
Posts: 119
Joined: Sat Dec 22, 2018 8:40 pm

Re: Inverter Firmware v4.17.R

Post by nailgg »

Great addition, sounds very nice :) . So now we can keep the motor in the constant power region between fweak<fstat<fconst, and the slip will increase from fslipmax to fslipconstmax in this region, full throttle assumed. But one needs to set fmax to at least fconst+20 to avoid power drop between fconst-20<fstat<fconst, if I'm not mistaken.
User avatar
johu
Site Admin
Posts: 5823
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 162 times
Been thanked: 1044 times
Contact:

Re: Inverter Firmware v4.17.R

Post by johu »

Yes, very true (as opposed to just true ;) )
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: 5823
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 162 times
Been thanked: 1044 times
Contact:

Re: Inverter Firmware v4.17.R

Post by johu »

Just traced a bug that only shows under very unique conditions:
idlemode = 0 or 1 (always/nobrake) (0 is default)
idlespeed = -100 (default)
speedkp = 0 (default is 0.25)

You will experience that there is no regen because the idlespeed controller always overrules potnom < 0
Even with speedkp at its default value you might experience attenuated regen at lower speeds.

Solutions: Set idlemode=2 so it's disabled while cruise_in is off.

I will add idlemode=off in next revision
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: Inverter Firmware v4.17.R

Post by jon volk »

On the next update, would it be possible to add a decimal to the value of the throttle and brake ramp settings? That would offer a greater level of tuning resolution, particularly if using the throtramp as a launch control by going WOT before letting off the brake. My initial thought would have been to increase the time period of the ramp from 10ms to 100ms, but it seems some other motors already utilize much higher values as evidenced by the wiki configuration files. Unless of course the time period was changed along with the ability to use a value of 1-1000 for the slew rate.
Formerly 92 E30 BMW Cabrio with Tesla power
Post Reply