heater.c, config.default.h: Make PID_CONDITIONAL_INTEGRATION non-optional.
See https://github.com/Traumflug/Teacup_Firmware/issues/74#issuecomment-38999466
This commit is contained in:
parent
23679855a0
commit
c35d1c1caf
|
|
@ -481,14 +481,6 @@ BANG_BANG_OFF
|
|||
PWM value for 'off'
|
||||
*/
|
||||
// #define BANG_BANG_OFF 45
|
||||
/** \def PID_CONDITIONAL_INTEGRATION
|
||||
PID_CONDITIONAL_INTEGRATION
|
||||
Controls 'integral windup' by preventing the integral term from accumulating error if the heater output is saturated high/low by
|
||||
the other terms in the PID calculation. This is in addition to M133/I_LIMIT mechanism, and can help prevent overshoot in cases of
|
||||
large setpoint changes which may overfill the integral term.
|
||||
Costs 50 bytes.
|
||||
*/
|
||||
//#define PID_CONDITIONAL_INTEGRATION
|
||||
|
||||
/**
|
||||
move buffer size, in number of moves
|
||||
|
|
|
|||
4
heater.c
4
heater.c
|
|
@ -330,17 +330,13 @@ void heater_tick(heater_t h, temp_type_t type, uint16_t current_temp, uint16_t t
|
|||
|
||||
// rebase and limit factors
|
||||
if (pid_output_intermed > 255) {
|
||||
#ifdef PID_CONDITIONAL_INTEGRATION
|
||||
if (t_error > 0)
|
||||
heaters_runtime[h].heater_i -= t_error; // un-integrate
|
||||
#endif
|
||||
pid_output = 255;
|
||||
}
|
||||
else if (pid_output_intermed < 0) {
|
||||
#ifdef PID_CONDITIONAL_INTEGRATION
|
||||
if (t_error < 0)
|
||||
heaters_runtime[h].heater_i -= t_error; // un-integrate
|
||||
#endif
|
||||
pid_output = 0;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue