Skip to content
Analog.CurrentSensor.md

Analog.CurrentSensor ​

Usage ​

TranslatedComponents.Analog.CurrentSensor()

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)

  • i - This connector represents a real signal as an output from a component (RealOutput)

Behavior ​

julia
using TranslatedComponents #hide
using ModelingToolkit #hide
@named sys = TranslatedComponents.Analog.CurrentSensor() #hide
full_equations(sys) #hide
<< @example-block not executed in draft mode >>

Source ​

dyad
component CurrentSensor
  p = Pin()
  n = Pin()
  i = RealOutput()
relations
  p.v = n.v
  p.i = i
  n.i = -i
end
Flattened Source
dyad
component CurrentSensor
  p = Pin()
  n = Pin()
  i = RealOutput()
relations
  p.v = n.v
  p.i = i
  n.i = -i
metadata {}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses