Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix demand control range and remapping #271

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

b3nn0
Copy link
Contributor

@b3nn0 b3nn0 commented Jan 12, 2025

Hi,
the functions to remap the demand control values were wrong, and the range was 20-100% instead of the actual 5-100%.
Old behavior:

>>> def write_demandcontrol(value: int) -> str:
...     return str(int(value / 100 * (234 - 43) + 43))
...     
>>> write_demandcontrol(5)
'52'
>>> write_demandcontrol(100)
'234'

New behavior:

>>> def write_demandcontrol(value: int) -> str:
...     value = (value - 5) / 95 # 5% -> 100% to 0% -> 95% for remapping
...     return str(int(value * (234 - 43) + 43))
...     
>>> write_demandcontrol(5)
'43'
>>> write_demandcontrol(100)
'234'

This matches the documented range: https://github.com/IgorYbema/HeishaMon/blob/main/OptionalPCB.md#set-command-byte-decrypt

Same for the read function (probably only really relevant when something external manages the demand control as well?.. hopefully never).

@geduxas
Copy link
Contributor

geduxas commented Jan 12, 2025

Real ranges are 5-100% but by testing 5-20% don't give any reasonable value.. so it's decided to start from 20%. Also steps are not relevant at all.. for reality there is 3-5 steps..

@b3nn0
Copy link
Contributor Author

b3nn0 commented Jan 12, 2025

Hmm interesting,
for my L-series I can definitely see the compressor speed change depending on fairly precise demand control values.
Probably not for every 5% step, but 5% and 20% do make a difference for me. Especially since with the old mapping, the 20% were actually a bit more.. 24% I think.

@geduxas
Copy link
Contributor

geduxas commented Jan 12, 2025

Could you provide graphics with compressor frequency and demand control? I am curious how it's looks in new model's

@b3nn0
Copy link
Contributor Author

b3nn0 commented Jan 12, 2025

You are asking for a lot of time investment while it's -7°C outside 😂
The adjustment doesn't seem to take effect immediately. The compressor frequency adjusts quite slowly, which makes it hard to get a good plot while also needing "normal" heating operation. I will see if I can create something reasonable, but might take a while.

But anyway, I feel like my changes make sense regardless.
The old mapping just didn't resemble what either the Heishamon, nor the Panasonic documentation says. And it still had 5% increments, too.

@geduxas
Copy link
Contributor

geduxas commented Jan 12, 2025

Yes i know, i done it by myself, and pump react pretty fast, best is to do while preparing dhw, or in cold moment's when pump will work in higher frequency (100hz is ideal) i am not asking to do that, just you said that your pump is reacting in precisely.. so i thought you already have some test's and graphic for it..

@b3nn0
Copy link
Contributor Author

b3nn0 commented Jan 12, 2025

Just did some DHW and tested. You are right, it does seem to apply fairly quickly.
I only have a 5kW model, which is (I think?) upsold as 9kW with different software. Therefore my compressor's max frequency is only around 60Hz.

5%-> 22hz
20% -> 24hz
25% -> 28hz
35% -> 32Hz
45% -> 39Hz
55% -> 45Hz
65% -> 51Hz
75% -> 52Hz
100% -> 54Hz

Not sure why it didn't go up to ~60Hz. The firmware seems to be a bit unpredictable sometimes..
The actual minimum frequency is around 16-17Hz. Can't seem to force that with demand control alone.

@geduxas
Copy link
Contributor

geduxas commented Jan 12, 2025

Yes, because pump have it's own priority.. so it not always true for demand control. Also it will not go higher because there is no demand.. as I told it's best to test when natural pump demand will go to 100Hz. With demand control your not setting demand, but you're limiting pump to it's percentage.. as i see there is no such big difference in 5-20% also.. 22-24hz also could be just fluctuate by limiting it.. same are to other steps..
To make proper test you should look in graphics after increasing demand, it should get steady in some time. For your setup your pump shouldn't react at all after 40-60%

@b3nn0
Copy link
Contributor Author

b3nn0 commented Jan 12, 2025

Yes, because pump have it's own priority.. so it not always true for demand control. Also it will not go higher because there is no demand..

There was demand. It was during a DHW cycle. Target outlet temp = 75°, actual outlet temp = ~40C.
My heatpump is manufacturer-limited to around 60Hz because it's the 5kW unit, not the 9kW unit (with otherwise very similar (equal?) components).

Maybe their "demand control" does actually try to modulate up to 9kW, but then later caps the frequency to 60Hz, that's why 75% and 100% is more or less the same. Would be interesting to see what 75% and 100% actually result in on a 9kW unit.

I'm just not sure why it only went to 54 and not to 60Hz despite there being demand. But I guess the ways of the aquarea are inscrutable.

But yes. Around 5 to 20% is more or less the same. At 25% the changes seem to start.
Maybe that's also why I did notice a difference from upstream to my patches: the upstream 20% setting was actually a 24% setting, being rounded to 25%.

Edit: never mind, it's because the cap is not 60hz, but 5kw. And 5kw was reached with 54hz in this case.

@kamaradclimber
Copy link
Owner

Thanks for the contribution. I've never used the set demand so I'm not sure to understand what it is used for.

@geduxas @b3nn0 do you both agree on the proposed patch? If that's the case, I'll merge it gladly.

@b3nn0
Copy link
Contributor Author

b3nn0 commented Jan 12, 2025

I do. While the actual improvement is only minor (but existent), it at least makes it match the Heishamon/Panasonic documentation.

@kamaradclimber kamaradclimber merged commit 0c62278 into kamaradclimber:main Jan 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants