If input and output are known in advance for a system then how to choose membership function in fuzzy logic control? Also, How to design a fuzzy rule base for fuzzy controller? Is there any specific way to choose fuzzy rule base?
If you know the exact control input that produces the desired system output, why do you need the fuzzy control? Without fully understanding the context of your control problem, you will probably get the following sample answers:
“Do-As-I-Do” trick (e.g., I suggest you to pick the bell-shaped MF because I did it),
Train the ANFIS based on the reliable I/O data, and
Use Deep Learning to “learn” information directly from the I/O data. (Nothing to do with the fuzzy logic)
Perhaps, you can provide a little more info about the process that you intend to control using fuzzy logic.
Dear Yew-Chung Chak , I have an Active magnetic bearing system that is initially displaced from the central position need to stabilized. I want to use fuzzy logic to stabilize the system. So how to choose membership function and fuzzy rule base for that?
If you have the math model for the active magnetic bearing (AMB) system, then design the feedback controllers for x- and y-axes to stabilize the position of the rotating shaft. If you have the feedback controllers, then it maybe much easier to design the fuzzy controllers.
Fuzzy logic control can be implemented by the following steps
1.Defining of input and its membership function(i.e open MatLab type fuzzy and click on input to open the membership function )
2. Defining members function (input)as per your input data( drag the membership valve as per the data range)
3. Defining members function (output )as per your output data( drag the membership valve as per the data range)
4 Defining of Rules (i..e click on mandani block (select input and output as per rule requirement and click on add rule )
5.click on system(defuzzification/mandani) block to open the rule editor and then open the view tab and click rules to see the defuzzified output(crisp output)
If you are using MATLAB, then you maybe able to build a fuzzy system based on the procedure posted by Dr. K V Thulasi Ram. However, you will still face some difficulties in the design when you do not understand how fuzzy control works.
Taking your AMB for example, you probably know that you want to construct a two-input, one output system for each of the axial controller (X & Y). For mechanical motions, it is common to take the position and velocity measurements as the inputs, and the force will be the output.
From the beginning, you need to decide whether to choose Mamdani or Sugeno. When it comes to the Membership Functions (MFs), you need to decide on the range (default is [-1, 1]), the number of MFs (default is 3), the type of MF (default is triangular), and the parameters that determine the size and central position of the MF (default is symmetrical and evenly distributed).
After that, you need to build the If-Then Rules based on your personal knowledge or by a heuristic process (proceeding to a solution by trial and error). If you are not an expert in AMB, it may take a long time to guesstimate which rules are effective. Furthermore, as the number of inputs/MFs increases, the number of rules increases exponentially, making the design lengthy and more complicated (not to mention about the rigorous process of the stability proof).
Theoretically, we should make the design more scientific rather than more complicated. That's the reason I suggested you to first construct a stabilizing math-based feedback control law because it is relatively easy to transform the law to a full-fledged fuzzy controller by tuning the shapes of the MFs. The Takagi-Sugeno Fuzzy Modeling & Parallel Distributed Compensation (PDC) is also a very popular systematic fuzzy control design method.
Selecting a membership function for the system is really important part of fuzzy logic. if you used the same size of membership function, it will give very small accuracy for the system. Therefore defining membership function in a dynamic manner will improve the production of fuzzy controller
There are different types of membership functions in FL systems, such as Triangular, Trapezoidal, Piecewise linear, Gaussian, Singleton. The selection of membership function depends on input and output variation. The most of data consist liner behavior we can use linear membership functions such as Triangular MF. If that data consists nonlinear behavior we can use nonlinear shapes such as Gaussian, Singleton. During the developing fuzzy sets we placed membership functions together near the stable region as in the paper ( 10.13140/RG.2.2.15620.07041/1 ). The rule base depends on output accuracy if you nee more accuracy of out put, you need to increase number of rules.
You may try to design your own FLC and optimize the MFs like this paper posted on https://www.researchgate.net/publication/344638760_Dimensioning_and_Power_Management_of_Hybrid_Energy_Storage_Systems_for_Electric_Vehicles_with_Multiple_Optimization_Criteria