With just Solar PV it is a simple case of use it or export it. With a battery, the situation is much more complex and the question of battery size is not a single value but a range of possibilities with diminishing return.
I model my system using historical data to see if overnight grid charging is viable. I use hour slots, and compute energy movement for each hour, with the input variables being load and solar as kWh, and the modelled variables being battery capacity, and grid import and export, all as kWh. The output variable of interest is the battery capacity as kWh and SOC.
For each hour:
Excess solar energy is solar - load
Where positive:
- Charge to battery is Minimum of (remaining battery capacity, charge limit, solar excess)
So if I have 3 kWh excess over the load, I can put this into the battery if there is room and if this is below the battery charge limit
-
Export to grid is Minimum of (solar excess less battery charge used, grid export limit)
-
Any remaining is lost (inverter limiting)
If the solar excess is negative:
-
Unsatisfied load is the load - solar
-
Load met by battery is the Minimum of (unsatisfied load, battery charge remaining, battery discharge limit)
-
Grid Import is the remaining load not satisfied by solar and battery
These are a sequence of cascading equations. At the end, I have the new battery charge and capacity remaining, as well as grid import or export for the hour period.
I run this in Node-RED as it is easier. Although an approximation, it models battery SOC nicely.
Using the result is difficult, since I have to run the model time after time with different parameters to see if the battery either runs to empty or to full in a given day. In my model I can also change inverter behaviour, such as charge from grid to 100% at night, and then see what happens.
Deciding on a battery capacity is either a case of repeated modelling, or taking another approach.
Batteries are there for time shifting, and I think of this as in-day or between-day capacity.
In-day holds excess solar over the night period, and this can be thought-modelled at winter solstice, an equinox, and summer solstice. At the equinox solar generation is 12 hours, so the solar excess is roughly total solar less half a day-load. The night requirement is also half a day-load, so battery capacity needs to be half a typical load energy for one day.
For myself, my max-generated solar (sunny day) goes from 5kWh winter to 25kWh summer, and is 15kWh at the equinox. This just happens to also be my typical average daily load, hence my ideal battery capacity is 8kWh.
As a general rule, from past history of the daily maximum solar, identify the day when max solar equals typical load. For this day, identify hours of daylight D and hours of night N.
Ideal battery capacity is then L x N/24
More formally
S(max) - L x D/24 = L x N/24 = B(capacity)
hence
S(max) = L
and
Battery Capacity = L x N/24
This gives a nominal value for the largest capacity of practical use for holding excess solar overnight. Towards the summer there is more solar but less opportunity to use it, towards winter more opportunity but less solar.
A larger capacity offers inter-day storage, from excess over the day load on a sunny day to a following cloudy day. This is much more challenging to model since it depends on the relationship between sunny days and cloudy days.