Skip to main content

Summary

The battery model tracks the internal state of the energy storage system and derives the resulting power flows at each timestep. It runs in sequence: degradation updates the battery’s capacity and efficiency parameters, then the state of charge is updated based on available charge/discharge power, and finally DC and AC power are derived from the change in stored energy. Round-trip DC efficiency losses are applied during charging, and inverter efficiency losses are applied to both charge and discharge.

Inputs

NameSymbolUnitsDescription
Charge FlagFcF_cbooleanTrue if battery should charge (Dispatch Algorithms)
Discharge FlagFdF_dbooleanTrue if battery should discharge (Dispatch Algorithms)
Available Charge PowerPchargeP_{charge}WMaximum charge power at battery DC (Charge & Discharge Limits)
Available Discharge PowerPdischargeP_{discharge}WMaximum discharge power at battery DC (Charge & Discharge Limits)
Usable Energy Capacity Year 1Emax,1E_{max,1}WhInitial usable energy capacity
Nameplate Energy CapacityEnomE_{nom}kWhBattery nameplate capacity (for degradation normalization)
Round-Trip DC Efficiency Year 1ηRTE,1\eta_{RTE,1}Initial DC round-trip efficiency
Inverter Efficiencyηinv\eta_{inv}%Storage inverter conversion efficiency (converted to fraction)
Usable Capacity Cycle Degradation RatedE,cycled_{E,cycle}—/cycleCapacity loss per normalized discharge cycle
Usable Capacity Calendar Degradation RatedE,cald_{E,cal}—/yearCapacity loss per year of operation
RTE Cycle Degradation Ratedη,cycled_{\eta,cycle}—/cycleEfficiency loss per normalized discharge cycle
RTE Calendar Degradation Ratedη,cald_{\eta,cal}—/yearEfficiency loss per year of operation
Time IntervalΔt\Delta tminutesWeather data time interval
Time CounterttTimestep index (1-based)

Outputs

NameSymbolUnitsDescription
State of ChargeSOCSOCWhCurrent battery stored energy
Maximum CapacityEmaxE_{max}WhDegraded usable energy capacity
Round-Trip DC EfficiencyηRTE\eta_{RTE}Degraded DC round-trip efficiency
Battery DC PowerPDCP_{DC}WDC power flow (positive = charge, negative = discharge)
Battery AC ChargePAC,cP_{AC,c}WAC power drawn from the grid side to charge the battery
Battery AC DischargePAC,dP_{AC,d}WAC power delivered from the battery to the grid side
DC RTE LossLRTEL_{RTE}WRound-trip efficiency loss (reported during charging)
Inverter LossLinvL_{inv}WInverter conversion loss

Detailed Description

Initial Conditions

At the first timestep (t=1t = 1), the battery is initialized to full charge with year-1 parameters: SOC1=Emax,1,ηRTE,1=ηRTE,year1,PDC=0SOC_1 = E_{max,1}, \qquad \eta_{RTE,1} = \eta_{RTE,year1}, \qquad P_{DC} = 0

Degradation

For all subsequent timesteps (t2t \geq 2), degradation is calculated before the SOC update so that the battery operates with its current degraded parameters.

System Age

SystemAge=t8760×60/Δt\text{SystemAge} = \frac{t}{8760 \times 60 / \Delta t} where 8760 is the number of hours per year. The denominator converts from timesteps to years.

Cycle Degradation

Cycle degradation accumulates based on the previous timestep’s discharge energy, normalized by the previous maximum capacity. This means each discharge cycle degrades the battery proportionally to its depth. Cumulative capacity cycle degradation: DE,cycle=PAC,d,prev/ηinvEmax,prev×dE,cycle+DE,cycle,prevD_{E,cycle} = \frac{P_{AC,d,prev} / \eta_{inv}}{E_{max,prev}} \times d_{E,cycle} + D_{E,cycle,prev} Cumulative RTE cycle degradation: Dη,cycle=PAC,d,prev/ηinvEmax,prev×dη,cycle+Dη,cycle,prevD_{\eta,cycle} = \frac{P_{AC,d,prev} / \eta_{inv}}{E_{max,prev}} \times d_{\eta,cycle} + D_{\eta,cycle,prev} The term PAC,d,prev/ηinvP_{AC,d,prev} / \eta_{inv} converts the previous AC discharge back to DC to normalize against the DC-rated capacity.

