Interval Type-2 Fuzzy Observers Applied in Biodegradation

There exist processes difficult to control because of the lack of inline sensors, as occurs in biotechnology engineering. Commonly the sensor is expensive, damaged, or even they do not exist. It is important to build an observer to have an approximation of the process output to have a closed-loop control. The biotechnological processes are nonlinear, thus in this work is proposed a fuzzy observer to endure nonlinearities. To improve the results reported in the literature, type-2 fuzzy logic was used to justify the membership functions used. The observer's gains were computed via LMIs to guarantee the observer's stability. To facilitate the fuzzy inference computation, interval type-2 fuzzy sets were implemented. The results obtained with the interval type-2 fuzzy observer were compared with a similar technique that uses a fuzzy sliding mode observer; this new approach gives better results obtaining an error 60% lower than the obtained with the other technique. They were designed three observers that work ensemble via a fuzzy relation. The best approximation was to estimate the intermediate concentration. It is important to know this variable because this sub-product was also toxic. It was concluding that by using the oxygen concentration and the liquid volume inside the reactor, the other concentrations were estimated. Finally, this result helps to design a fuzzy controller by using the estimated state. Using this approach, the estimation errors for the phenol and biomass concentrations were 49.26% and 21.27% lower than by using sliding modes.


Introduction
In batch, culture is common to work with biodegradation. In such cases, the aeration and sludge settling take place in the same tank. Fortunately, the bioprocess has a slow dynamic, but some problems can appear.
 The process is nonlinear due the process works with living microorganisms and often with poorly understood dynamics. There exist processes difficult to control because of the lack of inline sensors, as occurs in biotechnology engineering. Commonly the sensor is expensive, damaged, or even they do not exist. It is important to build an observer to have an approximation of the process output to have a closed-loop control. The biotechnological processes are nonlinear, thus in this work is proposed a fuzzy observer to endure nonlinearities. To improve the results reported in the literature, type-2 fuzzy logic was used to justify the membership functions used. The observer's gains were computed via LMIs to guarantee the observer's stability. To facilitate the fuzzy inference computation, interval type-2 fuzzy sets were implemented. The results obtained with the interval type-2 fuzzy observer were compared with a similar technique that uses a fuzzy sliding mode observer; this new approach gives better results obtaining an error 60% lower than the obtained with the other technique. They were designed three observers that work ensemble via a fuzzy relation. The best approximation was to estimate the intermediate concentration.
It is important to know this variable because this sub-product was also toxic. It was concluding that by using the oxygen concentration and the liquid volume inside the reactor, the other concentrations were estimated. Finally, this result helps to design a fuzzy controller by using the estimated state. Using this approach, the estimation errors for the phenol and biomass concentrations were 49.26% and 21.27% lower than by using sliding modes.
The observer to be used must be nonlinear. For stability, it is proposed to use a fuzzy observer. The fuzzy logic had emerged as an alternative when there is vagueness in the process dynamic [7]. In chemical and biotechnological, processes are difficult to have a mathematical model, and an approached model usually has parameters uncertainty.
A fuzzy controller is a rules-based system where the linguistic knowledge from an expert can be used to synthesize a feedback control, and in this case, an observer will be implemented. For instance, a Takagi-Sugeno inference system [8] is tuned because the consequents of the rules are linear submodels. One technique to have the local observer's gains is using linear matrix inequalities [9]. If local models are observable, an observer can be designed for each one such that all system is stable and with some decay rate.
Recently, type-2 fuzzy logic has appeared as a new technique to make control laws [10]. These fuzzy systems are the generalization of the nowadays called fuzzy logic type-I, where the membership functions form is chosen frequently in an arbitrary way; whereby, type-2 fuzzy sets can be seen as a generalization of type-I fuzzy sets. There are some disadvantages, and the parameters design is difficult to justify as:  There are a lot of parameters as the number of membership functions, the defuzzification method, or the triangular norm to use that can be determined arbitrarily.
 The rules base cannot have the optimal values, or they have to change with time.
Thus, the fuzzy portion in a set is now also fuzzy. The uncertainties can be damping in a type-2 fuzzy system [11], and an upper type can be made, but for computational cost, only is used until type-2. However, a type reducer should be implemented before the aggregation rules [10].
The main contribution in this work is a type-2 fuzzy observer, implemented to measure the state variables that cannot be obtained inline because of the lack of inline sensors. The main difference with respect to similar works is the usage of interval type-2 fuzzy logic. In this way, a justification for the membership functions is obtained.
This work shows a relatively simple implementation against a more complicated design, for example, the use of super-twisting [12] or sliding mode observers [13]. To guarantee stability, an LMI approach was used to propose the matrices used for the observers [14]. A comparison between this approach and a fuzzy sliding mode observes is shown to have a better idea about the observer performance [13].
The article is organized as follows: first, in section 2, the process description is mentioned with a proven model for phenol biodegradation. Then some concepts about fuzzy logic are shown, as well as the type-2 fuzzy logic. The next section shows the observer design using linear matrix inequalities where its properties are described. Section 3 shows the results obtained with the observers implemented using type-1 and type-2 fuzzy logic. Finally, the conclusions are presented in section 4.

Method
In this section, the biodegradation process is described and followed by an explanation of fuzzy logic. Finally, the observer design using LMIs is shown. This methodology is obtained by using a fuzzy approach model that has as rule-consequent a state-space submodel. Thereby, an observer is computed following the conditions shown next to guarantee global stability in the fuzzy observers' aggregation.

Process Description
The mathematical model was proposed and proved in [15], and an estimator design was simulated in [6]. The mass balance equations for the state variables are presented by the differential equations set (1), where the states are the biomass, phenol, intermediate, and oxygen concentrations, and the last one is the volume inside the reactor. Due to agitation, concentrations are assumed to be the same in all the bioreactor.
where is the biomass specific growth rate, 1 , S 2 and O are respectively, the specific consumption of phenol, metabolic intermediate, and oxygen; and S 2 ; and is the specific production rate of metabolic intermediate. , 1 , 2 and O is, respectively, biomass, phenol, intermediate, and oxygen concentrations, is the volume liquid in the reactor. The bacteria that consume the phenol, in this case, is the pseudomonas putida. The different modes of culture can be directly coupled to these general settings: in = out in chemostat cultures, in = out = 0 in batch cultures and out = 0 in fed-batch cultures. Finally, 1 and 2 are external disturbances.
In this model, there exists a specific growth rate which was determined by a modification of the Monod and Haldane rates [16]. It is computed as in (2), where each consumption rate is defined by (3) and (4).
The global specific growth rate μ is expressed as in (2): μ( 1 ( ), 2 ( ), ( )) = 1 ( 1 ( ), 2 ( ), ( )) + 2 ( 1 ( ), 2 ( ), ( )), where the terms of growth rate Haldane and Monod are modified equations respectively and found by: (4) The consumption constants in (1) are obtained with the growths rate as follows: The specific consumption rate of metabolic intermediate was linearly correlated to the specific growth rate of biomass on phenol as Table 1 shows the values determined in modeling, and they can be used for simulation. Some of these parameters can change with time, and it is one problem for indirect control because it is model-dependent. Thus, an adaptive algorithm must be used in this case.  Table 2 is possible to appreciate the initial condition in the simulation. Working with fuzzy sets makes possible to speak of fuzzy logic, where all logic operation can be expressed in fuzzy terms, per example, the implication operator in logic can be done by an intersection, so decision making has a strong role in constructing fuzzy rules. In classical logic, it is possible to get an inference result with some input information, such as the cases in tollendo ponens and ponendo tollens.
A fuzzy logic proposition is a statement involving some concept without a clearly defined function or boundary. Linguistic statements that tend to express subjective ideas and that can be interpreted slightly differently by various individuals typically involve fuzzy propositions.

Fuzzy Inference Systems
As it is possible to work with linguistic variables in fuzzy logic, the knowledge from an expert who knows how to model or control a process can be used to construct an inference machine. The fuzzy logic can represent ideas and the way a person thinks and take a decision; it is a part of artificial intelligence. Once some variables are fuzzified (a membership value concerning a set is assigned to each value in the discussion universe), some rules can be built, and they are used to decide on the output system.
The main inference systems in fuzzy logic are the Mamdani and Takagi-Sugeno types; in the first one, the inputs or antecedent's rules and the output or consequents rules are fuzzy, then a defuzzification should be done [7]. In this work, the Takagi-Sugeno inference system is used because its consequents are linear functions of his inputs. Some techniques are implemented to synthesize the system; it is useful when it is difficult to make a mathematical model or when the system is not well understood. The fuzzy rules have the following presentation: where is the i-th rule, is the vector input to fuzzies, ̃ is a fuzzy set, is the output rule and the right side in the consequent is a linear combination from inputs. A rule set can be founded to express in some linguistic way, a process model or a control action, the knowledge from an expert can be used to fill the rules base or made by an algorithm as least squares or clustering [2].
To have the output from rules base and aggregation rules are done, similar to defuzzification in Mamdani case, but it is faster because in this step, a crisp value is obtained in (10). It is possible to appreciate this concept. To have the observer state, the consequents rules were defined as local state-space models as (11) shows. The output can be seen as an interpolation between all consequents, linear systems in this case, and it also works as a filter. The question now is how to design a stable observer because the stability of all local submodels does not imply global stability [17].
Type-2 Fuzzy Logic The membership function can have a different presentation; the Triangular, Trapezoid, and Gaussian types are common. The triangular ones are useful for their computational cost. They are easy to program, the Gaussian type is a smooth function; thus, the gradient descendent method can be improved in algorithms [18]. The number of fuzzy partitions and the shape of membership functions can be arbitrarily chosen, to fix this situation, a generalization can be done, it is the type-2 fuzzy logic, where the membership is also fuzzy, now there are three dimensions, and a representation is shown in Fig. 1, as there are two membership degrees a type reducer is needed [11], for simplicity, just is worked until type-2 [10].
The type-2 fuzzy sets enable modeling and minimizing the effects of uncertainties in the fuzzy systems. Unfortunately, type-2 fuzzy logic is more difficult to compute than type-1. As a justification, there are some uncertainties not considered in type-1 [10].
 The mining of the words that are used in the fuzzy rules can be uncertain.
 Consequents may have a histogram of values associated with them.
 Measured variables to be fuzzified can be noisy.
To work with type-2 fuzzy logic, it is proposed to see membership functions as in Fig. 2(a), where there are two limits in the membership. They are called the upper and lower membership functions. With this idea, it is possible to vary some parameters like the width or the center of functions and in this way have the limits, in [10] is proposed to get the average of memberships between limits to make the type reducer, by using this idea, the observer design was made a compared with the type-1 fuzzy observer.
Suppose a fuzzy partition is made to get a fuzzy submodel. There will be a big fuzzy associative memory, in the case of selecting three membership functions for each state variable, there will be 243 fuzzy rules. In the simulation, a good performance can appear, but in practice is not easy to make. Fortunately, the bioprocess is slow, and the computational cost seems not to be critical. However, a cascade model [18] can be built to have around 100 rules with three membership functions in each state variable. If a common matrix can be found, it is possible to have global stability in the observer, finally with states estimated to make the feedback state. Finally, type-2 fuzzy sets can be used to convey the uncertainties in membership functions of type-1 fuzzy sets due to the dependence of the membership functions on available linguistic and numerical information. For a type-2 Takagi-Sugeno inference system, it is not needed a type reduction because the consequents of the rules are not fuzzy. In the next section, the observer will be implemented to compute the concentrations based on type-1 and type-2 fuzzy logic, its gain matrix is the same, but uncertainties and noise filters are different.

Observer Design
A state observer is a subsystem that estimates the state variables with the input and output measurements [19]. It is possible to make it if the variable to estimate is observable, so it is important to get observability at least for unknown variables, some concentrations in this case. For global observability, the following matrix must be nonsingular.
where the matrices and are the output, and state transferences matrices of the linear system (15) and N is called the observability matrix, which is not singular, then there is global observability. There are some techniques to have a certain error dynamic between the estimate and the real value as the Ackermann method [19], the error dynamic has the following differential equation: where L is the gain matrix for observer and e(t) = y(t) − ỹ(t), been ỹ(t) the estimated statespace representation of the linear system is: as is well known, ( ) ∈ R n is the state vector, ∈ R n×n is the transference state matrix, ( ) ∈ R m is the input vector, ∈ R n×m is the input matrix, ( ) ∈ R p is the output vector, ∈ R p×n is the output matrix and finally ∈ R p×m is the direct transference matrix which is most of the times a ceros matrix for control proposes.
In the design, there are some linear submodels, and each one must have its matrix gain observer ∈ R n×p and the states that can be measure can be used in the observer to improve the convergence time, or a type reduced can be used. The main problem is that the stability in all the local observers does not imply global stability, Lyapunov equation can be used, and if a common matrix is founded for all submodels, stability is guaranteed. For this, linear matrix inequalities are used.

Linear Matrix Inequalities
A linear matrix inequality is a set of expressions whose variables are linearly related matrices, where the relation between terms is not an equal sign. To find the solution set, a convex optimization problem is used since any matrix can be decomposed into a base of symmetric matrices [9]. When no solution exists, the problem is said to be infeasible. Some properties are shown next. In control, the optimization solution consists of guaranteeing some eigenvalues in the closed-loop dynamic control, in this case, to find a common matrix for the Lyapunov equation [17].
Given a matrix = T and a full column rank matrix it holds that Consider a matrix = T = ( Consider matrices i = i T ∈ R n×n , ∈ R n , such that T i ≥ 0, i = 1, … , p, and the inequality condition T o > 0, x ≠ 0. A sufficient condition is that there exists τ i ≥ 0, i = 1, … , p such that (18) Given two matrices and of proper size and = T > 0, the following inequality holds

Fuzzy observers
It is considered a Sugeno inference system where the consequents are state-space representations, and for each state space (20), an observer is designed, the scheduling vector that contains the membership degrees, depends only on measured variables and a candidate Lyapunov = T ( ) (t) function is derived with = T .
An observer is an exact copy of the original system, a submodel in this case, and the difference between the system and its copy is the error estimation ( ). The estimation dynamics are given by (21).
where i is the membership value and z is the scheduling vector, the gains L i are the observer gains to determine, and the error dynamics is defined by (22).
There are some Theorems that prove asymptotical stability [17]. One determines that if there exists a common matrix = T > 0, and L i , i = 1, … , m, so that ( ( − )) < 0, for i = 1, … , m, j = 1, … , m, provided that two rules that are simultaneously active, so the Tnorm, the product, in this case, is different to zero, and denotes the symmetric part of a matrix, Ω( ) = + T .
To have the linear matrix inequality solution, it is necessary to make a change of variables i = i , i = 1, … , m, then system to solve is (24) [17].
Also, a decay rate can be added if a matrix = T > 0 is the right side term in the inequations (24).
This methodology is compared with the results obtained in [13], where an adaptive fuzzy sliding mode observer was implemented, similar conditions to the shown in Table 1 and Table  2 were also used, and the observer was defined by (10) in [13]. A scheme about the methodology proposed can be seen in Fig. 2. The observer uses two variables to estimate three concentrations.
For the methodology implementation, the volume and oxygen measures obtained inline are used to evaluate state-space models. The matrices Ai used in the models are now used to compute the variables estimated X(t), S1(t), and S2(t), having in this way virtual sensors. Fig. 2 shows as outputs these concentrations obtained from the information that can be obtained from the reactor.

Results and Discussion
Working the bioprocess in fed-batch mode implies a cycle where a feeding stage takes some time, and a feeding profile describes the inlet. After that, only agitation and aeration take place, which is when the biomass makes the reaction. Then, the decantation is done where there is not agitation. Finally, the water without pollution is removed from the upper place due to the microorganisms make an aggregation, and they are deposited at the bottom of the reactor [12]. This cycle is done continuously, and water purification is the result. However, an increase in biomass concentration is possible. Hence, it is common to make a purge and incinerate the biomass that is not needed.
In order to have a small number of rules in the fuzzy associative memory, it is proposed to make three observers that work with three variables, as the volume and oxygen concentration can be inline measured, they are used in the observers, so for biomass concentration, the state variables are the biomass, volume, and oxygen concentration, for its local Takagi-Sugeno model, and the matrix = [0 1 1] is the output matrix, and so on for the other states to estimate 1 (t) and 2 (t) as pointed in [13].
The observer design finds a common matrix P to all local models. In this case, the transfer state matrices are defined as i ∈ R 3×3 , and the observer gains are the matrices i ∈ R 3×1 . To confirm linear matrix inequalities, a change in variables is done to have the necessary properties [14], the common matrix is positive definite and symmetric. The matrix found to stability holds was: Three triangular membership functions were used for each measured variable. The measured variables are volume and oxygen concentration. With these samplings, two membership values were applied to estimation. In this way, nine fuzzy rules were used for each observer and 27 rules for all the fuzzy systems. They were needed to estimate the concentrations in three fuzzy observers, for example, to estimate biomass concentration, and ).
In Fig. 3, it is possible to see the biomass estimation. The error is small. In Fig. 4 and Fig. 5, the estimated concentrations for phenol and the intermediate are shown. The error in the last case in steady-state is constant but not converges to zero. To improve this result, type-2 fuzzy logic was proposed in order to improve the errors of the estimation of the variable. To have an idea about the errors dimension, the ISE was applied; the ITAE is not a good election because as the error does not converge to zero, and if it is multiplied for time, the result is too big [20]. Finally, some relative error is presented by dividing the ISE and ITAE by the maximum error obtained. The ISE is the integral of square error (27) [20]. Thus if a small error is obtained, the ISE can be small, but according to the magnitudes, a relatively small error in which magnitude is not negligible can have a large ISE that could be interpreted as a bad result. In Table 3, the estimated errors are presented. In the intermediate concentration estimation, the error must be improved if the relative error criterion is taken into consideration, and also the ITAE (28) because the final error seems to be large [14]. Both criteria are shown in a relative way, dividing by the maxima values to have a better idea about the observer performance because different concentration magnitudes were obtained. The results obtained by using type-2 fuzzy logic are shown in Fig. 6 and Fig. 7. As the error in biomass and phenol concentrations are small, the improvement is not relevant and is shown in the same figure. But in the intermediate concentration, the observer improvement is relevant, on the one hand, because the intermediate obtained in the phenol biodegradation is also toxic [15]. On the other hand, by using classical fuzzy sets was not possible that the estimated concentration converges to the current intermediate concentration.
Finally, this algorithm estimates variables that are not measured inline and can be used in control applications. In this work, an open-loop control was made. The membership functions were three for each state measured and similar to the shown in Fig. 1(b). In Table 4, the same error descriptions are computed to compare this methodology with results obtained in [13]. The observer shows a good performance in estimating the intermediate concentration.
However, the other results were very similar to the obtained with the sliding mode control. It cannot be said that type-2 fuzzy logic observer has an important effect on estimates of biomass and phenol concentrations, Table 3 and Table 4 show similar results, but in the case of intermediate concentration, an improvement is noted. Changing the observer gains did not modify notoriously the observer performance. The main difference in the observer performance was appreciated by changing the membership functions. The results obtained by using type-2 fuzzy logic were better. Nevertheless, it can be noted that the interval type-2 fuzzy sets cannot be a justification to generalize a set of type-I fuzzy sets.
To have a type reducer in type-2, they were averaged the membership valued given for the upper and lower functions [10]. They are called the foot of print. In modeling, some better and easier methods exist to model or parameterize a plant, but it is done when all variables can be measured. To know states that cannot be measure, it is needed to estimate them [19]. Once they are known, a state feedback control can be applied [16], which is the future work.  Table 4. State estimation errors using type-2 fuzzy logic

State estimation
Error criteria

Conclusion
The fuzzy observers are a method to make nonlinear observers when the process is not well known. One alternative is the sliding mode observers, but to know the cotes model to put the gains is not too easy. The fuzzy logic can filter and eliminates some uncertainty in the parameters model and also in the dynamics model. This work attacked a frequent problem in chemistry and biotechnology. This work was possible to estimate the entire state using measures from oxygen and volume to approach the other variables. To reduce the computational cost, it was proposed to use triangular membership functions and only three of them in the fuzzy inference system (Takagi-Sugeno type), and the results are good and presented in Table 4. In experiments was found that the intermediate generated is also toxic, so it is important to know its concentration. For the first observer, it has the greater error. To improve this, it was used type-2 fuzzy logic, to have two membership functions. Clustering was used, and its average is the membership value. In this case, the error criteria for phenol and biomass, using type-2 fuzzy logic, were 49.26% and 21.27% fewer, respectively. In control, issues have no importance, but the intermediate has a better approach in type-2 fuzzy logic, with an improvement of 85.79% in the ISE, and this variable can be used for control law design [20]. Errors from noise were reduced because fuzzy logic works as a filter. As future work, this observer will be used for control applications and for fault detection and isolation.