Skip to content

Commit ec0eb4c

Browse files
committed
Update Class.J_HeatingManagementHeatpumpOffPeak.java
1 parent 3df6a89 commit ec0eb4c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

_alp/Classes/Class.J_HeatingManagementHeatpumpOffPeak.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public class J_HeatingManagementHeatpumpOffPeak implements I_HeatingManagement {
2626
private J_HeatingPreferences heatingPreferences;
2727

2828
// PI control gains
29-
private double P_gain_kWpDegC = 1;
30-
private double I_gain_kWphDegC = 0.1;
29+
private double P_gain_kWpDegC = 1*3;
30+
private double I_gain_kWphDegC = 0.1*3;
3131
private double I_state_hDegC = 0;
3232
private double timeStep_h;
3333

@@ -75,11 +75,13 @@ public void manageHeating() {
7575
boolean timeIsInReducedHeatingInterval = ((timeOfDay_h - startTimeOfReducedHeatingInterval_hr + 24) % 24) < reducedHeatingIntervalLength_hr;
7676
boolean timeIsInPreheatInterval = ((timeOfDay_h - (startTimeOfReducedHeatingInterval_hr - preHeatDuration_hr) + 24) % 24) < preHeatDuration_hr;
7777

78+
double startTimePreheatTime_hr = startTimeOfReducedHeatingInterval_hr - preHeatDuration_hr;
7879

7980
//Get the current temperature setpoint dependend on day/night time and noheat/preheat interval settings
8081
double currentSetpoint_degC = heatingPreferences.getDayTimeSetPoint_degC();
81-
if(timeIsInPreheatInterval) {
82-
currentSetpoint_degC = requiredTemperatureAtStartOfReducedHeatingInterval_degC;
82+
if(timeIsInPreheatInterval) { // During preheat interval, raise the setpoint temperature step by step, to prevent overreaction by the controller
83+
currentSetpoint_degC = heatingPreferences.getDayTimeSetPoint_degC() + (requiredTemperatureAtStartOfReducedHeatingInterval_degC - heatingPreferences.getDayTimeSetPoint_degC()) * (timeOfDay_h + timeStep_h - startTimePreheatTime_hr)/preHeatDuration_hr;
84+
8385
}
8486
else if(timeIsInReducedHeatingInterval) {
8587
currentSetpoint_degC = heatingPreferences.getMinComfortTemperature_degC(); // -> prevents fast response during interval if min comfort is breached

0 commit comments

Comments
 (0)