Proposal for VEMS Traction Control Algorithm
Abstract:
I was working on my Traction Control Module, that is reading ABS sensors and using it for calculating wheel slip on accelerating...
The code is very optimized and using so little processors time. TCM is based on ATmega128 running on 7.37MHz... The problem always was interfacing TCM to VEMS as programmers didn't put this kind of input option for spark cut...
Never the less, I have heard that programmers are working on small-TC inside VEMS v3 as there are now 2 speed inputs...
Internally wheelspeed1 and wheelspeed2.
- Wheelspeed displayed as 0..255 in vemstune (km/h or mph as the user decides).
- wheelspeed1 also sent to AfreshTiny/AimDisplay
- what do you mean by spdimp1==SPDIMPCONSTM1 ?
- if SPDIMPCONSTM1 is 20 (as in your example), the if(spdimp1==SPDIMPCONSTM1){ ... block ... } would have no effect from 0-19 and 21-255 range. Or you mean some table lookup ? Are these 4 values scalars or vectors (or matrices) ?
Algorithm proposal:
speed1_input_pulse_processing_routine {
if (spdimp1==SPDIMPCONSTM1) {
if (spdimp2<SPDCONSTN1) TCSLIPon_action; else TCSLIPoff_action;
spdimp1=0; spdimp2=0;
} else spdimp1++;
}speed2_input_pulse_processing_routine {
if (spdimp2==SPDIMPCONSTM2) {
if (spdimp1<SPDCONSTN2) TCSLIPon_action; else TCSLIPoff_action;
spdimp1=0; spdimp2=0;
} else spdimp2++;
}Description:
TCSLIPon_action is something like this:
if (sparkcut<80) sparkcut++;
TCSLIPoff_action is something like this:
if (sparkcut) sparkcut--;
SPDIMPCONSTM1,SPDIMPCONSTN1,SPDIMPCONSTM2,SPDIMPCONSTN2 are user set constants...
Scenarios:
- (a) speed1 is speed of left driving wheel, speed2 is speed of right driving wheel.
- (b) speed1 is speed of differential of driving wheels, speed2 is speed of one non driving wheel
In scenario (a) constants are set:
SPDIMPCONSTM1=SPDIMPCONSTM2=example 20
SPDIMPCONSTN1=SPDIMPCONSTN2=example 18
which is set for about 10% slipping allowed before spark cut. Bigger number par (40,36) would be more precise, but it would react slower on slower car speeds...
In scenario (b) constants are set:
SPDIMPCONSTM1=0xFFFF
SPDIMPCONSTN1=0
SPDIMPCONSTM2=example 40
If the number of pulses for speed inputs for diff and non driving ABS sensor wheels aren't the same, then user should calculate this in setting constant.. Lets say that 1 pulse diff is 2 pulse non driving wheel. So we have to calculate:
40/2-10%=18
SPDIMPCONSTN2=18
The same thing here bigger pair (40,18 or 80,38) is more precise but slower reaction for slower speeds..
Conclusion: The algorithm is small, fast and more precise as the speed is greater... That is true in real life, as there is less likely that the wheel would slip... So you don't want to lose any of engine power for acc on false slipping detection...
On the other hand, smaller speeds (smaller gears), the slipping is more likely to occure and engine power must be reduced to gain traction and have better acc time...
As I sad before, I would like to be a part of VEMS developer team, as I'm now working on CANbus...