## 2 Materials and Methods
### System Components
#### 2.4.5 Battery Energy Storage (BES)  
In HOMER simulations, BES systems serve as an energy buffer, storing excess generation and supplying power when demand exceeds production. HOMER models each battery's capacity, state of charge (SOC), charge/discharge efficiencies, and lifetime constraints, ensuring system dispatch decisions and economic calculations reflect real-world BES performance. This approach accurately assesses reliability, cost, and feasibility in a microgrid or HES. HOMER tracks the SOC of BES on an hourly or sub-hourly basis. SOC is typically expressed as a fraction (0 to 1) or a percentage (0 to 100%), as defined in Equation (9). \[0\leq SOC_{t}\leq 1 \tag{9}\]  
During each time step \(\Delta t\) (often 1 h), the BES can charge, discharge, or idle. SOC's simplified one-hour step model can be written as shown in Equation (10). \[SOC_{t+1}=SOC_{t}+\frac{\eta_{c}P_{ch,t}-\frac{1}{\eta_{d}}P_{dch,t}}{E_{max}} \tag{10}\]  
where \(SOC_{t}\) and \(SOC_{t+1}\) are the state of charges at the current and next time step (fraction 0-1), \(P_{ch,t}\) is the charging power in the current step (kW), \(P_{dch,t}\) is the discharging power in the current step (kW), \(\eta_{c}\) is the charging efficiency, \(\eta_{d}\) is the discharging efficiency, and \(E_{max}\) is the usable BES capacity (kWh). HOMER enforces minimum and maximum SOC limits to prevent over-discharge or overcharge, as shown in Equation (11). \[SOC_{min}\leq SOC_{t}\leq SOC_{max} \tag{11}\]  
Many BES specifications use depth of discharge (DOD) to limit how much capacity can be used regularly. If the BES's minimum state of charge is \(SoC_{min}\) then \(DOD_{max}\) is defined as Equation (12). \[DOD_{max}=1-SOC_{min} \tag{12}\]  
For example, if a BES must always retain at least 20% SOC, the maximum DOD is 80%. HOMER ensures the SOC of the BES never goes below \(SOC_{min}\). The overall roundtrip efficiency is defined as shown in Equation (13), indicating the fraction of energy retained after a full charge-discharge cycle relative to what was put in. \[\eta_{rt}=\eta_{c}\times\eta_{d} \tag{13}\]  
HOMER may apply separate efficiencies for charging (\(\eta_{c}\)) and discharging (\(\eta_{d}\)) or use a single roundtrip efficiency parameter. BES systems also have maximum charge and discharge power limits, which may depend on the BES's rated current or nominal capacity. HOMER ensures Equation (14). \[P_{ch,t}\leq P_{ch,max},\qquad P_{dcb,t}\leq P_{dcb,max} \tag{14}\]  
These limits can be expressed via maximum charge and discharge currents as Equation (15), restricting how quickly the BES may be charged or discharged. \[I_{ch,t}\leq I_{ch,max},\qquad I_{dcb,t}\leq I_{dcb,max} \tag{15}\]  
Another way to specify these limits is by using maximum charge and discharge rates relative to BES capacity, often termed C-rate. For example, a 1 C rate means the BES can be fully charged or discharged in one hour, whereas a 0.5 C rate would take roughly two hours. HOMER applies these constraints to prevent excessive current flows, safeguard BES lifetime, and ensure reliable operation within the modeled microgrid. However, in some models, these limits vary with the BES's SOC or other parameters (temperature, health, etc.). Besides the simple BES modeling, HOMER can use the Kinetic Battery Model (KiBaM). In the KiBaM, total BES capacity is split into available, A, and bound, B, portions, with a rate constant \(k\) dictating how quickly energy transfers from the bound to the available portion. The capacity ratio, c, determines the fraction of total capacity that starts in the available tank. A simplified form of KiBaM's differential equations is presented in Equation (16).