Skip to content
VoltageSensor.md

VoltageSensor

Measures the electrical potential difference between its two connection terminals.

This component models an ideal voltmeter. It is characterized by an infinite input impedance, meaning it draws no current from the circuit it is measuring. The voltage v across the sensor is determined by the difference in electrical potential between its positive pin p and its negative pin n. This relationship is defined by the equation:

v=p.vn.v

The currents flowing into both pins are constrained to be zero to ensure ideal behavior:

p.i=0n.i=0

The pins p and n are of type Pin, representing electrical connection points, and v is a RealOutput providing the measured voltage value.

Usage

VoltageSensor()

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)

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

Behavior

p.i(t)=0n.i(t)=0v(t)=p.v(t)n.v(t)

Source

dyad
# Measures the electrical potential difference between its two connection terminals.
#
# This component models an ideal voltmeter. It is characterized by an infinite input
# impedance, meaning it draws no current from the circuit it is measuring. The voltage
# `v` across the sensor is determined by the difference in electrical potential between
# its positive pin `p` and its negative pin `n`.
# This relationship is defined by the equation:
# ```math
# v = p.v - n.v
# ```
# The currents flowing into both pins are constrained to be zero to ensure ideal behavior:
# ```math
# p.i = 0
# ```
# ```math
# n.i = 0
# ```
# The pins `p` and `n` are of type `Pin`, representing electrical connection points, and `v`
# is a `RealOutput` providing the measured voltage value.
component VoltageSensor
  # Positive electrical connection pin of the voltmeter.
  p = Pin() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }]
  # Negative electrical connection pin of the voltmeter.
  n = Pin() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }]
  # Output signal representing the measured voltage difference (p.v - n.v).
  v = RealOutput() [{
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }]
relations
  p.i = 0
  n.i = 0
  v = p.v-n.v
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {"label": "V", "x": 500, "y": 713, "rot": 0}
    ],
    "icons": {"default": "dyad://ElectricalComponents/TwoPinSensor.svg"}
  }
}
end
Flattened Source
dyad
# Measures the electrical potential difference between its two connection terminals.
#
# This component models an ideal voltmeter. It is characterized by an infinite input
# impedance, meaning it draws no current from the circuit it is measuring. The voltage
# `v` across the sensor is determined by the difference in electrical potential between
# its positive pin `p` and its negative pin `n`.
# This relationship is defined by the equation:
# ```math
# v = p.v - n.v
# ```
# The currents flowing into both pins are constrained to be zero to ensure ideal behavior:
# ```math
# p.i = 0
# ```
# ```math
# n.i = 0
# ```
# The pins `p` and `n` are of type `Pin`, representing electrical connection points, and `v`
# is a `RealOutput` providing the measured voltage value.
component VoltageSensor
  # Positive electrical connection pin of the voltmeter.
  p = Pin() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }]
  # Negative electrical connection pin of the voltmeter.
  n = Pin() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }]
  # Output signal representing the measured voltage difference (p.v - n.v).
  v = RealOutput() [{
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }]
relations
  p.i = 0
  n.i = 0
  v = p.v-n.v
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {"label": "V", "x": 500, "y": 713, "rot": 0}
    ],
    "icons": {"default": "dyad://ElectricalComponents/TwoPinSensor.svg"}
  }
}
end


Test Cases

No test cases defined.

Layout Switch

Adjust the layout style of VitePress to adapt to different reading needs and screens.

Expand all
The sidebar and content area occupy the entire width of the screen.
Expand sidebar with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Expand all with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Original width
The original layout width of VitePress

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.

Spotlight

Highlight the line where the mouse is currently hovering in the content to optimize for users who may have reading and focusing difficulties.

ONOn
Turn on Spotlight.
OFFOff
Turn off Spotlight.