Next Article in Journal
Wavelet-Based Optimization and Numerical Computing for Fault Detection Method—Signal Fault Localization and Classification Algorithm
Previous Article in Journal
Electric Vehicle Routing Problem with Heterogeneous Energy Replenishment Infrastructures Under Capacity Constraints
Previous Article in Special Issue
Anomaly Detection and Root Cause Analysis for Energy Consumption of Medium and Heavy Plate: A Novel Method Based on Bayesian Neural Network with Adam Variational Inference
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Implementation of an Intelligent Controller Based on Neural Networks for the Simulation of Pressure Swing Adsorption Systems

by
Moises Ramos-Martinez
1,
Jorge A. Brizuela-Mendoza
2,
Carlos A. Torres-Cantero
3,4,
Gerardo Ortiz-Torres
1,
Felipe D. J. Sorcia-Vázquez
1,
Mario A. Juarez
5,
Jair de Jesús Cambrón Navarrete
6,
Juan Carlos Mixteco-Sánchez
7,
Mayra G. Mena-Enriquez
8,
Rafael Murrieta Yescas
9 and
Jesse Y. Rumbo-Morales
1,*
1
Centro Universitario de los Valles, University of Guadalajara, Carretera Guadalajara-Ameca, Km 45.5, Ameca 46600, Mexico
2
Exact Sciences and Methodologies Department, University of Guadalajara, Ciudad Guzmán 49000, Mexico
3
Faculty of Mechanical and Electrical Engineering, Tecnologico Nacional de Mexico Campus Colima, Av. Tecnologico # 1, Col. Liberación, Villa de Álvarez 28976, Mexico
4
Facultad de Ingeniería Mecánica y Eléctrica, Universidad de Colima, Carretera Colima—Coquimatlan km 9, Valle de las Huertas, Coquimatlán 28400, Mexico
5
TecNM/ITS Irapuato, Irapuato 36821, Mexico
6
Maily Soft, Consorcio de Innovación y Tecnología Camsa SA de CV, Vasco Núñez de Balboa, Colonia Hornos # 1003, Interior 110, Acalpuco Guerrero 39355, Mexico
7
Natural and Exact Sciences Department, University of Guadalajara, Ameca 46600, Mexico
8
Biomedical Sciences Department, University of Guadalajara, Tonalá 45425, Mexico
9
Faculty of Mechanical and Electrical Engineering, Tecnologico Nacional de Mexico, Campus Hermosillo, Av. Tecnologico 115, Colonia Sahuaro, Hermosillo Sonora 83170, Mexico
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(4), 215; https://doi.org/10.3390/a18040215
Submission received: 6 March 2025 / Revised: 31 March 2025 / Accepted: 31 March 2025 / Published: 10 April 2025
(This article belongs to the Special Issue Artificial Intelligence in Modeling and Simulation (2nd Edition))

Abstract

:
Biohydrogen has been identified as an attractive renewable energy carrier due to its high energy density and green production from biomass and organic wastes. Efficient biohydrogen production is a challenge that demands precise control of process parameters. Regulation and optimization of biohydrogen production through advanced approaches are therefore necessary to improve its industrial viability. This study introduces an innovative proposal for controlling the Pressure Swing Adsorption (PSA) process by employing a neural network-based controller derived from a PID control framework. The neural network was trained using input–output data, enabling it to maintain biohydrogen production purity at approximately 99%. The proposed neural network effectively simulates the dynamics of the PSA model, which is traditionally controlled using a PID controller. The results demonstrate exceptional performance and strong robustness against disturbances. Specifically, the neural network enables precise tracking of the desired trajectory and effective attenuation of disturbances, achieving a biohydrogen purity level with a molar fraction of 0.99.

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 CO2 and CH4 [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 (CO2), methane (CH4) 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 CO2 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].
NomenclatureDescriptionUnits
Geometrical and Physical Properties
a p Specific surface area of particlesm2 m−3
r p Radius of an adsorbent particlem
Ψ Shape factor for the adsorbent particles
ϵ i Interparticle void fraction (porosity)
ϵ P Intraparticle porosity
ρ Molar density of the gas phasekmol m−3
Transport and Transfer Properties
D m i Molecular diffusion coefficientm2 s−1
D e i Effective diffusivity within adsorbed phasem2 s−1
E z i Axial dispersion coefficientm2 s−1
J i Mass transfer fluxkmol m−3 s−1
MTCsSolid-phase mass transfer coefficients−1
H s Heat transfer coefficientJ s−1 m−2 K−1
k s a Axial thermal conductivityW m−1 K−1
Thermodynamic and Adsorption Parameters
KLangmuir adsorption equilibrium constantPa−1
QIsosteric heat of adsorptionJ mol−1
W i Adsorbed amount per unit mass of adsorbentkmol kg−1
W i Equilibrium adsorbed amount per unit masskmol kg−1
I P 1 i , I P 2 i , I P 3 i , I P 4 i Isothermal adsorption parameters
Ω Glueckauf adsorption parameter
Heat and Energy Properties
C p s Heat capacity of adsorbentMJ kmol−1 K−1
C p a i Heat capacity of the gas phaseMJ kg−1 K−1
RUniversal gas constantJ mol−1 K−1
Process and Operating Conditions
FFlow rate of the gas phasekmol h−1
PSystem pressurePa
TSystem temperatureK
T g Gas-phase temperatureK
T s Solid-phase temperatureK
tTime variables
v g Superficial gas velocitym s−1
zAxial coordinatem
y i Molar fraction of component i in the gas phase
Additional Parameters
iComponent index (e.g., water or ethanol)
MMolecular weight of a specieskg 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: CH4: 0.030, CO: 0.049, and N2: 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.
ζ i * = ( I P 1 I P 2 T s ) I P 3 e i p 4 / T s P i 1 + i ( I P 3 e i p 4 / T s P i )
where ζ i * denotes the saturation capacity for compound i, T is the temperature during adsorption, P i is the partial pressure, and  I P n with n = 1 , , 4 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:
  • Material balance
    D L 2 c i z 2 + ( U z c i ) z + c i t + ( 1 ϵ b ) ϵ b J = 0
  • Moment balance
    P z = 150 μ V z ( 1 ϵ b ) 2 4 R p 2 ϵ b 3 + 1.75 ρ g ( 1 ϵ b ) ( 2 R p ) ϵ b 3 v g 2
  • Energy balance
    K L 2 T z 2 + ϵ b c C p g + ( 1 ϵ b ) ρ p C p s T t ϵ b c C p g U z T z = ( 1 ϵ b ) ρ p j = 1 N Δ H j n j t + 2 h i n R i n ( T w T )
  • Mass transfer
    W i t = M T C s i ( W i * W i ) , M T C s i = Ω D e i r p 2
