developing a spark cut launch control solution

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: developing a spark cut launch control solution

Post by NSFW »

For making the rev limiter less violent... I'm read somewhere about disabling the injectors selectively rather than all-on / all-off. For example disable one injector when RPM is higher than 4000, disable 2 injectors when RPM is higher than 4100, 3 when over 4200... And this was on a Subaru so disabling all 4 was disabling all of them. :) The idea is that you end up oscillating between 25% torque and 50% torque, rather than between 0% and 100% so the RPM doesn't oscillate as aggressively.

But that was with injectors, and the factory code had a per-injector offset that made it easy to cut off one at a time... and I'm guessing the same spark dwell is used on all 8 cylinders.

I wonder if it would work to make the dwell nonzero but small, right on the edge of being insufficient. So basically you'd be introducing random misfires. The amount of dwell, and thus the frequency of misfires, would vary with how close actual RPM is to the target RPM. But it might be hard to find a dwell value that works well for this, and to be honest there might not even be a dwell value that works for this, because I'm just making this shit up as I go along... :)

Another option would be to randomly set the dwell to the default or to zero when RPM is near the target. For example set it to zero 25% of the time when RPM is 4000, set it to zero 50% of the time when RPM is 4100, 75% of the time at 4200, 100% at 4300 and above. Depending on how many ignition events there are between calls to your dwell-hacking function, this might turn out OK. Or more to the point, if there are more than 8 ignition events per invocation then this won't help at all. But if your code is getting invoked roughly once per ignition event, or faster, then I think this would work well.

Do you know how many times per second your code is getting called? If not you could have it increment a simple counter in memory, and data-log that memory location, and measure how quickly the counter increases.


A simple random number generator in C using 16-bit values:
https://codebase64.org/doku.php?id=base ... _generator

This might need some explaining:
x ^= x << 7;

In English:
shift the value of x 7 bits to the left, then XOR the result with the original value of x, then store the result in x

The random number generator does that in different directions and with different amounts of shift, and the result is a mostly-random number.

The result isn't truly random but it should be random enough. 16-bit values range from 0 to 65535. 65535 divided by 4 is 16384. So...
The result should be less than 16384 about 25% of the time.
The result should be less than 32768 about 50% of the time.
The result should be less than 49152 about 75% of the time.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: developing a spark cut launch control solution

Post by bubba2533 »

NSFW wrote: Do you know how many times per second your code is getting called? If not you could have it increment a simple counter in memory, and data-log that memory location, and measure how quickly the counter increases.
I'll figure this out in the next couple days, because it would be really helpful to know what way to go.

I just needed the push to do it, because I was avoiding reworking the ASM :comp:
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: developing a spark cut launch control solution

Post by bubba2533 »

Ok, well it was much easier to add a counter than I was thinking. I did a quick bench test and it seems to be running the dwell routine for each cylinder (3 per rev in my application since it's a V6).

So I would think that should be a fast enough update rate.

I like the idea of disabling injectors/cylinders to reduce power. There is a engine protection routine that could be used for reference or just tapped into, but I'll need to do a lot more investigating to understand how it works.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: developing a spark cut launch control solution

Post by NSFW »

Cool!
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
vwnut8392
Posts: 59
Joined: Fri Feb 28, 2014 7:38 am
cars: AAN powered 83 audi 4000 quattro
1983 audi UR quattro
1992 GTI VR6

Re: developing a spark cut launch control solution

Post by vwnut8392 »

non 0.0 dwell should still work, have to experiment with it to see what suits you. i like the violence to 0.0 is for me. in older VAG 1.8T ME7 ECU's with 512K flash they have a funky ignition driver chip that when forced to 0.0 it doesnt work at all or it will blow the coil fuse after a couple loud bangs. for them to work correctly they normally need dwell set to 0.2ms and it works without a hitch. the dwell time makes the launch control faster or slower essentially.


the code should be in a fairly high priority interrupt since its ignition releated when compared to other loops in the ECU.

Bubba, when you have time message me. i'd like you to send me your current BIN files so i can disassemble them in IDA pro and catch up with what you have done unless you have done the work in IDA already and have an IDB file.
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: developing a spark cut launch control solution

Post by bubba2533 »

I did some more testing on my truck and the current logic isn't that bad as far as holding the RPM at the set point, but it definitely could be better.

I transferred some data to google sheets to make it look a little better. All of these tests were done with the launch limit set to 3000 rpm

First I did a test in park/neutral similar to how a manual car would work with this launch control. Because there was no load holding the engine back it went over the launch limiter quite a bit.
Engine Speed vs. Time (Park_Neutral).png
Engine Speed vs. Time (Park_Neutral).png (16.29 KiB) Viewed 3573 times
Here are a couple tests in gear with the engine pushing up against the torque converter. It's barely going over the limit, and it falls pretty far from all the load.
Engine Speed vs. Time (Drive 1).png
Engine Speed vs. Time (Drive 1).png (14.56 KiB) Viewed 3573 times
Engine Speed vs. Time (Drive 5) .png
Engine Speed vs. Time (Drive 5) .png (15 KiB) Viewed 3573 times
Here is a comparison of what the WOT BOX that I have used for this season.
Engine Speed vs. Time (WOT BOX) .png
Engine Speed vs. Time (WOT BOX) .png (15.37 KiB) Viewed 3573 times
So all in all it works fairly well, but I might try to do some sort of staged approach so that it doesn't cut all cylinders if it doesn't exceed the limit by much.

Here is a stock 12587603 v6 bin file with the LC patch.
2004 V6 Van 12587603 LC Patched.bin
(1 MiB) Downloaded 190 times
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
User avatar
vwnut8392
Posts: 59
Joined: Fri Feb 28, 2014 7:38 am
cars: AAN powered 83 audi 4000 quattro
1983 audi UR quattro
1992 GTI VR6

Re: developing a spark cut launch control solution

Post by vwnut8392 »

the difference here is timing retard and no timing retard. watch my test video again when i just manipulated the mapping to test the over all effect of it. if you want to be less aggressive and a more consistent cut you have to add timing retard into it with like -10 degress retard when the cut is active. just modifying dwell time alone and keeping timing wherever it is on the timing table gives slower chops.
turbo_bu
Posts: 55
Joined: Tue Dec 03, 2019 3:58 am

Re: developing a spark cut launch control solution

Post by turbo_bu »

Excellent work! I spent some time looking at your code and it looks good. A very neat way to patch in a spark cut to the existing code. I know that this would require some shuffling of what you have already done but couldn't a spark based rev limiter also be added?
User avatar
hsv08
Posts: 547
Joined: Thu May 09, 2013 6:50 pm
cars: (EX) VT SENATOR 355 STROKER
(EX) VT SS 304 MANUAL
NOW VX V6 HACK

Re: developing a spark cut launch control solution

Post by hsv08 »

Hi guys, Any progress on this or an XDF that defines the code? Would love to try it out on the race car :)
V8fan
Posts: 27
Joined: Mon Nov 01, 2021 6:27 am
cars: Astro VAN

Re: developing a spark cut launch control solution

Post by V8fan »

NSFW wrote:For making the rev limiter less violent... I'm read somewhere about disabling the injectors selectively rather than all-on / all-off.
I know its old thread but I bumped at it when use search )
There is fuel that sprayed directly into opened valve and there is fuel that filming inlet port and takes some time to vaporize to get into cylinder
Because of that turning off injector cant cut whole fuel instantly
At high load disabling injector is building extra lean mixture for very short period of time that can cause detonation and failure
Better retard ignition
Post Reply