## 2 Materials and Methods
### Energy Storage Models (PBLM-EDLC and PBLM-Battery)
#### 2.3.3 Models for Batteries  
Proposed methodologies for battery modeling, in the literature are closely related to EDLC methods that have been previously revisited. According to the literature [33], four categories can be used for modeling:  
* Empirical model: The voltage is given by a mathematical function of SoC, internal impedances (coefficients), and current, for instance [34]. The main problem is that these models have limited capacity to fit voltage.
* Electric Equivalent model: It is the choice of this paper. The model is understandable (physical-based), but the identification of parameters can be quite complex [33] and sometimes does not make much sense (a table with different values for different scenarios), and it becomes a fitting regression alternative. Some examples (Thevenin and two RC networks in series) are depicted in Figure 6.  
Figure 5: Electric equivalent models for EDLC: (**a**) Classical (real linear capacitor); (**b**) Classical (real non-linear capacitor); (**c**) Series RC branches (or parallel) model [32]; (**d**) Transmission line model (RC branches).  
* Electrochemical model: It intends to describe the chemical-electrical reactions inside the battery. For example, Faraday and Ohm's laws and laws of diffusion. They have high accuracy, but experimental tests are expensive and complex.
* Data driven models: They are basically black boxes that obtain through machine learning models the relation between the main electrical variables in the battery (voltage, current, SoC...). They do not need knowledge of battery physics, but they need a large training to obtain a database to apply methods for each battery.  
With respect to the electrical equivalent, the main difference between the models in Figure 6 is the number of RC networks (i.e., the order of the circuit). A higher order reflects better the fast and slow dynamics of the battery, but RC parameters are different in charge and discharge processes, which makes the model more complex. Also, the model can include (Figure 6b) a capacitor C\({}_{0}\) that describes the variation of open circuit voltage due to currents. Finally, the open circuit voltage is dependent on SoC, and the dependence of E\({}_{0}\) must be obtained through tests, which makes the evaluation of parameters more complex if temperature is considered (i.e., the operation of ESS in cold climates). Because this paper is focused on EDLC models, and batteries will perform with constant charges and discharges, we will assume a simpler version of the model presented in Figure 6b that has been previously used in railway literature (see Section 2.2). For this task, several charge and discharge tests have been developed with different currents (from 5 to 40 A) to obtain E\({}_{0}\) (SoC) and the internal impedance. Figure 7a shows one of these tests, whereas Figure 7b shows the change in the open voltage of a 100 Ah battery. Table 4 depicts the values used in the simulation.  
Figure 6: Some examples of electric equivalent models for batteries: (**a**) Thevenin model; (**b**) Series RC branches.  
Figure 7: Characteristics of 100 Ah battery (testing at 30 A): (**a**) Open voltage E\({}_{0}\) vs. So12-C in a laboratory test and its adjustment; (**b**) Battery constant current discharge test (30 A).  
As an example, E\({}_{0}\) can be adjusted to SoC (between 0.2 and 0.9) according to:  
\[E_{0}(SoC)=12.82+2.02 SoC-3.45 SoC^{2}+2.154\ SoC^{3}\left(V\right) \tag{7}\]