Calendar Degradation

Calendar degradation is proportional to system age, independent of usage: Cumulative capacity calendar degradation: DE,cal=dE,cal×SystemAgeD_{E,cal} = d_{E,cal} \times \text{SystemAge} Cumulative RTE calendar degradation: Dη,cal=dη,cal×SystemAgeD_{\eta,cal} = d_{\eta,cal} \times \text{SystemAge}

Degraded Parameters

Cycle and calendar degradation effects are additive: Emax=Emax,1×(1(DE,cycle+DE,cal))E_{max} = E_{max,1} \times \left(1 - (D_{E,cycle} + D_{E,cal})\right) ηRTE=ηRTE,1×(1(Dη,cycle+Dη,cal))\eta_{RTE} = \eta_{RTE,1} \times \left(1 - (D_{\eta,cycle} + D_{\eta,cal})\right)

State of Charge

The SOC update uses the degraded EmaxE_{max} and ηRTE\eta_{RTE} from above. When both charge and discharge flags are set (possible with the LGIA Excess algorithm), the charge flag takes priority. Charging (Version 12): SOC=min ⁣(SOCprev+Pcharge×Δt60×ηRTE,  Emax)SOC = \min\!\left( SOC_{prev} + P_{charge} \times \frac{\Delta t}{60} \times \eta_{RTE},\; E_{max} \right) Charging (Versions 3–11): SOC=min ⁣(SOCprev+Pcharge×ηRTE,  Emax)SOC = \min\!\left( SOC_{prev} + P_{charge} \times \eta_{RTE},\; E_{max} \right) Discharging (Version 12): SOC=max ⁣(SOCprevPdischarge×Δt60,  0)SOC = \max\!\left( SOC_{prev} - P_{discharge} \times \frac{\Delta t}{60},\; 0 \right) Discharging (Versions 3–11): SOC=max ⁣(SOCprevPdischarge,  0)SOC = \max\!\left( SOC_{prev} - P_{discharge},\; 0 \right) Idle (Fc=FALSEF_c = \text{FALSE} and Fd=FALSEF_d = \text{FALSE}): SOC=SOCprevSOC = SOC_{prev} The Δt/60\Delta t / 60 factor converts the power (W) over the timestep interval (minutes) to energy (Wh). Round-trip DC efficiency (ηRTE\eta_{RTE}) is applied only during charging — the full charge power enters the battery, but only a fraction is stored. During discharge, no RTE loss is applied; the stored energy is released directly.

Battery DC Power

DC power is derived from the change in SOC, reversing the efficiency adjustments applied during the SOC update. Charging (SOC increased, Version 12): PDC=(SOCSOCprev)/ηRTEΔt/60P_{DC} = \frac{(SOC - SOC_{prev}) / \eta_{RTE}}{\Delta t / 60} Charging (Versions 3–11): PDC=SOCSOCprevηRTEP_{DC} = \frac{SOC - SOC_{prev}}{\eta_{RTE}} Discharging (SOC decreased, Version 12): PDC=SOCSOCprevΔt/60P_{DC} = \frac{SOC - SOC_{prev}}{\Delta t / 60} Discharging (Versions 3–11): PDC=SOCSOCprevP_{DC} = SOC - SOC_{prev} PDCP_{DC} is positive during charging and negative during discharging.

Battery AC Power

The inverter converts between DC and AC. Efficiency losses apply in opposite directions: AC Discharge (when PDC<0P_{DC} < 0): PAC,d=PDC×ηinvP_{AC,d} = -P_{DC} \times \eta_{inv} AC Charge (when PDC>0P_{DC} > 0): PAC,c=PDCηinvP_{AC,c} = \frac{P_{DC}}{\eta_{inv}} During discharge, the inverter converts DC to AC with efficiency losses. During charge, the inverter converts AC to DC, requiring more AC input than DC output.

Loss Reporting

Two losses are calculated for reporting purposes. They do not appear as separate steps in the power flow — they are embedded in the SOC and AC power calculations above. DC Round-Trip Efficiency Loss (charging only, when PDC>0P_{DC} > 0): LRTE=(1ηRTE)×PDCL_{RTE} = (1 - \eta_{RTE}) \times |P_{DC}| Inverter Efficiency Loss (charge and discharge): Linv=(1ηinv)×PDCL_{inv} = (1 - \eta_{inv}) \times |P_{DC}|