Designing fuzzy inference system and subsystems

Hello.I have several fuzzy systems about security, all of which have 3 outputs: weak, medium and strong. In the comprehensive system, I want to enter all these fuzzy systems and in addition ask it to calculate if it sees 10 weak cases, the final output will be the vulnerable level. Is this possible? Can you guide me?

4 Comments

I want tsukaomoto fuzzy inference system Matlab work help. Please I want tutorial video on monotonic membership function output

@Haniye's post did not indicate that a Tsukamoto FIS is being used. Are you planning to use the Tsukamoto FIS for multi-criteria decision-making, as a nonlinear controller, or for approximation problems?
According to MathWorld, a function is considered monotonic if it is either entirely non-decreasing or entirely non-increasing. From a calculus perspective, this clearly implies that its first derivative does not change sign.
I have made an effort to plot all types of membership functions (MFs) from the Fuzzy Logic Toolbox. As you can see below, the toolbox offers only a limited selection of monotonic MFs, specifically three types: hard saturation (linzmf / linsmf), piecewise soft saturation (zmf / smf), and continuous soft saturation (sigmf).
Have you discovered the reason why Tsukamoto inference is limited to only monotonic output MFs? If you have found new info, you are encouraged to create a new question to allow a fresh discussion on the topic of Tsukamoto FIS.
fis = mamfis;
% Output 1 with monotonic MFs
fis = addOutput(fis, [0 10], 'Name', 'out1');
fis = addMF(fis, 'out1', 'linzmf', [ 2 8], 'Name', 'mf1'); % hard saturation (decreasing)
fis = addMF(fis, 'out1', 'zmf', [ 3 7], 'Name', 'mf2'); % piecewise soft saturation (decreasing)
fis = addMF(fis, 'out1', 'sigmf', [-5 5], 'Name', 'mf3'); % continuous soft saturation (decreasing)
fis = addMF(fis, 'out1', 'sigmf', [ 5 5], 'Name', 'mf4'); % continuous soft saturation (increasing)
fis = addMF(fis, 'out1', 'smf', [ 3 7], 'Name', 'mf5'); % piecewise soft saturation (increasing)
fis = addMF(fis, 'out1', 'linsmf', [ 2 8], 'Name', 'mf6'); % hard saturation (increasing)
% Output 2 with non-monotonic MFs
fis = addOutput(fis, [0 10], 'Name', 'out2');
fis = addMF(fis, 'out2', 'trimf', [4.0 5.0 6.0], 'Name', 'mf1'); % centermost
fis = addMF(fis, 'out2', 'gaussmf', [0.75 5.00], 'Name', 'mf2');
fis = addMF(fis, 'out2', 'gbellmf', [1.5 3.0 5.0], 'Name', 'mf3');
fis = addMF(fis, 'out2', 'gauss2mf', [0.7 3.7 0.7 6.3], 'Name', 'mf4');
fis = addMF(fis, 'out2', 'trapmf', [1.5 3.0 7.0 8.5], 'Name', 'mf5');
fis = addMF(fis, 'out2', 'pimf', [0.7 2.75 7.25 9.3], 'Name', 'mf6');
fis = addMF(fis, 'out2', 'dsigmf', [4.0 1.25 4.0 8.75], 'Name', 'mf7');
fis = addMF(fis, 'out2', 'psigmf', [5.0 0.75 -5. 9.25], 'Name', 'mf8'); % outermost
figure
subplot(211)
plotmf(fis, 'output', 1, 1001), ylim([-0.2, 1.2])
delete(findobj(gca, 'Type', 'text'));
text(0.75, 1.1, 'mf1')
text(2.25, 1.1, 'mf2')
text(3.75, 1.1, 'mf3')
text(5.00, 1.1, '\leftarrow \it{monotonically decreasing}')
text(3.75, -0.1, 'mf4')
text(2.25, -0.1, 'mf5')
text(0.75, -0.1, 'mf6')
text(5.00, -0.1, '\leftarrow \it{monotonically increasing}')
title('Monotonic membership functions')
grid on
subplot(212)
plotmf(fis, 'output', 2, 1001), ylim([-0.2, 1.2])
delete(findobj(gca, 'Type', 'text'));
title('Non-monotonic membership functions')
grid on

Fuzzy inference rule apply method and fuzzyfication and defuzification in Matlab method

I understand that Tsukamoto fuzzy inference is not supported by the Fuzzy Logic Toolbox. While this may evoke a sense of despair, it also means that you have greater flexibility to create any monotonic function you desire.
For example, I have plotted two custom Softplus membership functions below. They behave monotonically by definition.
x = linspace(-3, 3, 5001)';
%% specify Softplus MFs
d = 1.5; % drop point
c = 0; % center point
b = 5; % build-up rate
mf1 = spmf(x, [-b, c, -d]);
mf2 = spmf(x, [ b, c, d]);
%% plot monotonic MFs
plot(x, [mf1, mf2]), grid on
xlabel('x'), ylabel('Degree of membership')
title('Softplus membership functions')
text(-2.4, 1.1, 'mf1')
text( 2.1, 1.1, 'mf2')
xline(-d, '--', 'color', '#7F7F7F')
xline( d, '--', 'color', '#7F7F7F')
ylim([-0.2, 1.2])
%% Chak's Softplus membership function
function out = spmf(x, params)
d = params(3); % drop point (truncation)
c = params(2); % center point
b = params(1); % build-up rate
a = abs(1/b); % amplitude (fixed, depends on b)
sp = a*log(1 + exp(b*((x - 2*c)/(d - 2*c)*sign(b))));
out = min(sp, 1);
end
More importantly, you must be familiar with the Tsukamoto fuzzy inference formula. How does it differ from the weighted average formula used in Sugeno fuzzy inference?
Many Tsukamoto Fuzzians, particularly in the Multi-Criteria Decision-Making (MCDM) field, still use the effective yet simple VLOOKUP function in Microsoft Excel to search for the two nearest adjacent x values from two known monotonic membership values ( and ), and then perform linear interpolation to estimate the weighted average x value.

Sign in to comment.

Answers (2)

praguna manvi
praguna manvi on 9 Aug 2024
Edited: praguna manvi on 9 Aug 2024
To connect a network of fuzzy systems, you can use the “fistree” function. This allows you to build a network of fuzzy inference systems. In this case, the outputs of these three fuzzy systems can be passed to a final fuzzy system, where you can define its membership functions and rule set to evaluate the above condition.
Here is the link to the documentation on an example of connecting three fuzzy systems:

2 Comments

Thanks for your help
Could you please provide more information about the inputs to the Fuzzy Analyzer/Predictor for determining the security level? Are the terms "weak," "medium," and "strong" referring to the output membership functions? Providing additional details would allow @praguna manvi to guide you on how to properly design the fuzzy decision tree.

Sign in to comment.

For Multiple-Criteria Decision-Making (MCDM) using fuzzy logic, you should use plateau distribution type fuzzy sets that correspond to the defined linguistic variables of "Weak", "Medium", and "Strong" for the inputs to the fuzzy system. In the following example, I use two inputs: "System Technology" and "Trained Personnel."
By applying plateau-type membership functions and nine fuzzy rules, the decision-making surface will have a quarter Ziggurat-like structure. The flat plains allow you to immediately identify the security level as {"Minimum level (0)", "Low level (2.5)", "Medium level (5.0)", "High level (7.5)", "Maximum level (10)"} based on the score obtained. Any score between these levels will help you determine where the system should be upgraded to achieve the desired security level.
fis = mamfis('Name', "Haniye_Security");
%% Fuzzy Input 1: System Technology
fis = addInput(fis, [0 10], 'Name', 'System_Technology');
fis = addMF(fis, 'System_Technology', 'linzmf', [2 4 ], 'Name', 'Weak');
fis = addMF(fis, 'System_Technology', 'trapmf', [2 4 6 8], 'Name', 'Medium');
fis = addMF(fis, 'System_Technology', 'linsmf', [ 6 8], 'Name', 'Strong');
%% Fuzzy Input 2: Trained Personnel
fis = addInput(fis, [0 10], 'Name', 'Trained_Personnel');
fis = addMF(fis, 'Trained_Personnel', 'linzmf', [2 4 ], 'Name', 'Weak');
fis = addMF(fis, 'Trained_Personnel', 'trapmf', [2 4 6 8], 'Name', 'Medium');
fis = addMF(fis, 'Trained_Personnel', 'linsmf', [ 6 8], 'Name', 'Strong');
%% Fuzzy Output: Security Level
fis = addOutput(fis, [0 10], 'Name', 'Security_Level');
fis = addMF(fis, 'Security_Level', 'trimf', 0.0*[1 1 1], 'Name', 'Min');
fis = addMF(fis, 'Security_Level', 'trimf', 2.5*[1 1 1], 'Name', 'Low');
fis = addMF(fis, 'Security_Level', 'trimf', 5.0*[1 1 1], 'Name', 'Med');
fis = addMF(fis, 'Security_Level', 'trimf', 7.5*[1 1 1], 'Name', 'High');
fis = addMF(fis, 'Security_Level', 'trimf', 10.*[1 1 1], 'Name', 'Max');
%% Plot fuzzy sets
figure(1)
t = tiledlayout(2, 2, 'TileSpacing', 'Compact');
nexttile
plotmf(fis, 'input', 1, 1001), grid on, title('System Technology'), ylim([-0.2, 1.2])
nexttile
plotmf(fis, 'input', 2, 1001), grid on, title('Trained Personnel'), ylim([-0.2, 1.2])
nexttile([1 2]);
plotmf(fis, 'output', 1, 1001), grid on, title('Output Fuzzy sets for Security Level'), ylim([-0.2, 1.2])
%% Fuzzy Rules
rules = [
"System_Technology==Weak & Trained_Personnel==Weak => Security_Level=Min"
"System_Technology==Weak & Trained_Personnel==Medium => Security_Level=Low"
"System_Technology==Weak & Trained_Personnel==Strong => Security_Level=Med"
"System_Technology==Medium & Trained_Personnel==Weak => Security_Level=Low"
"System_Technology==Medium & Trained_Personnel==Medium => Security_Level=Med"
"System_Technology==Medium & Trained_Personnel==Strong => Security_Level=High"
"System_Technology==Strong & Trained_Personnel==Weak => Security_Level=Med"
"System_Technology==Strong & Trained_Personnel==Medium => Security_Level=High"
"System_Technology==Strong & Trained_Personnel==Strong => Security_Level=Max"
];
fis = addRule(fis, rules);
%% Decision-making Surface
figure(2)
opt = gensurfOptions('NumGridPoints', 51);
gensurf(fis, opt), grid on

Categories

Asked:

on 6 Aug 2024

Commented:

on 2 May 2025

Community Treasure Hunt

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

Start Hunting!