1. Role of membership functions
Fuzzy logic systems are widely used for control, system identification, pattern recognition problems, and many more applications from industry to academia. The membership functions (MFs) play vital role in the overall performance of fuzzy representation. The MFs are the building blocks of fuzzy set theory, that is, fuzziness in a fuzzy set is determined by its MF. Accordingly, the shapes of MFs are important for a particular problem since they effect on a fuzzy inference system. They may have different shapes such as triangular, trapezoidal, Gaussian, and so forth. The only condition a MF must really satisfy is that it must vary between 0 and 1.
2. How to choose an appropriate membership function?
The MFs can be of any shape and form as long as it maps the given data with desirable degree of memberships. As far as choice of MFs is concerned, it is us to decide. This is where fuzzy system offers individual degrees of freedom. With experience, one will come to know which shape of MF is good for the application under consideration.
As there are infinite number of ways to characterize fuzziness, there are infinite number of ways to graphically depict the MFs that describe this fuzziness. The choice of which of the methods to use depends entirely on the problem size and problem type. Instead of choosing the shape of MF, setting the interval and number of MFs are also very important. For instance, to model a temperature control system by fuzzy logic, it is really important to know how many MFs are needed (e.g., low, med, and high MF) and also choosing the intervals of MFs. These two factors also have a great impact on the outcome of a fuzzy logic system.
In addition, looking at the distribution of the data is a good idea. Although, trial and error method is often used for MF shape, because there is no exact method for choosing the MFs. The shape of MFs depends on how one believes in a given linguistic variable. It is more a question of intuition then criteria. The only condition a MF must really satisfy is that it must vary between 0 and 1. The function itself can be an arbitrary curve whose shape we can define as a function that suits us from the point of view of simplicity, convenience, speed, and efficiency. Therefore, the type of MF doesnot play a crucial role in shaping how the model performs.
However, the number of MF has greater influence as it determines the computational time. Hence, the optimum model can be determined by varying the number/type of MFs for achieving best system performance. Ref.  discusses which shape is best if one uses fuzzy logic as a universal approximator. Also, a constrained interpolations scheme was developed for fitting a MF to a finite number of known membership values .
There are many references giving directions of how to choose MF [3, 4, 5, 6]. The basic problem with modeling a situation, is to break the 0–1 modeling. This can be done by using triangular MF. However, if the situation is complex and deep, we might need a special type of MF. For instance, if the problem at hand is a quantum mechanics problem, then a special MF is needed. In order to make the best choice, one needs a lot of “experience” with the given situation. This experience will tune up and best fit, the subjective choice of the researcher with the given reality. There is no objective way to do so. Thus, a high fidelity intuition based on sufficient experience will give an acceptable answer.
Generally speaking, triangular MF is one of the most encountered MF in practice. Of highly applied MFs, the triangular MFs are formed using straight lines. These straight line membership functions have the advantage of simplicity. Gaussian MFs are popular methods for specifying fuzzy sets because of their smoothness and concise notation. These curves have the advantage of being smooth and nonzero at all points.
It is advisable to use the symmetric triangular MF with 50% overlap, and then apply tuning procedure during which we can either change the left and/or right spread and/or overlapping. This is to be continued till we get satisfactory results. Same approach can be attempted for other shapes such as trapezoidal, bell-shape, and so forth.
Triangular shapes represent fuzzy numbers, while trapezoid shapes represent fuzzy intervals. These are the simplest shapes. Other different shapes can be obtained from transformations of the triangle induced by linguistic modifiers, truth-functional modifiers, compositions, projections, and other operations.
In fact, the selection of MF shape is problem specific. Based on extensive review on many literatures, it can be concluded that the triangular MF is widely used because of its simplicity. Using various MF for given problems, usually Gaussian and triangular MFs are found to be closely performing well and better than other types of MF. In specific, the triangular MF is found to be better than Gaussian MF. Zhao and Bose  compared the response of the system with various MFs and conveyed that the triangular MF is superior to any other MFs.
Indeed, if one has no priority on the shape of MFs, triangular or trapezoidal shapes are simple to implement and fast for computation. However, if one has some priorities on their shapes (e.g., from histograms on sampled data), it may be interested to build MFs with shapes derived from these a priori shapes after some smoothing if needed.
Afterwards, the question is what the optimal values of initial parameters are that we need to be aware of to make a sensible choice of the chosen MF?
In order to maximize their performance, it is often necessary to undertake a design optimization process in which the adjustable parameters defining a particular fuzzy system are tuned to maximize a given performance criterion. Using metaheuristic optimization methods and evolutionary optimization algorithms, fuzzy logic possesses the great flexibility toward its initial parameters regarding MFs .
Interested reader can find some useful information about MFs and some procedures (e.g., GA and neural network) to assign memberships to fuzzy variables . There are many articles, which have used optimization algorithms such as particle swarm optimization and genetic algorithm to find the optimal set of parameters for fuzzy models [9, 10, 11, 12].