Online Short-Term Remaining Useful Life Prediction of Fuel Cell Vehicles Based on Cloud System

The durability of automotive fuel cells is one of the main factors restricting their commercial application. Therefore, establishing a remaining useful life (RUL) prediction model and developing an online operational method to apply it to the RUL optimization of fuel cell vehicles is an urgent academic problem. In this work, a short-term RUL prediction model and an online operation scheme for fuel cell vehicles are proposed. Firstly, based on historical data of a fuel cell bus under multiple conditions, the daily mode of stack voltage under a 75 A operation condition was selected as a health indicator that could better reflect the health status of a fuel cell stack. Then, an adaptive locally weighted scatterplot smoothing (LOWESS) algorithm was developed to adjust the most appropriate step size to smooth the original data automatically. Furthermore, for better prediction accuracy and stronger adaptability, a short-term RUL prediction model consisting of the adaptive LOWESS and bi-directional long short-term memory was established. Finally, an online operation scheme of the RUL prediction model based on a cloud system gave the model a strong powerful practicability. After validation, this work demonstrated good application prospects in the prognostic and health management of automotive fuel cells.


Introduction
Proton exchange membrane fuel cells (PEMFCs) have gained significant attention in recent years, due to their high energy conversion efficiency, low operating temperature, and zero emissions [1,2]. Fuel cell vehicles are currently in the early stage of commercialization. However, the durability of automotive PEMFCs is one of the main factors restricting their commercial application [3]. One of the effective ways to improve the durability of automotive PEMFCs is to establish an accurate and strong practical RUL prediction model and to maintain PEMFC systems over time according to the prediction results of the model [4].
Modeling by degradation average of PEMFC stack performance is mainly used for the RUL prediction of automotive PEMFCs and the durability optimization analysis of fuel cell system, which considers the automotive PEMFC stack as a whole and ignores degradation differences between the cells. At present, this modeling method is used to predict the RUL of the PEMFC stack in most research literatures. There are two kinds of commonly used RUL prediction methods for PEMFC: the data-driven prediction method and the model-based prediction method [5,6]. Compared with the latter, the data-driven prediction method relies on experimental data to establish the mapping relationship between external observables and internal degradation states. The use of this method does not require in-depth study of the degradation mechanism of a PEMFC, but it relies heavily on the internal laws of data themselves, which have strong practicability and good accuracy.
With the rapid development of information technology and the explosive growth in data volume, the potential of this method is becoming more and more obvious. Therefore, the data-driven prediction method is the most widely used method in engineering research [7].
Data-driven prediction models can be divided into machine learning prediction models and neural network prediction models. Machine learning prediction models mainly include support vector machine algorithms [8], correlation vector machine algorithms [9], Kalman filter algorithms [10], and particle filter algorithms [11,12]. Machine learning prediction models have fast training speed and fewer training data requirements. Meanwhile, neural network prediction models have slower training speeds and larger data requirements. However, in the case of a large amount of data, compared with machine learning, neural networks possess better prediction accuracy and have stronger adaptive ability.
Deep learning is a subset of neural networks. At present, the mainstream deep learning basic algorithms are divided into two categories: convolutional neural networks (CNNs) and recurrent neural networks (RNNs). RNNs provide a promising solution to deal with nonlinearity and temporal problems because they have the inherent ability to memorize their previous state [13,14]. They have been proved to be a powerful technique to estimate the RUL prediction model [15]. In order to avoid gradient explosion and disappearance during training and to realize the long-term and short-term memory function, long shortterm memory (LSTM) architecture is proposed from RNN. LSTM recurrent neural networks were used in [16][17][18]. Later, the improved structure of grid-LSTM was proposed in [19]. Considering that both historical information and future information are helpful to the prediction accuracy of the model, bi-directional long short-term memory (Bi-LSTM) is proposed from LSTM, which can make the prediction result of the model more accurate [20].
At present, most of the training data in the research literature are the operating data of PEMFCs in single constant operating conditions in the laboratory [8][9][10][11][12][13][14][15][16][17][18][19][20][21][22]. The resulting proposed prediction models are suitable for PEMFCs under long-term constant operating conditions, but they are not suitable for on-board PEMFCs, which are under multiple operating conditions. There are two difficulties in the RUL prediction model of automotive PEMFC stacks: the health indicator of the PEMFC stack under multiple operating conditions and the adaptivity of the RUL prediction model [23]. Additionally, data-driven prediction models have a large computational demand, but the computing power of embedded resources in vehicles is so limited that it is difficult to run such prediction models nowadays [24].
In this work, in order to confront the challenges of this academic hotspot as well as to address an urgent problem for the industry, a self-renewing RUL prediction model of automotive PEMFCs is proposed, one that has such strong adaptability and prediction accuracy that it meets the requirements of on-board RUL prediction. An online operation scheme of the RUL prediction model was developed that could finally realize the online short-term RUL prediction function of PEMFCs that are on board. In the following Section 2, a daily mode of stack voltage under 75 A operation condition is selected as the health indicator. In Section 3, the self-renewing RUL prediction model consisting of adaptive LOWESS and Bi-LSTM is proposed. Then, a cloud system is introduced and an online operation scheme for the self-renewing RUL prediction model is proposed in Section 4. Finally, the self-renewing RUL prediction model and the online operation scheme are verified by experiments.

PEMFC Health Indicators under Multiple Operating Conditions
In the RUL prediction of PEMFCs, researchers mainly evaluate the degradation of the stack performance from two aspects: the output performance of the PEMFC and the material aging of the PEMFC components. Generally, the observable variables of fuel cell vehicles include output voltage, pressure, and temperature. This work aims to realize the online RUL prediction of fuel cell buses; thus, the selected health indicators need to meet the following requirements:

•
The parameters need to be collected by the existing equipment on the fuel cell bus.

•
The parameters on the fuel cell bus need to be collected online.

•
The parameters must be able to better ignore the influence caused by abnormal conditions.
At present, the mainstream health indicators are polarization curve, EIS, and stack voltage [25][26][27]. The fuel cell bus, the research object of this work, did not have online EIS and polarization curve detection tools, so this work selected the stack voltage as the health indicator of the PEMFC, which could be monitored in the vehicle online. The stack voltage can accurately characterize the degradation state of the PEMFC stack on a macro scale in the steady-state operating condition, but its accuracy is relatively poor under dynamic operating conditions. In response to this problem, this work separated the actual vehicle data by multiple operating conditions on a daily basis and explored the possibility of daily statistical data of vehicle stack voltage as a way to characterize the health indicators of the stack.
The fuel cell bus studied in this work completed a demonstration of its operation in a particular place. It ran along an established route every day. The system of the experimental fuel cell bus is shown in Figure 1. The total number of operating days was 129 days, and the total operating time was 889 h. It ran 6.9 h a day on average. The parameters of stack in this fuel cell bus are introduced in detail in Table 1.  The fuel cell bus selected in this work consisted of four operating conditions based on the output current: start-stop (0 A) operating condition, 45 A operating condition, 75 A operating condition, and 125 A operating condition. Necessary system parameters of the later three operating conditions are shown in Table 2. This work selected the stack voltage under one operating condition as the health indicator of the stack. According to the evolution of the polarization curve of the PEMFC stack with the increasing operating time, the polarization curve shows a downward trend over time.
As the current density increases, the voltage difference in the same current density at different times expands, as shown in Figure 2. Therefore, in order to more accurately reflect the degradation of PEMFC stack performance, it is necessary to select the stack voltage under as large an output current as possible as the health indicator. According to the statistical analysis, in all of the operating time of the fuel cell bus, the proportions of the four operating conditions were as follows: 28% for the start-stop operating condition, 43% for the 45 A operating condition, 24% for the 75 A operating condition, and 5% for the 125 A operating condition. The first three operating conditions appeared every day. To sum up, considering that both the output current and the time proportion of the selected condition should be as large as possible, the stack voltage under the 75 A operation condition was selected as the health indicator of fuel cell bus. The daily statistical data of stack voltage mainly included the average and mode. The daily average and daily mode of the historical data of the stack voltage under 75 A operation condition were analyzed in this work. The possibility of characterizing the health status of PEMFC stack was explored through the trend of the two over time. The daily average sequence and daily mode sequence of historical data are shown in Figure 2.
The voltage of the vehicle's on-board stack showed a slow downward trend over time under certain operation conditions. Additionally, it had significant nonlinearity and uncertainty. There were local abnormalities such as voltage recovery and random fluctuations. The above-mentioned abnormal situation may occur when an operating condition is switched or a vehicle is started and stopped. Therefore, if the daily average of stack voltage is selected as the health indicator, as shown in Figure 3a, the trend of the curve is blurred, and this value is easily affected by voltage recovery and random fluctuations. It cannot accurately characterize the degradation of stack performance. However, the daily mode of stack voltage was selected as the health indicator, as shown in Figure 3b; the curve shows a significant downward trend. It characterized the stable operating voltage of stack at the degree of degradation under the operating conditions of the day, so it could effectively avoid the influence caused by abnormal conditions and could accurately characterize the degradation of stack performance.

Self-Renewing RUL Prediction Model
The term self-renewing RUL prediction model refers to an RUL prediction model with self-renewing ability, one which has a strong adaptability. The self-renewing RUL prediction model proposed in this work is composed of adaptive locally weighted scatterplot smoothing (LOWESS) and Bi-LSTM RUL prediction models.

Noise Processing
The collected fuel cell operating data were a set of time series data, as shown in Figure 3, which had a certain amount of noise. Before using the data to train the model, it was necessary to perform white noise detection on the data to detect whether there were dynamic laws in the data. If the data were not white noise data, noise reduction processing could be performed on the data to improve the data quality so that the prediction results of the trained model were more accurate.
The smoothing method is often used for data noise reduction of trend analysis and prediction, using the trimming technique to weaken the influence of short-term random fluctuations on a sequence and to smooth the sequence. In this work, LOWESS was used to smooth and reconstruct the sequence, which enabled the model to effectively avoid any over-fitting caused by large data noise. In order to realize the self-renewing characteristics of the model, adaptive LOWESS was used to permit the effect of LOWESS to reach the best fit automatically.
In LOWESS, assuming that the data to be smoothed is (x, y), take x as the center and intercept the data set adjacent to x, then use this data set to obtain a weighted regression line, and find the center point (x,ŷ) of the regression line, whereŷ is the smoothed value of (x, y). If there are N sets of data, N weighted regression lines can be obtained, and the center points of the N weighted regression lines can be connected to obtain a smooth curve, which is the smoothed sequence. Before smoothing a sequence, it is necessary to select an appropriate weight function. Taking the cubic weight function in this work as an example, its weight function is defined as follows: In the Equation (1), d(x) is the highest power when polynomial weighted regression is used. In most application scenarios, d(x) is taken as 1, which is linear regression, Therefore, the weight function can be rewritten as: The fitting equation can be expressed as follows: The gradient a and offset b in the fitting equation can be expressed as follows: where x, y are weighted averages, respectively. The effect of using LOWESS depends on four adjustable factors, including: 1.
The step size f rac, which indicates how long the data set should be intercepted to obtain a locally weighted regression line. The f rac is the ratio of the original data; the value range is (0,1).

2.
The weight function w i , which is the above Equation (1) and can generally be a quadratic or cubic function.

3.
The iteration number i t is the number of local regression operations in the selected data set. 4.
The regression interval delta indicates how many points are separated for a weighted regression, and the interval points can be replaced by interpolation.
Among the above four adjustable factors, the cubic weight function is used to make the method suitable for a large amount of data processing. Considering the reasonable processing time of the method, iteration number i t is 3. In order to make the smoothing effect as good as possible, the regression interval delta is set to 0. The above three adjustable factors remain unchanged. This work only adjusted the step size f rac to achieve the goal, which not only made the smoothed data sequence retain the original fluctuation to a great extent, but also weakened the influence caused by the abnormal points as much as possible.
The process of adaptive LOWESS is shown in Figure 4. The adaptive LOWESS in this work could find the best f rac, accurate to three decimal places. The realization idea is as follows:

1.
Init: Selected_Frac and Item are initialized, and then Data is input into the algorithm, which is the original data set.

2.
The whole process is divided into three rounds-namely, 0.1 round, 0.01 round, and 0.001 round, which corresponds to items that equal 0, 1, and 2, respectively.

