Announcement

Collapse
No announcement yet.

A quick and easy way to street tune your CSL conversion for drivability.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bry5on
    replied
    Originally posted by ac427 View Post
    Great work as always karter16

    I would love to do some CAN logging. I have also purchased a Gauge.S

    Which software do you use to record the logs?

    How can i implement CAN bus logging?

    I could try the mullet tune route but since i have CSL camshafts in my engine it won't really help.
    First you’ll need to do a little wiring to bring CAN to your gauge.s - I’d recommend building a jumper harness from the steering angle sensor using a junkyard section of wiring with both connectors.

    Then you’ll need to map all the standard CAN values, knock CAN values (if you turned this on in your tune file) and any custom CAN values you may have implemented (more advanced, if you get this far).

    Attaching a gauge.s config file that contains lots of CAN setup info for you or anyone else stumbling in here.

    config-8-24-25_knockCAN04.zip
    Attached Files

    Leave a comment:


  • Bry5on
    replied
    Originally posted by karter16 View Post
    Meanwhile Bry5on was approaching this same theory from another approach. I won't go into too much detail on this, he can if he wants to, but essentially we've now confirmed the same behavior and obtained the same results by approaching this in two different ways. The fact that we arrive at the same conclusions in different ways is very reassuring that we are on the right track. I believe Bryson's had some good feedback on the changes that he's made, and likewise I've found this has brought massive improvements to my tune as well.
    Thanks karter16 for writing it out so clearly as you do! I couldn’t have solved this issue so completely without your work and your help. I am very happy that we’ve finally put an actual root cause together for the different fueling conditions in mid-rpm operation. The symptoms are not only that your motor can run lean at medium-high load, but that you feel a momentary ‘lump’ in torque as AFR moves around on rolling throttle inputs. This was a tricky one to chase.

    My validation strategy was pretty simple: I zeroed (or 1’d in this case) the effect of the enrichment table, turned off adaptations and MAP calcs, then datalogged AFR, EGT, and a few other variables at various throttle inputs and rpms to see which conditions caused the motor to run lean. This then essentially allowed me to ‘back calculate’ the KF_RF_KORR_DRREL table (rather, the appropriate numbers for non-CSL cams) and fully validate this theory. Given that we’re logging all of these values (plus knock) every 10 milliseconds, again thanks to karter16’s legendary work, this gave a super clear picture and converged nicely with the theory above. Cleaning up both the rf_tabg_modell Target EGT and KF_RF_KORR_DRREL Fuel Enrichment tables seems to have eliminated the momentary torque lump and lean condition. The default CSL values are pretty close, so if you’re doing this yourself you can trust that you’ll be pretty safe by following the advice above.

    Last, I want to be clear that you should *not* repeat my test, as it essentially deliberately puts your motor in danger by running it lean under load. I did this for a short period of time with cool down in between test pulls and specifically targeted exact cases which I knew would populate the table, in order to minimize any harm I would cause. I’d recommend using the approach karter16 outlined above to iterate yourself to an answer instead, as it will be safer but may take a little bit longer.

    Happy fuel tuning!

    Leave a comment:


  • ac427
    replied
    Great work as always karter16

    I would love to do some CAN logging. I have also purchased a Gauge.S

    Which software do you use to record the logs?

    How can i implement CAN bus logging?

    I could try the mullet tune route but since i have CSL camshafts in my engine it won't really help.

    Leave a comment:


  • karter16
    replied
    Originally posted by heinzboehmer View Post
    Awesome to see the explanation behind some of the weird behaviors I've noticed when trying this out.
    I know right - that area of the tune has bugged me for months, every time I VE logged it seemed a bit different, so satisfying to now understand what's going on.

    Leave a comment:


  • heinzboehmer
    replied
    Damn, excellent work! Awesome to see the explanation behind some of the weird behaviors I've noticed when trying this out.

    Originally posted by karter16 View Post
    (Honestly if you haven't actually driven it and felt the difference in drivability you can't appreciate what it is that you're missing).
    +1000. I've been beta testing and grabbing data for Bry5on since he started on the tune and it's incredible. You really don't know what you're missing until you try it out.

    Leave a comment:


  • karter16
    replied
    Hi all - this one is a bit of a PSA from Bry5on and I.

    TL;DR: There is an area of the closed-loop tune that you shouldn't be targeting for stoich (lambda == 1) when VE tuning. If you do you will almost certainly end up with that area of tune too lean. IMHO anyone who has VE tuned should remediate this area of the VE table to ensure they aren't running leaner than they think. There's some ways to fix it, see the "So what do I need to do?" section at the bottom.


    Background
    A few weeks ago when discussing something else Bry5on mentioned to me that he'd found, and been working on, a region between 2000-3500ish rpm under heavier closed-loop loads needed more fuel in order to nicely transition from closed loop to open loop. A few days later I had my CAN-logger up and running and got to something I'd long wanted to do which was to log various intermediate variables in the RF calculation path. It's one thing to look in the code at what these variables do, but it's another to actually see the end effect that they each have.

    I found a number of interesting observations, but for clarity will keep this post focused on one in particular, what I've named rf_korr. This variable is obtained from KF_RF_KORR_DRREL (one of the few CSL-specific parameters we know the actual name for).


    KF_RF_KORR_DRREL
    Click image for larger version  Name:	Screenshot 2025-09-06 at 10.11.16 AM.png Views:	12 Size:	26.9 KB ID:	317770

    This table has x axis: N (rpm) and y axis: rf_tabg_modell - TABG. The output is a multiplier factor which is applied to RF.

    rf_tabg_modell
    So what is rf_tabg_modell then. It's nominal TABG (exhaust gas temp) as obtained from this table:
    Click image for larger version  Name:	Screenshot 2025-09-06 at 10.18.05 AM.png Views:	12 Size:	31.7 KB ID:	317771
    Essentially this is a table of expected TABG for a given RPM/RF. This is what BMW would have measured during testing.


    Okay so why do we need this?
    Obviously we don't know for sure all the reasons BMW might have done this because we don't have the documentation, so please keep that in mind when you read the below explanation, but I'm personally pretty confident that this makes sense, and indeed what we see playing out in reality aligns with this.

    KF_RF_KORR_DRREL is needed to account for differences between the nominal gas temperature in the cylinder when BMW calibrated the VE table (and indeed the entire RF calculation path) (this would have almost certainly been done on a test bed with the engine and exhaust fully up to temperature) and the actual gas temperature in varying real-world conditions.

    When the engine is at full operating temperature the gas is hotter, and therefore less-dense, requiring less fuel. In real-world conditions when you've been driving around for a bit and exhaust temps are relatively cold, and you then suddenly put load on the engine (for example when you're doing VE tuning runs 🙃) the gas temperature is significantly lower and therefore more dense.


    What all this means in practice is that if you simply log lambda and aq_rel_rf you're going to end up with that area appearing rich (because the number you're looking at to chase stoich has been intentionally adjusted rich) and incorrectly leaning it out.

    To prove this point here is the familiar histogram (note I'm using aq_rel_rf which is the previously noted correct input variable to be using for VE tuning).

    Click image for larger version  Name:	Screenshot 2025-09-06 at 11.02.45 AM.png Views:	12 Size:	553.5 KB ID:	317772

    There's a big rich patch in the middle there at higher aq_rel_rf that needs to be corrected right?

    Let's have a look once we've corrected lambda for rf_korr:

    Click image for larger version  Name:	Screenshot 2025-09-06 at 11.03.01 AM.png Views:	13 Size:	542.3 KB ID:	317773

    As we can see we're actually still lean in some cells! These screenshots were from an early tuning run experimenting with this, which is why the corrected table hasn't converged on 1 everywhere.

    How does it drive?
    So all this academic stuff is interesting, how does it actually drive?

    Enormously better. When I first tried this out I didn't need to read the logs to know it was a huge improvement. Power and smoothness through that higher load rpm range was massively improved. When I was logging on DS2 I thought this area of my tune was average due to not having done open-loop tuning with a Wideband. It was only when CAN logging that I realized this area was still in closed loop.


    Validating the theory
    Meanwhile Bry5on was approaching this same theory from another approach. I won't go into too much detail on this, he can if he wants to, but essentially we've now confirmed the same behavior and obtained the same results by approaching this in two different ways. The fact that we arrive at the same conclusions in different ways is very reassuring that we are on the right track. I believe Bryson's had some good feedback on the changes that he's made, and likewise I've found this has brought massive improvements to my tune as well.

    Given all of this I'm pretty confident in saying that BMW tuned the VE table to target stoich, and have then applied corrections over the top where the actual target needs to differ lean or rich for varying operating conditions.


    So what do I need to do?
    Okay, the most important thing to be aware of is that you shouldn't be chasing lambda == 1 in the range that KF_RF_KORR_DRREL covers.


    Option 1 (simple but rough): I found with my setup (Euro M3, stock exhaust, Euro headers, standard cams) that I needed the VE table to have MORE fuel than the stock CSL table in that range (which makes sense given the standard cams). If you currently have less fuel in that area you're almost certainly too lean, as an immediate fix I'd at least go back to the stock CSL cell values in that range where you are currently leaner).

    Option 2 (complicated but accurate): If you're setup for it you can do what I'm doing and CAN-log the intermediate variable and calculate lambda adjusted for rf_korr, but appreciate most can't do that with their current setups as I'm using a custom program rom to enable logging those variables. What is more in reach would be logging TABG and then doing the math to calculate the difference between the model and actual TABG, which in turn would give you your rf_korr. It's a bit of excel math, but would be a reliable approach.

    Option 3 (easy and accurate): Or in my ( karter16's) opinion, if you're able, even better would be to reach out to Bry5on and get onto the Mullet Tune, not only does it solve this problem but it is by far the most sophisticated tune available for these cars and you'll reap a whole range of other improvements as well. (Honestly if you haven't actually driven it and felt the difference in drivability you can't appreciate what it is that you're missing).


    All questions/challenges/etc. welcome!
    Last edited by karter16; 09-05-2025, 11:31 PM.

    Leave a comment:


  • karter16
    replied
    Originally posted by Bry5on View Post
    Can we log short term adaptations and watch for the first transition from 1? If I remember correctly, adaptations are forced to 1 during this period - hence the difficulty in tuning cold start fueling.
    Ah good thinking - I'll dig into that but that sounds like a very good option.


    Sent from my iPhone using Tapatalk

    Leave a comment:


  • Bry5on
    replied
    Can we log short term adaptations and watch for the first transition from 1? If I remember correctly, adaptations are forced to 1 during this period - hence the difficulty in tuning cold start fueling.

    Leave a comment:


  • karter16
    replied
    Okay so when it comes to the cold-start map I think the presumption has been to log up until the point that TMOT is at 80 degrees C at which point the engine is warm and on the standard map.

    As I was chasing the last few parameters I came across this again and looked at it in a slightly new light. the Alpha N Kath table is blended in based on AVAN1_SOLL_FAKTOR. But why use AVAN1_SOLL_FAKTOR and not KATH_FAKTOR directly. Last time I looked at this I wasn't in the detail enough to question it, but it seems to be an interesting choice.

    Click image for larger version

Name:	Screenshot 2025-08-03 at 9.34.14 AM.png
Views:	147
Size:	181.7 KB
ID:	314134

    AVAN1_SOLL_FAKTOR is calculated on the slave here:

    Click image for larger version

Name:	Screenshot 2025-08-03 at 9.36.16 AM.png
Views:	138
Size:	173.3 KB
ID:	314135

    The key thing to note is if EVAN1_ST bit 4 is set then AVAN1_SOLL_FAKTOR ramps to 1 over a few seconds) if bit 4 is cleared then AVAN1_SOLL_FAKTOR ramps to 0. So it's either on or off with a bit of smoothing over the few seconds of the transition.

    How is EVAN1_ST set?

    bit 4 is set here:

    Click image for larger version

Name:	Screenshot 2025-08-03 at 9.38.31 AM.png
Views:	136
Size:	146.4 KB
ID:	314136

    What this is doing is using the curve KL_VAN_KATH_TMOT to determine how long EVAN1_ST should be cleared for before it is set.

    Click image for larger version

Name:	Screenshot 2025-08-03 at 9.41.07 AM.png
Views:	168
Size:	20.3 KB
ID:	314137

    First time the function runs and engine is in running state (LL/TL/VL) it checks current TMOT and looks up how many seconds the warm up period should last for. (e.g. if TMOT is 18 degrees C then the warm up will last for 120 seconds).

    EVAN_1_ST bit 4 stays cleared for 120 seconds and is then set.

    So the warm up period that the AlphaN Kath table is used is a set number of seconds based on TMOT at the time the engine starts, not a temperature target that is achieved by the end of warm up.

    So back to my original question, why are we using AVAN1_SOLL_FAKTOR rather than KATH_FAKTOR. Thinking about it a bit more it actually makes a fair bit of sense. Use of the AlphaN Kath table is tied to the use of the VANOS Kath tables because the different camshaft tables affect the volumetric efficiency and therefore the AlphaN table needs to be tuned to the VANOS Kath profiles. Likewise they both use AVAN1_SOLL_FAKTOR as they need to switch together as well.


    Anyway, why am I writing this in here? Because we should stop presuming that the AlphaN Kath table is used until TMOT >= 80 degrees and come up with a different strategy (We could probably log AVAN1_SOLL_FAKTOR over DS2, or we could log TMOT on engine start and work out how many seconds into the log file to take data from from there).

    Not sure in practice how much this will really affect anything but might as well make sure we have the most correct knowledge :-)

    Leave a comment:


  • heinzboehmer
    replied
    Originally posted by Bry5on View Post

    Super wild how different the results are between the two cars after running the same optimization! I wonder if you have a looser ICV than I do? That’s the only thing I can think of that would need that much extra fuel down low.
    Yeah I don't get it either. Injectors are the only other thing I can think of. Although our cars are dead on in the upper RPM/load ranges, not sure what to make of it.

    I have a set of TT injectors in the garage, but haven't swapped them cause I haven't been ready to go down that rabbit hole.

    Leave a comment:


  • Bry5on
    replied
    Originally posted by heinzboehmer View Post
    Ran through the karter16 updated VE tuning method on my car today. Car is running Bry5on's latest mullet (v28) and I disabled MAP and adaptations during the data logging sessions.

    Here's the final change compared to the baseline after three iterations:

    Click image for larger version

