This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

PID Problem
#2
So I've changed the script a bit, it now looks like this:

Code:
local P_value     =     6
local I_value     =     150
local kp_value     =     0.16
local ki_value    =     0.0017

if not P then
 
P = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_P_Output',
    kp                     =     kp_value,
    ki                     =     0,
    kd                     =     0
})

PI = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PI_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0
})
 
PID1 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID1_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.1
})
 
PID2 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID2_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.2
}) 

PID3 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID3_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.3
}) 
   
PID4 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID4_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.4
})
 
PID5 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID5_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.5
})
 
PID6 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID6_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.6
})
 
PID7 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID7_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.7
})
 
PID8 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID8_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.8
})
 
PID9 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID9_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     0.9
})
 
PID10 = PID:init({
    current         =     'RTC05_Current_Temperature',
    setpoint         =     'RTC05_Setpoint_Temperature_Status',
    output             =     'BD_PID10_Output',
    kp                     =     kp_value,
    ki                     =     ki_value,
    kd                     =     1
})
 
end
 
P:run()
PI:run()
PID1:run()
PID2:run()
PID3:run()
PID4:run()
PID5:run()
PID6:run()
PID7:run()
PID8:run()
PID9:run()
PID10:run()


Setpoint is 23C and current temperature is 22.3C. All controllers give out 0 percent. Why? I have tried enabling/disabling the script, changing kp and ki values with and without calculation formula (example above is without) - didn't help.
Reply


Messages In This Thread
PID Problem - by MantasJ - 13.02.2021, 14:56
RE: PID Problem - by MantasJ - 13.02.2021, 16:11
RE: PID Problem - by admin - 15.02.2021, 10:30
RE: PID Problem - by MantasJ - 15.02.2021, 12:07
RE: PID Problem - by admin - 15.02.2021, 12:25
RE: PID Problem - by MantasJ - 15.02.2021, 12:41
RE: PID Problem - by admin - 15.02.2021, 14:06

Forum Jump: