Boost control by gear first step: open loop MVP 1x8 table #5276

This commit is contained in:
andreika-git 2023-05-21 00:33:56 +03:00 committed by rusefillc
parent 6db01f5cc3
commit ddffc51c99
3 changed files with 22 additions and 5 deletions

View File

@ -111,6 +111,11 @@ expected<percent_t> BoostController::getOpenLoop(float target) {
openLoop += result.Value;
}
// Add gear-based adder
auto gear = Sensor::getOrZero(SensorType::DetectedGear);
float gearAdder = config->gearBasedOpenLoopBoostAdder[static_cast<int>(gear) + 1];
openLoop += gearAdder;
openLoopPart = openLoop;
return openLoop;
}

View File

@ -1523,7 +1523,8 @@ pin_input_mode_e[LUA_DIGITAL_INPUT_COUNT iterate] luaDigitalInputPinModes;
uint8_t autoscale rpmHardLimitHyst;Hysterisis: if the hard limit is 7200rpm and rpmHardLimitHyst is 200rpm, then when the ECU sees 7200rpm, fuel/ign will cut, and stay cut until 7000rpm (7200-200) is reached;"RPM", 10, 0, 0, 2500, 0
uint16_t autoscale benchTestOffTime;Time between bench test pulses;"ms", 0.1, 0, 0, 2000, 1
uint8_t autoscale boostCutPressureHyst;Hysterisis: if hard cut is 240kpa, and boostCutPressureHyst is 20, when the ECU sees 240kpa, fuel/ign will cut, and stay cut until 240-20=220kpa is reached;"kPa (absolute)", 0.5, 0, 0, 125, 1
uint8_t[31] mainUnusedEnd;;"units", 1, 0, 0, 1, 0
uint8_t[GEARS_COUNT iterate] autoscale gearBasedOpenLoopBoostAdder;Boost duty cycle added by gear;"%", 0.5, 0, 0, 100, 1
uint8_t[23] mainUnusedEnd;;"units", 1, 0, 0, 1, 0
! end of engine_configuration_s
end_struct

View File

@ -814,6 +814,13 @@ curve = 32Curve, "3-2 Shift Solenoid Percent by Speed"
yBins = throttleEstimateEffectiveAreaValues
gauge = TPSGauge
curve = boostOpenLoopGearAdderCurve, "Boost Open Loop gear-based adder"
columnLabel = "Gear", "duty cycle"
xAxis = 0, 100, 11
yAxis = 0, 100, 5
xBins = gearCountArray, tcuCurrentGear
yBins = gearBasedOpenLoopBoostAdder
[TableEditor]
; table_id, map3d_id, "title", page
@ -1798,10 +1805,11 @@ menuDialog = main
subMenu = ignitionCylExtra, "Cylinder offsets", 0
subMenu = std_separator
subMenu = boostDialog, "Boost control"
subMenu = boostOpenLoopDialog, "Boost control open loop", { isBoostControlEnabled }
subMenu = boostPidDialog, "Boost control PID", { isBoostControlEnabled && boostType == 1 }
subMenu = boostTargetDialog, "Boost control target", { isBoostControlEnabled && boostType == 1 }
subMenu = boostDialog, "Boost control"
subMenu = boostOpenLoopDialog, "Boost control open loop", { isBoostControlEnabled }
subMenu = boostOpenLoopGearAdderDialog, "Boost control open loop gear adder", { isBoostControlEnabled }
subMenu = boostPidDialog, "Boost control PID", { isBoostControlEnabled && boostType == 1 }
subMenu = boostTargetDialog, "Boost control target", { isBoostControlEnabled && boostType == 1 }
groupMenu = "Boost blend tables"
groupChildMenu = boostOpenBlend1Cfg, "Open loop 1 bias", { isBoostControlEnabled }
@ -3992,6 +4000,9 @@ dialog = tcuControls, "Transmission Settings"
dialog = boostOpenLoopDialog, "", border
panel = boostTableTbl, Center
dialog = boostOpenLoopGearAdderDialog, "", border
panel = boostOpenLoopGearAdderCurve, Center
;Boost Closed Loop
dialog = boostPidDialog, ""