Pages: [1] 2 3
Author Topic: No-Lift-Shift (NLS) on MED9.1  (Read 38296 times)
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« on: August 06, 2014, 12:16:43 AM »

Hello all,

I’ve had a go at implementing No-Lift-Shift on my MED9.1 and would really appreciate your advice and comments on my approach.

MED9.1
Audi S3 8P
2.0 TFSI 265bhp
MY 2008
UK spec

There is a lot of information about this in the ME7 NLS threads and discussions. As I understand it, in the ME7 posts NLS is achieved by cutting the ignition. Basically ignition cut-off is implemented by setting the dwell time (tsrldyn) to zero. This results in no spark and thus no combustion. Fuelling does however continue and when combustion resumes, unburnt fuel in the exhaust system is ignited – pop! Grin

ME7 NLS links

Anti-lag launch and no-lift-shift secrets inside
How to: Stock ECU Launch control on ME7
Launch Control & No Lift Shift new Functions
06A906032HN, Implementation of launch-control and NLS
06A906032KP with NLS and antilag all needed attached
Adding anti-lag, launch control and no-lift shift

I was really interested in just No-Lift-Shift (rather than Anti Lag as well) and so I’ve gone with a bit of a different idea. Instead of ignition cut-off I’ve used fuel cut-off. I’m trying to avoid any explosions in the exhaust system as I live in a quiet neighbourhood lol Wink

I’ve tried various things but currently the most successful approach has been to simply piggyback on Function KOEVAB. This function is used to stop injection for a number of reasons (engine stall, reverse rotation, clear flood, remote start, immobiliser etc). Any of these cause the injection pattern 255 to be used which effectively shuts off injection. Injection (and combustion) resume as soon as the cut-off condition is removed.





Some extracts from the FR below (NB, these weren’t from the MED9.1 FR but rather an Alfa Romeo ME7.3 FR which happens to be in English. Good enough to get a general understanding)

FB KOEVAB 1.20 Detailed description of function
The function Co-ordination of injection valve cutoff (KOEVAB) links the individual interventions which result in a complete
injection valve cutoff.
The system constant value activates the respective intervention. To ensure this, the system constant values must be specified
in the section PROKON.
The individual interventions are linked together by a logical OR operation; this means: if one of the interventions is active
(B ...), the value B koevab is set true. This causes the function AEVABZK to cutoff all injection valves commanded by the
respective Motronic control device.

FB AEVABZK 1.20 Detailed description of function
The function transmits the injection valve cutoff pattern, evz aus, via the RAM cell evz austot to the function ACIFI on
non-EGAS systems. The fuel cutoff itself is performed in function ACIFI.
During ecu after-running, the cutoff pattern 255 is sent. (Subfunction S KL 15 OFF)
On EGAS systems (Subfunction THROTL ACT), the injection valve cutoff pattern evz aus is usually as well sent via evz austot
to the function ACIFI.
However, if monitoring functions request an injection valve cutoff via the input B evabu, then evz austot = 255 is
transmitted to the function ACIFI which is equal to a request for a complete injection cutoff.

The subfunction KOEVAB allows to implement injection valve cutoff types specific to a project, e.g. injection valve cutoff in the
event of errors by the automatic gearbox, recognized engine backward movement, engine stalling etc.
To release the diagnosis "misfire detection", the bit B evasel is generated as follows: B dmdstop (locks the misfire detection
via function AEVAB during torque interventions) is linked by means of an OR operation to the other types of injection valve
cutoff of function AEVABZK. If B evasel = true --> misfire detection is released.

I’ve put together a very simple proof of concept. If the accelerator pedal (wped_w) is pressed more than two-thirds AND the clutch pedal (B_kuppl) is pressed (since you are changing gear whilst keeping the throttle flat), cut off fuel. As soon as the clutch is released (or the accelerator pedal is less than two-thirds) then resume injection. In other words, just keep the throttle floored and change gear. When you dip the clutch to change, the engine revs won’t run away. I’m sure there are smarter implementations, but given the limits of my skill, this is just a basic proof of concept to see if it even works Smiley

So far, so good.

Pseudo code

Code:
function no_lift_shift()
{
  // No-Lift-Shift
  if (B_kuppl && wped_w > 60%)
  {
    // These temporary bits are set by the other OEM injection cut-off conditions
    // in FN KOEVAB. Then KOEVAB combines all the temporary bits and sets
    // B_koevab = 1. Function AEVABZK checks B_koevab which results in amxevab > 0
    // and in turn sets evz_austot = 255
    B_temp = 1;  
  }
}

In my proof of concept code I jump from KOEVAB to a spare location where my new code checks wped_w and B_kuppl. If they don’t meet the required conditions, jump back to KOEVAB and carry on checking the other original conditions. If they are set, jump to the end of KOEVAB where cut-off conditions are activated.

Original ASM code

Code:
ROM:004ED894                 lbz       r12, byte_7FED65
ROM:004ED898                 cmpwi     r12, 0
ROM:004ED89C                 bne       loc_4ED900
ROM:004ED8A0                 lbz       r12, byte_7FC274
ROM:004ED8A4                 clrlwi.   r12, r12, 31
ROM:004ED8A8                 bne       loc_4ED900
ROM:004ED8AC                 lbz       r12, byte_7FC69E
ROM:004ED8B0                 rlwinm.   r12, r12, 0,29,29
ROM:004ED8B4                 bne       loc_4ED900
ROM:004ED8B8                 lbz       r12, byte_7FECA8
ROM:004ED8BC                 cmpwi     r12, 0
ROM:004ED8C0                 bne       loc_4ED900
ROM:004ED8C4                 lbz       r12, byte_7FEBBF
ROM:004ED8C8                 cmpwi     r12, 0
ROM:004ED8CC                 bne       loc_4ED900
ROM:004ED8D0                 lbz       r12, byte_7FE86F
ROM:004ED8D4                 cmpwi     r12, 0
ROM:004ED8D8                 bne       loc_4ED900
ROM:004ED8DC                 lbz       r12, byte_7FEC4A
ROM:004ED8E0                 cmpwi     r12, 0
ROM:004ED8E4                 bne       loc_4ED900
ROM:004ED8E8                 lbz       r12, byte_7FC1D4
ROM:004ED8EC                 clrlwi.   r12, r12, 31
ROM:004ED8F0                 beq       loc_4ED900
ROM:004ED8F4                 lbz       r12, byte_7FC4AD
ROM:004ED8F8                 clrlwi.   r12, r12, 31
ROM:004ED8FC                 beq       loc_4ED90C
ROM:004ED900                 lbz       r12, byte_7FC5D8
ROM:004ED904                 ori       r3, r12, 1
ROM:004ED908                 b         loc_4ED914

New ASM code

Code:
ROM:004ED894                 b         sub_47C950		#jump out of KOEVAB to a spare location
ROM:004ED898                 cmpwi     r12, 0
ROM:004ED89C                 bne       loc_4ED900
ROM:004ED8A0                 lbz       r12, byte_7FC274
ROM:004ED8A4                 clrlwi.   r12, r12, 31
ROM:004ED8A8                 bne       loc_4ED900
ROM:004ED8AC                 lbz       r12, byte_7FC69E
ROM:004ED8B0                 rlwinm.   r12, r12, 0,29,29
ROM:004ED8B4                 bne       loc_4ED900
ROM:004ED8B8                 lbz       r12, byte_7FECA8
ROM:004ED8BC                 cmpwi     r12, 0
ROM:004ED8C0                 bne       loc_4ED900
ROM:004ED8C4                 lbz       r12, byte_7FEBBF
ROM:004ED8C8                 cmpwi     r12, 0
ROM:004ED8CC                 bne       loc_4ED900
ROM:004ED8D0                 lbz       r12, byte_7FE86F
ROM:004ED8D4                 cmpwi     r12, 0
ROM:004ED8D8                 bne       loc_4ED900
ROM:004ED8DC                 lbz       r12, byte_7FEC4A
ROM:004ED8E0                 cmpwi     r12, 0
ROM:004ED8E4                 bne       loc_4ED900
ROM:004ED8E8                 lbz       r12, byte_7FC1D4
ROM:004ED8EC                 clrlwi.   r12, r12, 31
ROM:004ED8F0                 beq       loc_4ED900
ROM:004ED8F4                 lbz       r12, byte_7FC4AD
ROM:004ED8F8                 clrlwi.   r12, r12, 31
ROM:004ED8FC                 beq       loc_4ED90C
ROM:004ED900                 lbz       r12, byte_7FC5D8
ROM:004ED904                 ori       r3, r12, 1
ROM:004ED908                 b         loc_4ED914


Code:
ROM:0047C950                 lhz       r12, word_7FD690	#wped_w
ROM:0047C954                 cmplwi    r12, 0xAAAA
ROM:0047C958                 ble       loc_47C96C
ROM:0047C95C                 lbz       r12, byte_7FEDBD #B_kuppl
ROM:0047C960                 cmpwi     r12, 1
ROM:0047C964                 bne       loc_47C96C
ROM:0047C968                 b         loc_4ED900 #conditions are met, jump back to end of KOEVAB where cut-off is activated
ROM:0047C96C                 lbz       r12, byte_7FED65  
ROM:0047C970                 b         loc_4ED898 #conditions not met, jump back to start of KOEVAB and continue

Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #1 on: August 06, 2014, 12:20:16 AM »

Here’s the log file. Apologies about the screenshot format, but I’m trying to show all the variables at once. Have a look at what happens when wped_w = 100% and B_kuppl = 1. You can see the injection time (ti_l) drops to zero but the throttle plate (dkwa) is still open and the WGDC is still running. Release the clutch B_kuppl = 0 and combustion resumes. The csv is attached as well.



Questions

1)   Have I got the right approach with injection cut-off versus ignition cut-off?
2)   Am I only cutting off fuelling and not everything else? (otherwise I might just as well take my foot off the accelerator) Anything else I could be logging to check this?
3)   Any disadvantages to fuel cut-off? Perhaps EGT due to removing the cooling effects of the fuel? Lambda?
4)   The cut-off lasts for as short or as long a time as the clutch is pressed (not on a timer like ME7). I can always try adding a timer if I’m going in the right direction and this is worth the effort.
5)   Are there any other interventions that may come into play? Most of the knowledge base on this is ME7 but if there’s an ME7 function of concern I can always try and look for the equivalent in MED9.1

Much appreciated
Logged
flaattire
Full Member
***

Karma: +2/-0
Offline Offline

Posts: 68


« Reply #2 on: August 06, 2014, 01:42:58 AM »

Thank you for this information! One observation though, you have the wrong approach with injection cutoff. One huge advantage of flatshifting a turbo motor with ignition cut is the turbo stays mostly spooled from the fuel. Even on a small factory frame turbo the respool time (if not using NLS with ignition cut) is significant if you drag race. Also, the kick from shifting into boost feels nice  Wink
Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #3 on: August 06, 2014, 02:14:24 AM »

Ahha – I see what you mean.

Here’s another log of a gear change (data in blue). You can see that the gear change takes about 500ms. At the start of the change boost (pvdkds_w) was about 2354mb. By the end of the gear change boost was 1552mb.

For drag racing I can understand why you would prefer ignition cut-off.

Perhaps I should call my version NLS-lite Grin


Logged
phila_dot
Hero Member
*****

Karma: +171/-11
Offline Offline

Posts: 1709


« Reply #4 on: August 06, 2014, 07:09:29 AM »

My function has a dynamic switch to use a soft (fuel cut) or hard (ignition retard) ALS/NLS.

I use a table by gear of target RPM for NLS.
Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #5 on: August 06, 2014, 07:31:35 AM »

Hello phila_dot

I use a table by gear of target RPM for NLS.

How does that work in practice? Just trying to understand what you mean.

For example (and I’m making up some numbers here), let’s say you are in third @ 5000rpm and shift up into fourth gear. Are you saying that instead of your rpm just dropping away whilst the shift is underway (due to cut), your rpm would drop from 5000rpm and hold at 4000rpm instead (4000rpm being a match for fourth gear at your exit road speed from third gear?

Logged
phila_dot
Hero Member
*****

Karma: +171/-11
Offline Offline

Posts: 1709


« Reply #6 on: August 06, 2014, 07:40:04 AM »

Exactly.
Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #7 on: August 06, 2014, 08:00:40 AM »

That’s pretty clever!

Thinking out loud, you could cut off fuel, then the revs would drop until they reach the target, then restart fuelling again.

But then the revs would start climbing, before you’ve finished the gear-change. So you’d have to cut off fuel again…

How to stop the oscillation? Hysteresis (switch on at 4000rpm, switch off 200rpm higher)

Or am I over-thinking it  Huh
« Last Edit: August 06, 2014, 08:04:34 AM by Basano » Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #8 on: August 13, 2014, 01:19:16 AM »

Bit of an update on this.

Right now there are only two conditions to activate injection cut-off. If the clutch is pressed AND the throttle pedal is pressed past a certain percentage. The pedal percentage has given me something to think about. Originally I had it set to 99% which I thought would be appropriate for WOT shifting, but sometimes when I flat-shifted, the revs would just run away until they hit the limiter. I was pretty puzzled until I did some logging and saw that sometimes I was inadvertently lifting off the throttle pedal just slightly when I pressed the clutch (perhaps my seat wasn’t close enough and my legs are too short). Not by much, 98% instead of 100% but that was enough to deactivate the injection cut-off which relies on both clutch being pressed AND throttle pedal pressed 99%. So throttle pedal reaching 98% didn’t meet the conditions, injection would resume and since the clutch was still pressed, the engine would race away. Not nice!

So then I set the throttle pedal percentage to just 66% so even if I did lift off a tiny bit, the injection cut would still remain active. After driving around a few days, this was at the other extreme. It was triggering too early in situations when I didn’t need it – I’d just wanted to make a quick get-away at the traffic lights so I could get in front of the car on my left so I could turn left in the next hundred meters. So I pressed the throttle quite a bit, changed up from 1st to 2nd and the injection cut-off activated! Had to wave in apology to those all around me since I slowed down quite inappropriately!  Embarrassed

Finally I’ve set the throttle pedal percentage at 85% which seems like a happy compromise at the moment. Day to day driving doesn’t trigger it and it still catches any tiny lift-offs when I do want it to work.
Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #9 on: August 13, 2014, 01:31:11 AM »

Next thing I looked at was rpm.

My original code implementing this didn’t even look at the rpm. The only conditions were the clutch being pressed and the accelerator pedal being pressed past a certain threshold. Then it cut off the fuel and the revs fell away. The revs could drop all the way to zero and the cut-off would still be active, as long as the clutch was pressed and the accelerator pedal was pressed past the threshold as well.

So what I’ve done now is add revs into the mix as well. Something like this:

IF (clutch = pressed) AND (acc pedal > 85%) AND (revs > 3000) THEN fuel cut-off = active

What happens now is the revs drop away and bounce around 3000rpm when the injection cut-off is active. Not as clever as what phila_dot mentions earlier in the thread but an improvement on before. You press the accelerator and clutch, the revs fall, as soon as they dip below 3000rpm then injection resumes until revs are above 3000rpm, then it would cut off again since it’s above 3000rpm and the clutch and accelerator are pressed and so on.

A side-effect of this update has been a rudimentary form of launch control. Whilst stationary, press the clutch and floor the accelerator pedal (past 85%). The revs increase until they hit 3000rpm at which point conditions are matched for injection cut-off. So the revs then drop until they are below 3000rpm, conditions are no longer true for injection cut-off and fuelling resumes. Repeat. Net result is that revs sit around 3000rpm (boost is about 0.25 bar at this point).

3000rpm is pretty conservative. If you let the clutch out at this point the motor just bogs down and then surges (since clutch is out and injection cut-off is deactivated).

Haven't looked into ignition cut-off / retard yet. Still trying to get a feel for how this comes together and the conditions to use.
Logged
ddillenger
Hero Member
*****

Karma: +638/-21
Offline Offline

Posts: 5640


« Reply #10 on: August 13, 2014, 11:12:59 AM »

Not that you need me to tell you, but very good work. Love what you've been doing. Keep it up Smiley
Logged

Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience!

Email/Google chat:
DDillenger84(at)gmail(dot)com

Email>PM
nyet
Administrator
Hero Member
*****

Karma: +604/-166
Offline Offline

Posts: 12233


WWW
« Reply #11 on: August 13, 2014, 11:13:35 AM »

There are already several soft (fuel) rev limiters in ME7. Why not retask them?
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
n0ble
Full Member
***

Karma: +2/-0
Offline Offline

Posts: 192


« Reply #12 on: August 13, 2014, 08:20:31 PM »

If you want to stop the byproduct launch control, use speed in your conditions. Speed 5kmh>
Logged
Basano
Full Member
***

Karma: +90/-3
Offline Offline

Posts: 192


« Reply #13 on: August 14, 2014, 04:22:30 AM »

Not that you need me to tell you, but very good work. Love what you've been doing. Keep it up Smiley

Thank you Smiley

There are already several soft (fuel) rev limiters in ME7. Why not retask them?

As always, that’s a good idea.

At one stage I had coded up something where one of the NMAX limits (can’t remember which one I picked, a limit if a certain fault occurred) was actually stored in a variable. The OEM code loads up the static value into a variable anyway, so I just overwrote that variable. Then when I wanted to limit the revs, I replaced the stock value with my own very low value.

It was a bit hit-and-miss, it vaguely worked once and didn’t work other times Huh (However I think my code left something to be desired since I hadn't sat down and thought it through properly)

Right now I’m trying to get a good definition for what ‘hard’ and ‘soft’ limiting actually is. I’m not sure it’s as simple as fuel or ignition exclusively. For example, you can retard the ignition versus cutting it off completely. Retard sounds ‘soft’ versus cutting it off ‘hard’?

If you want to stop the byproduct launch control, use speed in your conditions. Speed 5kmh>

I saw setzi62's pseudo code had speed in the mix as well. Now I see how it helps branch-off into a specific launch function.
Logged
ddillenger
Hero Member
*****

Karma: +638/-21
Offline Offline

Posts: 5640


« Reply #14 on: August 14, 2014, 09:24:11 AM »

Soft=fuel
Hard=ignition
Logged

Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience!

Email/Google chat:
DDillenger84(at)gmail(dot)com

Email>PM
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.028 seconds with 17 queries. (Pretty URLs adds 0s, 0q)