kamaradclimber / heishamon-homeassistant

An integration for heatpumps handled by heishamon
Apache License 2.0
50 stars 25 forks source link

COP when defrost is in action #181

Closed Safs closed 10 months ago

Safs commented 10 months ago

Core 2024.1.2 Supervisor 2023.12.0 Operating System 11.3 Frontend 20240104.0

Describe the bug

When defrost mode is activated, COP must be to disabled, because of unreal values. In defrost mode calculation of COP is not necessary, because heat production is not in action.

geduxas commented 10 months ago

I was always curious, do Panasonic add that in it's own COP average or not? Because during defrost, remote controller shows COP too!.

also from another perspective, maybe COP should go negative direction? or calculated to Cool COP?

Safs commented 10 months ago

This values exist very short time, therefore, I thing, there is very small impact of those on average values.

kamaradclimber commented 10 months ago

Could you describe what you mean by "unreal" values. Here is what I can see during defrost: image (green is defrost state, yellow is COP)

Safs commented 10 months ago

COP is the value that represents efficiency of compressor, how it produce heat or cool energy, but in defrost mode, compressor do not produce heat at all, therefore, any COP value in this mode is unreal. Those values make peaks in graph, thats make less visualy good look this graph.

PGnl commented 10 months ago

Actually, any energy used for defrost taken from from the water AND the energy used by the electric heater are negative COP.

I generate my COP on a per day basis by taking the positively generated heat, reducing that by the heat taken from the water. Easiest is to allow heat power to go negative and then using the daily sum.

This is then divided by the combined total electric power consumption of the day ( both by the heat pump and the electric additional heater used for defrost). This is an daily average COP that should be pretty exact and can also be used for COP values of the year.

note that I do this using node red. also, I have adjusted my sensors by activating the pump in the menu without starting the heat pump. The sensors should then, after some time, read the same temp or be adjusted. I did this with an outside temp of some 10-15 degrees, otherwise you loose to much energy via the heatpump.

Safs commented 10 months ago

That is not solution for realtime data. And in defrost mode COP is always -1, because energy is taken from system inside only (water). Did you compare your calculated COP with Panasonic fixed data? Is there big difference?

kamaradclimber commented 10 months ago

@Safs I’ve seen your comment saying it’s not working but it has disappeared. Could you confirm whether it works for you please?

Safs commented 10 months ago

At first I noticed that it didn't work, but then I noticed that I didn't have the latest version installed, when I installed it, I see that everything works now. Sorry!

kamaradclimber commented 10 months ago

No pb!

Safs commented 10 months ago

Seems it stopped working... image

kamaradclimber commented 10 months ago

Indeed there is a bug, I'll fix it sorry for all churn!

curzon01 commented 10 months ago

And in defrost mode COP is always -1, because energy is taken from system inside only (water).

as @Safs already mentioned COP is the ratio of the cooling or heating energy generated to the electrical energy used, regardless of whether the heat pump adds or removes it.

I always use the absolute values of energy to calculate the COP, this also works if you use the heat pump for cooling.

but in defrost mode, compressor do not produce heat at all, therefore, any COP value in this mode is unreal.

However, the last part is also not always the case and is only true regarding to the compressor, but this is not the only energy source for a heat pump: If outlet temperature is too low, additional interal heater is used for defrosting, and this costs additional electrical energy (you can switch this function off, but then you risk the heat pump coming to a standstill due to error H75):

image

Those values make peaks in graph, thats make less visualy good look this graph.

Only to avoid peaks in graphics should you use other options and not change the data basis for this.

kamaradclimber commented 10 months ago

@curzon01 what would you suggest?

curzon01 commented 10 months ago

As already explained for the definition of COP, this value cannot be negative, as this would mean by definition that the heat pump generates electrical energy and feeds it back into the grid.

The current decision to simply delete such high COP values (defrost, COP > 15) is simply wrong, just because someone realize that they are for a short term (what kind of span is that?, 10 ms, 5 sec. 3 minutes...) on own systems. This can be very different on other systems and climate situations. So I do not think it is correct to manipulate the calculated values in any way for aesthetic reasons (plot) and only because very high COP values (which are not wrong) can arise for a short time.

My pseudo-code (unfortunately I don't have time to set a PR in the short time available) for the total COP would therefore be (might be it was before, I don't know the valuesy[x:y] values):

production = "main/Heat_Power_Production" + "main/Cool_Power_Production" + "main/DHW_Power_Production"
consumtion = "main/Heat_Power_Consumption" + "main/Cool_Power_Consumption" + "main/DHW_Power_Consumption"
cop = production / consumption if consumption != 0 else 0
geduxas commented 10 months ago

Just don't calculate cop for defrost, and that's it.. By judging of 3 states.. while 3way valve heating DHW, calculate cop for TANK, in opposite way, calculate for heating.. in defrost state don't do any calculations leave zero.. don't know why it should be negative.

While defrost'ing Panasonic itself shows high COP rate, but it's unknown for me does it add it to overall cop..

Defrost routine is simply switching from heating mode to cooling mode in hi performance.. and heat for internal heater or heated system is used to prevent damage for internal heat exchanger.. heat is not used for defrost directly..

curzon01 commented 10 months ago

heat is not used for defrost directly..

that's not true

kamaradclimber commented 10 months ago

What do you think of https://github.com/kamaradclimber/heishamon-homeassistant/pull/193

kamaradclimber commented 10 months ago

Regarding filtering values > 15, it's true it's mostly for aestheticism. However, my assumption is that those values come because we have some (small) lag between production and consumption topics (they can't be updated simultaneously) so we filter those values.

curzon01 commented 10 months ago

What do you think of #193

As I said,the conditions are not always so ideal that the heat pump can manage the defrost completely with external heat energy alone, so it is wrong to have an exception for the defrost mode - I would be cheating myself

You can do it this way, but it's not usable for people like myself.

curzon01 commented 10 months ago

However, my assumption is that those values come because we have some (small) lag between production and consumption topics (they can't be updated simultaneously) so we filter those values.

I have checked my measured values again, these are real values: In addition to heishamon, I use an external heat and power meter that stores the values faster then a second when it changes. Such exceptions are normal and sometimes are up to 240 for a very short time - but normally they are around 17-50. As I said, these are values from my separate heat meter and power meter, not from Panasonic or heishamon.

Bucky2k commented 10 months ago

For what it's worth I'm fine with either solution (old and new). The limit of 15 makes sense as it's just to keep the graphs from scaling down too much. But that was already the case. Now suppressing COP during defrost - I do like the smoothening effect on the graph but again not really necessary

Also my measured COP from electricity meter (S0) and heat meter has spikes due to time delays (electricity off, but heat still coming). Of course I don't want to see high spikes when 20 Watts electricity are measured during 5KW heat flow still being present after pump shutdown. Those COP values I limit for example already at 12

Screenshot_20240121_174738_Home Assistant

Safs commented 10 months ago

As mentioned above, just do not calculate COP in defrost mode, that it.

Bucky2k commented 10 months ago

As mentioned above, just do not calculate COP in defrost mode, that it.

Only works for the Aquarea COP. The measured COP is delayed. And as @curzon01 mentioned, the suppression does not fit for everyone or at least is not yet agreed to be the better way. I will be fine with either, only cosmetics

Safs commented 10 months ago

Then limit value to 5 or 6, because technically (by specification of Panasonic) is not possible to pruduce more than this.

Bucky2k commented 10 months ago

Then limit value to 5 or 6, because technically (by specification of Panasonic) is not possible to pruduce more than this.

Not really. I have seen continuous COP above 9 (even measured) during cooling, shortly even above 10 and consistent above 5 is also no magic (10°C Outside temp, 29°C Outlet).

Bucky2k commented 10 months ago

Even at 4°C outside I reach COP >5 Screenshot_20240121_195116_Home Assistant

Safs commented 10 months ago

As you see, mesured is not more than 6.

Safs commented 10 months ago

Anyway, that is fare away from 15.

Bucky2k commented 10 months ago

Yes, 12 I figured for my case plenti as threshold. Regarding measured not more than 6: Of course, 4°C outside! Of course there is a better one at 10-15°C. And even if the measured is slighly lower than the one from Aquarea, the integration should not artificially limit the display. For cooling the COP can be much higher