# Fuzzy Integral Sliding Mode Control Based on Microbial Fuel Cell

Authors: Lei Lian; Peng Ji; Tianyu OuYang; Fengying Ma; Shanwen Xu; Chao Gao; Jing Liu
Journal: Complexity
 (2021)

---

## Abstract

Microbial fuel cell (MFC) is a renewable clean energy. Microorganisms are used as catalysts to convert the chemical energy of organic matter in the sewage into electrical energy to realize sewage treatment and recover energy at the same time. It has good development prospects. However, the output power of MFC is affected by many factors, and it is difficult to achieve a stable voltage output. For the control-oriented single-chamber MFC, a fuzzy integral sliding mode control is designed. The continuous adjustment of the sliding surface ensures that the system only moves on the sliding surface, which eliminates the arrival stage and improves robustness. For chattering existing in the system, the control scheme is further optimized to obtain fuzzy integral sliding mode control, and the fuzzy module adaptively adjusts the control parameters according to the system state, which effectively reduces the system chattering. Experiments prove that the control scheme reduces chattering while ensuring the stable output of the system.


---

## Body

## 1. Introduction

The extensive use of fossil energy has caused increasingly serious environmental problems. At the same time, mankind is also facing an energy crisis. In recent years, environmental issues have received widespread attention, and mankind is speeding up the development of new energy sources to delay such issues [1, 2]. At the same time, a large number of existing renewable resources have been put into use, such as wind energy and solar energy [3]. As a new type of energy, microbial fuel cells (MFCs) have been extensively studied in recent years [4]. Human beings produce a large amount of sewage every day, and the cost of treating this sewage is high and consumes a lot of electricity. According to research, under ideal conditions, the removal rate of chemical oxygen demand (COD) from sewage of MFCs can reach 97%, and the conversion efficiency of chemical energy to electricity is also quite excellent. It is especially suitable for sewage with high COD content such as domestic sewage and beer wastewater [5, 6]. At the same time, a variety of microorganisms can work together to maximize the efficiency of electricity production. In recent years, the research results of MFCs have been remarkable, and the output power has increased significantly, providing a solution to the current energy crisis.MFC power generation is affected by many factors such as system design and external conditions. Realizing the stable voltage output of the MFC system and increasing the battery output power is an important topic affecting the practical application of MFCs. The research of MFC mainly focuses on internal battery structure optimization, material development, microbial separation, and external control [7–10]. MFC control mainly includes voltage control, maximum power point tracking, and control modeling. Unlike other batteries, MFCs cannot increase voltage and power through ordinary series and parallel connections, and internal uncertainties lead to unbalanced power distribution of each power supply voltage impossible to avoid. Khaled et al. [11] designed a battery management system to obtain the best power output from the MFCs connected in series. Boghnai et al. designed a gain scheduling control strategy to achieve one of the MFCs with different power performance through a low-cost microcontroller. Shi et al. designed a maximum power tracking method based on particle swarm optimization to realize maximum power tracking when the external load changes. These studies are of great significance for the battery to achieve greater power output, but how to ensure a stable voltage output is still an urgent problem to be solved.Various uncertain factors in the operation of MFCs will have a great impact on the voltage output, and its long-term operation characteristics make the interference more complicated [12–15]. At present, various control methods are applied to MFCs to achieve stable voltage output. Abul et al. proposed a control-oriented MFC model using state space representation, which improves the efficiency of MATLAB simulation based on this model [16]. An et al. [17] proposed a dynamic performance analysis and neural network predictive control method. Compared with the PID control method, the dynamic performance of the system is greatly improved. An et al. [18] designed an adaptive feedback control technology to ensure the robustness of the adaptive controller, and the tracking error convergence is used to maintain moderate disturbances in the form of time-varying parameters; Patel and Deb [19] proposed a single-chamber MFC adaptive backstepping control. The control method enables the MFC to provide satisfactory performance when the parameters are uncertain. Luo et al. proposed a feedforward fuzzy logic PID-based MFC strategy nonlinear performance analysis and voltage control and introduced a fuzzy logic system to improve the robustness and tracking accuracy of the system [20].The existence of system chattering will cause damage to the system structure and even loss of stability. This paper proposes a fuzzy integral sliding mode control method based on MFC. Fuzzy control has the ability to adapt to the changes of bioelectrochemical and reaction kinetics characteristics of controlled objects. This hybrid model combines the advantages of sliding mode control and fuzzy control to avoid the process of the system reaching the sliding surface, which uses the strong robustness of fuzzy control to realize the adaptive adjustment of the control variable dilution rate and reduce the impact of external interference on the system output in the actual control process and the serious chattering problem of ordinary sliding mode control. The structure of this paper is as follows: Section2 introduces the control-oriented model of MFC, Section 3 introduces the integral sliding mode control, Section 4 introduces the fuzzy integral sliding mode control, Section 5 carries on the simulink simulation and experiment, and Section 6 summarizes the control effect and advantages of this method.


## 2. Working Principle and Model of MFC

### 2.1. Working Principle of MFC

MFCs use electricity-producing anaerobes as biocatalysts to convert the chemical energy of organic matter in sewage into electrical energy. While generating electricity, it also has a better sewage treatment effect. MFCs have high conversion efficiency and a wide range of applications. There are no strict requirements on temperature, PH, etc. MFCs are divided into single chamber and double chamber. The double-chamber MFC includes an anode cathode proton exchange membrane and an external circuit. The organic matter in the water is decomposed by anaerobic bacteria at the anode to produce hydrogen ions and electrons. The hydrogen ions pass through the proton exchange. The membrane enters the cathode, and the electrons flow to the cathode through the external circuit, where they combine with hydrogen ions to generate water and generate electricity. The single-chamber MFC uses an air cathode, with a proton exchange membrane covering the cathode or no proton exchange membrane. A typical single-chamber MFC is shown in Figure1. When acetate is used as a substrate, the main chemical reactions are(1)CH3COO−+4H2O⟶2HCO3−+9H++8e−O2+4H++4e−⟶2H2OFigure 1
Single-chamber MFC structure.


### 2.2. MFC Model

The microbial fuel cell control model converts the complex internal structure into a set of easy-to-controllable equations. On this basis, various control methods of microbial fuel cells can be tested to evaluate the influence of various parameters on the output voltage. To make corrections, this article uses a fuzzy integral sliding mode control method for the control-oriented model of a single-chamber membraneless microbial fuel cell to greatly eliminate the influence of disturbance on the output voltage.This model was proposed by Abul in 2016. By studying the biological and electrochemical dynamics of microbial fuel cells, some unimportant variables in the model are simplified to constants and expressed by state space equations, aiming at the changes of various internal parameters of the fuel cell. The dilution rateu is controlled to adjust the output voltage of the microbial fuel cell, where the microbial concentration, substrate concentration, HCO3− concentration, and H+ concentration are expressed as(2)x˙1=−qmaxx1KS+x1x2+uS0−x1,x˙2=μmaxx1KS+x1−b−ux2,x˙3=2qmaxx1KS+x1x2−uS0−x1,x˙4=9qmaxx1KS+x1x2−uS0−x1.Among them,qmax is the maximum substrate utilization rate, which is used to characterize the ratio of the maximum value of organic matter decomposed by the power generating anaerobic bacteria to the initial value of the substrate. In this model, its value is 3.6/day, and μmax represents the maximum growth rate of microorganisms. The system recognizes that it is 0.4/day, Ks is the half-saturation constant, and its value is 32.4 mg/L, which is the substrate concentration when the growth rate is half of the maximum specific growth rate μmax.The open circuit potential of the anode and cathode can be expressed by the following formula:(3)Va=Ea−EL,a=E0a−RTn1Flnx1x32x49−EL,a,Vc=Ec−EL,c=E0c−RTn2Fln10.2x42−EL,c.The subscriptsa and c in the above formula represent the cathode and anode, respectively, F is the Faraday constant, and T is the temperature, and the standard value T = 298.15. EL,a and EL,c represent the internal losses of the anode and cathode, respectively, and the values are 0.15 V and 1.019 V identified by the system.


### 2.3. Control-Oriented Model

In Abul’s model, the changes in the main factorsCs, X, HCO3−, and H in the microbial fuel cell, as well as the potentials Va and Vc of the cathode and anode, are obtained. To further consider the control-oriented model, we need to synthesize the model. Based on the state space model, we get(4)V=Vc−Va=En−Rnlnx1x32x49+2ln10.2x44,where En and Rn are constants. In the model, we get(5)x˙4=4.5x˙3.Considering that there is almost noHCO3− and H+ in the anode during the initial operation. According to the model, we can approximately estimate the concentration of H+ based on the concentration of HCO3−, expressed as(6)x4=4.5x3.Substituting formula (6) into (4) to further simplify, the output is expressed as(7)Vt=En−Rnln,x1px319=En−Rmlnx1−19lnx3,where En = 0.247, Rm = 0.0032, and p = 5.09 × 109. At this time, through (7) we obtain the voltage state equation as(8)V˙=f1x1,x2−uf2x1,x3,where(9)f1x1,x2=Rmqmaxx2Ks+x1+38Rmqmaxx1x2x3Ks+x1,f2x1,x3=uRmS0−x1x1+38uRmS0−x1x3.Through analysis, we established a control-oriented voltage state model. The following control will be further developed based on model (8).


## 2.1. Working Principle of MFC

MFCs use electricity-producing anaerobes as biocatalysts to convert the chemical energy of organic matter in sewage into electrical energy. While generating electricity, it also has a better sewage treatment effect. MFCs have high conversion efficiency and a wide range of applications. There are no strict requirements on temperature, PH, etc. MFCs are divided into single chamber and double chamber. The double-chamber MFC includes an anode cathode proton exchange membrane and an external circuit. The organic matter in the water is decomposed by anaerobic bacteria at the anode to produce hydrogen ions and electrons. The hydrogen ions pass through the proton exchange. The membrane enters the cathode, and the electrons flow to the cathode through the external circuit, where they combine with hydrogen ions to generate water and generate electricity. The single-chamber MFC uses an air cathode, with a proton exchange membrane covering the cathode or no proton exchange membrane. A typical single-chamber MFC is shown in Figure1. When acetate is used as a substrate, the main chemical reactions are(1)CH3COO−+4H2O⟶2HCO3−+9H++8e−O2+4H++4e−⟶2H2OFigure 1
Single-chamber MFC structure.


## 2.2. MFC Model

The microbial fuel cell control model converts the complex internal structure into a set of easy-to-controllable equations. On this basis, various control methods of microbial fuel cells can be tested to evaluate the influence of various parameters on the output voltage. To make corrections, this article uses a fuzzy integral sliding mode control method for the control-oriented model of a single-chamber membraneless microbial fuel cell to greatly eliminate the influence of disturbance on the output voltage.This model was proposed by Abul in 2016. By studying the biological and electrochemical dynamics of microbial fuel cells, some unimportant variables in the model are simplified to constants and expressed by state space equations, aiming at the changes of various internal parameters of the fuel cell. The dilution rateu is controlled to adjust the output voltage of the microbial fuel cell, where the microbial concentration, substrate concentration, HCO3− concentration, and H+ concentration are expressed as(2)x˙1=−qmaxx1KS+x1x2+uS0−x1,x˙2=μmaxx1KS+x1−b−ux2,x˙3=2qmaxx1KS+x1x2−uS0−x1,x˙4=9qmaxx1KS+x1x2−uS0−x1.Among them,qmax is the maximum substrate utilization rate, which is used to characterize the ratio of the maximum value of organic matter decomposed by the power generating anaerobic bacteria to the initial value of the substrate. In this model, its value is 3.6/day, and μmax represents the maximum growth rate of microorganisms. The system recognizes that it is 0.4/day, Ks is the half-saturation constant, and its value is 32.4 mg/L, which is the substrate concentration when the growth rate is half of the maximum specific growth rate μmax.The open circuit potential of the anode and cathode can be expressed by the following formula:(3)Va=Ea−EL,a=E0a−RTn1Flnx1x32x49−EL,a,Vc=Ec−EL,c=E0c−RTn2Fln10.2x42−EL,c.The subscriptsa and c in the above formula represent the cathode and anode, respectively, F is the Faraday constant, and T is the temperature, and the standard value T = 298.15. EL,a and EL,c represent the internal losses of the anode and cathode, respectively, and the values are 0.15 V and 1.019 V identified by the system.


## 2.3. Control-Oriented Model

In Abul’s model, the changes in the main factorsCs, X, HCO3−, and H in the microbial fuel cell, as well as the potentials Va and Vc of the cathode and anode, are obtained. To further consider the control-oriented model, we need to synthesize the model. Based on the state space model, we get(4)V=Vc−Va=En−Rnlnx1x32x49+2ln10.2x44,where En and Rn are constants. In the model, we get(5)x˙4=4.5x˙3.Considering that there is almost noHCO3− and H+ in the anode during the initial operation. According to the model, we can approximately estimate the concentration of H+ based on the concentration of HCO3−, expressed as(6)x4=4.5x3.Substituting formula (6) into (4) to further simplify, the output is expressed as(7)Vt=En−Rnln,x1px319=En−Rmlnx1−19lnx3,where En = 0.247, Rm = 0.0032, and p = 5.09 × 109. At this time, through (7) we obtain the voltage state equation as(8)V˙=f1x1,x2−uf2x1,x3,where(9)f1x1,x2=Rmqmaxx2Ks+x1+38Rmqmaxx1x2x3Ks+x1,f2x1,x3=uRmS0−x1x1+38uRmS0−x1x3.Through analysis, we established a control-oriented voltage state model. The following control will be further developed based on model (8).


## 3. Integral Sliding Mode Control

Sliding mode control itself is a kind of nonlinear control. The purpose is to design a sliding surface so that the system always tends to move on the sliding surface under the drive of deviation or deviation derivative. The design of the sliding mode surface is only related to the deviation, which determines that the sliding mode control can better deal with parameter changes and external disturbances. Sliding mode control based on deviation design is more sensitive to deviation changes. In the actual control action, it often produces vibration, which causes the system to always slide up and down on the sliding mode surface.The microbial fuel cell system has a complex structure and is driven by microorganisms, so it is susceptible to external disturbances to produce steady-state errors. Design an integral sliding mode control applied to microbial fuel cells to enhance the system's anti-interference ability and ensure the stable output of the system voltage. First set a system with disturbance as(10)V˙=f1x1,x2−uf2x1,x3+d,where d is the external interference, which changes with time, and dt≤0.1. The deviation and the sliding mode surface of integral sliding mode control can be expressed as(11)e=V−V∗,(12)s=ae+k∫−∞tedt,where V∗ is the ideal control and both a and k are constants, a,k > 0. In the integral term of the sliding surface, in order to ensure that the system is always on the sliding surface (12), when t=0,s=0, the following exists:(13)0=ae+k∫−∞0edt.Solve (13) to get(14)e0=∫−∞0edt=−ake.SetV∗ to be a constant, and the partial derivative of the deviation by (10) and (11) is(15)e˙=V˙−V˙∗=f1x1,x2−uf2x1,x3+d.Choose to use the Lyapunov functionVL=0.5s2, and verify as follows:(16)V˙L=ss˙=sae˙+e−e0<0.The sliding mode control selects the exponential approach rates˙=−cs, and we get(17)ae˙+e−e0=−cae−ck∫−∞tedt.Substitute (14) and (15) into (17) to get(18)u=−cae−ck∫−∞tedt−V+V∗+e0−af1x1,x2−af2x1,x3,through the Lyapunov stability verification, a control that can stabilize the system is obtained. The experimental part will verify the control effect.


## 4. Fuzzy Integral Sliding Mode Control

Fuzzy control is a control method that uses fuzzy set theory to express the characteristics of human intelligence and fuzziness in a language that can be understood by computers, so that it can describe, study, and process fuzzy things [21–23]. This paper further optimizes the integral sliding mode control to make the output voltage more stable and further reduces the possibility that the strong chattering generated by the integral sliding mode control will excite the high frequency in the system as a modeling dynamic, leading to the collapse of the control system. Design a fuzzy integral sliding mode control method, according to the size of the error e, combined with the advantages of fuzzy control with low dependence on the mathematical model and good timeliness and robustness, adjust the adaptive parameter k to achieve stable output, and eliminate the effect of chattering. Figure 2 is the system block diagram under the action of fuzzy integral sliding mode control. In integral sliding mode control, fuzzy control is introduced. The fuzzy module analyzes the feedback error and error rate of change, according to the design rules, adaptively adjusts the sliding mode surface parameters, and further optimizes the control to realize the stable output of the system.Figure 2
Block diagram of fuzzy integral sliding mode control.


### 4.1. Establishment of Membership Function

Establish the absolute value of the fuzzy input variablee, set the domain to [0, 0.2], and the fuzzy subset to NB (negative large), NM (negative medium), NS (negative small), O (0), PS(positive small), PM (positive middle), and PB (positive large); establish the first-order partial derivative of the input variable e, the domain is [−0.35, 0.35], the fuzzy subset is NB (negative large), NM (negative medium), NS (negative small), O (0), PS (positive small), PM (positive middle), and PB (positive large); and establish the fuzzy output variable k, the domain is [100, 10000], the fuzzy subset is NB (Negative large), NM (negative medium), NS (negative small), O (0), PS (positive small), PM (positive middle), and PB (positive large). Among them, the absolute value of the input error e and the output adaptive parameter k both use a triangular membership function, and de uses both a triangular membership function and a trapezoidal membership function for fuzzification.


### 4.2. Formulation of Fuzzy Rules

According to the adaptive parameterk, which should meet the requirements of output voltage stability and chatter reduction at the same time, the fuzzy rules are set according to the size of the error and the error rate of change, and the fuzzy rules are formulated based on the following premises:(1)
When the system error is large, if the error rate of change is large at this time, the system has a stronger tendency to deviate from the normal output value. Therefore, the adaptive parameterk should be increased to make the system quickly approach the given target value.(2)
When the system error is medium, if the error rate of change is medium at this time, the system has a slightly weaker tendency to deviate from the normal output value, and a slightly lower adaptive parameterk should be selected to meet the requirement of a faster approach to the given value.(3)
When the system error is small, at this time, if the error rate of change is small, the system is close to the normal output value, and a lower adaptive parameterk should be selected to make the system as close to the given target value as possible while reducing the impact of chattering on system stability.The design fuzzy rules are shown in Table1.Table 1
Fuzzy control rule.
dekNBNSOPSPBeNBNBNBNBNSNSNSNBNBNSNSOONBNSOOPSPSPSOPSPSPBPBOPSPBPBPB


## 4.1. Establishment of Membership Function

Establish the absolute value of the fuzzy input variablee, set the domain to [0, 0.2], and the fuzzy subset to NB (negative large), NM (negative medium), NS (negative small), O (0), PS(positive small), PM (positive middle), and PB (positive large); establish the first-order partial derivative of the input variable e, the domain is [−0.35, 0.35], the fuzzy subset is NB (negative large), NM (negative medium), NS (negative small), O (0), PS (positive small), PM (positive middle), and PB (positive large); and establish the fuzzy output variable k, the domain is [100, 10000], the fuzzy subset is NB (Negative large), NM (negative medium), NS (negative small), O (0), PS (positive small), PM (positive middle), and PB (positive large). Among them, the absolute value of the input error e and the output adaptive parameter k both use a triangular membership function, and de uses both a triangular membership function and a trapezoidal membership function for fuzzification.


## 4.2. Formulation of Fuzzy Rules

According to the adaptive parameterk, which should meet the requirements of output voltage stability and chatter reduction at the same time, the fuzzy rules are set according to the size of the error and the error rate of change, and the fuzzy rules are formulated based on the following premises:(1)
When the system error is large, if the error rate of change is large at this time, the system has a stronger tendency to deviate from the normal output value. Therefore, the adaptive parameterk should be increased to make the system quickly approach the given target value.(2)
When the system error is medium, if the error rate of change is medium at this time, the system has a slightly weaker tendency to deviate from the normal output value, and a slightly lower adaptive parameterk should be selected to meet the requirement of a faster approach to the given value.(3)
When the system error is small, at this time, if the error rate of change is small, the system is close to the normal output value, and a lower adaptive parameterk should be selected to make the system as close to the given target value as possible while reducing the impact of chattering on system stability.The design fuzzy rules are shown in Table1.Table 1
Fuzzy control rule.
dekNBNSOPSPBeNBNBNBNBNSNSNSNBNBNSNSOONBNSOOPSPSPSOPSPSPBPBOPSPBPBPB


## 5. Simulation and Experiment

The integral sliding mode control has strong robustness to ensure that the system can track the given signal accurately and quickly. The fuzzy control is used to adaptively adjust the parameters of the sliding mode surface, and the approach rate is continuously adjusted to reduce chattering. In this section, simulink will be used in conjunction with specific parameters to verify the effectiveness of the control method. The constants in the MFC model are introduced in Section2. Set the parameters a=100,c=5,andk=1000 in the integral sliding mode control. The fuzzy control parameters are given in Section 4.Set the reference voltage to 0.5 V, and the tracking effect of the control scheme is shown in Figure3. Both control schemes can basically control the error within 10 mv. In the initial stage, a large error causes a rapid increase in the control quantity, ensuring that the system reaches the reference target faster. The two control schemes behave differently after the voltage becomes stable. Integral sliding mode control has strong chattering, and the scheme based on fuzzy control can effectively reduce chattering. This is because regardless of the magnitude of the deviation, the integral control in the integral sliding mode control always forces the system to slide continuously with higher energy. Using fuzzy control to adaptively adjust the parameter k can effectively reduce the influence of the integral action. Especially when the deviation is small, the system can only slide under the action of equivalent control, which reduces the switching frequency of control u and directly reduces system chattering. The control input is shown in Figure 4. The switching frequency of the control input directly affects the control effect of the system.Figure 3
The control effect of (a) integral sliding mode control and (b) fuzzy integral sliding mode control.
(a)(b)Figure 4
The control input of (a) integral sliding mode control and (b) fuzzy integral sliding mode control.
(a)(b)The fuzzy integral sliding mode control takes the absolute value of the deviation and its rate of change as the basis for system correction. The specific changes are shown in Figure5. After running for 2 hours, the error is controlled within 15 mv, and the error deviation is changed within (−0.25, 0.25). Multiple inputs help the fuzzy system achieve a more accurate output for the system state. Our goal is to ensure that the chattering is reduced as much as possible while the error is small. The purpose of adaptively adjusting the control input is achieved by changing the parameter k. The output k of the fuzzy control module is shown in Figure 6. The spike in the k value is due to the violent response of the control system caused by the large deviation. When the deviation is small, k is stable at about 200, and the system reaches the ideal output more smoothly on the sliding surface.Figure 5
Reference input for fuzzy systems: (a) magnitude of deviation and (b) the first derivative of the magnitude of the deviation.
(a)(b)Figure 6
Output of the fuzzy control module.The design of the integral initial value in the control scheme ensures that the system is always on the sliding mode surface, eliminating the intermediate process of the system reaching the sliding mode surface, and obtaining better transient performance while maintaining the tracking accuracy of traditional integral sliding mode control. Figure7 shows the change of the initial value e0 in different control schemes, and the initial value of fuzzy control is added to show a smoother change. The setting of the initial value has a direct relationship with the deviation and k, which can reflect the changes of the system control input and system output to a certain extent.Figure 7
The variation ofe0 under the action of (a) integral sliding mode control and (b) fuzzy integral sliding mode control.
(a)(b)


## 6. Conclusions

Sliding mode control causes obvious chattering in the system, and reducing chattering is of great significance to the application of control systems. This paper designs a fuzzy integral sliding mode control method for the MFC, combining the advantages of the approaching stage of the integral sliding mode control and the fuzzy sliding mode control. It can be seen from the simulation results that the integral sliding mode control has a good effect on stable voltage output when external disturbance is applied, but its chattering is strong, and the voltage output fluctuation is slightly worse. When fuzzy control is used to adjust the adaptive parameterk, the system chattering is significantly reduced, and the output is also well improved. The simulation results verify the effectiveness of the method.



---

*Source: 6670039-2021-01-20.xml*