Machine Learning Approach for Modeling and Control of a Commercial Heliocentris FC50 PEM Fuel Cell System
Abstract
:1. Introduction
2. Materials and Methods
2.1. Artificial Neural Networks (ANNs) Model
2.1.1. Introduction to ANNs
2.1.2. Data Collection and Analysis
- Data collection: The first and the most important step in the supervised learning process is gathering the data. In other words, to carry out good training, vast amounts of real-world data (Big Data) is required since the more data we provide to the ML system, the faster the model can learn and improve. Besides, the collected dataset should be well distributed throughout the operation range so as to represent the behaviour of the fuel cell in each operating power point. To this end, a continuous triangular signal with a period of 15 s (7.5 s for each positive/negative slop) was built and supplied to the duty cycle of the boost converter so as to vary the stack current from the minimum to the maximum operating value. The selection of the period was made based on the characteristics of the fuel cell data acquisition software since it measures the data each 0.5 s. In other words, 15 samples in different operating current values will be measured fore each positive/negative slop. Figure 3 and Figure 4 show, respectively, the Simulink blocks used to design the triangular signal and the generated signal. The maximum value of this signal (0.8) drives the fuel cell to operate at the highest current value [8–9A] where the minimum value (0.5) drives the fuel cell to operate at the lowest operating current [0.2–0.5A]. These values can be adjusted via the increase/decrease of the output load resistance value. We have avoided operating currents above 9A since the fuel cell used in this study (Heliocentris FC50) is occupied with a security system that turns off the fuel cell in case of higher currents/temperatures [29,30,31].To obtain data for different operating conditions, variations in temperature, humidity, hydrogen and airflow are required. It should be noted that the fuel cell contains an integrated control system that not only controls the supplied hydrogen but also provides an option to set the fans of the fuel cell at the automatic mode. By using the auto mode, the fans will automatically control the temperature, the humidity and the supplied airflow. However, to provide large degrees of freedom, the auto mode option of the fans was not considered. Therefore, a database containing 20,512 samples for different operating current, temperature and fan power were recorded and presented in Figure 5. This latter also shows the influence of the air flow on the fuel cell performance but the effect of temperature is still not well presented. Therefore, a 3D graph that clearly shows the effect of both temperature and air flow on the stack performance is presented in Figure 6. According to this latter, it is shown that at low air flow (fans power = 10%), by varying the temperature from 25 to 43 the stack performance improves in the beginning, then becomes almost constant and finally, it deteriorates for higher temperatures. At medium air flow (fans power = 50%), the stack performance improves with increasing temperature. However, for higher temperatures only slight improvements occur since the membrane requires an additional amount of water content. Regarding the last case at which the air flow is set at its maximum value (fans power = 100%), the stack performance improves largely with a temperature increase from 25 to over 40 . It is noticed that even for higher temperatures, the stack performance is still improving and this is due to the well humidification provided by the fans.
- Inputs and outputs selection: Another factor that can improve the accuracy of the learned function is the selection of the inputs and outputs since the accuracy is strongly dependent on how the inputs are represented. The inputs should be entered as a feature vector that contains enough information to properly predict the output; but also, it should not be too large due to the dimensionality curse effect. In this study, the input variables are selected as: stack current (A), stack temperature T () and fans power (%), to predict the stack voltage (V)
- Data division (training, validation and test): When enough data is available, the next step is to split this data into three subsets which are training, validation and test. The training dataset needs to be fairly large and contains a variety of data in order to contain all the needed information. Many researchers have proposed a training set of 70%, 80% and 90% [32,33,34,35]; where the rest of data were divided between the validation and test. In this study, the recorded data was divided as the following: training = 14,358 data points (70% of whole data), validation = 3077 data points (15% of whole data) and test = 3077 data points (15% of whole data). The training subset is used to adjust the network via minimising its error. In other words, it is used for computing the gradient and updating the weights and biases of the NNs. The validation subset is used for measuring the network generalisation and to stop the training when the generalisation stops improving. In more detail, when the training begins to overfit the data, the validation error starts to rise. Therefore, the weights and biases of the network are saved at the minimum validation error point so as to balance the accuracy of the learned function versus overfitting. The test subset is used to evaluate the performance of learned function when applying a new set. Actually, the test subset has no influence on the determination of the learned function parameters, but it is a kind of ‘final exam’ to test the performance of each predicted function.
2.1.3. Designing the Network
2.2. PEMFC Control with ANN-PID
2.2.1. Control Design
2.2.2. Metrics Used for Control Performance Improvement
3. Results and Discussion
3.1. Comparison between the Experiment and Simulation Results
3.2. Effect of Temperature and Humidity on the PEM Fuel Cell Stack Performance
3.3. Control Results
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
FC | fuel cell |
PEM | proton exchange membrane |
ML | machine learning |
ANN | artificial neural network |
PEMFC | polymer electrolyte membrane fuel cell |
SOFCs | solid oxide fuel cells |
PAFCs | phosphoric acid fuel cells |
MCFCs | molten carbonate fuel cells |
MEA | membrane electrode assembly |
SVM | support vector machine |
MLP | multilayer perceptron |
ANN-PID | artificial neural network proportional integral-derivative |
PID | proportional integral derivative |
FFNNP | feed-forward neural network perceptron |
LM | levenberg-marquardt |
BR | bayesian regularization |
SCG | scaled conjugate gradient |
MSE | mean squared error |
BFGS | broyden fletcher goldfarb shanno |
IAE | integral of the absolute error |
RMSE | root mean squared error |
RRMSE | relative root mean squared error |
RNN | recurrent neural network |
References
- Li, D.; Li, S.; Ma, Z.; Xu, B.; Lu, Z.; Li, Y.; Zheng, M. Ecological Performance Optimization of a High Temperature Proton Exchange Membrane Fuel Cell. Mathematics 2021, 9, 1332. [Google Scholar] [CrossRef]
- Mahapatra, M.K.; Singh, P. Chapter 24-Fuel Cells: Energy Conversion Technology. In Future Energy, 2nd ed.; Letcher, T.M., Ed.; Elsevier: Boston, MA, USA, 2014; pp. 511–547. [Google Scholar] [CrossRef]
- Kadyk, T.; Winnefeld, C.; Hanke-Rauschenbach, R.; Krewer, U. Analysis and Design of Fuel Cell Systems for Aviation. Energies 2018, 11, 375. [Google Scholar] [CrossRef] [Green Version]
- Oldenbroek, V.; Smink, G.; Salet, T.; van Wijk, A.J. Fuel Cell Electric Vehicle as a Power Plant: Techno-Economic Scenario Analysis of a Renewable Integrated Transportation and Energy System for Smart Cities in Two Climates. Appl. Sci. 2020, 10, 143. [Google Scholar] [CrossRef] [Green Version]
- Xing, H.; Stuart, C.; Spence, S.; Chen, H. Fuel Cell Power Systems for Maritime Applications: Progress and Perspectives. Sustainability 2021, 13, 1213. [Google Scholar] [CrossRef]
- Wang, Y.; Chen, K.S.; Mishler, J.; Cho, S.C.; Adroher, X.C. A review of polymer electrolyte membrane fuel cells: Technology, applications, and needs on fundamental research. Appl. Energy 2011, 88, 981–1007. [Google Scholar] [CrossRef] [Green Version]
- Weber, A.Z.; Balasubramanian, S.; Das, P.K. Chapter 2-Proton Exchange Membrane Fuel Cells. In Fuel Cell Engineering; Sundmacher, K., Ed.; Academic Press: Cambridge, MA, USA, 2012; Volume 41, pp. 65–144. [Google Scholar] [CrossRef]
- Ji, M.; Wei, Z. A Review of Water Management in Polymer Electrolyte Membrane Fuel Cells. Energies 2009, 2, 1057–1106. [Google Scholar] [CrossRef] [Green Version]
- Han, J.; Charpentier, J.F.; Tang, T. An Energy Management System of a Fuel Cell/Battery Hybrid Boat. Energies 2014, 7, 2799–2820. [Google Scholar] [CrossRef] [Green Version]
- Fang, L.; Di, L.; Ru, Y. A Dynamic Model of PEM Fuel Cell Stack System for Real Time Simulation. In Proceedings of the 2009 Asia-Pacific Power and Energy Engineering Conference, Wuhan, China, 27–31 March 2009; pp. 1–5. [Google Scholar] [CrossRef]
- Saadi, A.; Becherif, M.; Aboubou, A.; Ayad, M. Comparison of proton exchange membrane fuel cell static models. Renew. Energy 2013. [Google Scholar] [CrossRef]
- Amphlett, J.C.; Baumert, R.M.; Mann, R.F.; Peppley, B.A.; Roberge, P.R.; Harris, T.J. Performance Modeling of the Ballard Mark IV Solid Polymer Electrolyte Fuel Cell: I. Mechanistic Model Development. J. Electrochem. Soc. 1995, 142, 1–8. [Google Scholar] [CrossRef]
- Kandidayeni, M.; Macias, A.; Boulon, L.; Trovão, J.P.F. Online Modeling of a Fuel Cell System for an Energy Management Strategy Design. Energies 2020, 13, 3713. [Google Scholar] [CrossRef]
- Je, L.; Dicks, A. Proton exchange membrane fuel cells. Fuel Cell Syst. Explain. 2013, 18, 67–119. [Google Scholar] [CrossRef]
- Kim, J.; Lee, S.; Srinivasan, S.; Chamberlin, C. Modeling of Proton Exchange Membrane Fuel Cell Performance with an Empirical Equation. J. Electrochem. Soc. 1995, 142, 2670–2674. [Google Scholar] [CrossRef]
- Pathapati, P.; Xue, X.; Tang, J. A new dynamic model for predicting transient phenomena in a PEM fuel cell system. Renew. Energy 2005, 30, 1–22. [Google Scholar] [CrossRef]
- Ansari, S.; Khalid, M.; Kamal, K.; Abdul Hussain Ratlamwala, T.; Hussain, G.; Alkahtani, M. Modeling and Simulation of a Proton Exchange Membrane Fuel Cell Alongside a Waste Heat Recovery System Based on the Organic Rankine Cycle in MATLAB/SIMULINK Environment. Sustainability 2021, 13, 1218. [Google Scholar] [CrossRef]
- Rubio, G.A.; Agila, W.E. A Fuzzy Model to Manage Water in Polymer Electrolyte Membrane Fuel Cells. Processes 2021, 9, 904. [Google Scholar] [CrossRef]
- Moaveni, B.; Rashidi Fathabadi, F.; Molavi, A. Fuzzy control system design for wheel slip prevention and tracking of desired speed profile in electric trains. Asian J. Control 2020, 1–13. [Google Scholar] [CrossRef]
- Napole, C.; Barambones, O.; Calvo, I.; Derbeli, M.; Silaa, M.; Velasco, J. Advances in Tracking Control for Piezoelectric Actuators Using Fuzzy Logic and Hammerstein-Wiener Compensation. Mathematics 2020, 8, 2071. [Google Scholar] [CrossRef]
- Tian, Y.; Zou, Q.; Han, J. Data-Driven Fault Diagnosis for Automotive PEMFC Systems Based on the Steady-State Identification. Energies 2021, 14, 1918. [Google Scholar] [CrossRef]
- Shao, J.; Liu, X.; He, W. Kernel Based Data-Adaptive Support Vector Machines for Multi-Class Classification. Mathematics 2021, 9, 936. [Google Scholar] [CrossRef]
- Napole, C.; Barambones, O.; Derbeli, M.; Calvo, I.; Silaa, M.; Velasco, J. High-Performance Tracking for Piezoelectric Actuators Using Super-Twisting Algorithm Based on Artificial Neural Networks. Mathematics 2021, 9, 244. [Google Scholar] [CrossRef]
- Nanadegani, F.S.; Lay, E.N.; Iranzo, A.; Salva, J.A.; Sunden, B. On neural network modeling to maximize the power output of PEMFCs. Electrochim. Acta 2020, 348, 136345. [Google Scholar] [CrossRef]
- Qin, Y.; Duan, H. Single-Neuron Adaptive Hysteresis Compensation of Piezoelectric Actuator Based on Hebb Learning Rules. Micromachines 2020, 11, 84. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Vt, S.E.; Shin, Y.C. Radial basis function neural network for approximation and estimation of nonlinear stochastic dynamic systems. IEEE Trans. Neural Netw. 1994, 5, 594–603. [Google Scholar]
- Li, Y.; Qiang, S.; Zhuang, X.; Kaynak, O. Robust and adaptive backstepping control for nonlinear systems using RBF neural networks. IEEE Trans. Neural Netw. 2004, 15, 693–701. [Google Scholar] [CrossRef] [PubMed]
- Priddy, K.L.; Keller, P.E. Artificial Neural Networks: An Introduction; SPIE Press: Bellingham, WA, USA, 2005; Volume 68. [Google Scholar]
- Derbeli, M.; Charaabi, A.; Barambones, O.; Napole, C. High-Performance Tracking for Proton Exchange Membrane Fuel Cell System PEMFC Using Model Predictive Control. Mathematics 2021, 9, 1158. [Google Scholar] [CrossRef]
- Derbeli, M.; Barambones, O.; Farhat, M.; Ramos-Hernanz, J.A.; Sbita, L. Robust high order sliding mode control for performance improvement of PEM fuel cell power systems. Int. J. Hydrogen Energy 2020, 45, 29222–29234. [Google Scholar] [CrossRef]
- Derbeli, M.; Barambones, O.; Ramos-Hernanz, J.A.; Sbita, L. Real-time implementation of a super twisting algorithm for PEM fuel cell power system. Energies 2019, 12, 1594. [Google Scholar] [CrossRef] [Green Version]
- Karim, H.; Niakan, S.R.; Safdari, R. Comparison of neural network training algorithms for classification of heart diseases. IAES Int. J. Artif. Intell. 2018, 7, 185. [Google Scholar] [CrossRef] [Green Version]
- Falcão, D.; Pires, J.C.M.; Pinho, C.; Pinto, A.; Martins, F.G. Artificial neural network model applied to a PEM fuel cell. In Proceedings of the IJCCI 2009: Proceedings of the International Joint Conference on Computational Intelligence, Funchal, Portugal, 5–7 October 2009. [Google Scholar]
- Dao, D.V.; Adeli, H.; Ly, H.B.; Le, L.M.; Le, V.M.; Le, T.T.; Pham, B.T. A sensitivity and robustness analysis of GPR and ANN for high-performance concrete compressive strength prediction using a Monte Carlo simulation. Sustainability 2020, 12, 830. [Google Scholar] [CrossRef] [Green Version]
- Nhu, V.H.; Hoang, N.D.; Duong, V.B.; Vu, H.D.; Bui, D.T. A hybrid computational intelligence approach for predicting soil shear strength for urban housing construction: A case study at Vinhomes Imperia project, Hai Phong city (Vietnam). Eng. Comput. 2020, 36, 603–616. [Google Scholar] [CrossRef]
- Arabi, M.; Dehshiri, A.; Shokrgozar, M. Modeling transportation supply and demand forecasting using artificial intelligence parameters (Bayesian model). Istraz. I Proj. Za Privredu 2018, 16, 43–49. [Google Scholar] [CrossRef] [Green Version]
- Mudunuru, V. Comparison of activation functions in multilayer neural networks for stage classification in breast cancer. Neural Parallel Sci. Comput. Arch. 2016, 24, 83–96. [Google Scholar]
- Kumar, D.A.; Murugan, S. Performance Analysis of MLPFF Neural Network Back Propagation Training Algorithms for Time Series Data. In Proceedings of the 2014 World Congress on Computing and Communication Technologies, Trichirappalli, India, 27 February–1 March 2014; pp. 114–119. [Google Scholar] [CrossRef]
- Sharma, B.; Venugopalan, K. Comparison of Neural Network Training Functions for Hematoma Classification in Brain CT Images. IOSR J. Comput. Eng. 2014, 16, 31–35. [Google Scholar] [CrossRef]
- Shende, K.V.; Kumar, M.R.; Kale, K. Comparison of Neural Network Training Functions for Prediction of Outgoing Longwave Radiation over the Bay of Bengal. In Computing in Engineering and Technology; Springer: Berlin/Heidelberg, Germany, 2020; pp. 411–419. [Google Scholar]
- Meng, F.; Hu, Y.; Ma, P.; Zhang, X.; Li, Z. Practical Control of a Cold Milling Machine using an Adaptive PID Controller. Appl. Sci. 2020, 10, 2516. [Google Scholar] [CrossRef] [Green Version]
- Magotra, A.; Kim, J. Improvement of Heterogeneous Transfer Learning Efficiency by Using Hebbian Learning Principle. Appl. Sci. 2020, 10, 5631. [Google Scholar] [CrossRef]
- Napole, C.; Barambones, O.; Calvo, I.; Velasco, J. Feedforward Compensation Analysis of Piezoelectric Actuators Using Artificial Neural Networks with Conventional PID Controller and Single-Neuron PID Based on Hebb Learning Rules. Energies 2020, 13, 3929. [Google Scholar] [CrossRef]
- Liang, Y.; Xu, S.; Hong, K.; Wang, G.; Zeng, T. Neural network modeling and single-neuron proportional–integral–derivative control for hysteresis in piezoelectric actuators. Meas. Control 2019, 52, 1362–1370. [Google Scholar] [CrossRef]
Training Algorithms | Hidden Layers | MSE/Time(s) | Number of Neurons for Each Hidden Layer | |||||||
---|---|---|---|---|---|---|---|---|---|---|
1 | 5 | 10 | 15 | 20 | 25 | 30 | 35 | |||
LM | 1 | MSE | 0.0241 | 0.0052 | 0.0025 | 0.0016 | 0.0017 | 0.0015 | 0.0015 | 0.0014 |
Time | 1.9520 | 9.3870 | 17.1920 | 6.9760 | 6.6720 | 24.9600 | 21.1340 | 16.2700 | ||
2 | MSE | 0.0248 | 0.0036 | 0.0017 | 0.0014 | 0.0014 | 0.0012 | 0.0013 | 0.0012 | |
Time | 8.1680 | 8.1740 | 4.4090 | 31.4030 | 29.4810 | 90.1620 | 54.3320 | 235.6880 | ||
3 | MSE | 0.0244 | 0.0017 | 0.0015 | 0.0012 | 0.0012 | 0.0011 | 0.0011 | 0.0012 | |
Time | 6.9090 | 10.7930 | 6.9720 | 38.5620 | 43.3770 | 304.0570 | 193.9730 | 346.6590 | ||
BR | 1 | MSE | 0.0242 | 0.0106 | 0.0022 | 0.0015 | 0.0015 | 0.0015 | 0.0014 | 0.0014 |
Time | 4.3540 | 6.5850 | 33.0220 | 20.9350 | 40.8840 | 69.8870 | 225.6650 | 268.2380 | ||
2 | MSE | 0.0243 | 0.0022 | 0.0014 | 0.0011 | 0.0010 | 0.0009 | 0.0008 | 0.0008 | |
Time | 41.7 | 6.5 | 132.6 | 260.6 | 657.3 | 1583.5 | 2954.5 | 5438.6 | ||
3 | MSE | 0.0243 | 0.0015 | 0.0012 | 0.0009 | 0.0008 | 0.0007 | 0.0006 | 0.0006 | |
Time | 41.4 | 67.6 | 126 | 518.2 | 1064.3 | 4741.2 | 6936.3 | 13217.4 | ||
BFG | 1 | MSE | 0.0245 | 0.0082 | 0.0065 | 0.0036 | 0.0030 | 0.0029 | 0.0022 | 0.0023 |
Time | 2.2560 | 2.4880 | 1.8110 | 4.7750 | 5.3230 | 7.8430 | 13.4960 | 7.9190 | ||
2 | MSE | 0.0245 | 0.0088 | 0.0024 | 0.0017 | 0.0016 | 0.0020 | 0.0019 | 0.0017 | |
Time | 1.6280 | 2.2800 | 8.2930 | 26.7120 | 25.1810 | 20.8690 | 66.0140 | 223.0960 | ||
3 | MSE | 0.0251 | 0.0048 | 0.0053 | 0.0019 | 0.0017 | 0.0016 | 0.0018 | 0.0018 | |
Time | 1.6 | 8.1 | 15.6 | 27.8 | 85.0 | 278.1 | 601.0 | 1125.1 | ||
SCG | 1 | MSE | 0.0258 | 0.0145 | 0.0100 | 0.0090 | 0.0070 | 0.0052 | 0.0096 | 0.0070 |
Time | 1.2110 | 1.1140 | 1.5290 | 2.4660 | 2.8820 | 5.4720 | 2.0470 | 4.3250 | ||
2 | MSE | 0.0261 | 0.0204 | 0.0317 | 0.0040 | 0.0041 | 0.0023 | 0.0051 | 0.0027 | |
Time | 1.0180 | 1.0500 | 0.7660 | 5.9290 | 6.2720 | 11.5320 | 5.1960 | 27.5590 | ||
3 | MSE | 0.0261 | 0.0082 | 0.0061 | 0.0055 | 0.0028 | 0.0025 | 0.0024 | 0.0027 | |
Time | 1.5150 | 4.1530 | 4.7230 | 6.3070 | 12.4290 | 21.7610 | 24.7390 | 42.3530 |
IAE | RMSE | RRMSE (%) | |||
---|---|---|---|---|---|
NN-PID | PID | NN-PID | PID | NN-PID | PID |
0.0049 | 0.0132 | 0.0138 | 0.2154 | 0.3440 | 5.3857 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Derbeli, M.; Napole, C.; Barambones, O. Machine Learning Approach for Modeling and Control of a Commercial Heliocentris FC50 PEM Fuel Cell System. Mathematics 2021, 9, 2068. https://doi.org/10.3390/math9172068
Derbeli M, Napole C, Barambones O. Machine Learning Approach for Modeling and Control of a Commercial Heliocentris FC50 PEM Fuel Cell System. Mathematics. 2021; 9(17):2068. https://doi.org/10.3390/math9172068
Chicago/Turabian StyleDerbeli, Mohamed, Cristian Napole, and Oscar Barambones. 2021. "Machine Learning Approach for Modeling and Control of a Commercial Heliocentris FC50 PEM Fuel Cell System" Mathematics 9, no. 17: 2068. https://doi.org/10.3390/math9172068
APA StyleDerbeli, M., Napole, C., & Barambones, O. (2021). Machine Learning Approach for Modeling and Control of a Commercial Heliocentris FC50 PEM Fuel Cell System. Mathematics, 9(17), 2068. https://doi.org/10.3390/math9172068