Fuzzy Logic Tools
v1.0.5.1

Fuzzy Logic Tools (FLT) is a C++ framework for storage, analysis and design of fully general multipleinput multipleoutput (MIMO) TakagiSugeno fuzzy control systems, without constraints in the order of either the inputs or the output vectors.
FLT has been developed from research works of the Dr. Antonio Javier Barragán Piña under the direction of the Professor of Engineering Systems and Automation, Dr. José Manuel Andújar Márquez, both belonging to the "Control and Robotics" research group of the University of Huelva.
FLT is designed to store general Takagi Sugeno (TS) fuzzy systems, without restriction on size of input and output vectors. FLT nor limit the type or distribution of the membership functions used, even it allows mixing of different membership functions in the same antecedent. The storage of fuzzy models is done using the Membership, Rule and System classes. There are many tools that can store fuzzy models similarly, and even more flexible as it does FLT. However, the biggest advantage of FLT are the analysis and design functions that are implemented for the type of fuzzy system defined above:
In utilities.hpp some functions that may be of interest to the handling of fuzzy systems are defined, for example, the reading/writing of fuzzy systems from/in text files, the evaluation of a fuzzy control system in closed loop, the extraction of a subsystem from a given fuzzy system, etc.
Functions grouped in derivatives.hpp calculate several the derivatives of a fuzzy system. These calculations may be of interest for the analysis and design of fuzzy control systems. For example, it is possible to calculate the derivatives of a fuzzy system with respect to its inputs or parameters, or obtain a linearized model of a fuzzy system at a given point.
Since the functions provided by derivative.hpp, several methods for the parametric adaptaition of fuzzy systems have been developed based on the extended Kalman filter. These algorithms are in Kalman.hpp.
Kalman.hpp implements the adaptation of a fuzzy model by the extended Kalman filter from the derivatives included in derivatives.hpp.
In aux_matlab.hpp some util functions to use with MATLAB© API are defined, as the reading/writing of fuzzy models from/to MATLAB©, and the conversion of rowmajor matrices in columnmajor and vice versa.
Finally, several examples of programming MEX functions are presented, which can be useful for the analysis and design of fuzzy control systems using MATLAB©.
Fuzzy Logic Tools (FLT) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Fuzzy Logic Tools uses GNU Scientific Library (GSL) and Template Numerical Toolkit (TNT).
For more information, please contact with authors.
Copyright (c) 20042011
Department of Electronic Engineering, Computer Systems and Automation, University of Huelva (Spain).
Special thanks to José Manuel Martín Ramos for his continued support.
You can download the latest versions of the FLT and access to forums and bugs tracking system at http://sourceforge.net/projects/fuzzylogictools.
Additional information, news and related projects are available from the FLT website: http://uhu.es/antonio.barragan/flt.
If you would like to refer the Fuzzy Logic Tools (FLT) in a journal paper or similar, the recommended way is to cite this reference manual or following papers:
A.J. Barragán and J.M. Andújar, Fuzzy Logic Tools Reference Manual, ISBN 9788415147329, http://uhu.es/antonio.barragan/flt
Andújar, J. M. and Barragán, A. J. (2005). A methodology to design stable nonlinear fuzzy control systems. Fuzzy Sets and Systems, 154(2):157–181.
Andújar, J. M., Barragán, A. J., and Gegúndez, M. E. (2009). A general and formal methodology for designing stable nonlinear fuzzy control systems. IEEE Transactions on Fuzzy Systems, 17(5):1081–1091.
Barragán Piña, A. J. (2009). Síntesis de sistemas de control borroso estables por diseño. ISBN 9788492944729. University of Huelva. http://uhu.es/antonio.barragan/thesis
Andújar, J. M. and Barragán, A. J. (2010). A formal methodology for the analysis and design of nonlinear fuzzy control systems. In Fuzzy Systems (FUZZ), 2010 IEEE International Conference on, number 1, pages 66–74, Barcelona, Spain.
Barragán Piña, A. J., Andújar Márquez, J. M., Aznar Torres, M., and Jiménez Avello, A. (2011a). Methodology for adapting the parameters of a fuzzy system using the extended Kalman filter. In 7th conference of the European Society for Fuzzy Logic and Technology, EUSFLAT (LFA2011), AixlesBains, France.
Barragán Piña, A. J., Andújar Márquez, J. M., Aznar Torres, M., and Jiménez Avello, A. (2011b). Practical application of the extended Kalman filter to fuzzy modeling. In 7th conference of the European Society for Fuzzy Logic and Technology, EUSFLAT (LFA2011), AixlesBains, France.
FLT has been written in C++. This software has been compiled and tested, in 32 and 64 bits architectures, on GNU/Linux using GCC and on Microsoft© operating systems using MinGW (http://www.mingw.org). FLT can be used to make MATLAB© function via MATLAB© API.
FLT is source code, so you do not need to be installed. If you wish, you can copy the directory "flt" to a route included in the search path of your compiler, for example, "/usr/include" in GNU/Linux or "C:\MinGW\include" if you use MinGW in Microsoft Windows©.
This example program obtains the output of a closed loop fuzzy system and its jacobian matrix.
The example.cpp file is in the docs folder. You can compile it from this folder using this sentence:
For test this example function with the Plant.txt and Controller.txt from matlab_utilities folder, use:
The output should coincide approximately with:
Fuzzy Logic Tools (FLT) software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. It is your responsibility to validate the behavior of the routines and their accuracy using the source code provided, or to purchase support and warranties from commercial redistributors. Consult the GNU General Public license for further details.