Fermentation Temp overshoot on temp change

Hi,
I’ve been using the new Brewpi since before the update to the internal state machine. Since the update (0.4.3) I’m seeing quite a big of overshoot when the initial temperature is set and on subsequent changes. Any ideas what changes I need to make to the PID values for the various actuators? Currently using all defaults.

In the example below, I start at 19C, raise to 20 after 4 days, then subsequently raise to 20.2 and 20.4 to try and minimise the swing.

Environment
Fridge with ceremic 40W heating bar.

Graph


Configuration

{
  "kind": "Control",
  "pids": [
    {
      "kind": "Pid",
      "name": "heater1",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 9
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 23.25,
            "connected": true,
            "address": "280FD4730600008A",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": 14.25,
      "Kp": 10,
      "Ti": 600,
      "Td": 0,
      "p": -142.5,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorPin",
            "state": false,
            "pin": 10,
            "invert": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "heater2",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer2set",
        "value": null
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer2",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 22.3125,
          "connected": true,
          "address": "2814A273060000D8",
          "calibrationOffset": 0
        }
      },
      "inputError": null,
      "Kp": 10,
      "Ti": 600,
      "Td": 0,
      "p": 0,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 0,
        "period": 4,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorNop",
            "state": false
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "cooler",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "fridgeset",
        "value": 9
      },
      "inputSensor": {
        "kind": "TempSensorFallback",
        "onBackupSensor": false,
        "sensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 23.25,
            "connected": true,
            "address": "280FD4730600008A",
            "calibrationOffset": 0
          }
        }
      },
      "inputError": 14.25,
      "Kp": 10,
      "Ti": 1800,
      "Td": 0,
      "p": -142.5,
      "i": 0,
      "d": 0,
      "actuatorIsNegative": true,
      "outputActuator": {
        "kind": "ActuatorPwm",
        "value": 100,
        "period": 1200,
        "minVal": 0,
        "maxVal": 100,
        "target": {
          "kind": "ActuatorMutexDriver",
          "mutexGroup": {
            "kind": "ActuatorMutexGroup",
            "deadTime": 1800000,
            "waitTime": 0
          },
          "target": {
            "kind": "ActuatorTimeLimited",
            "minOnTime": 120,
            "minOffTime": 180,
            "maxOnTime": 65535,
            "state": false,
            "target": {
              "kind": "ActuatorPin",
              "state": false,
              "pin": 11,
              "invert": false
            }
          }
        }
      }
    },
    {
      "kind": "Pid",
      "name": "beer2fridge",
      "enabled": true,
      "setPoint": {
        "kind": "SetPointSimple",
        "name": "beer1set",
        "value": 19
      },
      "inputSensor": {
        "kind": "TempSensor",
        "name": "beer1",
        "sensor": {
          "kind": "OneWireTempSensor",
          "value": 24.5625,
          "connected": true,
          "address": "28389573060000C6",
          "calibrationOffset": 0
        }
      },
      "inputError": 5.7148,
      "Kp": 2,
      "Ti": 7200,
      "Td": 0,
      "p": -11.4297,
      "i": -0.0078,
      "d": 0,
      "actuatorIsNegative": false,
      "outputActuator": {
        "kind": "ActuatorSetPoint",
        "targetSetPoint": {
          "kind": "SetPointSimple",
          "name": "fridgeset",
          "value": 9
        },
        "targetSensor": {
          "kind": "TempSensor",
          "name": "fridge",
          "sensor": {
            "kind": "OneWireTempSensor",
            "value": 23.25,
            "connected": true,
            "address": "280FD4730600008A",
            "calibrationOffset": 0
          }
        },
        "referenceSetPoint": {
          "kind": "SetPointSimple",
          "name": "beer1set",
          "value": 19
        },
        "output": -10,
        "achieved": 4.25,
        "minimum": -10,
        "maximum": 10
      }
    }
  ]
}

First, I would try more gradual changes in lieu of steps like you have it set up. For instance, let it slowly ramp from 19 to 20 over 12-24 hrs instead of instantly changing the set point. It’ll be better for the yeast that way too.

Second, I had overshoot issues as well when I got mine up and running this weekend so I increased my B2F derivative filter to 159 and bumped up my Cooling Ti to 3600 and that solved it.

You can follow my troubleshooting process here Compressor shutting off before reaching fridge setpoint

Cheers for the pointers. Normally I use a profile, but forgot to set it up this time and just ramped when I saw fermentation was nearing completion.

I’ll give those tweaks a go and see how the system responds.