Skip to content

Voltage Source

Single-phase ideal voltage source. Outputs a configurable DC, sinusoidal, or external-controlled voltage between its two electrical terminals.

Category: Single-Phase / Sources

Keywords: 1-phase, 1-ph, 1 ph, 1ph, single, single-phase, single phase, phase, ph, voltage source, vsrc, vs, EMF, battery, supply, DC, AC

Ports

NameDirectionValue typeNotes
pelectricaldouble
nelectricaldouble

Parameters

Config

NameLabelTypeDefaultUnitsDescription
modeModeenum (DC / AC)00=DC, 1=AC
voltageVdouble1V (V, kV, pu)Source voltage (peak amplitude for AC, magnitude for DC). Pick a unit; pu multiplies by V_base from the Units tab.
frequencyfdouble60
phaseφdouble0
series_resistanceR_sdouble0.001Series R for the Thévenin → Norton equivalent. Set 0 (or non-positive) for an ideal source via MNA.
measure_currentMeasure currentenum (Off / On)0Emit source branch current as a simulator observable.

Current Monitoring

NameLabelTypeDefaultUnitsDescription
current_nameCurrent namestringIObservable id for the measured source branch current.

Units

NameLabelTypeDefaultUnitsDescription
V_baseV_base (kV)double230Base RMS line-to-line voltage in kV. Used by `pu` impedance / admittance conversions in this component's `computations` block.

Observables

SignalTypeDefault nameEnableDescription
branchCurrentsignalfrom current_namemeasure_currentSource branch current (A). Sign convention: positive flowing from `p` to `n` through the source's internal Norton (or MNA) branch.

Used in samples


Implemented in C++ class SimCompElecVsrc (components/electrical/sim_comp_elec_vsrc/sim_comp_elec_vsrc.h).

Released under the MIT License.