open loop boost control does not allow Y axis MAP values greater than 100, even when Y axis is set to MAP #6840

expanding range, also renaming axis
This commit is contained in:
rusefillc 2024-08-22 11:30:53 -04:00
parent aae0d50640
commit ddf1c28d57
6 changed files with 21 additions and 16 deletions

View File

@ -30,6 +30,7 @@ Release template (copy/paste this for new release):
### Fixed
- Removed questionable MAP sampling trigger index option
- boost control load axis range and rename #6840
## August 2024 "Day 898"

View File

@ -300,11 +300,11 @@ void setDefaultBoostParameters() {
engineConfiguration->boostControlPinMode = OM_DEFAULT;
setRpmTableBin(config->boostRpmBins);
setLinearCurve(config->boostTpsBins, 0, 100, 1);
setLinearCurve(config->boostLoadBins, 0, 100, 1);
for (int loadIndex = 0; loadIndex < BOOST_LOAD_COUNT; loadIndex++) {
for (int rpmIndex = 0; rpmIndex < BOOST_RPM_COUNT; rpmIndex++) {
config->boostTableClosedLoop[loadIndex][rpmIndex] = (float)config->boostTpsBins[loadIndex];
config->boostTableClosedLoop[loadIndex][rpmIndex] = (float)config->boostLoadBins[loadIndex];
}
}
@ -357,8 +357,8 @@ void initBoostCtrl() {
#endif
// Set up open & closed loop tables
boostMapOpen.initTable(config->boostTableOpenLoop, config->boostRpmBins, config->boostTpsBins);
boostMapClosed.initTable(config->boostTableClosedLoop, config->boostRpmBins, config->boostTpsBins);
boostMapOpen.initTable(config->boostTableOpenLoop, config->boostRpmBins, config->boostLoadBins);
boostMapClosed.initTable(config->boostTableClosedLoop, config->boostRpmBins, config->boostLoadBins);
boostCltCorr.initTable(config->cltBoostCorr, config->cltBoostCorrBins);
boostIatCorr.initTable(config->iatBoostCorr, config->iatBoostCorrBins);
boostCltAdder.initTable(config->cltBoostAdder, config->cltBoostAdderBins);

View File

@ -624,7 +624,7 @@ bool validateConfigOnStartUpOrBurn() {
#if EFI_BOOST_CONTROL
// Boost
ensureArrayIsAscending("Boost control TPS", config->boostTpsBins);
ensureArrayIsAscending("Boost control Load", config->boostLoadBins);
ensureArrayIsAscending("Boost control RPM", config->boostRpmBins);
#endif // EFI_BOOST_CONTROL

View File

@ -127,6 +127,8 @@ struct_no_prefix engine_configuration_s
! air cooled engines go up to 250, see community board firmware which has that
! PnP boards for liquid cooled engines should override with '120'
#define CLT_UPPER_LIMIT 250
! technical debt: some of these use uint8_t !!!
#define MAP_UPPER_LIMIT 255
#define LUA_PWM_COUNT 8
#define LUA_DIGITAL_INPUT_COUNT 8
@ -830,7 +832,7 @@ pin_output_mode_e hip9011IntHoldPinMode;
uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0
uint8_t mc33_hvolt;Boost Voltage;"v", 1, 0, 40, 70, 0
uint8_t minimumBoostClosedLoopMap;Minimum MAP before closed loop boost is enabled. Use to prevent misbehavior upon entering boost.;"kPa", 1, 0, 0, 255, 0
uint8_t minimumBoostClosedLoopMap;Minimum MAP before closed loop boost is enabled. Use to prevent misbehavior upon entering boost.;"kPa", 1, 0, 0, @@MAP_UPPER_LIMIT@@, 0
int8_t initialIgnitionCutPercent;;"%", 1, 0, 0, 100, 0
int8_t finalIgnitionCutPercentBeforeLaunch;;"%", 1, 0, 0, 100, 0
@ -1295,6 +1297,7 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\
output_pin_e hpfpValvePin;
pin_output_mode_e hpfpValvePinMode;
! todo: reuse @@MAP_UPPER_LIMIT@@ once we are above uint8?
float boostCutPressure;MAP value above which fuel is cut in case of overboost.\nSet to 0 to disable overboost cut.;"kPa (absolute)", 1, 0, 0, 1000, 0
uint8_t[16] autoscale tchargeBins;;"kg/h", 5, 0, 0, 1200, 0
@ -1408,7 +1411,7 @@ custom stepper_num_micro_steps_e 1 bits, U08, @OFFSET@, [0:3], @@stepper_num_mic
int16_t coastingFuelCutClt;Fuel cutoff is disabled when the engine is cold.;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 0
int16_t pidExtraForLowRpm;Increases PID reaction for RPM<target by adding extra percent to PID-error;"%", 1, 0, 0, 100, 0
int16_t coastingFuelCutMap;MAP value above which fuel injection is re-enabled.;"kPa", 1, 0, 0, 250, 0
int16_t coastingFuelCutMap;MAP value above which fuel injection is re-enabled.;"kPa", 1, 0, 0, @@MAP_UPPER_LIMIT@@, 0
linear_sensor_s highPressureFuel;
@ -1745,7 +1748,7 @@ engine_configuration_s engineConfiguration;
float[SCRIPT_CURVE_8] scriptCurve6Bins;;"x", 1, 0, -10000, 10000, 3
float[SCRIPT_CURVE_8] scriptCurve6;;"y", 1, 0, -10000, 10000, 3
float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0, 200, 2
float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0, 120, 2
float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0, 18000, 0
float[BARO_CORR_SIZE x BARO_CORR_SIZE] baroCorrTable;;"ratio", 1, 0, 0, 2, 2
@ -1766,7 +1769,7 @@ uint8_t[BOOST_LOAD_COUNT x BOOST_RPM_COUNT] autoscale boostTableOpenLoop;;"", {1
uint8_t[BOOST_RPM_COUNT] autoscale boostRpmBins;;"RPM", 100, 0, 0, 25000, 0
uint8_t[BOOST_LOAD_COUNT x BOOST_RPM_COUNT] autoscale boostTableClosedLoop;;"", 2, 0, 0, 3000, 0
uint8_t[BOOST_LOAD_COUNT] boostTpsBins;;"", 1, 0, 0, 100, 0
uint8_t[BOOST_LOAD_COUNT] boostLoadBins;;"", 1, 0, 0, @@MAP_UPPER_LIMIT@@, 0
uint8_t[PEDAL_TO_TPS_SIZE x PEDAL_TO_TPS_SIZE] pedalToTpsTable;;"%", 1, 0, 0, 100, 0
uint8_t[PEDAL_TO_TPS_SIZE] pedalToTpsPedalBins;;"%", 1, 0, 0, 120, 0
@ -1815,6 +1818,7 @@ uint16_t[FUEL_RPM_COUNT] injPhaseRpmBins;;"RPM", 1, 0, 0, 18000, 0
uint8_t[TCU_SOLENOID_COUNT x TCU_GEAR_COUNT] tcuSolenoidTable;;"onoff", 1, 0, 0, 1, 0
! todo: reuse @@MAP_UPPER_LIMIT@@ once we are above uint8?
uint16_t[FUEL_LOAD_COUNT x FUEL_RPM_COUNT] autoscale mapEstimateTable;;"kPa", 0.01, 0, 0, 600, 2
uint16_t[FUEL_LOAD_COUNT] autoscale mapEstimateTpsBins;;"% TPS", {1/@@TPS_2_BYTE_PACKING_MULT@@}, 0, 0, 100, 1
uint16_t[FUEL_RPM_COUNT] mapEstimateRpmBins;;"RPM", 1, 0, 0, 18000, 0

View File

@ -976,12 +976,12 @@ curve = rangeMatrix, "Range Switch Input Matrix"
table = boostTableTbl, boostMapOpen, "Boost control duty cycle (open loop)", 1
xyLabels = "RPMValue", {bitStringValue(pwmAxisLabels, boostOpenLoopYAxis)}
xBins = boostRpmBins, RPMValue
yBins = boostTpsBins, TPSValue
yBins = boostLoadBins, TPSValue
zBins = boostTableOpenLoop
table = boostClosedTbl, boostMapClosed, "Boost control target / Closed Loop (kPa)", 1
xBins = boostRpmBins, RPMValue
yBins = boostTpsBins, TPSValue
yBins = boostLoadBins, TPSValue
zBins = boostTableClosedLoop
table = vvtTable1Tbl, vvtTable1Map, "Intake VVT closed loop Target", 1

View File

@ -181,12 +181,12 @@ void setDefaultBoostParameters() {
engineConfiguration->boostControlPinMode = OM_DEFAULT;
setLinearCurve(config->boostRpmBins, 0, 8000 / RPM_1_BYTE_PACKING_MULT, 1);
setLinearCurve(config->boostTpsBins, 0, 100 / TPS_1_BYTE_PACKING_MULT, 1);
setLinearCurve(config->boostLoadBins, 0, 100 / TPS_1_BYTE_PACKING_MULT, 1);
for (int loadIndex = 0; loadIndex < BOOST_LOAD_COUNT; loadIndex++) {
for (int rpmIndex = 0; rpmIndex < BOOST_RPM_COUNT; rpmIndex++) {
config->boostTableOpenLoop[loadIndex][rpmIndex] = config->boostTpsBins[loadIndex];
config->boostTableClosedLoop[loadIndex][rpmIndex] = config->boostTpsBins[loadIndex];
config->boostTableOpenLoop[loadIndex][rpmIndex] = config->boostLoadBins[loadIndex];
config->boostTableClosedLoop[loadIndex][rpmIndex] = config->boostLoadBins[loadIndex];
}
}
@ -237,8 +237,8 @@ void initBoostCtrl() {
}
// Set up open & closed loop tables
boostMapOpen.init(config->boostTableOpenLoop, config->boostTpsBins, config->boostRpmBins);
boostMapClosed.init(config->boostTableClosedLoop, config->boostTpsBins, config->boostRpmBins);
boostMapOpen.init(config->boostTableOpenLoop, config->boostLoadBins, config->boostRpmBins);
boostMapClosed.init(config->boostTableClosedLoop, config->boostLoadBins, config->boostRpmBins);
// Set up boost controller instance
engine->boostController.init(&boostPwmControl, &boostMapOpen, &boostMapClosed, &engineConfiguration->boostPid);