Lines Matching +full:tuning +full:- +full:step
1 // SPDX-License-Identifier: GPL-2.0-or-later
29 * PID (Proportional-Integral-Derivative) controller is commonly used in
39 * y[k] = y[k-1] - kp*(x[k] - x[k-1]) + Ki*Ts*e[k] - Kd*(x[k]
40 * - 2*x[k-1]+x[k-2])/Ts
46 static double xk_1, xk_2; /* input temperature x[k-#] */
50 * 1. use CPU burn to produce open loop unit step response
51 * 2. calculate PID based on Ziegler-Nichols rule
53 * add a flag for tuning PID
60 /* TODO: get it from TUI tuning tab */ in init_thermal_controller()
73 syslog(LOG_DEBUG, "TC inactive, relax p-state\n"); in controller_reset()
81 * y[k] = y[k-1] - kp*(x[k] - x[k-1]) + Ki*Ts*e[k] - Kd*(x[k]
82 * - 2*x[k-1]+x[k-2])/Ts
91 ek = p_param.t_target - xk; /* error */ in controller_handler()
100 p_term = -p_param.kp * (xk - xk_1); in controller_handler()
102 d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts; in controller_handler()
110 if (*yk < -LIMIT_HIGH) in controller_handler()
111 *yk = -LIMIT_HIGH; in controller_handler()
112 else if (*yk > -LIMIT_LOW) in controller_handler()
113 *yk = -LIMIT_LOW; in controller_handler()