In classical set theory, there are two options for an element. It is either a member of a set or not. But in fuzzy set theory, there are membership functions to define the "rate" of an element being a member of a set. In other words, classical logic says it is all black or white, but fuzzy logic offers that there is also grey which has shades between white and black.

Matlab Simulink Library is very easy to design and helpful in practice. And it has good examples on its own, like deciding about tips for a dinner looking at service and food quality. In the figure below, some various membership functions from Matlab's library are shown:

enter image description here

My question: How do we decide which membership function to use while designing a fuzzy controller system?

I mean, in general, not only in Matlab Simulink. I have seen Triangular and Gaussian functions are used mostly in practice, but how can we decide which function will give a better result for decision making? Do we need to train a neural network to decide which function is better depending on the problem and its rules? What are other solutions?

  • 2
    $\begingroup$ Do you have data to start with? I would select the member functions to approximately match the data you try to model. The function will depend on the problem you are trying to solve. The simplest way would be to plot your data and select the best match. However, this won't work with complex data space. How complex is your problem? What is the dimensionality of your problem space? $\endgroup$ Feb 9, 2017 at 14:22
  • $\begingroup$ @zlobi.wan.kenobi Thank you for kind comment, and sorry for being late to reply. I dont have a data set to start with. My question was a general one. I was confused about how to choose membership functions according to different problems. For example, it can be "disease decision" from blood examination, building self resulting system looking at different values. There is pure fuzzyness in this problem, since examination values have a wide scale. I understood about rule making, I just wondered if there is another way while choosing most suitable membership funtion, beside using neural networks? $\endgroup$
    – buzzer
    Feb 14, 2017 at 17:07
  • 1
    $\begingroup$ You can do some research on Adaptive Neuro-Fuzzy Inference System! $\endgroup$
    – kiner_shah
    Jan 7, 2018 at 7:00

1 Answer 1


First I need to note that there is no prescribed/best way to choose the shape of membership function in fuzzy systems, that's the fuzziness in it. One could argue that the best way is to ask an expert in the field where you are going to apply your fuzzy solution but those are not always available.

With that said, fuzzy membership functions are used to describe the distribution of probabilities in real world for the variable you are trying to use in your fuzzy controller. That means you go out in the real world, you look at the system you are trying to control, you try your best to understand how it works and reacts to different outside changes and based on your findings you choose the shape that best fits. Or if you want you may call this process heuristic choice (something like that, I do not like theory very much).

On top of that you need to realize one important thing, the shape of membership function does not have big impact on the resulting controller behavior. The most influencing parts are the Fuzzy Rules and their inference methods you use in your controller, but that is a different topic. So no matter what you choose it will not make a big difference.

Gaussian functions are most commonly used because of the character of the world we are living in. Many people argue that everything in the world has Gaussian distribution (everyone is entitled to their opinion). And the triangular functions are used because they are the simplest alternative that is somewhat similar to Gaussian function.

But if you absolutely need to chose the best one for your particular problem. There always are Simulation tools that exists precisely for this purpose. One of them is Matlab Simulink as you mentioned, but there are others if you don't like the price of the Matlab.

My suggestion is, go with your gut, test it in safe environment and if it works then deploy it to the real world.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .