The battery model tracks the internal state of the energy storage system and derives the stored energy and the DC power at the battery terminals (magnitude and direction) at each timestep. It combines the charge/discharge intent from the Dispatch Algorithms, the power limits from the Charge & Discharge Limits, calendar and per-cycle degradation, and the previous timestep’s stored energy. Unlike the rest of the PlantPredict pipeline, this model is iterative—each timestep depends on the previous timestep’s state.
The model receives dispatch intent flags and power limits from upstream, then runs in sequence:
Degradation updates the battery’s capacity and efficiency parameters.
update adjusts stored energy based on the dispatch flags and available charge/discharge power. losses are consolidated into charging.
DC power is derived from the change in stored energy.
In the equations below, all state variables use functional notation—e.g., SOC(tn) is the state of charge at timestep n, and SOC(tn−1) is its value at the previous timestep. All energy and power values are in Wh and W, respectively.
The usable energy capacity Emax,init is derived from the nameplate energy capacity Enom and a usable capacity factor fusable (0 to 1):Emax,init=Enom×fusableThe user specifies any two of the three values and the third is calculated automatically. fusable accounts for depth-of-discharge limits and reserve margins imposed by the battery manufacturer.At the first timestep (n=0), the battery is initialized to full charge with its initial parameters. Emax,init is converted from MWh to Wh and ηRT,init from percentage to fraction before use.SOC(t0)=Emax,initηRT(t0)=ηRT,initPDC,batt(t0)=0
For all subsequent timesteps (n≥1), degradation is calculated before the SOC update so that the battery operates with its current degraded parameters. All degradation rates (dE,cycle, dE,year, dη,cycle, dη,year) are converted from percentages to fractions before use.Two quantities degrade over time: the usable energy capacity (DE terms) and the round-trip DC efficiency (Dη terms). Each has a cycle component—accumulated from discharge activity—and a calendar component proportional to elapsed time.
Cycle degradation is applied during discharge timesteps. When the previous timestep was not a discharge, the cumulative values carry forward unchanged. During discharge, the discharged energy is normalized by the previous maximum capacity.PDC,batt(tn−1)≥0⇒{DE,cycle(tn)=DE,cycle(tn−1)Dη,cycle(tn)=Dη,cycle(tn−1)PDC,batt(tn−1)<0⇒⎩⎨⎧DE,cycle(tn)=DE,cycle(tn−1)+Emax(tn−1)∣PDC,batt(tn−1)∣×dE,cycleDη,cycle(tn)=Dη,cycle(tn−1)+Emax(tn−1)∣PDC,batt(tn−1)∣×dη,cycle
Cycle and calendar degradation are summed and applied to the initial values to obtain the degraded parameters:Emax(tn)=Emax,init×(1−DE,cycle(tn)−DE,year(tn))ηRT(tn)=ηRT,init×(1−Dη,cycle(tn)−Dη,year(tn))
The SOC update uses the degraded Emax(tn) and ηRT(tn) from above. When both charge and discharge flags are set (possible with the Excess algorithm), the charge flag takes priority.Prior to Version 12, the equations below implicitly assumed δt=60 minutes (hourly timesteps). Sub-hourly ESS simulations were not supported and would produce erroneous results.
When charging (Fc=TRUE), the available charge power is converted to energy (multiplied by δt/60) and scaled by the round-trip efficiency before being added to the previous SOC, capped at the degraded maximum capacity:SOC(tn)=min(SOC(tn−1)+Pcharge×60δt×ηRT(tn),Emax(tn))In practice, round-trip losses occur across both charge and discharge. The model lumps the entire round-trip efficiency (ηRT) into the charge step—the full power enters the battery but only a fraction is stored—rather than splitting losses between the two directions.
When discharging (Fc=FALSE and Fd=TRUE), energy is drawn from the battery without round-trip losses. The SOC cannot drop below zero (empty battery):SOC(tn)=max(SOC(tn−1)−Pdischarge×60δt,0)
DC power is derived from the change in SOC, converting the change in stored energy back to power. PDC,batt(tn) is positive during charging, negative during discharging, and zero when idle.
When charging (SOC(tn)>SOC(tn−1)), the round-trip efficiency is divided out to recover the DC power that entered the battery:PDC,batt(tn)=ηRT(tn)×δt/60SOC(tn)−SOC(tn−1)>0
Since the round-trip efficiency is applied entirely during charging, the associated loss is reported during charging timesteps (PDC,batt(tn)>0):Lη(tn)=(1−ηRT(tn))×PDC,batt(tn)