Particle swarm algorithm in Fuzzy Logic Designer is breaking unity sum property of membership functions, how can I stop this?
Mostra commenti meno recenti
I am using the Fuzzy Logic Designer App to fine-tune a Type-I Mamdani FIS. I have preset a number of inputs with three membership functions each, using Trapezoidal->Triangular->Trapezoidal. I want to optimize the parameters of these membership functions using the built-in PSO algorithm, but when I do, it significantly warps the shape of my membership functions (see the example below).


The new membership functions do not adhere to the key property of unity, where the sum of the membership values for a given input is 1. Is there a way to stop this from happening, or should I just tune my functions empirically?
2 Commenti
Hi @Ben Hatrick
Could you please share the code that produced the unexpected result? If you used the standard triangular membership function 'trimf()' as a tunable object for the built-in PSO algorithm 'particleswarm()' to adjust the three parameters, it seems unlikely to achieve such a result unless you manually scaled the standard triangular membership function, when I attempted to construct it below.
x = 0:1e-2:5;
mf = trimf(x, [0.9 2.0 2.8]); % standard triangular MF
plot(x, mf), grid on, xticks(0:0.5:5), ylim([0, 1]), xlabel('Input'), ylabel('Degree of Membership'), title('Standard Triangular MF')
amp = 0.43; % amplitude
y = amp*mf; % scaled triangular MF
plot(x, y), grid on, xticks(0:0.5:5), ylim([0, 1]), xlabel('Input'), ylabel('Degree of Membership'), title('Scaled Triangular MF')
Ben Hatrick
il 7 Apr 2024
Risposta accettata
Più risposte (2)
Ben Hatrick
il 12 Apr 2024
0 voti
M.Sattar
il 18 Ott 2024
0 voti
I have used Fuzzy Logic Designer to tune a fuzzy logic controller, with two inputs and one output, I've selected Genetic Algorithm within the fuzzy logic designer tuning options, and after optimization was completed, the FLC indeed has been optimized, but I got that Membership function shape that seems to be not acceptable,
In your case, you mentioned that the problem lies within the PSO algorithm, which produced incompatible MF parameters. However after I used GA instead of PSO, it seems that the problem is in the FuzzyLogicDesigner code, which sometimes doesn't restrict the output of the optimization algorithm.
I thought of manually adjusting the produced MF parameters, but after doing that, I tested the FLC's performance, and it resulted in very bad performance. I hope you figured out the issue.
In my case I've created my own tuneable 2-input/1-output mamdani fuzzy logic inference system. you can check it here:

Categorie
Scopri di più su Fuzzy Logic Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





