Table of Contents
Fetching ...

PyIT2FLS: A New Python Toolkit for Interval Type 2 Fuzzy Logic Systems

Amir Arslan Haghrah, Sehraneh Ghaemi

TL;DR

PyIT2FLS introduces a Python toolkit for interval type-2 fuzzy logic systems, addressing the scarcity of Python tools for IT2FLS implementation. Built on NumPy and Matplotlib, it provides two core classes, IT2FS and IT2FLS, along with utilities for defining UMF/LMF, standard and user-defined t-norms and s-norms, various type-reduction algorithms, and plotting capabilities to evaluate and visualize IT2FLS behavior. The paper demonstrates the framework through three examples: a simple IT2FLS evaluation, Mackey-Glass chaotic time-series prediction using PSO-optimized parameters, and an IT2FPID controller for a time-delay system, with results and GitHub-hosted code. Overall, PyIT2FLS offers an accessible, extensible Python solution that enables practitioners to model, simulate, and apply IT2FLSs in engineering and scientific problems, potentially accelerating practical adoption of interval type-2 fuzzy methods.

Abstract

Fuzzy logic is an accepted and well-developed approach for constructing verbal models. Fuzzy based methods are getting more popular, while the engineers deal with more daily life tasks. This paper presents a new Python toolkit for Interval Type 2 Fuzzy Logic Systems (IT2FLS). Developing software tools is an important issue for facilitating the practical use of theoretical results. There are limited tools for implementing IT2FLSs in Python. The developed PyIT2FLS is providing a set of tools for fast and easy modeling of fuzzy systems. This paper includes a brief description of how developed toolkit can be used. Also, three examples are given showing the usage of the developed toolkit for simulating IT2FLSs. First, a simple rule-based system is developed and it's codes are presented in the paper. The second example is the prediction of the Mackey-Glass chaotic time series using IT2FLS. In this example, the Particle Swarm Optimization (PSO) algorithm is used for determining system parameters while minimizing the mean square error. In the last example, an IT2FPID is designed and used for controlling a linear time-delay system. The code for the examples are available on toolkit's GitHub page: https://github.com/Haghrah/PyIT2FLS. The simulations and their results confirm the ability of the developed toolkit to be used in a wide range of the applications.

PyIT2FLS: A New Python Toolkit for Interval Type 2 Fuzzy Logic Systems

TL;DR

PyIT2FLS introduces a Python toolkit for interval type-2 fuzzy logic systems, addressing the scarcity of Python tools for IT2FLS implementation. Built on NumPy and Matplotlib, it provides two core classes, IT2FS and IT2FLS, along with utilities for defining UMF/LMF, standard and user-defined t-norms and s-norms, various type-reduction algorithms, and plotting capabilities to evaluate and visualize IT2FLS behavior. The paper demonstrates the framework through three examples: a simple IT2FLS evaluation, Mackey-Glass chaotic time-series prediction using PSO-optimized parameters, and an IT2FPID controller for a time-delay system, with results and GitHub-hosted code. Overall, PyIT2FLS offers an accessible, extensible Python solution that enables practitioners to model, simulate, and apply IT2FLSs in engineering and scientific problems, potentially accelerating practical adoption of interval type-2 fuzzy methods.

Abstract

Fuzzy logic is an accepted and well-developed approach for constructing verbal models. Fuzzy based methods are getting more popular, while the engineers deal with more daily life tasks. This paper presents a new Python toolkit for Interval Type 2 Fuzzy Logic Systems (IT2FLS). Developing software tools is an important issue for facilitating the practical use of theoretical results. There are limited tools for implementing IT2FLSs in Python. The developed PyIT2FLS is providing a set of tools for fast and easy modeling of fuzzy systems. This paper includes a brief description of how developed toolkit can be used. Also, three examples are given showing the usage of the developed toolkit for simulating IT2FLSs. First, a simple rule-based system is developed and it's codes are presented in the paper. The second example is the prediction of the Mackey-Glass chaotic time series using IT2FLS. In this example, the Particle Swarm Optimization (PSO) algorithm is used for determining system parameters while minimizing the mean square error. In the last example, an IT2FPID is designed and used for controlling a linear time-delay system. The code for the examples are available on toolkit's GitHub page: https://github.com/Haghrah/PyIT2FLS. The simulations and their results confirm the ability of the developed toolkit to be used in a wide range of the applications.

Paper Structure

This paper contains 11 sections, 5 equations, 8 figures, 9 tables.

Figures (8)

  • Figure 1: An IT2FS with trapezoidal UMF, and triangular LMF.
  • Figure 2: Sample outputs for IT2FS_plot, meet and join functions.
  • Figure 3: Outputs of the provided example.
  • Figure 4: Response of the Mackey-Glass nonlinear time delay differential equation for exact parameters.
  • Figure 5: Outputs achieved for the predictiin of Mackey-Glass time series using PyIT2FLS.
  • ...and 3 more figures