Initial and boundary conditions must be taken into account; Table 3 summarizes them.
The energy, recovery of H2, and the productivity of H2 of the plant were evaluated using the following Equations (6)–(8):
p r o d u c t i v i t y H 2 ( % ) = 0 t A d s c H 2 P u s P d t Σ i = 1 n 0 t a d s c i P u s d t
R e c o v e r y H 2 ( % ) = 0 t A d s c H 2 P u s p d t 0 t P u r g e c H 2 P u s P u r g e d t 0 t A d s c H 2 f u s f d t + 0 t A R p c H 2 f u s f d t
E n e r g y e f f i c i e n c y ( % ) = n s n s 1 R T g f P a t m P v a n s 1 n s 1 u s f c g f π r 2 b i
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.

3. Methodology

We proposed a methodology for building an NN controller using the input–output signals of the PSA process and a PID control. The steps are as follows: construct a dataset from the PSA plant, identify a mathematical model using the identification systems techniques, and then create a PID control for the production of biohydrogen. After that, the signals are obtained by training the neuronal network and control the PSA plant using the NN. Figure 3 shows the method implemented in this research.

3.1. Mathematical Model

The PSA process is complex because it operates cyclically and reaches a cyclic steady state. The rigorous model is difficult to control. Our solution involves using the input and output data from the rigorous model to create a simplified model using system identification techniques [42]. The model used is a nonlinear Hammerstein-Wiener model, which consists of a linear component and two nonlinear components. The data used in this study were sourced from the work referenced in [23,43]. Figure 4a shows the identified model and Figure 4b the inverse functions.
The H-W model combines a linear dynamic model with two static nonlinear blocks at the input and output, designed to capture the rigorous PSA model’s dynamics accurately. Unlike linear models, which fail to reproduce the PSA’s dynamics correctly, the H-W model was chosen due to its capability to overcome this limitation. In the controller design, the linear dynamic model was applied in conjunction with the inverse functions of the Hammerstein and Wiener blocks, ensuring smooth integration with the detailed model (see Figure 4b). The parameters of the static nonlinear functions and their inverses are detailed in Table 4 and Table 5, while the linear dynamic model is described in Equation (9). In Table 4 and Table 5, X and Y represent the breakpoints of the static nonlinear functions in the Hammerstein-Wiener (H-W) model. These nonlinear functions are used to model the system’s nonlinear behavior at the input and output.
y ¯ ( k ) u ¯ ( k ) = 0.3410 z 1 + z 2 0.9803 z 3 + 0.3212 z 4 1 2.9300 z 1 + 2.8920 z 2 1.0090 z 3 0.1701 z 4 + 0.6690 z 5 0.6758 z 6 + 0.2494 z 7 0.01424 z 8 0.03958 z 9 + 0.02830 z 10
The inverse functions for the H-W blocks were derived using the parameters provided in Table 4 and Table 5, as shown in Equations (10) and (11). Moreover, Equation (9), which defines the transfer function, was reformulated into a discrete-time state-space representation, as depicted in Equation (12).
u ¯ k = 3.00 u ( k ) + 310.20 , 55.70 < u ( k ) 56.60 , 2.30 u ( k ) + 309.10 , 54.50 < u ( k ) 55.70 , 2.30 u ( k ) + 308.90 , 53.20 < u ( k ) 54.50 , 2.30 u ( k ) + 307.70 , 51.90 < u ( k ) 53.20 , 2.60 u ( k ) + 306.60 , 50.80 < u ( k ) 51.90 , 3.50 u ( k ) + 305.20 , 49.90 < u ( k ) 50.80 .
y ( k ) = 160.55 y ¯ ( k ) 182.0 , 0.97 < y ¯ ( k ) 0.99 , 0.01 y ¯ ( k ) 11.5 , 0.96 < y ¯ ( k ) 0.97 , 539.80 y ¯ ( k ) + 512.0 , 0.88 < y ¯ ( k ) 0.96 , 302.48 y ¯ ( k ) + 302.7 , 0.76 < y ¯ ( k ) 0.88 .
The following state-space representation describes the discrete linear system:
x ( k + 1 ) = G x ( k ) + H u ¯ ( k ) y ¯ ( k ) = C x ( k )
G = 2.930 1.446 0.504 0.085 0.334 0.337 0.124 0.007 0.039 0.113 2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0.500 0 0 0 0 0 0 0 0 0 0 0.250 0 ,
H = 1 0 0 0 0 0 0 0 0 0 T ,
C = 0.34 0.50 0.49 0.16 0 0 0 0 0 0 ,
Let x R n × 1 represent the state vector, u ¯ R m × 1 represent the input vector, and y ¯ R r × 1 represent the output vector. Consequently, let G R n × n denote the state matrix, H R n × m denote the input matrix, and  C R n × r denote the output matrix. In this representation, the sampling period k is assumed to be 1 s.

3.2. Design of PID Discrete Controller

This section covers the development of a discrete PID controller to control the purity of the biohydrogen and the temperature of the reboiler at the beds.
The control law for the discrete PID is given by:
u ( k ) = K p ϵ ( k ) + K i i = 0 k ϵ ( k ) Δ t + K d ϵ ( k ) ϵ ( k 1 ) Δ t
where ϵ ( k ) is the error at step k, Δ t is the sampling period, and  K p , K i , K d are the proportional, integral, and derivative gains.
The gains are K p = 0.00781971054640794 , K i = 0.0156394210928159 , and  K d = 0 . In this case, the derivative gain is not used. The Ziegler–Nichols approach was employed to obtain these gains.
Figure 5 shows the behavior of the discrete PID controller using the gains K p , K i , and K d mentioned before.

