Working out battery efficiency

12 comments started 2023-02-12 last 2023-02-14
APIsHome Automation
M
#1 MattWhitfield

I'm working on an automation system which changes the control state of my inverter every 30 minutes to optimise cost based on Octopus Agile rates & Solcast forecasts. It's working pretty well and definitely saving me money. However - one thing I haven't got a good handle on is how to work out battery efficiency. And by that I mean the factor that is applied to determine whether we can time-shift energy consumption - i.e. if the efficiency was 50% then it would only be worth charging the battery if the incoming cost was half of the cost at the period that you intend to discharge.

The graphs on the portal don't really give a good indication - because they don't seem to be particularly consistent (or, at least, I can't see a super obvious pattern). Sometimes battery load seems significantly higher than the house load it's meeting - other times it's only a little higher.

So I thought I'd ask you folks how you'd go about calculating the efficiency factor for battery charge .v. discharge?

S
#2 stevelewis

MattWhitfield use the total energy data on the portal. Energy out รท Energy in. Mine is about 87%. As there's also a "cost" for using the battery due to finite charge cycles, I'd be going lower than this and looking at a threshold of about 75%.

T
#3 Tim

MattWhitfield There are threads on this forum that cover the topic of efficiency, just do a search in the box at the top right. At least one person has data to suggest efficiencies for his specific inverter/battery to be in excess of 90%.

Don't forget that the warranty on some of the smaller batteries are limited by throughput whereas the larger ones are ten years with no limit on throughput.

M
#4 MattWhitfield

Tim That thread was more a meandering mess. I had done a search.,,

M
#5 MattWhitfield

stevelewis Where are you looking? Because if I maximise the Energy Graph card, select 'Total' and look at 'Battery In' and 'Battery Out' - then I get 646.93 out and 668.81 in - suggesting a 96.7% efficiency which sounds... optimistic. I'm also not sure exactly what that is measuring. If it's DC in and DC out then it's not accounting for losses in conversion either way...

S
#6 stevelewis

MattWhitfield I've sent you down a rabbit hole... sorry. I had assumed that the in/out data on the GE portal would be a close match to the data I have accumulated on pvoutput.org.

Re-checking my code, I'm not using the totals from GE. Instead, I download the 5-minute ['battery']['power'] information as part of the API "system data" call. The positive and negative values are then totalled up separately over an extended period using pvouput.org. That's how I arrived at 87% from >12,000 readings this year.

Using the above method, I have 451 kWh out, 510 kWh in for 2023. The comparable data from the 2023 annual report in the GE portal is 475 kWh out, 502 kWh in.

Whatever the calculation method, you can typically expect 85% - 90% round-trip efficiency for a battery system, hence suggesting a 75% threshold to make using the battery worthwhile with Agile Octopus.

M
#7 MattWhitfield

stevelewis Ok - that makes sense. What I was trying to get to was 'is there a way I can reasonably come up with a figure without someone having to specify it' and I think it's just going to be a whole load simpler to have that as a config parameter ๐Ÿ™‚

For my purposes, I have it set at .85 because that seems conservative enough and my battery is the 8.2, so has unlimited cycles...

#8 Riscy

I'm reporting energy in/out by taking the relevant power flows from Modbus (i.e. Watts) approx every 10 seconds and then converting it to energy by intergrating over that elapsed time. I can then aggregate energy in/out over any arbitrary period.

Obviously for efficiency calcs you need to aggregate a period where the start and end charge states are the same (e.g. full-empty-full), or over a long enough period that that's averaged out.

So far it seems broadly in-line with the stats in the Portal so I'm happy with it.

S
#9 stevelewis

Riscy similar approach to me, but possibly measuring at a different point in the system. Are you measuring power at the AC or DC side of the inverter?

#10 Riscy

stevelewis My knowledge will run out at this point... You'll have to keep me right:

I'm using the Inverter's power flow readings, so it's however the "Grid-to-Battery"/"Solar-to-Battery" flow and "Battery-to-House" are calculated? I've long wished to know how the Inverter does these measurements. My assumption is that infers the other flows based on actual measurements of the following:

  • Grid AC to House (from CU clamp)
  • PV DC to Inverter
  • Battery DC in & out

(I'm excluding export from the discussion in the interests of simplicity)

I'd be really interested to know more technical details of where each power reading is done within the GE system.

M
#11 MattWhitfield

Riscy I'd be really interested to know more technical details of where each power reading is done within the GE system.

Seconded. To be honest, for the automation stuff I'm writing it doesn't really matter as long as you can get an efficiency figure somehow. But the programmer in me definitely wants to understand it way more fully.

#12 Riscy

I guess there are two approaches to solving this, depending whether you prefer...

  1. Log an increasing energy total, and then calculate latest minus earliest to tell you usage.
  2. Log energy used in each delta period of 10 seconds and then calculate sum(periods) to tell you usage.

Each has benefits:

  1. No rounding errors; simpler implementation - can use sensors which already exist in most HA integrations etc.
  2. Works irrespective of totals being reset; enables you to do cost calculations too (i.e. summing the costs of each period - which isn't possible if you're calculating across variable tariffs or tariff changes using Option 1)

In both cases, though the operation is similar though:

  • Log the measurements into a sensor in HA every XX seconds. One for each power flow.
  • In Node-RED use the Get History node to fetch the measurements over a rolling period of your choice.
  • Calculate efficiency from those history values by either doing Option 1 (latest - earlier), or Option 2 sum(values), for each flow so that you've got total in each direction.
  • Divide those totals to get efficiency.
  • Make a decision. Then wait another 30 minutes or whatever before re-evaluating.

Something like that.