Page 1 of 1

Regen ramp question

Posted: Mon Jul 24, 2023 5:17 pm
by FFMan
so from the param explanation list i see:-

brknompedal / brakeregen % -100 0 -50 Foot on brake pedal regen torque
regenramp %/10ms 0.1 100 100 Ramp speed when entering regen. E.g. when you set brkmax to 30% and regenramp to 1, it will take 300ms to arrive at brake force of -60%
brknom / regentravel % 0 100 30 Range of throttle pedal travel allocated to regen
brkmax / offthrotregen % 0 100 30 Foot-off throttle regen torque
brkcruise / cruiseregen % -100 0 -30 Maximum regen of cruise control

I have offthrotreg set to 0, as i have a gearbox and want to be able to unload the gears to change gear.

the explanation for regenramp implies it is reliant on offthrotregen to work, and this appears to be what i experience i.e. no ramping, the regen appears to be on or off, ideally it would ramp to brakeregen (not offthrotregen) progressively when i hit the brakes. Just trying to tune in smooth regen as going to can control regen might not be possible if i want to keep physical throttle pot (and I have good reasons to want to do this).

thanks

Re: Regen ramp question

Posted: Mon Jul 24, 2023 6:39 pm
by johu
It's indeed supposed to ramp to brakeregen, not step there.
Here https://github.com/jsphuebner/stm32-sin ... l.cpp#L161 you see it gets the input from the user, including the brake input. With the brake pedal pressed and regenpreset=100 (the default, only writable via CAN) this would return brakeregen
In line #176 this goes through the ramp.