DIY Traction Control

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

DIY Traction Control

Post by johu »

Finally got the chance to test traction control on snow today. See for yourself

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Proton
Posts: 306
Joined: Sat May 06, 2023 2:23 am
Location: Georgia/US
Has thanked: 184 times
Been thanked: 43 times

Re: [DRIVING] VW Touran powered by Nissan Leaf

Post by Proton »

So that traction control is done by the Car VCU correct? by applying the brakes?
User avatar
johu
Site Admin
Posts: 6735
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 378 times
Been thanked: 1559 times
Contact:

Re: [DRIVING] VW Touran powered by Nissan Leaf

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3566
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 336 times
Contact:

Re: [DRIVING] VW Touran powered by Nissan Leaf

Post 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
User avatar
johu
Site Admin
Posts: 6735
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 378 times
Been thanked: 1559 times
Contact:

Re: DIY Traction Control

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3566
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 336 times
Contact:

Re: DIY Traction Control

Post 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???
Aragorn
Posts: 157
Joined: Wed Jan 04, 2023 10:23 am
Has thanked: 6 times
Been thanked: 65 times

Re: DIY Traction Control

Post 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.
User avatar
johu
Site Admin
Posts: 6735
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 378 times
Been thanked: 1559 times
Contact:

Re: DIY Traction Control

Post 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 :(
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Jacobsmess
Posts: 748
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 404 times
Been thanked: 116 times

Re: DIY Traction Control

Post 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.
arber333
Posts: 3566
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 134 times
Been thanked: 336 times
Contact:

Re: DIY Traction Control

Post 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...
User avatar
Uppertown
Posts: 69
Joined: Wed Dec 09, 2020 10:57 pm
Location: North East England
Has thanked: 133 times
Been thanked: 34 times

Re: DIY Traction Control

Post by Uppertown »

Sounds like a steam train in the slow motion shots :-)
evMacGyver
Posts: 156
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 39 times
Been thanked: 10 times

Re: DIY Traction Control

Post 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.
jrbe
Posts: 599
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 218 times
Been thanked: 178 times

Re: DIY Traction Control

Post 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
maciek16c
Posts: 20
Joined: Mon May 01, 2023 7:40 pm
Location: Poland
Been thanked: 10 times

Re: DIY Traction Control

Post 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.
Post Reply