Explanation of The Simple Implementation of IT2FLC
Explanation of The Simple Implementation of IT2FLC
Introduction
Here we present a simple method of implementing interval type-2 fuzzy logic controllers (IT2-FLCs) in
MATLAB. The method is based on simplifying the representation of the IT2-FL inference mechanism.
For detailed explanation of the method, please refer to the following article (reference [1]); [Abuelenin,
Sherif M., and Abdel-Kader, Rabab F. "Closed-Form Mathematical Representations of Interval Type-2
Fuzzy Logic Systems." arXiv preprint arXiv:1706.05593 (2017)].
The Simulink file provides a simulation of balancing an inverted pendulum using the discussed IT2-FLC
mechanisms.
Two different m-files are provided, each of them implements a different IT2 fuzzy inference mechanism.
Each file is programmed as MATLAB function that has two inputs and one output.
All the controllers provided use three membership functions for each input, as seen in the figure below.
To control the spread of the membership functions (i.e. their positions) you may use gains, as explained
later. Alternatively, or if you would like to add more membership functions, you may modify the m-files.
The three used Gaussian membership functions (for each input) have the following properties;
Where bi indicates the positions of the ith output (the centers of the output membership functions). The
values for these can be changed in the code according to your own rule-base.
The controllers can be called in Simulink using the “interpreted MATLAB function” block. Inside the
block, enter either “IT2FLCgenNTExct(u(1),u(2)) or IT2FLCgenExct(u(1),u(2)) .
Please note the following;
• To simplify the design, the poisitions of the input fuzzy membership functions are fixed, and
distributed uniformally between -1 and +1.
• The two saturation blocks ‘Saturation’ and ‘Saturation1’ are used to limit the inputs to a maximum
and minimum values of +1 and -1, consecuitively.
• The input gains ‘Gain1’ and ‘Gain2’ are used to control the spread of the input membership
functions. Changing them will rescale the axes. (For gains < 1, the membership functions are
uniformly spread-outand for gains > 1, the membership functions are uniformly contracted
[Passino, Chapter 2]).
• The output gain ‘Gain’ is used to control the spread of the output membership functions. Changing
it will scale the vertical axis of the controller surface.
• Increasing ‘Gain1’ is analogous to increasing the proportional gain in a PD controller (i.e., it will
often make the system respond faster). Increasing the gain ‘Gain2’ is analogous to increasing the
derivative gain in a PD controller. See [Passino, Chapter 2] for detailed explanation.
References:
K. M. Passino, S. Yurkovich, and M. Reinfrank, Fuzzy control, Vol. 2725. Reading, MA: Addison-Wesley,
(1998).