# Fuzzy Logic Controller: Choosing Membership Function

In classical set theory there is 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 "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 tip for a dinner looking at service and food quality. In the figure below some various membership functions from Matlab's library are shown:

My question: How do we decide about choosing membership functions 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 practise, 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 problem and its rules? What are other solutions?

• 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? – zlobi.wan.kenobi Feb 9 '17 at 14:22
• I'm voting to close this question as off-topic (see scope defined in help center). At present it would rather migrate to Signal Processing (?) to get an answer. – Eric Platon Feb 14 '17 at 3:21
• @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? – buzzer Feb 14 '17 at 17:07
• You can do some research on Adaptive Neuro-Fuzzy Inference System! – kiner_shah Jan 7 '18 at 7:00
• @EricPlaton, Fuzzy systems and neural networks are indeed a subset of AI and as mentioned in the help center, we can discuss about concepts of AI here. So, I agree with @buzzer! – kiner_shah Jan 7 '18 at 7:02