Earth Notes: 16WW Eddi PV DHW Diverter Export Margin Analysis (2022-08)

Updated 2024-02-22.
Chosing a more grid-friendly value for the Export Margin based on 3 years' export data. #simulation #gridFriendly #diversion

Abstract

As more microgeneration is added to the grid, whether behind the meter or elsewhere, optimising the nuanced interactions between generation, storage and the wider grid becomes increasingly important. For example, sometimes the Eddi solar PV diverter at 16WW diverts energy to the Sunamp Thermino heat battery even at times of peak grid demand (eg early evening), because that is when the Thermino has autonomously decided that it is no longer full and can accept more energy. It would be better to be more grid-friendly and spill more generation to grid especially at these times, without losing too much 'free' hot water (DHW). It would probably be best to dynamically vary the Eddi "Export Margin" based on time of day or grid state, but this is not possible as of . Therefore, simple modelling was performed to pick a new fixed value for the Export Margin, and the results were somewhat unexpected! Raising the margin from the current 100W to around 400W has proved possible without significant loss of diversion-heated DHW, providing much higher support to the grid when excess generation beyond in-home electrical needs is available. This slightly less 'greedy' approach may be widely applicable in similar systems, while being easy and free to implement.

Keywords

UK, London, Kingston-upon-Thames, domestic, behind-the-meter, storage, heat, heat battery, solar, PV, diversion, eddi, grid, export, margin, modelling

Introduction

The author's home (16WW) is to the south-west of Greater London (UK), where he lives with his family (partner and two children). It was built in the late 1960s, and is of timber frame construction. Over many years efforts have been made to reduce the home's carbon footprint, such as by changing some habits (fewer hot baths), replacement (after repairs) with more appliances such as fridge/freezer, moving some consumption off-grid, internal wall insulation with aerogel, and loft insulation, installation of solar PV, etc. Also, improved self-consumption of the solar PV generation with storage, and reduction of local gas burn though replacement of a gas cooker with induction hob and fan oven, and lately solar PV diversion to a heat battery to cover a significant fraction of DHW (Domestic Hot Water) demand.

As of 2022-08, 16WW's energy system (see Figure 2): includes:

Noting that:

it seemed that it might be possible to tune the Eddi's Export Margin setting to allow more spill to grid (especially valuable at peak-demand times) without significant loss of DHW capture from diversion. This helps minimise direct gas burn at 16WW, which if done right should reduce CO2 emissions overall, and avoid funding a war in Ukraine.

Using a larger/higher Export Margin may also help ensure that spill-to-grid is only curtailed when many other PV systems may also be spilling, again likely helpful for grid management.

Potential electricity-grid-friendly behaviours include:

A simple modelling exercise was undertaken to try to find an 'optimal' fixed value for the Export Margin. This was enabled by fine-grain data collected over the last few years by the Enphase battery system.

