Skip to content

Ideal Transformer

Single-phase ideal two-winding transformer. Enforces V2/V1 = 1/n and I2/I1 = -n, where n is the turns ratio. Use for level-shifting and isolation in voltage / control studies.

Aliases: SimCompElecTransformer

Category: Transformers

Keywords: 1-phase, 1-ph, 1 ph, 1ph, single, single-phase, single phase, phase, ph, trafo, TX, tx, winding, primary, secondary, turns ratio, isolation

Ports

NameDirectionValue typeNotes
p1electricaldouble
p2electricaldouble
s1electricaldouble
s2electricaldouble

Parameters

Config

NameLabelTypeDefaultUnitsDescription
turns_rationdouble1Turns ratio N1:N2 = n:1. V_p1p2 = n * V_s1s2 and I_p = -I_s / n.
measure_currentMeasure currentenum (Off / On)0Emit primary branch current as a simulator observable.

Current Monitoring

NameLabelTypeDefaultUnitsDescription
current_nameCurrent namestringIObservable id for the measured primary current. Change the default `I` when you have multiple measured components — duplicate ids collide.

Observables

SignalTypeDefault nameEnableDescription
branchCurrentsignalfrom current_namemeasure_currentPrimary branch current through the transformer (A).

Implemented in C++ class SimCompElecTransformer (components/electrical/sim_comp_elec_transformer/sim_comp_elec_transformer.h).

Released under the MIT License.