## 2 Methodology
### Soft-Sensor Design  
Data-based modelling generally begins with preprocessing that includes data cleaning and normalization, followed by partitioning data into training, validation, and testing sets [49]. Figure 3 exhibits the two-layer feed-forward artificial neural-network architecture for the soft sensor application proposed in the current work. The two layer feedforward neural network in association with the Levenberg-Marquardt algorithm for data fitting exhibited high fitting accuracy at the cost of lesser training iterations and data points [50]. The vehicle drive cycle characteristics were applied to the input nodes \(I_{1}\) (time) and \(I_{2}\) (current). Weights \(W_{1,1}\), \(W_{1,2}\), \(\cdots\), \(W_{1,10}\) were assigned to the connections from input node \(I_{1}\) to the ten nodes in the hidden layer. Similarly, weights \(W_{2,1}\), \(W_{2,2}\), \(\cdots\), \(W_{2,10}\) were applied to the connections from input node \(I_{2}\) to the hidden layer nodes. The output of each hidden layer comprised the sum of the products of all input nodes to their respective assigned connection weights. All hidden layer outputs were treated with sigmoid activation function \(f_{1}\) (Figure 4), defined as follows. \[S(x)=\frac{1}{1+e^{-x}} \tag{10}\]  
where \(x\) is the input to the activation function, and \(S(x)\) is the sigmoid activation function. The connections of all activation function outputs to the output layer nodes were also assigned weights (\(W_{0,1}\), \(W_{0,2}\), \(\cdots\), \(W_{0,10}\)). For the final predicted output, a linear activation function \(f_{2}\) (Figure 5) was applied to the summation of the products of all \(f_{1}\) function outputs and their respective weights. This linear activation function is defined as follows. \[L(x)=A*x \tag{11}\]  
Figure 2: SOC, SOE, and PL estimation procedure. where \(x\) is the input to the activation function, \(A\) is the slope of the activation function and \(L(x)\) is the linear activation function. The above modelling procedure was individually carried out for the estimations of SOC, SOE, and PL for a single cell of the FSEV battery pack considered in the current study. Figure 4: Sigmoid activation function. Figure 3: Two-layer feed-forward neural-network architecture for FSEV battery pack SOE/SOC/PL soft-sensor design: sigmoid activation function (\(f_{1}\)) at the hidden layer and linear activation function (\(f_{2}\)) at the output layer. Next was the stepwise implementation of the neural-network-based soft sensors in MATLAB. 1. Load the input current profile and SOC/SOE/PL dataset for the FSEV battery pack considered in the current study. 2. Partition the dataset into training, validation, and testing sets. The total dataset available for the current study was partitioned 70% for training, and 15% each for validation and testing (Table 4). 3. Select the neural-network architecture for predictive modelling (two-layer feedforward network with sigmoid transfer function in the hidden layer and a linear transfer function in the output layer). 4. Select the number of hidden neurons (selected as 10 in the present work). 5. Train the neural network using a supervised learning algorithm (Levenberg-Marquardt). 6. Validate and test the trained neural network. 7. Retrain the network if performance is poor in terms of the R-squared value of the testing dataset. Table 5 shows salient features of the feed-forward neural network architecture implemented for soft-sensor design. The following subsection provides details of the training algorithm employed in this neural network. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Dataset Partitions** & **Number of Samples** & **Data\%** \\ \hline
**Training** & 82,132 & 70 \\
**Validation** & 17,600 & 15 \\
**Testing** & 17,600 & 15 \\ \hline
**Total** & 117,332 & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Dataset partitions for SOC/SOE/PL soft sensors. Figure 5: Linear activation function.