Page 1 of 1

Basic ETB Traction Control with Lua

Posted: Sat Dec 30, 2023 11:12 pm
by NormanAlphaspeed
Hi

I made a type of traction control using LUA for ETB-equipped vehicles. It is quite basic, works well in my book, but it could use a phase-in/out timer to smooth transitions into/out of traction control events.

current code is

Code: Select all

	-- traction control
	local slipRatio = rvss / fvss
	if slipRatio > 1.1 and tcState == 0 then
		setEtbAdd(slipRatio * - 40)
	else
		setEtbAdd(0)
	end
Where
slipRatio = a simple division of driving/driven wheel speeds (in this car, car is RWD, so rvss = rear vss). If one of the rear wheels is going faster than one of the front ones, we are probably slipping
tcState = a traction control on/off button

I noticed in my case that noticeable slip happens after a ratio of about 10% deviation (which is what the 1.1 represents). I multiply this by a constant -40 so if we have minimal slip, we reduce TPS by 40%, and gets multiplied by the amount of slip to compensate for more slippery situations.
image.png
The arrow indicates where slip was detected, and ETB target changes from 100% to ~50%
image.png
At the top of second gear we are starting to actually have grip, and once we shift into 3rd, we can see that slip% is small enough to where we can target 100% TPS

Re: Basic ETB Traction Control with Lua

Posted: Sun Dec 31, 2023 3:52 am
by AndreyB
My Nissan SUV has four wheel sensors look how left and right wheel speeds are 20% off during intense acceleration. Per-axis average difference is below that.
image.png

Re: Basic ETB Traction Control with Lua

Posted: Sun Dec 31, 2023 6:41 am
by NormanAlphaspeed
AndreyB wrote:
Sun Dec 31, 2023 3:52 am
My Nissan SUV has four wheel sensors look how left and right wheel speeds are 20% off during intense acceleration. Per-axis average difference is below that.

image.png
That's because open diff. In this case it would be very benificial to do front vss average / rear vss average

Re: Basic ETB Traction Control with Lua

Posted: Mon Jan 01, 2024 7:24 pm
by AndreyB
I've implemented something similar under https://github.com/rusefi/rusefi/issues/5843 someone would have to give it a try :)
WhatsApp Image 2023-12-31 at 19.54.57_09a3a3c2.jpg