Membership functions
DifferenceSigmoid membership function
#
FuzzyLogic.DifferenceSigmoidMF
— Type
struct DifferenceSigmoidMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Difference of two sigmoids. See also SigmoidMF
.
Fields
-
a1::Real
: slope of the first sigmoid. -
c1::Real
: center of the first sigmoid. -
a2::Real
: slope of the second sigmoid. -
c2::Real
: center of the second sigmoid.
Example
mf = DifferenceSigmoidMF(5, 2, 5, 7)
Gaussian membership function
#
FuzzyLogic.GaussianMF
— Type
struct GaussianMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Gaussian membership function .
Fields
-
mu::Real
: mean . -
sig::Real
: standard deviation .
Example
mf = GaussianMF(5.0, 1.5)
GeneralizedBell membership function
#
FuzzyLogic.GeneralizedBellMF
— Type
struct GeneralizedBellMF{T<:Real, S<:Real} <: FuzzyLogic.AbstractMembershipFunction
Generalized Bell membership function .
Fields
-
a::Real
: Width of the curve, the bigger the wider. -
b::Real
: Slope of the curve, the bigger the steeper. -
c::Real
: Center of the curve.
Example
mf = GeneralizedBellMF(2, 4, 5)
Linear membership function
#
FuzzyLogic.LinearMF
— Type
struct LinearMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Linear membership function. If , it is increasing (S-shaped), otherwise it is decreasing (Z-shaped).
Fields
-
a::Real
: foot. -
b::Real
: shoulder.
Example
mf = LinearMF(2, 8)
PiShape membership function
#
FuzzyLogic.PiShapeMF
— Type
struct PiShapeMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Π-shaped membership function.
Fields
-
a::Real
: left foot. -
b::Real
: left shoulder. -
c::Real
: right shoulder. -
d::Real
: right foot.
Example
mf = PiShapeMF(1, 4, 5, 10)
PiecewiseLinear membership function
#
FuzzyLogic.PiecewiseLinearMF
— Type
struct PiecewiseLinearMF{T<:Real, S<:Real} <: FuzzyLogic.AbstractMembershipFunction
Piecewise linear membership function.
Fields
-
points::Array{Tuple{T, S}, 1} where {T<:Real, S<:Real}
Notes
If the input is between two points, its membership degree is computed by linear interpolation. If the input is before the first point, it has the same membership degree of the first point. If the input is after the last point, it has the same membership degree of the first point.
Example
mf = PiecewiseLinearMF([(1, 0), (2, 1), (3, 0), (4, 0.5), (5, 0), (6, 1)])
ProductSigmoid membership function
#
FuzzyLogic.ProductSigmoidMF
— Type
struct ProductSigmoidMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Product of two sigmoids. See also SigmoidMF
.
Fields
-
a1::Real
: slope of the first sigmoid. -
c1::Real
: center of the first sigmoid. -
a2::Real
: slope of the second sigmoid. -
c2::Real
: center of the second sigmoid.
Example
mf = ProductSigmoidMF(2, 3, -5, 8)
SShape membership function
#
FuzzyLogic.SShapeMF
— Type
struct SShapeMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
S-shaped membership function.
Fields
-
a::Real
: foot. -
b::Real
: shoulder.
Example
mf = SShapeMF(1, 8)
Sigmoid membership function
#
FuzzyLogic.SigmoidMF
— Type
struct SigmoidMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Sigmoid membership function .
Fields
-
a::Real
: parameter controlling the slope of the curve. -
c::Real
: center of the slope.
Example
mf = SigmoidMF(2, 5)
Trapezoidal membership function
#
FuzzyLogic.TrapezoidalMF
— Type
struct TrapezoidalMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Trapezoidal membership function.
Fields
-
a::Real
: left foot. -
b::Real
: left shoulder. -
c::Real
: right shoulder. -
d::Real
: right foot.
Example
mf = TrapezoidalMF(1, 3, 7, 9)
Triangular membership function
#
FuzzyLogic.TriangularMF
— Type
struct TriangularMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Triangular membership function.
Fields
-
a::Real
: left foot. -
b::Real
: peak. -
c::Real
: right foot.
Example
mf = TriangularMF(3, 5, 7)
Type2 membership function
#
FuzzyLogic.Type2MF
— Type
struct Type2MF{MF1<:FuzzyLogic.AbstractMembershipFunction, MF2<:FuzzyLogic.AbstractMembershipFunction} <: FuzzyLogic.AbstractMembershipFunction
A type-2 membership function.
-
lo::FuzzyLogic.AbstractMembershipFunction
: lower membership function. -
hi::FuzzyLogic.AbstractMembershipFunction
: upper membership function.
Example
mf = 0.7 * TriangularMF(3, 5, 7) .. TriangularMF(1, 5, 9)
Weighted membership function
#
FuzzyLogic.WeightedMF
— Type
struct WeightedMF{MF<:FuzzyLogic.AbstractMembershipFunction, T<:Real} <: FuzzyLogic.AbstractMembershipFunction
A membership function scaled by a parameter .
-
mf::FuzzyLogic.AbstractMembershipFunction
: membership function. -
w::Real
: scaling factor.
Example
mf = 0.5 * TriangularMF(1, 2, 3)
ZShape membership function
#
FuzzyLogic.ZShapeMF
— Type
struct ZShapeMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Z-shaped membership function.
Fields
-
a::Real
: shoulder. -
b::Real
: foot.
Example
mf = ZShapeMF(3, 7)