Trigger hysteresis using avload instead of load?

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Addicted,

Sorry about your ECU dying. Do you remember if the hysteresis issue was with all shifts, or just the 3-4 shift? This is important to narrow down where to look for the bug.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Trigger hysteresis using avload instead of load?

Post by Addicted »

The ECU failure is down to shoddy chinese jumper wires that break wayyy too easily. Fixed now.

So I am now running 5.099z, just been out for a log run.

The issue is nearly always occurs 3-4... but not always.. see attached log "what turns off hyst" :)

Also from the log this morning is a example of where hysteresis is still engaged after a 3-4 shift, but the unit still downshifts to third!!

edit: another similar log added after a run this afternoon.. again it downshifts to third while hysteresis is active...
Attachments
another shift during hyst.msl
(102.27 KiB) Downloaded 671 times
shift during hyst.msl
(83.16 KiB) Downloaded 656 times
what turns off hyst.msl
(72.19 KiB) Downloaded 656 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Addicted,

I suspect I screwed the hysteresis up when I put in the 'ALWAYS Apply TCC in High Gear' option. I will dig through this section of the code to see what is wrong and post back here when I have a fix. It shouldn't be too hard to sort out.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Addicted,

I found an fixed an issue in the hysteresis (a fairly subtle one involving assumptions about how the code shifts from the current gear to the target gear versus the hysteresis blocking or not blocking a shift). This is (hopefully!) corrected in the attached code, which implements the hysteresis blocking in the shift function as well as in the target gear lookup:
Monitor_5099zii.abs.s19
(83.03 KiB) Downloaded 684 times
GPIO_MShift_5099.ini
(278.17 KiB) Downloaded 713 times
This appears to work properly on my bench, but might not be a solution to your particular issue. If you want to give it a try, that would be great.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Trigger hysteresis using avload instead of load?

Post by Addicted »

Sorry Lance but that doesn't appear to have worked :( see attached datalog where it downshifts while hysteresis is engaged quite a few times. 3-2 as well as 4-3...

Also, it displayed some strange TCC behaviour where it was cycling on and off well below the TCC threshold rpm..

I should point out Lance, that other than these minor niggles Megashift is working brilliantly, the car is an absolute pleasure to drive. I also love that I can map the 'sport' shift table to match the higher than stock peak HP rpm.. although I haven't plucked up the courage to bury the throttle in sport mode yet! :D
Attachments
CAN1_CurrentTune.msq
(57.17 KiB) Downloaded 695 times
downshift under hyst.msl
(979.62 KiB) Downloaded 646 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Addicted,

This is really good info. While I haven't solved the issue, I now have a much better idea where to look. And thanks for testing, patience, and your supportive words. We will get there, that I promise! Of course I apologize for you having to be at the 'front lines' of fixing this.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Martin,

Here is code that might help (it's hard to say for sure because I haven't been able to duplicate this behavior on my bench yet). It fixes some ambiguities in the code regarding when the hysteresis is applied when shifting gears.

However this code also has a new field in it (called "hyst_action" in the output channels, or "HystAction" in the gauges or "hact" in the datalog) that tags exactly where in the code the hysteresis is being turned on or off. So even if this code doesn't fix the problem, it should pinpoint where any problems with the hysteresis are occurring so we can fix them.

Because there are new gauges and datalog fields, you will need to use the attached INI.
Monitor_5099Ziii.abs.s19
(83.09 KiB) Downloaded 702 times
GPIO_MShift_5099.ini
(278.41 KiB) Downloaded 729 times
Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: Trigger hysteresis using avload instead of load?

Post by Addicted »

Datalogs attached... using the latest code..
Attachments
some more.msl
(749.58 KiB) Downloaded 634 times
some more2.msl
(990.98 KiB) Downloaded 662 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Addicted,

Thanks for that! It appears at first glance that the hyst flag is being set appropriately most of the time, but the shift is not been blocked properly (which is what you said before, but unfortunately need to check all the possibilities). I need to look at these logs more closely, but I should have new code for you shortly, as this *should* be straightforward to sort now that I now which exactly part of the code is messing up. I will post again here shortly.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Trigger hysteresis using avload instead of load?

Post by Bernard Fife »

Addicted,

Okay, this code might help (again, it works on my bench, but that hasn't proven to be much help previously!).

It has changes to prevent the lookup of a new target gear or any call to the shift function while hysteresis is enabled. These changes are based on the fact that the code is in somewhat of an indeterminate state while shifting, and the current and target gears can get confused (not in the shift function itself, but in other parts of the code that might interrupt that function).

It also has an addition flag to tell us when WOT is achieved (this can override the hysteresis - though I don't think it is even close to that in your logs it might be useful in the future).
Monitor_5099ziv.abs.s19
Uses previous INI
(83.17 KiB) Downloaded 703 times
Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Post Reply