Coulomb counting
Batteries: State of Charge and Cycle Life
On this page
The display said 60 percent at sunset, and at four in the morning the security lights went out. Or the battery that was sold “for ten years” holds half of its energy after four. In both cases the owner trusted one number on a screen and did not know how it was made. A battery is the most expensive part of a solar system for each kWh, and it is the part that is most often misread. This lesson shows what a battery stores, how its state of charge is known, and what decides how long it lives. #BatteryStorage #StateOfCharge #CycleLife
Learning Objectives
By the end of this lesson, you will be able to:
- Convert between capacity in Ah and energy in kWh, and express a current as a C-rate
- Explain how state of charge is found by counting charge, why the count drifts, and why voltage is a poor gauge for a flat curve
- Calculate the state of charge of a battery through a day from an energy balance, with the unmet load and the spilled solar energy
- Calculate the lifetime energy of a battery and the cost of each kWh stored from a cycle life curve and a price
- Describe what temperature, round-trip efficiency and the battery management system do
Real-World System Problem: The battery of the workshop
The site of this course has one battery of lithium iron phosphate cells: 51.2 V nominal and 300 Ah. It is charged by the array of 9.9 kWp through a hybrid inverter of 8 kW, and it carries the evening work and the night. The battery is used between 10 and 90 percent state of charge. These values are an example typical of this class of battery. For real equipment, the maker’s data sheet decides.
The load is 30 kWh a day, and 11 kWh of it falls between 18:30 and 06:30. The usable energy of the battery is a little above 12 kWh. On paper the night fits. Whether it fits on a real day depends on when the array stops covering the load, on the losses in each direction, and on the state in which the battery starts the evening.
The owner sees none of this. The owner sees a percentage. So the questions of this lesson are practical. Where does that percentage come from? How low does it go on a clear day? And what does each kWh that passes through the battery cost, when the battery is counted as something that wears out?
Fundamental Theory: What a battery stores and what wears it
Ampere hours and kilowatt hours
A battery label gives a capacity in ampere hours (Ah). It is a quantity of charge: 300 Ah means 300 A for one hour, or 30 A for ten hours. Charge is what the cells really store, and it is what a current sensor can count.
A load uses energy, in kWh. The link is the voltage:
with
C-rate
The C-rate compares a current with the capacity. A current equal to the capacity number is 1 C, and it would empty a full battery in one hour.
The site battery allows 150 A continuously, which is
State of charge and depth of discharge
The state of charge (SoC) is the charge in the battery as a share of its capacity: 100 percent is full and 0 percent is empty. The depth of discharge (DoD) of a cycle is the share of the capacity that the cycle uses. A battery that moves between 90 and 10 percent has a depth of discharge of 80 percent.
The site battery is kept inside that window. Its usable energy is
Lead-acid and lithium iron phosphate
Two families of battery are common in solar systems. The table gives what is typical of each class. It is a guide for reading data sheets, and the data sheet of the real battery decides.
| Lead-acid | Lithium iron phosphate | |
|---|---|---|
| Nominal voltage of a cell | 2.0 V | 3.2 V |
| Usual depth of discharge in daily use | about 50 percent | 80 to 90 percent |
| Round-trip efficiency | about 80 percent | above 90 percent |
| Left partly charged for weeks | loses capacity | not harmed |
| Resting voltage against state of charge | slopes | almost flat |
| Mass for the same energy | several times more | less |
| Electronics needed | simple | a management system for each battery |
A lead-acid battery costs less to buy for each kWh of nameplate. Because only about half of it is used in each cycle, and because it gives fewer cycles, the cost of each kWh that it delivers is often higher. The method of Application 2 makes that comparison for any two data sheets.
State of charge by counting charge
No instrument looks inside a cell and reads its state of charge. The usual method is to count, like a fuel gauge that counts the litres pumped in and out: a sensor measures the current
The count is exact only if the sensor is exact, and no sensor is. A small error of one sign is added at every moment of every day: a sensor that reads 0.2 A too high, on a battery whose currents reach more than 100 A, adds
The count also needs the capacity
So every monitor needs a point where it corrects itself: full charge, which the voltage shows clearly. A battery that reaches full charge on most days keeps an honest count; one that stays in the middle of its range for weeks does not.
Why voltage is a poor gauge
It seems simpler to read the voltage. A lead-acid battery at rest gives a rough reading, because its voltage falls steadily with the state of charge. Lithium iron phosphate does not: between about 20 and 80 percent the resting voltage of a cell changes by only a few hundredths of a volt, rising steeply only near full and falling steeply only near empty.
A second problem: the terminal voltage moves with the current, sagging under load and rising on charge by more than the whole flat part of the curve. A reading taken while the battery works says more about the current than about the state of charge.
The flat curve is good for the load, which sees a steady voltage while the battery empties, and bad for the gauge. The owner in the first paragraph of this lesson was most likely looking at a count that had drifted.
Depth of discharge and cycle life
A battery does not fail on one day. It loses capacity a little with each cycle, and the usual end of life is the point where it holds 80 percent of its nameplate. The number of cycles to that point is the cycle life.
Deeper cycles wear the cells more. This course uses an assumed example curve for the site battery:
| Depth of discharge | Assumed cycle life |
|---|---|
| 50 percent | 10,000 cycles |
| 80 percent | 6,000 cycles |
| 100 percent | 3,500 cycles |
Cycles are one of two clocks. The other is the calendar: cells age with time even when they rest, and faster when they are hot or kept full. A battery reaches its end by whichever clock finishes first.
Temperature
Cold reduces the capacity that a battery can deliver and the current that it can take. Lithium cells must not be charged when they are below freezing, because the charge damages them, and a management system blocks charging there. Heat does the opposite harm: the battery works well and ages fast. A battery room that is shaded and ventilated is part of the design.
Round-trip efficiency
A battery returns less energy than it receives. The round-trip efficiency
To take 1 kWh out,
The battery management system
A lithium battery always comes with a battery management system (BMS). It measures the voltage of every cell, the current and several temperatures; keeps the cells in balance, so that no cell is full before the others; reports the state of charge to the inverter; and opens the circuit if a cell voltage, the current or a temperature leaves its limits.
The BMS is a protection that acts in milliseconds, inside the battery, without any connection to anything else. The inverter is set so that the BMS never has to act: the charge limit, the discharge limit and the state of charge window are settings of normal operation, with the BMS behind them.
Application 1: The site battery through one day
Step 1: Check the load and the battery
Click to reveal the calculation
-
Daily energy. Each block is its power multiplied by its hours. The sum is 30.00 kWh. ✅
-
Night energy. From 18:30 to 06:30:
kWh. ✅ -
Peak. 6.50 kW, from 11:00 to 11:30. ✅
-
What the battery can deliver. The window holds 12.288 kWh. After the loss on discharge the battery delivers
kWh of direct current. ✅ -
The night alone. The night load takes
kWh of direct current. That is below 11.79 kWh, so the night alone fits. ✅
Step 2: Find the real night of the battery
Click to reveal the calculation
-
When the array covers the load. The array power rises from zero at 06:30. It first exceeds the load at 07:20, and it falls below the load again at 16:40. Between 16:40 and 07:20 the battery must help. ✅
-
The shortage outside the night. From 16:40 to 18:30 the load takes 1.60 kW of direct current and the array gives less and less. The shortage in that time is 1.91 kWh. From 06:30 to 07:20 it is 0.18 kWh. ✅
-
The whole shortage.
✅
-
Against the battery. The battery can deliver 11.79 kWh. It is short by
kWh of direct current (the script keeps more digits), which is kWh at the load. ✅
Step 3: The state of charge through the clear day
Click to reveal the result
-
Run the balance. The script gives the state of charge at each step. Some points of the day:
Clock Array (kW) Load as direct current (kW) SoC (percent) 00:00 0.00 0.52 22.8 03:40 0.00 0.52 10.0 07:20 0.33 0.31 10.0 10:00 4.46 1.34 28.2 11:00 6.04 6.70 42.8 11:30 6.60 3.61 41.4 13:05 6.91 0.72 90.0 16:40 1.51 1.60 90.0 18:30 0.00 1.80 77.0 22:30 0.00 0.52 28.0 ✅
-
The lowest point. The battery reaches its lower limit of 10 percent at 03:40 and stays there until the array covers the load at 07:20. In that time the load of about 0.5 kW is unmet by the solar system: 1.60 kWh, which is 5.3 percent of the day’s load. ✅
-
The start of the evening. At sunset, 18:30, the battery is already down to 77.0 percent. It has given 13 percent of its capacity before the night began. ✅
-
The peak at 11:00. For half an hour the load takes 6.70 kW and the array gives 6.04 to 6.60 kW. The battery gives the difference, and its state of charge falls from 42.8 to 41.4 percent in the middle of a clear morning. ✅
-
The afternoon. The battery is full at 13:05. From then until 16:40 the array could give more than the load takes, and there is nowhere to put it. ✅
Step 4: Energy through the battery, and two other days
Click to reveal the result
-
Clear day. The array gives 42.47 kWh. The battery takes in 13.03 kWh and gives out 11.99 kWh, so 1.04 kWh is lost in it. The energy spilled is 12.15 kWh, which is 29 percent of what the array gave. ✅
-
Cycle. The state of charge swings over the full 80 percent. With the small discharge at 11:00, the cells give 0.81 of a full cycle in the day. ✅
-
Worst month, 4.5 peak sun hours. The array gives 34.75 kWh. The battery still fills, at 14:10. The unmet load is 1.83 kWh and 4.61 kWh is spilled. ✅
-
Cloudy day. With
cloud=1.0the day has 3.114 kWh/m² and the array gives 24.05 kWh. The battery never fills: its highest point is 57.1 percent, and it is empty before midnight. The unmet load is 7.57 kWh, one quarter of the load, and nothing is spilled. ✅ -
A larger battery. With 350 Ah in place of 300 Ah the clear day has no unmet load, and the lowest state of charge is 11.8 percent. ✅
Step 5: Check the balance
Click to reveal the check
-
Energy in and out. The load served takes
kWh of direct current. This equals the energy from the array. Nothing is lost from the count. ✅
-
Efficiency. The battery gives out
of what it takes in, the stated round-trip efficiency. ✅ -
Currents. The largest charge current of the day is 119 A and the largest discharge current is 35 A, both inside the limit of 150 A. ✅
-
Two methods. The unmet load from the shortage in Step 2 and from the step by step balance is the same 1.60 kWh. ✅
Application 2: Lifetime energy and the cost of a stored kWh
Step 1: Lifetime energy by cycles only
Click to reveal the calculation
-
Price.
currency units. ✅ -
Energy of one cycle. Depth of discharge multiplied by 15.36 kWh: 7.68, 12.29 and 15.36 kWh. ✅
-
Lifetime energy and cost.
DoD Cycles kWh a cycle Lifetime kWh Cost per kWh Years at one cycle a day 50 percent 10,000 7.68 76,800 6.00 27.4 80 percent 6,000 12.29 73,728 6.25 16.4 100 percent 3,500 15.36 53,760 8.57 9.6 ✅
-
Read the table. By cycles alone, the shallow cycle gives the most energy and the lowest cost. The full cycle gives 30 percent less energy than the shallow one. ✅
Step 2: The calendar
Click to reveal the calculation
-
Cycles that fit in the calendar. In 15 years at one cycle a day there are
cycles. ✅ -
At 50 percent. The battery would need 27.4 years to use its 10,000 cycles. It uses only 5,475.
✅
-
At 80 percent. 6,000 cycles need 16.4 years, so the calendar ends first here too, but only just.
kWh, and the cost is 6.85 currency units per kWh. ✅ -
At 100 percent. The cycles end first, after 9.6 years. The cost stays 8.57 currency units per kWh. ✅
-
Compare. With both clocks counted, the order changes: 80 percent is the cheapest at 6.85, then 100 percent at 8.57, then 50 percent at 10.96. ✅
Step 3: Check with the same daily energy
Click to reveal the check
-
Three batteries for one task. To give 12.29 kWh every day, a battery cycled at 50 percent must have 24.58 kWh of nameplate, at 80 percent 15.36 kWh, and at 100 percent 12.29 kWh. Their prices are 737,280, 460,800 and 368,640 currency units. ✅
-
Cost of each kWh. The first two last 15 years and give
kWh. The costs are and . The third lasts 3,500 days and gives 43,008 kWh, at . The three costs agree with Step 2. ✅ -
With the charging energy. If the battery is charged with energy worth 22 currency units per kWh, each kWh taken out needs
of energy. With the wear at 80 percent the stored kWh costs currency units. ✅
Verify It in Python
The script holds the irradiance generator of the course and the load of the site as a function. It checks the load, runs the day balance for three days, prints the check by hand, shows the drift of a charge count, and calculates the lifetime energy and the cost of storage. It saves a plot of the clear day and of the state of charge on the three days.
"""One day of the site battery at 5-minute steps, and the cost of each kWh it stores."""import numpy as npimport matplotlib.pyplot as plt
def daily_irradiance(day=0, seed=5, step_min=5, psh=5.5, cloud=0.0): """Plane-of-array irradiance (W/m2) through one day near the equator. Clear shape: sine squared between 06:30 and 18:30 scaled to `psh` peak sun hours. `cloud` between 0 and 1 adds passing cloud. Returns hours, irradiance.""" rng = np.random.default_rng(seed + day) h = np.arange(0, 24, step_min / 60.0) x = np.clip((h - 6.5) / 12.0, 0, 1) g = np.sin(np.pi * x) ** 2 g = g * psh / (g.sum() * step_min / 60.0) * 1000.0 if cloud > 0: k = np.ones_like(h) for _ in range(int(12 * cloud)): c = rng.uniform(7, 18); w = rng.uniform(0.1, 0.6) k *= 1 - 0.6 * np.exp(-0.5 * ((h - c) / w) ** 2) g = g * k return h, g
LOAD_EDGES = [0.0, 6.5, 8.0, 8.5, 10.5, 11.0, 11.5, 12.0, 13.0, 14.0, 16.5, 18.5, 22.5, 24.0]LOAD_KW = [0.50, 0.30, 0.90, 1.30, 4.30, 6.50, 3.50, 1.30, 0.70, 1.30, 1.55, 1.75, 0.50]
def load_kw(h): """AC load (kW) of the site at clock hour h (0 to 24): constant in each block.""" i = np.searchsorted(LOAD_EDGES, np.asarray(h) + 1e-9, side="right") - 1 return np.array(LOAD_KW)[i]
KWP, PR_DC, ETA_INV = 9.9, 0.78, 0.97V_NOM, AH, ETA_RT, I_MAX = 51.2, 300.0, 0.92, 150.0E_NOM = V_NOM * AH / 1000.0 # kWhE_LO, E_HI = 0.10 * E_NOM, 0.90 * E_NOMETA_ONE = np.sqrt(ETA_RT) # charge and discharge taken as equalP_MAX = V_NOM * I_MAX / 1000.0 # kW at the battery terminalsDT = 5.0 / 60.0
def clock(x): """Clock time as text from an hour number.""" m = int(round(x * 60)) return f"{m // 60:02d}:{m % 60:02d}"
def run_day(g, load, kwp=KWP, e_nom=E_NOM, days=30): """Repeat the same day until it starts and ends at the same state of charge. Returns the SoC trace and the day's energies (kWh).""" pv = kwp * g / 1000.0 * PR_DC # kW of direct current from the array need = load / ETA_INV # kW of direct current that the load takes lo, hi = 0.10 * e_nom, 0.90 * e_nom e = 0.5 * e_nom for _ in range(days): soc = np.zeros(len(g)) p_bat = np.zeros(len(g)) # kW at the terminals, plus is charging charged = discharged = spilled = unmet = 0.0 for k in range(len(g)): net = pv[k] - need[k] if net >= 0: p = min(net, P_MAX, (hi - e) / (ETA_ONE * DT)) e += p * ETA_ONE * DT charged += p * DT spilled += (net - p) * DT p_bat[k] = p else: p = min(-net, P_MAX, (e - lo) * ETA_ONE / DT) e -= p / ETA_ONE * DT discharged += p * DT unmet += (-net - p) * ETA_INV * DT p_bat[k] = -p soc[k] = e / e_nom return soc, dict(pv=pv.sum() * DT, p_bat=p_bat, charged=charged, discharged=discharged, spilled=spilled, unmet=unmet)
h, g = daily_irradiance()load = load_kw(h)night = (h + 1e-9 < 6.5) | (h + 1e-9 >= 18.5)
# ---------- The battery and the load shape ----------print("The battery")print(f" {AH:.0f} Ah x {V_NOM} V = {E_NOM:.2f} kWh; used from 10 % to 90 %: " f"{E_HI - E_LO:.3f} kWh")print(f" {I_MAX:.0f} A is {I_MAX / AH:.2f} C and {P_MAX:.2f} kW; " f"one-way efficiency {ETA_ONE:.4f}")print(f" the 6.5 kW peak takes {6.5 / ETA_INV:.2f} kW of direct current, " f"{6.5 / ETA_INV * 1000 / V_NOM:.0f} A, {6.5 / ETA_INV * 1000 / V_NOM / AH:.2f} C")print("The load shape")print(f" total {load.sum() * DT:.2f} kWh, between 18:30 and 06:30 " f"{load[night].sum() * DT:.2f} kWh, peak {load.max():.2f} kW")
# ---------- Application 1: one day ----------cases = (("clear day, 5.5 peak sun hours", daily_irradiance()[1]), ("worst month, 4.5 peak sun hours", daily_irradiance(psh=4.5)[1]), ("cloudy day, cloud=1.0", daily_irradiance(cloud=1.0)[1]))print("Application 1: the day balance (kWh)")results = {}for name, gg in cases: soc, r = run_day(gg, load) results[name] = soc kmin, kmax = soc.argmin(), soc.argmax() print(f" {name}: sun {gg.sum() * DT / 1000:.3f} kWh/m2, array {r['pv']:.2f}") print(f" into the battery {r['charged']:.2f}, out of it {r['discharged']:.2f}, " f"spilled {r['spilled']:.2f}, unmet load {r['unmet']:.2f}") print(f" SoC at midnight {100 * soc[-1]:.1f} %, lowest {100 * soc.min():.1f} % at " f"{clock(h[kmin] + DT)}, highest {100 * soc.max():.1f} %, " f"first reached at {clock(h[kmax] + DT)}") print(f" swing {100 * (soc.max() - soc.min()):.1f} % of capacity, " f"{r['discharged'] / ETA_ONE / E_NOM:.2f} of a full cycle")
soc, r = run_day(g, load)pv = KWP * g / 1000.0 * PR_DCneed = load / ETA_INVshort = np.clip(need - pv, 0, None) # kW that the array does not coverk_on = np.argmax(pv >= need)k_off = len(h) - 1 - np.argmax((pv >= need)[::-1])eve = (h > 12) & ~nightmorn = (h < 12) & ~night & (np.arange(len(h)) < k_on)print(" clear day, check by hand")print(f" array peak {pv.max():.2f} kW; it first covers the load at {clock(h[k_on])} " f"and last covers it until {clock(h[k_off + 1])}")print(f" not covered by the array: evening before 18:30 {short[eve].sum() * DT:.2f}, " f"night {short[night].sum() * DT:.2f}, morning after 06:30 {short[morn].sum() * DT:.2f}, " f"total {(short[eve | night | morn]).sum() * DT:.2f}")print(f" the battery can deliver {(E_HI - E_LO):.3f} x {ETA_ONE:.4f} = " f"{(E_HI - E_LO) * ETA_ONE:.2f}; short by " f"{short[eve | night | morn].sum() * DT - (E_HI - E_LO) * ETA_ONE:.2f} as direct current, " f"{(short[eve | night | morn].sum() * DT - (E_HI - E_LO) * ETA_ONE) * ETA_INV:.2f} at the load")print(f" night alone: {load[night].sum() * DT:.0f} / {ETA_INV} / {ETA_ONE:.4f} = " f"{load[night].sum() * DT / ETA_INV / ETA_ONE:.2f} from the cells, " f"{100 * load[night].sum() * DT / ETA_INV / ETA_ONE / E_NOM:.1f} % of capacity")print(f" balance: array {r['pv']:.2f} = load served {need.sum() * DT - r['unmet'] / ETA_INV:.2f} " f"+ battery loss {r['charged'] - r['discharged']:.2f} + spilled {r['spilled']:.2f}")print(" clock array kW load kW (DC) SoC % at that time")for t in ("00:00", "03:40", "06:30", "07:20", "10:00", "10:30", "11:00", "11:30", "12:00", "13:05", "16:40", "18:30", "22:30"): k = (int(t[:2]) * 60 + int(t[3:])) // 5 print(f" {t} {pv[k]:7.2f} {need[k]:9.2f} {100 * soc[k - 1]:10.1f}")for ah in (300, 350, 400): s2, r2 = run_day(g, load, e_nom=V_NOM * ah / 1000.0) print(f" with {ah} Ah: unmet load {r2['unmet']:.2f}, spilled {r2['spilled']:.2f}, " f"lowest SoC {100 * s2.min():.1f} %")
# ---------- Coulomb counting with a small sensor error ----------amps = r["p_bat"] * 1000.0 / V_NOM # A at the terminals, plus is chargingOFFSET = 0.2 # A, a stated sensor errorprint("Coulomb counting")print(f" largest current of the clear day: {amps.max():.0f} A charging at " f"{clock(h[amps.argmax()])}, {-amps.min():.0f} A discharging at {clock(h[amps.argmin()])}")print(f" a sensor that reads {OFFSET} A too high adds {OFFSET * 24:.1f} Ah a day: " f"{100 * OFFSET * 24 / AH:.1f} % of SoC a day, {100 * OFFSET * 24 * 30 / AH:.0f} % in 30 days")
# ---------- Application 2: lifetime energy and cost of storage ----------PRICE_PER_KWH, CAL_YEARS = 30000.0, 15.0 # stated assumptionsprice = PRICE_PER_KWH * E_NOMprint("Application 2: lifetime energy and cost of each kWh stored")print(f" battery price {price:,.0f} currency units ({PRICE_PER_KWH:,.0f} per kWh of nameplate)")print(" DoD cycles kWh a cycle lifetime kWh cost per kWh years at one cycle a day")for dod, cycles in ((0.5, 10000), (0.8, 6000), (1.0, 3500)): per = dod * E_NOM life = per * cycles print(f" {100 * dod:3.0f} % {cycles:6d} {per:9.2f} {life:12,.0f} {price / life:10.2f} " f"{cycles / 365:10.1f}")print(f" with a calendar life of {CAL_YEARS:.0f} years and one cycle a day:")for dod, cycles in ((0.5, 10000), (0.8, 6000), (1.0, 3500)): used = min(cycles, CAL_YEARS * 365) life = dod * E_NOM * used print(f" {100 * dod:3.0f} % {used:6.0f} cycles used {life:8,.0f} kWh " f"{price / life:6.2f} per kWh battery for 12.29 kWh a day: " f"{0.8 * E_NOM / dod:5.2f} kWh, {PRICE_PER_KWH * 0.8 * E_NOM / dod:9,.0f}")c80 = price / (0.8 * E_NOM * min(6000, CAL_YEARS * 365))print(f" energy lost in the round trip: {100 * (1 / ETA_RT - 1):.1f} % more must be put in; " f"with charging energy at 22 per kWh that adds {22 * (1 / ETA_RT - 1):.2f} per kWh")print(f" stored grid energy at 80 % DoD costs 22 / {ETA_RT} + {c80:.2f} = " f"{22 / ETA_RT + c80:.2f} per kWh")
# ---------- Plot ----------fig, ax = plt.subplots(2, 1, figsize=(8, 8), sharex=True)ax[0].plot(h, pv, label="array, direct current (kW)")ax[0].step(h, need, where="post", label="load, as direct current (kW)")ax[0].set_ylabel("power (kW)")ax[0].set_title("Clear day: array and load")ax[0].legend()for name, s in results.items(): ax[1].plot(h, 100 * s, label=name)ax[1].axhline(10, color="gray", lw=0.8)ax[1].axhline(90, color="gray", lw=0.8)ax[1].set_xlabel("hour of the day")ax[1].set_ylabel("state of charge (%)")ax[1].set_title("Battery state of charge, repeated day")ax[1].legend()fig.tight_layout()fig.savefig("battery_day.png", dpi=120)print("Saved battery_day.png")Expected output
The battery 300 Ah x 51.2 V = 15.36 kWh; used from 10 % to 90 %: 12.288 kWh 150 A is 0.50 C and 7.68 kW; one-way efficiency 0.9592 the 6.5 kW peak takes 6.70 kW of direct current, 131 A, 0.44 CThe load shape total 30.00 kWh, between 18:30 and 06:30 11.00 kWh, peak 6.50 kWApplication 1: the day balance (kWh) clear day, 5.5 peak sun hours: sun 5.500 kWh/m2, array 42.47 into the battery 13.03, out of it 11.99, spilled 12.15, unmet load 1.60 SoC at midnight 22.8 %, lowest 10.0 % at 03:40, highest 90.0 %, first reached at 13:05 swing 80.0 % of capacity, 0.81 of a full cycle worst month, 4.5 peak sun hours: sun 4.500 kWh/m2, array 34.75 into the battery 13.67, out of it 12.58, spilled 4.61, unmet load 1.83 SoC at midnight 21.3 %, lowest 10.0 % at 03:15, highest 90.0 %, first reached at 14:10 swing 80.0 % of capacity, 0.85 of a full cycle cloudy day, cloud=1.0: sun 3.114 kWh/m2, array 24.05 into the battery 11.58, out of it 10.65, spilled 0.00, unmet load 7.57 SoC at midnight 10.0 %, lowest 10.0 % at 00:05, highest 57.1 %, first reached at 15:45 swing 47.1 % of capacity, 0.72 of a full cycle clear day, check by hand array peak 7.08 kW; it first covers the load at 07:20 and last covers it until 16:40 not covered by the array: evening before 18:30 1.91, night 11.34, morning after 06:30 0.18, total 13.43 the battery can deliver 12.288 x 0.9592 = 11.79; short by 1.65 as direct current, 1.60 at the load night alone: 11 / 0.97 / 0.9592 = 11.82 from the cells, 77.0 % of capacity balance: array 42.47 = load served 29.28 + battery loss 1.04 + spilled 12.15 clock array kW load kW (DC) SoC % at that time 00:00 0.00 0.52 22.8 03:40 0.00 0.52 10.0 06:30 0.00 0.31 10.0 07:20 0.33 0.31 10.0 10:00 4.46 1.34 28.2 10:30 5.31 4.43 39.1 11:00 6.04 6.70 42.8 11:30 6.60 3.61 41.4 12:00 6.96 1.34 51.3 13:05 6.91 0.72 90.0 16:40 1.51 1.60 90.0 18:30 0.00 1.80 77.0 22:30 0.00 0.52 28.0 with 300 Ah: unmet load 1.60, spilled 12.15, lowest SoC 10.0 % with 350 Ah: unmet load 0.00, spilled 10.36, lowest SoC 11.8 % with 400 Ah: unmet load 0.00, spilled 10.36, lowest SoC 21.6 %Coulomb counting largest current of the clear day: 119 A charging at 13:00, 35 A discharging at 18:30 a sensor that reads 0.2 A too high adds 4.8 Ah a day: 1.6 % of SoC a day, 48 % in 30 daysApplication 2: lifetime energy and cost of each kWh stored battery price 460,800 currency units (30,000 per kWh of nameplate) DoD cycles kWh a cycle lifetime kWh cost per kWh years at one cycle a day 50 % 10000 7.68 76,800 6.00 27.4 80 % 6000 12.29 73,728 6.25 16.4 100 % 3500 15.36 53,760 8.57 9.6 with a calendar life of 15 years and one cycle a day: 50 % 5475 cycles used 42,048 kWh 10.96 per kWh battery for 12.29 kWh a day: 24.58 kWh, 737,280 80 % 5475 cycles used 67,277 kWh 6.85 per kWh battery for 12.29 kWh a day: 15.36 kWh, 460,800 100 % 3500 cycles used 53,760 kWh 8.57 per kWh battery for 12.29 kWh a day: 12.29 kWh, 368,640 energy lost in the round trip: 8.7 % more must be put in; with charging energy at 22 per kWh that adds 1.91 per kWh stored grid energy at 80 % DoD costs 22 / 0.92 + 6.85 = 30.76 per kWhSaved battery_day.pngCommon Mistakes
- Comparing batteries by Ah without the voltage. Energy is Ah multiplied by volts.
- Taking the nameplate energy as usable energy. The window of state of charge, the loss on discharge and the inverter loss all come off it. Of the 15.36 kWh of the site battery, 11.43 kWh reaches the load in one cycle.
- Reading the state of charge of a lithium iron phosphate battery from its voltage. The curve is flat in the middle, and the voltage moves more with the current than with the charge.
- Trusting a charge count that has not seen a full charge for weeks. The count drifts, and only a full charge corrects it.
- Sizing the battery for the hours of darkness. The battery starts to discharge when the array stops covering the load, which is before sunset.
- Reading a cycle life figure without its depth of discharge and its conditions, or reading it as a promise. And forgetting the calendar: a battery that is cycled very gently can grow old before it has given its energy.
Summary
- Capacity in Ah multiplied by the nominal voltage gives energy: 300 Ah at 51.2 V is 15.36 kWh, of which 12.29 kWh is used between 10 and 90 percent.
- State of charge is found by counting the current. The count drifts, by 1.6 percent a day for a sensor error of 0.2 A, and it is corrected at full charge. Voltage is a poor gauge for the flat curve of lithium iron phosphate.
- On a clear day of the course, the site battery is full at 13:05, starts to discharge at 16:40 and reaches its lower limit at 03:40. The unmet load is 1.60 kWh and 12.15 kWh of solar energy is spilled.
- On the assumed example curve and a stated price, the wear of the battery costs 6.00 to 8.57 currency units for each kWh by cycles alone, and 6.85 at 80 percent depth of discharge when a calendar life of 15 years is counted.
- A battery has two clocks, cycles and years, and a good design uses both.
- The BMS protects the cells locally. The settings of the inverter keep the battery inside its limits in normal operation.
Exercises
1. A battery has a capacity of 200 Ah and a nominal voltage of 25.6 V. It is used between 20 and 100 percent state of charge. Find its nameplate energy and its usable energy.
Answer
2. A battery of 280 Ah is discharged at 100 A. Find the C-rate and the time from full to empty at that current.
Answer
3. A monitor counts charge on a battery of 200 Ah. The state of charge is 80 percent. The battery is then discharged at 30 A for 2.5 hours and charged at 20 A for 1 hour. Find the state of charge that the monitor shows.
Answer
Discharge:
4. A battery has a round-trip efficiency of 0.85. A site takes 6 kWh from it every night. How much energy must be put into the battery each day?
Answer
5. The current sensor of a battery of 300 Ah reads 0.5 A too low. The battery does not reach full charge for 10 days. How far is the displayed state of charge from the true one?
Answer
6. A battery of 10 kWh costs 280,000 currency units. Its data sheet gives 4,000 cycles at 80 percent depth of discharge, and its calendar life is taken as 10 years. It makes one cycle a day at 80 percent. Find the cost of each kWh stored by cycles alone and with the calendar life.
Answer
By cycles:
References
- D. Linden and T. B. Reddy (editors), Handbook of Batteries, 3rd edition, McGraw-Hill, 2002.
- G. M. Masters, Renewable and Efficient Electric Power Systems, 2nd edition, Wiley, 2013.
- R. A. Messenger and A. Abtahi, Photovoltaic Systems Engineering, 4th edition, CRC Press, 2017.
A workshop uses 11 kWh between sunset and sunrise. Its battery can deliver 11.8 kWh, and on a clear day it is full soon after 13:00. Does the battery carry the load until the morning?
The figure runs the day balance of this lesson at 5-minute steps, and at the start it has the lesson's values: a battery of 300 Ah at 51.2 V, 18 modules of 550 W, a clear day of 5.5 peak sun hours and the load table of the site. The array feeds the load first. A surplus charges the battery up to 90 percent and the rest is spilled. A shortage is taken from the battery down to 10 percent and the rest is unmet load, for the grid or the generator. Both power lines are in kW of direct current: the array after the factor 0.78, and the load divided by the inverter efficiency of 0.97. The battery has a one-way efficiency of 0.9592 and a power limit of 7.68 kW for every size. The day is a clear day without cloud, and it is repeated until the state of charge at midnight repeats. The shaded hours are 18:30 to 06:30, and the night load slider multiplies the load in those hours only. Clock times are the end of a 5-minute step. All values are an example, and the data sheet of real equipment decides.
Check yourself
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. On the clear day the battery of 300 Ah leaves 1.60 kWh of load unmet. The battery is changed to 350 Ah at the same voltage and with the same limits. What happens to the unmet load?
2. In the worst month the array gives 34.75 kWh in the day in place of 42.47 kWh, which is 7.72 kWh less. Where does most of that loss appear?
3. At sunset, 18:30, the battery of 15.36 kWh is at 77.0 percent. Its lower limit is 10 percent and its one-way efficiency is 0.9592. The load needs 11.34 kWh of direct current before 06:30. Can the battery deliver it?
- A sensor on the battery cable measures the current; the monitor adds it up: charge in, charge out.
- A sensor 0.2 A too high adds 4.8 Ah a day: 1.6 percent a day, 48 percent after 30 days.
- Aged cells hold 250 Ah, the count divides by 300: the display shows 25 % when 10 % is left.
- At full charge the voltage is clear and the count resets. Full every day keeps the error under 1.6 %.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.