## 4 Neural Network Model and Training
### Training Process  
All weight parameters \(w\) of the fleet model are fitted to the measured voltages \(\widetilde{U}\). As loss function \(J\), a combination of the mean squared error \(f_{MSE}\) and regularization loss \(J_{Reg}\) is used:  
\[J(w)=J_{MSE}(w)+J_{Reg}(w)=\frac{1}{N}\sum_{k}\Bigl{(}U_{k}(w)-\widetilde{U}_{ k}\Bigr{)}^{2}+\lambda_{ocv}\cdot R_{ocv}(w)+\lambda_{deg}\cdot R_{deg}(w),\]  
Here \(N\) is the total number of training datapoints and \(k\) is the index of the datapoint. We incorporate constraints for the monotony of the OCV curve using the regularization function \(R_{ocv}\) and constraints for the SOH parameters \(f_{C}\) and \(f_{R}\) with another regularization function \(R_{deg}\). Using suitable chosen hyperparameters \(\lambda_{ocv}\) and \(\lambda_{deg}\), the strict satisfaction of the constraints as well as the continuity of \(J\) can be guaranteed. The following features ensure the convergence of the fit:  
* usage of Adam optimization algorithm, which adjusts the learning rate based on first and second moments of the estimated gradients,
* initialization methods for all submodels:  
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Inputs/Outputs** & **Description** & **Symbol** & **Unit** \\ \hline \hline \multirow{4}{*}{current} & Current flowing into the battery. Normalized by & & \\  & nominal capacity \(C_{nom}\). & \(t\) & \\  & & \(t=\frac{3600\text{s}}{C_{nom}}\) & \\ \hline \multirow{4}{*}{coulomb\_counting} & Normalized integrated current. & & \\  & \(q_{cc}=\frac{1}{C_{nom}}\int I\left(t^{\prime}\right)\,dt^{\prime}\) & \(q_{cc}\) & \\ \hline \multirow{4}{*}{low-pass current} & Time-filtered current. Since multiple time & & \\  & constants are used, this is a vector of length \(n_{\tau}\) & & \\  & with one value for each time constant \(\tau_{j}\). Time & & \\  & constants are chosen according to the typical & & \\  & usage scenario as well as voltage relaxation times. & \(\xi\) & \\  & & \(\frac{d}{dt}\xi_{j}=-\frac{1}{\tau_{j}}\xi_{j}+t\) & \(j\in[1,\ n_{\tau}]\) & \\ \hline \multirow{4}{*}{temperature} & Temperature as measured by the BMS. This is & & \\  & usually a mean temperature of several sensors & \(T\) & \({}^{\circ}\)C \\  & built into the battery pack. & & \\ \hline voltage & estimated mean cell voltage & \(U\) & V \\ \hline \hline \multirow{2}{*}{time} & aging parameter database & & \\ \hline time & Lifetime or rather time since begin of logging. & \(t\) & y \\  & Used to account for calendric aging effects. & \(id\) & \\ \hline device-id & Identification number for vehicle & \(id\) & \\ \hline \multirow{4}{*}{full cycles} & Charge throughput of device normalized by & & \\  & nominal capacity & & \\  & & \(fce=\frac{1}{2C_{nom}}\int\left|I(t^{\prime})\right|\,dt^{\prime}\) & \\ \hline relative capacity & estimated normalized capacity & \(f_{c}\) & \\ \hline relative resistance & estimated normalized resistance & \(f_{R}\) & \\ \hline \multirow{2}{*}{time} & soc0 model & & \\ \hline time & same as above & \(t\) & \\ \hline device-id & same as above & \(id\) & \\ \hline initial SOC & estimated SOC at begin of section. Used to adjust & & \\  & the coulomb counting signal. & \(soc_{0}\) & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Inputs and outputs of the fleet model.  
\(\circ\) using laboratory cell tests of similar NMC cells for the OCV curve, \(\circ\) pretraining of the overpotential model with ohmic resistance, \(\circ\) estimation of the initial SOC of each section from initial voltage and OCV curve, \(\bullet\) iterative and temporary fixing of some of the model weights, \(\bullet\) early stopping of the training based on validation points (see previous section), \(\bullet\) in the future: detection and elimination of anomalous sections (due to measurement or data transmission errors).