3.3. Neuronal Network

This section shows the development of the neural network, which was designed to control the biohydrogen purity in the PSA plant. We used the reference, the output, and the error as the NN’s inputs and the signal generated by the PID controller as the output/target. Figure 6 presents a compelling illustration of the operation of the NN-based PID controller within the system.
The NN represented in Figure 6 can be expressed as:
z m = k = 1 K s p k φ j = 1 J v k j φ i = 1 N w j i x i + b j + b k + b p
where z m is the output of the neural network, s p k are the weights of the output layer connecting the k-th hidden neuron to the p-th output neuron, v k j are the weights of the hidden layer connecting the j-th input neuron to the k-th hidden neuron, w j i are the weights of the input layer connecting the i-th input feature to the j-th hidden neuron, x i are the inputs to the neural network, b j is the bias for the j-th hidden neuron, b k is the bias for the k-th hidden neuron, b p is the bias for the p-th output neuron, and  φ ( . ) is the activation function. Algorithm 1 describes all the steps needed to get the neural network to work as a controller.
In this neural network (NN), three input signals—reference, error, and output values—are used along with one target signal to approximate the control signal. As presented in Figure 7, the signals employed for training are the reference and output values. Figure 8 demonstrates the trained NN results, achieving a fit of 98.64% and an error of 0.054 using the Root Mean Square Error (RMSE) formula.
Algorithm 1 Algorithm for Building a Neural Network Model for PID Control
Input: Reference signal, error signal ϵ ( k ) , Output signal y ( k )
Output: Action Control signal u ( k )
       Initialization;
  1:
Gather data from the plant and the PID.
  2:
Train the neural network (NN) using the Adam optimization algorithm.
  3:
while  RMSE 0.99  do
  4:    
Identify the optimal number of hidden layers for the neural network.
  5:    
Select the appropriate number of input and hidden layers neurons.
  6:    
Specify the activation functions to be used in each layer of the network.
  7:    
Train the NN using the Adam algorithm.
  8:    
Evaluate the model’s accuracy using standardized metrics, including MSE, MAE, and NRMSE.
  9:
end while
The following key factors play a crucial role in supporting the stability of our neural network model:
  • The data set obtained from the PSA plant consists of approximately 350,000 data points, divided into 50% for training, 25% for validation, and 25% for testing. The use of a large and diverse dataset contributes significantly to the stability of the model.
  • The Adam optimizer algorithm, widely recognized for its efficiency in machine learning, is used to train the neural network. Its primary objective is to iteratively approximate the parameters toward an optimal solution by resolving a quadratic function in small incremental steps. Although convergence may take time, the gradient-based approach ensures stability in the algorithm.
  • Due to its ability to reduce the vanishing gradient problem, the Rectified Linear Unit (ReLU) activation function is preferred in deep networks. By maintaining stronger gradients during backpropagation, ReLU enhances the stability and performance of the network.
  • The small gain theorem [44] is applied to guarantee uniform stability and ultimate boundedness. Using the weights of the NN, the result is calculated as:
    γ s g = 1 1 W ,
    yielding a value of 0.0072.
Additionally, disturbances are introduced to the system’s output to assess its stability. The results of these tests are presented and discussed in detail in the results section.
Table 6 summarizes the parameters of a feedforward multi-layer neural network designed for regression tasks. It consists of an input layer with eight features (4 from feedback and 4 for reference), one hidden layer with 64 neurons, and a single output neuron. The ReLU activation function is applied in the input and hidden layers, while the output layer has no activation. The Adam optimizer is used for training over 100 epochs. This configuration suggests a simple yet efficient architecture aimed at learning complex relationships in the data while maintaining computational efficiency.
Figure 9 presents the training curves of the neural network (NN) controller. Part (a) shows the behavior of the loss metric for the training and validation data, plotted over 50 training epochs of the model. Part (b) shows the Mean Squared Error (MSE) curve over these 50 epochs. The result is a reliable model that was not overtrained.

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 H2 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 H2 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 6.14333 × 10 4 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.

Author Contributions

Conceptualization, J.A.B.-M. and J.C.M.-S.; Formal analysis, G.O.-T. and F.D.J.S.-V.; Investigation, M.A.J.; Methodology, C.A.T.-C. and M.G.M.-E.; Resources, J.d.J.C.N.; Supervision, J.Y.R.-M.; Validation, R.M.Y.; Writing—original draft, M.R.-M.; Writing—review & editing, J.Y.R.-M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Acknowledgments

We extend our gratitude for the access provided to the Laboratory of Sustainable Energy Processes, which houses the PSA pilot plant, bioreactor, and boilers used in this study, by the Centro Universitario de los Valles of the University of Guadalajara.

Conflicts of Interest

Author Jair de Jesús Cambrón Navarrete was employed by the company Maily Soft, Consorcio de Innovación y Tecnología Camsa SA de CV. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

Tables of flows, streams, and energy analysis.
Table A1. Flow report at the 10th cycle.
Table A1. Flow report at the 10th cycle.
ValueUnitsDescription
Total_Material_Fwd0.530924kmolTotal material received at boundary
Total_Component_Fwd (*)
Total_Component_Fwd (“CO”)0.0820483kmolTotal component received at boundary
Total_Component_Fwd (“HYDROGEN”)0.220483kmolTotal component received at boundary
Total_Component_Fwd (“METHANE”)0.228392kmolTotal component received at boundary
Avg_Composition_Fwd (*)
Avg_Composition_Fwd (“CO”)0.154539kmol/kmolAverage composition received at boundary
Avg_Composition_Fwd (“HYDROGEN”)0.415282kmol/kmolAverage composition received at boundary
Avg_Composition_Fwd (“METHANE”)0.430179kmol/kmolAverage composition received at boundary
Total_Energy_Fwd−26.2464MJTotal energy received at boundary
Total_Material_Rev0.00647435kmolTotal material fed at boundary
Total_Component_Rev (*)
Total_Component_Rev (“CO”)0.00215812kmolTotal component fed at boundary
Total_Component_Rev (“HYDROGEN”)0.00215812kmolTotal component fed at boundary
Total_Component_Rev (“METHANE”)0.00215812kmolTotal component fed at boundary
Avg_Composition_Rev (*)
Avg_Composition_Rev (“CO”)0.333333kmol/kmolAverage composition fed at boundary
Avg_Composition_Rev (“HYDROGEN”)0.333333kmol/kmolAverage composition fed at boundary
Avg_Composition_Rev (“METHANE”)0.333333kmol/kmolAverage composition fed at boundary
Total_Energy_Rev−0.399401MJTotal energy fed at boundary
Cycle_Total_Material_Fwd0.00570575kmolTotal received at boundary over last cycle
Cycle_Total_Component_Fwd (*)
Cycle_Total_Component_Fwd (“CO”)9.93 × 10 4 kmolTotal component received at boundary over last cycle
Cycle_Total_Component_Fwd (“HYDROGEN”)0.00239531kmolTotal component received at boundary over last cycle
Cycle_Total_Component_Fwd (“METHANE”)0.00231734kmolTotal component received at boundary over last cycle
Cycle_Avg_Composition_Fwd (*)
Cycle_Avg_Composition_Fwd (“CO”)0.174053kmol/kmolAverage composition received at boundary over last cycle
Cycle_Avg_Composition_Fwd (“HYDROGEN”)0.419806kmol/kmolAverage composition received at boundary over last cycle
Cycle_Avg_Composition_Fwd (“METHANE”)0.406141kmol/kmolAverage composition received at boundary over last cycle
Cycle_Total_Energy_Fwd−0.287609MJTotal energy received at boundary over last cycle
Cycle_Total_Material_Rev7.23 × 10 4 kmolTotal fed at boundary over last cycle
Cycle_Total_Component_Rev (*)
Cycle_Total_Component_Rev (“CO”)2.41 × 10 4 kmolTotal component fed at boundary over last cycle
Cycle_Total_Component_Rev (“HYDROGEN”)2.41 × 10 4 kmolTotal component fed at boundary over last cycle
Cycle_Total_Component_Rev (“METHANE”)2.41 × 10 4 kmolTotal component fed at boundary over last cycle
Cycle_Avg_Composition_Rev (*)
Cycle_Avg_Composition_Rev (“CO”)0.333333kmol/kmolAverage composition fed at boundary over last cycle
Cycle_Avg_Composition_Rev (“HYDROGEN”)0.333333kmol/kmolAverage composition fed at boundary over last cycle
Cycle_Avg_Composition_Rev (“METHANE”)0.333333kmol/kmolAverage composition fed at boundary over last cycle
Cycle_Total_Energy_Rev−0.0445976MJTotal energy fed at boundary over last cycle