(The Eddi's Export Margin value can only be updated, manually, via a menu on the device, so dynamically-varying value via the API is not yet possible.)

It appears that a much higher margin can be used than was anticipated, which is good.

Method

This analysis uses a simple model of the PV and hot-water system including heat battery. The model is parameterised with nominal and observed values for maximum diversion power (W), mean daily DHW demand including storage and other losses (kWh/d), and heat battery storage capacity (kWh).

Input to the model is measured energy exported to the grid every 15 minutes (Wh) after all other activity (generation, consumption, Enphase battery) for three full calendar years after installation of the battery system and before installation of the Eddi and Thermino diversion system. The export data is from the Enphase system, and is 'meter grade', ie should be reasonably accurate. Overall its measurements do agree closely with the calibrated utility meters: import, export and generation. Over the three years 2019, 2020, 2021 this amounts to 105,216 data points. This exported/spilled energy is potentially available to divert into DHW.

(Background consumption in the home is typically between ~100W and ~200W during the day, when no kitchen wet or cooking appliances are heating.)

Although every year had some special features (see Sensitivities below), including for example coronavirus lockdown and record PV generation in 2020, use of several years' data provides confidence that they are representative.

The model is implemented in a little over 100 lines of Unix-style sh shell scripts and awk and very common utilities, and runs on Unix-like systems such as the author's MacBook Air (in ~14s) and Raspberry Pi (in ~43s):

Mac (~2013 MacBookAir6,2; OS 11.6.8; 1.7 GHz Dual-Core Intel Core i7):

% uname -a
Darwin localhost 20.6.0 Darwin Kernel Version 20.6.0: Tue Jun 21 20:50:28 PDT 2022; root:xnu-7195.141.32~1/RELEASE_X86_64 x86_64

RPi (3B),

% uname -a
Linux sencha 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

Minimal resources are required and identical results are generated on each.

Model data and code manifest and licences

The Enphase data is published under a CC0 licence.

The code and other non-data artefacts in the manifest below may be treated as published under an Apache 2.0 licence.

The model outputs are published under a CC0 licence, and possibly need no licence at all as automatically generated from the other elements.

Note that very minor changes (eg a typo fix, addition of licence) have been made to OptExportMargin.20220817.sh since originally frozen. They do not affect the table of results.

(See additional manifest items in the Postscript.)

Model algorithm description

Significant simplifications in implementation of this model:

The start of each Enphase month data file looks somewhat like:

Date/Time,Energy Produced (Wh),Energy Consumed (Wh),Exported to Grid (Wh),Imported from Grid (Wh),Stored in AC Batteries (Wh),Discharged from AC Batteries (Wh)
2021-12-01 00:00:00 +0000,0,22,0,26,4,0
2021-12-01 00:15:00 +0000,0,17,0,21,4,0

The core of the awk model algorithm is reproduced below, lightly edited for clarity:

    /^20/ { # Data record, starting with a date 20xx-xx-xx.
        date=substr($1,1,10);
        if(date != yesterday) {
            yesterday=date; ++days;
            storedWh -= DHWWhPERDAY;
            if(storedWh < 0) { storedWh = 0; }
            }
        ++samples;
        exportWh=$4
        exportW=exportWh * 4; # 15 minute samples.
        if((exportW > em) && (storedWh < STOREMAXWh)) {
            ++divSamples;
            maxdivertableW = exportW - em;
            divertableW = maxdivertableW;
            # Limit maximum diversion power to element/Eddi capacity.
            if(divertableW > MAXDIVERTW) { divertableW = MAXDIVERTW; }
            # Limit by daily demand.
            headroomWh = STOREMAXWh - storedWh;
            divertableWh = divertableW / 4; # 15 minute samples.
            if(divertableWh > headroomWh) { divertableWh = headroomWh; }
            Wh += divertableWh;
            storedWh += divertableWh;
            }
    }
    END {
        printf("%.3f %.2f ", divSamples/samples, Wh/days/1000);
    }

Note that there is slight trickiness in that the Enphase data and some model parameters are in Wh (watt.hours), whereas other parameters are in W (watts). Conversions that know the sample interval (15 minutes) are necessary in a couple of places.

Model run output

A run of the script produces:

% sh img/analytic/Eddi-Export-Margin-202208/OptExportMargin.20220817.sh
## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 7000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.179 2.70 0.219 3.88 0.073 0.31
50 0.158 2.63 0.205 3.86 0.045 0.25
100 0.151 2.57 0.201 3.83 0.037 0.20
150 0.146 2.52 0.199 3.79 0.031 0.16
200 0.141 2.47 0.196 3.76 0.025 0.13
250 0.137 2.41 0.194 3.72 0.020 0.10
300 0.133 2.36 0.192 3.67 0.016 0.08
350 0.130 2.31 0.190 3.63 0.013 0.06
400 0.127 2.27 0.187 3.58 0.010 0.04
500 0.120 2.17 0.182 3.48 0.006 0.03
750 0.107 1.94 0.169 3.20 0.002 0.00
1000 0.093 1.67 0.150 2.80 0.000 0.00
1500 0.067 1.09 0.114 1.86 0.000 0.00
2000 0.043 0.52 0.073 0.88 0.000 0.00
3000 0.004 0.02 0.007 0.03 0.000 0.00
4000 0.000 0.00 0.000 0.00 0.000 0.00

This estimates mean energy diverted to DHW per day for different Export Margin values (0W, 50W, ... 4000W) and different slices of the year.

The values for this run assume 4kWh/d DHW use (and no losses) and about 7kWh of storage in the Thermino heat battery.

The input data is Enphase-measured export-to-grid values every 15 minutes for 2019, 2020 and 2021.

Reformatted, those results are in Table 1 below.

Table 1: model run output diversion time fraction and mean daily energy, for various year slices and export margin values (parameter YEARSTOUSE 2019 2020 2021) (parameter MAXDIVERTW 3000) (parameter DHWWhPERDAY 4000) (parameter STOREMAXWh 7000)
All YearMar to Sep (bulk)Nov to Jan (worst)
Export MarginTimeDailyTimeDailyTimeDaily
W%kWh/d%kWh/d%kWh/d
017.9%2.721.9%3.97.3%0.3
5015.8%2.620.5%3.94.5%0.2
10015.1%2.620.1%3.83.7%0.2
15014.6%2.519.9%3.83.1%0.2
20014.1%2.519.6%3.82.5%0.1
25013.7%2.419.4%3.72.0%0.1
30013.3%2.419.2%3.71.6%0.1
35013.0%2.319.0%3.61.3%0.1
40012.7%2.318.7%3.61.0%0.0
50012.0%2.218.2%3.50.6%0.0
75010.7%1.916.9%3.20.2%0.0
10009.3%1.715.0%2.80.0%0.0
15006.7%1.111.4%1.90.0%0.0
20004.3%0.57.3%0.90.0%0.0
30000.4%0.00.7%0.00.0%0.0
40000.0%0.00.0%0.00.0%0.0
daily diversion vs export margin linear
Figure 1: daily mean diversion (all-year, November-to-January, March-to-September) vs different Export Margin values, per Table 1. March-to-September (seven months) is when there is most PV generation, well in excess of in-home electricity demands, and virtually all DHW demand can be covered by PV diversion. November-to-January (three months) wintertime by contrast can provide virtually no DHW by diversion; PV generation is on average well below in-home electric loads at this point, and they take priority. Year-round PV diversion is able to provide well over half of DHW demand for 16WW, considering each day separately in this model.

Discussion

16WW energy subsystems

Unvented cylinder and Combi pre feed with solar Schematic 002 p2 SA 20100415 3rd round schematic 5p16kWp excerpt Enphase Energy Storage Diagram
Figure 2: key 16WW grid-tied energy subsystem diagrams. (A) Sunamp generic setup for use with gas combi as used at 16WW with Eddi and Thermino and Intasol combi diverter valve, courtesy of Sunamp, close to 16WW setup. (B) 16WW solar PV schematic. (C) Enphase generic storage system diagram courtesy of Enphase via Eco Partners, close to 16WW setup. Click each image to enlarge.

Initial observations

The experience implied in the Mar-to-Sep columns of Table 1 accords fairly well with lived experience: virtually all of our DHW demand has been covered by diversion since the Thermino was installed 2022-03 up to time of writing (2022-08). The Export Margin has been set no higher than 100W during this time. (Some of the residual gas use of ~0.5kWh/d can be attributed to the combi firing up while the Intasol senses if the Thermino is hot enough to supply directly.)

Diverted energy drops to zero at an Export Margin of 4000W, because PV generation from the east- and west- facing system (minus in-home consumption) never exceeds that.

DHW demand (or rather electricity input, so including losses) was close to 4kWh/d for the first couple of full Thermino months, as it has been historically for some time based on gas demand, eg in summer. It then headed downwards as some family members were away some of the time, and as we headed into UK record-breaking temperatures in 2022-07 (~40°C).

At time of writing the Nov-to-Jan period has not been experienced with the Eddi/Thermino in place, but the current system design anticipates the model prediction of no useful diversion available. Over this period (indeed, outside Mar-to-Sep) the Thermino will be boosted by low-carbon-intensity electricity opportunistically, ie if/when available.

The model output suggests that a little over half (~2.7 of ~4.0 kWh/d) of year-round DHW demand could nominally be covered by diversion, at minimal/no Export Margin. That fraction stays over 50% until a margin of somewhere between 500W and 750W.

Looking at the 'All Year' outputs, if dropping 10% of DHW coverage from now to be nicer to the grid were reasonable, then that suggests increasing the Export Margin from the current 100W, yielding a mean ~2.6kWh/d, to somewhere between 400W and 500W for ~2.3kWh/d. That looks more like a drop of ~7% (3.8 to 3.5+ kWh/d) in the Mar-to-Sep figures. This would all be at a cost of more unwanted local gas burn, though the daily difference in each case is less than the current residual burn.

This suggests an initial target of a fixed 400W the Eddi's export margin, with more than half of year-round DHW demand met without local gas burn, and ~90% of Mar-to-Sep demand. In return the grid seems 4x more spill when diversion is happening, which is good for reducing demand elsewhere.

There would probably be value in modelling against fine-grained grid CO2 intensity to see if that suggests a different Export Margin. There may be a local minimum of overall CO2 emissions, rather than the monotonic trade-off against gas use as (unexpectedly) implied by these model results.

Expectations vs reality

Generalisable

This analysis was intended to help optimise one specific installation, with detailed and lengthy historical data for the site already available.

However, the analysis might be reasonably generalised to take a typical 'weather tape' from PVGIS or similar, for a particular lat/lon, and combine it with a PV array kWp (peak output) and direction and slope, to make a plausible advanced settings guide, eg for myenergi's Eddi pages.

Sensitivities

Some potential unwanted sensitivities to details of the data are briefly examined here.

To 2020: lockdown and record PV

Sensitivity to lockdown and record PV generation in 2020 can be estimated by omitting it from the years of data used:

## YEARSTOUSE 2019 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 7000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.177 2.70 0.219 3.86 0.068 0.30
50 0.157 2.64 0.206 3.83 0.041 0.24
100 0.150 2.58 0.201 3.80 0.034 0.19
150 0.145 2.52 0.199 3.76 0.028 0.16
200 0.140 2.47 0.195 3.71 0.023 0.12
250 0.137 2.41 0.192 3.67 0.020 0.10
300 0.133 2.36 0.190 3.62 0.016 0.08
350 0.130 2.31 0.188 3.58 0.012 0.06
400 0.126 2.26 0.185 3.53 0.010 0.05
500 0.120 2.15 0.179 3.42 0.006 0.03
...

Comparing with some key rows from the original/default run:

## YEARSTOUSE 2019 2020 2021
0 0.179 2.70 0.219 3.88 0.073 0.31
50 0.158 2.63 0.205 3.86 0.045 0.25
100 0.151 2.57 0.201 3.83 0.037 0.20
400 0.127 2.27 0.187 3.58 0.010 0.04
500 0.120 2.17 0.182 3.48 0.006 0.03

The results are very similar, ie typically within ~±1%. 400W or 500W as a new Export Margin would still see ~10% lost diversion vs 100W.

To 2021: Enphase battery storage expanded

Sensitivity to the installation of extra Enphase storage in 2021Q4 (quadrupling of W and Wh) can be checked by omitting 2020 or using just 2019. It should have little effect as late in the year when there is little divertable anyway.

## YEARSTOUSE 2019 2020
0 0.181 2.77 0.214 3.91 0.091 0.43
50 0.162 2.70 0.202 3.89 0.062 0.35
100 0.155 2.64 0.199 3.86 0.050 0.28
400 0.129 2.33 0.188 3.65 0.014 0.07
500 0.122 2.24 0.183 3.57 0.009 0.04
## YEARSTOUSE 2019
0 0.182 2.85 0.208 3.89 0.101 0.53
50 0.165 2.78 0.201 3.86 0.070 0.43
100 0.158 2.71 0.197 3.83 0.059 0.35
400 0.131 2.38 0.183 3.62 0.018 0.09
500 0.124 2.27 0.177 3.53 0.012 0.06

Interestingly both these slices have some significant result differences, in particular Nov-to-Jan nominal diversion is higher without 2021 either way. This may be from better self-consumption in Nov/Dev of 2021 with the expanded Enphase system, or just the higher vampire load of the new AC Battery units, leaving less to divert.

Loss of diversion going from 100W margin to ~400W is maybe a little higher, but still ~10% (though less diversion loss in Mar-to-Sep).

To storage capacity

In this model, the ability of the system to divert energy is strictly limited by the storage capacity, because all the DHW energy draw-off happens just after midnight, when the sun is not shining to replenish the store.

For example, running the model with STOREMAXWh at 1000 (Wh) results in:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 1000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.098 0.76 0.108 0.97 0.067 0.27
50 0.081 0.74 0.096 0.97 0.042 0.22
100 0.077 0.72 0.095 0.96 0.034 0.18
150 0.074 0.70 0.093 0.96 0.029 0.14
200 0.071 0.69 0.091 0.95 0.024 0.11
...

With Mar-to-Sep (best) daily diverted kWh/d limited to just less than 1kWh.

It does not make sense to have STOREMAXWh less than DHWWhPERDAY with this model.

The advantage of a STOREMAXWh larger than DHWWhPERDAY is to allow for uneven/variable daily DHW demand (not relevant in this model) and uneven/variable PV generation to carry energy into dull days.

Pushing STOREMAXWh up to 100000Wh (100kWh, nearly a month's DHW demand) gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 100000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.189 2.99 0.228 4.13 0.073 0.31
50 0.168 2.94 0.214 4.13 0.045 0.25
100 0.161 2.88 0.211 4.12 0.037 0.20
150 0.157 2.83 0.210 4.11 0.031 0.16
200 0.152 2.78 0.208 4.10 0.025 0.13
...

This pushes up annual diversion ~10%, and even pushes Mar-to-Sep diversion over the nominal 4kWh/d demand because it allows carrying energy forward from the end of the 'season'.

There's no change in the Nov-to-Jan slot because there simply is not much divertable energy to use within any one day, never mind carry forward.

Pushing STOREMAXWh up to a more moderate 10000Wh (10kWh, about 2.5 days' DHW demand) gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 10000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.180 2.73 0.221 3.93 0.073 0.31
50 0.159 2.67 0.207 3.91 0.045 0.25
100 0.152 2.61 0.203 3.89 0.037 0.20
150 0.148 2.56 0.202 3.86 0.031 0.16
200 0.143 2.51 0.199 3.83 0.025 0.13
...
400 0.128 2.31 0.190 3.66 0.010 0.04
500 0.122 2.23 0.186 3.58 0.006 0.03
...

That raises year-round diversion by ~1%, and Mar-to-Sep diversion at 100W by ~1.5%, at 500W by ~3%.

Some storage beyond a day's demand helps diversion a little, but is not magical.

To maximum diversion power

In this model's default parameters the MAXDIVERTW max diversion power is 3000W. This is approximate peak power actually observed, with a typical mains voltage of 245V. The nominal Thermino heating element rating is ~2800W at 230V (~20Ω).

Reducing element rating, and thus maximum diversion power, to a trickle at 100W gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 100
## DHWWhPERDAY 4000
## STOREMAXWh 7000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.304 0.66 0.433 0.97 0.073 0.11
50 0.273 0.62 0.402 0.93 0.045 0.09
100 0.260 0.60 0.386 0.90 0.037 0.07
150 0.248 0.57 0.374 0.86 0.031 0.06
200 0.237 0.55 0.360 0.84 0.025 0.0
...

This greatly reduces the possible diversion to over only ~25% of demand Mar-to-Sep for example.

Reducing maximum diversion power to a more reasonable 1000W (1kW) gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 1000
## DHWWhPERDAY 4000
## STOREMAXWh 7000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.202 2.66 0.258 3.86 0.073 0.31
50 0.181 2.60 0.244 3.83 0.045 0.25
100 0.174 2.54 0.240 3.80 0.037 0.20
150 0.169 2.49 0.238 3.76 0.031 0.16
...

This only slightly impacts diversion (<1%), but does push up diversion time fraction a little. This suggest that it may be worth capping diversion power with other Eddi facilities as that might further help the grid.

Raising maximum diversion power to a power-shower level of 10000W (10kW) gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 10000
## DHWWhPERDAY 4000
## STOREMAXWh 7000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.179 2.70 0.219 3.88 0.073 0.31
50 0.158 2.63 0.205 3.86 0.045 0.25
100 0.151 2.57 0.201 3.83 0.037 0.20
150 0.146 2.52 0.199 3.79 0.031 0.16
200 0.141 2.47 0.196 3.76 0.025 0.13
...

This does not raise daily diversion, and indeed indicates that the existing 3kW element is rarely if ever running at maximum power.

To demand and losses

There is no heat meter fitted for 16WW DHW, so all estimates of DHW demand are actually taken from energy inputs, from gas or/and lately electricity.

If DHW demand reduces as it did during a very hot July to about 3kWh/d (including residual gas use, 2022-07) this gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 3000
## STOREMAXWh 7000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.161 2.14 0.191 2.98 0.073 0.31
50 0.141 2.10 0.178 2.97 0.045 0.25
100 0.134 2.05 0.174 2.95 0.037 0.20
150 0.130 2.01 0.172 2.94 0.031 0.16
200 0.125 1.97 0.170 2.92 0.025 0.13
...

As to be expected, diversion falls to (very nearly) cover the reduced demand Mar-to-Sep, and year round, though a slightly higher proportion of year-round DHW demand is now met (71% vs 68%).

If DHW demand is doubled (and storage in proportion), this gives:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 8000
## STOREMAXWh 14000
#margin-W year-divert-frac year-divert-daily-kWh MarToSep-divert-frac MarToSep-divert-daily-kWh NovToJan-divert-frac NovToJan-divert-daily-kWh
0 0.234 4.62 0.313 7.15 0.073 0.31
50 0.212 4.51 0.297 7.05 0.045 0.25
100 0.204 4.41 0.292 6.94 0.037 0.20
150 0.198 4.30 0.288 6.83 0.031 0.16
200 0.192 4.20 0.283 6.71 0.025 0.13
...

In this case Mar-to-Sep demand coverage drops getting on for 10% (from ~97% to ~89% at a nominal 0W margin), but not catastrophically. This implies that there is quite a lot of headroom still in the system, and there is no obvious non-linear cliff-edge in behaviour looming.

Further Work

There are many dimensions in which this simple model could probably be improved. Whether such improvements are worth the extra complexity is hard to know. The current model may already be more complex than is worthwhile, eg eliminating the explicit storage component (and max diversion power) and instead simply limiting daily Wh as a previous version did, may be a better trade-off for little loss of accuracy.

It may be worthwhile modelling realistically-timed heat withdrawals from the battery; not all just after midnight as now.

It may be worthwhile modelling realistically-variable daily DHW use.

It may be worthwhile modelling storage losses explicitly.

There would probably be value in modelling against fine-grained grid CO2 intensity to see if that suggests a different Export Margin. There may be a local minimum of overall CO2 emissions, rather than a monotonic trade-off.

It would be useful to consider a system where the Export Margin can be adjusted in real-time. Maybe only a little or only in one direction, to ensure correct interoperation with other parts of the system. Should the margin be pushed up a little when the grid is 'red' (under stress) and/or as the heat battery nears/passes nominally full? Could this be improved with a solar PV nearcast to optimise results? If so, what should the base and deltas be?

2023-12-03: wish list

The useful residue of my TO-DO list:

  • sonify diversion at different margins
  • create Rust version of model

Effort Note

In a joking aside I told someone on a call that it took maybe an hour or three to write the first version of the model (once I realised that I had all the data I needed already), then about a day to debug it (mixing Wh and W was far too easy in one place), then about three days to write it up here to a decent standard. (And I will continue to tinker with the on-line version as needed...)

Then it took about 30 seconds to change the Eddi settings. Then a couple of days to observe the initial effect of the change.

Conclusions

All models are wrong, but some are useful.

Though this model is simple, it seems to reasonably match observations so far, and is generally plausible.

It seems possible to spill much more to grid while diverting, eg to help the grid when the Eddi happens to be diverting at high grid demand. As of writing the Export Margin is 100W. This model suggests that setting it to 400W will barely impact DHW support from diversion. 400W is higher than a lot of winter-time PV generation for 16WW!

As as result of this work the Eddi's Export Margin (and Export Threshold) will be raised to 400W by the end of and the system's behaviour observed. If DHW diversion seems to be curtailed too much then this may be reduced a little.

Postscript

2022-08-26: Observations

20220826 Eddi 400W Export Margin Enphase screenshot 20220903 Eddi 400W Export Margin Enphase screenshot 20220919 Eddi 350W Export Margin myenergi screenshot
Figure 3: (A) Enphase Enlighten screenshot on first sunny day (2022-08-26) after new Export Margin set (2022-08-24) with decent DHW demand and PV generation (blue, above the line) and import/export (black), showing the Eddi limiting export (below the line) to ~470W until the Thermino is full just before 4pm BST. Diversion was spread over ~7h. Exports are sometimes less than the limit because of other in-home consumption such as washing and cooking, and the Enphase battery charging. The limit is a little above the nominal Export Margin, possibly because the Eddi is deliberately conservative — it may be worth reducing the programmed margin to bring reality closer to the modelled value. (B) 2022-09-03 even clearer export flattening behaviour, and the Thermino though nominally over 100% was still able to accept more energy and did not quite fill; thus a potentially near-optimal diversion pattern. (C) 2022-09-19 a screenshot from the myenergi Web interface, this time once the margin had been adjusted down to 350W, on a day with sunny and cloudy intervals, and some big loads.

2022-08-29: Diversion by hour

A script carefully derived from the main one to preserve model behaviour computed mean diversion (W) each hour (UTC) with an 400W Export Margin:

% sh img/analytic/Eddi-Export-Margin-202208/OptExportMarginDiversionProfile.sh.20220829.sh
## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 7000
## MARGINW 400
#h   06   09   12
00    0    0    0
01    0    0    0
02    0    0    0
03    0    0    0
04    0    0    0
05   18    0    0
06  130    1    0
07  329   35    0
08  601  159    0
09  853  379    0
10  711  697    0
11  434  791    3
12  260  586    1
13  163  414    0
14  135  232    0
15   62   81    0
16   16    7    0
17   19    0    0
18    2    0    0
19    0    0    0
20    0    0    0
21    0    0    0
22    0    0    0
23    0    0    0

This output is captured and available in diversion-by-hour.txt.

As validation, summing the 06 (June) column gives a daily mean diverted energy of ~3.7kWh, in line with (Mar-to-Sep) values computed previously.

% sh img/analytic/Eddi-Export-Margin-202208/OptExportMarginDiversionProfile.sh.20220829.sh | awk '! /^#/ {sum+=$2} END {print sum}'
3733

Re-running with with the previous Export Margin of 100W yields:

## YEARSTOUSE 2019 2020 2021
## MAXDIVERTW 3000
## DHWWhPERDAY 4000
## STOREMAXWh 7000
## MARGINW 100
#h   06   09   12
00    0    0    0
01    0    0    0
02    0    0    0
03    0    0    0
04    1    0    0
05  102    0    0
06  268   12    0
07  521  122    0
08  816  320    0
09  825  612    0
10  491  936    6
11  338  759   36
12  170  500   27
13  128  323   11
14  120  231    2
15   48   79    0
16   28    7    0
17   33    1    0
18    9    0    0
19    0    0    0
20    0    0    0
21    0    0    0
22    0    0    0
23    0    0    0

Plotting the above yields Figure 4 below.

diversion by hour 400W margin diversion by hour 100W margin
Figure 4: (A) for a fixed 400W Export Margin, mean diversion (W) for each UTC hour of day for December (purple), September (green), June (blue, thick line). There is almost no usable diversion seen in December, as expected from previous analysis. September diversion peaks close to solar noon, which is grid-friendly since that is when the grid will be having to accept peak exports from other PV generators. June peaks a little higher and earlier in the day, during a typical morning GB grid demand peak; this could probably be mitigated by at least some dynamic modulation of the Export Margin if that becomes possible. (B) re-run with the original 100W Export Margin; the diversion peak is higher for September and even further before solar noon, so the new Export Margin is better in this regard.

The diversion peaks are pleasingly close to solar noon (closer and lower in the September shoulder month than at the 100W original Export Margin), requiring the grid to accept significantly less 16WW solar spill/export when other generators are likely to be spilling at their peak output.

2022-09-05: cowardice: 350W

Given the consistently higher (by more than 50W) export reading by the Enphase than the Eddi, (on an overcast day with poor generation and a half-full Thermino) the Export Margin (and Threshold) was lowered to 350W nominal, which is estimated to be just over 400W actual.

Additional manifest

Additional manifest items created for the postscript include:

Licensing is the same as described for other items in the manifest.

There is a 2022-09-03 dataset snapshot on GitHub also frozen as V1.0.0 and available via DOI 10.5281/zenodo.10252415 [hart-davis2022margin].

References

(Count: 2)