diff --git a/css/style.css b/css/style.css index f50bd71..6d2f9bb 100644 --- a/css/style.css +++ b/css/style.css @@ -380,6 +380,10 @@ button#maintenance{ color: #555; } +#maintenance-panel .ui-widget-content { + font-family: Verdana, Arial, sans-serif; +} + #maintenance-panel .device-container .device-setting-container{ width: 150px; padding: 5px; diff --git a/maintenance-panel.php b/maintenance-panel.php index 97f86c6..9e97504 100644 --- a/maintenance-panel.php +++ b/maintenance-panel.php @@ -199,169 +199,210 @@ function echoRotarySelect($optionName){ + +

+ This release runs on 3 PIDs (heater 2 is not used right now). + The Heater 1 and Cooler PIDs take the fridge temperature as input and each drive a PWM actuator independently. + However, only one actuator can be active at any time, with a dead time of 30 minutes for switching. + Only the actuator with the highest value is activated, to prevent heating and cooling at the same time. +

+

+ When running in beer constant or profile mode, the Beer-to-Fridge PID determines the fridge setpoint. + The PID output is added to the beer setting to give a fridge setting. +

+

+ Actuators are driven with PWM. + For the cooler output, the compressor is guarded by minimum ON and OFF times. + For PWM values below the minimum ON time, the PWM actuator will start skipping cycles to achieve the correct average. +

