Improvement of the traction control VSS slip function

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Post Reply
Speedy_G
Experienced MS/Extra'er
Posts: 195
Joined: Fri Aug 01, 2014 8:30 am

Improvement of the traction control VSS slip function

Post by Speedy_G »

Would it be possible to improve the VSS slip function?
In Detail a table for the slip threshold would ne a very good feature.

Many other traction control systems on the market offer at least a TPS/RPM table.
A further improvement to that would be gear dependend tables or at least a gear dependent factor for the main slip table.


At the moment it is only possible to set a fixed value for the slip threshold. Or to use a external potentiometer.
For a good working function on motorcycles only a fixed slip threshold value is too less input.
The external potentiometer could stay. It could be used as an additional factor to the main table (0-100%)

Just two examples in the attachments.
Speedy_G
Experienced MS/Extra'er
Posts: 195
Joined: Fri Aug 01, 2014 8:30 am

Re: Improvement of the traction control VSS slip function

Post by Speedy_G »

okay forget rpm/load/slip_threshold table

At first i think it would be easier to only use a lean angle / slip threshold table.

The first problem is, that the tire diamter changes for differenz lean angles. So the calculated slip won't be working.
I hope to correct this by setting a lean angle depending slip threshold.Better thing would be to be able a table to enter tire diameters at different lean angles, to get that factor out of the slip calculation.
Furthermore at a higher lean angle you want to have a lower slip threshold.

As nobody replied to this thread, i will have to start to make my own tests.

I want to set the lean angle as a generic sensor input with a specified calibration.

----------------------------------

At first i started to add another minimum field to activate the TC:
field = "Minimum Lean Angle", tc_minla, {tc_opt_on && (tc_opt_method == 1) }

(Only active at VSS slip method)
(minla= minimum lean angle)

and added it right before the big gap
tc_minla = scalar, S16, 486, "°", 0.10000, 0.00000, 0, 100, 1


then i added the condition to ms3_misc:
&& (tc_knob> ram5.tc_minla)

added:
int tc_minla;
to ms3.h

are those all places were i should have added something for the minimum lean angle?
is int correct?
---------------------------------------

to use the normal tc_knob for a generic sensor input i removed "tc_knob = bits, U08, 91, [0:4] ....." from its line.
..and added instead
"tc_knob = bits, U08, 488, [0:3], "Off","Sensor 1", "Sensor 2","Sensor 3","Sensor 4","Sensor 5","Sensor 6","Sensor 7","Sensor 8","Sensor 9","Sensor 10","Sensor 11","Sensor 12","Sensor 13","Sensor 14","Sensor 15" ; note off by 1"
before the big gap.

Will this also set "port_tc_knob" right?

don't know if this will work :lol:

The problem is that i don't have experience with c++ (only matlab)

and the lean angle from the generic sensor can also be negative. For the first time the absolute value of the lean angle would be okay to use.


The best would be to keep the knob input in addition to the lean angle input.
So that you can influence the current slip threshold (tc_slipthresh ) by a potentiometer.
Or some other inputs were also good f.e. rpm and load ...



few pics:

Lean angle could also start at "min lean angle".
The min lean angle is to prevent the TC interrupt wheelies and i think TC is not so necassary in this area.


I hope someone can help me
Speedy_G
Experienced MS/Extra'er
Posts: 195
Joined: Fri Aug 01, 2014 8:30 am

Re: Improvement of the traction control VSS slip function

Post by Speedy_G »

okay as i was a "bit" unsure if this stuff from my last post will work and i was hoping for a answer ... i tried a different way.


I used a table which was already there and is unused.

I used the 16x16 ignitionTbl4, changed the ybins from ignload2 to tps. (i know i could also do this in the software).
corrected some units and integrated this table into the external vss slip% window.


in the ms3_mis.c
in addition to the value from the slip curve, i also read out the value from the ignitiontbl4 with tps:

Code: Select all

slip_tbl_factor = intrp_2ditable(outpc.rpm, outpc.tps, NO_EXSRPMS,
                       NO_EXSMAPS, &ram_window.pg21.srpm_table4[0],
                       &ram_window.pg21.smap_table4[0], (int *) &ram_window.pg22.adv_table4[0][0], 21);	
the new slip threshold is the factor of them two:

Code: Select all

slipth = slipth * slip_tbl_factor;
The Knob Input is untouched. Still like it was before. So complete without lean angle (will do step by step)

I think this was only a very little modification of the source code. This time i'm more confident, that it will work.
But a short confirmation of someone who's better in that than me (jsmcortina, muythaibxr) would be very great :D
Post Reply