N54 WGDC calculation

norbeger

New Member
May 4, 2020
6
6
0
I searched all the forums how to exactly calculate the WGDC.

jyamona posted this:
It goes like this: WGDC Base table val is looked up and loaded into memory. Adder Airflow is looked up, added to base. This val passed in as the X-axis lookup along w/ MAF as the Y to WGDC to WGDC Position table. This table lookup result is stored in mem. It is then passed into the WGDC Pos back to WGDC table as axis lookup. This lookup result is stored in mem. It is then added to the initial WGDC base value, to give your new WGDC Base. PID is now applied.

This is a bit over simplified, as I left out Pre Control A, and Spool mode stuff, but you get the point

I made this simple "code" to understand the calculation, can someone help finish it?

Code:
val boost_setpoint = 2.52
val maf = 244

val wgdc_base = get_wgdc_base(x: maf, y: boost_setpoint) + get_wgdc_adder(x: maf)

val wgdc_to_wgdc_position = get_wgdc_to_wgdc_position(x: wgdc_base, y: maf)
val wgdc_pos_back = get_wgdc_pos_back(x: wgdc_to_wgdc_position)

val final_wgdc_base = wgdc_base + wgdc_pos_back

val wgdc_after_pid = get_wgdc_after_pid(base: final_wgdc_base)
val final_wgdc_after_pid = wgdc_limit(wgdc_after_pid)

val final_wgdc_bank_x = final_wgdc_after_pid + ?


?? val pre_control_a = get_pre_control_a(x: load, y: rpm) ??
?? val wgdc_correction_ect = get_wgdc_correction_ect(x: engine_coolant_temp) ??
 

JohnDaviz

Lieutenant
Jan 6, 2019
866
583
0
Ride
335i E92 DCT
Thanks for the Code. Makes reading the text a bit easier..

Sadly I can´t help you :/
 

impuls

Specialist
Jan 28, 2018
92
60
0
Ride
'07 335i
The name of the table in the "Funktionsdokumentation" (KF_ATLVST_GD or KF_ATLVST_GD_SPORT) indicates pre_control_a is relevant for part throttled mode (Boost < 0) only.
I have know idea if the table defined in the XDF is the one relevant for Sport or Normal mode (could be tested easily I guess).
There is another table (KL_ATLVST_UEB) - not defined in the XDF as far as I know - controlling how to blend between pre_control_a and wgdc_base.
If you want to understand how WGDC under boost the table is not relevant as far as I understand.

Actually there is another factor which will adjust the WGDC before factoring in PID (but it will be included in the logged WGDC PID).
The factor is calculated based on the I-Factor of the PID under some conditions I not understand and it's persisted.
You can read the factor using INPA, see sccreenshot below.
I tried hard and failed to rest it...

Code:
val final_wgdc_base = (wgdc_base + wgdc_pos_back) * F_atlad

During final calculation WGDC Correction (ECT) is just one small part of the calculation.
There is a correction for ignition angel, WGDC changing up and down and voltage, no idea why.
The related tables are not defined, but I doubt adjusting or understanding them will help to create a better tune.

Code:
val wgdc_ignition_corrected = final_wgdc_after_pid
    * STATIC_CORRECTION_FACTOR
    * get_ignition_correction_factor(mass_flow_per_cylinder, ignition_angel)

val wgdc_up_down_corrected =
    if(increasing(wgdc_ignition_corrected)) get_up_correction(wgdc_ignition_corrected)
    else get_down_correction(wgdc_ignition_corrected)
   
val final_wgdc_bank_x =
    (wgdc_up_down_corrected * get_voltage_correction(voltage))
    + get_wgdc_correction_ect(engine_temprature)


1612472283341.png
 

norbeger

New Member
May 4, 2020
6
6
0
I made a WGDC base "emulator", please try it and use to fine-tune your WGDC.
(use Excel, find and replace , to . if you use English Excel, the example data is a stock EU I8A0S)
I use this emulator in Google Drive but I attached an xlsx file also.

You can calculate one WGDC base final value or paste a MHD log and draw a graph from it.

One value calculation cells: B26, B27 (final: E27 and B68, sub calculations: B28, B33, B34, B55, B64)

Emulation from MHD log: B74 F74
Copy the original log file, delete every column but these: time, setpoint, maf, rpm, wgdc base

You can copy the table values from TunerPro (do not overwrite the orange cells)

yellow cell: one value calculation
orange cell: limit cell
green cell: sub calculations
gray cell: X or Y value from TunerPro
colored cell: table value from TunerPro
 

Attachments

  • WGDC emulator_20210410.xlsx
    53.6 KB · Views: 222

Jeffman

Major
Jan 7, 2017
1,620
1
629
0
Thanks. This looks super-useful. I’ll dig into it once I’m back into tuning. I’m focused first on completing a bunch of maintenance (AT filter and solenoids; walnut blast; crankshaft protection plate, etc.).
Maintenance before mods!
 

NOTORIOUS VR

New Member
May 31, 2022
2
1
0
I made a WGDC base "emulator", please try it and use to fine-tune your WGDC.
(use Excel, find and replace , to . if you use English Excel, the example data is a stock EU I8A0S)
I use this emulator in Google Drive but I attached an xlsx file also.

Thank you very much for you hard work on this, I'm surprised this doesn't have more feed back to be honest!
 
  • Like
Reactions: MoreBoost

MoreBoost

Sergeant
Jul 27, 2017
360
143
0
Ride
335i
I made a WGDC base "emulator", please try it and use to fine-tune your WGDC.
(use Excel, find and replace , to . if you use English Excel, the example data is a stock EU I8A0S)
I use this emulator in Google Drive but I attached an xlsx file also.

You can calculate one WGDC base final value or paste a MHD log and draw a graph from it.

One value calculation cells: B26, B27 (final: E27 and B68, sub calculations: B28, B33, B34, B55, B64)

Emulation from MHD log: B74 F74
Copy the original log file, delete every column but these: time, setpoint, maf, rpm, wgdc base

You can copy the table values from TunerPro (do not overwrite the orange cells)

yellow cell: one value calculation
orange cell: limit cell
green cell: sub calculations
gray cell: X or Y value from TunerPro
colored cell: table value from TunerPro

This will be super helpful as I'm trying to do my own tune.
Thank you!