Add I-term bounds for Alternator Control fix #6988
This commit is contained in:
parent
f92c4e05cb
commit
d26b6e662d
|
@ -32,6 +32,7 @@ Release template (copy/paste this for new release):
|
||||||
- Support wasted spark on odd cylinder count 4-stroke engines. Improves startup and allows running without a cam sensor!
|
- Support wasted spark on odd cylinder count 4-stroke engines. Improves startup and allows running without a cam sensor!
|
||||||
- CLT/IAT boost duty/target compensation #6424
|
- CLT/IAT boost duty/target compensation #6424
|
||||||
- DFCO MAP condition hysteresis #6915
|
- DFCO MAP condition hysteresis #6915
|
||||||
|
- Add I-term bounds for Alternator Control #6988
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Removed questionable MAP sampling trigger index option
|
- Removed questionable MAP sampling trigger index option
|
||||||
|
|
|
@ -60,6 +60,9 @@ expected<percent_t> AlternatorController::getOpenLoop(float target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
expected<percent_t> AlternatorController::getClosedLoop(float targetVoltage, float vBattVoltage) {
|
expected<percent_t> AlternatorController::getClosedLoop(float targetVoltage, float vBattVoltage) {
|
||||||
|
alternatorPid.iTermMin = engineConfiguration->alternator_iTermMin;
|
||||||
|
alternatorPid.iTermMax = engineConfiguration->alternator_iTermMax;
|
||||||
|
|
||||||
percent_t altDuty = alternatorPid.getOutput(targetVoltage, vBattVoltage, FAST_CALLBACK_PERIOD_MS / 1000.0f);
|
percent_t altDuty = alternatorPid.getOutput(targetVoltage, vBattVoltage, FAST_CALLBACK_PERIOD_MS / 1000.0f);
|
||||||
|
|
||||||
// this block could be executed even in on/off alternator control mode
|
// this block could be executed even in on/off alternator control mode
|
||||||
|
|
|
@ -533,6 +533,13 @@ bool validateConfigOnStartUpOrBurn() {
|
||||||
engineConfiguration->mapExpAverageAlpha = 1;
|
engineConfiguration->mapExpAverageAlpha = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (engineConfiguration->alternator_iTermMin == 0) {
|
||||||
|
engineConfiguration->alternator_iTermMin = -1000;
|
||||||
|
}
|
||||||
|
if (engineConfiguration->alternator_iTermMax == 0) {
|
||||||
|
engineConfiguration->alternator_iTermMax = 1000;
|
||||||
|
}
|
||||||
|
|
||||||
ensureArrayIsAscending("Injector deadtime", engineConfiguration->injector.battLagCorrBins);
|
ensureArrayIsAscending("Injector deadtime", engineConfiguration->injector.battLagCorrBins);
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
|
|
Loading…
Reference in New Issue