1. Introduction
In recent years, the production of biofuels has increased. One of them, biohydrogen, is produced from biomass and organic waste through biological or thermochemical processes. This renewable fuel is an alternative to fossil fuels and reduces greenhouse gases. Biohydrogen is extracted from renewable resources instead of natural gas. These can be waste generated by agriculture or industry [
1].
Biohydrogen production faces multiple challenges in its large-scale adoption as a clean energy source. One of them is involved in how biofuel is obtained, one way is electrolysis, which is very expensive [
2]. Other ways of production are using industrial water waste from beverage, chemical, distillery, effluent, palm oil, and sugar industries [
3,
4,
5]; employing microorganisms, such as dark fermentative bacteria, photosynthetic bacteria, and algae, to convert organic substrates to hydrogen gas under anaerobic conditions [
6,
7,
8].
Biohydrogen production includes technologies such as dark fermentation, where anaerobic bacteria degrade organic matter to generate hydrogen, albeit with impurities such as CO
2 and CH
4 [
8]. Photofermentation uses photosynthetic bacteria and sunlight to convert organic acids to hydrogen, complementing dark fermentation [
9]. Microbial electrolysis uses microorganisms in fuel cells to produce hydrogen from organic matter, with greater energy efficiency [
10]. Artificial photosynthesis mimics natural processes using catalysts and sunlight to separate water into hydrogen and oxygen [
11]. Finally, biomass gasification transforms biomass into syngas, which is then reformed to obtain hydrogen, although it requires purification [
12]. One of the problems with these technologies is the purity of the product; for this, the pressure swing adsorption (PSA) plant can help us achieve the purity required for international standards, which is the 99% purity of the biohydrogen [
13,
14,
15].
The PSA plant is a typical cyclic process, which means a complex behavior in which many columns are interconnected and operated at different pressures and temperatures according to a specific sequence, with the objective of separate gases and purification [
16]. Widely used in many processes to separate gases or to purify a gas mixture, the PSA plant is a robust, flexible and commercially viable separation technology [
17,
18,
19].
Some of the impurities in hydrogen production are carbon dioxide (CO
2), methane (CH
4) and other contaminants, which require purification before their use in fuel cells or industrial applications [
8,
11]. Among the various gas separation technologies, PSA has emerged as a highly effective method for purifying hydrogen from gas mixtures. PSA operates on the principle of selective adsorption of impurities under high pressure, followed by desorption at lower pressures, enabling the recovery of high-purity hydrogen [
20,
21,
22,
23].
Furthermore, the cost of producing biohydrogen using the PSA plant may be less expensive than that obtained with other methods. All of this depends on the number of columns and the type of absorbent. In the case of using warm gas separation technology with a zinc oxide sorbent, as demonstrated by Rosner et al. [
24], the cost of electricity can reach 127.2 USD/MWh. When coupled with a vacuum PSA unit, is approximately 5 EUR/kg of hydrogen [
25]. This highlights the importance of selecting the right technology to optimize costs in hydrogen production using the PSA plant or other technologies.
Current research shows the trend of using artificial intelligence methods to optimize and produce biofuels using the PSA process [
26,
27,
28,
29]. Deep learning was used to regulate and control the purity of biofuel products [
30,
31], as well as identify the optimal condition to produce biohydrogen or optimize the process [
32,
33]. Machine learning can be used to develop new tools to help the production of biofuels. An interesting proposal is that of Sundaram [
34], he applied a three-layer neural network to analyze the relationship between the input and output of a PSA plant. In ref. [
35], an NN was used to predict and optimize the performance of the PSA system in hydrogen purification. First, a data set was generated to train the NN. Then, the effects of the hidden layers of neurons and training samples were analyzed. Finally, an NN with six neurons in the hidden layer was applied to predict the performance of the PSA system. In Rebello and Nogueira [
36], they studied the PSA plant to optimize the capture of CO
2 using a deep neural network to predict the main process indicators.
As mentioned in the examples above, machine learning has been a key tool for many chemical processes. Every day, machine learning changes and modifies; we have neural networks, recurrent networks, and deep neural networks. In this work, a feedforward neural network is utilized to design the controller. This type of network is used to model, control, or optimize processes such as the PSA plant for gas separation [
37,
38].
Nomenclature | Description | Units |
Geometrical and Physical Properties |
| Specific surface area of particles | m2 m−3 |
| Radius of an adsorbent particle | m |
| Shape factor for the adsorbent particles | – |
| Interparticle void fraction (porosity) | – |
| Intraparticle porosity | – |
| Molar density of the gas phase | kmol m−3 |
Transport and Transfer Properties |
| Molecular diffusion coefficient | m2 s−1 |
| Effective diffusivity within adsorbed phase | m2 s−1 |
| Axial dispersion coefficient | m2 s−1 |
| Mass transfer flux | kmol m−3 s−1 |
MTCs | Solid-phase mass transfer coefficient | s−1 |
| Heat transfer coefficient | J s−1 m−2 K−1 |
| Axial thermal conductivity | W m−1 K−1 |
Thermodynamic and Adsorption Parameters |
K | Langmuir adsorption equilibrium constant | Pa−1 |
Q | Isosteric heat of adsorption | J mol−1 |
| Adsorbed amount per unit mass of adsorbent | kmol kg−1 |
| Equilibrium adsorbed amount per unit mass | kmol kg−1 |
| Isothermal adsorption parameters | – |
| Glueckauf adsorption parameter | – |
Heat and Energy Properties |
| Heat capacity of adsorbent | MJ kmol−1 K−1 |
| Heat capacity of the gas phase | MJ kg−1 K−1 |
R | Universal gas constant | J mol−1 K−1 |
Process and Operating Conditions |
F | Flow rate of the gas phase | kmol h−1 |
P | System pressure | Pa |
T | System temperature | K |
| Gas-phase temperature | K |
| Solid-phase temperature | K |
t | Time variable | s |
| Superficial gas velocity | m s−1 |
z | Axial coordinate | m |
| Molar fraction of component i in the gas phase | – |
Additional Parameters |
i | Component index (e.g., water or ethanol) | – |
M | Molecular weight of a species | kg mol−1 |
The key contribution of this article is the development of a neural network (NN) capable of effectively controlling a complex system, such as the PSA process, for biohydrogen production. The proposed method involves training and optimizing an NN model to maintain biohydrogen purity, meet international biofuel standards (exceeding 99% purity), and mitigate disturbances in the output of the PSA process. The NN was designed to emulate the behavior of a PID controller, utilizing four input–output predictors linked to the PSA process while ensuring consistent biofuel purity. The NN operates by processing reference, error, and output signals to generate control signals, which are then used to minimize disturbances and stabilize the system.
This article outlines the methodology for developing a NN to control and maintain the purity of biohydrogen.
Section 2 details the simulation process used to gather the necessary data.
Section 3 outlines the methodology in a step-by-step manner, beginning with the data collection and progressing through signal pre-processing, control design, the neural network (NN) learning phase, and controller analysis, ultimately leading to the control of the PSA process.
Section 4 presents the results, demonstrating the ability to maintain biohydrogen purity in the presence of disturbances, and, finally, the conclusions.
2. PSA Plant Model and Simulation
The PSA system comprises two columns interconnected by ten proportional valves (see
Figure 1). The size and nominal conditions for running this plant under nominal conditions are described in
Table 1.
The PSA plant consists of two parallel columns packed with 5A zeolite. Ten proportional valves are utilized to facilitate gas transfer between columns.
Figure 1 illustrates the nominal initial parameters.
The PSA process involves a feed of the synthesized gas containing the following composition: H2 (69%), CH4 (28%) and CO (11%). The process consists of four steps: adsorption, depressurization, repressurization, and purge. Each stage has its own time, which makes this process cyclical until reaching the production objective.
The first step consists of feeding Bed 1 with the mixture of gases, where an adsorption step takes place for 70 s to initiate the hydrogen production. Simultaneously, Bed 2 passes through the purge step to realese the absorbent in the column.
Following that, both beds undergo the depressurization and repressurization steps for 3 s. In this step, the pressure drops or rises as follows; depressurization from 980 kPA to 150 kPa, and repressurization from 150 kPa to 980 kPa.
Then, the purge step occurred in the Bed 1 for 70 s, and the Bed 2 undergoes the adsorption process for 70 s, absorbing and retaining the compounds to purify hydrogen. The purge step carried out during the cycle performs the operation of depressurizing the beds.
Finally, repressurization and depressurization were carried out again in both beds.
In conclusion, the four steps are repeated until the operation cycle is complete. This process achieves a biohydrogen purity of 0.9485 in molar fraction.
Table 2 summarizes the times necessary for each step and pressure.
The type 5A zeolite exhibits exceptional resistance to high temperatures and pressure fluctuations, experiencing minimal degradation compared to other adsorbents. Its adsorption capacities per gram of adsorbent are as follows: CH
4: 0.030, CO: 0.049, and N
2: 0.238, allowing the production of high-purity hydrogen. The model process used in this study is based on insights from previous work [
39,
40,
41]. The plant model incorporates partial differential equations (PDEs) governing mass and energy balance in the gas phase, differences in pressure across the system, and kinetic models for the solid adsorbent. These PDEs are coupled with the Langmuir isotherm equations to represent the adsorption dynamics accurately. The following concerns were taken into account:
The gas within the beds adheres to the ideal gas law.
Variations in pressure, concentration, and temperature along the radial axis are neglected.
The pressure drop along the axial direction is considered negligible.
The mass transfer rate is calculated using the Linear Driving Force (LDF) model.
The adsorption and desorption behavior of the gas is characterized using the extended Langmuir model.
The adsorbent utilized in this study is type 5A zeolite, and the mathematical model of Langmuir characterizes the adsorption isotherm.
where
denotes the saturation capacity for compound
i,
T is the temperature during adsorption,
is the partial pressure, and
with
are the Langmuir parameters.
Material, energy, and momentum balances are fundamental in chemical and process engineering, enabling a comprehensive analysis of system behavior. The material balance represented by Equation (
2), based on mass conservation, accounts for inputs, outputs, and consumption of compounds. The energy balance represented by Equation (
4), grounded in the first law of thermodynamics, evaluates energy exchanges and accumulation. Additionally, the momentum balance represented by Equation (
3), derived from Newton’s laws, describes fluid motion and pressure distribution within a system. Mass transfer principles further quantify the transport of species due to diffusion and convection, playing a critical role in separation processes and reaction engineering, which is represented Equation (
5). These balances collectively help quantify flows, identify inefficiencies, optimize equipment performance, and enhance overall process efficiency. The set of equations used to solve the corresponding PDEs are listed below:
Initial and boundary conditions must be taken into account;
Table 3 summarizes them.
The energy, recovery of H
2, and the productivity of H
2 of the plant were evaluated using the following Equations (
6)–(
8):
The operating conditions for the process were established based on methodologies reported by [
39,
40], utilizing activated carbon for hydrogen purification and production. The schematic diagram of the PSA process, illustrated in
Figure 1, shows the cycles of the PSA process.
The PSA process incorporates inputs such as pressure, temperature, flow, and composition (see
Figure 1). Consequently, each of the formulated equations provides a solution for these variables. Material balance allows for the determination of each component’s purity in terms of concentration or molar fraction. The momentum balance provides insights into pressure profiles within the beds, highlighting potential pressure drops that may occur during transitions between steps. The energy balance provides insight into temperature variations within the bed, which is critical to monitor since stable temperatures are essential to avoid disrupting the adsorption of molecules or atoms. The kinetic and thermodynamic model quantifies the number of adsorbed molecules and the rate at which they reach saturation. The PSA process operates under a Cyclic Steady State (CSS), and the resulting product purities are illustrated in
Figure 2.
4. Results
This study explores the use of neuronal networks to mimic the behavior of a PID controller in regulating biohydrogen purity. In this context, three main signals are involved in the training process:
The feedback signal represents the purity of the biohydrogen, enabling dynamic adjustments in control actions to maintain the desired performance.
The error signal is computed as the difference between the reference signal and the feedback signal.
The reference signal corresponds to the desired purity level of the biohydrogen.
The NN architecture comprises three layers: an input layer with eight neurons using a ReLU activation function, a hidden layer with 64 neurons and ReLU activation, and an output layer without activation function. The NN is trained to map these input signals to the control actions generated by the PID controller.
We changed the reference from 0.94 to 0.97 kmol/kmol of H
2 and added additive perturbations at the output of the system, as shown in
Figure 10. The controller reacts slowly due to the type of process; however, it reaches the reference despite the perturbations.
The behavior of the control signal is presented in
Figure 11. We can observe that in the time 3000 and 5000 s, the control increases the action of control to maintain the output at the desired purity using the H-W model.
The NN controller was tested using a 6-bit PRBS signal with variable amplitude as input. The results are shown in
Figure 11; in
Figure 12a, the PRBS signal is presented;
Figure 12b shows the output of the H-W model to perform the feedback;
Figure 12c shows the controller signal generated by PID to control the purity using the temperature of the reboiler.
We used the PSA plant simulated in Aspen Adsorption to validate our controller because this tool allows accurate simulations and detailed analysis of adsorption processes.
Figure 13 shows the behavior of the purity of the biohydrogen using the NN controller when two reference changes were applied—one at 1000 s from 0.94 to 0.97 and the other from 0.97 to 0.99 at 5000 s.
Figure 14 shows the control signal of the NN controller; in this case, it is the output for the linear model. However, by using the inverse equations calculated in the mathematical model section, which are Equations (
10) and (
11), we obtain the control signal for the production of biohydrogen using the PSA plant simulated in Aspen; this signal is shown in
Figure 15.
Figure 16 shows the behavior of the NN controller at the Aspen model and the H-W model when a disturbance occurred at time 3000 s in the output of the system. We can observe an overshoot at this time because of the disturbance applied.
Figure 17 presents the NN controller’s performance in response to a disturbance at 3000 s in the output of the system; remember that first the NN controller is applied without the inverse blocks. The temperature to control the heat in the reboiler to maintain purity when using the inverse blocks is presented in
Figure 18. In this figure, we can see the disturbance that occurs at 3000 s, but the purity of the product is not affected, maintaining the margin; this is because the controller sends a signal that keeps it cyclically stable in the reference (see
Figure 16).
Furthermore,
Table A1 presents an analysis of the flows and energy consumed in the adsorption process in the 44th cycle. Also,
Table 7 shows the productivity report for the 35th cycle. Analyzing the table, we concluded that we had an efficient separation process with minimal reverse flow. In addition, we obtained high hydrogen purity, about 0.99 kmol/kmol, in most of the streams. Carbon monoxide maintains a steady presence at around 11%, while methane remains at about 28%, with negligible reverse amounts. The total forward material is consistently distributed across the different streams, ensuring a smooth process operation.
The energy efficiency and recovery of H
2 are reported in
Table 8 where we can find that most of the energy is held in the waste stream. The system successfully removes impurities.
Table 7 shows the productivity achieved in each section of the process using NN control. Significant results are observed since the productivity is higher than that obtained in the open loop (without control), generating a productivity of 0.0024 kmol and
kmol/s.
Table 8 shows the results of energy recovery and efficiency. Biohydrogen recovery is above 50% using NN control, generating an energy efficiency of 1.67%. These results have great scientific contribution since little energy is used to reach a purity of 99% with less energy and greater recovery. In addition, it mitigates the disturbances that exist in this complex technology.
5. Conclusions
In conclusion, this study demonstrates the effectiveness of a neural PID controller in regulating product purity in the PSA process. We successfully captured the smoothed process dynamics with a 74% fit by first developing a Hammerstein-Wiener model. Using this model, a discrete PID controller was designed, and subsequently, a neural PID controller was trained to emulate its behavior. The neural PID controller was optimized using the Adam algorithm, achieving a fit of 96%.
To validate the approach, we applied system identification techniques to develop an initial model from PSA process data. The results demonstrate that the neural PID controller effectively represents the discrete PID controller, as both maintain a biohydrogen purity of 0.99 molar fraction while attenuating output disturbances.
A key finding is the high hydrogen purity (≈99%) reach in the product; this control also keeps an efficient gas separation. The analysis of the streams indicates that the methane is almost retained in the waste stream (93.48%), ensuring the purity of the H2 in the final product.
In conclusion, the neural controller based on a discrete PID demonstrates performance and robustness equivalent to that of the discrete PID controller. Both controllers achieve the international standard for biohydrogen purity at 0.99 molar fraction while effectively countering disturbances. The advantages of using a neural network are the feasibility, adaptation to new control points, better disturbance rejection, and multivariate control. This study uses NN as a MISO (Multiple-Inputs, Single-Output) controller. In the case study, the complex behavior of the PSA plant can be challenging to control without the help of modern tools such as NN. Thus, the NN implemented in this process allows us to operate and control the desired purity despite its cyclical behavior.
Future works should focus on improving hydrogen recovery by minimizing losses in the wind-generated current stream while improving energy efficiency. Implementing energy recovery strategies could reduce waste and optimize process sustainability, ensuring better utilization of resources and increased overall system performance.