Page 1 of 1
Shift Hysteresis
Posted: Fri Jan 28, 2011 10:12 pm
by gurov
Lance wrote:All,
I have put the latest 2.00Cy code on the beta page:
http://www.msgpio.com/manuals/mshift/V2code.html
This code fixes are error in the gear table lookup that caused it to use value from the column one to the right off the current speed as the target gear. Many thanks to those who pointed this out privately (you know who you are!).
The code now works as described in another thread:
"What the code does is look for the current bin using the current speed (and load, of course), and the 40 mph (or kph) column represents speeds from 40 to 49.9 (i.e, the next highest value that isn't covered in the next column), and the 50 is from 50 to 54.9, etc. So when you drop below 50.0 mph, you drop to the 40 column, and the target gear becomes 3."
(if you have bins of 40 mph with all 3rd gear, 50 all 4th, and the next speed bin at 55, in this example)
Also, some users are wondering why the shifts are not always exactly at the table speeds, especially when testing on the bench. Usually this is due to the code's hysteresis functions, which are found under 'General Settings/Shift Factors' (
http://www.msgpio.com/manuals/mshift/V2tune.html#gs):
Shift Speed Hysteresis: A shift will not be attempted until the vehicle speed has changed by at least the shift speed hysteresis amount since the last shift.
Shift kPa Hysteresis: A shift will not be attempted until the engine load has changed by at least the shift kPa hysteresis amount since the last shift.
Everyone using older code should upgrade to this code.
Lance.
is that an "AND" between those hysteresis or an "OR".
i.e.
if speed raises/drops by X mph - allow shift -> end
if kpa raise/drops by Y kpa - allow shift -> end
or
if speed raised/dropped by X mph AND kpa raised/dropped by Y kpa - allow shift ?
i'm thinking i don't want kap hysteresis allowing shift at all. i just want the speed to play the biggest part in deciding whether to allow the trans to shift.
Re: Latest Code Updates
Posted: Sat Jan 29, 2011 6:47 am
by Bernard Fife
gurov,
The hysteresis conditions for shifting are OR'd. That is, if any condition is met the shift is allowed
However, the hysteresis conditions are not used at all if the load is at WOT.
You can disable the hysteresis by setting the values to zero, or setting the 'Hysteresis Enable Speed' very high (will require mods to the INI, which limits the value to 15),
The hysteresis is in there for a reason though. If you have no hysteresis, and happen to be traveling at a nearly constant speed very near one of the shift speeds, the controller could cause the trans to shift back and forth betweeen gears continuously, which would be very annoying, I suspect. Similarly, if the kPa is fluctuating around a shift point you could get into the same situation. It would be like the TCC switching on and off, but 100 times worse.
Note that in a real vehicle (as opposed to testing on a bench), hysteresis won't delay a shift, as long as the gap between speed bins is larger than the 'Shift Factors/Shift Speed Hysteresis' setting and the gap between load bins is larger than the 'Shift Factors/Shift kPa Hysteresis'.
Lance.
Shift Hysteresis
Posted: Sat Jan 29, 2011 1:40 pm
by gurov
Lance wrote:gurov,
The hysteresis conditions for shifting are OR'd. That is, if any condition is met the shift is allowed
However, the hysteresis conditions are not used at all if the load is at WOT.
You can disable the hysteresis by setting the values to zero, or setting the 'Hysteresis Enable Speed' very high (will require mods to the INI, which limits the value to 15),
The hysteresis is in there for a reason though. If you have no hysteresis, and happen to be traveling at a nearly constant speed very near one of the shift speeds, the controller could cause the trans to shift back and forth betweeen gears continuously, which would be very annoying, I suspect. Similarly, if the kPa is fluctuating around a shift point you could get into the same situation. It would be like the TCC switching on and off, but 100 times worse.
Note that in a real vehicle (as opposed to testing on a bench), hysteresis won't delay a shift, as long as the gap between speed bins is larger than the 'Shift Factors/Shift Speed Hysteresis' setting and the gap between load bins is larger than the 'Shift Factors/Shift kPa Hysteresis'.
Lance.
but if you're traveling the same speed near one of the shift speeds, wouldn't the speed hysteresis take care of it not shifting back and forth ?
kpa hysteresis here would be detrimental also as it would allow that hunting back and forth around the same constant speed. kpa is a lot easier to change than speed.
way i'm reading hysteresis is like so:
setup: shift point at 15 mph 1-2, shift point at 25 2-3, shift point at 40 3-4
speed hysteresis is set to 5 mph
car traveling 14 mph, 1st gear - totally fine
car traveling 16 mph, shift 1-2 complete, in 2nd gear now.
car's speed drops down to 12 mph - shift not allowed because 15 - 12 = 3
car drops down to 9 mph - shift to 1st happens because 15-9 = 6
if the above is true, KPA hysteresis would've unlocked the shift long ago. my car idles at 32kpa, to get it to move at all, kpa has to go to 60-70kpa.
or am i not reading this right ?
i'll try disabling kpa hysteresis with the latest code though.
Re: Latest Code Updates
Posted: Sat Jan 29, 2011 1:53 pm
by Bernard Fife
gurov,
Sort of. You can leave the speed hysteresis and disable the kPa hysteresis. But if a given speed column has more than one gear in it (most will - because you will want to upshift earlier at low loads - have a look at the default table) then the speed may stay the same but the load change slightly at the shift point (where the gear changes in the table) and cause a shift. This gear change can itself cause a change in kPa (because the rpm changes) and this might result in a shift back to the original gear, and so on...
The bottom line is that you don't want to shift if nothing is changing, but 'noise' in the inputs can do exactly that without some hysteresis.
But try it yourself, you can set it up however works best for you, of course.
Lance.
Re: Latest Code Updates
Posted: Sat Jan 29, 2011 2:25 pm
by gurov
Lance wrote:gurov,
Sort of. You can leave the speed hysteresis and disable the kPa hysteresis. But if a given speed column has more than one gear in it (most will - because you will want to upshift earlier at low loads - have a look at the default table) then the speed may stay the same but the load change slightly at the shift point (where the gear changes in the table) and cause a shift. This gear change can itself cause a change in kPa (because the rpm changes) and this might result in a shift back to the original gear, and so on...
The bottom line is that you don't want to shift if nothing is changing, but 'noise' in the inputs can do exactly that without some hysteresis.
But try it yourself, you can set it up however works best for you, of course.
Lance.
okay, that answers my question about reason for KPA hysteresis.
my columns are straight up without upshifting at higher loads, it was driving me nuts that it would just randomly upshift due to noise (or not when i needed it to upshift)
what's the limit on kpa hysteresis in the code, i.e. how far can i jack it up to try to get it to do what i want ?
another thing... what is speed hysteresis related to the shift point speed, i.e. with 40 mph shift point and 5 hysteresis, the area it's locking out is 40 +-5 (35 - 45) ?
Re: Shift Hysteresis
Posted: Sat Jan 29, 2011 2:50 pm
by Bernard Fife
gurov,
The speed hysteresis in the code can be from 0 to 25.5 mph/kph. The INI limit is 0 to 10, but you can edit that, obviously.
The load hysteresis can be from 0 to 25.5 kPa (0 to 10 in the INI), however note that you can do a lot with the 'LOAD Smoothing Factor' (under 'Shift Factors':
http://www.msgpio.com/manuals/mshift/V2tune.html#gs ) to lower the amount of 'bounce' in the load signal.
The logic looks like this:
Code: Select all
if ( (WOT_flag) // always look up gear if at WOT
||((x <= (last_mph - inpram.gear_hyst)) // if any hysteresis conditions met
|| (x >= (last_mph + inpram.gear_hyst))
|| (x < (inpram.hyst_enable_speed)) // always look up gear if mph is less than user setting
|| (y <= (last_kpa - inpram.kpa_hyst))
|| (y >= (last_kpa + inpram.kpa_hyst)))
)
{
... Look up target gear ...
}
else don't do anything, leave in current gear
x is the current speed, y is the load (the "short-term average load"). Note that last_mph and last_kph are the values at the last successful shift (not the table value). So if a upshift was prevented until 45 (shift point 40, hysteresis 5), then the downshift could occur at 40. This only applies to part throttle however.
Since the hysteresis isn't applied at WOT, flooring the throttle will give quick downshifts at the table specified speed. If the upshift was WOT, and so done at 40, then the downshift wouldn't happen until 35.
I suppose I should mention that the hysteresis only applies in auto mode too, but this is probably obvious to everyone.
Lance.
Re: Shift Hysteresis
Posted: Sat Jan 29, 2011 10:05 pm
by gurov
it def seemed "better" without kpa hysteresis, at least for what i was trying to do.
i absolutely need to expand the speed hysteresis to at least 20. it also seems that it's shiftpoint +- 1/2 hysteresis (i.e. centered 10 around shift point) instead of +10 or -10. that's what i observed at least.
Re: Shift Hysteresis
Posted: Sun Jan 30, 2011 8:48 am
by Bernard Fife
gurov,
You might want to try the latest 2.00Cz code (
http://www.msgpio.com/manuals/mshift/V2code.html). It has the hysteresis section re-written to hopefully cope better with large hysteresis values.
Have you tried increasing the load smoothing value?
Lance.
Re: Shift Hysteresis
Posted: Sun Jan 30, 2011 1:48 pm
by gurov
my load smoothing is set to 700. I will try the new code.