thermferm/thermferm.c

changeset 310
53774295e14a
parent 309
c0dc3cd97fa4
child 311
f3b0e9ac9bcb
--- a/thermferm/thermferm.c	Sun Feb 15 18:21:20 2015 +0100
+++ b/thermferm/thermferm.c	Sun Feb 15 20:38:54 2015 +0100
@@ -1338,8 +1338,13 @@
 
 			/*
 			 * A postive value means heating, a negative value cooling.
+			 * Start with Kp, Kd and Ki set to 0.
+			 * Increase Kp until small oscillation.
+			 * Increase Kd until a little damping.
+			 * Increase Ki after Kp and Kd are set until longterm convergence.
 			 */
-			Out = (10.0*P_err) + (0.1*unit->PID_I_err) + (5*D_err);
+			Out = (10.0*P_err) + (0.0*unit->PID_I_err) + (0.0*D_err);
+			//Out = (10.0*P_err) + (0.1*unit->PID_I_err) + (5*D_err);
 			//     Kp 0.1        Ki 0.3                   Kd 0.02
 			if (err != 0.0) {
 			    if (debug)

mercurial