Non linear throttle ramp

Post Reply
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Non linear throttle ramp

Post by Ev8 »

Unfortunately coding this for the stm is beyond me but I’m happy to contribute to its development, just wondered if it would be of use to anyone else

Basically I’d quite like to have an adjustable non linear throttle ramp so the start of the throttle application is less sensitive the end..

mostly because once you turn up throtramp and throtcur to achieve desired performance coming on and off the throttle can be quite jolty as it takes up and releases drive line slack… this can be tamed by lowering throtramp, but at the cost of performance when you step on it!
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Non linear throttle ramp

Post by Pete9008 »

I like this idea :)

Just had a play, how about using non linear maps rather than ramps? If you use throttleout = power(throttlein, powerterm) then you can modify the powerterm to give a number of different maps:
throt_map.png
It's like using offset pivots on throttle linkages on an ICE engine to make the throttle open more gradually at the start of the travel.

Edit - corrected plot axis labels
User avatar
Ev8
Posts: 801
Joined: Sat Jan 30, 2021 11:05 am
Has thanked: 41 times
Been thanked: 149 times

Re: Non linear throttle ramp

Post by Ev8 »

Yes that’s just what I had in mind, I know this kind of pseudo inverse logarithmic response can be achieved on a potentiometer by placing a resistor between the wiper and ground, not sure it would work with Hall effect throttles though hence the requirement to do it in software
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Non linear throttle ramp

Post by Pete9008 »

Ev8 wrote: Sun Mar 12, 2023 4:14 pm Yes that’s just what I had in mind, I know this kind of pseudo inverse logarithmic response can be achieved on a potentiometer by placing a resistor between the wiper and ground, not sure it would work with Hall effect throttles though hence the requirement to do it in software
I'd wondered about that too but couldn't see an easy way of making it adjustable. Plus as you say it wouldn't work with anything that isn't analog pot based (it relies on the pot output impedance to work).
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Non linear throttle ramp

Post by arber333 »

Hmm...

I am looking towards Lebowski polynomal throttle.
There are three coefficients you can set in code that determine the curve. a, b, and c are floats because they can be less then 1.
x is the throttle value and y is the result.
y = a*x + b*x^2 + c*x^3

Currently i am using this in my pug with Lebowski brain.
My settings are:
a=0.3
b=0.8
c=0.6

And they work really well as i dont need a sharp takeoff but want to have good upcurve at full throttle.

Probably there would need to be an acceleration limiter for safety as well.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Non linear throttle ramp

Post by Pete9008 »

Wondered about that approach too but what put me off is the user has to work out whether the combination of a, b and c add up to full throttle (or more or less than full throttle). Also more things to adjust so more ways to get it wrong. Probably faster in terms of execution time though?
Post Reply