## 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 \({}^{\circ}\)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 \({}^{\circ}\)C and had a temperature coefficient of resistance (\(\alpha\)) of 0.00385/\({}^{\circ}\)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}\times V_{s} \tag{1}\]  
where \(I_{s}\) and \(V_{s}\) 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}=\frac{3600I_{s}}{nF}\times\frac{V_{m}}{1000} \tag{2}\]  
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.  
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.