Membership functions
DifferenceSigmoid membership function
FuzzyLogic.DifferenceSigmoidMF
— Typestruct 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
— Typestruct GaussianMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Gaussian membership function $e^{-\frac{(x-μ)²}{2σ²}}$.
Fields
mu::Real
: mean $μ$.sig::Real
: standard deviation $σ$.
Example
mf = GaussianMF(5.0, 1.5)
GeneralizedBell membership function
FuzzyLogic.GeneralizedBellMF
— Typestruct GeneralizedBellMF{T<:Real, S<:Real} <: FuzzyLogic.AbstractMembershipFunction
Generalized Bell membership function $\frac{1}{1+\vert\frac{x-c}{a}\vert^{2b}}$.
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
— Typestruct LinearMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Linear membership function. If $a < b$, 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
— Typestruct 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
— Typestruct 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
— Typestruct 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
— Typestruct SShapeMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
S-shaped membership function.
Fields
a::Real
: foot.b::Real
: shoulder.
Example
mf = SShapeMF(1, 8)
SemiElliptic membership function
FuzzyLogic.SemiEllipticMF
— Typestruct SemiEllipticMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Semi-elliptic membership function.
Fields
cd::Real
: center.rd::Real
: semi-axis.
Example
mf = SemiEllipticMF(5.0, 4.0)
Sigmoid membership function
FuzzyLogic.SigmoidMF
— Typestruct SigmoidMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Sigmoid membership function $\frac{1}{1+e^{-a(x-c)}}$.
Fields
a::Real
: parameter controlling the slope of the curve.c::Real
: center of the slope.
Example
mf = SigmoidMF(2, 5)
Singleton membership function
FuzzyLogic.SingletonMF
— Typestruct SingletonMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Singleton membership function. Equal to one at a single point and zero elsewhere.
Fields
c::Real
: Point at which the membership function has value 1.
Example
mf = SingletonMF(4)
Trapezoidal membership function
FuzzyLogic.TrapezoidalMF
— Typestruct 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
— Typestruct 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
— Typestruct 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
— Typestruct WeightedMF{MF<:FuzzyLogic.AbstractMembershipFunction, T<:Real} <: FuzzyLogic.AbstractMembershipFunction
A membership function scaled by a parameter $0 ≤ w ≤ 1$.
mf::FuzzyLogic.AbstractMembershipFunction
: membership function.w::Real
: scaling factor.
Example
mf = 0.5 * TriangularMF(1, 2, 3)
ZShape membership function
FuzzyLogic.ZShapeMF
— Typestruct ZShapeMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunction
Z-shaped membership function.
Fields
a::Real
: shoulder.b::Real
: foot.
Example
mf = ZShapeMF(3, 7)