References

  1. Demirbas, A. Biofuels from Agricultural Biomass. Energy Sources Part A Recover. Util. Environ. Eff. 2009, 31, 1573–1582. [Google Scholar] [CrossRef]
  2. Bianco, E.; Blanco, H. Green Hydrogen: A Guide to Policy Making; IGEM: Derby, UK, 2020. [Google Scholar]
  3. Boodhun, B.S.F.; Mudhoo, A.; Kumar, G.; Kim, S.H.; Lin, C.Y. Research perspectives on constraints, prospects and opportunities in biohydrogen production. Int. J. Hydrogen Energy 2017, 42, 27471–27481. [Google Scholar] [CrossRef]
  4. Valdez-Resendiz, J.E.; Rumbo-Morales, J.Y.; Sorcia-Vázquez, F.D.; Ortiz-Torres, G.; Gómez-Aguilar, J.; Cantero, C.A.T.; Ramos-Martinez, M. Optimization and discrete fractional-order PID controller applied to a pressure swing adsorption plant for the production and recovery of bioethanol. J. Clean. Prod. 2024, 476, 143618. [Google Scholar] [CrossRef]
  5. Rumbo-Morales, J.Y.; Ortiz-Torres, G.; Sorcia-Vázquez, F.D.; Torres-Cantero, C.A.; Radilla, J.G.; García, M.M.; Rodríguez-Cerda, J.C.; Rosales, A.M.; Ramos-Martinez, M.; Mixteco-Sánchez, J.C.; et al. Energy efficiency and productivity of a Pressure Swing Adsorption plant to purify bioethanol: Disturbance attenuation through geometric control. Digit. Chem. Eng. 2025, 14, 100209. [Google Scholar] [CrossRef]
  6. Gupta, S.; Fernandes, A.; Lopes, A.; Grasa, L.; Salafranca, J. Photo-Fermentative Bacteria Used for Hydrogen Production. Appl. Sci. 2024, 14, 1191. [Google Scholar] [CrossRef]
  7. Khetkorn, W.; Rastogi, R.P.; Incharoensakdi, A.; Lindblad, P.; Madamwar, D.; Pandey, A.; Larroche, C. Microalgal hydrogen production—A review. Bioresour. Technol. 2017, 243, 1194–1206. [Google Scholar] [CrossRef] [PubMed]
  8. Kumar, G.; Sivagurunathan, P.; Pugazhendhi, A.; Thi, N.B.D.; Zhen, G.; Chandrasekhar, K.; Kadier, A. A comprehensive overview on light independent fermentative hydrogen production from wastewater feedstock and possible integrative options. Energy Convers. Manag. 2017, 141, 390–402. [Google Scholar] [CrossRef]
  9. Show, K.Y.; Yan, Y.G.; Lee, D.J. Biohydrogen production from algae: Perspectives, challenges, and prospects. In Biofuels from Algae; Elsevier: Amsterdam, The Netherlands, 2019; pp. 325–343. [Google Scholar]
  10. Logan, B.E.; Rossi, R.; Ragab, A.; Saikaly, P.E. Electroactive microorganisms in bioelectrochemical systems. Nat. Rev. Microbiol. 2019, 17, 307–319. [Google Scholar] [CrossRef]
  11. Baeyens, J.; Zhang, H.; Nie, J.; Appels, L.; Dewil, R.; Ansart, R.; Deng, Y. Reviewing the potential of bio-hydrogen production by fermentation. Renew. Sustain. Energy Rev. 2020, 131, 110023. [Google Scholar] [CrossRef]
  12. Han, W.; Yan, Y.; Shi, Y.; Gu, J.; Tang, J.; Zhao, H. Biohydrogen production from enzymatic hydrolysis of food waste in batch and continuous systems. Sci. Rep. 2016, 6, 38395. [Google Scholar] [CrossRef]
  13. Shabbani, H.J.K.; Abd, A.A.; Hasan, M.M.; Helwani, Z.; Kim, J.; Othman, M.R. Effect of thermal dynamics and column geometry of pressure swing adsorption on hydrogen production from natural gas reforming. Gas Sci. Eng. 2023, 116, 205047. [Google Scholar] [CrossRef]
  14. Xie, X.; Awad, O.I.; Xie, L.; Ge, Z. Purification of hydrogen as green energy with pressure-vacuum swing adsorption (PVSA) with a two-layers adsorption bed using activated carbon and zeolite as adsorbent. Chemosphere 2023, 338, 139347. [Google Scholar] [CrossRef]
  15. Yussof, D.S.N.F.P.H.M.; Ibrahim, M.H.A.H.; Ramli, M.Z.; Sahari, M.I.F.H.; Karri, R.R.; Azri, M.H. Design of pressure swing adsorber and absorption column for production of hydrogen by steam methane reforming using biogas. AIP Conf. Proc. 2023, 2643, 060001. [Google Scholar]
  16. Mehrotra, A.; Ebner, A.D.; Ritter, J.A. Arithmetic approach for complex PSA cycle scheduling. Adsorption 2010, 16, 113–126. [Google Scholar] [CrossRef]
  17. Guan, Z.; Wang, Y.; Yu, X.; Shen, Y.; He, D.; Tang, Z.; Li, W.; Zhang, D. Simulation and analysis of dual-reflux pressure swing adsorption using silica gel for blue coal gas initial separation. Int. J. Hydrogen Energy 2021, 46, 683–696. [Google Scholar] [CrossRef]
  18. Sees, M.D.; Kirkes, T.; Chen, C.C. A simple and practical process modeling methodology for pressure swing adsorption. Comput. Chem. Eng. 2021, 147, 107235. [Google Scholar] [CrossRef]
  19. Shi, W.; Yang, H.; Shen, Y.; Fu, Q.; Zhang, D.; Fu, B. Two-stage PSA/VSA to produce H2 with CO2 capture via steam methane reforming (SMR). Int. J. Hydrogen Energy 2018, 43, 19057–19074. [Google Scholar] [CrossRef]
  20. Zhang, N.; Benard, P.; Chahine, R.; Yang, T.; Xiao, J. Optimization of pressure swing adsorption for hydrogen purification based on Box-Behnken design method. Int. J. Hydrogen Energy 2021, 46, 5403–5417. [Google Scholar] [CrossRef]
  21. Vo, N.D.; Oh, D.H.; Kang, J.H.; Oh, M.; Lee, C.H. Dynamic-model-based artificial neural network for H2 recovery and CO2 capture from hydrogen tail gas. Appl. Energy 2020, 273, 115263. [Google Scholar] [CrossRef]
  22. López Núñez, A.R.; Rumbo Morales, J.Y.; Salas Villalobos, A.U.; De La Cruz-Soto, J.; Ortiz Torres, G.; Rodríguez Cerda, J.C.; Calixto-Rodriguez, M.; Brizuela Mendoza, J.A.; Aguilar Molina, Y.; Zatarain Durán, O.A.; et al. Optimization and recovery of a pressure swing adsorption process for the purification and production of bioethanol. Fermentation 2022, 8, 293. [Google Scholar] [CrossRef]
  23. Ortiz Torres, G.; Rumbo Morales, J.Y.; Ramos Martinez, M.; Valdez-Martínez, J.S.; Calixto-Rodriguez, M.; Sarmiento-Bustos, E.; Torres Cantero, C.A.; Buenabad-Arias, H.M. Active Fault-Tolerant Control Applied to a Pressure Swing Adsorption Process for the Production of Bio-Hydrogen. Mathematics 2023, 11, 1129. [Google Scholar] [CrossRef]
  24. Rosner, F.; Chen, Q.; Rao, A.; Samuelsen, S.; Jayaraman, A.; Alptekin, G. Thermo-economic analyses of IGCC power plants employing warm gas CO2 separation technology. Energy 2019, 185, 541–553. [Google Scholar] [CrossRef]
  25. Marcoberardino, G.D.; Vitali, D.; Spinelli, F.; Binotti, M.; Manzolini, G. Green hydrogen production from raw biogas: A techno-economic investigation of conventional processes using pressure swing adsorption unit. Processes 2018, 6, 19. [Google Scholar] [CrossRef]
  26. Alagumalai, A.; Devarajan, B.; Song, H.; Wongwises, S.; Ledesma-Amaro, R.; Mahian, O.; Sheremet, M.; Lichtfouse, E. Machine learning in biohydrogen production: A review. Biofuel Res. J. 2023, 10, 1844–1858. [Google Scholar] [CrossRef]
  27. Nasr, N.; Hafez, H.; El Naggar, M.H.; Nakhla, G. Application of artificial neural networks for modeling of biohydrogen production. Int. J. Hydrogen Energy 2013, 38, 3189–3195. [Google Scholar] [CrossRef]
  28. Karthic, P.; Joseph, S.; Arun, N.; Kumaravel, S. Optimization of biohydrogen production by Enterobacter species using artificial neural network and response surface methodology. J. Renew. Sustain. Energy 2013, 5, 033104. [Google Scholar] [CrossRef]
  29. Renteria-Vargas, E.M.; Zuniga Aguilar, C.J.; Rumbo Morales, J.Y.; De-La-Torre, M.; Cervantes, J.A.; Lomeli Huerta, J.R.; Torres, G.O.; Vazquez, F.D.J.; Sanchez, R.O. Identification by Recurrent Neural Networks applied to a Pressure Swing Adsorption Process for Ethanol Purification. In Proceedings of the 2022 Signal Processing: Algorithms, Architectures, Arrangements, and Applications (SPA), Poznan, Poland, 21–22 September 2022; pp. 128–134. [Google Scholar] [CrossRef]
  30. Renteria-Vargas, E.M.; Zuniga Aguilar, C.J.; Rumbo Morales, J.Y.; Vazquez, F.D.J.S.; De-La-Torre, M.; Cervantes, J.A.; Bustos, E.S.; Calixto Rodriguez, M. Neural Network-Based Identification of a PSA Process for Production and Purification of Bioethanol. IEEE Access 2022, 10, 27771–27782. [Google Scholar] [CrossRef]
  31. Ramos-Martinez, M.; Torres-Cantero, C.A.; Ortiz-Torres, G.; Sorcia-Vázquez, F.D.J.; Avila-George, H.; Lozoya-Ponce, R.E.; Vargas-Méndez, R.A.; Renteria-Vargas, E.M.; Rumbo-Morales, J.Y. Control for Bioethanol Production in a Pressure Swing Adsorption Process Using an Artificial Neural Network. Mathematics 2023, 11, 3967. [Google Scholar] [CrossRef]
  32. Kumar Sharma, A.; Kumar Ghodke, P.; Goyal, N.; Nethaji, S.; Chen, W.H. Machine learning technology in biohydrogen production from agriculture waste: Recent advances and future perspectives. Bioresour. Technol. 2022, 364, 128076. [Google Scholar] [CrossRef] [PubMed]
  33. Pandey, A.K.; Park, J.; Ko, J.; Joo, H.H.; Raj, T.; Singh, L.K.; Singh, N.; Kim, S.H. Machine learning in fermentative biohydrogen production: Advantages, challenges, and applications. Bioresour. Technol. 2023, 370, 128502. [Google Scholar] [CrossRef]
  34. Sundaram, N. Training Neural Networks for Pressure Swing Adsorption Processes. Ind. Eng. Chem. Res. 1999, 38, 4449–4457. [Google Scholar] [CrossRef]
  35. Tong, L.; Bénard, P.; Zong, Y.; Chahine, R.; Liu, K.; Xiao, J. Artificial neural network based optimization of a six-step two-bed pressure swing adsorption system for hydrogen purification. Energy AI 2021, 5, 100075. [Google Scholar] [CrossRef]
  36. Rebello, C.M.; Nogueira, I.B. Optimizing CO2 capture in pressure swing adsorption units: A deep neural network approach with optimality evaluation and operating maps for decision-making. Sep. Purif. Technol. 2024, 340, 126811. [Google Scholar] [CrossRef]
  37. Zhang, R.; Shen, Y.; Tang, Z.; Li, W.; Zhang, D. A Review of Numerical Research on the Pressure Swing Adsorption Process. Processes 2022, 10, 812. [Google Scholar] [CrossRef]
  38. Oliveira, L.M.C.; Koivisto, H.; Iwakiri, I.G.; Loureiro, J.M.; Ribeiro, A.M.; Nogueira, I.B. Modelling of a pressure swing adsorption unit by deep learning and artificial Intelligence tools. Chem. Eng. Sci. 2020, 224, 115801. [Google Scholar] [CrossRef]
  39. Lee, J.J.; Kim, M.K.; Lee, D.G.; Ahn, H.; Kim, M.J.; Lee, C.H. Heat-exchange pressure swing adsorption process for hydrogen separation. AIChE J. 2008, 54, 2054–2064. [Google Scholar] [CrossRef]
  40. Xiao, J.; Peng, Y.; Bénard, P.; Chahine, R. Thermal effects on breakthrough curves of pressure swing adsorption for hydrogen purification. Int. J. Hydrogen Energy 2016, 41, 8236–8245. [Google Scholar] [CrossRef]
  41. Brizuela-Mendoza, J.A.; Sorcia-Vázquez, F.D.; Rumbo-Morales, J.Y.; Ortiz-Torres, G.; Torres-Cantero, C.A.; Juárez, M.A.; Zatarain, O.; Ramos-Martinez, M.; Sarmiento-Bustos, E.; Rodríguez-Cerda, J.C.; et al. Pressure swing adsorption plant for the recovery and production of biohydrogen: Optimization and control. Processes 2023, 11, 2997. [Google Scholar] [CrossRef]
  42. Ljung, L. System Identification: Theory for the User; Prentice Hall Information and System Sciences Series; Prentice Hall PTR: Hoboken, NJ, USA, 1999. [Google Scholar]
  43. Martínez García, M.; Rumbo Morales, J.Y.; Torres, G.O.; Rodríguez Paredes, S.A.; Vázquez Reyes, S.; Sorcia Vázquez, F.d.J.; Pérez Vidal, A.F.; Valdez Martínez, J.S.; Pérez Zúñiga, R.; Renteria Vargas, E.M. Simulation and State Feedback Control of a Pressure Swing Adsorption Process to Produce Hydrogen. Mathematics 2022, 10, 1762. [Google Scholar] [CrossRef]
  44. Steil, J.J.; Ritter, H.J. Input-Output Stability of Recurrent Neural Networks with Delays Using Circle Criteria. In Proceedings of the International ICSC/IFAC Symposium on Neural Computation, L’Aquila, Italy, 6–9 July 1998; Heiss, M., Ed.; ICSC Academic Press: Zürich, Switzerland, 1998; pp. 519–525. [Google Scholar]
