Effacer les filtres
Effacer les filtres

[Fuzzy Logic] How to advise the membership functions and plot the graph

15 vues (au cours des 30 derniers jours)
Junghwan
Junghwan le 7 Fév 2023
Commenté : Junghwan le 16 Fév 2023
Dear all,
I'm struggling to reslove the issue how to advise the membership functions and plot the graph in fuzzy logic inference system.
Please help me and it will be highly appreciated if you could give me a hand.
I made the FIS with 4 inputs and 1 output and 81 rules as following;
[System]
Name='Fuzzy'
Type='mamdani'
Version=2.0
NumInputs=4
NumOutputs=1
NumRules=81
AndMethod='min'
OrMethod='max'
ImpMethod='min'
AggMethod='max'
DefuzzMethod='centroid'
[Input1]
Name='General'
Range=[0 10]
NumMFs=3
MF1='low':'gaussmf',[1.5 0]
MF2='medium':'gaussmf',[1.5 5]
MF3='high':'gaussmf',[1.5 10]
figure(1)
subplot(2,1,1)
plotMF1(fis, 'Input1', 1), grid on, title('Input 1: Amount of Dirt')
subplot(2,1,2)
plotMF2(fis, 'input', 2), grid on, title('Input 2: Amount of Grease')
[Input2]
Name='Fuel_receiving_and_refueling_area'
Range=[0 10]
NumMFs=3
MF1='low':'gaussmf',[1.5 0]
MF2='medium':'gaussmf',[1.5 5]
MF3='high':'gaussmf',[1.5 10]
[Input3]
Name='Reactor_area'
Range=[0 10]
NumMFs=3
MF1='low':'gaussmf',[1.5 0]
MF2='medium':'gaussmf',[1.5 5]
MF3='high':'gaussmf',[1.5 10]
[Input4]
Name='Spent_fuel_pool_area'
Range=[0 10]
NumMFs=3
MF1='low':'gaussmf',[1.5 0]
MF2='medium':'gaussmf',[1.5 5]
MF3='high':'gaussmf',[1.5 10]
[Output1]
Name='Safeguardability'
Range=[0 10]
NumMFs=5
MF1='Very_low':'trimf',[-2.5 0 2.5]
MF2='Low':'trimf',[0 2.5 5]
MF3='Medium':'trimf',[2.5 5 7.5]
MF4='High':'trimf',[5 7.5 10]
MF5='Very_high':'trimf',[7.5 10 12.5]
[Rules]
1 1 1 1, 1 (1) : 2
1 1 1 2, 2 (1) : 2
1 1 1 3, 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, 3 (1) : 2
3 1 3 1, 3 (1) : 2
3 1 3 2, 3 (1) : 2
3 1 3 3, 4 (1) : 2
3 2 1 1, 3 (1) : 2
3 2 1 2, 3 (1) : 2
3 2 1 3, 3 (1) : 2
3 2 2 1, 3 (1) : 2
3 2 2 2, 3 (1) : 2
3 2 2 3, 4 (1) : 2
3 2 3 1, 3 (1) : 2
3 2 3 2, 4 (1) : 2
3 2 3 3, 4 (1) : 2
3 3 1 1, 3 (1) : 2
3 3 1 2, 3 (1) : 2
3 3 1 3, 4 (1) : 2
3 3 2 1, 3 (1) : 2
3 3 2 2, 4 (1) : 2
3 3 2 3, 4 (1) : 2
3 3 3 1, 4 (1) : 2
3 3 3 2, 4 (1) : 2
3 3 3 3, 5 (1) : 2
Q1. Is it necessary to have 81(=3*3*3*3) rules?
Q2. How I will be able to plot the membership graphs such as an example as following?
FYI, I will integrate this FIS into App designer with slider which give the numeric inputs as following;
I'd like to display the defuzzification graph on the UIaxes when I push the "Process" button like the follolwing example;

Réponse acceptée

Raghvi
Raghvi le 14 Fév 2023
Hey Junghwan,
I understand that you are trying to identify the number of rules required for the fuzzy system. Additionally, you would also like to plot the membership function graphs to implement them using app designer.
From my understanding you do not need all permutations of rules to create a fuzzy system. Although, it is a good practice to add as many rules as possible to achieve accuracy in your system. Refer to the following documentation to understand more about If-Then Rules:
To plot the membership function, refer to the following:
>> fis = readfis('<filename>')
>> plotmf(fis,'input',1)
You can go through plotmf function documentation to understand more about the function and use it as per your need:
To display the plot in app designer, refer to the following documentation:
  1 commentaire
Junghwan
Junghwan le 16 Fév 2023
Thanks for valuable and prompt feedback! I will try to follow your feedback:)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Fuzzy Inference System Modeling dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by