Alexwijn / SAT

The Smart Autotune Thermostat (SAT) is a custom component for Home Assistant that works with an OpenTherm Gateway (OTGW).
GNU General Public License v3.0
43 stars 8 forks source link

Modulation drops to zero whilst Error is negative #15

Closed ronaldt80 closed 7 months ago

ronaldt80 commented 7 months ago

Probably better to share these graphs here and not on HA forum.

As promised some further graphs. I set aggression to 3, overshoot to 30. To note, until 7am the heat pump was in night mode, capping max output to 50% (noise reduction). Second chance in error is when one of the rooms requests heat (my office).

Two things which are noticeable, the modulation drops to zero when there is a change in setpoint/ significant change in error value and the heat setpoint is much lower at first but increases dramatically when my office valve is activated.

To understand, the other rooms, how do they weigh into the equation? Are all rooms equal or is the main thermostat more/less important? And Moreover, what would explain the modulation drops?

Screenshot_20231124-073020 Screenshot_20231124-073101 Screenshot_20231124-073020

ronaldt80 commented 7 months ago

And the state, oddly the office temperature is 14 in the state attribute

Screenshot_20231124-074451

sergeantd83 commented 7 months ago

Hi Ronald,

This is probably caused by a feature for smooth start of a gas boiler. When we initially send the heating commands for 2-3 minutes we manipulate the Max modulation level to 0%, this operation provides a pre-heating period for boiler / heat pump components. Then we restore accordingly. Can you please provide some more graphs? a. Relative Modulation Level b. OTGW Control Setpoint c. Your heatpump current electrical consumption

P.S I strongly believe that your minimum_setpoint is much less that the value 30. Maybe it is closer to 20-25, at least for these outside temperature values ( Higher COP ).

Thanks for your help, George

sergeantd83 commented 7 months ago

Also I noticed a weird behavior of the error value.Do you rely on a zigbee temperature sensor that doesn’t provide frequent state updates? This will cause a significant change of the derivative value of the algorithm.

ronaldt80 commented 7 months ago

The temperature sensor is built into the valves Homematic - there is a delay in updating. Can I replace the valve sensor by another type of sensor?

ronaldt80 commented 7 months ago

As requested, two screenshots. Observation, the modulation to zero takes place every time the error value changes. Don't think this adds to the performance as the Ta and Te immediately drop.

I will try to reduce the minimum set point tomorrow..

As for the temperature sensors, which brand do you use? My system seems to limit the duty cycle to avoid choking the radio signal.

Screenshot_20231124-195909 Screenshot_20231124-195748

sergeantd83 commented 7 months ago

As for the temperature sensors, which brand do you use?

You can buy an esp32, 2 ble sensors and put them in your main room, then you can create a median sensor of these two values. You can see some examples on esphome website ( https://esphome.io/components/sensor/xiaomi_ble ) or hook a temperature sensor on a esp32 or esp8266 ( Instructions are also available on esphome website ). Using external temperature sensors you will ensure that the room temperature is reported correctly, will not cause huge spikes and the derivative part won’t go crazy from the huge error state changes. So my guess is that your inside temperature sensor doesn’t report correct values.

ronaldt80 commented 7 months ago

Ok, so with Bluetooth proxy, that's not an issue, have that running already. Could be indeed, there is a bit of a delta between my other temp sensors.

But that doesn't solve the modulation issue. When I opened the valves of the kids room the error increased, set point increased (so far so good) and modulation went to zero. This happened 3 times making the room temp drop - so in the interest of peace I disabled the integration again 😄

sergeantd83 commented 7 months ago

But that doesn't solve the modulation issue. When I opened the valves of the kids room the error increased, set point increased (so far so good) and modulation went to zero

That’s odd. While initial configuration process did you ONLY add in main climate field the main climate entity ( e.g. living room temperature sensor ) or left it blank and all the secondary climate entities in the Rooms section?

ronaldt80 commented 7 months ago

I put living room in main and other climate entities (bedrooms and attic) into rooms section.

ronaldt80 commented 7 months ago

Is it possible to switch this functionality off? Make it optional? My heat pump already has a slow start mechanism. Result of the modulation moving to zero every time the error increases is that I lose momentum - eg Ta drops 4-5 degrees and when heatpump kick in again it builds up slowly.

For the time being removed the integration. Idea is fantastic but can't keep my house at the required temperature at the moment.

sergeantd83 commented 7 months ago

You don’t need to remove SAT integration every time you have an issue. You just can set the SAT thermostat to OFF and then the ON/OFF thermostat will restore its functionality.

PS. I think Alex can take care of this “feature”.

ronaldt80 commented 7 months ago

Great, I actually do need to disable it in order to use otgw :).

I use otgw to cap modulation at 50% when energy tariff is high and boost modulation when energy tariff is low [am using dynamic pricing] - different feature, might be interesting to look into as well in the future:)

ronaldt80 commented 7 months ago

Another interesting discovery (from a theoretical physics perspective obvious but took some time to sink in).

With current temperature the heatpump freezes resulting in a defrost cycle. If operating at high power these defrost cycles occur much more frequent Vs. Low power. Down side is ofcourse a lower Ta, ultimately though I think it's better from an efficiency perspective.

I used otgw to cap the maximum relative modulation (now at 70%). Would be good if through SAT we could still invoke this (seeing running OTGW and SAT in parallel is not possible).

Totally different approach, gas heating vs. heat pump. Discovering new things every day 😄

sergeantd83 commented 7 months ago

Maybe it is useful to look at OTGW-firmware elga-ace-monitoring channel in discord. https://discord.gg/ad5aAWYW

sergeantd83 commented 7 months ago

I used otgw to cap the maximum relative modulation (now at 70%). Would be good if through SAT we could still invoke this (seeing running OTGW and SAT in parallel is not possible).

The latest develop version includes this feature. If you want to test it, you need to go to Integrations -> SAT -> Configure -> Advanced -> Maximum Relative Modulation slider. Thanks for the recommendation.

ronaldt80 commented 7 months ago

Thanks! Need to wait for the weather to improve a bit, the heat pump is having difficulty to heat the house as it is.

ronaldt80 commented 7 months ago

Hi, I installed it but get an error message.

This error originated from a custom integration.

Logger: pyotgw.pyotgw
Source: custom_components/sat/serial/__init__.py:186
Integration: Smart Autotune Thermostat (documentation, issues)
First occurred: 13:49:23 (30 occurrences)
Last logged: 13:54:53

Command MM with value 70.0 raised exception: Syntax Error: The command contained an unexpected character or was incomplete.
Alexwijn commented 7 months ago

Hmm...seems like the serial variant also don't like decimals.

ronaldt80 commented 7 months ago

That would not surprise me, for the modulation I always send a round number. Setpoint (domestic hot water, heating) can hold a decimal.

ronaldt80 commented 7 months ago

Capping the modulation (max modulation) now works accordingly; will for sure help when temperature is increasing again :)

But what's still happening though is the sudden drop in modulation to zero when the error increases, either as a consequence of main climate or any of the rooms. Is it possible to turn this feature off?

ronaldt80 commented 7 months ago

Here another example of what happens. For some reason the control setpoint was lowered as well to a very low temperature for an hour.

Dont have anything in the logs. Let me know if you need anything else to help. Behavior is quite weird, yesterday the integration performed well and this morning i noticed a cold house and inactive heatpump; acting on instructions though to keep Ta very low.. any idea what triggers this?

I increased aggressiveness to 5 as otherwise Ta would not substantially increase. Heatcurve is around 25, is that normal?

Screenshot_20231204-080052 Screenshot_20231204-075941

ronaldt80 commented 7 months ago

Any thoughts based on below why my modulation remains 0? Ta is 29, set point 38. Error 0.8...

hvac_modes:
  - "off"
  - heat
min_temp: 7
max_temp: 35
target_temp_step: 0.5
preset_modes:
  - none
  - activity
  - away
  - home
  - sleep
  - comfort
current_temperature: 20.2
temperature: 21
current_humidity: 50.4
hvac_action: heating
preset_mode: comfort
error: 0.8
integral: 0
derivative: 0
proportional: 23.918
history_size: 2
collected_errors: 0
integral_enabled: false
pre_custom_temperature: 20.5
pre_activity_temperature: null
derivative_enabled: true
derivative_raw: 0
current_kp: 29.898
current_ki: 0.000409
current_kd: 53997.6
rooms:
  climate.radiator_sophia: 15
  climate.radiator_emilia: 15
  climate.radiator_attic_tvroom: 14
  climate.radiator_attic_guestroom: 14
  climate.bedroom: 17.5
setpoint: 38
summer_simmer_index: 22.7
summer_simmer_perception: Slightly Cool
warming_up_data:
  error: 0.8
  started: 3480996.650287125
warming_up_derivative: 74.39
valves_open: true
heating_curve: 30.8
minimum_setpoint: 28
requested_setpoint: 54.718
adjusted_minimum_setpoint: 35.1
adjusted_minimum_setpoints:
  221764976efe04132774d96b0253cc31434c5261737469324f222621baf34b20:
    "32.1":
      errors:
        - 0.3
      timestamp: 1702117152
      value: 33.4
    "31.6":
      errors:
        - 0.3
      timestamp: 1702117164
      value: 33.4
    "31.1":
      errors:
        - 0.3
      timestamp: 1702119384
      value: 32.3
    "31.1015625":
      errors:
        - 0.3
      timestamp: 1702118087
      value: 32.7
  f3e360d89952f40d3b79d0b07dd0b94f1cbf9017cba5d2a5f8128e4146d6e3c1:
    "33.2":
      errors:
        - 0.4
      timestamp: 1702126824
      value: 33.1
    "33.7":
      errors:
        - 0.4
      timestamp: 1702127274
      value: 33.4
  44896b09365746b5f7167ee4d64988a38f7f4628803cbf86224e74eeb7c69e9d:
    "31.0":
      errors:
        - 0.2
      timestamp: 1702145545
      value: 32.8
    "30.0":
      errors:
        - 0.2
      timestamp: 1702145575
      value: 32.8
    "29.0":
      errors:
        - 0.2
      timestamp: 1702145605
      value: 32.8
    "27.9":
      errors:
        - 0.2
      timestamp: 1702145635
      value: 32.8
    "28.0":
      errors:
        - 0.2
      timestamp: 1702150845
      value: 29.8
  d2cbad71ff333de67d07ec676e352ab7f38248eb69c942950157220607c55e84:
    "30.8":
      errors:
        - 0.5
      timestamp: 1702151798
      value: 30.6
    "32.2":
      errors:
        - 0.5
      timestamp: 1702151800
      value: 30.9
    "33.6":
      errors:
        - 0.5
      timestamp: 1702151825
      value: 31.3
    "35.0":
      errors:
        - 0.5
      timestamp: 1702153480
      value: 34.2
    "34.9":
      errors:
        - 0.5
      timestamp: 1702153868
      value: 34.2
    "34.8":
      errors:
        - 0.5
      timestamp: 1702153902
      value: 34.2
    "38.0":
      errors:
        - 0.5
      timestamp: 1702154037
      value: 37.1
  1e9d7c27c8bbc8ddf0055c93e064a62fa995d177fee28cc8fa949bc8a4db06f4:
    "50.4":
      errors:
        - 0.8
      timestamp: 1702154239
      value: 48.5
    "51.6":
      errors:
        - 0.8
      timestamp: 1702154250
      value: 48.7
    "52.2":
      errors:
        - 0.8
      timestamp: 1702154265
      value: 48.9
    "53.2":
      errors:
        - 0.8
      timestamp: 1702154269
      value: 49.3
    "54.1":
      errors:
        - 0.8
      timestamp: 1702154299
      value: 49.8
    "55.0":
      errors:
        - 0.8
      timestamp: 1702154305
      value: 50.3
    "38.0":
      errors:
        - 0.8
      timestamp: 1702155840
      value: 37.1
outside_temperature: 9.9
optimal_coefficient: 1.8
coefficient_derivative: 0
relative_modulation_value: 0
relative_modulation_state: warming_up
relative_modulation_enabled: false
pulse_width_modulation_enabled: false
pulse_width_modulation_state: idle
pulse_width_modulation_duty_cycle: null
friendly_name: Living Room
supported_features: 17
Alexwijn commented 7 months ago

Because you are warming up, the first 3 minutes it will do that after a preset / setpoint change.

relative_modulation_state: warming_up

ronaldt80 commented 7 months ago

Ok. Can i disable that? 15 minutes is way too long - gradual heatup is built in. Ta temperature drops and like this only after 15 minutes the heatpump will gradually increase its temperature.