*2.2. Artificial Neural Network Architecture*

The ANN used in this study is based on the MATLAB NN toolbox. The architecture consists of a feed forward architecture with a single output depending on the state of interest (temperature, SoHC, SoC), as shown in Figure 6 .

**Figure 6.** Schematic figure of the used artificial neural network. The real and/or imaginary part of the impedance measurement is used as the input

The used ANN is subcategorized into three main layers: input layer, hidden layer and output layer. Each neuron is connected with a neuron at the following layer in the forward direction. In the context of this work, the number of hidden layers was limited to a single layer. When the number of hidden layers used is more than one, the network is a deep neural network. Within the layer, the number of neurons was varied. In order to determine the optimal number of neurons, a grid search approach was used, where the number of neurons was continually increased until the prediction accuracy was no longer improving without restricting the generalization ability. The number of neurons within the hidden layer is presented in the discussion for each investigated case separately. In the hidden layers, a hyperbolic tangent sigmoid transfer function is used, which is given by:

$$\text{tansig}(n) = \frac{2}{(1 + e\exp(-2n)) - 1}$$

As an input parameter, the real or imaginary portion of the EIS measurements with respect to the frequency domain was used. The training dataset was selected in such a way that the generalization of the battery cell variance can be verified and validated. The bias values and weights were updated according to two different optimization strategies: Bayesian regularization backpropagation optimization (BRBP) and Levenberg–Marquardt backpropagation optimization (LMBP). The prediction accuracy was assessed using the root mean square error and the coefficient of determination. The code was developed based on ANN toolbox.

#### **3. Results**

The following discussion shows the results of the state estimations of the temperature, SoC and SoHC predictions. Note that the test dataset was separated from the training dataset before training the neural network in order to ensure that the test data were completely unknown to the ANN.
