## 2 Materials and Method
### Method Phase 1--Pre-Processing of Input Data  
The sensor data are merged into a single plot and superimposed based on the same time step as shown in Figure 5.  
The lines labelled from a to h divide the time steps according to the operating mode of the electrolyser. During periods a to c, the electrolyser is in the initialising and waiting state. Data from sensor readings in this period are not changing, hence, such constant values cannot be used for prediction because it will negatively impact the accuracy of the output to be predicted [18]. Figure 5 shows that the data from time steps 500 to 2500, that is lines d to g, are appropriate to use for developing the predictive model with artificial intelligence. As mentioned earlier, hydrogen temperature (TT121) is the desired sensor data to be predicted as output, and its relationship with other sensor data (features) is shown in Figure 6.  
A quick observation from Figure 6 is that it appears that the cooling water temperature (TT105) has a better correlation with the hydrogen temperature (TT121) which is the intended output to be predicted. However, there are other feature combinations that need to be explored to see which will give the best prediction of TT121. This process is called feature selection, as already discussed in Section 1. Figure 4: Experimental data from [21] showing profiles for (**a**) temperature and (**b**) pressure. Figure 5: (a) Pre-processing treatment of experimental data; (b) separation into regions. Figure 6: Relationship of hydrogen temperature with (**a**) stack water temperature; (**b**) stack voltage; and (**c**) hydrogen pressure. For our study, the entire feature set that can be used for prediction is [[PT112], [TT105], [V], [PT112 TT105], [PT112 V], [TT105 V], [PT112 TT105 V]). We are interested in determining which of these feature combinations will give the greatest prediction accuracy when fed into the intelligent predictive maintenance model that will be developed in the LSTM network. A tedious and time-consuming process would be to take each subset of the features then feed it into the predictive model and check the root-mean-square error (RMSE). This manual approach can become even more complicated with features running into tens, hundreds or more from the dataset of electrolysers. To develop the algorithm to solve this feature selection problem, the experimental data obtained from sensors are pre-processed. Data pre-processing is necessary to be able to use them to predict accurately when using artificial neural networks. The first stage of pre-processing involves normalising or standardising the features to ensure that one feature will not affect the contribution of the other in the neural network [18]. The normalising process can be performed in several ways [16; 22; 23]. One alternative consists of ensuring that the range of all the features (data) is within 0 to 1 using the relation in (7). In another form called z-scoring, the input data are pre-processed using the relation in (8) where the data has a mean of 0 and a standard deviation of 1. \[Normalization=\frac{Sensor\ Data(feature)-Min}{Max-Min} \tag{7}\]  
\[Standardization(z-scoring)=\frac{Sensor\ Data(feature)-Mean}{Standard\ deviation} \tag{8}\]  
Figure 7 shows a plot of pre-processed data using the methods of normalization and z-scoring. In this study, z-scoring is used considering its level of accuracy in previous work [18]. After pre-processing the data, a novel algorithm is developed based on deep reinforcement learning to select the feature that will be used as input to a main LSTM. The feature selected is the one that gives the best prediction of the output data with minimum error. Figure 7: _Cont._  
For feature selection, the task of the agent will be to select the best subset of features that will give the most accurate prediction of the selected output (hydrogen temperature variable [TT121]). The whole set of features is the environment within which the agent operates while an algorithm within the agent evaluates the benefit of the feature selected.