Better PID defaults

parent df6dc807
...@@ -220,14 +220,14 @@ ...@@ -220,14 +220,14 @@
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis) // all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
// setting this to anything other than 255 enables a form of PWM to the bed, // setting this to anything other than 255 enables a form of PWM to the bed,
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPCOOLER) // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPCOOLER)
#define MAX_COOLER_POWER 255 // limits duty cycle to bed; 255=full current #define MAX_COOLER_POWER 200 // limits duty cycle to bed; 255=full current, save PEC life by setting max to 200
#define PID_COOLER_INTEGRAL_DRIVE_MAX MAX_COOLER_POWER // limit for the integral term #define PID_COOLER_INTEGRAL_DRIVE_MAX MAX_COOLER_POWER // limit for the integral term
// 120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) // 120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_coolerKp 10.00 #define DEFAULT_coolerKp 40.00
#define DEFAULT_coolerKi .023 #define DEFAULT_coolerKi .3
#define DEFAULT_coolerKd 305.4 #define DEFAULT_coolerKd 50.4
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
......
...@@ -836,7 +836,6 @@ float get_pid_output(int h) { ...@@ -836,7 +836,6 @@ float get_pid_output(int h) {
if (pid_error_cooler < 0) temp_iState_cooler -= pid_error_cooler; // conditional un-integration if (pid_error_cooler < 0) temp_iState_cooler -= pid_error_cooler; // conditional un-integration
pid_output = 0; pid_output = 0;
} }
#endif // PID_OPENLOOP #endif // PID_OPENLOOP
#if ENABLED(PID_COOLER_DEBUG) #if ENABLED(PID_COOLER_DEBUG)
...@@ -848,8 +847,9 @@ float get_pid_output(int h) { ...@@ -848,8 +847,9 @@ float get_pid_output(int h) {
ECHO_EMV(" dTerm ", dTerm_cooler); ECHO_EMV(" dTerm ", dTerm_cooler);
#endif //PID_COOLER_DEBUG #endif //PID_COOLER_DEBUG
return pid_output;
} }
#endif #endif
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment