## 3 Thermal Controller Design
### 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 \({}^{\circ}\)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 \({}^{\circ}\)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  
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.  
monitored. The thermal control strategy, which integrated FLC and the LSTMNN, was employed to maintain the temperature within the target range of 70-75 \({}^{\circ}\)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.