@@ -33,12 +33,12 @@ LOGISTIC_TEMP_CRITICAL=75
3333LOGISTIC_a=1
3434LOGISTIC_b=10
3535# uncomment and edit PID_THERMAL_IDEAL to set a fixed IDEAL temperature for the PID controller;
36- # otherwise, the initial temperature after startup is used as reference.
36+ # otherwise, the initial temperature after startup (+2°C) is used as reference.
3737# PID_THERMAL_IDEAL=45
3838# https://en.wikipedia.org/wiki/PID_controller#Loop_tuning
39- PID_Kp=$(( DEFAULT_PERIOD/ 200 ))
40- PID_Ki=$(( DEFAULT_PERIOD/ 3000 ))
41- PID_Kd=$(( DEFAULT_PERIOD/ 600 ))
39+ PID_Kp=$(( DEFAULT_PERIOD/ 100 ))
40+ PID_Ki=$(( DEFAULT_PERIOD/ 500 ))
41+ PID_Kd=$(( DEFAULT_PERIOD/ 300 ))
4242# path to the pwm dir in the sysfs interface
4343PWMCHIP_ROOT=' /sys/class/pwm/'
4444# path to the thermal dir in the sysfs interface
@@ -283,7 +283,7 @@ function_pid () {
283283controller_pid () {
284284 # i_error cannot be local to be cumulative since it was first declared.
285285 local p_error d_error model duty_cycle
286- p_error=" $(( ${TEMPS[-1]} - ${PID_THERMAL_IDEAL:- $((THERMAL_INITIAL))} )) "
286+ p_error=" $(( ${TEMPS[-1]} - ${PID_THERMAL_IDEAL:- $((THERMAL_INITIAL+2 ))} )) "
287287 i_error=" $(( ${i_error:- 0} + p_error)) "
288288 d_error=" $(( ${TEMPS[-1]} - ${TEMPS[-2]} )) "
289289 # TODO: Kp, Ki, and Kd could be auto tunned here; currently, they are not declared and PID_ vars are used.
0 commit comments