Name:	Mullet v28 Heinz VE Tuning Comparison.png
Views:	204
Size:	523.2 KB
ID:	310225

    There was a little bit of weirdness left down low (<1500 rpm and <~1.5 relative opening) before the tuning. It was mostly noticeable when pulling away from a stop and when feathering the throttle right before fully disengaging the clutch on upshifts. Was extra noticeable with the stock comfort throttle mapping.

    But all that is practically undetectable post-tuning! I'm super happy with the results. Drivability is very, very, very close to stock now.
    Super wild how different the results are between the two cars after running the same optimization! I wonder if you have a looser ICV than I do? That’s the only thing I can think of that would need that much extra fuel down low.

    Leave a comment:


  • heinzboehmer
    replied
    Ran through the karter16 updated VE tuning method on my car today. Car is running Bry5on's latest mullet (v28) and I disabled MAP and adaptations during the data logging sessions.

    Here's the final change compared to the baseline after three iterations:

    Click image for larger version

Name:	Mullet v28 Heinz VE Tuning Comparison.png
Views:	204
Size:	523.2 KB
ID:	310225

    There was a little bit of weirdness left down low (<1500 rpm and <~1.5 relative opening) before the tuning. It was mostly noticeable when pulling away from a stop and when feathering the throttle right before fully disengaging the clutch on upshifts. Was extra noticeable with the stock comfort throttle mapping.

    But all that is practically undetectable post-tuning! I'm super happy with the results. Drivability is very, very, very close to stock now.

    Leave a comment:


  • Bry5on
    replied
    Originally posted by karter16 View Post

    How interesting - I've been trying to think through the order of events of multiple rounds of tuning and how you could converge on the right result anyway, I was seeing waves of lean and rich coming through the table in successive runs, but maybe yours just didn't drive the same behavior 🤷‍♂️




    Yes correct - value on 7D0 is AQ_REL as per DS2. Given we now know how to convert AQ_REL to (what I am calling) aq_rel_alpha_n for the purposes of the VE tuning I figured it made sense to use standard AQ_REL in the CAN message to align with all other tables that use AQ_REL.
    Thanks.

    In my final fuel tuning I disabled all lambda control and tuned by AFR directly, i suppose the conversion was close enough, or steady state enough, that my multipliers worked? Some of my final tweaks were also manual/logical on top of the algorithmic AFR targeting. I guess this proves that my method didn’t suck! Hah. I also couldn’t really tell much of a difference after turning off adaptations and MAP compensation when driving. Just one mediocre downshift around 1500rpm or so.

    Leave a comment:


  • heinzboehmer
    replied
    Originally posted by karter16 View Post
    How interesting - I've been trying to think through the order of events of multiple rounds of tuning and how you could converge on the right result anyway, I was seeing waves of lean and rich coming through the table in successive runs, but maybe yours just didn't drive the same behavior 🤷‍♂️

    My car is still out of commission , but I plan on doing this as soon as it's back up and running. Am running the same exact hardware as Bryson (minus flap) and the same tune. Will be interesting to see if there's any variation from car to car.

    Leave a comment:


  • karter16
    replied
    Originally posted by Bry5on View Post
    Okay, I tried this one tonight and it looks like I had the mullet pretty spot on - weird!
    How interesting - I've been trying to think through the order of events of multiple rounds of tuning and how you could converge on the right result anyway, I was seeing waves of lean and rich coming through the table in successive runs, but maybe yours just didn't drive the same behavior 🤷‍♂️


    Originally posted by Bry5on View Post
    Also, karter16 I'm assuming that the relative opening value we're transmitting over CAN now is the same one as DS2, not the modified CSL one.


    Yes correct - value on 7D0 is AQ_REL as per DS2. Given we now know how to convert AQ_REL to (what I am calling) aq_rel_alpha_n for the purposes of the VE tuning I figured it made sense to use standard AQ_REL in the CAN message to align with all other tables that use AQ_REL.

    Leave a comment:

Working...
X