# Artificial Hydrocarbon Networks Fuzzy Inference System

Authors: Hiram Ponce; Pedro Ponce; Arturo Molina
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

This paper presents a novel fuzzy inference model based on artificial hydrocarbon networks, a computational algorithm for modeling problems based on chemical hydrocarbon compounds. In particular, the proposed fuzzy-molecular inference model (FIM-model) uses molecular units of information to partition the output space in the defuzzification step. Moreover, these molecules are linguistic units that can be partially understandable due to the organized structure of the topology and metadata parameters involved in artificial hydrocarbon networks. In addition, a position controller for a direct current (DC) motor was implemented using the proposed FIM-model in type-1 and type-2 fuzzy inference systems. Experimental results demonstrate that the fuzzy-molecular inference model can be applied as an alternative of type-2 Mamdani’s fuzzy control systems because the set of molecular units can deal with dynamic uncertainties mostly present in real-world control applications.


---

## Body

## 1. Introduction

It is well known that fuzzy inference models are very important in applications when information is uncertain and imprecise, like: robotics, medicine, control, modeling, and so forth [1–6]. Moreover, fuzzy inference models may deal with nonlinearities in the input domain to transform them into an output domain. In that way, the literature reports three main models: Takagi-Sugeno inference systems [7], Mamdani’s fuzzy control systems [8], and Tsukamoto’s inference model [9].Roughly speaking, Takagi-Sugeno inference systems apply polynomial functions to construct the consequent values using pairs of input-output data of a given system to model [7]. Mamdani’s fuzzy control systems refer to control laws that apply fuzzy inference models with fuzzy partitions in the defuzzification phase [8], obtaining mostly the output value with the center of gravity (COG) function [10]. In contrast, Tsukamoto’s inference models implement monotonic membership functions [9]. For detailed information, see [11].The above inference models were developed under type-1 fuzzy systems. However, these models have disadvantage in terms of dynamic uncertainties present at inputs. For example, the latter gives poor performance in control systems because real-world control applications present dynamic uncertainties inherently [12, 13]. In contrast, type-2 fuzzy systems were proposed as an improvement of type-1 fuzzy inference systems. For instance, recent applications on fuzzy control systems have demonstrated the ability of type-2 fuzzy control systems to handle with noise and perturbations [12–14].On the other hand, other fuzzy inference models have been proposed as hybrid algorithms using heuristics to manage unusual information, pattern recognition, and learning. Some of these fuzzy inference models use genetic algorithms, harmony search algorithms, tabu search, artificial neural networks, swarm intelligence techniques, and so forth [3, 4, 15].Recently, H. Ponce and P. Ponce [16–20] proposed a new computational algorithm for modeling problems named artificial hydrocarbon networks based on natural hydrocarbon compounds. This algorithm claims for stability, well forming of compounds, easiness of spanning structures, and a degree of interpretation of the resultant model based on organized structures. In particular, the basic unit of information in this algorithm is the molecule. Actually, molecules are simple packages of information that can be inherited and interpreted. At last, basic chemical rules are applied to build the final structure.Then, the objective of this paper is to present a novel fuzzy inference model based on artificial hydrocarbon networks named fuzzy-molecular inference (FIM) model. In that sense, molecules can model consequent values of fuzzy rules and partition linguistic variables. Moreover, a fuzzy control system based on the FIM-model is presented as a case study. Experimental results demonstrate that the fuzzy-molecular inference model can be applied as an alternative of type-2 Mamdani’s fuzzy control systems because the set of molecular units can deal with dynamic uncertainties mostly present in real-world control applications.The paper is ordered as follows. Next section presents a review of artificial hydrocarbon networks algorithm introduced recently in [16–20]. The following sections introduce new material. Section 3 describes the fuzzy-molecular inference model in detail, current proposal of the paper. Section 4 introduces an example of how to apply the FIM-model in fuzzy control systems. Section 5 presents a case study in which a type-2 fuzzy control system based on the FIM-model implements a position controller of a direct current (DC) motor. Section 6 presents the experimental results of the case study and discusses some differences between the proposed model and other fuzzy inference systems and the advantages of the FIM-model to be used as an alternative of type-2 fuzzy systems. Finally, Section 7 concludes the paper and presents future directions.


## 2. Artificial Hydrocarbon Networks

In this section, a brief review of artificial hydrocarbon networks is presented. However, this algorithm is subjected to the artificial organic networks technique. Thus, a first description of artificial organic networks technique is discussed and then artificial hydrocarbon networks algorithm is formally introduced.


### 2.1. Brief Review of Artificial Organic Networks

Observations to chemical organic compounds reveal enough information to derive theartificial organic networks technique firstly proposed by H. Ponce and P. Ponce [16–22]. From studies of organic chemistry, organic compounds are the most stable ones in nature. In addition, molecules can be seen as units of packaging information; thus, complex molecules and its combinations can determine a nonlinear interaction of information. Moreover, molecules can be used for encapsulation and potential inheritance of information. Thus, artificial organic networks take advantage of this knowledge, inspiring a computational algorithm that infer and classify information based on stability and chemical rules that allow formation of molecules [19, 21].Artificial organic networks (AONs for short) define four components: atoms, molecules, compounds, and mixtures; and two basic interactions among components: covalent bonds and chemical balance interaction. In order to follow chemical rules, the following definitions of AONs hold [16–22].(a) Atoms. They are the basic units with structure. No information is stored. In addition, when two atoms have the same number of degrees of freedom they are called similar atoms and different atoms otherwise. The degree of freedom is the number of valence electrons that allow atoms to be linked with others.(b) Molecules. They are the interactions of two or more atoms made of covalent bonds. These components have structural and behavioral properties. Structurally, they conform the basis of an organized structure while behaviorally they can contain information. Thus, molecules are known as the basic units of information. If a molecule has filled out all of the valence electrons in atoms, it is stable; but if a molecule has at least one valence electron without filling, it is considered as unstable.(c) Compounds. In structure, they are two or more molecules interacting with each other linked with covalent bonds. Their behaviors are mappings from the set of molecular behaviors to real values.(d) Mixtures. They are the interaction of two or more molecules and/or compounds without physical bonds. Mixtures are linear combinations of molecules and/or compounds forming a basis of molecules with weights so-called stoichiometric coefficients.(e) Covalent Bonds. They are of two types. For this work, polar covalent bonds refer to the interaction of two similar atoms, while nonpolar covalent bonds refer to the interaction of two different atoms.(f) Chemical Balance Interaction. It refers to find the proper values of stoichiometric coefficients in mixtures in order to satisfy constrains in artificial organic networks.In fact, artificial organic networks follow the energy model [20] that states the hierarchical order in which components are used to form the final structure to minimize energy. For instance, the first strategy considers formation of molecules. If molecules cannot deal with the problem, compounds are required. Finally, mixtures of molecules and/or compounds will act.


### 2.2. Description of Artificial Hydrocarbon Networks

Artificial hydrocarbon networks (AHNs for short) algorithm is based on artificial organic networks that implement notions of natural hydrocarbon compounds [19, 21]. Formally, AHNs define components, interactions, and the training algorithm, in order to infer and classify information given any system. In that way, two main procedures are needed for AHNs: training and reasoning. Following, a brief review of artificial hydrocarbon networks is presented.


#### 2.2.1. Basic Components

In particular to AHNs, only two types of atoms are considered: hydrogen atomsH and carbon atoms C. Those have valence electrons eH=1 and eC=4 for the hydrogen and carbon atoms, respectively. In that sense, hydrocarbon atoms can be bonded with at most one atom while carbon atoms can be bonded with at most four, knowing as the octet rule [16–22].The basic unit of information is aCH-molecule. These kinds of molecules are structurally made of hydrogen and carbon atoms following the octet rule. Let Mi be the structure of a molecule, and, φi be the behavior of molecule Mi. Then, φi is a mapping from some set X to real numbers ℝ. Moreover, let MH and MC be two molecules with behaviors φH and φC, and if (1) holds for these behaviors, then MH and MC are called CH-molecules, where h is complex constant value named hydrogen value, x is any input value |x|≤1 that excites a molecule, and d is the number of hydrogen atoms attached to a carbon atom:
(1)φH(x)=h,h∈ℂ,φC(x)=∏i=1d≤eC(x-φHi),x∈ℝ.
Let MCH, MCH2, and MCH3 be CH-molecules with behaviors φCH, φCH2, and φCH3 like (2), respectively. Then, they are called CH-primitive molecules. Intuitively, these molecules can be seen as basic packages to join among them forming complex molecules-like compounds:
(2)φCH(x)=(x-h1),φCH2(x)=(x-h1)(x-h2),φCH3(x)=(x-h1)(x-h2)(x-h3).
Let Ci be a compound formed with a set of pCH-molecules ℳ, and let ψi be the behavior of Ci. Then, ψi is expressed as (3), where φj are the behaviors of CH-molecules in ℳ and π is the behavior of nonpolar covalent bonds that links molecules
(3)ψi=π(φ1,…,φj,…,φp,x).
Finally, let Ci be a n molecules or compounds with behaviors ψi. Then, S is a mixture of molecules or compounds and it is expressed as a linear combination of them like (4); where, αi is a set of real values named stoichiometric coefficients representing the ratio of molecules or compounds occupied in the mixture. 										(4)S(x)=∑iαiψi(x).
Let AHN be a mixture of molecules or compounds in the set Γ representing the structure of molecules or compounds (how they are connected), and, S be the behavior of the mixture. Then, AHN is called an artificial hydrocarbon network if Γ is spanned from CH-molecules. Figure 1 shows a simple artificial hydrocarbon network. It is remarkable to say that topology Γ is a fixed structure parameterized with hydrogen values h and stoichiometric coefficients αi.Figure 1
Simple artificial hydrocarbon network.White circles represent hydrogen atoms, and black circlesrepresent carbon atoms.


#### 2.2.2. Training of Artificial Hydrocarbon Networks

Artificial hydrocarbon networks can deal with modeling problems like inferring or clustering in order to approximate any given systemΣ with a pair of samples (x,y). In fact, let Σ be a simple-input-simple-output (SISO) system with input signal x and output signal y. The training process of an artificial hydrocarbon network is summarized in Algorithm 1 which receives the sample pairs of Σ, the number of CH-molecules p and the number of compounds c. Algorithm 1 outputs the structure Γ, hydrogen values h, and stoichiometric coefficients αi.Algorithm 1:Training algorithm for artificial hydrocarbon networks.
(1) InitializeAHN=∅
(2)For eachCi  do
(3) Initializerjk randomly under the input domain
(4)While stop condition is not reached do
(5)  Split(x,y)-pairs into p clusters yj using rjk
(6)For each cluster yj  do
(7)   Create aCH-molecule using criterion (6)
(8)   Obtain hydrogen values of moleculeMj using LSE method
(9)   Calculate least square errorEj between yj and Mj
(10)End for
(11)  Update intermolecular distancesrjk using (5)
(12)End while
(13) UpdateAHN←AHN∪Ci
(14) Update(x,y)-pairs with (x,y-AHN)-pairs
(15)End for
(16)   Obtain stoichiometric coefficients ofCi compounds using LSE method
(17)   ReturnAHNThis is a modified algorithm from the original one reported in [21]. For instance, rjk refers to an intermolecular distance which defines the distance between the position of two molecules Mj and Mk. Actually, the algorithm iteratively updates the set of intermolecular distances to define the best positions of molecules in the input domain using (5). In that sense, molecules will act under regions defined by these intermolecular distances. It is remarkable to say that the first molecule acts from the initial value of the input domain. In order to iteratively updates intermolecular distances, η is considered the step size or the learning rate, such that, 0<η<1 and the least squares errors Ej and Ek for each molecule
(5)rt+1jk=rtjk-η(Ej-Ek).
On the other hand, the original algorithm considers a generic interaction of CH-molecules referring to as a nonpolar covalent bond based training [20]. In this work, a linear chain of CH-molecules is adopted. Thus, each compound has a topology in the form of (6), where, the outside of the chain has MCH3 molecules and MCH2; otherwise
(6)MCH3–MCH2–⋯–MCH2–⋯–MCH2–MCH3.
Finally, Algorithm 1 considers adjustment parameters σj constant gain for molecular behaviors φj since φC in (1) is a normalized product form of a polynomial used in the least squares estimates (LSEs) method. In fact, consider the equivalence (7) when reasoning with AHNs. Where the set of p values are coefficients of the polynomial form of φC of grade d≤eC(7)σφC(x)=pdxd+pd-1xd-1+⋯+p1x+p0=σ∏i=1d≤eC(x-φHi),x∈ℝ.


#### 2.2.3. Reasoning of Artificial Hydrocarbon Networks

Once the training is done, an artificial hydrocarbon network can be used for reasoning. In that sense, consider an input valuex0. The AHN has to be evaluated in x0; thus, the reasoning value y0 can be calculated using (8), where S is the behavior of the artificial hydrocarbon network, αi are the stoichiometric coefficients, R is the set of all intermolecular distances between molecules, and σj are the adjustment parameters
(8)y0=S(x0∣H,αi,R,σj).
Notice that, if c=1, it means that there exists one stoichiometric coefficient α1=1.


## 2.1. Brief Review of Artificial Organic Networks

Observations to chemical organic compounds reveal enough information to derive theartificial organic networks technique firstly proposed by H. Ponce and P. Ponce [16–22]. From studies of organic chemistry, organic compounds are the most stable ones in nature. In addition, molecules can be seen as units of packaging information; thus, complex molecules and its combinations can determine a nonlinear interaction of information. Moreover, molecules can be used for encapsulation and potential inheritance of information. Thus, artificial organic networks take advantage of this knowledge, inspiring a computational algorithm that infer and classify information based on stability and chemical rules that allow formation of molecules [19, 21].Artificial organic networks (AONs for short) define four components: atoms, molecules, compounds, and mixtures; and two basic interactions among components: covalent bonds and chemical balance interaction. In order to follow chemical rules, the following definitions of AONs hold [16–22].(a) Atoms. They are the basic units with structure. No information is stored. In addition, when two atoms have the same number of degrees of freedom they are called similar atoms and different atoms otherwise. The degree of freedom is the number of valence electrons that allow atoms to be linked with others.(b) Molecules. They are the interactions of two or more atoms made of covalent bonds. These components have structural and behavioral properties. Structurally, they conform the basis of an organized structure while behaviorally they can contain information. Thus, molecules are known as the basic units of information. If a molecule has filled out all of the valence electrons in atoms, it is stable; but if a molecule has at least one valence electron without filling, it is considered as unstable.(c) Compounds. In structure, they are two or more molecules interacting with each other linked with covalent bonds. Their behaviors are mappings from the set of molecular behaviors to real values.(d) Mixtures. They are the interaction of two or more molecules and/or compounds without physical bonds. Mixtures are linear combinations of molecules and/or compounds forming a basis of molecules with weights so-called stoichiometric coefficients.(e) Covalent Bonds. They are of two types. For this work, polar covalent bonds refer to the interaction of two similar atoms, while nonpolar covalent bonds refer to the interaction of two different atoms.(f) Chemical Balance Interaction. It refers to find the proper values of stoichiometric coefficients in mixtures in order to satisfy constrains in artificial organic networks.In fact, artificial organic networks follow the energy model [20] that states the hierarchical order in which components are used to form the final structure to minimize energy. For instance, the first strategy considers formation of molecules. If molecules cannot deal with the problem, compounds are required. Finally, mixtures of molecules and/or compounds will act.


## 2.2. Description of Artificial Hydrocarbon Networks

Artificial hydrocarbon networks (AHNs for short) algorithm is based on artificial organic networks that implement notions of natural hydrocarbon compounds [19, 21]. Formally, AHNs define components, interactions, and the training algorithm, in order to infer and classify information given any system. In that way, two main procedures are needed for AHNs: training and reasoning. Following, a brief review of artificial hydrocarbon networks is presented.


### 2.2.1. Basic Components

In particular to AHNs, only two types of atoms are considered: hydrogen atomsH and carbon atoms C. Those have valence electrons eH=1 and eC=4 for the hydrogen and carbon atoms, respectively. In that sense, hydrocarbon atoms can be bonded with at most one atom while carbon atoms can be bonded with at most four, knowing as the octet rule [16–22].The basic unit of information is aCH-molecule. These kinds of molecules are structurally made of hydrogen and carbon atoms following the octet rule. Let Mi be the structure of a molecule, and, φi be the behavior of molecule Mi. Then, φi is a mapping from some set X to real numbers ℝ. Moreover, let MH and MC be two molecules with behaviors φH and φC, and if (1) holds for these behaviors, then MH and MC are called CH-molecules, where h is complex constant value named hydrogen value, x is any input value |x|≤1 that excites a molecule, and d is the number of hydrogen atoms attached to a carbon atom:
(1)φH(x)=h,h∈ℂ,φC(x)=∏i=1d≤eC(x-φHi),x∈ℝ.
Let MCH, MCH2, and MCH3 be CH-molecules with behaviors φCH, φCH2, and φCH3 like (2), respectively. Then, they are called CH-primitive molecules. Intuitively, these molecules can be seen as basic packages to join among them forming complex molecules-like compounds:
(2)φCH(x)=(x-h1),φCH2(x)=(x-h1)(x-h2),φCH3(x)=(x-h1)(x-h2)(x-h3).
Let Ci be a compound formed with a set of pCH-molecules ℳ, and let ψi be the behavior of Ci. Then, ψi is expressed as (3), where φj are the behaviors of CH-molecules in ℳ and π is the behavior of nonpolar covalent bonds that links molecules
(3)ψi=π(φ1,…,φj,…,φp,x).
Finally, let Ci be a n molecules or compounds with behaviors ψi. Then, S is a mixture of molecules or compounds and it is expressed as a linear combination of them like (4); where, αi is a set of real values named stoichiometric coefficients representing the ratio of molecules or compounds occupied in the mixture. 										(4)S(x)=∑iαiψi(x).
Let AHN be a mixture of molecules or compounds in the set Γ representing the structure of molecules or compounds (how they are connected), and, S be the behavior of the mixture. Then, AHN is called an artificial hydrocarbon network if Γ is spanned from CH-molecules. Figure 1 shows a simple artificial hydrocarbon network. It is remarkable to say that topology Γ is a fixed structure parameterized with hydrogen values h and stoichiometric coefficients αi.Figure 1
Simple artificial hydrocarbon network.White circles represent hydrogen atoms, and black circlesrepresent carbon atoms.


### 2.2.2. Training of Artificial Hydrocarbon Networks

Artificial hydrocarbon networks can deal with modeling problems like inferring or clustering in order to approximate any given systemΣ with a pair of samples (x,y). In fact, let Σ be a simple-input-simple-output (SISO) system with input signal x and output signal y. The training process of an artificial hydrocarbon network is summarized in Algorithm 1 which receives the sample pairs of Σ, the number of CH-molecules p and the number of compounds c. Algorithm 1 outputs the structure Γ, hydrogen values h, and stoichiometric coefficients αi.Algorithm 1:Training algorithm for artificial hydrocarbon networks.
(1) InitializeAHN=∅
(2)For eachCi  do
(3) Initializerjk randomly under the input domain
(4)While stop condition is not reached do
(5)  Split(x,y)-pairs into p clusters yj using rjk
(6)For each cluster yj  do
(7)   Create aCH-molecule using criterion (6)
(8)   Obtain hydrogen values of moleculeMj using LSE method
(9)   Calculate least square errorEj between yj and Mj
(10)End for
(11)  Update intermolecular distancesrjk using (5)
(12)End while
(13) UpdateAHN←AHN∪Ci
(14) Update(x,y)-pairs with (x,y-AHN)-pairs
(15)End for
(16)   Obtain stoichiometric coefficients ofCi compounds using LSE method
(17)   ReturnAHNThis is a modified algorithm from the original one reported in [21]. For instance, rjk refers to an intermolecular distance which defines the distance between the position of two molecules Mj and Mk. Actually, the algorithm iteratively updates the set of intermolecular distances to define the best positions of molecules in the input domain using (5). In that sense, molecules will act under regions defined by these intermolecular distances. It is remarkable to say that the first molecule acts from the initial value of the input domain. In order to iteratively updates intermolecular distances, η is considered the step size or the learning rate, such that, 0<η<1 and the least squares errors Ej and Ek for each molecule
(5)rt+1jk=rtjk-η(Ej-Ek).
On the other hand, the original algorithm considers a generic interaction of CH-molecules referring to as a nonpolar covalent bond based training [20]. In this work, a linear chain of CH-molecules is adopted. Thus, each compound has a topology in the form of (6), where, the outside of the chain has MCH3 molecules and MCH2; otherwise
(6)MCH3–MCH2–⋯–MCH2–⋯–MCH2–MCH3.
Finally, Algorithm 1 considers adjustment parameters σj constant gain for molecular behaviors φj since φC in (1) is a normalized product form of a polynomial used in the least squares estimates (LSEs) method. In fact, consider the equivalence (7) when reasoning with AHNs. Where the set of p values are coefficients of the polynomial form of φC of grade d≤eC(7)σφC(x)=pdxd+pd-1xd-1+⋯+p1x+p0=σ∏i=1d≤eC(x-φHi),x∈ℝ.


### 2.2.3. Reasoning of Artificial Hydrocarbon Networks

Once the training is done, an artificial hydrocarbon network can be used for reasoning. In that sense, consider an input valuex0. The AHN has to be evaluated in x0; thus, the reasoning value y0 can be calculated using (8), where S is the behavior of the artificial hydrocarbon network, αi are the stoichiometric coefficients, R is the set of all intermolecular distances between molecules, and σj are the adjustment parameters
(8)y0=S(x0∣H,αi,R,σj).
Notice that, if c=1, it means that there exists one stoichiometric coefficient α1=1.


## 2.2.1. Basic Components

In particular to AHNs, only two types of atoms are considered: hydrogen atomsH and carbon atoms C. Those have valence electrons eH=1 and eC=4 for the hydrogen and carbon atoms, respectively. In that sense, hydrocarbon atoms can be bonded with at most one atom while carbon atoms can be bonded with at most four, knowing as the octet rule [16–22].The basic unit of information is aCH-molecule. These kinds of molecules are structurally made of hydrogen and carbon atoms following the octet rule. Let Mi be the structure of a molecule, and, φi be the behavior of molecule Mi. Then, φi is a mapping from some set X to real numbers ℝ. Moreover, let MH and MC be two molecules with behaviors φH and φC, and if (1) holds for these behaviors, then MH and MC are called CH-molecules, where h is complex constant value named hydrogen value, x is any input value |x|≤1 that excites a molecule, and d is the number of hydrogen atoms attached to a carbon atom:
(1)φH(x)=h,h∈ℂ,φC(x)=∏i=1d≤eC(x-φHi),x∈ℝ.
Let MCH, MCH2, and MCH3 be CH-molecules with behaviors φCH, φCH2, and φCH3 like (2), respectively. Then, they are called CH-primitive molecules. Intuitively, these molecules can be seen as basic packages to join among them forming complex molecules-like compounds:
(2)φCH(x)=(x-h1),φCH2(x)=(x-h1)(x-h2),φCH3(x)=(x-h1)(x-h2)(x-h3).
Let Ci be a compound formed with a set of pCH-molecules ℳ, and let ψi be the behavior of Ci. Then, ψi is expressed as (3), where φj are the behaviors of CH-molecules in ℳ and π is the behavior of nonpolar covalent bonds that links molecules
(3)ψi=π(φ1,…,φj,…,φp,x).
Finally, let Ci be a n molecules or compounds with behaviors ψi. Then, S is a mixture of molecules or compounds and it is expressed as a linear combination of them like (4); where, αi is a set of real values named stoichiometric coefficients representing the ratio of molecules or compounds occupied in the mixture. 										(4)S(x)=∑iαiψi(x).
Let AHN be a mixture of molecules or compounds in the set Γ representing the structure of molecules or compounds (how they are connected), and, S be the behavior of the mixture. Then, AHN is called an artificial hydrocarbon network if Γ is spanned from CH-molecules. Figure 1 shows a simple artificial hydrocarbon network. It is remarkable to say that topology Γ is a fixed structure parameterized with hydrogen values h and stoichiometric coefficients αi.Figure 1
Simple artificial hydrocarbon network.White circles represent hydrogen atoms, and black circlesrepresent carbon atoms.


## 2.2.2. Training of Artificial Hydrocarbon Networks

Artificial hydrocarbon networks can deal with modeling problems like inferring or clustering in order to approximate any given systemΣ with a pair of samples (x,y). In fact, let Σ be a simple-input-simple-output (SISO) system with input signal x and output signal y. The training process of an artificial hydrocarbon network is summarized in Algorithm 1 which receives the sample pairs of Σ, the number of CH-molecules p and the number of compounds c. Algorithm 1 outputs the structure Γ, hydrogen values h, and stoichiometric coefficients αi.Algorithm 1:Training algorithm for artificial hydrocarbon networks.
(1) InitializeAHN=∅
(2)For eachCi  do
(3) Initializerjk randomly under the input domain
(4)While stop condition is not reached do
(5)  Split(x,y)-pairs into p clusters yj using rjk
(6)For each cluster yj  do
(7)   Create aCH-molecule using criterion (6)
(8)   Obtain hydrogen values of moleculeMj using LSE method
(9)   Calculate least square errorEj between yj and Mj
(10)End for
(11)  Update intermolecular distancesrjk using (5)
(12)End while
(13) UpdateAHN←AHN∪Ci
(14) Update(x,y)-pairs with (x,y-AHN)-pairs
(15)End for
(16)   Obtain stoichiometric coefficients ofCi compounds using LSE method
(17)   ReturnAHNThis is a modified algorithm from the original one reported in [21]. For instance, rjk refers to an intermolecular distance which defines the distance between the position of two molecules Mj and Mk. Actually, the algorithm iteratively updates the set of intermolecular distances to define the best positions of molecules in the input domain using (5). In that sense, molecules will act under regions defined by these intermolecular distances. It is remarkable to say that the first molecule acts from the initial value of the input domain. In order to iteratively updates intermolecular distances, η is considered the step size or the learning rate, such that, 0<η<1 and the least squares errors Ej and Ek for each molecule
(5)rt+1jk=rtjk-η(Ej-Ek).
On the other hand, the original algorithm considers a generic interaction of CH-molecules referring to as a nonpolar covalent bond based training [20]. In this work, a linear chain of CH-molecules is adopted. Thus, each compound has a topology in the form of (6), where, the outside of the chain has MCH3 molecules and MCH2; otherwise
(6)MCH3–MCH2–⋯–MCH2–⋯–MCH2–MCH3.
Finally, Algorithm 1 considers adjustment parameters σj constant gain for molecular behaviors φj since φC in (1) is a normalized product form of a polynomial used in the least squares estimates (LSEs) method. In fact, consider the equivalence (7) when reasoning with AHNs. Where the set of p values are coefficients of the polynomial form of φC of grade d≤eC(7)σφC(x)=pdxd+pd-1xd-1+⋯+p1x+p0=σ∏i=1d≤eC(x-φHi),x∈ℝ.


## 2.2.3. Reasoning of Artificial Hydrocarbon Networks

Once the training is done, an artificial hydrocarbon network can be used for reasoning. In that sense, consider an input valuex0. The AHN has to be evaluated in x0; thus, the reasoning value y0 can be calculated using (8), where S is the behavior of the artificial hydrocarbon network, αi are the stoichiometric coefficients, R is the set of all intermolecular distances between molecules, and σj are the adjustment parameters
(8)y0=S(x0∣H,αi,R,σj).
Notice that, if c=1, it means that there exists one stoichiometric coefficient α1=1.


## 3. Description of the Proposed Fuzzy-Molecular Inference Model

The fuzzy-molecular inference model (FMI-model for short) is a fuzzy inference system that uses a fuzzy partition of input space in premises and artificial hydrocarbon networks in consequences as part of fuzzy implications. In this section, a detailed description of the fuzzy-molecular inference model is presented. For simplicity, through this section consider the FMI-model as a type-1 fuzzy system. In Section5, an extension to type-2 fuzzy systems is presented.LetA be a fuzzy set and its corresponding membership function μA(x) of A, for all x∈X, where X is the input domain space. In fact, the membership function is a value between 0 and 1 for representing the value of belonging x to the fuzzy set A.Also, letRi be the ith fuzzy rule of form as (9), where {x1,…,xk} is the set of variables in the antecedent, {A1,…,Ak} is the set of the fuzzy partition of input space, yi is the variable of the consequent, Mj is the jth CH-molecule of the artificial hydrocarbon network excited by the fuzzy implication process (see Section 3.3), and Δ is any T-norm function
(9)Ri:IfΔ(x1isA1,…,xkisAk),thenyiisMj.
If assuming that μΔ(x1,…,xk) is the result of the T-norm function as (10) with conjunction operator ∧, then (9) can be rewritten as (11), where φj is the molecular behavior of Mj(10)μΔ(x1,…,xk)=μA1(x1)∧⋯∧μAk(xk),(11)Ri:IfΔ(x1isA1,…,xkisAk),thenyi=φj(μΔ(x1,…,xk)).
Thus, the fuzzy-molecular inference model is finally expressed in (11). Figure 2 shows the fuzzy-molecular inference model as a block diagram. This model represents a nonlinear inference system for a given crisp input x∈X that follows three steps, that is, fuzzification, fuzzy inference engine, and defuzzification, and obtains the corresponding crisp output y∈Y, where Y represents the output. Moreover, fuzzy rules like (9) can also be expressed as a fuzzy matrix that defines a knowledge base of the problem domain. Each block in the FMI-model is detailed in the following subsections.Figure 2
Block diagram of the fuzzy-molecular inference model.


### 3.1. Fuzzification

The fuzzy-molecular inference model can be viewed as a block with inputs and outputs. Moreover, let any given system be a single-input-single-output. Then, fuzzification maps any given input variablex, also known as a linguistic variable, to a fuzzy value in the range [0,1]. In particular, this mapping occurs using a fuzzy set A and its corresponding membership function μA(x), such that (12) holds:
(12)μA:x⟼[0,1].In fact, this linguistic variable is partitioned intom different fuzzy sets {Ai}, for all i=1,…,m. For example, this fuzzy partition can be “low,” “medium,” “high.” Then, the evaluation of a given value of x is calculated using the set of membership functions μAi(x), for all i=1,…,m.The shape of all membership functions depends on the purpose of the problem domain. The literature reports different criteria and methods to do so as in [7–9, 11, 23, 24].


### 3.2. Fuzzy Inference Engine

Once the crisp value of the input is mapped to a fuzzy subspace as described in Section3.1, the next step in the fuzzy-molecular inference model is the evaluation of the antecedents in fuzzy rules like (11). In this work, the min function (13) is selected for the T-norm Δ(13)μΔ(x1,…,xk)=min{μA1(x1),…,μAk(xk)}.
Finally, the consequent value yi is equal to the valued-behavior φj of the jth CH-molecule of an artificial hydrocarbon network. Thus, the consequent value yi can be calculated using fuzzy rules (11) with the min function (13), as shown in (14)
(14)yi=φj(min{μA1(x1),…,μAk(xk)}).


### 3.3. Defuzzification

The last step in fuzzy-molecular inference model calculates the crisp value of the outputy (15) using n fuzzy rules, where yi is the consequent value and μΔi(x1,…,xk) is the fuzzy evaluation of the antecedents, for i=1,…,n. In particular, (15) is based on the well-known center of gravity [10]
(15)y=∑μΔi(x1,…,xk)·yi∑μΔi(x1,…,xk).
As noticed in Section 3.2, the fuzzy-molecular inference model requires a set of CH-molecules. In this case, let AHN be an artificial hydrocarbon network with one compound C that is made of pCH-primitive molecules with molecular behavior of the form as in (2). In this work, compound C is restricted to a linear chain of CH-molecules like in (16), where − stands for a covalent bond. Actually, the linear chain is made of 2 CH3 molecules at both extremes and (p-2)CH2 molecules in the inner chain
(16)C=M1–M2–⋯-Mj–⋯–Mp-1–Mp=CH3–CH2–⋯–CH2–⋯–CH2–CH3.
It is remarkable to say that in the fuzzy-molecular inference model, the AHN is restricted to one univariate compound with one input μΔ(x1,…,xk) defined as (13) and one output yi defined as (14). In case that a multiple-inputs-single-output (MISO) system has to be applied for a particular AHN, consider generalizing (1) as a multivariate function.


### 3.4. Knowledge Base

Since, the fuzzy-molecular inference model has a generic fuzzy inference engine, proper knowledge of a specific problem domain can be enclosed into the knowledge base (see Figure2). For instance, this knowledge base is a matrix that summarizes all fuzzy rules of the form as in (11) in the following way.(a)
For all input variablesx1,…,xk, represent all possible combinations of them using the label of each set in the fuzzy partition of inputs, such that all antecedents in the fuzzy rules will be covered.(b)
For each combination (summary of antecedents), assign the corresponding label of moleculeMj that will act when the fuzzy rule is fired.As an example of the knowledge base matrix construction, assume that there is a set of fuzzy rules like (17); thus, the knowledge base matrix for this particular system is shown in Table 1(17)R1:Ifx1isA1andx2isB2,theny1isM1,R2:Ifx1isA2andx2isB1,theny2isM1,R3:Ifx1isA1andx2isB1,theny3isM2.Table 1
Knowledge base of (17).
x
1
x
2
y
i
A
1
B
2
M
1
A
2
B
1
M
1
A
1
B
1
M
2


### 3.5. Properties of the Fuzzy-Molecular Inference Model

The fuzzy-molecular inference model combines interesting properties from both fuzzy logic and artificial hydrocarbon networks. Advantages of the FMI-model are as the following.(i)
Fuzzy partitions in the output domain might be seen as linguistic units, for example, “low,” “high.”(ii)
Fuzzy partitions have a degree of understanding (parameters are metadata).(iii)
Molecular units deal with noise and uncertainties.It is remarkable to say that molecules are excited by consequent values; thus, molecules do not model a given system, but transfer information from a fuzzy subspace to a crisp set. Moreover, molecular units have the property of filtering noise and uncertainties, especially important in real-world control applications, as described in Section5.In order to demonstrate the above advantages, an example of the application of the FIM-model in fuzzy control systems is provided in the following section. Then, Section5 presents a case study that evaluates the performance of the FIM-model in a real application with dynamic uncertainties.


## 3.1. Fuzzification

The fuzzy-molecular inference model can be viewed as a block with inputs and outputs. Moreover, let any given system be a single-input-single-output. Then, fuzzification maps any given input variablex, also known as a linguistic variable, to a fuzzy value in the range [0,1]. In particular, this mapping occurs using a fuzzy set A and its corresponding membership function μA(x), such that (12) holds:
(12)μA:x⟼[0,1].In fact, this linguistic variable is partitioned intom different fuzzy sets {Ai}, for all i=1,…,m. For example, this fuzzy partition can be “low,” “medium,” “high.” Then, the evaluation of a given value of x is calculated using the set of membership functions μAi(x), for all i=1,…,m.The shape of all membership functions depends on the purpose of the problem domain. The literature reports different criteria and methods to do so as in [7–9, 11, 23, 24].


## 3.2. Fuzzy Inference Engine

Once the crisp value of the input is mapped to a fuzzy subspace as described in Section3.1, the next step in the fuzzy-molecular inference model is the evaluation of the antecedents in fuzzy rules like (11). In this work, the min function (13) is selected for the T-norm Δ(13)μΔ(x1,…,xk)=min{μA1(x1),…,μAk(xk)}.
Finally, the consequent value yi is equal to the valued-behavior φj of the jth CH-molecule of an artificial hydrocarbon network. Thus, the consequent value yi can be calculated using fuzzy rules (11) with the min function (13), as shown in (14)
(14)yi=φj(min{μA1(x1),…,μAk(xk)}).


## 3.3. Defuzzification

The last step in fuzzy-molecular inference model calculates the crisp value of the outputy (15) using n fuzzy rules, where yi is the consequent value and μΔi(x1,…,xk) is the fuzzy evaluation of the antecedents, for i=1,…,n. In particular, (15) is based on the well-known center of gravity [10]
(15)y=∑μΔi(x1,…,xk)·yi∑μΔi(x1,…,xk).
As noticed in Section 3.2, the fuzzy-molecular inference model requires a set of CH-molecules. In this case, let AHN be an artificial hydrocarbon network with one compound C that is made of pCH-primitive molecules with molecular behavior of the form as in (2). In this work, compound C is restricted to a linear chain of CH-molecules like in (16), where − stands for a covalent bond. Actually, the linear chain is made of 2 CH3 molecules at both extremes and (p-2)CH2 molecules in the inner chain
(16)C=M1–M2–⋯-Mj–⋯–Mp-1–Mp=CH3–CH2–⋯–CH2–⋯–CH2–CH3.
It is remarkable to say that in the fuzzy-molecular inference model, the AHN is restricted to one univariate compound with one input μΔ(x1,…,xk) defined as (13) and one output yi defined as (14). In case that a multiple-inputs-single-output (MISO) system has to be applied for a particular AHN, consider generalizing (1) as a multivariate function.


## 3.4. Knowledge Base

Since, the fuzzy-molecular inference model has a generic fuzzy inference engine, proper knowledge of a specific problem domain can be enclosed into the knowledge base (see Figure2). For instance, this knowledge base is a matrix that summarizes all fuzzy rules of the form as in (11) in the following way.(a)
For all input variablesx1,…,xk, represent all possible combinations of them using the label of each set in the fuzzy partition of inputs, such that all antecedents in the fuzzy rules will be covered.(b)
For each combination (summary of antecedents), assign the corresponding label of moleculeMj that will act when the fuzzy rule is fired.As an example of the knowledge base matrix construction, assume that there is a set of fuzzy rules like (17); thus, the knowledge base matrix for this particular system is shown in Table 1(17)R1:Ifx1isA1andx2isB2,theny1isM1,R2:Ifx1isA2andx2isB1,theny2isM1,R3:Ifx1isA1andx2isB1,theny3isM2.Table 1
Knowledge base of (17).
x
1
x
2
y
i
A
1
B
2
M
1
A
2
B
1
M
1
A
1
B
1
M
2


## 3.5. Properties of the Fuzzy-Molecular Inference Model

The fuzzy-molecular inference model combines interesting properties from both fuzzy logic and artificial hydrocarbon networks. Advantages of the FMI-model are as the following.(i)
Fuzzy partitions in the output domain might be seen as linguistic units, for example, “low,” “high.”(ii)
Fuzzy partitions have a degree of understanding (parameters are metadata).(iii)
Molecular units deal with noise and uncertainties.It is remarkable to say that molecules are excited by consequent values; thus, molecules do not model a given system, but transfer information from a fuzzy subspace to a crisp set. Moreover, molecular units have the property of filtering noise and uncertainties, especially important in real-world control applications, as described in Section5.In order to demonstrate the above advantages, an example of the application of the FIM-model in fuzzy control systems is provided in the following section. Then, Section5 presents a case study that evaluates the performance of the FIM-model in a real application with dynamic uncertainties.


## 4. Design of Fuzzy-Molecular Based Controller for a DC Motor

In this section, the design of a velocity controller for a DC motor using the fuzzy-molecular inference model is described. The objective of this fuzzy-molecular controller is to show an example of how to apply the FMI-model as a fuzzy control system.


### 4.1. Definition of the DC Motor Model

For instance, consider a DC motor that regulates the velocityω of its rotor varying the input voltage v. Let G(s) be the transfer function of a given DC motor expressed in (18)
(18)G(s)=1.5s2+14s+40.02.In order to simulate the performance of the DC motor, a discrete transfer functionG(z) was obtained using (18) and a sample time of 0.01 s. The discrete model of DC motor is shown in (19)
(19)G(z)=7.16z+6.83z2-1.86z+0.87×10-5.Finally, if one supposes that DC motor is a causal, linear-time invariant system, then a difference equation of (19) can be expressed as (20), where ω is the velocity of the rotor, u is the input voltage, and k is the current sample time
(20)ω[k]=1.86ω[k-1]-0.87ω[k-2]+7.16×10-5u[k]+6.83×10-5u[k-1].


### 4.2. Design of Control Law

The following control law is designed to achieve a step response of the DC motor model (20). Assuming the control diagram of Figure 3, the control law has two inputs—the error signal ε(t) and the first derivative of error signal ε˙(t)—and one output—the input voltage u(t). Thus, a fuzzy-molecular PD controller will be designed.Figure 3
Block diagram of the PD control system implemented.Using the fuzzy-molecular inference model described in Section3, the control law is formed by three blocks: fuzzification, fuzzy inference engine, and defuzzification, as follows.


#### 4.2.1. Fuzzification

The two input variables are partitioned into five fuzzy sets: “very negative” (VN), “negative” (NN), “zero” (Z), “positive” (PP), and “very positive” (VP). Figure4 shows the fuzzy sets of the input variable ε(t), and Figure 5 shows the fuzzy sets of the input variable ε˙(t). It is remarkable that parameters in the membership functions were tuned manually, and the input domain was previously normalized.Figure 4
Fuzzy sets of the input error signal.Figure 5
Fuzzy sets of the input first derivative error signal.


#### 4.2.2. Fuzzy Inference Engine

The fuzzy inference engine for the fuzzy-molecular PD controller uses fuzzy rules of the form as in (11) with consequent values as in (14). In particular to the application, the implemented knowledge base is summarized in Table 2.Table 2
Knowledge base of the fuzzy-molecular PD controller for DC motor.
ε
ε
˙
VN
NN
Z
PP
VP
VN
MVN
MVN
MVN
MVN
MVN
NN
MVN
MVN
MVN
MVN
MNN
Z
MVN
MNN
MZ
MPP
MVP
PP
MPP
MVP
MVP
MVP
MVP
VP
MVP
MVP
MVP
MVP
MVPNotice that Table2 reports, for each combination of input values, the fired molecule. For instance, the output signal was partitioned into five CH-molecules Mj, for all j=1,…,5, that represent the action to be held. In particular, the output signal was partitioned into the following molecules: “very negative” (MVN), “negative” (MNN), “zero” (MZ), “positive” (MPP), and “very positive” (MVP).


#### 4.2.3. Defuzzification

The input voltageu(t), the input signal of the plant, is the output variable that defines the last block of the fuzzy-molecular PD controller. In order to calculate the consequent values of fuzzy rules depicted in Section 4.2.2, the five CH-molecules are proposed in Figure 6 and were found using Algorithm 1. Notice that the output variable is finally evaluated using (15), and resultant value is normalized. Finally, the adjustment parameters σj of CH-molecules are summarized in Table 3.Table 3
Adjustment parameters of molecules in the fuzzy-molecular PD controller.
CH-molecule
σ
j
MVN
+
2.41
E
-
14
MNN
-
4.97
E
-
16
MZ
0.0
MPP
-
4.43
E
-
16
MVP
-
8.85
E
-
17Figure 6
Artificial hydrocarbon network used in the fuzzy-molecular PD controller.


### 4.3. Results of the Velocity Control for a DC Motor

The fuzzy-molecular PD velocity controller for a DC motor described above was implemented and simulated. For instance, the objective of this application is to measure the performance of the system for a step response.The system was subjected to a step function as shown in Figure7. Results determine that the step response has 17% of maximum overshoot, a rise time of 0.19 s, a settling time of 0.45 s, and a maximum error of 0.002 in steady state. In order to measure the stability of the fuzzy-molecular PD controller, a phase diagram was obtained from the step response. Figure 8 shows the phase diagram of error signal versus derivative of error signal. As it can be seen in Figure 8, the fuzzy-molecular PD controller reaches a steady state near to the zero input state vector of the controller.Figure 7
Step response of the fuzzy-molecular PD controller for DC motor.Figure 8
Phase diagram derivative error signal versus error signal in the step response of the fuzzy-molecular PD controller for DC motor.Then, the step was implemented with a reference signal varying in the range from −2 to 2×1000 rpm. After 10 seconds with a sample time of 0.01 s, the step response is depicted in Figure 9, where the light line represents the reference signal and the strong line represents the actual value of angular velocity of the rotor in the DC motor. As shown in Figure 9, the fuzzy-molecular PD controller has an excellent performance.Figure 9
Step response of the fuzzy-molecular PD controller for DC motor.From the results obtained so far, it can be seen that the performance of the fuzzy-molecular PD controller has a very good quality (see Figure8). The maximum overshoot, the settling time, and the maximum error in steady state correspond to the performance of a PD controller as reported in the literature of control theory [25].On the other hand, the fuzzy-molecular PD controller was easily obtained. In this case, fuzzification was done via fuzzy sets tuned manually; however, there are other ways to find the optimal values of parameters in membership functions (see [7–9, 11, 23, 24]). In addition, defuzzification was implemented with an artificial hydrocarbon network that depends on hydrogen and adjustment parameters that can be easily found using Algorithm 1.


## 4.1. Definition of the DC Motor Model

For instance, consider a DC motor that regulates the velocityω of its rotor varying the input voltage v. Let G(s) be the transfer function of a given DC motor expressed in (18)
(18)G(s)=1.5s2+14s+40.02.In order to simulate the performance of the DC motor, a discrete transfer functionG(z) was obtained using (18) and a sample time of 0.01 s. The discrete model of DC motor is shown in (19)
(19)G(z)=7.16z+6.83z2-1.86z+0.87×10-5.Finally, if one supposes that DC motor is a causal, linear-time invariant system, then a difference equation of (19) can be expressed as (20), where ω is the velocity of the rotor, u is the input voltage, and k is the current sample time
(20)ω[k]=1.86ω[k-1]-0.87ω[k-2]+7.16×10-5u[k]+6.83×10-5u[k-1].


## 4.2. Design of Control Law

The following control law is designed to achieve a step response of the DC motor model (20). Assuming the control diagram of Figure 3, the control law has two inputs—the error signal ε(t) and the first derivative of error signal ε˙(t)—and one output—the input voltage u(t). Thus, a fuzzy-molecular PD controller will be designed.Figure 3
Block diagram of the PD control system implemented.Using the fuzzy-molecular inference model described in Section3, the control law is formed by three blocks: fuzzification, fuzzy inference engine, and defuzzification, as follows.


### 4.2.1. Fuzzification

The two input variables are partitioned into five fuzzy sets: “very negative” (VN), “negative” (NN), “zero” (Z), “positive” (PP), and “very positive” (VP). Figure4 shows the fuzzy sets of the input variable ε(t), and Figure 5 shows the fuzzy sets of the input variable ε˙(t). It is remarkable that parameters in the membership functions were tuned manually, and the input domain was previously normalized.Figure 4
Fuzzy sets of the input error signal.Figure 5
Fuzzy sets of the input first derivative error signal.


### 4.2.2. Fuzzy Inference Engine

The fuzzy inference engine for the fuzzy-molecular PD controller uses fuzzy rules of the form as in (11) with consequent values as in (14). In particular to the application, the implemented knowledge base is summarized in Table 2.Table 2
Knowledge base of the fuzzy-molecular PD controller for DC motor.
ε
ε
˙
VN
NN
Z
PP
VP
VN
MVN
MVN
MVN
MVN
MVN
NN
MVN
MVN
MVN
MVN
MNN
Z
MVN
MNN
MZ
MPP
MVP
PP
MPP
MVP
MVP
MVP
MVP
VP
MVP
MVP
MVP
MVP
MVPNotice that Table2 reports, for each combination of input values, the fired molecule. For instance, the output signal was partitioned into five CH-molecules Mj, for all j=1,…,5, that represent the action to be held. In particular, the output signal was partitioned into the following molecules: “very negative” (MVN), “negative” (MNN), “zero” (MZ), “positive” (MPP), and “very positive” (MVP).


### 4.2.3. Defuzzification

The input voltageu(t), the input signal of the plant, is the output variable that defines the last block of the fuzzy-molecular PD controller. In order to calculate the consequent values of fuzzy rules depicted in Section 4.2.2, the five CH-molecules are proposed in Figure 6 and were found using Algorithm 1. Notice that the output variable is finally evaluated using (15), and resultant value is normalized. Finally, the adjustment parameters σj of CH-molecules are summarized in Table 3.Table 3
Adjustment parameters of molecules in the fuzzy-molecular PD controller.
CH-molecule
σ
j
MVN
+
2.41
E
-
14
MNN
-
4.97
E
-
16
MZ
0.0
MPP
-
4.43
E
-
16
MVP
-
8.85
E
-
17Figure 6
Artificial hydrocarbon network used in the fuzzy-molecular PD controller.


## 4.2.1. Fuzzification

The two input variables are partitioned into five fuzzy sets: “very negative” (VN), “negative” (NN), “zero” (Z), “positive” (PP), and “very positive” (VP). Figure4 shows the fuzzy sets of the input variable ε(t), and Figure 5 shows the fuzzy sets of the input variable ε˙(t). It is remarkable that parameters in the membership functions were tuned manually, and the input domain was previously normalized.Figure 4
Fuzzy sets of the input error signal.Figure 5
Fuzzy sets of the input first derivative error signal.


## 4.2.2. Fuzzy Inference Engine

The fuzzy inference engine for the fuzzy-molecular PD controller uses fuzzy rules of the form as in (11) with consequent values as in (14). In particular to the application, the implemented knowledge base is summarized in Table 2.Table 2
Knowledge base of the fuzzy-molecular PD controller for DC motor.
ε
ε
˙
VN
NN
Z
PP
VP
VN
MVN
MVN
MVN
MVN
MVN
NN
MVN
MVN
MVN
MVN
MNN
Z
MVN
MNN
MZ
MPP
MVP
PP
MPP
MVP
MVP
MVP
MVP
VP
MVP
MVP
MVP
MVP
MVPNotice that Table2 reports, for each combination of input values, the fired molecule. For instance, the output signal was partitioned into five CH-molecules Mj, for all j=1,…,5, that represent the action to be held. In particular, the output signal was partitioned into the following molecules: “very negative” (MVN), “negative” (MNN), “zero” (MZ), “positive” (MPP), and “very positive” (MVP).


## 4.2.3. Defuzzification

The input voltageu(t), the input signal of the plant, is the output variable that defines the last block of the fuzzy-molecular PD controller. In order to calculate the consequent values of fuzzy rules depicted in Section 4.2.2, the five CH-molecules are proposed in Figure 6 and were found using Algorithm 1. Notice that the output variable is finally evaluated using (15), and resultant value is normalized. Finally, the adjustment parameters σj of CH-molecules are summarized in Table 3.Table 3
Adjustment parameters of molecules in the fuzzy-molecular PD controller.
CH-molecule
σ
j
MVN
+
2.41
E
-
14
MNN
-
4.97
E
-
16
MZ
0.0
MPP
-
4.43
E
-
16
MVP
-
8.85
E
-
17Figure 6
Artificial hydrocarbon network used in the fuzzy-molecular PD controller.


## 4.3. Results of the Velocity Control for a DC Motor

The fuzzy-molecular PD velocity controller for a DC motor described above was implemented and simulated. For instance, the objective of this application is to measure the performance of the system for a step response.The system was subjected to a step function as shown in Figure7. Results determine that the step response has 17% of maximum overshoot, a rise time of 0.19 s, a settling time of 0.45 s, and a maximum error of 0.002 in steady state. In order to measure the stability of the fuzzy-molecular PD controller, a phase diagram was obtained from the step response. Figure 8 shows the phase diagram of error signal versus derivative of error signal. As it can be seen in Figure 8, the fuzzy-molecular PD controller reaches a steady state near to the zero input state vector of the controller.Figure 7
Step response of the fuzzy-molecular PD controller for DC motor.Figure 8
Phase diagram derivative error signal versus error signal in the step response of the fuzzy-molecular PD controller for DC motor.Then, the step was implemented with a reference signal varying in the range from −2 to 2×1000 rpm. After 10 seconds with a sample time of 0.01 s, the step response is depicted in Figure 9, where the light line represents the reference signal and the strong line represents the actual value of angular velocity of the rotor in the DC motor. As shown in Figure 9, the fuzzy-molecular PD controller has an excellent performance.Figure 9
Step response of the fuzzy-molecular PD controller for DC motor.From the results obtained so far, it can be seen that the performance of the fuzzy-molecular PD controller has a very good quality (see Figure8). The maximum overshoot, the settling time, and the maximum error in steady state correspond to the performance of a PD controller as reported in the literature of control theory [25].On the other hand, the fuzzy-molecular PD controller was easily obtained. In this case, fuzzification was done via fuzzy sets tuned manually; however, there are other ways to find the optimal values of parameters in membership functions (see [7–9, 11, 23, 24]). In addition, defuzzification was implemented with an artificial hydrocarbon network that depends on hydrogen and adjustment parameters that can be easily found using Algorithm 1.


## 5. Case Study: Fuzzy-Molecular Based Position Controller for a DC Motor

In this section, the design of a position controller for a DC motor using the fuzzy-molecular inference model is described. The objective of this case study is to improve type-2 fuzzy control systems using the fuzzy-molecular inference model.


### 5.1. Description of the Hardware

The following case study was implemented on a trainer hardware module. It is prepared for sending reference signals (i.e., from a knob) and feedback signals (i.e., the current position of a DC motor) to a host in which a control law is running. The correction signal computed is sent back to the trainer module in order to feed a DC motor. In particular to this case study, a NI CompactRIO reconfigurable and embedded system based on field programmable gate arrays (FPGA) is used as the host. Figure10 shows the overall system.Figure 10
Overall system of the case study showing the trainer hardware module, the NI CompactRIO host, and the LabVIEW client for monitoring the system.In addition, LabVIEW software is used for programming the control law on the NI CompactRIO and for monitoring the performance of the fuzzy-molecular control system.On one hand, both the reference signalr(t) that comes from a knob and the position signal y(t) are in the voltage range [0.0,5.0]V, where 0.0V represents an angle of 0° and 5.0V represents an angle of 180°. On the other hand, the correction signal u(t) is the input voltage of the DC motor in the range [0.0,5.0]V, where 0.0V represents the maximum angular velocity of the motor to rotate counterclockwise, 5.0V represents the maximum angular velocity of the motor to rotate clockwise, and 2.5V means no rotation.It is remarkable to say that the position of the DC motor increases in counterclockwise direction and decreases in clockwise direction.


### 5.2. Design of Control Law

The following control law is designed to achieve a reference tracking response of the DC motor in the trainer model. Assuming the control diagram of Figure11, the control law has two inputs—the error signal ε(t) and the first derivative of the position signal y˙(t)—and one output—the input voltage u(t). Thus, a fuzzy-molecular PD controller will be designed.Figure 11
Block diagram of the position control system implemented.Using the fuzzy-molecular inference model described in Section3, the control law is designed as follows.


#### 5.2.1. Fuzzification

The two input variables are partitioned into three type-2 fuzzy sets: “negative” (N), “zero” (Z), and “positive” (P). Figure12 shows the fuzzy sets for input ε(t), and Figure 13 shows the fuzzy sets for input y˙(t). It is remarkable to say that parameters in the membership functions were tuned manually.Figure 12
Fuzzy sets of the input error signal. Solid line: primary membership function. Dashed line: secondary membership function.Figure 13
Fuzzy sets of the input first derivative position signal. Solid line: primary membership function. Dashed line: secondary membership function.As shown in Figures12 and 13, type-2 fuzzy sets are determined by primary membership function μAU(x) but also considers an additional value of uncertainty: the secondary membership function μAL(x). The region inside these two membership functions is known as the footprint of uncertainty FOU [10, 14] as expressed in (21)
(21)FOU(A)=⋃x∈X(μAL(x),μAU(x)).Then, two membership values (from primary and secondary functions) are computed for one input value. Moreover, if the secondary membership function coincides with the primary membership function, type-2 is reduced to an equivalent type-1 fuzzy system.


#### 5.2.2. Fuzzy Inference Engine

The fuzzy inference engine for the fuzzy-molecular position controller uses fuzzy rules of the form as in (11) of both primary and secondary membership values (μAL(x),μAU(x)). Consequent values yL and yU are similarly obtained as (15) for both primary and secondary membership values, respectively. The resultant knowledge base is summarized in Table 4.Table 4
Knowledge base of the fuzzy-molecular position controller for the DC motor in the trainer module.
ε
y
˙
N
Z
P
N
MCW
MCW
MCW
Z
MCW
MH
MCCW
P
MCCW
MCCW
MCCWAs noted in Table4, the output signal was partitioned into three CH-molecules Mj,forallj=1,…,3, that represent the action to be held. In particular, the output signal was partitioned into the following molecules: “clockwise” (MCW), “halt” (MH), and “counterclockwise” (MCCW).


#### 5.2.3. Defuzzification

In order to calculate the consequent values of fuzzy rules depicted in Table4, the three CH-molecules are proposed in Figure 14 and were found using Algorithm 1. The adjustment parameters σj of CH-molecules are summarized in Table 5.Table 5
Adjustment parameters of molecules in Figure6.
CH-molecule
σ
j
MCW
-
1.0
MH
0.0
MCCW
1.0Figure 14
Artificial hydrocarbon network used in the fuzzy-molecular position controller.In this case study, the Nie-Tan method [26] is used for computing the final value of the output variable u(t) for a type-2 fuzzy system because of its simplicity of computation. Other methods like Karnik-Mendel, Greenfield-Chiclana, or Wu-Mendel might be used [10, 12–14, 26]. The method generates a type reduction [26] of the form as in (22), where y is the crisp output value u(t)(22)y=yL+yU2.


## 5.1. Description of the Hardware

The following case study was implemented on a trainer hardware module. It is prepared for sending reference signals (i.e., from a knob) and feedback signals (i.e., the current position of a DC motor) to a host in which a control law is running. The correction signal computed is sent back to the trainer module in order to feed a DC motor. In particular to this case study, a NI CompactRIO reconfigurable and embedded system based on field programmable gate arrays (FPGA) is used as the host. Figure10 shows the overall system.Figure 10
Overall system of the case study showing the trainer hardware module, the NI CompactRIO host, and the LabVIEW client for monitoring the system.In addition, LabVIEW software is used for programming the control law on the NI CompactRIO and for monitoring the performance of the fuzzy-molecular control system.On one hand, both the reference signalr(t) that comes from a knob and the position signal y(t) are in the voltage range [0.0,5.0]V, where 0.0V represents an angle of 0° and 5.0V represents an angle of 180°. On the other hand, the correction signal u(t) is the input voltage of the DC motor in the range [0.0,5.0]V, where 0.0V represents the maximum angular velocity of the motor to rotate counterclockwise, 5.0V represents the maximum angular velocity of the motor to rotate clockwise, and 2.5V means no rotation.It is remarkable to say that the position of the DC motor increases in counterclockwise direction and decreases in clockwise direction.


## 5.2. Design of Control Law

The following control law is designed to achieve a reference tracking response of the DC motor in the trainer model. Assuming the control diagram of Figure11, the control law has two inputs—the error signal ε(t) and the first derivative of the position signal y˙(t)—and one output—the input voltage u(t). Thus, a fuzzy-molecular PD controller will be designed.Figure 11
Block diagram of the position control system implemented.Using the fuzzy-molecular inference model described in Section3, the control law is designed as follows.


### 5.2.1. Fuzzification

The two input variables are partitioned into three type-2 fuzzy sets: “negative” (N), “zero” (Z), and “positive” (P). Figure12 shows the fuzzy sets for input ε(t), and Figure 13 shows the fuzzy sets for input y˙(t). It is remarkable to say that parameters in the membership functions were tuned manually.Figure 12
Fuzzy sets of the input error signal. Solid line: primary membership function. Dashed line: secondary membership function.Figure 13
Fuzzy sets of the input first derivative position signal. Solid line: primary membership function. Dashed line: secondary membership function.As shown in Figures12 and 13, type-2 fuzzy sets are determined by primary membership function μAU(x) but also considers an additional value of uncertainty: the secondary membership function μAL(x). The region inside these two membership functions is known as the footprint of uncertainty FOU [10, 14] as expressed in (21)
(21)FOU(A)=⋃x∈X(μAL(x),μAU(x)).Then, two membership values (from primary and secondary functions) are computed for one input value. Moreover, if the secondary membership function coincides with the primary membership function, type-2 is reduced to an equivalent type-1 fuzzy system.


### 5.2.2. Fuzzy Inference Engine

The fuzzy inference engine for the fuzzy-molecular position controller uses fuzzy rules of the form as in (11) of both primary and secondary membership values (μAL(x),μAU(x)). Consequent values yL and yU are similarly obtained as (15) for both primary and secondary membership values, respectively. The resultant knowledge base is summarized in Table 4.Table 4
Knowledge base of the fuzzy-molecular position controller for the DC motor in the trainer module.
ε
y
˙
N
Z
P
N
MCW
MCW
MCW
Z
MCW
MH
MCCW
P
MCCW
MCCW
MCCWAs noted in Table4, the output signal was partitioned into three CH-molecules Mj,forallj=1,…,3, that represent the action to be held. In particular, the output signal was partitioned into the following molecules: “clockwise” (MCW), “halt” (MH), and “counterclockwise” (MCCW).


### 5.2.3. Defuzzification

In order to calculate the consequent values of fuzzy rules depicted in Table4, the three CH-molecules are proposed in Figure 14 and were found using Algorithm 1. The adjustment parameters σj of CH-molecules are summarized in Table 5.Table 5
Adjustment parameters of molecules in Figure6.
CH-molecule
σ
j
MCW
-
1.0
MH
0.0
MCCW
1.0Figure 14
Artificial hydrocarbon network used in the fuzzy-molecular position controller.In this case study, the Nie-Tan method [26] is used for computing the final value of the output variable u(t) for a type-2 fuzzy system because of its simplicity of computation. Other methods like Karnik-Mendel, Greenfield-Chiclana, or Wu-Mendel might be used [10, 12–14, 26]. The method generates a type reduction [26] of the form as in (22), where y is the crisp output value u(t)(22)y=yL+yU2.


## 5.2.1. Fuzzification

The two input variables are partitioned into three type-2 fuzzy sets: “negative” (N), “zero” (Z), and “positive” (P). Figure12 shows the fuzzy sets for input ε(t), and Figure 13 shows the fuzzy sets for input y˙(t). It is remarkable to say that parameters in the membership functions were tuned manually.Figure 12
Fuzzy sets of the input error signal. Solid line: primary membership function. Dashed line: secondary membership function.Figure 13
Fuzzy sets of the input first derivative position signal. Solid line: primary membership function. Dashed line: secondary membership function.As shown in Figures12 and 13, type-2 fuzzy sets are determined by primary membership function μAU(x) but also considers an additional value of uncertainty: the secondary membership function μAL(x). The region inside these two membership functions is known as the footprint of uncertainty FOU [10, 14] as expressed in (21)
(21)FOU(A)=⋃x∈X(μAL(x),μAU(x)).Then, two membership values (from primary and secondary functions) are computed for one input value. Moreover, if the secondary membership function coincides with the primary membership function, type-2 is reduced to an equivalent type-1 fuzzy system.


## 5.2.2. Fuzzy Inference Engine

The fuzzy inference engine for the fuzzy-molecular position controller uses fuzzy rules of the form as in (11) of both primary and secondary membership values (μAL(x),μAU(x)). Consequent values yL and yU are similarly obtained as (15) for both primary and secondary membership values, respectively. The resultant knowledge base is summarized in Table 4.Table 4
Knowledge base of the fuzzy-molecular position controller for the DC motor in the trainer module.
ε
y
˙
N
Z
P
N
MCW
MCW
MCW
Z
MCW
MH
MCCW
P
MCCW
MCCW
MCCWAs noted in Table4, the output signal was partitioned into three CH-molecules Mj,forallj=1,…,3, that represent the action to be held. In particular, the output signal was partitioned into the following molecules: “clockwise” (MCW), “halt” (MH), and “counterclockwise” (MCCW).


## 5.2.3. Defuzzification

In order to calculate the consequent values of fuzzy rules depicted in Table4, the three CH-molecules are proposed in Figure 14 and were found using Algorithm 1. The adjustment parameters σj of CH-molecules are summarized in Table 5.Table 5
Adjustment parameters of molecules in Figure6.
CH-molecule
σ
j
MCW
-
1.0
MH
0.0
MCCW
1.0Figure 14
Artificial hydrocarbon network used in the fuzzy-molecular position controller.In this case study, the Nie-Tan method [26] is used for computing the final value of the output variable u(t) for a type-2 fuzzy system because of its simplicity of computation. Other methods like Karnik-Mendel, Greenfield-Chiclana, or Wu-Mendel might be used [10, 12–14, 26]. The method generates a type reduction [26] of the form as in (22), where y is the crisp output value u(t)(22)y=yL+yU2.


## 6. Results and Discussion

In order to demonstrate that the fuzzy-molecular inference model for fuzzy control systems can be used as an alternative of type-2 fuzzy control systems, two experiments were done. The first experiment considers a type-1 fuzzy controller system and the second experiment considers a type-2 fuzzy controller system. In both cases, the FIM-model based fuzzy control system designed in Section5 is compared with a Mamdani’s fuzzy controller system using the same parameters. The output variable was partitioned for the Mamdani’s fuzzy controller system into three type-2 fuzzy sets: “clockwise” (CW), “halt” (H), and “counterclockwise” (CCW). Figure 15 shows this partition for the output variable u(t).Figure 15
Fuzzy sets of the output correction signal. Solid line: primary membership function. Dashed line: secondary membership function.


### 6.1. Performance of the Type-1 Fuzzy-Molecular Controller

For this experiment, the fuzzy-molecular position controller for a DC motor described in Section5 was reduced to a type-1 fuzzy system by only considering the primary membership functions in the fuzzification step, as well as in the Mamdani’s fuzzy controller.The system was subjected to a step function without noise as shown in Figure16. Results of the FMI controller determine that it had a step response of 0% of maximum overshoot, a rise time of 1.0 s, and a maximum error of 2.5° in steady state. On the other hand, the system was subjected to a step function with 35% of noise as shown in Figure 17. Results of the FMI controller reports a 0% of maximum overshooting, a rise time of 1.1 s, and a maximum error of 5.8° in steady state measured from position 180°. For contrasting, Table 6 summarizes the overall results of the FMI and Mamdani fuzzy controllers.Table 6
Experimental results of type-1 fuzzy controllers.
Fuzzy controller
Noise (%)
Rise time (s)
Steady-stateerror (°)
Step Response
FIM
0.0
1.0
2.5
Mamdani
0.0
2.0
4.7
FIM
35.0
1.1
5.8
Mamdani
35.0
2.5
5.5
Ramp response
FIM
0.0
—
3.6
Mamdani
0.0
—
6.7
FIM
35.0
—
11.0
Mamdani
35.0
—
12.3Figure 16
Step response without noise of FMI and Mamdani type-1 fuzzy controllers.Figure 17
Step response with 35% noise of FMI and Mamdani type-1 fuzzy controllers.Notice in Figure16 that the response of the FMI controller is 50% faster than the response of the Mamdani controller and has a less value of maximum error in steady state than then Mamdani controller. In comparison, Figure 17 shows that both fuzzy controllers are well stable as measured (5.8° and 5.5° of maximum error in steady state). However, FMI controller is still faster (1.1 s of rise time) than the response of the Mamdani controller (2.5 s of rise time). As noted, FMI controller has a better response for dynamic uncertainties than the Mamdani controller.Also, the system was subjected to a ramp function without noise as shown in Figure18. Results determine that the FIM controller has a maximum error of 3.6° in steady state while the Mamdani controller has 6.7°. On the other hand, the system was subjected to a ramp function with 35% of noise as shown in Figure 19. The FMI controller reports 11.0° of maximum error in steady state, and the Mamdani controller reports 12.3°. Also, Table 6 summarizes the overall results of this experiment with respect to the response of FMI and Mamdani fuzzy controllers.Figure 18
Ramp response without noise of FMI and Mamdani type-1 fuzzy controllers.Figure 19
Ramp response with 35% noise of FMI and Mamdani type-1 fuzzy controllers.It is evident from Table6 that both fuzzy controllers decrease their performance in presence of noise. However, the FIM controller can track the reference signal better than the Mamdani controller, as shown in the steady-state error. In addition, note that the FMI controller is slightly faster than the Mamdani controller.


### 6.2. Performance of the Type-2 Fuzzy-Molecular Controller

For this experiment, the type-2 fuzzy-molecular position controller for a DC motor described in Section5 was implemented as well as the type-2 Mamdani controller.Again, the system was subjected to a step function with 35% noise and without it as shown in Figures20 and 21, respectively. The same process was done with a ramp function, and the responses of both controllers are shown in Figures 22 and 23, respectively. The overall results are summarized in Table 7.Table 7
Experimental results of type-2 fuzzy controllers.
Fuzzy controller
Noise (%)
Rise time (s)
Steady-stateerror (°)
Step Response
FIM
0.0
1.0
2.5
Mamdani
0.0
2.4
4.7
FIM
35.0
1.0
5.0
Mamdani
35.0
2.6
5.5
Ramp response
FIM
0.0
—
3.8
Mamdani
0.0
—
3.7
FIM
35.0
—
9.1
Mamdani
35.0
—
12.1Figure 20
Step response without noise of FMI and Mamdani type-2 fuzzy controllers.Figure 21
Step response with 35% noise of FMI and Mamdani type-2 fuzzy controllers.Figure 22
Ramp response without noise of FMI and Mamdani type-2 fuzzy controllers.Figure 23
Ramp response with 35% noise of FMI and Mamdani type-2 fuzzy controllers.As noted from Tables6 and 7, the step responses of both FIM and Mamdani type-2 fuzzy controllers remain similar to type-1 controllers, as expected. Thus, type-1 and type-2 FIM fuzzy controllers are slightly equivalent with or without perturbations.From Figures22 and 23, it can be seen that the response of type-2 fuzzy controllers slightly better than type-1 controllers, as expected [10, 12–14, 26]. From the point of view of ramp response, the FIM controller presents similar performance to the Mamdani controller without noise (3.8° and 3.7° maximum steady-state errors, resp.). Again, both controllers present the same tendency when they are exposed to noise, and in comparison with type-1 controllers, type-2 fuzzy controllers act slightly better as found in Tables 6 and 7 (FIM: 17.2% better, Mamdani: 1.7% better).


### 6.3. Discussion of FIM-Models

On one hand, from the above results, fuzzy-molecular inference models can achieve fuzzy control applications. Moreover, these FIM-model based controllers can be used as an alternative of type-2 fuzzy control systems. This statement comes from the evaluation and comparison of step and ramp responses between the FIM-controller designed in Section5 and the Mamdani fuzzy controller; both models subjected to static and dynamic uncertainties. In this case study, a Mamdani’s fuzzy control system was used because it is the fuzzy inference system most implemented in industry as reported in the literature [10, 14].On the other hand, it is important to distinguish the fuzzy-molecular inference model from other fuzzy inference models like Takagi-Sugeno inference systems or Mamdani’s fuzzy control systems [7–9, 11]. Thus, Table 8 presents a comparative chart of the FMI-model, Takagi-Sugeno’s model, and Mamdani’s model.Table 8
Comparative chart of different fuzzy inference models.
FMI-model
Takagi-Sugeno
Mamdani
Defuzzification
AHNs
Polynomial functions
Membership functions
Definition of parameters
Hydrogen valuesAdjustment values
Coefficients
Parameters of membership functions
Mappings in defuzzification
Membership values to output values
Input values to output values
Membership values to output valuesFrom Table8, defuzzification process in each fuzzy inference model is different. As FMI-model uses artificial hydrocarbon networks, each molecule represents a linguistic partition of the output variable. In the above results, simple CH-molecules were implemented, but either complex molecules can be used. Thus, defuzzification can have complex nonlinear mappings in the FMI-model. In contrast, Takagi-Sugeno’s model uses polynomial functions, and Mamdani’s model represents linguistic partitions with membership functions associated with fuzzy sets. Parameters inside artificial hydrocarbon networks are hydrogen and adjustment values, polynomial coefficients for Takagi-Sugeno’s model, and parameters of membership functions in Mamdani’s model.In addition, molecules in FMI-model make a mapping from membership or truth-values to output values also dealing with uncertainties. This is remarkable because Takagi-Sugeno’s model maps from input values to output values, and using fuzzy inference values linearly acts on the final output value. At last, Mamdani’s model makes a mapping from membership values to output values. In fact, the fuzzy-molecular inference model combines linguistic partitions of output variables with molecular structures.


## 6.1. Performance of the Type-1 Fuzzy-Molecular Controller

For this experiment, the fuzzy-molecular position controller for a DC motor described in Section5 was reduced to a type-1 fuzzy system by only considering the primary membership functions in the fuzzification step, as well as in the Mamdani’s fuzzy controller.The system was subjected to a step function without noise as shown in Figure16. Results of the FMI controller determine that it had a step response of 0% of maximum overshoot, a rise time of 1.0 s, and a maximum error of 2.5° in steady state. On the other hand, the system was subjected to a step function with 35% of noise as shown in Figure 17. Results of the FMI controller reports a 0% of maximum overshooting, a rise time of 1.1 s, and a maximum error of 5.8° in steady state measured from position 180°. For contrasting, Table 6 summarizes the overall results of the FMI and Mamdani fuzzy controllers.Table 6
Experimental results of type-1 fuzzy controllers.
Fuzzy controller
Noise (%)
Rise time (s)
Steady-stateerror (°)
Step Response
FIM
0.0
1.0
2.5
Mamdani
0.0
2.0
4.7
FIM
35.0
1.1
5.8
Mamdani
35.0
2.5
5.5
Ramp response
FIM
0.0
—
3.6
Mamdani
0.0
—
6.7
FIM
35.0
—
11.0
Mamdani
35.0
—
12.3Figure 16
Step response without noise of FMI and Mamdani type-1 fuzzy controllers.Figure 17
Step response with 35% noise of FMI and Mamdani type-1 fuzzy controllers.Notice in Figure16 that the response of the FMI controller is 50% faster than the response of the Mamdani controller and has a less value of maximum error in steady state than then Mamdani controller. In comparison, Figure 17 shows that both fuzzy controllers are well stable as measured (5.8° and 5.5° of maximum error in steady state). However, FMI controller is still faster (1.1 s of rise time) than the response of the Mamdani controller (2.5 s of rise time). As noted, FMI controller has a better response for dynamic uncertainties than the Mamdani controller.Also, the system was subjected to a ramp function without noise as shown in Figure18. Results determine that the FIM controller has a maximum error of 3.6° in steady state while the Mamdani controller has 6.7°. On the other hand, the system was subjected to a ramp function with 35% of noise as shown in Figure 19. The FMI controller reports 11.0° of maximum error in steady state, and the Mamdani controller reports 12.3°. Also, Table 6 summarizes the overall results of this experiment with respect to the response of FMI and Mamdani fuzzy controllers.Figure 18
Ramp response without noise of FMI and Mamdani type-1 fuzzy controllers.Figure 19
Ramp response with 35% noise of FMI and Mamdani type-1 fuzzy controllers.It is evident from Table6 that both fuzzy controllers decrease their performance in presence of noise. However, the FIM controller can track the reference signal better than the Mamdani controller, as shown in the steady-state error. In addition, note that the FMI controller is slightly faster than the Mamdani controller.


## 6.2. Performance of the Type-2 Fuzzy-Molecular Controller

For this experiment, the type-2 fuzzy-molecular position controller for a DC motor described in Section5 was implemented as well as the type-2 Mamdani controller.Again, the system was subjected to a step function with 35% noise and without it as shown in Figures20 and 21, respectively. The same process was done with a ramp function, and the responses of both controllers are shown in Figures 22 and 23, respectively. The overall results are summarized in Table 7.Table 7
Experimental results of type-2 fuzzy controllers.
Fuzzy controller
Noise (%)
Rise time (s)
Steady-stateerror (°)
Step Response
FIM
0.0
1.0
2.5
Mamdani
0.0
2.4
4.7
FIM
35.0
1.0
5.0
Mamdani
35.0
2.6
5.5
Ramp response
FIM
0.0
—
3.8
Mamdani
0.0
—
3.7
FIM
35.0
—
9.1
Mamdani
35.0
—
12.1Figure 20
Step response without noise of FMI and Mamdani type-2 fuzzy controllers.Figure 21
Step response with 35% noise of FMI and Mamdani type-2 fuzzy controllers.Figure 22
Ramp response without noise of FMI and Mamdani type-2 fuzzy controllers.Figure 23
Ramp response with 35% noise of FMI and Mamdani type-2 fuzzy controllers.As noted from Tables6 and 7, the step responses of both FIM and Mamdani type-2 fuzzy controllers remain similar to type-1 controllers, as expected. Thus, type-1 and type-2 FIM fuzzy controllers are slightly equivalent with or without perturbations.From Figures22 and 23, it can be seen that the response of type-2 fuzzy controllers slightly better than type-1 controllers, as expected [10, 12–14, 26]. From the point of view of ramp response, the FIM controller presents similar performance to the Mamdani controller without noise (3.8° and 3.7° maximum steady-state errors, resp.). Again, both controllers present the same tendency when they are exposed to noise, and in comparison with type-1 controllers, type-2 fuzzy controllers act slightly better as found in Tables 6 and 7 (FIM: 17.2% better, Mamdani: 1.7% better).


## 6.3. Discussion of FIM-Models

On one hand, from the above results, fuzzy-molecular inference models can achieve fuzzy control applications. Moreover, these FIM-model based controllers can be used as an alternative of type-2 fuzzy control systems. This statement comes from the evaluation and comparison of step and ramp responses between the FIM-controller designed in Section5 and the Mamdani fuzzy controller; both models subjected to static and dynamic uncertainties. In this case study, a Mamdani’s fuzzy control system was used because it is the fuzzy inference system most implemented in industry as reported in the literature [10, 14].On the other hand, it is important to distinguish the fuzzy-molecular inference model from other fuzzy inference models like Takagi-Sugeno inference systems or Mamdani’s fuzzy control systems [7–9, 11]. Thus, Table 8 presents a comparative chart of the FMI-model, Takagi-Sugeno’s model, and Mamdani’s model.Table 8
Comparative chart of different fuzzy inference models.
FMI-model
Takagi-Sugeno
Mamdani
Defuzzification
AHNs
Polynomial functions
Membership functions
Definition of parameters
Hydrogen valuesAdjustment values
Coefficients
Parameters of membership functions
Mappings in defuzzification
Membership values to output values
Input values to output values
Membership values to output valuesFrom Table8, defuzzification process in each fuzzy inference model is different. As FMI-model uses artificial hydrocarbon networks, each molecule represents a linguistic partition of the output variable. In the above results, simple CH-molecules were implemented, but either complex molecules can be used. Thus, defuzzification can have complex nonlinear mappings in the FMI-model. In contrast, Takagi-Sugeno’s model uses polynomial functions, and Mamdani’s model represents linguistic partitions with membership functions associated with fuzzy sets. Parameters inside artificial hydrocarbon networks are hydrogen and adjustment values, polynomial coefficients for Takagi-Sugeno’s model, and parameters of membership functions in Mamdani’s model.In addition, molecules in FMI-model make a mapping from membership or truth-values to output values also dealing with uncertainties. This is remarkable because Takagi-Sugeno’s model maps from input values to output values, and using fuzzy inference values linearly acts on the final output value. At last, Mamdani’s model makes a mapping from membership values to output values. In fact, the fuzzy-molecular inference model combines linguistic partitions of output variables with molecular structures.


## 7. Conclusions

In this paper, a new fuzzy algorithm based on artificial hydrocarbon networks called fuzzy-molecular inference model (FMI-model) was proposed, taking advantage of the power of molecular units of information. In this approach, molecules of artificial hydrocarbon networks are implemented as fuzzy partitions in the output domain. Since the FMI-model is based on AHNs, properties of molecules are inherited. Two characteristics of the proposed fuzzy-molecular inference model are both interpretation of linguistic molecules and partial understanding of fuzzy partitions via metaparameters in AHNs.In that way, the novel fuzzy algorithm treats molecules as fuzzy partitions of the output variable, transferring information from a fuzzy subspace to a crisp set, allowing to set the number of fuzzy partitions linguistically, but also these molecules are characterized by hydrogen values that can be referred to as meta-data information, giving the opportunity to partially understand the molecular behavior. Moreover, the proposed fuzzy-molecular inference model has some advantages in comparison with other fuzzy inference systems. For instance, FMI-model occupies parameters with meta-data information in comparison with Mamdani’s inference system in which parameters associated with membership functions do not reveal important information of the fuzzy partition. If parameters are meta-data information, it is easier to tune fuzzy partitions because both experts and real data information coming from the system can be combined into a single unit, no matter how complex the mapping is. In addition, since FMI-model does not model a given system like Takagi-Sugeno’s inference system, it preserves a more natural way of defuzzification from a fuzzy subspace to a crisp set. Finally, since molecules in artificial hydrocarbon networks can filter information [18, 19], the fuzzy-molecular inference model also shares this property allowing to deal with uncertain data.Thus, the proposed fuzzy-molecular inference model has three steps: fuzzification, fuzzy inference engine, and defuzzification. Specially, molecules are mappings from implication values to output variables. In addition, in this work, a linear chain ofCH-primitive molecules was used, but the FMI-model allows complex molecules associated with each fuzzy rule handling complex nonlinear mappings from fuzzy subspaces to crisp sets.On the other hand, the proposed model was applied to control the angular velocity of a simulated DC motor in which the results confirm that the FMI-model can be used in control applications. Furthermore, a case study was presented in which the FMI-model was used for controlling the position of a real DC motor. Experimental results demonstrate that fuzzy-molecular based control systems can deal with uncertainties as type-2 fuzzy control systems do. Then, it suggests that FMI-based controllers can be used as an alternative of type-2 fuzzy control systems. In practical applications where hardware restricts the operational computations or memory storage, FMI-based controllers can be implemented because of its simplicity.Future research considers the design of training procedures for optimality in molecules at the defuzzification stage of FMI-models. In addition, since artificial hydrocarbon networks are considered under the class of learning algorithms, the usage of molecular units in FMI-models might be applied for online adaptation (learning and evolution) of the overall fuzzy control system to improve its performance.



---

*Source: 531031-2013-09-23.xml*