Figure 1. Flow diagram of the PSA plant.
Figure 1. Flow diagram of the PSA plant.
Algorithms 18 00215 g001
Figure 2. (a) Purities of the products obtained in the PSA process. (b) Magnification of the H2 composition. (c) Magnification of the CH4 composition.
Figure 2. (a) Purities of the products obtained in the PSA process. (b) Magnification of the H2 composition. (c) Magnification of the CH4 composition.
Algorithms 18 00215 g002
Figure 3. Implemented methodology.
Figure 3. Implemented methodology.
Algorithms 18 00215 g003
Figure 4. (a) Hammerstein Wiener model; (b) inverse functions of the model.
Figure 4. (a) Hammerstein Wiener model; (b) inverse functions of the model.
Algorithms 18 00215 g004
Figure 5. Control signal using discrete PID control (blue line), behavior of the plant without control (orange line), and change reference (purple line).
Figure 5. Control signal using discrete PID control (blue line), behavior of the plant without control (orange line), and change reference (purple line).
Algorithms 18 00215 g005
Figure 6. Neuronal network based on PID to control the PSA process.
Figure 6. Neuronal network based on PID to control the PSA process.
Algorithms 18 00215 g006
Figure 7. Signals for training the neural network controller: (a) reference signal; (b) output of the PSA process to feedback the controller; and (c) control signal from PID controlling temperature in the reboiler.
Figure 7. Signals for training the neural network controller: (a) reference signal; (b) output of the PSA process to feedback the controller; and (c) control signal from PID controlling temperature in the reboiler.
Algorithms 18 00215 g007
Figure 8. Results of the training.
Figure 8. Results of the training.
Algorithms 18 00215 g008
Figure 9. Training curves of the NN model. (a) The behavior of the loss metric across each epoch, and (b) the behavior of the MAE metric across each epoch.
Figure 9. Training curves of the NN model. (a) The behavior of the loss metric across each epoch, and (b) the behavior of the MAE metric across each epoch.
Algorithms 18 00215 g009
Figure 10. The behavior of the output signal with disturbances at the process output.
Figure 10. The behavior of the output signal with disturbances at the process output.
Algorithms 18 00215 g010
Figure 11. Control signal with disturbances in the output.
Figure 11. Control signal with disturbances in the output.
Algorithms 18 00215 g011
Figure 12. (a) Reference signal; (b) output of the PSA process to feedback the controller; and (c) control signal from NN.
Figure 12. (a) Reference signal; (b) output of the PSA process to feedback the controller; and (c) control signal from NN.
Algorithms 18 00215 g012
Figure 13. Behavior of biohydrogen purity in the PSA process controlled by the NN controller.
Figure 13. Behavior of biohydrogen purity in the PSA process controlled by the NN controller.
Algorithms 18 00215 g013
Figure 14. Control signal of the NN controller.
Figure 14. Control signal of the NN controller.
Algorithms 18 00215 g014
Figure 15. Temperature to control the purity of biohydrogen.
Figure 15. Temperature to control the purity of biohydrogen.
Algorithms 18 00215 g015
Figure 16. Behavior of the NN controller when a disturbance in the output occurred at 3000 s.
Figure 16. Behavior of the NN controller when a disturbance in the output occurred at 3000 s.
Algorithms 18 00215 g016
Figure 17. Behavior of the NN controller when a disturbance in the output occurred at time 3000 s.
Figure 17. Behavior of the NN controller when a disturbance in the output occurred at time 3000 s.
Algorithms 18 00215 g017
Figure 18. Temperature to control the purity of biohydrogen when a disturbance in the output occurred at time 3000 s.
Figure 18. Temperature to control the purity of biohydrogen when a disturbance in the output occurred at time 3000 s.
Algorithms 18 00215 g018
Table 1. Data required for the biohydrogen production.
Table 1. Data required for the biohydrogen production.
Main Flows
FeedProduct
Flow (kmol/h)0.1620.162
Temperature (°K)298.15298.15
Pressure (kPa)100980
H2 molar fraction0.690.9485
Sizing
Bed diameter0.037 m
Bed height1.000 m
Zeolite type5 A
Zeolite radius0.0015 m
Packed density850 kg/m3
Table 2. Process steps and times.
Table 2. Process steps and times.
Step 1Step 2Step 3Step 4
Bed 1Adsorption (70 s)980 kPaDespressurization (3 s)Purge (70 s)150 kPaRepressurization (3 s)
Bed 2Purge (70 s)150 kPaRepressurization (3 s)Adsorption (70 s)980 kPaDespressurization (3 s)
Table 3. Initial and boundary conditions used in the process.
Table 3. Initial and boundary conditions used in the process.
Conditions for Initialization and Boundaries:
Step I (Adsorption):
t = 0 : c H 2 ( z , 0 ) = c 0 , c C H 4 ( z , 0 ) = 0 , c C O 2 ( z , 0 ) = 0 , c C O ( z , 0 ) = 0
T ( z , 0 ) = T 0 , T w ( z , 0 ) = T 0 , p ( z , 0 ) = p 0 ,
η i ( z , 0 ) = η i * , U z = U z 0
z = 0 : D L c i z = u [ c i ( 0 , t ) c i ( 0 + , t ) ] , p = p 0 , U z = U z 0
K L T z = ϵ b C p g U z [ T ( 0 , t ) T ( 0 + , t ) ]
z = L : D L c i z = 0 , U z = 0 , K L T z = 0 , p z = 0
Step II (Depressurization):
t = 0 : c H 2 ( z , 0 ) = c 0 ( I ) , c C O ( z , 0 ) = c C O ( I ) , c C H 4 ( z , 0 ) = c C H 4 ( I ) , c C O 2 ( z , 0 ) = c C O 2 ( I )
T ( z , 0 ) = T ( I ) , p ( z , 0 ) = p ( I ) , η i ( z , 0 ) = η i ( I )
z = 0 : c i z = 0 , p z = 0
z = L : c i z = 0 , U z = 0 , T z = 0 , F = F valve
Step III (Purge):
t = 0 : c H 2 ( z , 0 ) = c 0 ( I I ) , c C O ( z , 0 ) = c C O ( I I ) , c C H 4 ( z , 0 ) = c C H 4 ( I I ) , c C O 2 ( z , 0 ) = c C O 2 ( I I )
T ( z , 0 ) = T ( I I ) , p ( z , 0 ) = p ( I I ) , η i ( z , 0 ) = η i ( I I )
z = 0 : c i z = 0 , p z = 0
z = L : c i z = 0 , U z = 0 , T z = 0 , F = F valve
Step IV (Represurization):
t = 0 : c H 2 ( z , 0 ) = c 0 ( I I I ) , c C O ( z , 0 ) = c C O ( I I I ) , c C H 4 ( z , 0 ) = c C H 4 ( I I I ) , c C O 2 ( z , 0 ) = c C O 2 ( I I I )
T ( z , 0 ) = T ( I I I ) , p ( z , 0 ) = p ( I I I ) , η i ( z , 0 ) = η i ( I I I )
z = 0 : c i z = 0 , p z = 0
z = L : c i z = 0 , U z = 0 , T z = 0 , F = F valve
Table 4. Parameters of the nonlinear input function.
Table 4. Parameters of the nonlinear input function.
Input Nonlinearity Breakpoints
X49.9950.8451.9653.2354.5355.7256.68
Y289.03292.02295.01297.99300.99303.98306.97
Table 5. Parameters of the nonlinear output function.
Table 5. Parameters of the nonlinear output function.
Output Nonlinearity Breakpoints
X0.960.990.880.770.710.420.23
Y−27.72−22.9335.9870.79105.59140.41175.22
Table 6. Key parameters of the feedforward multi-layer neural network.
Table 6. Key parameters of the feedforward multi-layer neural network.
ComponentSpecificationAssigned Value
Input LayerNumber of input features8 (4 from feedback signals, 4 as reference inputs)
Hidden LayersTotal hidden layers1
Neurons per LayerDistribution across layers8 (Input), 64 (Hidden), 1 (Output)
Output LayerNeurons in the output layer1
Activation FunctionsApplied activation per layerReLU (Input Layer), ReLU (Hidden Layer),
None (Output Layer)
Optimization MethodAlgorithm used for optimizationAdam
Training EpochsTotal number of epochs100
Network TypeLearning approachRegression Model
Loss FunctionError function usedMean Squared Error (MSE)
Evaluation MetricsPerformance metrics usedMean Absolute Error (MAE), Mean Squared Error (MSE)
Validation SplitData reserved for validation25%
Table 7. Productivity report at the highest purity (0.99 kmol/kmol) in the 35th cycle.
Table 7. Productivity report at the highest purity (0.99 kmol/kmol) in the 35th cycle.
StreamUnitFVWVPVBED1BED2
Total material forwardkmol0.007570.004810.002470.001856.14 × 10 4
Average flowrate forwardkmol/s5.19 × 10 5 3.30 × 10 5 1.69 × 10 5 1.27 × 10 5 4.21 × 10 6
Total Component Forward
COkmol8.33 × 10 4 7.61 × 10 4 3.12 × 10 5 2.95 × 10 5 9.78 × 10 6
HYDROGENkmol0.004620.002070.002440.001826.05 × 10 4
METHANEkmol0.002120.001983.64 × 10 8 2.93 × 10 8 9.72 × 10 9
Average Composition Forward
COkmol/kmol0.110.1580.0130.0160.016
HYDROGENkmol/kmol0.610.430.9870.9840.984
METHANEkmol/kmol0.280.4121.48 × 10 5 1.58 × 10 5 1.58 × 10 5
Energy Consumption
Total energy forwardMJ0.25310.23450.00420.00370.0012
Average enthalpy forwardMJ/kmol33.4248.721.711.981.97
Total energy reverseMJ0.00.00580.09.20 × 10 4 8.98 × 10 4
Average enthalpy reverseMJ/kmol0.061.690.01.491.46
Table 8. Energy efficiency and recovery H2 report.
Table 8. Energy efficiency and recovery H2 report.
Product:PV (%)WV (%)
Material:32.569563.5582
Component:
CO3.7397591.3675
HYDROGEN61.717444.8093
METHANE0.001718493.4792
Energy1.6702792.6473
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

Ramos-Martinez, M.; Brizuela-Mendoza, J.A.; Torres-Cantero, C.A.; Ortiz-Torres, G.; Sorcia-Vázquez, F.D.J.; Juarez, M.A.; Navarrete, J.d.J.C.; Mixteco-Sánchez, J.C.; Mena-Enriquez, M.G.; Yescas, R.M.; et al. Implementation of an Intelligent Controller Based on Neural Networks for the Simulation of Pressure Swing Adsorption Systems. Algorithms 2025, 18, 215. https://doi.org/10.3390/a18040215

AMA Style

Ramos-Martinez M, Brizuela-Mendoza JA, Torres-Cantero CA, Ortiz-Torres G, Sorcia-Vázquez FDJ, Juarez MA, Navarrete JdJC, Mixteco-Sánchez JC, Mena-Enriquez MG, Yescas RM, et al. Implementation of an Intelligent Controller Based on Neural Networks for the Simulation of Pressure Swing Adsorption Systems. Algorithms. 2025; 18(4):215. https://doi.org/10.3390/a18040215

Chicago/Turabian Style

Ramos-Martinez, Moises, Jorge A. Brizuela-Mendoza, Carlos A. Torres-Cantero, Gerardo Ortiz-Torres, Felipe D. J. Sorcia-Vázquez, Mario A. Juarez, Jair de Jesús Cambrón Navarrete, Juan Carlos Mixteco-Sánchez, Mayra G. Mena-Enriquez, Rafael Murrieta Yescas, and et al. 2025. "Implementation of an Intelligent Controller Based on Neural Networks for the Simulation of Pressure Swing Adsorption Systems" Algorithms 18, no. 4: 215. https://doi.org/10.3390/a18040215

APA Style

Ramos-Martinez, M., Brizuela-Mendoza, J. A., Torres-Cantero, C. A., Ortiz-Torres, G., Sorcia-Vázquez, F. D. J., Juarez, M. A., Navarrete, J. d. J. C., Mixteco-Sánchez, J. C., Mena-Enriquez, M. G., Yescas, R. M., & Rumbo-Morales, J. Y. (2025). Implementation of an Intelligent Controller Based on Neural Networks for the Simulation of Pressure Swing Adsorption Systems. Algorithms, 18(4), 215. https://doi.org/10.3390/a18040215

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