3.
Get_All_Smoothed_Series: based on the Selected_Frac found from the previous round, traverse all the LOWESS sequences of f rac in this round; there are a total of eleven groups.

4.
Evaluation: select the most suitable f rac for this round through the evaluation function and assign it to Selected_Frac.

5.
If the traversal is completed, it returns Selected_Frac, which is the most suitable f rac. Otherwise, skip back to the second step to continue. In the above process, the core point is the evaluation function. The idea of evaluation function is as follows: where X t is the original sequence, X f rac_n is the smoothed sequence when f rac is f rac_n in this round, n = 0,1,2, . . . ,10. ∆X f rac_n is obtained by subtracting the smooth sequence from the original sequence.
Considering that there may be negative numbers in ∆X f rac_n , the sum of squares of the sequence ∆X f rac_n is calculated, which is named q f rac_n . q f rac_n can better characterize the difference between the original sequence X t and the smoothed sequence X f rac_n . Q = q f rac_0 , q f rac_1 , q f rac_2 , . . . , q f rac_10 (8) There are eleven groups of smoothed sequences X f rac_0 , X f rac_1 , X f rac_2 , . . . , X f rac_10 in one round, and eleven corresponding q f rac_n can be obtained, of which a sequence Q consists.
∆Q = Di f f (Q) (9) The difference sequence ∆Q is obtained by doing a first-order difference on the sequence Q, and then the maximum value P f rac of ∆Q is selected. P f rac means that the LOWESS function has the largest change in the smoothed sequence due to the change of the f rac in this round. It can be considered that the LOWESS function has the largest derivation value of the f rac at this point. In order to keep the original fluctuation as much as possible in the smoothed sequence, the previous point of the difference segment is selected, and the most suitable f rac is further subdivided based on the previous point.

Short-Term RUL Prediction Model
Bi-LSTM is a combination of LSTM in the forward and backward directions. The structure of LSTM is shown in Figure 5. It is composed of input word x t , cell state C t , temporary cell state C t , hidden layer state h t , forget gate f t , memory gate i t , and input gate o t at time t. The working principle of LSTM is to convey effective information and discard useless information by forgetting and remembering information in the cell state. The hidden layer state h t is output at every time step. Forgetting, memory, and output are controlled by the forgetting gate x t memory gate i t and output gate o t , which are calculated from the current input and hidden layer state h t−1 in the previous step. The calculation process of LSTM is as follows: First calculate the forget gate f t and select the information to be forgotten.
Then calculate the memory gate i t , select the information to be memorized, and obtain the temporary cell state C t . C Then, according to the memory gate i t , the forget gate f t , the temporary cell state C t , and the cell state C t−1 at the previous moment, the cell state at the current moment is calculated.
Finally, the output gate is calculated, and the hidden layer state at the current moment is finally obtained.
The structure of Bi-LSTM in this work is shown in Figure 6. The input vector of the model is (1,5). The output dimension of LSTM is 500, which has so sufficient a complexity that it avoids under-fitting. In order to enhance the generalization ability of the model, the value of dropout is 0.1, which can effectively avoid over-fitting. The output layer activation function is linear, the loss function of the model is MSE, and the optimizer of the model is RMSporp.

Cloud System
The cloud system in this work is shown in Figure 7. It consists of the base layer and the application layer. The base layer provides the necessary basic services for the application layer. It consists of two parts: telematics box (TBOX) and cloud platform. The TBOX is placed on the fuel cell vehicle, which is at the local layer. It serves as a bridge between vehicles and cloud platforms, of which the communication protocol is message queuing telemetry transport (MQTT) protocol. Its main function is to receive the operating data from the fuel cell control unit (FCU) via CAN and upload it to the cloud platform and to receive the data from the server cloud platform and pass it to the FCU.
The cloud platform is in the cloud. It consists of an MQTT broker, data preprocessing Runner, database, and data platform. The above four modules correspond to the data transmission function, data preprocessing function, data storage function, and data application function, respectively. The MQTT broker is used for data transfer between the cloud platform and the legal TBOX. The data preprocessing Runner is used for data analysis, deduplication, and outlier detection and processing. The database is used to store data. The data platform provides staff with a visual operation platform for data application. It relies on the services provided by the first three to operate, which is between the application layer and the base layer.
The application layer relies on the data platform. It uses the data platform to call the resources of the base layer to achieve its functions. It consists of three parts: a model operation module, a vehicle monitoring module, and an authority management module. The first two modules are used to manage fuel cell vehicles through the cloud system, and the latter is used to manage the personnel who use the cloud system. The self-renewing RUL prediction model of this work was deployed in the model operation module.
The above is the architecture of the fuel cell vehicle cloud system in this work. The online operations of the self-renewing RUL prediction model are realized through the cloud system.

Online Operation Scheme
The process of the self-renewing short-term RUL prediction scheme based on the cloud system is shown in Figure 8. The specific process is as follows: 1.
The data platform has a RUL prediction task detector, which checks daily whether the model needs to be updated. Its judgment condition of trigger is whether the number of days from the last execution time of a task exceeds its update days (the number of update days is set to 5 days). If so, model training is triggered.

2.
Before the data denoising process, it is necessary to analyze whether the sequence is a white noise sequence. In the second step, historical data are taken out to perform white noise detection on them. Acorr-Ljung-Box was used to verify whether the data in this work were white noise. The lags is set to 1. Stat and P is calculated. The Stat is the Ljung-Box test statistic. The P value is the evidence against a null hypothesis. The smaller the P value, the stronger is the evidence for rejecting the null hypothesis. If P is less than 0.05-that is, the data are not white noise data-skip to the third step. Otherwise, the cloud platform alarm is triggered for human intervention. 3.
Using adaptive LOWESS to smooth and denoise the data, the smoothed data are normalized and regularized to improve model training.

4.
The Glorot normal distribution is used to initialize the input weights, and the uniform random distribution is used to initialize the hidden layer threshold, which effectively avoid under-fitting to a certain extent. Subsequently, the data are input into the Bi-LSTM model for training.

5.
The health indicator value of vehicle stack in the next five days is predicted through the trained model, followed by storage of the results in the cloud platform database.

Simulation Experimental Environment
A simulation experimental environment was built to verify the online operation scheme. The details are shown in Figure 9 and items of the simulated experimental environment are shown in Table 3. The fuel cell bus was simulated by VECTOR VN7640 hardware interface card and CANoe11.0 software. VN7640 was connected with TBOX through CAN and communicated with a PC running VN7640 through USB. The TBOX was connected with the cloud system through MQTT. The data studied in this work were historical data of the fuel cell bus. In the experiment, historical data of fuel cell bus were read from storage files by CANoe11.0 and sent to TBOX by VN7540, then TBOX sent the received data to the cloud system, on which the self-renewing RUL prediction model was deployed. After the data were stored in the cloud system, the process was executed as described in Section 4.2 to realize short-term RUL prediction.

Validation of Adaptive LOWESS and Bi-LSTM RUL Prediction Model
In this experiment, the historical data from 1 to 122 days were used as the training set to predict the stack voltage of a fuel cell bus under 75 A operating condition in the subsequent five days (123 to 127 days).
Firstly, the data of the following model training were all processed by adaptive LOWESS and normalized. Figure 10 shows the operation steps and effects of adaptive LOWESS. In the first round, the appropriate f rac segment in the 0.1 round was screened, and the appropriate f rac was found between 0 and 0.1. In the second round, the appropriate f rac segment in the 0.01 round was screened, and the appropriate f rac was found between 0.04 and 0.05. In the third round, the appropriate f rac in the 0.001 round was screened. After three rounds of screening, the most suitable f rac was finally obtained as 0.047. As shown in Figure 10, the processed voltage curve is relatively smooth, which is effectively denoised. But it retains the change trend of the original data, which is helpful for subsequent RUL prediction model training. Secondly, the epochs of training were set to 50 times and the batch_size was set to 32. Subsequently, the smoothed sequence was put into the model to train. The predicted results of the model after training are shown in Figure 11. The size and trend of the predicted voltage curve are basically consistent with the actual voltage curve, which shows that the fitting effect is worked well.  Figure 11, the model could effectively predict that the trend of stack voltage turned from a downward trend to an increasing trend on the fifth day. In the actual data, the stack voltage also showed an upward trend in the next two days (128 to 129 days), 276.16 V and 277.48 V, respectively.  Table 4. The RMSE, MAE, and MAPE of Bi-LSTM were all smaller than the others. Thus, Bi-LSTM had better fitting accuracy and smaller relative error, which suggests that it is more suitable for short-term RUL prediction of a PEMFC stack.

Verification of Online Operation Scheme of Self-Renewing Short-Term RUL Prediction Model
This experiment was divided into three rounds. The initial day of the experiment started from the 110th day of the fuel cell bus. The simulation days of each round were 5 days-the prediction days of the RUL prediction model. In the test, when data of each round had been uploaded to the server, the model was triggered to renew itself.
Firstly, the data were taken out from the database of the cloud system and white noise detection was performed on the data. The results of white noise detection are shown in Table 5. P of the three sets of sequences in the table are all less than 0.05; that is, the three sets of sequences are not white noise sequences, which have dynamic laws that can be used. The platform alarm was not triggered, and the next step could be executed. It was verified that selecting the daily mode of stack voltage under 75 A operation condition as a health indicator can effectively reflect the degradation of the fuel cell stack. Furthermore, adaptive LOWESS was performed on the sequence. Through the adaptive LOWESS, the best f rac of the 1-110-day data sequence was obtained, which was 0.055; the best f rac of the 1-115-day data sequence was obtained as 0.053, and 0.050 was the best f rac of the 1-120-day data sequence. The three sets of curves processed by the adaptive LOWESS are shown in Figure 12. The three sets of smoothed sequences not only effectively retained the trend of the original sequence, but also effectively suppressed the noise. This verifies that the adaptive LOWESS has excellent effectiveness and robustness. Finally, the RUL prediction model was trained with the smoothed sequence, and the corresponding health indicator values of the fuel cell stack in the next five days were obtained, which are shown in Table 6. The MAE values of the prediction results of the three rounds were 0.162, 0.298, and 0.102, respectively. The RMSE values of the three rounds were 0.172, 0.327, and 0.109, respectively. The values are so small that they demonstrate the good accuracy of the model from different aspects. The MAPE values of the three rounds were 0.058%, 0.108%, and 0.037%. These values are extremely close to zero, which proves that the quality of the model is quite good. Compared with other rounds, the values of the second round were larger. Through analysis, it was found that there is a positive inflection point of voltage slope in the second round, and it increases or decreases monotonically in other rounds. Figure 13 presents curves of prediction results of the self-renewing RUL prediction model. It can be seen clearly that although there is a slight error in prediction results, the trend and value of prediction sequence in each round can be quite accurate.
To sum up, the strong adaptability and prediction accuracy of the self-renewing RUL prediction model and the effectiveness of online operation function were verified.

Conclusions
The durability of automotive PEMFCs is one of the main factors restricting their commercial application. One of the effective ways to improve the durability of automotive PEMFCs is to develop an accurate and strong practical RUL prediction model and an online operation method of RUL prediction model. In this paper, based on the historical data of a fuel cell bus, a self-renewing RUL prediction model was established, and an online operation scheme that could be relayed on the system was proposed, both of which realize short-term online RUL prediction for automotive PEMFC stacks. The main conclusions are as follows: • The mode of daily stack voltage of 75 A operation condition used as the health index of the fuel cell bus stack avoided the influence of voltage recovery and random fluctuation. White noise detection can be used to verify that the parameter can better characterize the stack health state.

•
The adaptive LOWESS and Bi-LSTM RUL prediction model was established. Adaptive LOWESS is used for adaptive denoising and preliminary feature extraction of stack voltage data, which not only enables the smoothed data series to retain the original fluctuation as much as possible, but also weakens the influence of abnormal points as much as possible. Subsequently, a Bi-LSTM model can be trained with the denoised sequence to realize short-term RUL prediction, which proved to be quite accurate and to have strong adaptability.

•
Relying on TBOX and a cloud platform to realize real-time data updating, an online operation scheme of short-term RUL prediction scheme model is proposed, which realizes the short-term online prediction of RUL. The scheme was proved to be effective, which gives the model a strong powerful practicability.
In summary, this work has improved the technology route of PEMFC RUL prediction in vehicles and has good prospects for application in the prognostic and health management of PEMFCs, which is helpful for improving the durability of automotive PEMFCs.