## 3 Model Development  
### Artificial Neural Network Model  
Inspired by the biological structure of the human brain and neurons, the artificial neural network (ANN) model is one of the most effective and popular tools for data processing. The ANN model, made up of tremendous artificial neurons to imitate how the human brain processes data, is designed to determine the relationship between the input and output values. It is not difficult for a well-trained ANN model to predict the possible output with the input and optimize the functional parameters. In the experiment shown above, a fuel cell ANN model was built to predict the output voltage in a commercial-size PEMFC stack with inputs of operating parameters.  
Figure 2a is an example of a single neuron model with multiple inputs and one output, inspired by the synapse. As shown in Figure 2a, a simple neural model has two inputs, one output, and two compute functions. Parameters \(w1\) and \(w2\) are weight values, and _bias_ is the bias value. The first compute function is implemented from a sum function. \(F(z)\) is the activation function in the output cell, usually implemented with the _Tansig_, _Purelin_, and _Sigmoid_ functions. The _Tansig_ activation function is generally used in hidden layers due to the fact that it is non-linear, and the output value is in the range of \([-1,1]\). The _Purelin_ function is used in the output layer because it is a linear function.  
The present model had a multi-layer feedforward network architecture containing the input layer, a hidden layer, and the output layer. The input layer consisted of 6 key operating parameters, including the assembling torque (\(P\)), coolant inlet temperature (\(T_{in}\)), coolant outlet temperature (\(T_{out}\)), flow-rate of hydrogen (\(Q_{an}\)), flow-rate of air (\(Q_{an}\)), and load current (I). Figure 2b shows the proposed ANN model with the six input variables of \(T_{in}\), \(T_{out}\), \(P\), \(Q_{ca}\), \(Q_{an}\), and \(I\). The model includes two hidden layers with 8 and 5 neurons, respectively. The number of the output-layer neurons is determined by the grouping strategy of the fuel cells, and the output value is the average output voltage in each group of cells. Five ANN models were built to predict the outputs for the different groups of fuel cell performance: 20 cells in 5 groups (D1), 10 cells in 10 groups (D2), 5 cells in 20 groups (D3), 2 cells in 50 groups (D4), and 1 cell in 100 groups (D5). In the following sections, the models with different group designs are compared to study the model's computation efficiency and prediction precision with varied output complexities.  
During the training process, the Levenberg-Marquardt algorithm was used to train the feed-forward network model. One of the advantages of the Levenberg-Marquardt algorithm is that it could not only solve non-linear problems but also optimize parameters using the Gauss-Newton algorithm and the gradient descent method. The outputs were generated from the proposed ANN model based on the given input and target data sets.  
Figure 2: The ANN model structure for fuel cells: (a) the single neuron; (b) the multi-layer neural network.  
They had an implicit relationship with input parameters, which could be generalized with the following function:  
\[j=F(I,Q_{an},Q_{ca},T_{in},T_{out},P) \tag{1}\]