Hello, admin,
Thanks for the response!
What do you mean by kp value too low? As I've mentioned before, I'm trying to achieve (6K/150min) control, which would translate to kp value being 0.16 (1/6K-->0.16), or I'm calculating something wrong?
I've tried putting in kp equal to 1, but all outputs still give out 0. Current temp - 22.5C, setpoint - 23C.
I'm trying to simulate different controls, output isn't connected to valves right now, but I just need some information from trend logs for now.
I also added 1sec delay after each run:
Update: Okay, so I've set ki to 1 aswell, and now PI and PID controllers give out 11 percent, and add 10 percent every minute, which is way too fast. How do I achieve (6K/150min) control? And why P controller still gives out 0?
Thanks for the response!
What do you mean by kp value too low? As I've mentioned before, I'm trying to achieve (6K/150min) control, which would translate to kp value being 0.16 (1/6K-->0.16), or I'm calculating something wrong?
I've tried putting in kp equal to 1, but all outputs still give out 0. Current temp - 22.5C, setpoint - 23C.
I'm trying to simulate different controls, output isn't connected to valves right now, but I just need some information from trend logs for now.
I also added 1sec delay after each run:
Code:
local P_value = 6
local I_value = 150
local kp_value = 1
local ki_value = 0.0017
local delay = 1
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()
os.sleep(delay)
PI:run()
os.sleep(delay)
PID1:run()
os.sleep(delay)
PID2:run()
os.sleep(delay)
PID3:run()
os.sleep(delay)
PID4:run()
os.sleep(delay)
PID5:run()
os.sleep(delay)
PID6:run()
os.sleep(delay)
PID7:run()
os.sleep(delay)
PID8:run()
os.sleep(delay)
PID9:run()
os.sleep(delay)
PID10:run()
Update: Okay, so I've set ki to 1 aswell, and now PI and PID controllers give out 11 percent, and add 10 percent every minute, which is way too fast. How do I achieve (6K/150min) control? And why P controller still gives out 0?