Next Article in Journal
Optimization and Storage Stability of Milk–Date Beverages Fortified with Sukkari Date Powder
Previous Article in Journal
Study on Multi-Objective Optimization of Construction Project Based on Improved Genetic Algorithm and Particle Swarm Optimization
Previous Article in Special Issue
Edge Computing-Based Modular Control System for Industrial Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A PLC-Embedded Implementation of a Modified Takagi–Sugeno–Kang-Based MPC to Control a Pressure Swing Adsorption Process

by
Teófilo Paiva Guimarães Mendes
1,2,
Ana Mafalda Ribeiro
3,4,
Leizer Schnitman
2 and
Idelfonso B. R. Nogueira
5,*
1
Área de Sistemas Elétricos e Computacionais, Centro de Ciências Exatas e Tecnológicas, Universidade Federal do Recôncavo Baiano, R. Rui Barbosa, 710–Centro, Cruz das Almas 44380-000, BA, Brazil
2
Programa de Pós-Graduação em Mecatrônica, Escola Politécnica (Polytechnic School), Universidade Federal da Bahia, R. Prof. Aristides Novis, 2–Federação, Salvador 40210-630, BA, Brazil
3
LSRE-LCM—Laboratory of Separation and Reaction Engineering-Laboratory of Catalysis and Materials, Faculty of Engineering, University of Porto, Rua Dr. Roberto Frias, 4200-465 Porto, Portugal
4
ALiCE—Associate Laboratory in Chemical Engineering, Faculty of Engineering, University of Porto, Rua Dr. Roberto Frias, 4200-465 Porto, Portugal
5
Department of Chemical Engineering, Norwegian University of Science and Technology, 7491 Trondheim, Norway
*
Author to whom correspondence should be addressed.
Processes 2024, 12(8), 1738; https://doi.org/10.3390/pr12081738
Submission received: 9 July 2024 / Revised: 9 August 2024 / Accepted: 12 August 2024 / Published: 19 August 2024
(This article belongs to the Special Issue Recent Developments in Automatic Control and Systems Engineering)

Abstract

:
The paper presents a case study that applies a model predictive control (MPC) approach in a Micro850 programmable logic controller (PLC) to a laboratory pressure swing adsorption (PSA) process used for separating gas mixtures of CO2 and CH4. PLC is an industrial hardware characterized by its robustness to hazardous environments and limited computational capacities, which poses computational challenges for MPC implementation. This paper’s main contribution is the application of the modified Takagi–Sugeno–Kang-based MPC (MTSK-MPC) algorithm to this PSA unit, which provides features to investigate and implement feasible MPC designs in PLCs. The investigation consists of a sensitivity analysis of how some design parameters influence the PLC memory and the MPC implementation and a comparative evaluation of the computational processing from different MPC algorithms and simulations. The comparison comprises software-in-the-loop simulations with three algorithms in the PC: an implicit MPC, an explicit MPC, and the MTSK-MPC. Additionally, it includes a hardware-in-the-loop simulation with the implemented MTSK-MPC in Micro850. The results show that the MPC algorithms achieve close performance, tracking setpoint changes and rejecting output disturbances, with the MTSK-MPC presenting the lower processing time among the MPCs in the PC. The study concludes that the implementation of MTSK-MPC in the Micro850 is feasible.

1. Introduction

Pressure Swing Adsorption (PSA) is a method used for complex gas-phase separations since the late 1950s. The PSA approach has significantly expanded in scale, versatility, and complexity. Currently, PSA-type processes are employed in various settings, ranging from compact laboratory units used in medical applications, which capture atmospheric air and separate nitrogen (N2) and oxygen (O2) using one or two adsorbent beds [1], to large-scale industrial refinery units that purify hydrogen (H2) by using 16 adsorbent beds [2].
The PSA-type processes are based on the properties of solids to preferentially fix some molecules of a gas mixture on their surface. The installations of these processes utilize fixed-bed adsorbers, using one or more separation columns, which change process steps periodically. Each cycle contains at least two steps: high-pressure adsorption and low-pressure desorption. Due to the cyclic nature of their operation, PSA processes do not reach a fixed steady-state condition. In contrast to other dynamical systems, these processes go to a cyclic steady state (CSS) when each step time remains constant, given the feed load, temperature, and pressure profiles of each step. That is, CSS represents a stable operational regime in which all differential and algebraic variables have the same values at each period during the cycles. Besides the peculiar cyclical behavior, PSA processes are multivariable and nonlinear within each step, with strong interactions between variables. In addition, the optimal operation point must simultaneously meet conflicting objectives, such as productivity/energy consumption and product purity/recovery, as well as operational and safety constraints. Therefore, although this process is a phenomenon well understood and mathematically modeled, it still presents control problems to investigate [3,4,5,6,7,8].
Several authors have proposed approaches to improve the operability of PSA-type processes through control methods. These approaches range from classical control, mainly utilizing proportional-integral-derivative (PID) controllers, to modern control theory, such as linear quadratic regulator (LQR) and model predictive controllers (MPC).
The pioneering investigation to control the PSA process explored use of a PID controller to handle single-input and single-output (SISO) cases and PID control with feedforward actions to address multiple-input and single-output (MISO) cases with two inputs and one output [1]. Among the studies with PID controllers and PSA processes, it is important to mention those that combined other methods, such as the utilization of H∞ criteria to address the PSA multi-variable nature [9] and the application of Hammerstein models [9,10,11,12] and fuzzy PID tuning [13] to deal with the PSA nonlinearities. Nevertheless, this control approach has considerable drawbacks, as it requires significant study time and is change-sensitive to modeling parameters and operating points.
In the control context, the MPC-based approaches are emerging as promising solutions for the challenging characteristics of PSA processes [8]. Comparative works in SISO cases have shown that MPC demonstrates superior tracking performance to linear PID controllers relying on feedback action [3,4,13,14]. In the same way, the results from comparative study in multiple-input and multiple-output (MIMO) cases between PID and LQR controls and PID and MPC controls have shown that the modern control approaches are more effective to handle the multivariable nature of the PSA process [11,15,16]. As with the classical control approach, authors have combined MPC with other methods to deal with PSA’s nonlinearities using multiple models and robust MPC [6,8,15] and using MPC with deep neural networks [7,16]. Some works in the literature are notable regarding dimensions of MPC applied to MIMO cases of PSA systems, with up to four manipulated and two controlled variables [1,17,18,19]. Other reports stand out by presenting MPC control laws with guaranteed stability and compliance with economic criteria [6,7,8]. It is also worth mentioning the use of MPC in other processes with challenging characteristics, such as those found in PSA processes. For instance, MPC has been applied in SMB processes [20,21] which also operate in a CSS, and in polymerization processes which display highly nonlinear behavior [22].
In the implementation context of automation and control systems, the early MPC applications involved a hierarchical control structure in high-scale process industries. This structure consisted of a low layer with regulatory control, implemented on industrial-embedded hardware, and a high layer with modern control strategies, operating on non-industrial hardware with high computational capacity. A current research trend seeks to implement MPC in embedded hardware, integrating the control into a single layer. In specific environments, such as industries and hospitals, the automation hardware must prioritize robustness to installation characteristics over computational resources regarding hardware requirements. In such cases, programmable logic controllers (PLCs) are the most suitable hardware for these applications [23,24,25].
The classical control approach presents some implementation advantages compared to modern control strategies. The PID controller is a standard programming resource for PLCs, as it requires low memory for its parameters and is also computationally inexpensive. In addition, it is simple to consider PIDs in the PSA process control design and optimization stages [5,26].
On the other hand, only one distinguished work has successfully implemented an MPC approach in embedded hardware for small-scale PSA units [4]. However, the hardware used was a Raspberry Pi-3, which does not meet industrial installation requirements and is more computationally powerful than common PLCs. All the other works cited on PSA control using the MPC approach were investigations based on virtual simulated environments. The usual experimental setup comprises simulating the PSA process and the controller in the same software or simulating them in separate programs, communicating in a software-in-the-loop (SIL) integration. In these cases, the MPC controllers run on personal computers or servers with greater computing capacity than most industrial hardware. Therefore, the control literature applied to PSA still presents a gap in MPC applications implemented in PLCs, which is challenging due to this hardware’s limited memory and processing capacity.
It is well-known that MPC is computationally demanding, requiring a careful selection of algorithms regarding computational efficiency. This choice concerns evaluating implicit MPC (iMPC) and explicit MPC (eMPC) approaches [27,28]. There are two main criteria to consider for this decision, among others. The first criterion is that general purpose PLCs lack the advanced processing and programming capabilities required to implement implicit-type MPC algorithms. The second criterion is that while explicit MPC algorithms do not require such resources, they tend to exponentially increase memory requirements with longer prediction horizons and additional constraints [23,24]. While the advantages and disadvantages of choosing either PID or MPC to control the PSA process are evident, this is not the case regarding the selection between iMPC and eMPC approaches. In the previously mentioned MPC reports, the authors’ treatment of these alternatives is cursory, relying predominantly on qualitative arguments for justification. Consequently, there is another gap in the control literature applied to PSA concerning comparative analyses between implicit and explicit MPC approaches.
This paper presents a case study that addresses these gaps in the current knowledge of PSA control. The case study focuses on a laboratory PSA process, the Micro850 PLC, and the Modified Takagi–Sugeno–Kang-based MPC (MTSK-MPC) [29]. This PSA is a compact unit that separates gas mixtures of carbon dioxide (CO2) and methane (CH4). This PLC model is a general purpose industrial hardware used in modular process skid packages and is a representative example of an automation system of PSA units. The MTSK-MPC is a recently introduced MPC algorithm, well-suited for PLC implementation as it requires just the programming languages and function blocks from the IEC-61131-3 automation standard [30] and includes memory-reducing features through fuzzy logic rules. Therefore, this paper’s main contribution is the application of the MTSK-MPC algorithm to a PSA process, which provides the means to investigate and implement computationally feasible MPC designs in PLCs.
In this sense, the investigation consists of two steps. One step comprises a sensitivity analysis of how the control and operation constraints parameters influence the PLC memory of the PSA unit under study. The aim is to identify which MTSK-MPC designs are embeddable in the PLC. The other step evaluates the computational processing of different MPC algorithms through a comparative investigation of SIL simulations. The objective is to ensure the timing requirement of the PSA cycle and identify the MPC algorithm with faster processing. The comparison includes three algorithms: an implicit MPC with interior point optimization, an explicit MPC with multiparametric optimization, and the MTSK-MPC.
The implementation is completed by programming an embedded MTSK-MPC function block into the Micro850 and performing a closed-loop validation test. The experimental setup of this test comprises a hardware-in-the-loop (HIL) simulation, where the gPROMS software, version 7, simulates the process on a PC, the PLC executes the MTSK-MPC algorithm, and these applications communicate via MATLAB and the Modbus protocol. This test compares the MTSK-MPC of the HIL simulation with the MPC of the SIL simulations. In addition, it assesses the capacity of the MTSK-MPC to accurately track setpoint changes and reject some input disturbances, as well as the PLC scan execution time.
The subsequent sections of this paper are structured as follows: Section 2 describes the PSA process considered in the experiments. Section 3 presents the MPC formulation applied to control the PSA, executed by three schemes: implicit MPC, explicit MPC, and the modified Takagi–Sugeno–Kang model-based MPC. Section 4 shows the results and discussion concerning the computational evaluation and experiments applied to the small-scale PSA study case. Finally, Section 5 presents the conclusions.

2. Description of the PSA Process

The PSA under investigation comprises a unit installed in the Laboratory of Separation and Reaction Processes (LSRE) at the Faculty of Engineering of the University of Porto (FEUP). This unit can run in single-column or two-column configurations, alternating steps of each column automatically. Figure 1 shows the operating screen with a simplified process diagram of the process used in the simulations.
The PSA process evaluated in this work consists of separating a mixture of CO2 and CH4. Mixtures with this composition are found in different process scales and column configurations, for example, in biogas production plants [31], syngas purification units [32], and Brazilian pre-salt oil exploration wells [33]. The CO2 gas inhibits the direct use of mixtures with this composition in combustion engines. Additionally, the CO2 contributes to the greenhouse effect when released into the atmosphere, requiring proper treatment. Therefore, the outputs of this separation process are a stream with CH4, which could be used as fuel, and a stream with CO2, which is captured and considered an impurity.
A phenomenological model of the PSA plant under study was described in the literature by [34]. The separation studies were experimentally validated by [32]. In the work referred to, the authors carried out breakthrough experiments and estimated the kinetic and equilibrium parameters. Furthermore, they presented concentration profiles over time showing the CO2/CH4 interaction with the BPL adsorbent. The simulations in the present work consider a column packed bed with commercial activated carbon (BPL), 10 cm long, 2.1 cm in diameter, and with 13.8 g of adsorbent. Table 1 shows the fitting parameters of the dual-site Langmuir model for the CH4 and CO2 adsorption equilibrium on the BPL-activated carbon. These references provide details on the nominal process conditions, pressure adsorption curves, and other relevant process data used in this paper. The reader can gain a more comprehensive understanding of the process by consulting the cited works.
The PSA unit of the LSRE includes a set of solenoid valves that operate in a coordinated manner, following a preconfigured program in the automation system. These valves open and close according to basic process control to determine the flow direction through the columns depending on the distinct step of the PSA process cycle [10,17,18,35]. In the PSA process studied, the column goes through four cyclic steps: 1—pressurization with feed (adsorption), 2—rinse, 3—depressurization (desorption), and 4—purging.
The cycle initiates with the adsorbent column pressurization to super-atmospheric conditions using a feed charge containing mixed gases. In this first step, the load continues to be supplied through the column at constant pressure, causing a concentrated gas stream of the desired product to leave the column and the other gas adsorption by the bed. Following this, the rinse step introduces a purging gas into the adsorption bed to displace and remove any remaining impurities. In the sequence, the depressurization step consists of supplying gas to the column in the reversed direction, reducing the bed pressure, and starting to cause the gas adsorbed in the column to be desorbed and expelled into the atmosphere or sent to waste storage. In the last step, during the purging, a reverse stream of part of the produced gas quickly lowers the column pressure and cleans the remaining gases previously adsorbed in the bed.
Table 2 shows the scheduled discrete positions per solenoid valve, and Table 3 shows the programmed continuous values in each step of the PSA cycle. The total inlet flow in volume per minute changes for each PSA step according to Table 3, maintaining a fixed molar fraction of 0.865 CH4 and 0.135 CO2 when it is non-zero. Note that the single-column configuration does not need all the available instruments in the LSRE laboratory plant, and some valves remain unchanged in such cases.
As the purpose of this PSA is to produce a certain amount of separated gas with a determined concentration, the controlled variables selected for the MPC were the purity of CH4 gas produced and the CO2 recovered. The total cycle time and the individual duration of its steps considerably affect the concentration of the separated products. These times determine the changes and concentration limits of the products at the end of the adsorber beds. Therefore, the step times considered as the manipulated variables of the MPC were the feeding time and the rinse time [3,4,9,10,13,17,18,19,34].

3. The Compared Model-Based Predictive Control Approaches

The primary purpose of this work is to embed an MPC algorithm in the PLC of a PSA unit. This hardware has notable limitations in memory and programming capabilities in contrast to standard PCs. Therefore, this case study focuses on the following linear MPC approaches.
Notations: A vector x composed by n x real numbers is denoted by x R n x . The component j of the vector x is denoted by x j and the vector value at time instant k by x k . The vector X = x 1 , x 2 , , x N is a column vector formed by the concatenation of vectors x 1 to x N . Given a matrix M R n × m , M T denotes its transpose. For a vector x and a quadratic matrix Q , the weighted Euclidean norm is x Q 2 x T Q x . Given a table of IF-THEN rules, the vector r and the matrix M of the rule antecedent i are, respectively, denoted by r i and M i , and the consequence affine function is f i x . Given two vectors v and r , v r denotes component-wise inequalities. Given a dynamical system, the subscript s s denotes its steady state x s s , and the superscripts s t , u n , and i n denote, respectively, the stable, x s t , unstable, x u n , and integrating, x i n , states of this system. The system’s original states, without the model on the incremental form of inputs, are denoted by the vector x . The system’s estimated states for time k +1 at time k are denoted by x ^ k + 1 / k . The superscript “ * ” indicates an optimal value at the current instant time and the superscript “ ~ ” indicates an optimal value inherited from the last instant. The notation n u means the number of inputs u , n x u n is the number of unstable states, and n x i n is the number of integrating states. An identity matrix of dimension n is denoted by I n .

3.1. Implicit MPC Formulation

This paper follows an infinite prediction horizon MPC approach in the control problem formulation [29,35]. In this regard, consider a discrete linear time-invariant model operating around an equilibrium point, which is controllable and represented by a state-space model, as follows:
x k + 1 = A x k + B u k
y k = C x k
where the vectors x k R n x represent the states, y k R n y the outputs, and u k R n u the inputs, and A , B , and C are matrices of appropriate dimensions.
These equations can be rewritten in the incremental form of inputs, as follows:
x k + 1 = A x k + B u k
y k = C x k
in which the extended states, x k , contain the vectors x k T , u k 1 T T .
Furthermore, consider the objective function that centers the system states predictions, x k + j , from current time j = 0 , to infinite prediction j = + , and the system inputs increments, u k + j , from current time j = 0 , to the control horizon minus one, j = N 1 , into the artificial steady states, x s s k . Moreover, this objective function has an element that penalizes the difference between the reference, y r , from the output at the artificial steady state, y s s k , as follows:
V k = j = 0 N 1 x k + j x s s k Q 2 + Δ u k + j R 2 + x k + N x s s k Q ~ 2 + y r y s s k S y 2
where N is the control horizon of the inputs, Q R n x × n x is a matrix used to weigh the state’s predictions distance from the artificial states, R R n u × n u is a matrix used to weigh the inputs increments, S y R n y × n y is a matrix used to achieve offset-free control, and Q ~ is the matrix of the state terminal cost weight, given by:
Q ~ = W s t T × Q ¯ × W s t
with Q ¯ calculated using the Lyapunov equation:
Q ¯ = i = 0 + J s t j T × V s t T × Q × V s t × J s t j = V s t T × Q × V s t + J s t T × Q ¯ × J s t
where W R n x × n x is the generalized eigenvectors matrix, V = W 1 , J R n x × n x is a matrix of Jordan blocks eigenvalues, and the superscript indexes s t indicate eigenvalues and rows of W and V associated with the stable modes.
The system must operate within constraints such that the input states and increments, the predicted states and outputs, and the artificial states are within the following limits:
X b = x R n x | x m i n u m i n x u x m a x u m a x
Δ U = Δ u R n u | Δ u m i n Δ u Δ u m a x
x k + j X b ,   j = 0 , , N + k 2
Δ u k + j Δ U ,   j = 0 , , N 1
x s s k X s s
where the bounds of the extended states, x , in (8) comprise the stack of bounds of the original and input states due to the incremental form of the model used in (3).
The artificial states are defined as the system equilibrium points inside X b as:
X s s = x s s k X b | I n x A × x s s k = 0
Finally, consider the following relaxed terminal constraint on non-stable modes of the system to limit the infinite sum of the objective function in (5):
W u n W i n × x k + N x s s k = 0
where the indexes u n and i n indicate, respectively, the rows of generalized eigenvectors matrix W associated with the unstable and integrating modes.
Therefore, the applied MPC formulation can be resumed as the convex quadratic optimization problem as follows:
Problem P0:
min V k Δ U k , x ss k = j = 0 N 1 x k + j x s s k Q 2 + Δ u k + j R 2 + x k + N x s s k Q ~ 2 + y r y s s k S y 2 s . t .   : ( 3 ) ,   ( 4 ) , ( 8 ) , ( 9 ) , ( 10 ) ,   ( 11 ) , ( 13 )   a n d ( 14 )
where x k is the state observed at k current instant and is the initial condition of Problem P0. The decision variables are the artificial steady states, x s s k , and the vector of future input increments, Δ U k , composed of the calculated input increments at time step k up to control horizon N , stacked as follows:
Δ U k = Δ u k T , ,   u k + N 1 T T
in which only the first element, Δ u k , is effectively applied to the process due to the receding horizon control strategy.
The implicit MPC considered in this article concerns the solution of Problem P0 at each sampling instant by a quadratic optimization algorithm, such as, for example, the interior point method. In this sense, Problem P0 can be rewritten in the conventional matrix notation as follows:
min V k ΔU k , x ss k = Δ U k x s s k T × H × Δ U k x s s k + Δ U k x s s k T × F × x k y r k + x k y r k T × Y × x k y r k s . t . :   L × Δ U k x s s k W + E × x k y r k
where matrices H , F , Y , L ,   W , and E have appropriate dimensions and can be obtained from system modeling and controller tuning parameters in (15).

3.2. Explicit MPC Formulation

The explicit MPC formulation is the result of applying a multiparametric quadratic optimization to solve Problem P0 [28], which obtains a lookup table of IF-THEN rules with R i rules, i = 1 , p , as follows:
Δ U * k x s s * k = R 1 : I f x k K 1 T h e n Δ U * 1 k x s s * 1 k = G 1 × x k y r k + g 1 R p : I f x k K p T h e n Δ U * p k x s s * p k = G p × x k y r k + g p
in which G i and g i are parameters of the local function from the rule i , and each local function i holds only in a critical region K i , defined as a polyhedral set as:
M i × x k y r k r i
where both the matrix M i and the vector r i have r m a x i total rows, with each row corresponding to a boundary hyperplane of critical region K i .
Parameters G i , g i , M i , r i and r m a x i depend on H , F , Y , L ,   W , and E matrices from (17). For a comprehensive calculation procedure of such calculus, the reader is referred to Bemporad et al. (2002) [28].

3.3. Modified Takagi–Sugeno–Kang Explicit MPC Formulation

In the MTSK-MPC [5], the set of all boundary hyperplanes from the critical regions divides the input space of this model into a polyhedral partition of fuzzy sets. In addition, a boundary hyperplane from the critical region K i in (19) defines the scheduling variable α j i x k , y r k as follows:
α j i x k = m j i , r j i × x k T , y r k T , 1 T
where m j i and r j i are, respectively, elements from the row j of the matrix M i and vector r i of rule i , and x k and y r k are, respectively, the state and reference from the explicit MPC solution in (18).
As a result, one can state each critical region as the intersection of polyhedral fuzzy sets, determined from the respective boundary hyperplanes, as follows:
K i = j = 1 r m a x i A j i
with the polyhedral fuzzy sets A j i defined by:
A j i = α j i ,   μ j i α j i R | α j i 0 , μ j i α j i 0,1
and where α j i is a short notation of α j i x k , y r k used to simplify the representation.
Using these definitions and the product as a fuzzy intersection operator [36], one can derive the critical region membership function as:
β i a j i = j = 1 r m a x i μ j i a j i
where μ j i a j i are the boundary hyperplanes fuzzy membership functions, which are Heaviside-type functions.
The MTSK-MPC computes the explicit MPC solution using a fuzzy inference system with six layers, differing from the classical Takagi–Sugeno–Kang model [37,38], which contains only five layers. Figure 2 illustrates both fuzzy inference systems, highlighting the first layer of the MTSK-MPC, where the distinction between them lies.
The first layer of this fuzzy inference system consists of batch processing all scheduling variables according to:
O 1 x k , y r k = α p a r × x k y r k 1
where O 1 R i = 1 p r m a x i is the output vector of the first layer and α p a r consists of stacking the parameters of the boundary hyperplanes from all critical regions and rules into a matrix as follows:
α p a r = m 1 1 m r m a x 1 1 m 1 2 m r m a x 2 2 m r m a x p p r 1 1 r r m a x 1 1 r 1 2 r r m a x 2 2 r r m a x p p
The second layer batch evaluates the membership function of the boundary hyperplanes by the Heaviside function as:
O 2 x , y r = 0.5 × 1 + O 1 x , y r O 1 x , y r
where O 2 R i = 1 p r m a x i is the output vector of the second layer; the time instant notation is dropped to simplify the representation.
The third layer calculates the membership functions of the critical regions using Equation (23), which corresponds to the weights of the IF-THEN rule, as follows:
O 3 x , y r = O   3 1 x , y r O   3 2 x , y r O   3 p x , y r = n = β s t a r t 1 β s t o p 1 O   2 n x , y r n = β s t a r t 2 β s t o p 2 O   2 n x , y r n = β s t a r t p β s t o p p O   2 n x , y r
where O 3 R p is the output vector of the third layer, O   3 i is the element of the i row of this vector, O   2 n is the element n of the second layer’s output vector, and β s t a r t i and β s t o p i are indexes that correspond to the first and the last elements of the O 2 vector that compose the critical region i . These indexes come from the third layer’s matrix of parameters, β p a r , formed as:
β p a r = β s t a r t 1 β s t o p 1 β s t a r t 2 β s t o p 2 β s t a r t p β s t o p p = 1 r m a x 1 + 1 i = 1 p 1 r m a x i + 1 r m a x 1 r m a x 1 + r m a x 2 i = 1 p r m a x i
In sequence, the fourth layer calculates the normalized rule weights as follows:
O 4 x , y r = 1 i = 1 p O   3 i x , y r × O 3 x , y r = 0                                               o u t s i d e   o f K i           0 < a n d < 1 b o u n d a r y   o f K i   1                                               i n s i d e   o f K i                
where O 4 R p is the output vector of the fourth layer, and O 3 i is the element i of the third layer’s output vector.
The fifth layer computes the local functions from all critical regions as the following vector:
O 5 x , y r = f p a r × x k y r k 1
where O 5 R p is the output vector of the fifth layer, and f p a r is the fifth layer’s matrix of parameters, which consists of stacking the parameters of the local functions into a matrix as follows:
f p a r = G 1 g 1 G p g p
and G i and g i are the matrix and vector of parameters from the local affine functions.
Finally, the sixth layer calculates the MTSK-MPC’s final output as the weighted sum of the local functions’ contributions, according to:
O   6 = Δ U * k x s s * k = i = 1 p O   4 i x , y r × O   5 i x , y r
where O   6 R p is the output vector of the sixth layer, O   4 i is the element i of the fourth layer’s output vector, corresponding to the normalized weight of rule i , and O   5 i is the element i of the fifth layer’s output vector, corresponding to the respective local function of rule i .

4. Experimental Results and Discussion

The article presents a set of experiments that include (i) an SIL simulation that aims to identify the open-loop PSA process model for use in the MPC formulations, (ii) offline analyses on the PLC memory effects for different design parameter values, (iii) a comparison of the online processing performance between a closed-loop HIL simulation of the MTSK-MPC algorithm and closed-loop SIL simulations with different MPC algorithms, which also validate the MTSK-MPC embedding in the PLC.
A phenomenological model implemented in gPROMS was used to represent the LSRE plant, as described in Section 2. This phenomenological model comprises a system of nonlinear partial differential–algebraic equations (PDAE), which was solved using orthogonal colocation with 20 intervals and second-order polynomials to transform the PDAE system into an ODE system. The ODE system was solved using an implicit Runge–Kutta method.
The central platform for executing the experiments is the MATLAB 2023a software, which exchanges data with gPROMS and other application programs according to the type of simulation. MATLAB and gPROMS communicate to exchange input and output signals through FPI (Foreign Process Interface) events and the gO:MATLAB command. Each software runs on the same personal computer with an Intel Core i5-2400 processor, 3.10 GHz CPU, and 8.00 GB RAM capacity. In the SIL simulations, the MPC algorithms run in MATLAB on the same PC of gPROMS, while in the HIL simulation, the MTSK-MPC runs in the PLC and communicates to MATLAB in the PC through a Modbus protocol. The PLC is a Micro850 general purpose automation hardware with a memory limit of 120 KB for user programs and data.

4.1. Process Model Identification Experiment

As this study case focuses on linear-type MPC approaches, the laboratory PSA runs in the following experiments within a limited deviation range from an operating condition. Table 4 shows the operating point used for the linearized model and the process limits considered in the controlled and manipulated variables of the MPC controller.
The adopted criterion in this case study was to apply simple identification methods since the PSA process model is linearized. Therefore, the experiment to obtain an open-loop process model consisted of excitation procedures based on step responses during an SIL simulation. The procedure involved applying step signals with values 20% above the input values at the nominal operating points and then returning to nominal operation. The use of collected data and the idproc function of the MATLAB identification toolbox resulted in the transfer functions models summarized Table 5.
After comparing the outputs of the simulated process with the outputs of the transfer functions identified in Table 5, the mean absolute percentage error (MAPE) for CH4 purity and CO2 recovery was 2.1618% and 0.6273%, respectively. Note that the estimated transfer function gains are negative. That is, around the operating point used, increasing the feed or rinse time leads to a decrease in CH4 purity and CO2 recovery at the process outlet, as shown in Figure 3.
The output differences between the simulated nonlinear process in gPROMS and the identified linear models in Table 5 are considered disturbances in the process outputs. Note that, for feed and rinse times longer than those used in the identification step tests, process nonlinearities will increase the modeling errors of these models. Other modeling errors due to nonlinearities and multivariate interactions may arise from variations in the column pressure and inlet total feed flow, which are reported in Table 3, or the molar fraction of gases in this flow. For example, an increase in pressure leads the column adsorption capacity to increase, improving the CH4 purity and the CO2 recovery at the process outlet. This behavior will especially impact the transfer function gains, which would increase in this situation. Likewise, an increase in the CH4 molar fraction in the feed stream will change the process outputs. In this latter case, the transfer function gains will have the values related to CH4 purity increased and the values related to CO2 recovery decreased. Finally, the PSA was simulated considering the process as isothermal, so no temperature interference led to modeling errors.
The MPC controller treats the modeled disturbances as extended states, estimated using a Kalman observer, and considering that d k + 1 = d k . Therefore, after converting the transfer functions in Table 5 to the state-space model with the output disturbances, the complete state-space model in the incremental form of inputs used by the MPC controller is as follows:
x k + 1 = 0.6563 0 0 0 0 0 0.5 0 0 0.0590 0 0 0 0 0.5 0 0 0 0.6622 0 0 0 0 1 0 0 0 0.0714 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 x k + 0.5 0 0.5 0   0     1   0     1   0     0   0     0   1     0   0     1 u k
y k = 0.4814 0 0 0.6950 0.6613 0 0 0.9542 1 0 0 1 0 0 0 0 x k
where the extended states vector, the incremental input vector, and the output vector are, respectively, x k = x 1 k , x 2 k , x 3 k , x 4 k , d 1 k , d 2 k , T f e e d k 1 , T r i n s e k 1 T , u k = T f e e d k T r i n s e k T , and y k = C H 4 p u r i t y k . C O 2 r e c o v e r y k T , a n d   x i k are the original states of the system related to the transfer function poles in Table 5, and d i k are the disturbances in the process outputs.
It should be noted that including disturbances as new states increases the order of the MPC model and affects the optimization dimensions of Problem P0, leading to higher computational demands. Nevertheless, this inclusion is necessary for the controller to accurately calculate the output at the artificial steady state, y s s k , and achieve offset-free control.
The Kalman observer was implemented in the PLC through the following equations:
x ^ k + 1 / k = A x ^ k / k + B u k + K f y k y ^ k / k 1 u k 1 u ^ k 1 / k 1
Note that the equation from the observer considers the state correction using the difference between the measured outputs in the current instant, y k , and from the estimated outputs of the system in the previous instant, y ^ k / k 1 . In addition, as the final extended states are the last-instant input signals in the current instant, u ^ k 1 / k , this equation also considers the difference between the real last-instant input applied to the system, u k 1 , which is known, from the last-instant input signal estimated in the previous instant, u ^ k 1 / k 1 . If this difference is not considered, the observer poles would be close to unity, hindering the state estimation. Furthermore, this formulation causes the estimated last-instant input to converge quickly to the last-instant input real value, allowing estimation errors to be treated in the other states. The Kalman gain used in Equation (35) was:
K f = 0.1110 0.0002 0.0004 0.0124       0.4809 0.0064       0.4563 0.0010 0.1659 0.0080 0.0042 0.0235 0.0037       0.9569 0.0007       0.9123       0.7015 0.0043 0.0146       0.5440       0.0150       0.0413       0.0162       0.0444 0.0010 0.0009 0.0029 0.0024       0.9083 0.0001 0.0001       0.9080

4.2. PLC Memory Sensitivity Analysis to Design Parameters

The investigation of computational characteristics of the MTSK-MPC algorithm first explored how extending the prediction horizon would impact the Micro850 memory. This study evaluated the MTSK-MPC with three different prediction horizons for each of the single-type constraints from Table 4. The weighting matrices remained constant during all these experiments, as Q = I , S y = 10 4 . I , R = d i a g ( 1,0.1 ) . Figure 4 shows the results of this study.
Observe in Figure 4 the results from different single-type constraints, which exhibit similar behaviors. As the prediction horizon increases, the MTSK-MPC exponentially increases the required parameter numbers. Additionally, input and input variation constraints result in fewer parameters compared to output constraints. This figure also shows the maximum memory capacity of the Micro850 in the red-dashed line and the memory of a standard Raspberry-Pi® 3 A+ micro-computer in the red-pointed line, assuming that all parameters require 16-bit floating-point variables. Considering such a limit, only three cases are embeddable in this PLC, which involve single input constraints and a unitary control horizon in the MPC formulation.
An investigation of computational characteristics of the MTSK-MPC followed to explore the impact of including and combining various constraints for a unitary control horizon in the Micro850 memory. Figure 5 shows the result of this study.
Note in Figure 5, the increased number of parameters required when considering output constraints in the PSA process. If one includes any of the output constraints in the MPC formulation, individually or in combination with others, the MTSK-MPC implementation in the Micro850 will be unfeasible.
On the other hand, observe that adding new constraints does not necessarily increase the number of parameters and, consequently, the amount of memory required. In fact, in some cases, there is a slight decrease. The reason for this is the high dimensionality of the MPC controller for this PSA unit, which can lead to overlapped critical regions and more critical regions with saturated outputs for different constraint combinations. Taking advantage of this behavior, if one includes the three input constraint types simultaneously and with a unitary control horizon, the MTSK-MPC implementation in the Micro850 will be feasible.
Therefore, considering the laboratory PSA process and the Micro850 of the case study, the main result of these two memory investigations is that embedding the MTSK-MPC into this PLC is feasible under particular conditions. To use larger control horizons and include additional constraints would require changing the Micro850 for other PLC models with more memory and processing capacities.
Using the MPC formulation described in Section 3, the values of the input constraints listed in Table 4 with a unitary control horizon, the transfer functions identified in Section 4.1, and the implementation methodology described in Mendes et al. (2022) [29], the MTSK-MPC was successfully embedded into a PLC to control a PSA unit. Figure 6 illustrates the PLC memory used for the program and the data required by this implementation.

4.3. Comparison of Processing Performance of MPCs in Closed-Loop Simulations

