Next Article in Journal
Novel High-Efficiency High Step-Up DC–DC Converter with Soft Switching and Low Component Voltage Stress for Photovoltaic System
Next Article in Special Issue
Advanced Kinetic Modeling of Bio-co-polymer Poly(3-hydroxybutyrate-co-3-hydroxyvalerate) Production Using Fructose and Propionate as Carbon Sources
Previous Article in Journal
Design and Optimization of a Curved-Crease-Folding Process Applied to a Light Metallic Structure
Previous Article in Special Issue
Global Stability Analysis of a Bioreactor Model for Phenol and Cresol Mixture Degradation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

FPGA-Based Implementation of an Optimization Algorithm to Maximize the Productivity of a Microbial Electrolysis Cell

by
José de Jesús Colín-Robles
1,
Ixbalank Torres-Zúñiga
1,*,
Mario A. Ibarra-Manzano
1 and
Víctor Alcaraz-González
2
1
C. A. Telemática, Departamento de Ingeniería Electrónica, Universidad de Guanajuato, Carr. Salamanca-Valle de Santiago km 3.5+1.8, Salamanca 36885, Mexico
2
Centro Universitario de Ciencias Exactas e Ingeniería, Universidad de Guadalajara—CUCEI, M. García Barragán 1451, Guadalajara 44430, Mexico
*
Author to whom correspondence should be addressed.
Submission received: 19 May 2021 / Revised: 13 June 2021 / Accepted: 15 June 2021 / Published: 25 June 2021
(This article belongs to the Special Issue Mathematical Modeling and Control of Bioprocesses)

Abstract

:
In this work, the design of the hardware architecture to implement an algorithm for optimizing the Hydrogen Productivity Rate (HPR) in a Microbial Electrolysis Cell (MEC) is presented. The HPR in the MEC is maximized by the golden section search algorithm in conjunction with a super-twisting controller. The development of the digital architecture in the implementation step of the optimization algorithm was developed in the Very High Description Language (VHDL) and synthesized in a Field Programmable Gate Array (FPGA). Numerical simulations demonstrated the feasibility of the proposed optimization strategy embedded in an FPGA Cyclone II. Results showed that only 21 % of the total logic elements, 5.19 % of dedicated logic registers, and 64 % of the total eight-bits multipliers of the FPGA were used. On the other hand, the estimated power consumption required by the FPGA-embedded optimization algorithm was only 146 mW.

Graphical Abstract

1. Introduction

Nowadays, biotechnological systems represent a very attractive option for hydrogen production. The degradation of organic matter through the use of bacteria has gained great interest in the scientific community because hydrogen can be produced in a clean way [1,2]. In contrast to current industrial methods, in which unfortunately 90 % of the hydrogen produced requires the use of fossil fuels generating a large amount of C O 2 (10 tonnes of C O 2 per ton of H 2 ) [3], Microbial Electrolysis Cells (MEC) represent a great alternative to produce hydrogen because they require less energy compared to the classic techniques to produce hydrogen, such as the electrolysis of water [4,5].
A MEC is an electrochemical device which uses electroactive microorganisms as catalysts to convert the organic matter to hydrogen and provides a novel approach for producing economically viable hydrogen from a wide range of renewable biomass sources [6,7]. Furthermore, a waste biorefinery based on MECs to produce clean and renewable electrofuel and valuable chemical compounds holds the flexible potentials for pollutants removal and C O 2 capture [8]. Broadly speaking, unlike a Microbial Fuel Cell, a MEC requires the induction of a constant voltage supply generating a potential difference between the electrodes to produce a flow of hydrogen as a result of the degradation of the organic matter that is fed to the MEC.
Other widely biological approaches used for the production of hydrogen in a clean way include Dark Fermentation (DF) in which bioreactors are fed by wastewater with a high concentration of organic matter from domestic and industrial origin. However, its efficiency to produce hydrogen compared to a MEC is relatively low (40% or less) [9]. Generally a MEC is fed with a controlled flow of wastewater which is rich in Volatile Fatty Acids (VFAs) that in turn might come from another Wastewater Treatment Plant (WWTP) like a DF bioreactor.
The production of hydrogen at the industrial scale through biotechnological systems is a challenge that has been dealt with from different approaches. For instance, in [10] an optimization scheme to maximize the hydrogen productivity of a DF is presented. In such study the optimization is achieved by a heuristic strategy with a nonlinear observer consisting in a Luenberger observer coupled to a super-twisting observer. Then, a super-twisting controller is used to lead the DF process to its maximum hydrogen productivity rate. In [11] the optimization is focused on the effect of the operating conditions such as pH, temperature, nutrient availability and substrate concentration. This involves mathematical modeling of a fermentation process in such a way that biohydrogen production can be predicted. On the other hand in [12] the hydrogen productivity was reported to increase from 0.13 to 0.82 m3 [ H 2 ] per m3 per day improving the conductivity of the electrode in a MEC and increasing the population of bacteria in the cathode biofilm. Another work related to hydrogen optimization is presented in [13] where the authors demonstrated that the MEC efficiency can be improved through the reduction of the apparent resistance. The optimization strategy is integrated by both perturbation and observation algorithms designed to track the minimal apparent resistance and adjusting the applied voltage used as control input. Other works in literature are focused in MEC construction details, for example, in [14] an effective strategy to improve the productivity performance through an improved anode arrangement is presented. In such work, the anode is strategically located in such a way that the solution resistance, the biofilm and the whole physical system are reduced. The polarization of the MEC was considerably reduced, affecting directly 72–118% the rate of hydrogen production.
The possibility of being able to implement control algorithms using digital systems such as microcontrollers, Graphic Processing Units (GPUs) and Field Programmable Gate Arrays (FPGAs) has been of great interest due to its great processing capacity, resources optimization and low energy consumption. Besides, the parallelism in the execution of the algorithms has given to the FPGAs a great advantage over other digital systems based on microcontrollers and microprocessors. For example, in [15,16], an FPGA-based fuzzy-logic controller is implemented and analyzed, and it is concluded that this technology is a good choice for implementation. The parallelism offered by FPGAs is used in [17,18] to implement complex control algorithms for a AC-DC converter and a DC-DC converter, respectively. In these works the FPGA processing efficiency is highlighted. In [19] both, the optimization of 80% of the hardware and reduction of 40% of the power consumption of a distributed-arithmetic (DA)-based proportional-integral-derivative (PID) controller compared to a multiplier-based scheme is demonstrated for temperature control. The efficiency of the complete digital control system is demonstrated using a Xilinx Spartan-2E FPGA. More recently, in [20] the authors proposed a combination of a direct torque control, space vector modulation, input-output feedback linearisation, a second-order super-twisting speed controller, and sliding-mode-load torque and stator-flux observers with stator resistance estimation implemented in an FPGA. This control strategy demonstrated robustness in presence of stator resistance variations and uncertainties when it was applied to an induction motor drive. An interesting pipeline implementation of a super-twisting controller to control ground vehicles is presented in [21]. The super-twisting controller was used to control the lateral and yaw velocities in the vehicle dynamics that are described by a discrete time model. The resulting implementation required shorter sampling times and can be synthesized in a low-cost FPGA. A classical Proportional-Integral-Derivative (PID) controller implemented in FPGA is proposed in [22]. With the objective to accelerate the execution of the algorithm, to obtain great precision and to get highly commercial ability, the implementation was based on smooth motion interpolation. The results from numerical simulations and practical tests, demonstrated its correct performance. Nevertheless, to the best of the authors knowledge, there is not FPGA-based control implementations applied to bioprocesses.
In the present work the optimization problem of maximizing the Hydrogen Production Rate (HPR) in a MEC is addressed. The productivity function is approximated from the MEC model in steady state, for which, a point of maximum performance in a well-defined operating region is ensured. Using the golden section search optimization algorithm coupled to a robust super-twisting controller, the MEC is online brought to its maximum hydrogen production performance. The proposed optimization strategy is embedded in an FPGA throughout different digital architectures that are executed in parallel without hardware sharing. The resulting digital architecture has mainly two advantages, first, the portability to be synthesized in an FPGA card from any manufacturer, and second, the low power consumption compared to a personal computer. The implementation of the optimization algorithm in an FPGA has the great advantage of being described in hardware. This allows an easy adaptation in the use of communication protocols with external devices.
The rest of the paper is organized as follows: in Section 2 the mathematical model of the MEC is described, and the objective function as the HPR is presented. A description of the optimization problem is described in detail in Section 3. In Section 4 the optimization problem is addressed by using the Golden Section Search algorithm coupled to the discrete time super-twisting controller. In addition, the maximum HPR numerically computed is verified analytically. The FPGA-based implementation of the optimization algorithm is presented in Section 5 including numerical algorithms for the implementation of arithmetic operations like division, multiplication and square root. The results are presented in Section 6, where numerical simulations are carried out in an FPGA to verify the performance, including both the truncation error and the synthesis report of the digital architecture. Finally some conclusions are pointed out in Section 7.

