## 2 Materials and Methods
### Experimental Measurements and Battery Simulation
#### 2.3.2 Implementation of the MATLAB/Simulink Simulations  
To evaluate the behavior of the entire battery pack during the collection activities, the kinetic battery model (KiBaM) [30] was implemented in the MATLAB/Simulink environment. The KiBaM charge estimator expresses the chemical processes inside the battery through a kinetic transfer of the charges involved. The model can be rapidly explained considering two tanks in which the maximum charge that can be delivered by the accumulator is distributed. One tank is called the \"available charge well\", which is solely responsible for the transfer of chemical charges between the storage system and the external network, valid for both charge and discharge phases. Conversely, the other tank, defined as the \"bound charge well\", exchanges charges only with the available charge well. The flow of  
Figure 8: The Yokogawa WT 5000 instrument during the electric measurements. these charges depends on the difference in magnitude of the charges present in the two tanks h1 and h2 (where h1 represents the SOC of the battery), and by a valve k which regulates the passage. The parameter k has the dimension 1/time and limits the rate at which the charge can flow between the two charge wells. The charge is distributed between the two tanks by means of the parameter c (0 < c < 1). The parameter c is defined as the ratio between the initial charge in tank h1 (y1,0) and the maximum deliverable charge (C), which is the sum of the initial charges in tank h1 and tank h2. The equations that describe the flow of the charges in both tanks are the following:  
\[\left\{ \begin{array}{c}\frac{\mathrm{d}y_{1}(t)}{\mathrm{d}t}=-\mathrm{i}( t)+\mathrm{k}[\mathrm{h}_{2}(t)-\mathrm{h}_{1}(t)]\\ \frac{\mathrm{d}y_{2}(t)}{\mathrm{d}t}=-\mathrm{k}[\mathrm{h}_{2}(t)-\mathrm{h }_{1}(t)]\end{array} \right. \tag{1}\]  
where y1(t) and y2(t) are the total charges of the two tanks, respectively; whereas h1(t) = \(\frac{\mathrm{y}_{1}(t)}{\mathrm{c}}\) and h2(t) = \(\frac{\mathrm{y}_{2}(t)}{(1-\mathrm{c})}\). The initial conditions are: y1,0 = y1(t0) = c \(\times\) C, y2,0 = y2(t0) = \((1-\mathrm{c})\times\) C, with y0 = y1,0 + y2,0. The variable i(t) represents the current delivered as a function of time. Therefore, the KiBaM system allows the flows of the charges during the discharge/charge processes to be modeled, according to the following equations:  
\[\left\{ \begin{array}{c}\mathrm{SOC}(t)=\frac{\mathrm{C_{available}(t)}}{ \mathrm{C_{max}}}=\mathrm{SOC_{initial}}-\frac{\left[\int\mathrm{i}(t)\ \mathrm{d}t+\mathrm{C_{ unavailable}(t)}\right]}{\mathrm{C_{max}}}\\ \mathrm{C_{available}(t)}=\mathrm{C_{initial}}-\int\mathrm{i}(t)\ \mathrm{d}t- \mathrm{C_{unavailable}(t)}\end{array} \right. \tag{2}\]  
C unavailable is the available charge that has not been transferred from the bound charge well to the available charge well. The amount of C unavailable increases with the number of charge/discharge cycles, consequently the amount of Cavailable decreases with the number of charge/discharge cycles. The equation that considers the increasing rate with time of the variable C unavailable is:  
\[\mathrm{C_{unavailable}(t)}=\mathrm{C_{unavailable}(t_{0})e^{-k^{\prime}(t-t_{0} )}+(1-\mathrm{c})\ \frac{\mathrm{i}(t)}{\mathrm{c}}\ \frac{1-e^{-k^{\prime}(t-t_{0})}}{k^{\prime}}} \tag{3}\]  
In Equation (3), the value of k\({}^{\prime}\) can be determined as k\({}^{\prime}\) = \(\frac{\mathrm{k}}{\mathrm{c}(1-\mathrm{c})}\); from Equation (3) it is possible to determine the value of the parameter k, starting from the knowledge of C unavailable determined by the experimental evualuation of constant-rate discharge from a complete charge. However, to calibrate the system to emulate the accumulator behavior it is essential to carry out experimental tests. A first test consists of discharging the accumulator using an extremely small current, thus obtaining the value of the maximum deliverable capacity, that is, y0.