Next Article in Journal
Analysis of the Impact of Funding Policies for the Energy Refurbishment of Buildings Using Dynamic Simulations
Previous Article in Journal
Improving the Impact Resistance of Anti-Ram Bollards Using Auxetic and Honeycomb Cellular Cores
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fuzzy Logic Control with Long Short-Term Memory Neural Network for Hydrogen Production Thermal Control System

1
Department of Systems Engineering and Naval Architecture, National Taiwan Ocean University, 2 Pei-Ning Road, Keelung 20224, Taiwan
2
Material and Chemical Research Laboratories, Industrial Technology Research Institute, 195, Sec. 4, Chung Hsing Road, Chutung, Hsinchu 31040, Taiwan
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(19), 8899; https://doi.org/10.3390/app14198899
Submission received: 30 July 2024 / Revised: 24 September 2024 / Accepted: 30 September 2024 / Published: 2 October 2024
(This article belongs to the Topic Innovation, Communication and Engineering)

Abstract

:
In the development of decarbonization technologies and renewable energy, water electrolysis has emerged as a key technology. The efficiency of hydrogen production and its applications are significantly affected by power stability. Enhancing power stability not only improves hydrogen production efficiency and reduces maintenance costs but also ensures long-term reliable system operation. This study proposes a thermal control method that stabilizes hydrogen output by precisely adjusting the temperature of the electrolysis stack, thereby improving hydrogen production efficiency. Fluctuations in the electrolysis stack temperature can lead to instability in the hydrogen output and energy utilization, negatively affecting overall hydrogen production. To address this issue, this study introduces an innovative system architecture and a novel thermal control strategy combining fuzzy logic control with a long short-term memory neural network. This method predicts and adjusts the flow rate of chilled water to maintain the electrolysis stack temperature within a range of ±1 °C while sustaining a constant power output of 10 kW. This approach is crucial for ensuring system stability and maximizing hydrogen production efficiency. Long-term experiments have validated the effectiveness and reliability of this method, demonstrating that this thermal control strategy not only stabilizes the hydrogen production process but also increases the volume of hydrogen generated.

1. Introduction

Hydrogen is increasingly recognized as a key component in energy transition, offering a clean and renewable energy source that can significantly contribute to reducing global dependence on fossil fuels and mitigating climate change. Its role in decarbonizing various sectors is widely acknowledged, with applications spanning transportation, industrial production, and energy storage. Kovač et al. [1] reviewed the potential of hydrogen in energy transition and explored the development of green hydrogen technologies and efficient storage solutions. This aligned with global efforts to address climate change by reducing greenhouse gas emissions, a challenge that conventional energy sources are struggling to meet.
Water electrolysis, used to produce hydrogen, represents a method for developing a sustainable energy system and reducing dependence on fossil fuels. This method not only converts renewable sources such as solar and wind power into storable and transportable hydrogen energy but also addresses the issue of supply instability. The advancement in water electrolysis technology contributes significantly to enhancing energy supply diversity and security, fostering technological innovation, and promoting the development of a green economy [2,3]. However, temperature control during water electrolysis is important for ensuring the efficiency, performance, and safety of the electrolyzer. Proper temperature control not only maximizes energy conversion efficiency, reducing energy losses, but also prevents equipment damage and safety risks, extends equipment lifespan, and reduces long-term operational costs [4,5,6]. Thus, effective temperature control is a key factor in ensuring the stability, safety, and economic viability of the water electrolysis process.
The main types of water electrolysis include alkaline water electrolysis, proton exchange membrane (PEM) electrolysis, and solid oxide electrolysis, each offering unique advantages and applications [7]. In this study, anion exchange membrane (AEM) electrolysis was utilized, a newer technology combining the benefits of traditional alkaline and PEM electrolysis. It provides a highly efficient and cost-effective method for hydrogen production using solid electrolyte membranes [8].
Various approaches for temperature control in water electrolysis systems include conventional proportional–integral–derivative (PID) control, fuzzy logic control (FLC), adaptive control, and predictive control. For example, Ahn et al. [9] utilized a proportional–integral (PI) controller and thermal circuit state feedback in their experiment. O’Keefe et al. [10] developed a dynamic model of a water-cooled fuel cell stack and simulated it with a PI controller in a state-space model. Keller et al. [11] used conventional PID and optimized parameters through feedforward and adaptive PID parameter supply. Xu et al. [12] addressed the slow response and poor dynamic performance by developing a dynamic temperature model for PEM fuel cells and proposing a control strategy based on the sparrow search algorithm PID. Moreover, FLC provides a robust and flexible framework for managing systems characterized by uncertainties, vagueness, and imprecision. This approach originated from L. A. Zadeh’s influential 1965 paper on fuzzy sets [13], which introduced the groundbreaking concept of handling partial membership between 0 and 1. This innovation allows systems to represent degrees of truth instead of relying solely on rigid true/false binaries. The framework laid the foundation for the application of FLC in a wide array of dynamic and complex systems, where conventional control methods, dependent on precise inputs, often prove inadequate. In 1975, Mamdani and Assilian [14] conducted a landmark experiment that marked the first practical implementation of an FLC controller, successfully modeling human-like reasoning and decision-making. This experiment opened avenues for FLC to address imprecise linguistic variables in real-world scenarios, including industrial processes, traffic control, and robotics. It demonstrated that FLC could outperform conventional methods in environments marked by high levels of uncertainty and complexity. Tabanjat et al. [15] enhanced the efficiency of a hybrid photovoltaic proton exchange membrane electrolyzer system by controlling the water temperature of the electrolyzer using FLC. Zou et al. [16] implemented an FLC controller to maintain the stack temperature in a medium-sized 5 kW residential PEM fuel cell system during dynamic load profiles. Further advancements in FLC included the development of multivariable fuzzy controllers, which expanded the FLC approach to handle multiple-input and multiple-output (MIMO) systems, enhancing its control efficiency in highly complex environments. Kiszka et al. [17] introduced a multivariable fuzzy controller based on Gödel’s implication, which provided a more robust handling of interactions between variables in systems with complex interdependencies. More recently, Chen et al. [18] applied a MIMO FLC method for real-time temperature and humidity management in PEM fuel cells, demonstrating significantly improved performance compared to conventional PID control systems, particularly in maintaining system stability and efficiency under dynamic operating conditions. Huang et al. [19] developed a liquid-cooled PEM fuel cell control model incorporating thermal, electrical, and airflow components, and they suggested an adaptive control strategy for managing thermal dynamics during system startup and load changing. Sankar et al. [20] proposed a nonlinear observer-based multivariable sliding mode control scheme for PEM fuel cell systems to maintain various parameters including the output voltage, compressor gas flow rate, fuel cell system temperature, and hydrogen production rate from the water electrolyzer.
Most existing thermal control methods for electrolyzers involve adjusting the flow rate of chilled water to either the electrolysis stack or the heat exchanger for effective cooling. Typically, these methods separate system cooling into two parts: cooling the hydrogen and cooling the electrolysis stack. However, due to space and cost considerations, our experimental setup deviated from conventional designs by integrating both cooling components to share a single chiller. An electric three-way valve was installed at the junction of gas and electrolyte cooling to regulate the flow rate of chilled water on both sides. The electric three-way valve cannot adjust the flow rate in real-time due to the delay in angle switching, which hinders precise control. Unlike other studies where cooling was achieved by directly controlling the flow rate of the chilled water, in this experiment, the chiller itself cannot adjust the flow rate and relies on the electric three-way valve for adjustments, making it difficult to achieve the ideal flow rate instantaneously. The chilled water temperature in this study also differs from others, being 5 °C instead of room-temperature water, which makes the flow rate even harder to control. Hence, this study proposes a novel thermal control strategy combining FLC and a long short-term memory neural network (LSTMNN), specifically designed for this experimental setup, to enhance the system’s precision and stability. FLC can handle system uncertainty and nonlinearity, while the LSTMNN can predict temperature change trends. The LSTMNN, a type of recurrent neural network (RNN), is widely used for time series prediction due to its ability to capture both short-term and long-term dependencies. Originally developed by Hochreiter and Schmidhuber, the LSTMNN addresses the vanishing gradient problem that often plagues conventional RNNs, making it particularly effective for tasks involving sequential data. Staudemeyer and Morris [21] provided an in-depth tutorial on the inner workings of LSTM networks, highlighting their capacity to manage long-range dependencies and retain information over extended periods of time. This was particularly crucial for this study, where the accurate prediction of temporal data depended on the model’s ability to capture complex patterns over varying time scales. The robustness of the LSTMNN in learning such intricate temporal structures makes it an ideal candidate for predicting the data trends discussed in this study. In similar applications, Guo et al. [22] successfully applied the LSTMNN to predict the temperature inside a temperature-controlled container equipped with a cold energy storage system. Their results demonstrated that the LSTMNN could capture the temperature fluctuations with high accuracy, proving its effectiveness in real-time predictive tasks. Likewise, Chen et al. [23] utilized a gated recurrent unit approach to predict the temperature in a reheating furnace. While both methods excel at handling time-dependent data, the ability of the LSTMNN to retain information over longer sequences makes it particularly well suited for complex temperature prediction scenarios. By combining the advantages of both the FLC and LSTMNN strategies, a flexible and predictive control method for the temperature of an electrolysis stack was achieved in this study.
To guide the reader through the structure of this paper, Section 1 introduces the research motivation, literature review, and research methods, clearly identifying the gap our work aims to fill and emphasizing the innovative aspects. Section 2 details the architecture of the thermal control system for hydrogen production. Section 3 explains the design of the thermal controllers, including the implementation of the FLC and LSTMNN strategies. Section 4 presents the experimental setup and results, discussing the effectiveness and reliability of the proposed control strategies. Finally, Section 5 concludes the paper with key findings and suggestions for future research. All abbreviations and symbols used throughout this manuscript are listed in Table A1, which can be found in Appendix A.

2. Thermal Control System Architecture

Figure 1 illustrates the architecture of the thermal control system for hydrogen production. In Figure 1, ES represents the electrolysis stack, PHE denotes a plate heat exchanger, GLS is a gas–liquid separator, RTD stands for a resistance temperature detector, GPT refers to a gas purification tank, ETV represents the electric three-way valve, MCU denotes the microcontroller unit, and RPi stands for a Raspberry Pi control board. Gas cooling and electrolyte cooling both use the same chiller, which operates at a fixed flow rate and a set temperature of 5 °C. Both the cathode and anode sides of the electrolysis stack are equipped with a heat exchanger for cooling. The chiller outlet first goes through the gas heat exchanger. Then, the electric three-way valve adjusts the flow rate of the chilled water, which cools the electrolyte and passes through the heat exchangers on both sides of the electrolysis stack. The signals from the hydrogen production system are acquired through the microcontroller unit. A resistance temperature detector PT100 was used, which operated within a temperature range of 0 to 100 °C and had a temperature coefficient of resistance (α) of 0.00385/°C. The Raspberry Pi control board manages the electric three-way valve, calculating and adjusting its angle based on the designed controllers. These functions are executed using relays. The electric three-way valve has two control lines: one for clockwise opening and the other for counterclockwise closing. When either control line is powered, the valve moves in the corresponding direction, and when neither is powered, the valve stops moving. The relays determine which control line is powered, and by doing so, they regulate the flow of chilled water through the electric three-way valve. The valve’s stopping action locks the flow at the required rate. However, for precise control, the valve must fully close before reopening for the specified duration to achieve the desired flow rate. Due to the time lag introduced by the relays switching the electric three-way valve, there is a delay from when the valve starts moving to when it stops. This delay prevents the valve from adjusting the flow rate to match the calculated value in real time.
In a hydrogen production system, maintaining stable total current and power of the electrolysis stack is important for the efficiency, economic feasibility, and reliability of the hydrogen production process. Stable total current and power indicate high operational efficiency and optimal energy utilization, ensuring consistent hydrogen production. The current can be used to calculate the hydrogen production rate, and the relationship between the current and power is proportional. Stable current levels enable predictable hydrogen production costs and support economic analysis and long-term planning. Additionally, stable power operation reduces system wear and extends the lifetime of the electrolysis equipment and hydrogen production system. Power refers to the electrical consumption rate necessary for the hydrogen production system and can be expressed as
P s = I s × V s
where Is and Vs are the total current and voltage of the electrolysis stack, respectively. The hydrogen production rate is an important indicator of hydrogen production efficiency, especially during the water electrolysis process, where the hydrogen production rate can be expressed as
V H = 3600 I s n F × V m 1000
where n is the number of moles of electrons required to produce 1 mole of hydrogen, F is the Faraday constant, and V m is the molar volume of the gas.

3. Thermal Controller Design

3.1. Fuzzy Logic Control Method

FLC mimics human thinking and decision-making processes to handle system uncertainty and vagueness. Unlike conventional binary logic control systems that consider only all-or-nothing situations, FLC allows for varying degrees between complete truth and complete falsehood, providing a more flexible and adaptive control strategy. Hence, this study presents an FLC rule to address specific thermal control problems mainly because it effectively handles temperature uncertainty and nonlinearity. First, a set of fuzzy rules was defined and constructed based on expert knowledge and practical operational experience to describe the behavior of the thermal control system. Next, a fuzzy inference engine was utilized to evaluate these rules and assess the degree of fuzziness of the control actions based on real-time input data. Finally, through a defuzzification process, the fuzzy control actions were converted into crisp output values, which drove the thermal control system to achieve the desired temperature performance by determining the flow rate required by the electric three-way valve. This flow rate was subsequently adjusted within the hydrogen production system based on feedback from the RTD.
The design of FLC typically follows a systematic framework based on the Mamdani inference method. The process begins with the definition of fuzzy variables and their corresponding membership functions, which represent the inputs and outputs of the system. These functions are often modeled using triangular or trapezoidal shapes to effectively handle uncertainty and vagueness. Next, fuzzy rules are established, capturing expert knowledge through IF–THEN statements that describe the relationships between inputs and desired outputs. This step is essential, as the rules form the foundation for the decision-making process of the FLC controller. In the inference phase, the Mamdani approach employs fuzzy reasoning to evaluate the formulated rules, determining the degree to which each rule is activated based on the current inputs. This evaluation allows the controller to derive suitable control actions from the fuzzy rules. Finally, the process concludes with defuzzification, where the aggregated fuzzy output is converted back into a crisp value. This is commonly achieved using the centroid method, which calculates the precise control action needed. Overall, this structured approach enables FLC to manage complex, nonlinear systems, providing robustness and flexibility in various control applications [24]. The detailed design steps are as follows.
Step 1: The fuzzification of input variables involves converting real-valued input values into fuzzy values. This step utilizes fuzzy sets and membership functions to describe the degree of each input variable. Assuming x is an input value, μ A i ( x ) represents the membership degree of x to the i-th fuzzy set Ai, in the range of [0, 1].
Step 2: The establishment of a rule base involves creating a set of fuzzy rules that describe the relationship between the input variables and output variables. These rules, based on expert experience or knowledge, take the form of “IF...THEN...” conditional statements, determining how output decisions are derived from specific input conditions. For example, a fuzzy rule R j could be structured as the following: Rj = IF x is Ai AND y is Bi, THEN z is Ci, where Ai, Bi, and Ci represent fuzzy sets associated with input x, y, and output z, respectively.
Step 3: Mamdani inference involves performing inference on the fuzzified inputs using the Mamdani inference method to generate fuzzy outputs. This method compares the degree of matching between the inputs and the input conditions of each rule, determining the shape of the output membership function based on these matches. The output membership function μ C i ( z ) of a rule is determined by the minimum value of the input membership degrees μ A i ( x ) and μ B i y through AND logic. Subsequently, all output fuzzy sets from rules are aggregated into a single fuzzy set. The aggregated output fuzzy set μ C ( z ) is obtained through the OR logic operation of the output membership degrees μ C i ( z ) from each rule.
Step 4: The centroid method for defuzzification converts the fuzzy output set generated during the inference process into a crisp output value. This method calculates the centroid of the fuzzy set to determine a specific output value. It considers the membership degrees μ C ( z ) of all points on the fuzzy set and calculates the weighted average position of these points, represented mathematically as
Z c e n t r o i d = z z · μ C ( z ) z μ C ( z )
where Zcentroid is the crisp output value obtained by calculating the weighted average of z, and μ C z represents the membership degree of z in the output fuzzy set C. This precise value effectively represents the fuzzy output used for control decisions.
In the experimental setup of this study, a thermal controller based on FLC with dual inputs and a single output was utilized, as shown in Figure 2a. The inputs represented the desired temperature (T*) and temperature difference (eT) in the electrolysis stack, respectively, while the output determined the required the flow rate of the chilled water. In the literature on stack temperature control, the temperature difference and its derivative are commonly used as dual inputs for FLC to achieve rapid cooling. However, in this study, using a large amount of chilled water for cooling was not suitable, as a high chilled water flow rate could have led to a rapid decrease in power output. Thus, using the derivative of the stack temperature difference as an input was not appropriate. The chilled water flow rate was chosen as the output because it was the main factor influencing the stack temperature. The FLC used adopted a design with dual inputs and single output, with triangular and trapezoidal membership functions. Hence, the membership functions for the dual inputs, the temperature and temperature difference in the electrolysis stack, and the single output, the chilled water flow rate, are shown in Figure 2b–d, respectively. A set of 25 fuzzy rules is defined in Table 1, where VS denotes very small, S denotes small, M denotes medium, B denotes big, and VB denotes very big.
The main challenges in applying FLC to the hydrogen production thermal control system included designing appropriate membership functions and fuzzy rules, which can be complex due to the nonlinearities and uncertainties of the temperature variations in an electrolysis stack. Additionally, the computational demands of fuzzy inference can impact real-time performance, especially in systems that require quick responses. Integrating FLC with other control strategies, such as the LSTMNN algorithm, also requires careful calibration to avoid control conflicts. To address these challenges, it is important to select membership functions that accurately represent the characteristics of the input and output variables. For example, triangular and trapezoidal membership functions can effectively represent the temperature and temperature difference in the electrolysis stack and chilled water flow rate. The selection of these functions should be based on empirical data and expert knowledge and should be refined iteratively through testing to ensure optimal control performance.

3.2. Long Short-Term Memory Neural Network

The LSTMNN was specifically designed to address the vanishing and exploding gradient problems that conventional RNNs encounter when processing long sequences. It features three critical gates: the forget gate, input gate, and output gate. The forget gate discards irrelevant data, ensuring that only valuable information is retained. The input gate regulates the amount of new information added to memory, while the output gate manages how much information is sent to the next hidden state, which is crucial for making accurate predictions. Additionally, the LSTMNN maintains a cell state that acts as a memory highway, allowing essential information to flow across many time steps without significant alteration. This design enables the LSTMNN to capture long-term dependencies, effectively overcoming the limitation of a standard RNN. The ability of the forget gate to reset cell states prevents unnecessary information from accumulating, making the model robust for long-sequence tasks. The mathematical representations of the gates are in the following forms [25]:
F t = σ w f h t 1 ,   x t + b f
I t = σ w i h t 1 ,   x t + b i
O t = σ w o h t 1 ,     x t + b o
Furthermore, the new hidden state and the updated cell state can be mathematically represented as
h t = O t tanh C t
C t = F t · C t 1 ) + ( I t · C t ˙
C t ˙ = tanh w c h t 1 ,     x t + b c
σ ( x ) = e x 1 + e x
t a n h ( x ) = e x e x e x + e x
where σ and tanh are activation functions. σ is the sigmoid function, with values in the range of [0, 1], and tanh is the hyperbolic tangent function, with values in the range of [−1, 1].
In this study, an LSTMNN was utilized to process and predict time series data, capitalizing on its ability to effectively capture temporal dependencies. Through the design of gate mechanisms, the LSTMNN retains long-term dependencies while filtering out irrelevant data, thereby improving the accuracy and efficiency of the time series prediction models. Each gate receives inputs from the previous hidden state (ht) and the current input (xt), including the ambient temperature around the electrolysis stack, the power of the electrolysis stack, the flow rate of the chilled water, the temperature difference measured each time for the electrolysis stack, and the temperature of the electrolysis stack. These inputs are concatenated and passed through the sigmoid function, which determines the new candidate values applied to the cell state. The weight matrices wf, wi, and wo, along with the corresponding bias vectors bf, bi, and bo, control the activation values of the forget gate, input gate, and output gate. The weight matrix wc and bias vector bc manage the updates to the cell state.

3.3. FLC with LSTMNN for Hydrogen Production Thermal Control System

In the thermal control system for hydrogen production of this study, the output from the FLC controller, once defuzzified, is passed to the electric three-way valve. However, due to delays in adjusting the chilled water flow rate to the electrolyte, discrepancies arise between expected and actual temperature differences in the hydrogen production system. To address this challenge caused by the operational delay of the electric three-way valve, it became necessary to predict the temperature of the electrolysis stack when the suitable flow rate was achieved after the electric three-way valve was turned on. To overcome this, this study employed the thermal controller combining FLC and LSTMNN strategies in the hydrogen production system, as illustrated in Figure 3. The robust capability of the LSTMNN in learning from time series data enabled the hydrogen production system to forecast temperature trends post adjustment of the electric three-way valve. Moreover, integrating the real-time adjustment capability of the FLC controller allows the hydrogen production system to proactively respond to anticipated temperature variations. Through comprehensive performance evaluation during actual application testing, the effectiveness of the control strategy in enhancing prediction accuracy and system stability was validated.
Figure 4 illustrates the thermal control flowchart of the hydrogen production system. Utilizing an FLC controller alone maintained the desired temperature within a range of ±2 °C. However, integrating the LSTMNN algorithm for temperature prediction enhanced the control effectiveness, achieving the desired temperature within a narrower range of ±1 °C, thus enhancing the existing framework.

3.4. Experimental Setup

The hydrogen production thermal control system was previously outlined in Figure 1. The experimental setup in this study was designed to assess the effectiveness of the proposed thermal control strategy. The main components of the experimental apparatus are the following:
  • Electrolysis Stack (ES)—The electrolysis stack is the key component for hydrogen production, as it directly facilitates the electrolysis process. Ensuring the temperature stability of the electrolysis stack is crucial for maintaining optimal performance and efficiency in hydrogen production.
  • Plate Heat Exchanger (PHE)—Located on both the cathode and anode sides of the electrolysis stack, the PHE is responsible for cooling the electrolyte and maintaining the stack temperature within the desired range.
  • Gas–Liquid Separator (GLS)—This component separates the hydrogen gas produced from the liquid electrolyte, ensuring that the gas output is free of impurities.
  • Resistance Temperature Detector (RTD)—The PT100 RTD is employed to precisely measure the temperature of the electrolysis stack. It operates based on the principle that the electrical resistance of the RTD changes with temperature. This accurate and reliable measurement is essential for monitoring and controlling the temperature of the electrolysis stack to ensure efficient and stable hydrogen production.
  • Gas Pressure Transducer (GPT)—This device measures and monitors the pressure of the hydrogen gas. It is also used to purify the hydrogen gas further by ensuring that it meets the necessary pressure and quality standards before being collected or utilized in subsequent applications. This helps in maintaining the purity and efficiency of the hydrogen output.
  • Electric Three-Way Valve (ETV)—Positioned at the junction of gas and electrolyte cooling, the ETV regulates the flow rate of chilled water on both sides. The valve’s angle is adjusted based on signals from the control system to maintain the desired temperature.
  • Microcontroller Unit (MCU) and Raspberry Pi (RPi) Control Board—The MCU and RPi are used for data acquisition and control operations within the experimental setup. The MCU handles the integration of various sensors and components, while the RPi manages the ETV. Specifically, the RPi calculates and adjusts the angle of the ETV based on control algorithms. This adjustment is executed using relays, enabling precise regulation of the flow rate of chilled water to maintain optimal temperature conditions.
  • Chilled Water System—A single chiller serves both gas and electrolyte cooling, operating at a fixed flow rate and a temperature of 5 °C. This configuration was chosen due to space and cost constraints, despite the challenge of achieving precise flow rate control.
The experimental procedure began with pre-cooling the electrolysis stack to below 40 °C using chilled water. Once this initial cooling was achieved, the hydrogen production system was activated, and the temperature of the electrolysis stack was continuously monitored. The thermal control strategy, which integrated FLC and the LSTMNN, was employed to maintain the temperature within the target range of 70–75 °C. This involved adjusting the flow rate of chilled water through the electric three-way valve as necessary. Real-time temperature signals from the RTD were used to dynamically adjust the control parameters, ensuring stable operation and efficient hydrogen production throughout the experimental process.

4. Experimental Results and Discussion

Before each experiment, chilled water was initially introduced to reduce the temperature of the electrolysis stack below 40 °C. Subsequently, the hydrogen production system was started. During the initial phase of hydrogen production system startup, the electrolysis stack temperature continued to decrease slightly due to the influence of the chilled water before gradually rising again. Due to varying initial cooling conditions, each experiment could not start at the same initial temperature. However, the initial current value at the starting voltage remained relatively low and did not affect the final experimental results. When the hydrogen production system started operating, the voltage of the electrolysis stack gradually increased from the starting voltage to the target voltage over time, and the temperature of the electrolysis stack also rose slowly. Before the temperature of the electrolysis stack reached 65 °C, no chilled water entered the electrolyte for cooling. Once the temperature of the electrolysis stack reached 65 °C, the thermal control algorithm automatically activated to adjust the angle of the electric three-way valve, allowing the chilled water to enter the plate heat exchanger for electrolyte cooling. This kept the temperature of the electrolysis stack controlled within the optimal operating temperature range of 70–75 °C. To prevent the temperature of the electrolysis stack from exceeding the optimal operating temperature range, the target temperature was adjusted to the midpoint of the range, specifically 72.5 °C.
In the experimental results, Figure 5 illustrates the temperature response of the electrolysis stack in the hydrogen production system under various thermal control strategies. It can be observed that there was a significant variation in the temperature of the electrolysis stack, varying within a range of 72.5 ± 2 °C. These variations are primarily due to the delayed response of the electric three-way valve, which adjusted flow rates only after receiving output from the FLC strategy. As the electric three-way valve adjusts to the set flow rate, a noticeable temperature discrepancy occurs between the current temperature and the temperature output from the FLC strategy, resulting in suboptimal thermal control outcomes. Therefore, by using an LSTMNN algorithm to predict the temperature of the electrolysis stack after the relay is opened, followed by applying the FLC method for calculation, significant improvements can be achieved in the thermal control of the electrolysis stack compared to the original FLC strategy. The temperature prediction approach reduced the temperature discrepancy, enabling the final experimental results to maintain the temperature of the electrolysis stack within a narrower range of 72.5 ± 1 °C.
Figure 6 illustrates the power response of the hydrogen production system under two different thermal control strategies: one using FLC alone and the other incorporating the LSTMNN. From the comparison of the power outputs, it was observed that the thermal control results using FLC with the LSTMNN consistently maintained the power around 10 kW, with very minimal fluctuations upon reaching a steady state. This indicates improved stability compared to using the FLC method alone, which showed significantly reduced temperature fluctuations. Figure 7 shows the current response of the electrolysis stack in the hydrogen production system using the two thermal control strategies. The current remained stable at approximately 263 A, showing negligible fluctuations compared to results from the FLC method alone. Hydrogen production rates were separately calculated for both thermal control methods using Equation (2). The cumulative hydrogen production was 1.3997 m3 and 1.4012 m3, respectively, indicating a slight increase in production. Previous experimental results demonstrated that short-term thermal control did not lead to uncontrolled temperature variations, allowing for extended operation to assess system stability, reliability, and performance improvements. Figure 8 illustrates the temperature response of the electrolysis stack in the hydrogen production system during a long-term experiment, where the temperature of the electrolysis stack was consistently maintained within a range of 72.5 ± 1 °C. The experimental result also demonstrates stable power and energy consumption, confirming the feasibility, effectiveness, and reliability of the thermal control strategy using FLC with the LSTMNN.
The experimental results investigated the integration of the FLC and LSTMNN strategies in the thermal control system to achieve more precise temperature regulation of the electrolysis stack in the hydrogen production system. Table 2 presents a detailed performance analysis comparing the FLC method alone with the combined FLC and LSTMNN strategies. Using the FLC method alone, the temperature of the electrolysis stack could be regulated within a ±2 °C range, yet significant variations persisted due to the slow response of the electric three-way valve. This delay caused discrepancies between the actual and target temperatures as the FLC signal failed to promptly adjust the valve. To overcome these limitations, the designed LSTMNN algorithm predicts temperature based on measured data before feeding it into the FLC controller. This approach reduces steady-state error variations in the electrolysis stack temperature, enhancing thermal control effectiveness. As shown in Table 2, the combined hydrogen production thermal control system, employing the FLC and LSTMNN strategies, demonstrates robust stability during long-term experiments. It consistently maintained temperatures within ±1 °C and stabilized the power output at 10 kW. This integrated approach, highlighted in Table 2, enhances overall system performance, as confirmed by extended experimental testing, emphasizing its feasibility, effectiveness, and reliability. Therefore, the thermal control strategy in this study, integrating FLC with an LSTMNN, significantly improves the thermal control capabilities in a hydrogen production system. Its high stability in long-term experiments underscores its potential and practicality in actual applications.

5. Conclusions

Water electrolysis is an effective method for converting renewable energy into hydrogen, significantly enhancing energy supply diversity, ensuring security, fostering technological innovation, and promoting the development of a green economy. However, precise thermal control during water electrolysis is essential for optimizing the efficiency, performance, and safety of an electrolysis stack. Proper thermal control can maximize energy conversion efficiency, reduce energy losses, prevent equipment damage, extend equipment lifetime, and lower long-term operational costs. Hence, developing effective thermal control strategies is important for ensuring the stability, safety, and economic efficiency of a water electrolysis process. This study proposes a thermal control strategy combining fuzzy logic control (FLC) and a long short-term memory neural network (LSTMNN) to enhance the stability and efficiency of a hydrogen production system. Water electrolysis is crucial for converting renewable energy into hydrogen, but precise thermal control is needed to optimize the efficiency, performance, and safety of the electrolysis stack. The proposed thermal control strategy effectively integrated FLC and the LSTMNN, allowing for predictive temperature control, maintaining the stack temperature within 72.5 ± 1 °C, stabilizing the power output at 10 kW, and maintaining a stable current of 263 A. These improvements maximized energy efficiency, reduced losses, and extended the equipment’s lifespan. Although these results are based on a specific experimental setup, they highlight the benefits of predictive control in managing system uncertainties. Future studies should focus on integrating advanced machine learning models, optimizing control strategies, incorporating remote monitoring through the IoT, and evaluating long-term operational reliability to advance the development of more efficient and sustainable hydrogen production systems.

Author Contributions

Conceptualization, H.-C.Y.; methodology, H.-C.Y.; software, Q.-A.W.; validation, Q.-A.W.; resources, S.-J.L.; data curation, Q.-A.W.; writing—original draft preparation, H.-C.Y. and Q.-A.W.; writing—review and editing, H.-C.Y.; supervision, H.-C.Y.; funding acquisition, S.-J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Industrial Technology Research Institute, Taiwan, R.O.C. under grant number 113A50102.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author due to privacy.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Table A1. List of abbreviations and symbols used in this manuscript.
Table A1. List of abbreviations and symbols used in this manuscript.
Symbol/AbbreviationDefinition/Description
PEMProton exchange membrane
AEMAnion exchange membrane
PIDProportional–integral–derivative
FLCFuzzy logic control
PIProportional–integral
LSTMNNLong short-term memory neural network
ESElectrolysis stack
PHEPlate heat exchanger
GLSGas–liquid separator
RTDResistance temperature detector
GPT Gas purification tank
ETVElectric three-way valve
MCUMicrocontroller unit
RPiRaspberry Pi
αTemperature coefficient of resistance
ZcentroidCrisp output value obtained by calculating the weighted average of z
μ C z Membership degree of z in the output fuzzy set C
F t Forget gate
I t Input gate
O t Output gate
h t Hidden state vector
C t Cell state vector
C t ˙ Candidate cell state
σSigmoid function
tanhHyperbolic tangent function
wf, wi, wc, woWeight matrices
bf, bi, bc, boBias vectors
P s Power or electrical consumption rate necessary for a hydrogen production system
I s Total current of the electrolysis stack
V sTotal voltage of the electrolysis stack
V H Hydrogen production rate
n Number of moles of electrons required to produce 1 mole of hydrogen
F Faraday constant
V m Molar volume of the gas

References

  1. Kovač, A.; Paranos, M.; Marciuš, D. Hydrogen in energy transition: A review. Int. J. Hydrog. Energy 2021, 46, 10016–10035. [Google Scholar] [CrossRef]
  2. Kumar, S.S.; Lim, H. An overview of water electrolysis technologies for green hydrogen production. Energy Rep. 2022, 8, 13793–13813. [Google Scholar] [CrossRef]
  3. Ursua, A.; Gandia, L.M.; Sanchis, P. Hydrogen production from water electrolysis: Current status and future trends. Proc. IEEE 2012, 100, 410–426. [Google Scholar] [CrossRef]
  4. Machado, B.S.; Chakraborty, N.; Das, P.K. Influences of flow direction, temperature and relative humidity on the performance of a representative anion exchange membrane fuel cell: A computational analysis. Int. J. Hydrog. Energy 2017, 42, 6310–6323. [Google Scholar] [CrossRef]
  5. Zhang, H.; Lin, G.; Chen, J. Evaluation and calculation on the efficiency of a water electrolysis system for hydrogen production. Int. J. Hydrog. Energy 2010, 35, 10851–10858. [Google Scholar] [CrossRef]
  6. Sriram, G.; Dhanabalan, K.; Ajeya, K.V.; Aruchamy, K.; Becherif, M. Recent progress in anion exchange membranes (AEMs) in water electrolysis: Synthesis, physio-chemical analysis, properties, and applications. J. Mater. Chem. 2023, 11, 20886–21008. [Google Scholar] [CrossRef]
  7. Yang, B.; Zhang, R.; Shao, Z.; Zhang, C. The economic analysis for hydrogen production cost towards electrolyzer technologies: Current and future competitiveness. Int. J. Hydrog. Energy 2023, 48, 13767–13779. [Google Scholar] [CrossRef]
  8. Vincent, I.; Kruger, A.; Bessarabov, D. Development of efficient membrane electrode assembly for low cost hydrogen production by anion exchange membrane electrolysis. Int. J. Hydrog. Energy 2017, 42, 10752–10761. [Google Scholar] [CrossRef]
  9. Ahn, J.; Choe, S. Coolant controls of a PEM fuel cell system. J. Power Sources 2008, 179, 252–264. [Google Scholar] [CrossRef]
  10. O’Keefe, D.; EI-Sharkh, M.Y.; Telotte, J.C.; Palanki, S. Temperature dynamics and control of a water-cooled fuel cell stack. J. Power Sources 2024, 256, 470–478. [Google Scholar] [CrossRef]
  11. Keller, R.; Rauls, E.; Hehemann, M. An adaptive model-based feedforward temperature control of a 100 kW PEM electrolyzer. Control Eng. Pract. 2022, 120, 104992–105002. [Google Scholar] [CrossRef]
  12. Xu, J.; Yan, H.; Ding, Q. Sparrow search algorithm applied to temperature control in PEM fuel cell systems. Int. J. Hydrog. Energy 2022, 47, 39973–39986. [Google Scholar] [CrossRef]
  13. Zadeh, L.A. Fuzzy Sets. Inf. Control 1965, 8, 338–353. [Google Scholar] [CrossRef]
  14. Mamdani, E.H.; Assilian, S. An experiment in linguistic synthesis with a fuzzy logic controller. Int. J. Man-Mach. Stud. 1975, 7, 1–13. [Google Scholar] [CrossRef]
  15. Tabanjat, A.; Becherif, M.; Emziane, M.; Hissel, D.; Ramadan, H.S.; Mahmah, B. Fuzzy logic-based water heating control methodology for the efficiency enhancement of hybrid PV–PEM electrolyser systems. Int. J. Hydrog. Energy 2015, 40, 2149–2161. [Google Scholar] [CrossRef]
  16. Zou, W.; Kim, Y. Temperature control for a 5 kW water-cooled PEM fuel cell system for a household application. IEEE Access 2019, 7, 144826–144835. [Google Scholar] [CrossRef]
  17. Kiszka, J.B.; Gupta, M.M.; Trojan, G.M. Multivariable fuzzy controller under Gödel’s implication. Fuzzy Sets Syst. 1990, 34, 301–321. [Google Scholar] [CrossRef]
  18. Chen, X.; Xu, J.; Fang, Y. Temperature and humidity management of PEM fuel cell power system using multi-input and multi-output fuzzy method. Appl. Therm. Eng. 2022, 203, 117865–117875. [Google Scholar] [CrossRef]
  19. Huang, L.; Chen, J.; Bannon, E.; Liu, Z.; Becherif, M. Adaptive thermal control for PEMFC systems with guaranteed performance. Int. J. Hydrog. Energy 2018, 43, 11550–11558. [Google Scholar] [CrossRef]
  20. Sankar, K.; Jana, A.K. Nonlinear control of a PEM fuel cell integrated system with water electrolyzer. Chem. Eng. Res. Des. 2021, 171, 150–167. [Google Scholar] [CrossRef]
  21. Staudemeyer, R.C.; Morris, E.R. Understanding LSTM—A tutorial into long short-term memory recurrent neural networks. arXiv 2019, arXiv:1909.09586. [Google Scholar]
  22. Guo, J.; Liu, D.; Lin, S. Temperature prediction of a temperature-controlled container with cold energy storage system based on long short-term memory neural network. Appl. Sci. 2024, 14, 854. [Google Scholar] [CrossRef]
  23. Chen, C.; Chou, F.; Chou, J. Temperature prediction for reheating furnace by gated recurrent unit approach. IEEE Access 2022, 10, 33362–33369. [Google Scholar] [CrossRef]
  24. Nguyen, A.T.; Taniguchi, T.; Eciolaza, L.; Campos, V.; Palhares, R.; Sugeno, M. Fuzzy control systems: Past, present and future. IEEE Comput. Intell. Mag. 2019, 14, 56–68. [Google Scholar] [CrossRef]
  25. Ghojogh, B.; Ghodsi, A. Recurrent neural networks and long short-term memory networks: Tutorial and survey. arXiv 2023, arXiv:2304.11461v1. [Google Scholar]
Figure 1. Architecture of the hydrogen production thermal control system, depicting the overall design, including circulation paths for chilled water and electrolyte, signal configuration, and the interactions between components to manage and optimize temperature control during hydrogen production.
Figure 1. Architecture of the hydrogen production thermal control system, depicting the overall design, including circulation paths for chilled water and electrolyte, signal configuration, and the interactions between components to manage and optimize temperature control during hydrogen production.
Applsci 14 08899 g001
Figure 2. Thermal controller based on FLC: (a) control block diagram; (b) membership function for temperature; (c) membership function for temperature difference; (d) membership function for chilled water flow rate.
Figure 2. Thermal controller based on FLC: (a) control block diagram; (b) membership function for temperature; (c) membership function for temperature difference; (d) membership function for chilled water flow rate.
Applsci 14 08899 g002
Figure 3. Thermal controller with FLC and LSTMNN strategies in the hydrogen production system, illustrating the integration of these strategies within the thermal control system to enhance temperature regulation and overall performance.
Figure 3. Thermal controller with FLC and LSTMNN strategies in the hydrogen production system, illustrating the integration of these strategies within the thermal control system to enhance temperature regulation and overall performance.
Applsci 14 08899 g003
Figure 4. Flowchart of thermal control in the hydrogen production system, outlining the sequential steps and decision-making processes involved in the thermal control strategy from data acquisition to control action implementation.
Figure 4. Flowchart of thermal control in the hydrogen production system, outlining the sequential steps and decision-making processes involved in the thermal control strategy from data acquisition to control action implementation.
Applsci 14 08899 g004
Figure 5. Temperature response of the electrolysis stack with different thermal control strategies, comparing temperature stability under various approaches and demonstrating how the two strategies affected temperature regulation.
Figure 5. Temperature response of the electrolysis stack with different thermal control strategies, comparing temperature stability under various approaches and demonstrating how the two strategies affected temperature regulation.
Applsci 14 08899 g005
Figure 6. Power response of the hydrogen production system under two different thermal control strategies, displaying variations in power output when using different approaches and illustrating their impact on system performance.
Figure 6. Power response of the hydrogen production system under two different thermal control strategies, displaying variations in power output when using different approaches and illustrating their impact on system performance.
Applsci 14 08899 g006
Figure 7. Current response of the electrolysis stack using two thermal control strategies, presenting current variations under these strategies and highlighting differences in electrical performance.
Figure 7. Current response of the electrolysis stack using two thermal control strategies, presenting current variations under these strategies and highlighting differences in electrical performance.
Applsci 14 08899 g007
Figure 8. Temperature response of the electrolysis stack in a long-term hydrogen production experiment, showing temperature trends over an extended period and demonstrating the effectiveness of the thermal control strategy in maintaining stability during prolonged operation.
Figure 8. Temperature response of the electrolysis stack in a long-term hydrogen production experiment, showing temperature trends over an extended period and demonstrating the effectiveness of the thermal control strategy in maintaining stability during prolonged operation.
Applsci 14 08899 g008
Table 1. A set of 25 fuzzy rules used in the FLC strategy outlining specific rules that evaluated dual inputs, which were the temperature and temperature difference in the electrolysis stack, to determine a single output, which was the chilled water flow rate.
Table 1. A set of 25 fuzzy rules used in the FLC strategy outlining specific rules that evaluated dual inputs, which were the temperature and temperature difference in the electrolysis stack, to determine a single output, which was the chilled water flow rate.
TemperatureVSSMBVB
Temperature Difference
VSVSVSVSVSVS
SVSVSVSVSVS
MVSSMBM
BSSMBVB
VBMMBVBVB
Table 2. Performance analysis of FLC versus the combined FLC and LSTMNN strategies.
Table 2. Performance analysis of FLC versus the combined FLC and LSTMNN strategies.
StrategiesFLC StrategyCombined FLC with LSTMNN Strategy
Parameters
Temperature Control and StabilityMaintained stack temperature within a ±2 °C range, but noticeable fluctuations occurred during rapid changes in operating conditions.Reduced temperature variations, maintaining the stack temperature within a ±1 °C range. The LSTMNN predicted temperature changes and proactively adjusted control parameters, thereby enhancing stability.
Power Output StabilitySignificant power output fluctuations, especially when adjusting to temperature changes, may have reduced production efficiency and increased equipment wear.Maintained power output consistently around 10 kW with minimal variations, indicating higher energy utilization efficiency and a more stable hydrogen production process.
Hydrogen Production RateSimilar cumulative hydrogen production, but slightly lower production efficiency due to less precise temperature control, leading to higher energy loss.Slightly improved production efficiency was achieved due to precise temperature control, which optimized electrolysis conditions, reduced energy loss, prevented thermal stress, and significantly enhanced overall system efficiency and performance.
Overall Performance and ImplicationsPerformed well under certain operating conditions but had room for improvement in overall stability and efficiency.Outperformed the FLC-only strategy by enhancing temperature stability, power output consistency, and hydrogen production efficiency, while also extending the equipment’s lifespan.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yu, H.-C.; Wang, Q.-A.; Li, S.-J. Fuzzy Logic Control with Long Short-Term Memory Neural Network for Hydrogen Production Thermal Control System. Appl. Sci. 2024, 14, 8899. https://doi.org/10.3390/app14198899

AMA Style

Yu H-C, Wang Q-A, Li S-J. Fuzzy Logic Control with Long Short-Term Memory Neural Network for Hydrogen Production Thermal Control System. Applied Sciences. 2024; 14(19):8899. https://doi.org/10.3390/app14198899

Chicago/Turabian Style

Yu, Hsing-Cheng, Qing-An Wang, and Szu-Ju Li. 2024. "Fuzzy Logic Control with Long Short-Term Memory Neural Network for Hydrogen Production Thermal Control System" Applied Sciences 14, no. 19: 8899. https://doi.org/10.3390/app14198899

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop