## 2 Materials and Methods
### Experimental Measurements and Battery Simulation
#### 2.3.2 Implementation of the MATLAB/Simulink Simulations
Furthermore, discharging the battery with a high current results in the initial charge relative to the available charge well y1,0. Both experimental tests were performed. The first test was carried out on a single battery cell using a small commercial battery charger (LiPro balance charger) that allowed a discharge test with limited current (0.1 C-rate) to also be performed. The second experimental test required significantly more effort and was carried out on one battery module. The setup was performed using a set of power sinks (up to 7.5 kW of dissipated active power) connected to the battery module terminals through a power transistor that forced the supplied current to be as constant as possible during the discharging time. The DC current and voltage were measured by a shunt resistor and a voltage divider, respectively. A compact data acquisition (DAQ) module NI-9206 was used to acquire the DC voltage and current. The accuracies of the shunt resistor and the DAQ board are \(\pm\)0.25% of the reading value and \(\pm\)0.1% of the full scale, respectively. Figure 9 shows the battery module during the discharging test. The test was performed at the 2C-rate, close to the maximum discharging rate for this type of lithium cell. The experimental tests allowed evaluation of the two initial constants: the maximum deliverable capacity (C = 250 Ah) and the initial capacity (C\({}_{i}\) = y\({}_{1,0}\) = 160 Ah), with c = 0.64 and k in the magnitude order of \(10^{-4}\). The SOC estimator was subsequently implemented in the MATLAB/Simulink environment by implementing Equations (1) and (2) and starting from the calculated initial conditions. Figure 10 shows the implemented Simulink model to determine the SOC during the time taken to perform the collection activities. Figures 11 and 12 show the two Simulink models to determine the variables y\({}_{1}\) and y\({}_{2}\), respectively. Figure 10: The schematic of the state of charge (SOC) estimator in Simulink environment: the sub-blocks y\({}_{1}\) and y\({}_{2}\) estimate the available charge and bound charges, respectively. Figure 9: The battery module connected to the power sinks, located outside the window, during the discharge test. In this study, the \"collection scenario\" was defined as the set of garbage collection operations defined in Section 2.2. Each operating phase was repeated several times corresponding to collection tasks reported in Table 1.  
As shown in Figure 10, the functioning of the implemented SOC estimator also considers the initial variables of nominal capacity (C\({}_{\text{n}}\)) and z = \(\frac{\text{C}}{\text{Cn}}\). A thermal model of the battery pack was not considered in this study because thermal measurements were carried out during the 2C-rate discharging test and it was evident that the internal temperature, initially at room temperature (20 \({}^{\circ}\)C), increases to 35 \({}^{\circ}\)C in little less than 1000 s (around 16 min) of continuous exercise. None of the tasks undertaken by the compactor truck (Table 1) can be assimilated to a continuous 2C-rate current discharge from the battery pack for such a long time. In fact, it is made clear in Section 3 that the current provided by the battery pack, during the working operations of Table 1, is always below the 1C-rate current discharge, for a short period of time, generally no more than 30 s. Under these operating conditions, the battery pack temperature can be considered to be in the range of the external temperature plus 5 \({}^{\circ}\)C.  
Figure 11: Simulink function to determine the variable y\({}_{1}\) in the kinetic battery model (KiBaM) modeling. Figure 12: Simulink function to determine the variable y\({}_{2}\) in the KiBaM system. It is worth noting that the initial external temperature of the battery pack depends on the seasonal weather conditions. The most extreme conditions occur during summer and winter, when the temperature can range in some countries from \(-20\) to \(60\)\({}^{\circ}\)C, thus affecting electro-chemical systems [31].