+
+
- Temperature setting minimum - The fridge and beer temperatures cannot go below this value. - + Beer-to-Fridge proportional gain (Kp) + Actuatour output in % = Kp * input error +
- Temperature setting maximum - The fridge and beer temperatures cannot go above this value. - + Beer-to-Fridge integral time constant (Ti) + The input error is slowly accumulated in the integrator. The integral part of PID is Kp * 1/Ti * integral. + A steady state error that is not corrected by Kp, is corrected by the integral in Ti seconds. + If you set it too high, it will create overshoot. Be conservative. + +
- The fridge temperature is controlled with PID. The fridge setting = beer setting + PID. - The proportional part is linear with the temperature error. - The integral part slowly increases when an error stays present, this prevents steady state errors. - The derivative part is in the opposite direction to the proportional part. This prevents overshoot: it lowers the PID value when there's 'momentum' in the right direction. -
- PID: Kp - The beer temperature error is multiplied by Kp to give the proportional part of the PID value. - + Beer-to-Fridge derivative time constant (Td) + The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. + This can be interpreted as looking Td seconds ahead. + For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. + The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature. + +
+
- PID: Ki - When the integral is active, the error is added to the integral every 30 seconds. The result is multiplied by Ki to give the integral part. - + Beer-to-Fridge Input filter delay time + Input to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering. +
- PID: Kd - The derivative of the beer temperature is multiplied by Kd to give the derivative part of the PID value. - + Beer-to-Fridge Derivative filter delay time + Input to the differential gain is filtered, to prevent bit flips from causing a high derivative. + This causes a delay, because of the moving average. More delay means more filtering. +
+
- PID: maximum - You can define the maximum difference between the beer temp setting and fridge temp setting here. The fridge setting will be clipped to this range. - + Cooler proportional gain (Kp) + Actuatour output in % = Kp * input error +
- - In this temporary, untested PWM actuators release, the Fridge actuators are controlled by a simple PI controller to generate a PWM value. - Each actuator has its own proportional gain (Kp) and integral gain (Ki). Adjust Kp so it does not overshoot too much and adjust Ki to adjust how fast it responds to steady state errors. - PWM output (0-255) = Kp * (fridge setting - fridge temp) + Ki * (cumulative sum of errors, per minute). - Overshoot can result from both too high Kp or too high Ki. -
- Heating proportional gain (KpHeat) - Output is simply error * KpHeat - + Cooler integral time constant (Ti) + The input error is slowly accumulated in the integrator. The integral part of PID is Kp * 1/Ti * integral. + A steady state error that is not corrected by Kp, is corrected by the integral in Ti seconds. + If you set it too high, it will create overshoot. Be conservative. + +
- Heating integral gain (KiHeat) - Output is cumulative error * KiHeat. - + Cooler derivative time constant (Td) + The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. + This can be interpreted as looking Td seconds ahead. + For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. + The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature. + +
- Cooling proportional gain (KpCool) - Output is simply error * KpCool - + Cooler PWM period (seconds) + Each PWM cycle takes this many seconds. A value lower than 4 seconds is not recommended. +
- Cooling integral gain (KiCool) - Output is cumulative error * KiCool. - + Cooler minimum OFF time + A fridge compressor needs to be OFF for a minimum time to protect it from building up pressure and overheating. +
- Heater PWM period (seconds) - Each PWM cycle takes this many seconds for the heaters. A value lower than 4 seconds is not recommended. - Requires restart of controller (reset) to apply change. - + Cooler minimum ON time + A minimum ON time is also recommended, because many short cycles limit the compressor lifespan. +
- Cooler PWM period (seconds) - Each PWM cycle takes this many seconds for the cooler. - Because most people will use a fridge or freezer, the cooler has a minimum ON time of 2 minutes and a minimum OFF time of 5 minutes. - This is needed to protect the compressor from overheating. The PWM driver will maintain the correct average despite of this by compensating in the next cycle. - Because of these hard coded mininum times, a period of less than 10 minutes (600 seconds) is not recommended. - Requires restart of controller (reset) to apply change. - - + Cooler Input filter delay time + Input to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering. +
- Cooler minimum ON time (seconds) - - Once the compressor is turned ON, it will be ON for minimally this period, regardless of the PWM value. Requires restart of controller (reset) to apply change. - - + Cooler Derivative filter delay time + Input to the differential gain is filtered, to prevent bit flips from causing a high derivative. + This causes a delay, because of the moving average. More delay means more filtering. +
+
- Cooler minimum OFF time (seconds) - - Once the compressor is turned OFF, it will be OFF for minimally this period, regardless of the PWM value. - The OFF time is needed to equalize the pressure. This is needed to protect the compressor from overheating. - Do not lower this below 180 (3 minutes). Requires restart of controller (reset) to apply change. - - + Heater 1 proportional gain (Kp) + Actuatour output in % = Kp * input error + + +
+
+ Heater 1 integral time constant (Ti) + The input error is slowly accumulated in the integrator. The integral part of PID is Kp * 1/Ti * integral. + A steady state error that is not corrected by Kp, is corrected by the integral in Ti seconds. + If you set it too high, it will create overshoot. Be conservative. + + + +
+
+ Heater 1 derivative time constant (Td) + The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. + This can be interpreted as looking Td seconds ahead. + For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. + The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature. + + + +
+
+ Heater 1 PWM period (seconds) + Each PWM cycle takes this many seconds. A value lower than 4 seconds is not recommended. +
- - Temperatures are filtered in BrewPi. You can adjust the amount of filtering here. But keep in mind that more filtering also causes a lag (delay) in the sensor readings. -
- Beer fast filter delay time - The beer fast filter is used for display and data logging. More filtering give a smoother line, but also more delay. - + Heater 1 Input filter delay time + Input to the PID is filtered. This causes a delay, because of the moving average. More delay means more filtering. +
- Beer slow filter delay time - The beer slow filter is used for the control algorithm. The fridge temperature setting is calculated from this filter. - Because a small difference in beer temperature causes a large adjustment in the fridge temperature, more smoothing is needed. - + Heater 1 Derivative filter delay time + Input to the differential gain is filtered, to prevent bit flips from causing a high derivative. + This causes a delay, because of the moving average. More delay means more filtering. +
+
- Beer slope filter delay time - The slope is calculated as slope per hour. More filtering means a smoother fridge setting. - + Heater 2 proportional gain (Kp) + Actuatour output in % = Kp * input error +
- Fridge fast filter delay time - The fridge fast filter is used for on-off control, display and logging. It needs to have a small delay. - + Heater 2 integral time constant (Ti) + The input error is slowly accumulated in the integrator. The integral part of PID is Kp * 1/Ti * integral. + A steady state error that is not corrected by Kp, is corrected by the integral in Ti seconds. + If you set it too high, it will create overshoot. Be conservative. + +
- Fridge slow filter delay time - The fridge slow filter is used for peak detection to adjust the overshoot estimators. - More smoothing is needed to prevent small fluctuations to be recognized as peaks. - Does not apply to the PWM Actuators code. - - + Heater 2 derivative time constant (Td) + The derivative is the temperature difference per second. The derivative part of PID is -Kp * Td * dT/dt. + This can be interpreted as looking Td seconds ahead. + For very slow processes (like fermentation), it is recommended to disable the derivative gain by setting it to zero. + The limited sensor resolution will make it hard to distinguish bit flips from rises in temperature. + +
- Fridge slope filter delay time - The fridge slope filter is not used in the current version. - + Heater 2 PWM period (seconds) + Each PWM cycle takes this many seconds. A value lower than 4 seconds is not recommended. +
-