[Custom component] Smart Autotune Thermostat

Here’s an example of the longest cycle I was able to achieve.

Green - flame on
Yellow - relative modulation
Blue - boiler flow temperature

That SAT settings were set as follows:

However, the next cycle was not as long, i.e. the relative modulation curve (yellow) where it goes up and down was not achieved (similar to the previous two cycles on the screenshot).

I run some more tests. My configurations for various scenarios maybe were not as intended by SAT, but it looks like SAT prioritises the precision of being close to the target temperature and prevent overshoot, which means that cycles are shorter than they can be. The screenshot below, between morning and about 4pm, runs shorter cycles but more precise target temperature. After 4pm, I prioritised longer cycles by increasing the coefficient to the maximum and lowering max CH temperature, and it seems to work. However, I needed to add an automation to stop the heat when target temperature was reached.

Here’s another graph from this morning, which prioritises longer cycles, and it’s working well. I can get longer cycles consistently.

Here, you can see, that when a longer cycle is prioritised, the control setpoint is ever so slightly lower than the boiler flow temperature.

Likewise, for the shorter cycle, the boiler flow temperature is ever so slightly below the control setpoint, and causes early termination of the cycle.

So my question is, would be possible (as an option in config) to prioritise longer cycles, and then as a secondary priority, prevent target temperature overshoot?

If I understand correctly, with longer cycles, I get better efficiency overall, because of improved condensation conditions, higher delta, etc.

Some extra screenshots, representing current state

hvac_modes:
  - "off"
  - heat
min_temp: 7
max_temp: 35
target_temp_step: 0.1
preset_modes:
  - none
  - activity
  - away
  - home
  - sleep
  - comfort
current_temperature: 18.4
temperature: 20
current_humidity: 74
hvac_action: heating
preset_mode: home
error: 1.58
integral: 0
derivative: 0
proportional: 112.622
history_size: 63
collected_errors: 1
integral_enabled: false
pre_custom_temperature: 19.7
pre_activity_temperature: null
derivative_enabled: true
derivative_raw: -0.0
current_kp: 71.28
current_ki: 0.000974
current_kd: 128736
rooms: {}
setpoint: 44
summer_simmer_index: 21.2
summer_simmer_perception: Slightly Cool
warming_up_data:
  error: 1.58
  boiler_temperature: 44.8
  started: 1703580000
warming_up_derivative: 3.66
valves_open: true
heating_curve: 72
minimum_setpoint: 44
requested_setpoint: 184.6
adjusted_minimum_setpoint: 46
outside_temperature: 5.9
optimal_coefficient: 13.7
coefficient_derivative: -0.1
relative_modulation_value: 0
relative_modulation_state: warming_up
relative_modulation_enabled: false
pulse_width_modulation_enabled: true
pulse_width_modulation_state: "on"
pulse_width_modulation_duty_cycle:
  - 450
  - 449
friendly_name: OTGW2
supported_features: 17

Heating this morning

Could you please advise what do you consider one cycle to be? Is it not the duration of the flame being on?

A PWM duty cycle is considered the combination of heating_on and heating_off in given intervals. Here and here you can find some more infos about how we calculate the PWM duty cycle ON/OFF times and how we extend the 15 minutes interval, a feature called Automatic Duty Cycle.

I noticed that the Max CH setpoint command e.g. SH=55 is not always respected by the boiler but sending GW=R followed immediately by e.g. SH=55, helps. Maybe it’s the same with Max Modulation?

No, I can see from the graph that the Max Relative modulation sensor drops to 0% ( correct behavior ) but your boiler doesn’t respect the instructed command.

The SAT works well in terms of keeping to the target temperature and making the boiler work more efficiently. However, I still seem to struggle to get the perfect cycle consistently. :warning: In my previous post, lowering the coefficient to 0.1 only worked temporarily, then cycles were short again after a while. What would perfect cycle look like when looking at the relative modulation and boiler temperature look like?

A perfect cycle should have AT LEAST a duty cycle of 3 minutes heating ON
and the rest heating OFF ( In 15 minutes intervals). Note that we continuously monitoring the boiler flow water temperature in order to calculate the PWM duty cycle. As a result the higher boiler flow water temperature the shorter the ON cycle.

With the dynamic minimum experimental feature, it seems to work but on many occasions, the cycle is too short because of the minimum requested setpoint, I think?

If your radiators aren’t equipped with TRVs, please uncheck this option.

My configurations for various scenarios maybe were not as intended by SAT, but it looks like SAT prioritises the precision of being close to the target temperature and prevent overshoot, which means that cycles are shorter than they can be.

That’s why we use a thermostat :slight_smile: ! We try to keep the temperature as close to setpoint as possible, while monitoring every moment the outside temperature, room temperature and the boiler flow water temperature.

Bonus:

This is a graph of a SAT user. He managed an incredible accuracy of 0.01! Moreover you can see the PWM ON/OFF cycles.