In addition to studying the PLC memory required by the MTSK-MPC implementation, an investigation compared the computational processing of different MPC algorithms and simulations. The comparison evaluated the following algorithms running in PC and SIL simulations: an implicit MPC (iMPC) with interior point optimization from the quadprog MATLAB function, an explicit MPC (eMPC) with multiparametric optimization from the MATLAB MPT toolbox [39], and an MTSK-MPC.
Additionally, the comparison included the MTSK-MPC running in the Micro850 and HIL simulation. The evaluation considered the absolute error difference between these MPC algorithms and their respective processing times. Figure 7 displays the PSA process outputs with the respective setpoints, and the PSA process inputs for the MTSK-MPC in the Micro850 and HIL simulation.
Note that a setpoint change occurred at the beginning of the experiment, and the MPC controller successfully tracked this change. Additionally, since PLCs are devices that could present slight oscillations of execution times, intentionally introduced input disturbances perturb the process at cycles 45 and 70 in feed and rinse time, respectively. As expected, the controller rejected these disturbances and restored the system to the desired operating setpoint.
Other results of the comparison are shown in Figure 8, which illustrates the absolute error difference behavior over time, and in Table 6, which summarizes the mean and max absolute error difference between the MPC algorithms. In addition, Tabel 7 presents the mean and max processing execution time of each MPC algorithm with the respective type of simulation and hardware.
In Figure 8 and Table 6, note that the absolute error differences between the outputs of the MPCs from the SIL simulations are negligible as they are in the eighth decimal place. On the other hand, based on Table 7, it is possible to notice that despite presenting very close output calculations, these MPCs processing times are different. Moreover, the MTSK-MPC algorithm stands out with the lowest value. This result is because implicit MPC, explicit MPC, and MTSK-MPC algorithms are optimization methods with equivalent output responses. The differences between these approaches arise mainly due to the implementation aspects, such as different requirements for memory and processing times [5,6,7].
When comparing the two MTSK-MPC algorithms, the one implemented on the PC in the SIL simulation and the other implemented on the PLC in the HIL simulation, note that the absolute error difference is smaller than in the previous comparison cases. Despite that, it is at the sixth decimal place and still negligible. The reason for the discrepancy is the use of double-precision floating-point variables in the PC implementation, while the PLC has single-precision floating-point variables within the developed program. The single-precision floating-point variables are preferable in the PLC program because they use only 32 bits rather than 64 bits of double precision to save memory.
The MTSK-MPC implemented on the PC in the SIL simulation is approximately 300 times faster than the MTSK-MPC implemented on the PLC in the HIL simulation. That is an expected result, and it reinforces that the challenge of applying MPC to PSA units lies in implementing an algorithm of this type on industrial hardware. Another central result regarding processing time is that the shortest step in the PSA cycle is the rinsing time, which is of the order of tens of seconds. Furthermore, the processing time of the MPC controller in the PLC is about 100 ms. Therefore, as this latter time is faster than the PSA step times, the MPC implementation in the Micro850 successfully handles the timing requirements of the under-studied PSA dynamics.

5. Conclusions

This paper is distinguished from previous literature on PSA control by exploring two unexplored gaps. The first gap handled is the comparison of implicit and explicit MPC algorithms applied to PSA processes, achieved by the presented computational investigation. The second gap addressed is the implementation of MPC in industrial hardware for PSA units, attained by integrating the MTSK-MPC into a Micro850 PLC and testing this controller in a closed-loop using an HIL simulation.
The computational investigation consisted of memory-sensitive analyses and a processing comparative evaluation. Based on the memory analyses, the MTSK-MPC implementation in the Micro850 would be feasible if it only considers the constraints associated with the inputs and with a unitary prediction horizon. This strict result is due to the limited memory capacity of the Micro850. The processing performance comparison showed that MTSK-MPC in the PLC-based HIL simulation could calculate control outputs accurately and with values very close to other standard MPC algorithms in PC-based SIL simulations. Additionally, the MTSK-MPC algorithm exhibited a lower processing time than other algorithms in SIL simulations.
The MTSK-MPC implemented into the Micro850 tracked setpoint changes and rejected input disturbances. In addition, the MTSK-MPC absolute error difference between the PLC-based in the HIL simulation and the PC-based in the SIL simulation was negligible. Finally, the processing time of the MTSK-MPC in the Micro850 is about 100 ms, which is fast enough to control the under-studied PSA dynamics. The successful implementation of the MTSK-MPC into the Micro850 and the results obtained in the HIL simulation form the basis for future work to control the physical laboratory PSA unit of LSRE. In this scenario, future work should consider: (i) the execution time of the identification step tests, since the 100 cycles will result in more than 8 h of experiments, (ii) the PSA process without simplifications assumed in the mathematical model, which may present stronger nonlinear behavior than the simulated process, (iii) the effects of disturbances in key process variables, including feed flow rates, feed flow concentrations, column pressure, and column temperature, among others.

Author Contributions

Conceptualization, T.P.G.M.; methodology, T.P.G.M.; software, T.P.G.M.; validation, I.B.R.N.; formal analysis, T.P.G.M.; investigation, T.P.G.M.; resources, A.M.R.; data curation, T.P.G.M.; writing—original draft preparation, T.P.G.M.; writing—review and editing, L.S. and I.B.R.N.; visualization, T.P.G.M.; supervision, I.B.R.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Federal University of Recôncavo da Bahia and by CAPES, the Brazilian Federal Agency for Post-graduate Education, under financial code (001).

Data Availability Statement

Available from the corresponding author upon request.

Acknowledgments

