Skip to content

Spike

Spike

Bases: Term

Extended Term that represents the spike membership function.

Equation

\(\mu(x)=h \exp\left(-\left|\dfrac{10}{w} (x - c)\right|\right)\)

where

  • \(h\): height of the Term
  • \(w\): width of the Spike
  • \(c\): center of the Spike

Attributes

center instance-attribute

center = center

width instance-attribute

width = width

Functions

__init__

__init__(name: str = '', center: float = nan, width: float = nan, height: float = 1.0) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
center float

center of the Spike

nan
width float

width of the Spike

nan
height float

height of the Term

1.0

configure

configure(parameters: str) -> None

Configure the term with the parameters.

Parameters:

Name Type Description Default
parameters str

center width [height].

required

membership

membership(x: Scalar) -> Scalar

Computes the membership function evaluated at \(x\).

Parameters:

Name Type Description Default
x Scalar

scalar

required

Returns:

Type Description
Scalar

\(\mu(x)=h \exp\left(-\left|\dfrac{10}{w} (x - c)\right|\right)\)

parameters

parameters() -> str

Return the parameters of the term.

Returns:

Type Description
str

center width [height].