2. Mathematical Model

One of the most used Microbial Electrolysis Cell (MEC) configurations currently consists mainly of two chambers that are separated by a cathode membrane (see Figure 1). In the anode chamber, the anode is covered by a biofilm where the existence of anodophilic and methanogenic bacteria is considered. The degradation of VFAs in the MEC takes place in the anode chamber, where hydrogen protons and electrons are produced. Protons pass through a ionic membrane to the cathodic chamber where the production of hydrogen occurs. A relatively small voltage is supplied to the system generating a potential difference between the two electrodes, which allows the electrons released in the anode by the anodophilic bacteria to circulate and pass to the cathode to combine with the hydrogen protons. In the degradation process there is a competition between two types of microorganisms, anodophilic and methanogenic, to decide who will consume the substrate.
This behavior is modeled by the following system of Ordinary Differential Equations (ODEs) [23]:
s ˙ = ( s i n s ) D i n k a μ a x a k m μ m x m
x ˙ a = μ a x a k d , a x a α a D i n x a
x ˙ m = μ m x m k d , m x m α m D i n x m ,
where s is the acetate concentration (mg/L−1), while x a and x m are the concentration of the anodophilic and acetoclastic methanogenic microorganisms, respectively (mg/L−1); D i n is the dilution rate, D i n = F i n / V r e a c (d−1), where F i n is the input flow rate (Ld−1) and V r e a c is the reactor volume (L); α a and α m are the dimensionless biofilm retention constants. μ a and μ m are the growth rates (d−1) for anodophilic and acetoclastic methanogenic microorganisms, respectively, which are defined as follows:
μ a = μ m a x , a s k s , a + s 1 1 + e F R T η
μ m = μ m a x , m s k s , m + s ,
where μ m a x , a and μ m a x , m are the maximum grown rates (d−1), k s , a and k s , m are the half-rate Monod constants (mg (s) L−1), F is the Faraday constant (C mol−1 e−1), R is the ideal gas constant (J mol−1 K−1), T is the temperature (K), η = E a n o d e E K a is the local potential, where E a n o d e is the anode potential (V) and E K a is the half-maximum-rate anodic Electron Aceptor (EA) potential (V) i.e., the potential that occurs when S = k S , a and the rate is half of the maximum rate [24].

MEC Productivity

The hydrogen flow rate in the MEC is modeled by Equation (6), where it can be seen that the hydrogen produced is closely related to the current generated from the flow of electrons between the electrodes.
Q H 2 = Y H 2 A a I M E C m F R T P ,
where Y H 2 is the dimensionless cathode efficiency, A a is the anode area (m2), m is the electrons per mol specie (mol e mol−1 M−1) and P is the pressure inside the cathodic chamber (atm). In the Equation (6) the methanogenic microorganisms consumption is neglected and it is considered that only anodophilic microorganisms are responsible for acetate degradation. The current in the MEC is modeled as:
I M E C = γ s k a μ a x a L f ( 1 f s 0 ) + γ x b x a L f A a ,
where γ s and γ x (mFM−1 W s 1 ) are the yield coefficients related to the number of coulombs that it is possible to obtain from W s (g mol−1) and W x (g mol−1), i.e., the substrate, and the biomass respectively; f s 0 is the dimensionless fraction of electrons used for cell synthesis, b is the endogenous decay coefficient (d−1) and L f is the biofilm thickness (m).
The hydrogen production rate (HPR) Q H 2 , p is defined as the hydrogen flow rate produced per volume of reactor ( L [ H 2 ]   L 1 d 1 ):
Q H 2 , p = Q H 2 V r e a c ,
where Q H 2 is the hydrogen flow rate defined by Equation (6).

3. Problem Statement

The HPR is function of both, the dilution rate D i n and the inlet acetate concentration s i n . D i n is the optimization variable, while s i n is considered as a disturbance. As it can be seen in Figure 2, the HPR presents a maximum hydrogen productivity point related to an optimal dilution rate ( Q H 2 , p m a x , D i n , o p t ) within a range of concentrations for the inlet acetate s i n [2000, 6000] mL−1. Therefore, the optimization problem consists in calculating the value of the optimal dilution rate D i n , o p t that ensures the maximum performance Q H 2 , p m a x in the MEC.
Maximizing the HPR in the MEC is possible if and only if a D i n , o p t of the productivity function Q H 2 , p ( D i n , s i n ) can be computed in an open neighborhood region ( Γ ) for each acetate concentration in the inlet s i n . Ensuring the existence of D i n , o p t implies the following assumptions [25]:
Assumption 1.
The function Q H 2 , p is twice continuously differentiable in Γ with respect to D i n such that:
Q H 2 , P ( D i n , o p t , s i n ) D i n = 0 2 Q H 2 , P ( D i n , s i n ) D i n 2 < 0
Assumption 2.
The function Q H 2 , p is convex, unimodal and any D i n , o p t is a global maximizer for each s i n in the operating region.
The optimization problem to maximize the hydrogen production rate in the MEC is proposed as:
max D i n   Q H 2 , p ( D i n , s i n ) such   that : x ˙ ( t ) = f ( x , D i n , s i n ) y ( t ) = Q H 2 , p ( x ) ,
where x = [ s , x a , x m ] T is the state vector, f ( x , D i n , s i n ) is defined by Equations (1)–(5) and the measured output Q H 2 , p ( x ) is the hydrogen production rate defined by Equations (6)–(8).
As it is shown in Figure 2, only a maximum Q H 2 , p m a x can be observed for each maximizer D i n , o p t in the operating region.
The optimization problem is online solved by the GSS algorithm coupled to a super-twisting controller. The GSS algorithm calculates the value Q H 2 , p m a x using a hydrogen productivity function in relation to both, the dilution rate and the inlet acetate concentration of the MEC. The super-twisting controller uses Q H 2 , p m a x as a reference to track the MEC productivity to the maximum value. The optimization scheme described before is depicted in Figure 3.
In order to optimize the hardware resources and to reduce the power consumption, the optimization strategy to maximize the HPR of the MEC is embedded in an FPGA. This way, the energy cost required to bring the MEC to its maximum HPR can be considerably reduced.

4. Optimization of the MEC Productivity

An optimum point ( Q H 2 , p m a x , D i n , o p t ) is possible if and only if the MEC achieves an steady state [ s * , x a * , x m * ] . The operating point of the system (1)–(3) as function of s i n and D i n is given in steady state as:
s * = k s , a k d , a + k s , a α a D i n μ m a x , a ψ k d , a D i n α a
x a * = ( s i n s * ) D i n k a μ a
x m * = 0 ,
with
ψ = 1 + e F R T η .
The objective function Q H 2 , p ( D i n , s i n ) , defining the input-output map in steady state, is therefore expressed as:
Q H 2 , p ( D i n , s i n ) = L f A s u r Y H 2 A a R T D i n m F P V r e a c ( s i n s * ) γ s ( 1 f s 0 ) + γ x b ψ ( k s a + s * ) k a μ m a x , a s * .
In this work, the acetate concentration in the inlet s i n is assumed as known.

4.1. The Golden Section Search Algorithm

Golden ratio ( φ ) has been of a great interest to mathematicians, physicists, philosophers and artists. In antiquity, civilizations like Egyptians used the φ number as the main criterion for the construction of the Great Pyramids. The Parthenon in Greece was also built based on φ [26].
In relation to nature, the golden ratio is considered a natural constant that sets the standard in reproduction, growth patterns of living beings such as plants and animals. Their geometric relationship is described in Figure 4, where a line A–C is divided into two segments l and r by a point B where l is greater than r such that the ratio l / r is equal to the ratio ( l + r ) / l .
The Golden Section Search (GSS) algorithm is an iterative process suggested to optimize one-dimensional, unimodal and well behaved functions [27], taking into account that the optimum value must be into a search region defined by a lower bound (A) and an upper bound (C), as described in Figure 4.
φ = l r = l + r l = 1.618033988
The optimization of the HPR in the MEC begins defining the search region of Equation (15). In this case, the search region is defined by D i n , A = 1 d−1 and D i n , C = 3 d−1. Then, two inner evaluation points D i n , 1 and D i n , 2 are selected as function of φ .
D i n , 1 = D i n , A + d
D i n , 2 = D i n , C d ,
with
d = ( φ 1 ) ( D i n , A D i n , C ) .
The error used by the GSS algorithm to stop its operation is defined as:
e r r = ( φ 1 ) D i n , C D i n , A D i n , o p t .
The complete GSS algorithm to calculate the optimum point ( D i n , o p t , Q H 2 , p m a x ) is presented in Algorithm 1.

4.2. GSS Validation

First, let us analyze the stability of the nonlinear system (1)–(3) by calculating the eigenvalues ( λ i ) of its linear approximation. The indirect Lyapunov method establish conditions that allow us to obtain conclusions about the stability of the nonlinear system in an operating point.
Consider the nonlinear system (1)–(3) with the operating point x * = s * ,   x a * ,   x m * that has the following linear approximation
x ¯ ˙ = A x ¯ + B u u ¯ + B w w ¯ ,
where x ¯ = x x * , A, B u and B w are the Jacobian matrices of the system, u ¯ = D i n D i n * and w ¯ = s i n s i n * respectively.
The indirect Lyapunov method states that the nonlinear system (1)–(3) is asymptotically stable if and only if R e ( λ i ) < 0 of the matrix A, λ i , i = 1 , 2 , 3 , defined as:
A = f ( x , D i n , s i n ) x | ( x * , D i n * , s i n * ) .
As it can be seen in Figure 5 the eigenvalues of the matrix A are Hurwitz in the operating region of the MEC. It must be pointed out that the closer the dilution rate is to the value 3 d−1, the more the eigenvalues λ 1 and λ 2 approach the origin.
Algorithm 1: GSS algorithm description
Processes 09 01111 i001
The optimum value D i n , o p t is then obtained by differentiating the objective function (15) with respect to D i n and equating the result to zero (first-order optimally condition), which leads to
Q H 2 , p D i n = Y H 2 A a R T m F P V r e a c I M E C * D i n = 0 ,
where
I M E C * D i n = L f A s u r [ D i n ( s i n s * ) ( ψ γ x b k a μ m a x , a ρ D i n ) + ( γ s ( 1 f s 0 ) + γ x b k a μ a ) ( s i n s * D i n s * D i n ) ]
ρ D i n = s * D i n ( s * ( k s a + s * ) ) s * 2
s * D i n = k s a α a μ m a x , a ψ k d , a D i n α a + α a ( k s , a k d , a + k s , a α a D i n ) μ m a x , a ψ k d , a D i n α a 2
Figure 6 shows the Q H 2 , p m a x value calculated both, by the GSS Algorithm 1 and by substituting D i n , o p t , calculated by setting the Equation (23) equal to zero (see Figure 7), in Equation (15). As it can be seen, the results of the GSS algorithm match the results obtained analytically.

4.3. Super-Twisting Controller

The MEC model (1)–(3) can be rewritten as follows:
x ˙ = γ ( x ) + g ( x ) D i n
y = Q H 2 , p ( x ) ,
where γ ( x ) and g ( x ) are vector functions defined as:
γ ( x ) = k a μ a x a k m μ m x m ( μ a k d , a ) x a ( μ m k d , m ) x m
g ( x ) = s i n s α a x a α m x m .
The relative degree σ of System (27) and (28) is computed by differentiating the output with respect to time as [28]:
y ˙ = Q H 2 , p ( x ) x x ˙   =   β γ ( x ) + β g ( x ) D i n ,
where β = Q H 2 , p s ,   Q H 2 , p x a ,   Q H 2 , p x m . Hence, the relative degree of the system (27) and (28) is σ = 1 .
In this work the super-twisting controller, Equations (32) and (33), is therefore considered to track the maximum hydrogen flow rate computed by the GSS algorithm with the sliding variable defined as the tracking error [29].
D i n , c = ρ 1 | ϵ c | s i g n ( ϵ c ) + D n o m
d D n o m d t = ρ 2 s i g n ( ϵ c )
In the super-twisting controller (32) and (33), the tracking error is defined as:
ϵ c = Q H 2 , p m a x Q H 2 , p ,
ρ 1 and ρ 2 are the controller gains that ensure the finite-time stability of the tracking error, while D i n , c is the control input necessary to bring the MEC to the maximum value Q H 2 , p m a x .
For implementation purposes in an FPGA, the discrete time super-twisting controller (DTSTC) is considered. The representative numerical solution showed in the Equations (35) and (36) is obtained from Equations (32) and (33) using the Euler’s method. The controller uses the value Q H 2 , p m a x as a reference to carry the real productivity to its maximum value in finite time.
D i n , c [ k ] = ρ 1 | ϵ c | s i g n ( ϵ c ) + D n o m [ k ]
D n o m [ k + 1 ] = D n o m [ k ] τ ρ 2 s i g n ( ϵ c ) ,
In Equation (36), τ (d) is the sampling time considered.

5. FPGA-Embedded Optimization Algorithm

The FPGA-based implementation of the optimization algorithm is depicted in Figure 8 and Figure 9. Following the scheme presented in Figure 3, the implementation block diagram is integrated by the GSS algorithm digital architecture coupled to the DTSTC digital architecture. A finite state machine (FSM) and a down programmable counter are used to ensure the proper operation of the optimization algorithm embedded in the FPGA.
The digital architecture of the optimization algorithm uses a fixed point format (16,24) to represent all the input-output signals and inner operations. The hardware description used to develop the digital architecture was VHDL and the target board used was the Cyclone II EP2C35F672C6 integrated in the ALTERA DE2 educational board with a clock frequency f C L K = 50 MHz.
The modules GSS_MEC and ST_CONTROLLER were designed for an easy interaction with the FSM_CONT_MEC module and any other external device through the STG, EOG, STCS and EOCS signals. When the input signals STG and STCS are assigned to the logical value ‘1’ by the FSM_VCONT_MEC module, they will produce a busy mode of their respective modules due to the latency time in the calculation of their final results. The busy mode is indicated by the output signals EOG =’0’ and EOCS = ‘0’. On the other hand, when EOG = ‘1’ and EOCS = ‘1’, it means that the modules GSS_MEC and ST_CONTROLLER have finished and the results are ready to be read.

5.1. Operation of the FPGA-Embedded Optimization Algorithm

The FSM depicted in the Figure 9 is a great help for understanding the operation of the digital architecture. The FPGA execution can be divided in two steps, the initialization step, which is controlled by the states S0 to S2, and the normal operation, which is controlled by the remanding states of the FSM_CONT_MEC module. The initialization is executed when the FPGA is energized and the INI signal has a binary value ‘1’. Otherwise, the FPGA remains in standby mode until an external source changes the value of that signal. In such case, the initialization is started by a push-button (see the state S0). When INI = ‘1’ the FSM changes to the state S1 where STG = ‘1’ and SEL = ‘0’ in the GSS_MEC module and the two-one multiplexer. This will start the calculation of Q H 2 , p , m a x with the initial value s i n , 0 . In the next clock cycle, the EOMEC signal in the GSS_MEC module will change from logic ‘1’ to logic ‘0’ indicating that this module is in the process of calculating Q H 2 , p , m a x . At the same time, without any condition, a transition is made to the state S2 where the FSM is waiting by the logic value ‘1’ in the EOMEC signal indicating that the result is ready. When Q H 2 , p , m a x is ready to be used by the ST_CONTROLLER module, the FSM make a transition to the state S3 where the initialization step is done, and the system now is in the normal operation where SEL = ‘1’ and it is waiting for an external device to set the value STOMEC = ‘1’. During the initialization step, the down counter is loaded with an initial value decreased by one every sampling period until reaching the optimization period.
In the normal operation, the ST_CONTROLLER module and the down counter are executed every sampling period with the aim of controlling the HPR in the MEC, and decreasing the initial value of the counter. When the down counter reaches the value zero, this means that the optimization period has expired and the GSS_MEC module is executed to generate a new Q H 2 , p , m a x , after that, the down counter is reloaded with the initial value.
The normal operation starts in the state S3 and the digital architecture reads s i n by SEL = ‘1’ in the multiplexer. When the signal STOMEC = ‘1’, the FPGA-based optimization algorithm generates the control input D i n , c of the MEC after a latency time, otherwise, the system is in standby. The execution of the ST_CONTROLLER and the down counter are managed by the states S5 to S7 in the FSM every sampling period, while the states S8 and S9 manage the GSS_MEC MODULE and the reinitialization of the down counter when the optimization period has been reached. In order to know when the GSS_MEC module should be executed, the FSM reads the signal Z from the down counter in the state S4. When Z = ‘0’ this means that the optimization period has not yet elapsed and the FSM is currently executing the ST_CONTROLLER module, otherwise, when Z = ‘1’ the FSM executes one more time the GSS_MODULE and generates a new Q H 2 , p , m a x in function of the current value s i n . The down counter is reinitialized as well.
The most used arithmetic operations in the optimization algorithm are product, addition, division and square root. The hardware description was developed using standard VHDL and therefore the designs presented in this work do not belong to any manufacturer.

5.2. GSS Implementation

The digital architecture of the GSS optimization strategy, described in Algorithm 1, is depicted in Figure 10. The digital architecture of such algorithm is made up of registers, full adders, 8-bit embedded multipliers, multiplexers and full comparators using the previously mentioned fixed point format. Notice that the objective function shown in Equation (15) was programmed in the block Q H 2 , p . Its implementation needed a simplified representation with the objective to calculate the hydrogen productivity with few hardware resources and small latency time. By precalculating constant parameters and making a separation by variables the following objective function is obtained:
Q H 2 , p = β 1 x a * ( s i n , D i n ) β 2 μ a ( s * ( D i n ) ) + β 3 ,
where the values of constants β 1 , β 2 and β 3 are defined in Table 1.
The complete comparator that determines if f 1 > f 2 , in Algorithm 1, was designed taking into account that the operation involves real numbers and therefore the classical definition of a complete comparator of binary numbers is not sufficient for this implementation.

5.3. DTSTC Implementation

The digital architecture of the DTSTC (see Figure 11) is simpler than that one of the GSS algorithm. Although only combinational elements are required, its response speed is quite fast to generate the control action compared to the speed of change to generate the reference computed by the GSS algorithm.
The controller correction term σ 1 | ϵ | requires a digital circuit capable of computing the square root of the tracking error. Particularly in this work, the Pencil and Paper algorithm [30] proved to be very useful as a basis for the design of the SQRT arithmetic circuit.
The arithmetic circuit of the multiplier in the DTSTC architecture is based on the Coordinate Digital Computer Algorithm (CORDIC) with its rotating linear version (see Figure 12) [31], i.e.,:
x j + 1 = x j , y j + 1 = y j + σ j 2 j x j , z j + 1 = z j + σ j 2 j ,
with
σ j = 1 i f   z j 0 + 1 o t h e r w i s e .
The results obtained after a sequence of fixed micro-rotations are given in the following way:
x f = x i n , y f = y i n + x i n z i n z f = 0 .
The resulting operation y f in Equation (40) has the necessary shape to implement the DTSTC. As it can be seen in Equation (35), D i n , c can be calculated from the final result y f by these two arithmetic operations; i.e., the product and the addition. The CORDIC-based Multiplier Digital Circuit presented in the Figure 12 has the shape necessary to implement DTSTC without the need of using embedded multipliers in the FPGA and it has a short latency time.

6. Results

The feasibility of the FPGA-embedded optimization algorithm was demonstrated through numerical simulations. The MEC model (1)–(6) was simulated in Matlab, the ODEs were solved by the stiff solver ode15s. The parameters used in the numerical simulations are listed Table 2. In order to demonstrate the robustness of the optimization strategy proposed, modified parameters between ± 30 % from their nominal value were considered. The hardware required for the verification test is depicted in the Figure 13. As it can be seen, a serial communication was used to communicate the FPGA with Matlab, which was executed in a personal computer with Windows 10, Intel Core i7 and memory RAM DDR3 of 32 GB. In these conditions, six hours were needed to perform the verification test of the optimization algorithm in a Cyclone II FPGA running at f c l o c k = 50   MHz and a reception-transmission data rate of 70   Mbps . The operation time of the MEC simulated in the computer was of 200 d with a sampling period τ = 0.004   d . The hardware resources in the target board are summarized in Table 3.
The inlet acetate concentration s i n used to feed the MEC in the numerical simulations is depicted in Figure 14. The digital architecture verification test of the MEC optimization algorithm consists mainly in comparing the results obtained from the FPGA working with the fixed point format (16,24) with the results of the same algorithm executed in Matlab in a floating point representation format.
The resulting HPR obtained by executing the optimization algorithm both in the FPGA and in Matlab is shown in Figure 15. The green dashed-line represents the HPR by the MEC model, the red line represents the maximum HPR computed in Matlab, while the blue dashed-line represents the maximum HPR computed by the FPGA.
On the other hand, the dilution rate computed by the optimization algorithm both in the FPGA and in Matlab is shown in Figure 16. The green dashed-line represents the optimum dilution rate computed by the GSS algorithm, the red line represents the dilution rate computed by the DTSTC in Matlab, while the blue dashed-line represents the dilution rate computed by the DTSTC in the FPGA. As it can be seen, the numerical representation format used to design the optimizer’s digital architecture reduces properly the truncation error due to the finite number of bits.
Initially, the optimization algorithm requires eighteen days to reach the optimal point, as shown in Figure 15. The super-twisting controller requires this period for the control error to converge to zero using the gains specified in Table 4. In this transitory period, the GSS algorithm is initialized with 105 mL [ H 2 ] mL−1d−1 and this value was taken as the initial reference for the DTSTC.
Once the tracking error has converged to zero, the GSS algorithm reads the inlet acetate concentration value s i n , every optimization period equivalent to D i n , m a x 1 = 0.33 d to update the maximum productivity value Q H 2 , p m a x used as reference by the DTSTC.
The acetate concentration in the MEC is showed in the Figure 17. It is easy to see in Figure 18 and Figure 19 that the most of the acetate used to feed the MEC is consumed by the anodophilic bacteria x a because there is a inhibition process in the methanogenic bacteria growing x m . As expected, the current between the MEC electrodes is closely related to the HPR (see Figure 20).

6.1. Error Analysis

The truncation error in the digital architecture of the optimization algorithm is mainly due to the bits fixed quantity in the representation format established in this work. If the resolution in the intermediate operations required to run the optimization algorithm on the FPGA is not sufficient, the truncation error will propagate in such a way that the results obtained are greatly affected.
Figure 21 and Figure 22 show the behavior of the truncation error throughout the simulation process. It can be seen that the error is small enough to determine that the (16,24) format is sufficient to implement the optimization algorithm architecture in the FPGA.

6.2. Hardware Report

The FPGA hardware resources needed for embedding the digital architecture of the optimization algorithm on Figure 8 are summarized in Table 5. Only a 21% of the total logic elements (L.E.), 5.19% of dedicated logic registers (D.L.R.) and 64% of total eight-bits multipliers (8b-Mult.) in the chip Cyclone II were used. The input to output delay in the implementation was of 150 μs. The estimated power consumption required by the EP2C35F672C6 device using the aforementioned hardware resources is 146 mW. This estimate was calculated by the PowerPlay Early Power Estimator spreadsheet for Cyclone II family v8.0 SP1.
The hardware resources used by the most important functional blocks in the optimization algorithm are summarized in Table 6, Table 7 and Table 8. As it can be seen in Table 6 and Table 7, 64% of the total 8-b multipliers in the FPGA are used in the GSS algorithm, where 48.57% is destined to the Q H 2 , p functional block where the objective function defined by Equation (15) is processed. It should be pointed out that the Q H 2 , p block is part of the GSS algorithm functional block (see Figure 10). The GSS algorithm needs at least 4 cycles in the worse of the cases to reach the tolerance error (err = 0.001) defined by Equation (20). Therefore, embedded multipliers most be used in the GSS algorithm digital architecture to have a short latency time.
On the other hand, the hardware resources used in the DTSTC and its inner functional block, the CORDIC Multiplier, are summarized in Table 8 and Table 9. Most DTSTC inner operations are implemented using a CORDIC-based multiplier that has a latency time of 1.48 μs in the worse of the cases, before the tracking error converges to zero. After that, the multiplier is executed faster than 1.48 μs. It should be noted that the CORDIC-based multiplier internally uses an 8-bit expansion in the fractional part to substantially improve the truncation error generated by the fixed-point format considered (see Figure 22).
Finally, the arithmetic operation | ϵ | in the DTSTC is processed by the SQRT functional block, which is based on the Pencil and Paper algorithm. Its digital architecture is primarily based on bit additions and shifts. Table 10 shows the hardware resources needed.

7. Conclusions

In this work an FPGA-embedded optimization algorithm to maximize the hydrogen production rate (HPR) of a microbial electrolysis cell (MEC) using the golden section search (GSS) algorithm coupled to a discrete-time super-twisting controller (DTSTC) was presented. The correct performance of the GSS algorithm was analyzed analytically. Furthermore, it was proven that the relative degree of the MEC model is one, a necessary condition to use the DTSTC to bring the HPR to its maximum performance point in finite time.
To reduce the power consumption required to bring the MEC to its maximum performance, a digital architecture of the optimization algorithm was designed and embedded in an FPGA. Although the FPGA used in this work was the Cyclone II of ALTERA, the digital architectures presented in this work were designed to be implemented in any FPGA, regardless of the manufacturer.
The results of the FPGA-embedded optimization algorithm showed a correct performance with low hardware resources and low power consumption compared with a personal computer. Besides, the truncation error generated by the fixed point format used in this work was practically negligible.
Such results allow us to conclude that the implementation of control and optimization algorithms in FPGAs represents an excellent alternative to replace personal computers. Particularly, as demonstrated in the previous section, the FPGA-embedded optimization algorithm proposed to maximize the HPR in the MEC, represents a lower cost alternative in terms of consumed power and resources.

Author Contributions

Conceptualization, I.T.-Z.; methodology, I.T.-Z.; software, J.d.J.C.-R.; validation, I.T.-Z., M.A.I.-M. and V.A.-G.; formal analysis, J.d.J.C.-R., I.T.-Z., M.A.I.-M. and V.A.-G.; investigation, J.d.J.C.-R.; resources, I.T.-Z. and M.A.I.-M.; writing—original draft preparation, J.d.J.C.-R.; writing—review and editing, I.T.-Z., M.A.I.-M. and V.A.-G.; supervision, I.T.-Z. and V.A.-G.; project administration, I.T.-Z.; funding acquisition, I.T.-Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Mexican Council of Science and Technology (CONACyT) under the PhD Grant 614412/327289.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Acknowledgments

This study was funded by the University of Guanajuato and University of Guadalajara. It has been partially supported by the Mexican Council of Science and Technology (CONACyT) under Grant 614412/327289 and the National System of Researches (SNI) program.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Luo, G.; Xie, L.; Zou, Z.; Wang, W.; Zhou, Q. Exploring optimal conditions for thermophilic fermentative hydrogen production from cassava stillage. Int. J. Hydrogen Energy 2010, 35, 6161–6169. [Google Scholar] [CrossRef]
  2. Rupprecht, J. From systems biology to fuel—Chlamydomonas reinhardtii as a model for a systems biology approach to improve biohydrogen production. J. Biotechnol. 2009, 142, 10–20. [Google Scholar] [CrossRef] [PubMed]
  3. Maddy, J.; Cherryman, S.; Hawkes, F.; Hawkes, D.; Dinsdale, R.; Guwy, A.; Premier, G.; Cole, S. Hydrogen 2003: Report Number 1: ERDF Part-Funded Project Entitled: A Sustainable Energy Supply for Wales: Towards the Hydrogen Economy; University of Glamorgan: Wales, UK, 2003. [Google Scholar]
  4. Liu, H.; Grot, S.; Logan, B.E. Electrochemically assisted microbial production of hydrogen from acetate. Environ. Sci. Technol. 2005, 39, 4317–4320. [Google Scholar] [CrossRef] [PubMed]
  5. Sangeetha, T.; Muthukumar, M. Catholyte performance as an influencing factor on electricity production in a dual-chambered microbial fuel cell employing food processing wastewater. Energy Sources Part A Recover. Util. Environ. Eff. 2011, 33, 1514–1522. [Google Scholar] [CrossRef]
  6. Xing, D.; Yang, Y.; Li, Z.; Cui, H.; Ma, D.; Cai, X.; Gu, J. Hydrogen Production from Waste Stream with Microbial Electrolysis Cells. In Bioelectrosynthesis: Principles and Technologies for Value-Added Products; Wiley-VCH Verlag GmbH & Co.: Weinheim, Germany, 2020; pp. 39–70. [Google Scholar]
  7. Flores-Estrella, R.A.; de Jesús Garza-Rubalcava, U.; Haarstrick, A.; Alcaraz-González, V. A Dynamic Biofilm Model for a Microbial Electrolysis Cell. Processes 2019, 7, 183. [Google Scholar] [CrossRef] [Green Version]
  8. Zhen, G.; Lu, X.; Kumar, G.; Bakonyi, P.; Xu, K.; Zhao, Y. Microbial electrolysis cell platform for simultaneous waste biorefinery and clean electrofuels generation: Current situation, challenges and future perspectives. Prog. Energy Combust. Sci. 2017, 63, 119–145. [Google Scholar] [CrossRef]
  9. Nath, K.; Das, D. Improvement of fermentative hydrogen production: Various approaches. Appl. Microbiol. Biotechnol. 2004, 65, 520–529. [Google Scholar] [CrossRef] [PubMed]
  10. Torres Zúñiga, I.; Villa-Leyva, A.; Vargas, A.; Buitrón, G. Experimental validation of online monitoring and optimization strategies applied to a biohydrogen production dark fermenter. Chem. Eng. Sci. 2018, 190, 48–59. [Google Scholar] [CrossRef]
  11. Nath, K.; Das, D. Modeling and optimization of fermentative hydrogen production. Bioresour. Technol. 2011, 102, 8569–8581. [Google Scholar] [CrossRef]
  12. Verea, L.; Savadogo, O.; Verde, A.; Campos, J.; Ginez, F.; Sebastian, P. Performance of a microbial electrolysis cell (MEC) for hydrogen production with a new process for the biofilm formation. Int. J. Hydrogen Energy 2014, 39, 8938–8946. [Google Scholar] [CrossRef]
  13. Tartakovsky, B.; Mehta, P.; Santoyo, G.; Guiot, S. Maximizing hydrogen production in a microbial electrolysis cell by real-time optimization of applied voltage. Int. J. Hydrogen Energy 2011, 36, 10557–10564. [Google Scholar] [CrossRef] [Green Version]
  14. Liang, D.W.; Peng, S.K.; Lu, S.F.; Liu, Y.Y.; Lan, F.; Xiang, Y. Enhancement of hydrogen production in a single chamber microbial electrolysis cell through anode arrangement optimization. Bioresour. Technol. 2011, 102, 10881–10885. [Google Scholar] [CrossRef] [PubMed]
  15. Masmoudi, N.; Hachicha, M.; Kamoun, L. Hardware design of programmable fuzzy controller on fpga. In Proceedings of the FUZZ-IEEE’99, 1999 IEEE International Fuzzy Systems, Conference Proceedings (Cat. No. 99CH36315), Seoul, Korea, 22–25 August 1999; Volume 3, pp. 1675–1679. [Google Scholar]
  16. Obaid, Z.A.; Sulaiman, N.; Marhaban, M.; Hamidon, M. Analysis and performance evaluation of PD-like fuzzy logic controller design based on MATLAB and FPGA. Common Knowl. 2010, 10, 11. [Google Scholar]
  17. Zumel, P.; De Castro, A.; Garcia, O.; Riesgo, T.; Uceda, J. Concurrent and simple digital controller of an AC/DC converter with power factor correction. In Proceedings of the APEC, Seventeenth Annual IEEE Applied Power Electronics Conference and Exposition (Cat. No. 02CH37335), Dallas, TX, USA, 10–14 March 2002; Volume 1, pp. 469–475. [Google Scholar]
  18. Charaabi, L.; Monmasson, E.; Slama-Belkhodja, I. Presentation of an efficient design methodology for FPGA implementation of control systems. Application to the design of an antiwindup PI controller. In Proceedings of the IEEE 2002 28th Annual Conference of the Industrial Electronics Society, IECON 02, Seville, Spain, 5–8 November 2002; Volume 3, pp. 1942–1947. [Google Scholar]
  19. Chan, Y.F.; Moallem, M.; Wang, W. Design and implementation of modular FPGA-based PID controllers. IEEE Trans. Ind. Electron. 2007, 54, 1898–1906. [Google Scholar] [CrossRef]
  20. Krim, S.; Gdaim, S.; Mtibaa, A.; Faouzi Mimouni, M. FPGA-based real-time implementation of a direct torque control with second-order sliding mode control and input–output feedback linearisation for an induction motor drive. IET Electr. Power Appl. 2020, 14, 480–491. [Google Scholar] [CrossRef]
  21. Lúa, C.A.; Di Gennaro, S.; Guzman, A.N.; Ortega-Cisneros, S.; Domínguez, J.R. Digital implementation via FPGA of controllers for active control of ground vehicles. IEEE Trans. Ind. Inform. 2019, 15, 2253–2264. [Google Scholar] [CrossRef]
  22. Ngo, H.Q.T.; Nguven, H.D.; Truong, Q.V. A Design of PID Controller Using FPGA-Realization for Motion Control Systems. In Proceedings of the 2020 International Conference on Advanced Computing and Applications (ACOMP), Quy Nhon, Vietnam, 25–27 November 2020; pp. 150–154. [Google Scholar]
  23. Flores-Estrella, R.; Rodríguez-Valenzuela, G.; Ramírez-Landeros, J.; Alcaraz-González, V.; González-Álvarez, V. A simple microbial electrochemical cell model and dynamic analysis towards control design. Chem. Eng. Commun. 2020, 207, 493–505. [Google Scholar] [CrossRef]
  24. Kato Marcus, A.; Torres, C.I.; Rittmann, B.E. Conduction-based modeling of the biofilm anode of a microbial fuel cell. Biotechnol. Bioeng. 2007, 98, 1171–1182. [Google Scholar] [CrossRef] [PubMed]
  25. Nocedal, J.; Wright, S. Numerical Optimization; Springer Science & Business Media: New York, NY, USA, 2006. [Google Scholar]
  26. Akhtaruzzaman, M.; Shafie, A.A. Geometrical substantiation of Phi, the golden ratio and the baroque of nature, architecture, design and engineering. Int. J. Arts 2011, 1, 1–22. [Google Scholar] [CrossRef] [Green Version]
  27. Koupaei, J.A.; Hosseini, S.M.M.; Ghaini, F.M. A new optimization algorithm based on chaotic maps and golden section search method. Eng. Appl. Artif. Intell. 2016, 50, 201–214. [Google Scholar] [CrossRef]
  28. Khalil, H.K.; Grizzle, J.W. Nonlinear Systems; Prentice Hall: Upper Saddle River, NJ, USA, 2002; Volume 3. [Google Scholar]
  29. Shtessel, Y.; Edwards, C.; Fridman, L.; Levant, A. Sliding Mode Control and Observation; Springer: New York, NY, USA, 2014. [Google Scholar]
  30. Behrooz, P. Computer Arithmetic: Algorithms and Hardware Designs; Oxford University Press: Oxford, UK, 2000; Volume 19, p. 512583. [Google Scholar]
  31. Ercegovac, M.D.; Lang, T. Digital Arithmetic; Elsevier: Amsterdam, The Netherlands, 2004. [Google Scholar]
Figure 1. Schematic diagram of the MEC.
Figure 1. Schematic diagram of the MEC.
Processes 09 01111 g001
Figure 2. MEC hydrogen productivity rate in steady state on the operating region.
Figure 2. MEC hydrogen productivity rate in steady state on the operating region.
Processes 09 01111 g002
Figure 3. Optimization scheme of the MEC.
Figure 3. Optimization scheme of the MEC.
Processes 09 01111 g003
Figure 4. The golden ratio.
Figure 4. The golden ratio.
Processes 09 01111 g004
Figure 5. Eigen values of the MEC model (1)–(3) linearized in the operating region.
Figure 5. Eigen values of the MEC model (1)–(3) linearized in the operating region.
Processes 09 01111 g005
Figure 6. Hydrogen productivity for different s i n .
Figure 6. Hydrogen productivity for different s i n .
Processes 09 01111 g006
Figure 7. Derivative of Q H 2 , p respect to D i n .
Figure 7. Derivative of Q H 2 , p respect to D i n .
Processes 09 01111 g007
Figure 8. FPGA-based implementation of the hydrogen optimization algorithm.
Figure 8. FPGA-based implementation of the hydrogen optimization algorithm.
Processes 09 01111 g008
Figure 9. FSM_CONT_MEC module in the FPGA-based optimization algorithm.
Figure 9. FSM_CONT_MEC module in the FPGA-based optimization algorithm.
Processes 09 01111 g009
Figure 10. Digital architecture of the GSS algorithm.
Figure 10. Digital architecture of the GSS algorithm.
Processes 09 01111 g010
Figure 11. Digital architecture of the DTSTC.
Figure 11. Digital architecture of the DTSTC.
Processes 09 01111 g011
Figure 12. Digital architecture of the linear vectoring CORDIC.
Figure 12. Digital architecture of the linear vectoring CORDIC.
Processes 09 01111 g012
Figure 13. Implementation scheme for numerical simulation tests.
Figure 13. Implementation scheme for numerical simulation tests.
Processes 09 01111 g013
Figure 14. Inlet Acetate concentration ( s i n ).
Figure 14. Inlet Acetate concentration ( s i n ).
Processes 09 01111 g014
Figure 15. Q H 2 , p m a x results in Matlab and FPGA.
Figure 15. Q H 2 , p m a x results in Matlab and FPGA.
Processes 09 01111 g015
Figure 16. Dilution rate ( D i n , c ) generated by FPGA and Matlab.
Figure 16. Dilution rate ( D i n , c ) generated by FPGA and Matlab.
Processes 09 01111 g016
Figure 17. Acetate concentration s in the MEC.
Figure 17. Acetate concentration s in the MEC.
Processes 09 01111 g017
Figure 18. Anodophilic biomass concentration x a in the MEC.
Figure 18. Anodophilic biomass concentration x a in the MEC.
Processes 09 01111 g018
Figure 19. Methanogenic biomass concentration x m in the MEC.
Figure 19. Methanogenic biomass concentration x m in the MEC.
Processes 09 01111 g019
Figure 20. Current intensity in the MEC.
Figure 20. Current intensity in the MEC.
Processes 09 01111 g020
Figure 21. Truncation error in GSS algorithm implementation.
Figure 21. Truncation error in GSS algorithm implementation.
Processes 09 01111 g021
Figure 22. Truncation error in DTSTC implementation.
Figure 22. Truncation error in DTSTC implementation.
Processes 09 01111 g022
Table 1. Constant parameters in Q H 2 , p .
Table 1. Constant parameters in Q H 2 , p .
Constant ParameterValue
β12.1906 × 10−8
β2316.825
β340
Table 2. MEC Model parameter with uncertainties.
Table 2. MEC Model parameter with uncertainties.
DescriptionSymbolValueVariation (%)
Gas ideal constant (J mol−1K−1)R8.310.00
Faraday constant (C mol−1e−1)F96,4850.00
Temperature (K)T298.15−20.00
Yield coefficient (mg (s) mg−1 ( x a ) ) k a 0.667+15.00
Yield coefficient (mg (s) mg−1 ( x m ) ) k m 4.7067−20.00
Microbial decay (d−1) k d , a 0.05 μ m a x , a +5.00
Microbial decay (d−1) k d , m 0.05 μ m a x , m +2.00
Biofilm retention constant of x a α a 0.5+12.00
Biofilm retention constant of x m α m 0.5+5.00
Maximum grown rate (d−1) μ m a x , a 1.97+28.00
Maximum grown rate (d−1) μ m a x , a 0.30+ 14.00
Half-rate constant (mg (s) L−1) k s , a 20+15.00
Half-rate constant (mg (s) L−1) k s , m 80−15.00
Local potential (V) η 0.3+10.00
Table 3. Specifications of the FPGA ALTERA DE2.
Table 3. Specifications of the FPGA ALTERA DE2.
DeviceDigital ElementsTotal Resources
Logic Elements (L.E.)33,216
Registers3967
EP2C35F672C6Number of pins475
Embedded Multipliers70
RAM bits (Kb)4
PLLs4
f m a x , C L K 120 MHz
FPGARS-232 transceiver and 9-pin connector120 Kbits/s
Expansion Headerstwo 40-pin
Toggle switches18
Push button switches4
Table 4. Discrete time super-twisting controller gains.
Table 4. Discrete time super-twisting controller gains.
GainValue
ρ 1 0.09
ρ 2 0.19
Table 5. Hardware resources used by the optimization algorithm.
Table 5. Hardware resources used by the optimization algorithm.
Digital ElementsResourcesUsed%
Total L.E. 708921.34%
Register only33,2162910.87%
LUT/Register 14724.43%
D.L.R. 17245.19%
M4K483,34000.00%
8b-Mult.704564.00%
I-O delay (No. cycles)50 MHz7500150 μs
Table 6. Hardware resources used by GSS algorithm.
Table 6. Hardware resources used by GSS algorithm.
Digital ElementsResourcesUsed%
Total L.E. 584917.60%
Register only33,2161910.57%
LUT/Register 10443.14%
D.L.R. 12353.71%
8b-Mult.704564.00%
I-O delay (No. cycles)50 MHz7500150 μs
Table 7. Hardware resources used by Q H 2 , p block.
Table 7. Hardware resources used by Q H 2 , p block.
Digital ElementsResourcesUsed%
Total L.E. 518015.59%
Register only33,2161830.55%
LUT/Register 7272.18%
D.L.R. 9102.74%
8b-Mult.703448.57%
I-O delay (No. cycles)50 MHz2494.97 μs
Table 8. Hardware resources used by DTSTC algorithm.
Table 8. Hardware resources used by DTSTC algorithm.
Digital ElementsResourcesUsed%
Total L.E. 11653.51%
Register only33,2161000.30%
LUT/Register 3741.13%
D.L.R. 4731.42%
8b-Mult.7000.00%
I-O delay (No. cycles)50 MHz2004 μs
Table 9. Hardware resources used by CORDIC multiplier.
Table 9. Hardware resources used by CORDIC multiplier.
Digital ElementsResourcesUsed%
Total L.E. 9002.70%
Register only33,216990.30%
LUT/Register 2190.66%
D.L.R. 3000.90%
8b-Mult.7000.00%
I-O delay (No. cycles)50 MHz741.48 μs
Table 10. Hardware resources used by SQRT.
Table 10. Hardware resources used by SQRT.
Digital ElementsResourcesUsed%
Total L.E. 1530.46%
Register only33,21610.00%
LUT/Register 890.26%
D.L.R. 900.27%
8b-Mult.7000.00%
I-O delay (No. cycles)50 MHz741.3 μs
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Colín-Robles, J.d.J.; Torres-Zúñiga, I.; Ibarra-Manzano, M.A.; Alcaraz-González, V. FPGA-Based Implementation of an Optimization Algorithm to Maximize the Productivity of a Microbial Electrolysis Cell. Processes 2021, 9, 1111. https://0-doi-org.brum.beds.ac.uk/10.3390/pr9071111

AMA Style

Colín-Robles JdJ, Torres-Zúñiga I, Ibarra-Manzano MA, Alcaraz-González V. FPGA-Based Implementation of an Optimization Algorithm to Maximize the Productivity of a Microbial Electrolysis Cell. Processes. 2021; 9(7):1111. https://0-doi-org.brum.beds.ac.uk/10.3390/pr9071111

Chicago/Turabian Style

Colín-Robles, José de Jesús, Ixbalank Torres-Zúñiga, Mario A. Ibarra-Manzano, and Víctor Alcaraz-González. 2021. "FPGA-Based Implementation of an Optimization Algorithm to Maximize the Productivity of a Microbial Electrolysis Cell" Processes 9, no. 7: 1111. https://0-doi-org.brum.beds.ac.uk/10.3390/pr9071111

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