Page 1 of 1

DIY Traction Control

Posted: Thu Jan 09, 2025 2:57 pm
by johu
Finally got the chance to test traction control on snow today. See for yourself


Re: [DRIVING] VW Touran powered by Nissan Leaf

Posted: Thu Jan 09, 2025 5:57 pm
by Proton
So that traction control is done by the Car VCU correct? by applying the brakes?

Re: [DRIVING] VW Touran powered by Nissan Leaf

Posted: Thu Jan 09, 2025 7:21 pm
by johu
What you see is done by cutting back throttle and yes that is done by the VCU: https://github.com/jsphuebner/stm32-car ... r.cpp#L416

It's only when one side spins faster than the other that ABS applies brakes.

Re: [DRIVING] VW Touran powered by Nissan Leaf

Posted: Thu Jan 09, 2025 7:37 pm
by arber333
johu wrote: Thu Jan 09, 2025 7:21 pm What you see is done by cutting back throttle and yes that is done by the VCU: https://github.com/jsphuebner/stm32-car ... r.cpp#L416

It's only when one side spins faster than the other that ABS applies brakes.
How do you use that, as a discrete input to OI or reported over CAN bus?
There are many possibilities of using ABS/ESP signal and if your vehicle has traction control it should definitely be wired to remove torque/regen on application for just such snowy cases.
But using traction control outside OEM application is dangerous and should be done using redundancies such as removing torque/regen in the case of loosing ABS/ESP keep alive signal etc...

I would like to know more about this particular OI ABS/ESP application. Can you elaborate on your Patreon or maybe here under a separate thread?

tnx

Re: DIY Traction Control

Posted: Fri Jan 10, 2025 11:35 am
by johu
It's all CAN based. Wheel speeds come in via CAN and then throtmax/throtmin is modified (via CAN) to throttle regen or acceleration.
The code I linked above calculates average axle speed from the two wheels speeds. A certain difference is allowed (in the test 3 kph during acceleration and 2 kph for regen). If that is surpassed throttle is cut back 7%/kph with P-controller.

This may not be aggressive enough, probably PI-control would be preferable and not oscillate as much (did you see the snow flying like a mole is digging?)

There is indeed a CAN bit that indicates ESP is disabled, either by pressing the dash button or if there's a fault. Right now my reaction is to disable traction control entirely. I think it would indeed be a good idea to disable regen in that case.

Re: DIY Traction Control

Posted: Fri Jan 10, 2025 11:58 am
by arber333
johu wrote: Fri Jan 10, 2025 11:35 am It's all CAN based. ....

There is indeed a CAN bit that indicates ESP is disabled, either by pressing the dash button or if there's a fault. Right now my reaction is to disable traction control entirely. I think it would indeed be a good idea to disable regen in that case.
I am thinking on using ABS alive signal from computer to remove regen in Peugeot and Mazda. But i am not that far yet i would need to find the signal pins pn the Pug.
Its not that simple though! Both cars are halfh mux which means ABS is a digital ON/OFF signal not CAN bus.
On Mazda i already broke ABS when i converted it the second time and now it wont come on, i dont know what is wrong. When i test the pump and computer i get good pressure and signal to the pump. Must be some wire i cut???

Re: DIY Traction Control

Posted: Fri Jan 10, 2025 12:00 pm
by Aragorn
My understanding of modern ESP systems is that the ESP computer can calculate a maximum torque value and sends this to the engine computer.

The ESP computer knows live wheel speeds, as well as having some accellerometers for yaw etc, and is provided current engine torque over can. When it detects slip/instability and wants to intervene it computes a maximum desired torque from all the available inputs and sends this back to the engine computer. The computer then responds by reducing engine torque to the limit from the ESP system.

This allows the whole system to operate in a very seamless manner. I had a E90 330d for a while with a remap meaning massive torque and it was always amazing how you could floor the throttle in any conditions and the car would just go. ESP would cut the torque just enough to keep the wheels at the limit of traction.

In modern EV's the ESP system also gets involved with regen. If it detects instability during regen it will tell the ECU to cut or reduce the regen. I used to get this quite often in the LEAF where i'd hit a drain cover on a motorway slip road while at full regen. The slippy cover would trigger the ESP system to cut regen. I'm not sure if an older ICE ESP system would understand the concept of negative torque/regen though, they would have to deal with engine braking so it may be the case that they do.

It would be very nice if the VCU could interact with these factory ESP signals and respond appropriately.

Re: DIY Traction Control

Posted: Fri Jan 10, 2025 12:08 pm
by johu
Aragorn wrote: Fri Jan 10, 2025 12:00 pm It would be very nice if the VCU could interact with these factory ESP signals and respond appropriately.
Yes that was the plan but I never understood the system to that extend. I should do some CAN logs the next time I get a chance but the snow is already melting :(

Re: DIY Traction Control

Posted: Tue Jan 14, 2025 8:14 am
by Jacobsmess
I got some CAN logs yesterday on my 2005 VW T5 transporter whilst driving on ice so might be usable for the Touran.
I will upload them this evening as they are on my personal laptop at home.

Re: DIY Traction Control

Posted: Tue Jan 14, 2025 8:44 am
by arber333
johu wrote: Fri Jan 10, 2025 12:08 pm Yes that was the plan but I never understood the system to that extend. I should do some CAN logs the next time I get a chance but the snow is already melting :(
Hm... is there any enable byte in CAN telegram for ESP function? For start we could simply use it to enable or disable regen ramp. The same for ABS...

By the way you can test ESP on water also. I noticed on a level road such a parking lot if you pour a lot of water on the road ESP will be very active...

Re: DIY Traction Control

Posted: Tue Jan 14, 2025 12:44 pm
by Uppertown
Sounds like a steam train in the slow motion shots :-)

Re: DIY Traction Control

Posted: Wed Jan 15, 2025 6:11 pm
by evMacGyver
johu wrote: Fri Jan 10, 2025 11:35 am This may not be aggressive enough, probably PI-control would be preferable and not oscillate as much
..
Right now my reaction is to disable traction control entirely. I think it would indeed be a good idea to disable regen in that case.
I've been testing same with ZombieVerter, best result with only P-control is not to have oscillation like in video. For gs450h BMW I got with very low allowslip value of 1kph and increase P until it oscillate under acceleration and then back a bit. For regen lag same Kp value was ok with snow, but not nearly enough when road gets all ice even with studded tires.

I think this needs PI-controller and possibly separate values for acceleration and regen.

Traction control makes rwd winter driving really pleasure, it allows some amount of spin which is good - even nice controlled sliding sideways on snow is fun now :) Without TC wheel without traction will get very high rpm quickly, which is not good even for sliding. So even if I disable DSC which controls brakes, I really prefer using TC for acceleration.

Re: DIY Traction Control

Posted: Thu Jan 16, 2025 1:34 pm
by jrbe
There's some info here on how racelogic was doing this back in the day with ice vehicles that might help.
https://www.racelogic.co.uk/_downloads/ ... l-v3.2.pdf

Re: DIY Traction Control

Posted: Sun Jan 26, 2025 10:12 am
by maciek16c
I was planning to implement it in my BMW E46 ev conversion but still have to work on mechanical part.
Here is how traction control worked before removing engine: https://github.com/maciek16c/BMW-E46-ev-conversion
There are can logs of enabled and disabled system, full dbc file and savvycan graph defiinition to easily see used signals.
It's two way communication. Engine ecu sends real wheel torque, theoretical one without traction control and throtle position to DSC and DSC responds with torque limit % or required positive engine torque while slipping due to engine drag on ice/snow. There are also flags which show if specific intervention is required and also overall DSC status.