MHI-AC-Ctrl icon indicating copy to clipboard operation
MHI-AC-Ctrl copied to clipboard

Idea to improve precision

Open ph-pk opened this issue 3 years ago • 12 comments

The MHI units have a precision of 1.0C for setpoint. Additionally, troom is rounded down to .0 / 0.25 / .5 / .75 causing an additional loss of precision for unit control logic when e.g. an external sensor with MQTT is used.

To improve this behavior I prototyped the following:

  • properly round set/Tsetpoint to nearest integer
  • store difference as offset
  • correct set/Troom with offset
  • properly round corrected troom to nearest 0.25

This emulates a precision of 0.25C, max difference 0.125C.

Would this be something to include?

ph-pk avatar Feb 23 '22 21:02 ph-pk

i think 0.5 deg precision is possible as in eco mode it is using set temp=set temp+1.5deg anyone with wired remote can tell if it is possible to set in 0.5 deg steps

kARTechnology avatar Feb 25 '22 08:02 kARTechnology

https://github.com/absalom-muc/MHI-AC-Ctrl/issues/74

kARTechnology avatar Feb 25 '22 08:02 kARTechnology

The MHI units have a precision of 1.0C for setpoint. Additionally, troom is rounded down to .0 / 0.25 / .5 / .75 causing an additional loss of precision for unit control logic when e.g. an external sensor with MQTT is used.

To improve this behavior I prototyped the following:

* properly round set/Tsetpoint to nearest integer

* store difference as offset

* correct set/Troom with offset

* properly round corrected troom to nearest 0.25

This emulates a precision of 0.25C, max difference 0.125C.

Would this be something to include?

Thanks for your suggestion @ph-pk.

Not sure that I understand it completely. Some comments:

  • The resolution (not the precision) for the setpoint was 1°C so far, but it changed with v2.5R21 to 0.5°C (btw: I missed to mention this in Version.md)
  • Troom resolution is 0.25°C. Also when you send the room temperature via MQTT then MHI-AC-Ctrl writes this value (with the resolution of 0.25°C) to the AC unit. But only changes>=0.5°C will be published as discussed in your issue #82.
  • The measurement of the room temperature has according to my experience usually an accuracy >1°C. But I don't see that as a problem since the human temperature sense is not stable. Using a higher resolution would only counterfei an accuracy for the temperature measurement and control that is not given.

That's why I'm rather reluctant when it comes to supposed ideas for increasing accuracy.

absalom-muc avatar Feb 26 '22 11:02 absalom-muc

(issue was created with wrong account)

  • The resolution (not the precision) for the setpoint was 1°C so far, but it changed with v2.5R21 to 0.5°C (btw: I missed to mention this in Version.md)

I performed an experiment to validate this. Logged values to Influxdb and visualized with Grafana. The findings contradict with 0.5°C and confirm 1.0°C resolution:

  • the unit switches down/off when troom/op_returnair reaches op_tsetpoint. The unit switches up/on when troom/op_returnair falls below op_tsetpoint.
  • op_tsetpoint has a resolution of 1.0°C (setpoint/set_setpoint + 2.0 rounded up)
  • the resulting temperature subsequently centers around op_tsetpoint

Example: set_setpoint=18.5°C leads to setpoint=18.5°C with op_setpoint=21.0°C and also a resulting temperature around 21.0°C.

Conclusion: it is possible to specify setpoint with 0.5°C resolution but the effective resolution is 1.0°C.

original_2-3-2022_annotated

  • Troom resolution is 0.25°C. Also when you send the room temperature via MQTT then MHI-AC-Ctrl writes this value (with the resolution of 0.25°C) to the AC unit. But only changes>=0.5°C will be published as discussed in your issue MQTT Troom update on smallest change #82.

Will get back to this separately.

  • The measurement of the room temperature has according to my experience usually an accuracy >1°C. But I don't see that as a problem since the human temperature sense is not stable. Using a higher resolution would only counterfei an accuracy for the temperature measurement and control that is not given.

Humans (and some thermometers) are indeed bad at measuring absolute temperature, but pretty good at sensing relative temperature differences. Particularly for people, 0.5°C difference can make a real-world difference between comfortable and non-comfortable.

Therefore, I'd argue to at least try to support 0.5°C (and more where possible).

Below is a quick & dirty example to achieve a 20.5°C temperature. modified_28-2-2022b_annotated

pkoster avatar Mar 02 '22 21:03 pkoster

Thanks for the explanation and the diagrams, I see the reduced variation of set_troom.

Some topics are still unclear for me:

  • I assume troom is hiden by op_returnair because they are equal, please confirm.
  • Why is set_setpoint (red) not equal to setpoint (dark blue) in the second diagram? In the first diagram they are equal.

To be honest I can still not comprehend that the 0.5°C should make a big difference, but I accept that other persons might feel different.

Have you implemented your changes in MHI-AC-Core-ctrl.cpp only or are other files affected, too?

absalom-muc avatar Mar 12 '22 21:03 absalom-muc

Hi @ph-p

The MHI units have a precision of 1.0C for setpoint. Additionally, troom is rounded down to .0 / 0.25 / .5 / .75 causing an additional loss of precision for unit control logic when e.g. an external sensor with MQTT is used.

To improve this behavior I prototyped the following:

* properly round set/Tsetpoint to nearest integer

* store difference as offset

* correct set/Troom with offset

* properly round corrected troom to nearest 0.25

This emulates a precision of 0.25C, max difference 0.125C.

Would this be something to include?

Hi, can you share the changes made in code to get more tighter control of the set temperature?

Also is actual set temperature = tsetpoint-2 degree c?

kARTechnology avatar May 18 '22 19:05 kARTechnology

@pkoster could you post your changes?

rwijnhov avatar Jun 09 '22 07:06 rwijnhov

@absalom-muc : the diagrams were made with slight differences in code that did / did not correct MQTT values like setpoint (dark blue) for the offset.

@kARTechnology : the code below does not incorporate the -2 offset

@rwijnhov : Attached is a unified diff, which has been subsequently manually stripped of configuration, non-working extensions, etc. (untested). enhresolution_diff.txt

edit: above diff does not take into account the update of last week

pkoster avatar Jun 11 '22 14:06 pkoster

Not sure if you plan a pull-request, else please consider to close the issue

absalom-muc avatar Aug 05 '22 06:08 absalom-muc

Could we please incorporate the .5 temp settings in the base code? I use external sensors. And 22 is too cold and 23 too warm :) 22.5 is the temp I need.

rwijnhov avatar Sep 11 '22 09:09 rwijnhov

Could we please incorporate the .5 temp settings in the base code? I use external sensors. And 22 is too cold and 23 too warm :) 22.5 is the temp I need.

Tsetpoint resolution of 0.5°C is already implemented since December 2021, please see https://github.com/absalom-muc/MHI-AC-Ctrl/blob/master/SW-Configuration.md.

For the precision improve, someone has to initiate a pull-request, I don't plan it currently.

absalom-muc avatar Sep 11 '22 11:09 absalom-muc

Yes I know but it doesn't work. If i set it to 22.5 it will still heat to 23 degrees same behaviour if inset it to 23.

rwijnhov avatar Sep 11 '22 18:09 rwijnhov

I have made some changes so the setpoint of .5 degrees are working, based on the diff pkoster has supplied. But I made some changes to make it also work with a connected external DS18B20. Also when the wemos is reset or the remote control is used. Basically the Troom send to the airco will be increased with an offset (0.5 degrees) when a setpoint x.5 degrees is used, to compensate for the setpoint +1 degrees. I have to test this more, but I will make a pull request when finished.

glsf91 avatar Dec 09 '22 17:12 glsf91

Made a pull request for changing Tsetpoint resolution as discussed above. I used the diff supplied by @pkoster (thanks !) but changed a few things to make it work also after a reset of the wemos and when using the remote control. Tested a lot with external sensor but also with set/Troom MQTT.

glsf91 avatar Dec 11 '22 15:12 glsf91

implemented in v2.6

absalom-muc avatar Jan 28 '23 22:01 absalom-muc