Ok, so I tried setting BtF Kp to 10 but it doesn’t seem to have made an appreciable difference to the overshoot. Or maybe it did a little.
The beer tracks the set point really well once it reaches it but that takes around 7 - 8 hours.
I would love some help with these settings Elco? I’ve been researching how to tune PID’s but it’s very complicated.
This was last nights test. Changing the mas diff setting to 20 allowed the freezer to get much colder which helped with how quickly it could cool the 35 litre’s of water i have in there.
I am curious though about why it turned the cooling off several times well before the freezer reached set point. This prevented it from ever reaching the coldest set point.
Zooming in on the interesting parts, there are a couple of things i’m curious about how to fix.
Firstly, the fridge didnt track the set point very well. It started over and then ended up under, basically tracking a shallower curve than the set point.
Just before 11:30 the defrost cycle ran, so there is a cooling period there where it didint actually cool, but if it had, it would have remained under set point for longer.
The other thing which is the same issue as the first trial, is how long it took the fridge set point to get above beer temp, even after beer reached set point?
My first test also had a much smoother fridge set point but not sure if that makes much difference to the process.
In this test the overshoot was a bit over .62 degrees and took a bit over 3 hours to get back on track.
I guess lastly, i’m also curious about why it fires the heater at this point, when the fridge temp is fairly quickly tracking toward the set point, and then is over it for the rest of the time. I dont actually have a heater in the setup yet. Being summer in Australia now it’s probably not necessary at this point.
Below are my current settings. I would love some help with this.
"kind": "Control",
"pids": [
{
"kind": "Pid",
"name": "heater1pid",
"enabled": true,
"input": {
"kind": "SensorSetPointPair",
"sensor": {
"kind": "TempSensorFallback",
"onBackupSensor": false,
"sensor": {
"kind": "TempSensorDelegate",
"name": "fridge",
"delegate": {
"kind": "OneWireTempSensor",
"value": 10.0625,
"connected": true,
"address": "28AF3606090000F9",
"calibrationOffset": 0
}
}
},
"setPoint": {
"kind": "SetPointSimple",
"name": "fridgeset",
"value": 10.0234
}
},
"output": {
"kind": "ActuatorPwm",
"dutySetting": 0,
"period": 4,
"minVal": 0,
"maxVal": 100,
"target": {
"kind": "ActuatorMutexDriver",
"mutexGroup": {
"kind": "ActuatorMutexGroup",
"deadTime": 1800000,
"waitTime": 813197
},
"target": {
"kind": "ActuatorDigitalDelegate",
"name": "heater1",
"delegate": {
"kind": "ActuatorPin",
"state": false,
"pin": 24,
"invert": false
}
}
}
},
"inputError": 0.0234,
"Kp": 10,
"Ti": 600,
"Td": 60,
"p": -0.2344,
"i": 0.2813,
"d": -2.0313,
"actuatorIsNegative": false
},
{
"kind": "Pid",
"name": "heater2pid",
"enabled": true,
"input": {
"kind": "SensorSetPointPair",
"sensor": {
"kind": "TempSensorDelegate",
"name": "beer2",
"delegate": {
"kind": "TempSensorDisconnected",
"value": null,
"connected": false
}
},
"setPoint": {
"kind": "SetPointSimple",
"name": "beer2set",
"value": null
}
},
"output": {
"kind": "ActuatorPwm",
"dutySetting": 0,
"period": 4,
"minVal": 0,
"maxVal": 100,
"target": {
"kind": "ActuatorMutexDriver",
"mutexGroup": {
"kind": "ActuatorMutexGroup",
"deadTime": 1800000,
"waitTime": 813179
},
"target": {
"kind": "ActuatorDigitalDelegate",
"name": "heater2",
"delegate": {
"kind": "ActuatorNop",
"state": false
}
}
}
},
"inputError": null,
"Kp": 10,
"Ti": 600,
"Td": 60,
"p": 0,
"i": 0,
"d": 0,
"actuatorIsNegative": false
},
{
"kind": "Pid",
"name": "coolerpid",
"enabled": true,
"input": {
"kind": "SensorSetPointPair",
"sensor": {
"kind": "TempSensorFallback",
"onBackupSensor": false,
"sensor": {
"kind": "TempSensorDelegate",
"name": "fridge",
"delegate": {
"kind": "OneWireTempSensor",
"value": 10.0625,
"connected": true,
"address": "28AF3606090000F9",
"calibrationOffset": 0
}
}
},
"setPoint": {
"kind": "SetPointSimple",
"name": "fridgeset",
"value": 10.0234
}
},
"output": {
"kind": "ActuatorPwm",
"dutySetting": 13.1602,
"period": 1200,
"minVal": 0,
"maxVal": 100,
"target": {
"kind": "ActuatorMutexDriver",
"mutexGroup": {
"kind": "ActuatorMutexGroup",
"deadTime": 1800000,
"waitTime": 813160
},
"target": {
"kind": "ActuatorTimeLimited",
"minOnTime": 300,
"minOffTime": 900,
"maxOnTime": 65535,
"state": false,
"target": {
"kind": "ActuatorDigitalDelegate",
"name": "cooler",
"delegate": {
"kind": "ActuatorPin",
"state": false,
"pin": 25,
"invert": false
}
}
}
}
},
"inputError": 0.0234,
"Kp": 10,
"Ti": 1800,
"Td": 200,
"p": -0.2344,
"i": -6.168,
"d": -6.7578,
"actuatorIsNegative": true
},
{
"kind": "Pid",
"name": "beer2fridgepid",
"enabled": true,
"input": {
"kind": "SensorSetPointPair",
"sensor": {
"kind": "TempSensorDelegate",
"name": "beer1",
"delegate": {
"kind": "OneWireTempSensor",
"value": 10,
"connected": true,
"address": "2895A160090000A4",
"calibrationOffset": 0
}
},
"setPoint": {
"kind": "SetPointSimple",
"name": "beer1set",
"value": 10
}
},
"output": {
"kind": "ActuatorOffset",
"target": {
"kind": "SensorSetPointPair",
"sensor": {
"kind": "TempSensorFallback",
"onBackupSensor": false,
"sensor": {
"kind": "TempSensorDelegate",
"name": "fridge",
"delegate": {
"kind": "OneWireTempSensor",
"value": 10.0625,
"connected": true,
"address": "28AF3606090000F9",
"calibrationOffset": 0
}
}
},
"setPoint": {
"kind": "SetPointSimple",
"name": "fridgeset",
"value": 10.0234
}
},
"reference": {
"kind": "SensorSetPointPair",
"sensor": {
"kind": "TempSensorDelegate",
"name": "beer1",
"delegate": {
"kind": "OneWireTempSensor",
"value": 10,
"connected": true,
"address": "2895A160090000A4",
"calibrationOffset": 0
}
},
"setPoint": {
"kind": "SetPointSimple",
"name": "beer1set",
"value": 10
}
},
"useReferenceValue": false,
"setting": 0.0234,
"achieved": 0.0625,
"minimum": -20,
"maximum": 20
},
"inputError": 0,
"Kp": 10,
"Ti": 7200,
"Td": 1200,
"p": 0,
"i": -0.0156,
"d": 0.0391,
"actuatorIsNegative": false
}
]
}```