Skip to content
Analog.NonlinearResistor.md

Analog.NonlinearResistor

This component extends from OnePort

Usage

TranslatedComponents.Analog.NonlinearResistor(Ga, Gb, Ve)

Parameters:

NameDescriptionUnitsDefault value
GaConductance in inner voltage rangeS
GbConductance in outer voltage rangeS
VeInner voltage range limitV

Connectors

  • p - This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)

  • n - This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)

Variables

NameDescriptionUnits
vVoltage drop of the two pins (= p.v - n.v)V
iCurrent flowing from pin p to pin nA

Behavior

v(t)=p.v(t)n.v(t)0=n.i(t)+p.i(t)i(t)=p.i(t)i(t)=ifelse(v(t)<Ve,GaVe+Gb(Ve+v(t)),ifelse(v(t)>Ve,GaVe+Gb(Ve+v(t)),Gav(t)))

Source

dyad
component NonlinearResistor
  extends OnePort
  # Conductance in inner voltage range
  parameter Ga::Dyad.Conductance
  # Conductance in outer voltage range
  parameter Gb::Dyad.Conductance
  # Inner voltage range limit
  parameter Ve::Dyad.Voltage
relations
  i = (v < -Ve) ? (Gb * (v + Ve) - Ga * Ve) : ((v > Ve) ? (Gb * (v - Ve) + Ga * Ve) : (Ga * v))
end
Flattened Source
dyad
component NonlinearResistor
  p = Pin()
  n = Pin()
  # Voltage drop of the two pins (= p.v - n.v)
  variable v::Dyad.Voltage
  # Current flowing from pin p to pin n
  variable i::Dyad.Current
  # Conductance in inner voltage range
  parameter Ga::Dyad.Conductance
  # Conductance in outer voltage range
  parameter Gb::Dyad.Conductance
  # Inner voltage range limit
  parameter Ve::Dyad.Voltage
relations
  v = p.v - n.v
  0 = p.i + n.i
  i = p.i
  i = (v < -Ve) ? (Gb * (v + Ve) - Ga * Ve) : ((v > Ve) ? (Gb * (v - Ve) + Ga * Ve) : (Ga * v))
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses