Skip to content
Analog.IdealSemiconductor.md

Analog.IdealSemiconductor

This component extends from OnePort This component extends from ConditionalHeatPort

Usage

TranslatedComponents.Analog.IdealSemiconductor(T=293.15, unitVoltage=1, unitCurrent=1, Ron=1.0e-5, Goff=1.0e-5, Vknee=0)

Parameters:

NameDescriptionUnitsDefault value
useHeatPort= true, if heatPort is enabledfalse
TFixed device temperature if useHeatPort = falseK293.15
unitVoltageV1
unitCurrentA1
RonForward state-on differential resistance (closed resistance)Ω0.00001
GoffBackward state-off conductance (opened conductance)S0.00001
VkneeForward threshold voltageV0

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)

  • heatPort - Thermal port for 1-dim. heat transfer

This component is translated by DyadAI (HeatPort)

Variables

NameDescriptionUnits
vVoltage drop of the two pins (= p.v - n.v)V
iCurrent flowing from pin p to pin nA
LossPowerLoss power leaving component via heatPortW
T_heatPortTemperature of heatPortK
offSwitching state
sAuxiliary variable for actual position on the ideal diode characteristic

Source

dyad
partial component IdealSemiconductor
  extends OnePort
  extends ConditionalHeatPort
  parameter unitVoltage::Dyad.Voltage = 1
  parameter unitCurrent::Dyad.Current = 1
  # Forward state-on differential resistance (closed resistance)
  parameter Ron::Dyad.Resistance(final min = 0) = 1.0e-5
  # Backward state-off conductance (opened conductance)
  parameter Goff::Dyad.Conductance(final min = 0) = 1.0e-5
  # Forward threshold voltage
  parameter Vknee::Dyad.Voltage(final min = 0) = 0
  # Switching state
  variable off::Boolean
  # Auxiliary variable for actual position on the ideal diode characteristic
  variable s::Real
relations
  v = s * (off ? unitVoltage : Ron * unitCurrent) + Vknee
  i = s * (off ? Goff * unitVoltage : unitCurrent) + Goff * Vknee
  LossPower = v * i
end
Flattened Source
dyad
partial component IdealSemiconductor
  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
  heatPort = TranslatedComponents.HeatTransfer.HeatPort() if useHeatPort
  # = true, if heatPort is enabled
  structural parameter useHeatPort::Boolean = false
  # Fixed device temperature if useHeatPort = false
  parameter T::Dyad.Temperature = 293.15
  # Loss power leaving component via heatPort
  variable LossPower::Dyad.Power
  # Temperature of heatPort
  variable T_heatPort::Dyad.Temperature
  parameter unitVoltage::Dyad.Voltage = 1
  parameter unitCurrent::Dyad.Current = 1
  # Forward state-on differential resistance (closed resistance)
  parameter Ron::Dyad.Resistance(final min = 0) = 1.0e-5
  # Backward state-off conductance (opened conductance)
  parameter Goff::Dyad.Conductance(final min = 0) = 1.0e-5
  # Forward threshold voltage
  parameter Vknee::Dyad.Voltage(final min = 0) = 0
  # Switching state
  variable off::Boolean
  # Auxiliary variable for actual position on the ideal diode characteristic
  variable s::Real
relations
  v = p.v - n.v
  0 = p.i + n.i
  i = p.i
  if !(useHeatPort)
    T_heatPort = T
  else
    initial heatPort.T = T_heatPort
    initial heatPort.Q_flow = -LossPower
  end
  v = s * (off ? unitVoltage : Ron * unitCurrent) + Vknee
  i = s * (off ? Goff * unitVoltage : unitCurrent) + Goff * Vknee
  LossPower = v * i
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses