You are on page 1of 6

Toolbox for Interval Type-2 Fuzzy

Logic Systems
Mohsen Zamani
1 Hossein Nejati2 Amin T. Jahromi3 AliReza Partovi4 Sadegh H. Nobari 5 Ghasem N. Shirazi6

1
Electrical and Computer Engineering Dept, National University of Singapore, Singapore, zamani@nus.edu.sg
2
School of Computing, National University of Singapore, Singapore, nejati@nus.edu.sg
3
Electrical and Electronic Engineering School, Nanyang Technological University, Singapore, amin0005@ntu.edu.sg
4
Electrical Engineering Dept, Alame Mohaddeseh Noori Technical University, Noor, Iran, ali.partovi@gmail.com
5
School of Computing, National University of Singapore, Singapore, snobari@comp.nus.edu.sg
6
Electrical and Computer Engineering Dept, National University of Singapore, Singapore, naddafzadeh@nus.edu.sg

Abstract quate to handle all types of uncertain-


ties associated with knowledge-based
Type-2 systems has been becoming the systems. Thus, [20] introduced type-2
focus of research in the field of fuzzy FSs as an extension to his first theory
logic in recent years. Comparing with for type-1. On the other hand, type-
type-1 systems, type-2 fuzzy systems 2 theory is capable of handling 4 ma-
are more complex and relatively more jor type of uncertainties involved with
difficult to understand and implement. type-1 FS [15] .
We developed an interactive graphi- Type-1 membership function are ex-
cal user interface (GUI) based tool- act defined, whereas type-2 member-
box, MFLS tool, for interval type-2 ship function has one more degree of
fuzzy logic system. This paper presents freedom which suites them for uncer-
MFLS toolbox. Moreover, the versatil- tain environments but higher degree of
ity of the software is demonstrated via freedom brings computation complex-
an prediction problem. ity to type-2 fuzzy logic systems(FLSs).
Type-2 is much computationally inten-
Keywords: Interval Type-2 Fuzzy sive comparing to its type-1 counter-
logic System; Toolbox part. Despite their computation bur-
den, type-2 has been applied to vari-
ous type of application such as , signal
1. Introduction
processing [13, 12], pattern recognition
Fuzzy logic has obtained attention of [9, 8], time-series forecasting [10, 16],
researchers for last couple of decades. decision making [17], finance[4], wire-
It has opened new horizons both in less communication [14], noise cancel-
the academia and the industry site. lation [5], system identification [11],
Fuzzy logic proposed by Zadeh(1965) neural network [18], power engineering
has found his way during ages in many [1], control [7, 6]. Although, type-2
different applications. Although, con- has been emerging in different branch
ventional fuzzy systems (FSs) or so of science, its popularity is still not
called type-1 FSs is capable of han- comparable to its conventional coun-
dling input uncertainties, it is not ade- terpart. Type-2 has not extended its
domain due to following factors: It is well known [15] that an interval
1) Type-2 fuzzy set are computation- set µÀ (x) can be fully expressed based
ally more complex that their conven- on upper µÀ (x)and lower membership
tional counter part. function µÀ (x). Some of the most fun-
2) There is still a lack of useful tool- damental type-2 membership function
boxes to facilitate the use of type-2. are listed below:
This paper presents development
and design of a GUI and a command 1. Gaussian with uncertain mean
line programming toolbox for construc- 
 N (m1, σ; x) x < m1
tion, edition and observation of interval f À (x) = 1 m1 ≤ x ≤ m2
type-2 Fuzzy inference systems. The 
N (m2, σ; x) x > m2
MFLS tool, is an environment for im-
plementing and designing of a inter- ½ m1+m2
N (m2, σ; x) x≤ 2
val type-2 FLS (IT2FLS). MFLS cov- f À (x) = m1+m2
N (m1, σ; x) x> 2
ers all phases of the IT2FLS from first
phase till the last. The MFLS best 2. Gaussian with uncertain deviation
qualities such as flexibility which en-
ables the user to add new file, and user f À (x) = N (m, σ2 ; x)
friendly which makes it suitable for ver- f À (x) = N (m, σ1 ; x)
satile range of user from beginner to
advance. Moreover, it contains some 3. Triangular membership function
function which implement the inference with uncertain mean
engine as black box. 

 0 x < l1
In Section 2 some topics on IT2FLS is 
 x − l1

 l1 ≤ x < p1
demonstrated, in Section 3 developed 
 p1−l1
toolbox is presented; in Section MFLS f À (x) = 1 p1 ≤ x ≤ p2
is exploited for general approximation 
 r − x


2
p2 < x ≤ r2
problem. Finally, conclusion are stated 
 r − p2

 2
in Section 5 . 0 x > r2

2. Interval Type-2 Set and 
 0 x < l2

 x−l2 r1 (p2 −l2 )+l2 (r1 −p1 )
Systems p2 −l2 x≤ (p2 −l2 )+(r1 −p1 )
f À (x) = r2 −x r1 (p2 −l2 )+l2 (r1 −p1 )

 x>
Interval type-2 fuzzy set is a special 
 r2 −p2 (p2 −l2 )+(r1 −p1 )
0 x > r2
case of general type-2 set in which there
is no fuzziness in its third dimension In fuzzy reasoning the consequence
and secondary grade is just equal to set can be concluded even if the an-
identity. (1), (2) present type-2 fuzzy tecedent set does not completely satisfy
set for continuous and discrete domain, so, fuzzy reasoning is not as precise as
respectively. conventional logic. The IT2FLS is de-
Z ·Z . ¸ picted in Figure 1.
À = 1 /v x Jx ⊆ [0, 1]
x∈X v∈Jx 3. MFLS Toolbox
(1)
Mamdani IT2FLS is designed and im-
X N hX i. plemented in MFLS toolbox. In-
À = [1 /v ] xi (2) tersection operators such as product
i=1 v∈Jx
Fig. 1: IT2FLS inference structure
Fig. 3: Gaussian membership function
with uncertain mean

and minimum and union operators like


maximum or summation. Moreover,
MFLS allows the user to either choose
center of sum, center of set or centroid
as desired type reduction procedure.
The package exploits Karnik-Mendel
algorithm to obtain the type reduced
set. This package offers the user flex- Fig. 4: Gaussian membership function
ibility for handling computation time with uncertain deviation
by adjusting quantization step. MFLS
has two main parts a GUI based part
and a MATLAB part. Visual C#
based GUI helps the user to set all the
parameter and then exports set param-
eters in to MATLAB environment as a
structure variable. For instance, Fig-
ure 2 depicted the front panel of MFLS,
and Figures 3, 4, 5 depict MFLS win-
dows for some of well known type-2 Fig. 5: Triangular membership func-
membership function. tion with uncertain mean

Fig. 2: MFLS main panel


Fig. 6: Rule Base in MFLS
In this part we demonstrate a re-
quired procedure for implementing FS
with MFLS. Firstly, the cardinality of a set of fuzzy rules are shown in Figure
antecedent and consequent must be set. 6. Thirdly, for exploiting the designed
Secondly, fuzzy rules must be created, IT2FLS in MATLAB, user needs to ex-
port the IT2FLS in to MATLAB mfile process of design based on MFLS is de-
using file \ export system menu. The picted in Figure 8.
result of this part is structure vari-
able which reflects the designed sys-
tem. The block diagram in Figure 7
demonstrates the linking variable be-
tween GUI and MATLAB. The user
can modify the structure for his own
personal purpose.
Fig. 8: FS design sequence with MFLS

4. Application

In this section a general approxima-


tion problem is introduced and the
MFLS toolbox is exploited for solving
this problem. There is approximation
based on noisy data [15]. The objective
is to approximate y = 100 − x2 where
x ∈ [−10, 10]. The only access is just
available to noisy measurement. For
any test point xi , yi bounds to [yli , yui ]
so, it means that FS relies on non-crisp
data value. The Gaussian member-
ship function with uncertain mean is
desired for the outputs. There is no un-
certainty involved with inputs. Thus,
input membership function is consid-
ered to be type-1. The input and out-
put ranges are x ∈ [−10, 10], y ∈
Fig. 7: Structure variable which links [−190, 190], respectively. The single-
the GUI and MATLAB ton fuzzification and minimum, prod-
uct and center of sum are assigned for
On the other hand, some mfiles are intersection operator, product opera-
responsible for linkage between GUI tor and type reduction method, respec-
and MATLAB software. This makes tively.
the problem easy for user. Some of All antecedent sets assumed to be
the function are as follows plottype2.m, Gaussian function and their parame-
kmim.m, inference.m and etc. also, for ters are listed in Table 1 . On the other
sake of simplicity all the required func- hand, the consequent sets are Gaus-
tions are integrated in to one function sian membership function with uncer-
called type2fls.m which helps user to tain mean. The consequent parameters
deal with IT2FLS as black box. This are reported in Table 2. The FS use the
way user does not need to worry about simple rule base as following:
detail material and user just need to
concern about top level issues. The IF x is Ai THEN y is Ci .
mean deviation 5. Conclusion
A1 -10 1.25
A2 -7.5 1.25 In this paper MFLS toolbox, a toolbox
A3 -5 1.25 for type-2 FS was presented and versa-
A4 -2.5 1.25 tility of toolbox is demonstrated via an
A5 0 1.25 general approximation example. Our
A6 2.5 1.25 future work is to improve MFLS by
A7 5 1.25 adding new functions, developing more
A8 7.5 1.25 advanced GUI and integrating intelli-
A9 10 1.25 gent learning technique such as genetic
algorithm and neural network.
Table 1: Antecedent set parameters
References
mean1 mean2 deviation
C1 -7.79 6.49 40 [1] J. R. Agero and A. Vargas, Using
C2 34.72 52.93 40 type-2 fuzzy logic systems to in-
C3 66.12 84.1 40 fer the operative configuration of
C4 84.93 101.75 40 distribution networks, in Proceed-
C5 93.09 109.95 40 ings IEEE Power Engineering So-
C6 88.02 103.53 40 ciety General Meeting, pages 2379-
C7 65.37 84.32 40 2386, June 2005.
C8 34.14 50.85 40 [2] S. Auephanwiriyakul, A. Adrian,
C9 -9.62 9.62 40 and J.M. Keller, Type 2 fuzzy set
analysis in management surveys.
Table 2: Consequent set parameters in Procce IEEE International Con-
ference on Fuzzy Systems, vol. 2,
pages 1321-1325, 2002.
The design steps are mentioned in Fig- [3] S. Auephanwiriyakul, A. Adrian,
ure 8 and resultant output is depicted and J.M. Keller, Type 2 fuzzy set
in Figure 9. Although,in this example analysis in management surveys.
there were not precise access to value of in Procce IEEE International Con-
y and it varies in large scale, the type- ference on Fuzzy Systems, vol. 2,
2 FS approximates the function with pages 1321-1325, 2002.
close approximation. [4] P. Baguley, T. Page, V. Koliza,
and P. Maropoulos, Time to market
prediction using type-2 fuzzy sets.
Journal of Manufacturing Technol-
ogy Msanagement, 17(4):513-520,
2006.
[5] O. Castillo and P. Melin, Adap-
tive noise cancellation using type-
2 fuzzy logic and neural networks.
in IEEE Conference on Cybernet-
ics and Intelligent Systems, vol. 2,
pages 1351-1355, 2004.
Fig. 9: Output response
[6] J. Figuero, J. Posada, M. Melgar-
ejo, and S. Rojas, A type-2 fuzzy
controller for tracking mobile ob- eling MPEG VBR video traffic
jects in the context of robotic soccer using type- 2 fuzzy logic sys-
games.in Proceedings 2005 IEEE tems, In Granular Computing:
International Conference on Fuzzy An Emerging Paradigm, Springer-
Systems, pages 359-364, May 2005. Verlag, 2000.
[7] H. Hagras. A hierarchical type-2 [14] Q. Liang and L. Wang, Sensed sig-
fuzzy logic control architecture for nal strength forecasting for wireless
autonomous mobile robots. IEEE sensors using interval type-2 fuzzy
Transactions on Fuzzy Systems, logic system. in Proceedings 2005
12(4):524-539, August 2004. IEEE International Conference on
[8] P. Herman, G. Prasad, and T. Fuzzy Systems, pages 25-30, Reno,
M. McGinnity, Investigation of NV, May 2005.
the type-2 fuzzy logic approach [15] J. M. Mendel, Uncertain Rule-
to classification in an EEG-based Based Fuzzy Logic Systems Intro-
brain-computer interface. In Pro- duction and New Directions, En-
ceedings of the Annual Interna- glewood Cliffs, NJ: Prentice-Hall,
tional Conference-IEEE Engineer- 2001.
ing in Medicine and Biology Society [16] J. M. Mendel, Uncertainty, fuzzy
, pages 5354-5357, 2005. logic, and signal processing, Signal
[9] Jia Zeng and Zhi-Qiang Liu. Type- Proccessing , vol. 80, pages 913-933,
2 fuzzy sets for handling uncer- 2000.
tainty in pattern recognition, in [17] T. Ozen and J.M. Garibaldi. Ef-
Procceding of FUZZ-IEEE, pages fect of type-2 fuzzy membership
6597-6602, Vancouver, Canada, function shape on modelling vari-
July 2006. ation in human decision making.
[10] N. N. Karnik and J. M. Mendel, In Proceedings 2004 IEEE Inter-
Applications of type-2 fuzzy logic national Conference on Fuzzy Sys-
systems to forecasting of time- tems, vol. 2, pages 971-976, 2004.
series, Information Sciences, vol. [18] F.C.H. Rhee and C. Hwang, An
120, pages 89-111, 1999. interval type-2 fuzzy perceptron. in
[11] C. H. Lee, Y.C. Lin, and W. IEEE International Conference on
Y. Lai, Systems identification us- Fuzzy Systems, FUZZ-IEEE vol. 2,
ing type-2 fuzzy neural network pages 1331-1335, 2002.
(type-2 FNN) systems. in Proceed- [19] H. Shu and Q. Liang, Wireless
ings of IEEE International Sympo- sensor network lifetime analysis us-
sium on Computational Intelligence ing interval type-2 fuzzy logic sys-
in Robotics and Automation. Com- tems.in Proceedings 2005 IEEE In-
putational Intelligence in Robotics ternational Conference on Fuzzy
and Automation for the New Mil- Systems, pages 19-24, May 2005.
lennium, vol. 3, pages 1264-1269, [20] Zadeh, L.A,The concept of a lin-
2003. guistic variable and its application
[12] Q. Liang and J. M. Mendel, to approximate reasoning, Parts
Equalization of nonlinear time- 1, 2, and 3 Information Sciences,
varying channels using type-2 fuzzy 1975, 8:199-249, 8:301-357, 9:43-80.
adaptive filters, IEEE Transac-
tions on Fuzzy Systems, 2000.
[13] Q. Liang and J.M. Mendel, Mod-