Lemonergy · Studio block

Controlled electrical switch

Finite on/off resistance with an explicit control threshold; no arc or contact bounce

Implementation ID
electrical-switch
Reviewed
2026-10-27

Behavior

Conserving component solved simultaneously with the connected network. Finite on/off resistance with an explicit control threshold; no arc or contact bounce

Interface

Controlled electrical switch interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Controlled electrical switchStudio blockcurrentvoltageclosedpn
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
pterminalV; Aelectrical conserving connection; voltage across and current through the connected branch.
nterminalV; Aelectrical conserving connection; voltage across and current through the connected branch.
currentoutputARecorded current measurement from the conserving simulation.
voltageoutputVRecorded voltage measurement from the conserving simulation.
closedoutputfractionRecorded closed measurement from the conserving simulation.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
On-state resistance
onResistanceOhm
ohm0.01Resistance of the conducting branch or conducting end of the memristor model.
Minimum 1e-06; Maximum 1000000000
Off-state resistance
offResistanceOhm
ohm1000000000Resistance of the open switch or insulating end of the memristor model.
Minimum 1e-06; Maximum 1000000000000
Switch command
gate
dimensionless0Configured switch command when no external command is connected.
Minimum 0; Maximum 1
Switching threshold
threshold
dimensionless0.5The switch is on when its command is at least this value.
Minimum 0; Maximum 1

Equations and rules

  • R = Ron when gate ≥ threshold, otherwise Roff
  • I = V/R

Worked example

Controlled electrical switch worked example

Editable first-party network. supply: voltageV=5; target: onResistanceOhm=5; target: gate=1. Checks below were verified in the native execution engine.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
current
target/current
11A1e-06
voltage
target/voltage
15V4.9999999999999996e-06
closed
target/closed
11fraction1e-06

Use in a workflow

Controlled electrical switch worked example

Finite on/off resistance with an explicit control threshold; no arc or contact bounce

  1. Controlled electrical switch: Conserving component solved simultaneously with the connected network. Finite on/off resistance with an explicit control threshold; no arc or contact bounce
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Finite on/off resistance with an explicit control threshold; no arc or contact bounce
  • Demonstration parameters are not calibrated hardware data. Singular or incompatible ideal constraints and unsupported state ranges stop the run.

Scientific and mathematical references

These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.

  1. Kirchhoff's Rules

    OpenStax, Rice University

    Technical reference · Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.

  2. Electrical Energy and Power

    OpenStax, Rice University

    Technical reference · Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)