We would like to thank CAPES under Finance Code 001 and national funds through FCT/MCTES (PIDDAC): LSRE-LCM, UIDB/50020/2020 (DOI: 602 10.54499/UIDB/50020/2020) and UIDP/50020/2020 (DOI: 10.54499/UIDP/50020/2020); and ALiCE, 603 LA/P/0045/2020 (DOI: 10.54499/LA/P/0045/2020) for their financial support.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Urich, M.D.; Vemula, R.R.; Kothare, M.V. Implementation of an embedded model predictive controller for a novel medical oxygen concentrator. Comput. Chem. Eng. 2022, 160, 107706. [Google Scholar] [CrossRef]
  2. Luberti, M.; Ahn, H. Review of Polybed pressure swing adsorption for hydrogen purification. Int. J. Hydrogen Energy 2022, 47, 10911–10933. [Google Scholar] [CrossRef]
  3. Khajuria, H.; Pistikopoulos, E.N. Dynamic modeling and explicit/multi-parametric MPC control of pressure swing adsorption systems. J. Process Control 2011, 21, 151–163. [Google Scholar] [CrossRef]
  4. Khajuria, H.; Pistikopoulos, E.N. Optimization and Control of Pressure Swing Adsorption Processes Under Uncertainty. AIChE J. 2013, 59, 120–131. [Google Scholar] [CrossRef]
  5. Sun, W.; Shen, Y.; Zhang, D.; Yang, H.; Ma, H. A Systematic Simulation and Proposed Optimization of the Pressure Swing Adsorption Process for N2/CH4 Separation under External Disturbances. Ind. Eng. Chem. Res. 2015, 54, 7489–7501. [Google Scholar] [CrossRef]
  6. Oliveira, P.H.M.; Martins, M.A.F.; Rodrigues, A.E.; Loureiro, J.M.; Ribeiro, A.M.; Nogueira, I.B.R. A robust model predictive controller applied to a pressure swing adsorption process: An analysis based on a linear model mismatch. IFAC-PapersOnLine 2021, 54, 219–224. [Google Scholar] [CrossRef]
  7. Martins, M.A.F.; Rodrigues, A.E.; Loureiro, J.M.; Ribeiro, A.M.; Nogueira, I.B.R. Artificial Intelligence-oriented economic non-linear model predictive control applied to a pressure swing adsorption unit: Syngas purification as a case study. Sep. Purif. Technol. 2021, 276, 119333. [Google Scholar] [CrossRef]
  8. Martins, M.A.F.; Rodrigues, A.E.; Loureiro, J.M.; Ribeiro, A.M.; Nogueira, I.B.R. Handling model uncertainty in control of a pressure swing adsorption unit for syngas purification: A multi-model zone control scheme-based robust model predictive control strategy. Sep. Purif. Technol. 2023, 306, 122668. [Google Scholar] [CrossRef]
  9. Peng, H.; Couenne, F.; Le Gorrec, Y. Robust Control of a Pressure Swing Adsorption Process. IFAC Proc. Vol. 2011, 44, 7310–7315. [Google Scholar] [CrossRef]
  10. Bitzer, M. Model—Based Nonlinear Tracking Control of Pressure Swing Adsorption Plants. In Control and Observer Design for Nonlinear Finite and Infinite Dimensional Systems; Springer: Berlin/Heidelberg, Germany, 2005; pp. 403–418. [Google Scholar]
  11. Brizuela-Mendoza, J.A.; Sorcia-Vázquez, F.D.J.; 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]
  12. 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]
  13. Morales, J.Y.R.; López, G.L.; Martínez, V.M.A.; Vázquez, F.d.J.S.; Mendoza, J.A.B.; García, M.M. Parametric study and control of a pressure swing adsorption process to separate the water-ethanol mixture under disturbances. Sep. Purif. Technol. 2020, 236, 116–214. [Google Scholar]
  14. Han, Z.Y.; Xing, R.; Zhang, D.H.; Shen, Y.H.; Fu, Q.; Ding, Z.Y.; Tian, C.X. Vacuum pressure swing adsorption system for N2/CH4 separation under uncertainty. Chem. Eng. Res. Des. 2019, 142, 245–256. [Google Scholar] [CrossRef]
  15. Du, W.; Alkebsi, K.A.M. Model predictive control and optimization of vacuum pressure swing adsorption for carbon dioxide capture. In Proceedings of the 6th International Symposium on Advanced Control of Industrial Processes, Taipei, Taiwan, 28–31 May 2017; pp. 412–417. [Google Scholar] [CrossRef]
  16. 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]
  17. Urich, M.D.; Vemula, R.R.; Kothare, M.V. Multivariable model predictive control of a novel rapid pressure swing adsorption system. AIChE J. 2018, 64, 1234–1245. [Google Scholar] [CrossRef]
  18. Urich, M.D.; Rama Rao, V.; Kothare, M.V. Piecewise linear model predictive control of a rapid pressure swing adsorption system. AIChE J. 2020, 66, e16998. [Google Scholar] [CrossRef]
  19. Mulholland, M.; Latifi, M.A. Predictive Control Of Pressure Swing Adsorption. In Proceedings of the 2009 International Conference on Process Control, Štrbské Pleso, Slovakia, 9–12 June 2009; Volume 9, pp. 323–331. [Google Scholar]
  20. Nogueira, I.B.R.; Martins, M.A.F.; Rodrigues, A.E.; Loureiro, J.M.; Ribeiro, A.M. Novel Switch Stabilizing Model Predictive Control Strategy Applied in the Control of a Simulated Moving Bed for the Separation of Bi-Naphthol Enantiomers. Ind. Eng. Chem. Res. 2020, 59, 1979–1988. [Google Scholar] [CrossRef]
  21. Nogueira, I.B.R.; Ribeiro, A.M.; Martins, M.A.F.; Rodrigues, A.E.; Koivisto, H.; Loureiro, J.M. Dynamics of a True Moving Bed separation process: Linear model identification and advanced process control. J. Chromatogr. A 2017, 1504, 112–123. [Google Scholar] [CrossRef] [PubMed]
  22. Nogueira, I.B.R.; Fontes, R.M.; Ribeiro, A.M.; Pontes, K.V.; Embiruçu, M.; Martins, M.A.F. A robustly model predictive control strategy applied in the control of a simulated industrial polyethylene polymerization process. Comput. Chem. Eng. 2020, 133, 106664. [Google Scholar] [CrossRef]
  23. Huyck, B.; De Brabanter, J.; De Moor, B.; Van Impe, J.F.; Logist, F. Towards online model predictive control on a programmable logic controller: Practical considerations. Math. Probl. Eng. 2012, 2012, 912603. [Google Scholar] [CrossRef]
  24. Johansen, T.A. Toward Dependable Embedded Model Predictive Control. IEEE Syst. J. 2014, 11, 1208–1219. [Google Scholar] [CrossRef]
  25. Qin, S.J.; Badgwell, T.A. A survey of industrial model predictive control technology. Control Eng. Pract. 2003, 11, 733–764. [Google Scholar] [CrossRef]
  26. Fu, Q.; Yan, H.; Shen, Y.; Qin, Y.; Zhang, D.; Zhou, Y. Optimal design and control of pressure swing adsorption process for N2/CH4 separation. J. Clean. Prod. 2018, 170, 704–714. [Google Scholar] [CrossRef]
  27. Kvasnica, M. Implicit vs. explicit MPC—Similarities, differences, and a path owards a unified method. In Proceedings of the 2016 European Control Conference (ECC), Aalborg, Denmark, 29 June–1 July 2016; p. 603. [Google Scholar] [CrossRef]
  28. Bemporad; Morari, M.; Dua, V.; Pistikopoulos, E.N. The explicit linear quadratic regulator for constrained systems. Automatica 2002, 38, 3–20. [Google Scholar] [CrossRef]
  29. Mendes, T.P.G.; Schnitman, L.; dos Reis Nogueira, I.B.; Mafalda Almeida Peixoto Ribeiro, A.; Egídio Rodrigues, A.; Miguel Loureiro, J.; Martins, M.A.F. A new Takagi-Sugeno-Kang model-based stabilizing explicit MPC formulation: An experimental case study with implementation embedded in a PLC. Expert Syst. Appl. 2022, 210, 118369. [Google Scholar] [CrossRef]
  30. Tiegelkamp, M.; John, K.H. IEC 61131-3: Programming Industrial Automation Systems; Springer: Berlin/Heidelberg, Germany, 2010; ISBN 978-3-662-07847-1. [Google Scholar] [CrossRef]
  31. Mergenthal, M.; Tawai, A.; Amornraksa, S.; Roddecha, S.; Chuetor, S. Methane enrichment for biogas purification using pressure swing adsorption techniques. Mater. Today Proc. 2023, 72, 2915–2920. [Google Scholar] [CrossRef]
  32. Nogueira, I.B.R.; Martins, M.A.F.; Regufe, M.J.; Rodrigues, A.E.; Loureiro, J.M.; Ribeiro, A.M. Big Data-Based Optimization of a Pressure Swing Adsorption Unit for Syngas Purification: On Mapping Uncertainties from a Metaheuristic Technique. Ind. Eng. Chem. Res. 2020, 59, 14037–14047. [Google Scholar] [CrossRef]
  33. Campos, A.F.; da Silva, N.F.; Pereira, M.G.; Vasconcelos Freitas, M.A. A review of Brazilian natural gas industry: Challenges and strategies. Renew. Sustain. Energy Rev. 2017, 75, 1207–1216. [Google Scholar] [CrossRef]
  34. Regufe, M.J.; Tamajon, J.; Ribeiro, A.M.; Ferreira, A.; Lee, U.H.; Hwang, Y.K.; Chang, J.S.; Serre, C.; Loureiro, J.M.; Rodrigues, A.E. Syngas Purification by Porous Amino-Functionalized Titanium Terephthalate MIL-125. Energy Fuels 2015, 29, 4654–4664. [Google Scholar] [CrossRef]
  35. Martins, M.A.F.; Odloak, D. A robustly stabilizing model predictive control strategy of stable and unstable processes. Automatica 2016, 67, 132–143. [Google Scholar] [CrossRef]
  36. Kacprzyk, J.; Pedrycz, W. Springer Handbook of Computational Intelligence; Springer: Berlin/Heidelberg, Germany, 2015. [Google Scholar] [CrossRef]
  37. Sugeno, M.; Kang, G.T. Structure identification of fuzzy model. Fuzzy Sets Syst. 1988, 28, 15–33. [Google Scholar] [CrossRef]
  38. Sugeno, M.; Takagi, T. Fuzzy identification of systems and its applications to modeling and control. IEEE Trans. Syst. Man Cybern. 1985, 15, 116–132. [Google Scholar] [CrossRef]
  39. Herceg, M.; Kvasnica, M.; Jones, C.N.; Morari, M. Multi-Parametric Toolbox 3.0. In Proceedings of the 2013 European control Conference (ECC), Zurich, Switzerland, 17–19 July 2013; pp. 502–510. [Google Scholar] [CrossRef]
Figure 1. Operation screen with simplified process diagram of the PSA simulated (adapted from the LSRE laboratory plant).
Figure 1. Operation screen with simplified process diagram of the PSA simulated (adapted from the LSRE laboratory plant).
Processes 12 01738 g001
Figure 2. Fuzzy inference system of the: (Top) Classical TSK model and (Bottom) MTSK-MPC model [29].
Figure 2. Fuzzy inference system of the: (Top) Classical TSK model and (Bottom) MTSK-MPC model [29].
Processes 12 01738 g002aProcesses 12 01738 g002b
Figure 3. Identification procedure using step input signals. (Bottom) The feed and rinse times of the PSA cycle steps. (Top) The CH4 purity and CO2 recovery responses for these excitations.
Figure 3. Identification procedure using step input signals. (Bottom) The feed and rinse times of the PSA cycle steps. (Top) The CH4 purity and CO2 recovery responses for these excitations.
Processes 12 01738 g003
Figure 4. Sensitivity analysis for one constraint and different prediction horizons of the MTSK-MPC algorithm.
Figure 4. Sensitivity analysis for one constraint and different prediction horizons of the MTSK-MPC algorithm.
Processes 12 01738 g004
Figure 5. Sensitivity analysis for a fixed prediction horizon and different constraint combinations.
Figure 5. Sensitivity analysis for a fixed prediction horizon and different constraint combinations.
Processes 12 01738 g005
Figure 6. Final memory allocation after MTSK-MPC programmed block and parameter values downloaded to Micro850.
Figure 6. Final memory allocation after MTSK-MPC programmed block and parameter values downloaded to Micro850.
Processes 12 01738 g006
Figure 7. Closed-loop behavior of the PSA unit under MTSK-MPC controller.
Figure 7. Closed-loop behavior of the PSA unit under MTSK-MPC controller.
Processes 12 01738 g007
Figure 8. Absolute error difference over time between the MPCs outputs: (Top) Feed time and (Bottom) rinse time.
Figure 8. Absolute error difference over time between the MPCs outputs: (Top) Feed time and (Bottom) rinse time.
Processes 12 01738 g008
Table 1. Fitting parameters of the dual-site Langmuir model for CH4 and CO2 adsorption equilibrium on the BPL activated carbon.
Table 1. Fitting parameters of the dual-site Langmuir model for CH4 and CO2 adsorption equilibrium on the BPL activated carbon.
Speciesqm,1
( mol   × kg–1)
qm,2
( mol   × kg–1)
b0,1 × 104
(bar–1)
b0,1 × 104
(bar–1)
ΔH1
( J   × mol–1)
ΔH2
( J   × mol–1)
CH44.720.401.762.9816,31020,595
CO27.120.320.300.8022,19928,433
Table 2. Scheduling of valve discrete position in the PSA cycle steps.
Table 2. Scheduling of valve discrete position in the PSA cycle steps.
StepV1V2V3V4V5V6V7V8V9V10V11V12V13
10100000010100
20100000000100
30000001000010
40011001100010
Table 3. Scheduling of continuous values in the PSA cycle steps.
Table 3. Scheduling of continuous values in the PSA cycle steps.
StepInlet Flow (L/min)Back Pressure (Pascal)
10.51.9 × 105
20.11.9 × 105
3-0.3 × 105
40.20.3 × 105
Table 4. Summary of the operating point and the process limits considered.
Table 4. Summary of the operating point and the process limits considered.
InputsTfeed TrinseOutputsCH4 PurityCO2 Recovery
u ¯ 212.6 s74.2 s y ¯ 72.7196%95.9988%
u m i n 200 s70 s y m i n 68%91%
u m a x 300 s150 s y m a x 100%100%
u m a x 2 s/cycle2 s/cycle---
Table 5. Transfer functions identified after step test identification.
Table 5. Transfer functions identified after step test identification.
Inputs\OutputsCH4 Purity (%)
y 1
CO2 Recovery (%)
y 2
Tfeed   ( s )   u 1 0.7003 2.375 × s + 1 0.3693 0.3534 × s + 1
Trinse   ( s )   u 2 1.957 2.426 × s + 1 1.028 0.3788 × s + 1
Table 6. Absolute error difference between MPCs outputs.
Table 6. Absolute error difference between MPCs outputs.
MPC
(Hw/Simulation)
iMPC (PC/SIL) −
eMPC (PC/SIL)
iMPC (PC/SIL) − MTSK-MPC (PC/SIL)MTSK-MPC (PC/SIL) − MTSK-MPC (CLP/HIL)
u 1 u 2 u 1 u 2 u 1 u 2
Mean (10 × 10−6)0 . 0860 . 0310 . 0860 . 0310 . 1840 . 233
Max (10 × 10−6)0 . 0090 . 0030 . 0090 . 0030 . 760 . 497
Table 7. Processing time of MPCs algorithms.
Table 7. Processing time of MPCs algorithms.
Simulation Type (Hardware)SIL (PC)HIL (CLP)
MPC AlgorithmiMPCeMPCMTSK-MPCMTSK-MPC
Mean Time (ms) 5 . 329 9 . 4870 . 32995
Max Time (ms) 61 . 583 33 . 259 4 . 12496
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

Mendes, T.P.G.; Ribeiro, A.M.; Schnitman, L.; Nogueira, I.B.R. A PLC-Embedded Implementation of a Modified Takagi–Sugeno–Kang-Based MPC to Control a Pressure Swing Adsorption Process. Processes 2024, 12, 1738. https://doi.org/10.3390/pr12081738

AMA Style

Mendes TPG, Ribeiro AM, Schnitman L, Nogueira IBR. A PLC-Embedded Implementation of a Modified Takagi–Sugeno–Kang-Based MPC to Control a Pressure Swing Adsorption Process. Processes. 2024; 12(8):1738. https://doi.org/10.3390/pr12081738

Chicago/Turabian Style

Mendes, Teófilo Paiva Guimarães, Ana Mafalda Ribeiro, Leizer Schnitman, and Idelfonso B. R. Nogueira. 2024. "A PLC-Embedded Implementation of a Modified Takagi–Sugeno–Kang-Based MPC to Control a Pressure Swing Adsorption Process" Processes 12, no. 8: 1738. https://doi.org/10.3390/pr12081738

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