Pages: [1]
Author Topic: Tunning with chatgpt  (Read 1566 times)
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« on: September 14, 2025, 05:40:13 AM »

What do you think about tuning with chatgpt? Analysis logs... I tried to make it do a multimap me7 and it was almost there but needed confirmation/help with disassembly.
« Last Edit: September 16, 2025, 09:45:10 PM by JeanAwt » Logged

A4 B5 1.8T ONLY
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« Reply #1 on: September 19, 2025, 11:20:35 AM »

well...I'm just giving my opinion as an old noob: if you're precise about the requests it's really a great tool to improve your settings. Of course you have to know the basic map names...it helped me understand my timing reduction because of kfwms. Log analysis, screen shot, ecuxplot or csv. Sometimes I tell him to redirect him to the S4wiki. Of course you can provide him with .bin, damos...make comparisons...I think it's cool for noobs
Logged

A4 B5 1.8T ONLY
fknbrkn
Hero Member
*****

Karma: +219/-24
Offline Offline

Posts: 1537


mk4 1.8T AUM


« Reply #2 on: September 22, 2025, 11:56:24 AM »

*it

 Roll Eyes
Logged
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« Reply #3 on: September 25, 2025, 09:44:42 PM »

*it

 Roll Eyes

yes sorry I always use Google translate, my English is average. but sometimes I call her 'She' and I imagine her with big... coming from Eastern countries . seriously it helped me understand KFZWMS and other 'limitations' maps. even if the free version is quickly limited.
« Last Edit: September 25, 2025, 09:50:29 PM by JeanAwt » Logged

A4 B5 1.8T ONLY
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« Reply #4 on: September 26, 2025, 07:40:50 AM »

indeed if no one is interested you can delete this topic
Logged

A4 B5 1.8T ONLY
fknbrkn
Hero Member
*****

Karma: +219/-24
Offline Offline

Posts: 1537


mk4 1.8T AUM


« Reply #5 on: September 26, 2025, 10:15:12 AM »

im using it for my projects usually, good for coding
but as for the ecu things most of the time gpt fckd up totally
Logged
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« Reply #6 on: September 26, 2025, 11:55:09 AM »

im using it for my projects usually, good for coding
but as for the ecu things most of the time gpt fckd up totally

yes even if I don't know how to code, I quickly understood that it is the ideal tool for that. for fun I tested python scripts to analyze my logs like ecuxplot does. by giving it the ecu file, csv.. at the beginning several problems because of the separation commas. I was almost there reading + graphics ok. creation of .bat file but it did not work with different cfg. for my ecu me7.5 setting another approach I only use some information because often it mixes the maps and their functions/interactions. but it's cool to be able to take a photo of log and have another direct opinion, it makes you think.
Logged

A4 B5 1.8T ONLY
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« Reply #7 on: September 26, 2025, 12:05:19 PM »

import pandas as pd
import matplotlib.pyplot as plt

# === CONFIG ===
log_file = "log_me7.csv"   # <-- put your ME7Logger .csv file here

# === READ FILE ===
df = pd.read_csv(log_file, sep="\t", encoding="latin1")
cols = df.columns.tolist()
print("Columns found in log:", cols)

# === HELPER FUNCTION TO FIND COLUMN NAMES ===
def find_col(keywords):
    for col in cols:
        for k in keywords:
            if k.lower() in col.lower():
                return col
    return None

# === DETECT RELEVANT COLUMNS ===
rpm_col   = find_col(["rpm", "engine speed"])
ldreq_col = find_col(["specified load", "requested load"])
ldact_col = find_col(["engine load", "load actual"])
boost_req_col = find_col(["boost pressure request", "specified boost"])
boost_act_col = find_col(["boost pressure actual", "boost actual"])
ign_col   = find_col(["ignition angle", "ign angle"])
cf_cols   = [find_col([f"cylinder {i}", f"cf{i}", f"knock retard {i}"]) for i in range(1,5)]
lam_col   = find_col(["lambda", "afr"])

# === EXTRACT DATA ===
rpm   = df[rpm_col] if rpm_col else None
ldreq = df[ldreq_col] if ldreq_col else None
ldact = df[ldact_col] if ldact_col else None
boost_req = df[boost_req_col] if boost_req_col else None
boost_act = df[boost_act_col] if boost_act_col else None
ign   = df[ign_col] if ign_col else None
cf    = [df[c] for c in cf_cols if c] if cf_cols else []
lam   = df[lam_col] if lam_col else None

# === PLOTS ===
if boost_req is not None and boost_act is not None:
    plt.figure(figsize=(10,6))
    plt.plot(rpm, boost_req, label="Boost requested")
    plt.plot(rpm, boost_act, label="Boost actual")
    plt.xlabel("Engine Speed (RPM)")
    plt.ylabel("Boost (mbar)")
    plt.title("Boost Requested vs Actual")
    plt.legend()
    plt.grid()
    plt.show()

if ign is not None and len(cf) > 0:
    plt.figure(figsize=(10,6))
    plt.plot(rpm, ign, label="Ignition advance")
    for i, c in enumerate(cf, start=1):
        plt.plot(rpm, c, label=f"CF Cyl {i}")
    plt.xlabel("Engine Speed (RPM)")
    plt.ylabel("Degrees")
    plt.title("Ignition Timing & Knock Retard")
    plt.legend()
    plt.grid()
    plt.show()

if lam is not None:
    plt.figure(figsize=(10,6))
    plt.plot(rpm, lam, label="Lambda")
    plt.xlabel("Engine Speed (RPM)")
    plt.ylabel("Lambda")
    plt.title("Air-Fuel Ratio (Lambda)")
    plt.legend()
    plt.grid()
    plt.show()

# === AUTOMATIC ANALYSIS ===
print("\n=== LOG ANALYSIS REPORT ===")

# Knock
if len(cf) > 0:
    for i, c in enumerate(cf, start=1):
        max_knock = c.max()
        if max_knock > 3:
            rpm_event = rpm[c.idxmax()]
            print(f"⚠ Cylinder {i}: knock retard {max_knock:.1f}° at {rpm_event:.0f} rpm")
        else:
            print(f"✓ Cylinder {i}: knock OK (max {max_knock:.1f}°)")

# Load
if ldreq is not None and ldact is not None:
    diff = (ldact - ldreq) / ldreq * 100
    max_over = diff.max()
    if max_over > 10:
        rpm_event = rpm[diff.idxmax()]
        print(f"⚠ Load overshoot: {max_over:.1f}% at {rpm_event:.0f} rpm")
    else:
        print("✓ Engine load close to requested")

# Lambda
if lam is not None:
    min_lam = lam.min()
    max_lam = lam.max()
    if min_lam < 0.78:
        print(f"⚠ Mixture too rich (lambda {min_lam:.2f})")
    if max_lam > 0.95:
        print(f"⚠ Mixture too lean (lambda {max_lam:.2f})")
    if 0.78 <= min_lam and max_lam <= 0.95:
        print("✓ Lambda within expected range")
Logged

A4 B5 1.8T ONLY
nyet
Administrator
Hero Member
*****

Karma: +609/-169
Offline Offline

Posts: 12311


WWW
« Reply #8 on: September 26, 2025, 01:48:06 PM »

really good at translating docs

reasonably good at fixing bugs in code (or adding features, IF the code is well structured to start with) - highly recommend cursor, not chatgpt

less good at building code from scratch

literally awful at interpreting logs directly. Don't do it. but you can have it help you write code to parse logs.
« Last Edit: September 26, 2025, 01:51:51 PM by nyet » Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

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 ex
Mike Tries
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 15


« Reply #9 on: October 03, 2025, 09:52:27 PM »

I did it. If you're very careful with what you give it, it can help you understand your logs. You really need to trim them to what you want it to focus on, though, and you really ought to be able to interpret them yourself anyway. You can have a live sort-of chat with something to bounce ideas off of it.

I actually forced GPT 5 to make an entire tune for me that I ran on my car. It didn't work great, but I wanted to know if it could do it. I'll document it here in a bit. I do not recommend that anybody does this unless you're willing to buy new connecting rods. I thought the risk was worth it to find out though.

In the end, what's running on my car is something that I wrote and then had refined on a dyno by a professional. I'll try to capture that.
Logged
JeanAwt
Sr. Member
****

Karma: +16/-15
Offline Offline

Posts: 322


« Reply #10 on: October 04, 2025, 01:08:41 AM »

Yes, it is not capable of adjusting a complete file and I want to say fortunately, otherwise it would not be fun. It mixes the functions of the maps (at least on the free version). But for doing calculations or map linearization it is cool.

It's doomed to failure, for example, if you ask him "can you add fuel to this area?" especially since there are several ways to do it. So it will go into a tailspin with calculations worthy of NASA for nothing.
Logged

A4 B5 1.8T ONLY
Pages: [1]
  Print  
 
Jump to:  

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