1 Like

Thank you so much George (sergeantd83) for your comprehensive and insightful responses to all my queries about the SAT. Your explanations, especially about the PWM duty cycle have been incredibly helpful. I appreciate your patience in guiding me through the nuances of the SAT system.

I’ve set SAT to the recommended settings. The results are fantastic! Both the boiler and thermostat are functioning excellently, maintaining the perfect temperature with impressive efficiency.

Here’s my snapshot of the last 15min, this is in a 150m2 house, so SAT is very impressive :hugs:

You are welcome! We are very happy that your SAT instance is up and running as intended.

Hi All.

For those of you who want to see SAT in real time, you can see my real-time boiler data here - Real Time Ideal Logic Heat H24 Performance Data

I’m still tinkering with heating schedule variables and you can read more about those test conditions: Show and Tell Discussion #40 (github.com)

My gas boiler smart meter readings lag by about 1-2 hours, so efficiency should only be read when the heating has been off for a while or at the end of the day. See EDIT below

My target room temperature (Summer Simmer Index) is 21.9°C at night, slowly rising in the morning and throughout the day to 23.5°C. See EDIT below

If data shows Flow Temp higher than 60 it means that DHW is on. See EDIT below

Made possible by - My gas boiler data is live! - Emoncms - OpenEnergyMonitor Community

Enjoy!

EDIT(July 2024): gas readings are now every 30min, thanks to Octopus Mini. I dropped SSI and use actual temperatures instead, because radiant heat seems to have greater impact of the overal perceived comfort. For example, while not in winter season, actual target temperature that’s comfortable is 1C~ lower than in the winter, and so the benefits of using SSI in the context of home heating doesn’t seem match my expectations. Also, DHW now runs at about 65 Flow Temperature. Running DHW at lower flow temperatures doesn’t seem to make much difference to gas consumption, perhaps due to the transfer efficiency of my water cylinder tank (and keep looking out for potential efficiency improvements).

2 Likes

This looks awesome!

Is anyone aware of a similar solution which works with EMS Bus instead of opentherm? I have an EMS Bus Bosch boiler and was looking forward to acquiring the EMS Bus gateway from here: https://bbqkees-electronics.nl/

Hi,

As far as I know, the author of the EMS-ESP32 project is working to bring native support to SAT. So stay tuned!

Awesome! As far as I understand, its EMS-ESP32 that is running on the gateway I linked to. If you happen to have a link to where you found that I’d appreciate that. I’m trying to stay informed and watch the progress if any comes from that :slight_smile:

You can follow this EMS-ESP32 GitHub link

1 Like

Hello,

I am attempting this method, as the automatic method “finished successfully” after 5 seconds every time, and results in unstable heating curves.

In step 4 is the “45” meant to reference the Maximum Setpoint in step 1? Should I increase it if I increased it at step 3?

Additionally, if I cannot get relative modulation to go above 0 even with a setpoint of 70, how do I determine the overshoot?

Wow, your relative modulation stays at 0% always? Which is the value of the max relative modulation sensor? 0 or 100? Moreover can you tell me the brand of your boiler?

Nefit boiler (nefit proline nxt hrc 30).
Max modulation changes from 0 to 100 with setpoint changes. Relative modulation never exceeds 0%. I have seen it go to 20% on three occasions, only for 10seconds each.
image

I am beginning to think that the boiler is extremely oversized.

Ok, as temporary solution manually enter the overshoot protection value 60 during the initial config flow.

Do you run the 3.1.0 version?

I had installed via HACS and assumed I was on the latest. I see I am on 3.0.1, so I have updated to 3.1.0.

I will redo my troubleshooting and see if it is corrected, otherwise I will set the overshoot protection to 60.

1 Like

Can you please confirm that the version number is correctly indicated on the integration page?
image

In HACS I see the correct version number.

Ok let’s start from scratch.

  1. How many radiators do you have?

  2. Better use the latest develop version.

Go to developer tools → services → service → update.install → choose entity → update.smart_autotune_thermostat_update → check version → fill develop → call service.

There will still be the 3.0.1 version, ignore it.

  1. Use as overshoot protection value the value 60.

  2. Some initial settings:
    In settings → General
    Choose the Precision Curve
    Improved controller
    Heating Curve: 1.7
    Automatic gains: 1.7
    Derivative time weight: 2.2

1 Like

I have underfloor heating. The heating is in 6 zones, total area is roughly 60m2.

I have installed the “develop” version, reinitiated a SAT with the values as suggested. I will let this run for as long as needed and send any graphs that you want.

1 Like

Yes, then for sure the overshoot protection value is above 60. I do have the same oversized boiler and the same home size as testing installation. So don’t worry SAT will manage to handle all this power that your boiler produces :slightly_smiling_face:.

1 Like

Is this compatible with DIYless thermostat now? Thanks