How to create sigmoidal membership functions? Need help with parameter 'a'

4 views (last 30 days)
I need to plot around 18 sigmoidal membership functions using the Fuzzy Logic Toolbox for a neuro-fuzzy controller. To plot the membership function, we use the formula:
I have understood that c to be the inflection point, i.e., the point where we take the slope of the membership function, but I have problems analysing and determining a. Depending on the value of a, we can naturally get different values of a. However, when you add, say 3 sigmoidal membership functions, the fuzzy toolbox automatically assigns values of the parameters a and c to each membership function. I can easily understand how we get the value of c, but can anyone please tell me how we get the value of a? I'm in a fix here and any help will be appreciated.
So to sum things up:
I need to know how the slope is determined and hence the parameter a.

Answers (1)

Sam Chak
Sam Chak on 12 Apr 2025
where the membership values are computed for each input x, and the parameters a and c denote the logistic growth rate and the x-coordinate of the sigmoid’s midpoint, respectively. Then, the slope of the sigmoid at the midpoint is one-fourth of the logistic growth rate.
Proof: Let m denote the slope of the sigmoid at its midpoint, and let the logistic growth rate be given by . The slope of the sigmoid at a given point corresponds to the first derivative of the function at that point. The derivative of the logistic sigmoid function (also referred to as the logistic distribution) is given by
syms x a c m
%% logistic sigmoid function
a = 4*m;
f(x) = 1/(1 + exp(-a*(x - c)));
%% 1st-order derivative
df = simplify(diff(f), 'steps', 100)
df(x) = 
This expression represents the slope of the tangent to the logistic sigmoidal curve at any point x. Substituting (the midpoint) into the derivative yields
%% the slope at the midpoint x = c
dfc = subs(df, x, c)
dfc(x) = 
m
Hence, the slope of the sigmoid at the midpoint is m, and since , it follows that the slope at the midpoint is one-fourth of the logistic growth rate.
Demo:
fis = mamfis;
fis = addInput(fis, [-1 +1], 'Name', 'x');
a = 8; % logistic growth rate
c = 0; % sigmoid’s midpoint
fis = addMF(fis, 'x', 'sigmf', [-a c], 'Name', 'N');
fis = addMF(fis, 'x', 'sigmf', [ a c], 'Name', 'P');
npt = 2001;
plotmf(fis, 'input', 1, npt), hold on
x = linspace(-1, 1, npt);
L1 = -a/4*x + 0.5; % Line 1: m·x + intercept_at_y_axis
L2 = a/4*x + 0.5; % Line 2
plot(x, [L1; L2]), grid on, hold off
text(-0.4-0.04, 1.05, 'L1')
text( 0.4-0.04, 1.05, 'L2')
ylim([-0.2, 1.2])
title('Logistic Sigmoidal Membership Functions')

Categories

Find more on Fuzzy Logic Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!