Skip to content

Voltage Source ​

Single-phase ideal voltage source. Outputs a configurable DC or sinusoidal (optionally with harmonics) voltage between its two electrical terminals, or (Controlled mode) the instantaneous EMF commanded by the in control signal in volts (one time step late, the standard control-to-network delay), behind a selectable Thévenin impedance (Ideal / R / R-L series / R∥L parallel / R-R∥L). Supports a soft-start amplitude ramp and optional power monitoring: real power P (DC or AC) and reactive power Q (AC only), each measured at the terminal or at the internal EMF, low-pass filtered with a configurable time constant. Monitored quantities carry their own unit selectors: branch current (A / kA), P (W / kW / MW), Q (VAr / kVAr / MVAr). Impedance fields accept Ω / pu (R) and H / Ω-reactance / pu (L).

Category: Single-Phase / Sources

Ports ​

PortKindSignalNotes
pElectrical terminal—
nElectrical terminal—
inControl inputRealShown when Mode is Controlled

Parameters ​

Config ​

ParameterTypeDefaultUnitsDescriptionID
ModeChoice: DC / AC / ControlledDC—0=DC, 1=AC, 2=Controlled. In DC mode the source holds a constant magnitude; the frequency / phase / harmonics fields and reactive-power monitoring are hidden. In Controlled mode the `in` control port appears and its value is the instantaneous internal EMF in volts (no RMS scaling, no ramp); the voltage, phase, waveform and ramp fields are hidden.mode
VNumber1V (also kV, pu)Source voltage (RMS for AC, magnitude for DC). In AC mode the internal EMF peak is √2× this value, matching the 3-phase source and standard power convention. Pick a unit; pu multiplies by V_base from the Units tab.voltage
fNumber60—Fundamental frequency (Hz). Also drives the pu / reactance → henries conversion for the inductive impedance element and the quarter-cycle window for reactive-power monitoring. Stays visible in Controlled mode for the inductance conversion.frequency
φNumber0rad (also deg)Phase angle of the fundamental sinusoid. Radians or degrees via the unit dropdown.phase
WaveformChoice: AC / HarmonicsAC—Pure sinusoidal AC, or AC + user-defined harmonics. Picking `Harmonics` reveals the Harmonics tab.waveform
ImpedanceChoice: Ideal / R / R-L / R∥L / R-R∥LR—Thévenin impedance between the internal EMF and the terminals. `Ideal` = stiff source (exact, via MNA). `R` = pure series resistor. `R-L` = series R+L. `R∥L` = parallel R+L. `R-R∥L` = pre-series R then a parallel R∥L. Fields appear on the Impedance tab; entering 0 drops that element.impedance_type
t_rampNumber0—Voltage ramp-up time (s). Amplitude scales 0 → full linearly over `t_ramp`, then holds. Use ~1 fundamental period to avoid a t=0 inrush. 0 disables.ramp_time
Measure currentChoice: Off / OnOff—Emit source branch current as a simulator observable. The signal name and unit are on this row.measure_current
Positive directionChoice: +ve in / +ve out+ve out—Sign convention for this current. '+ve out' (default) is positive when current flows out of the p terminal into the network. '+ve in' flips the sign.current_dir
Measure PChoice: Off / OnOff—Emit real (active) power P as an observable. Available in both DC and AC. Instantaneous v·i, low-pass filtered with `pq_time_constant`. The signal name and unit are on this row.measure_p
Measure QChoice: Off / OnOff—Emit reactive power Q as an observable. AC only (undefined for DC). Uses a quarter-cycle (T/4) orthogonal-voltage product, low-pass filtered with `pq_time_constant`. The signal name and unit are on this row.measure_q
P/Q filter τ (sec)Number2—Low-pass filter time constant for P/Q. Smaller tracks transients; larger gives a cleaner steady-state but slower response. Default 2 s rejects 50/60 Hz ripple by ~50 dB.pq_time_constant
P/Q measured atChoice: Terminal / Internal sourceTerminal—Where the P/Q monitor reads voltage. `Terminal` uses the solved terminal voltage (power delivered into the network). `Internal source` uses the internal EMF behind the Thévenin impedance (the total power the source generates) — the difference is the loss in the source impedance. With `Ideal` impedance the two coincide.pq_location

Impedance ​

ParameterTypeDefaultUnitsDescriptionID
R (series)Number0.001Ω (also pu)Series resistive element of the Thévenin impedance. Active for `R` (the sole resistor), `R-L` (the series R between EMF and the terminal) and `R-R∥L` (the pre-series resistor: EMF → R(series) → R∥L → terminal). Set 0 (or non-positive, for the `R` / `R-L` topology with no L) for an ideal source via MNA. Independent Ω / pu selector.series_resistance
LNumber0H (also Ω, pu)Inductive Thévenin element. `R-L` series L; `R∥L` parallel L; `R-R∥L` inner parallel L. Pick the unit: H (henries), Ω (reactance at this source's `frequency`), or pu (X_pu on V_base / S_base — the source's own `frequency` is used). 0 drops the element.l_main
R (parallel)Number0.001Ω (also pu)Parallel resistive element of the Thévenin impedance. Active for `R∥L` (the parallel R) and `R-R∥L` (the inner parallel R; see `R (series)` for the pre-series resistor). Set 0 to short the parallel branch. Independent Ω / pu selector.r_parallel

Harmonics ​

ParameterTypeDefaultUnitsDescriptionID
Number of harmonicsChoice: None / 1 / 2 / 3 / 4 / 5None—Extra harmonic terms (1-5) added to the fundamental. Each k contributes mag·sin(kωt + angle).num_harmonics
h1 orderInteger3—Harmonic order (integer multiple of f). Common: 3, 5, 7.h1_order
h1 magnitude (% of V)Number0—Magnitude as % of V (5.0 = 5%).h1_magnitude
h1 angle (deg)Number0—Extra phase angle (deg) for this harmonic term.h1_angle
h2 orderInteger5—h2_order
h2 magnitude (% of V)Number0—h2_magnitude
h2 angle (deg)Number0—h2_angle
h3 orderInteger7—h3_order
h3 magnitude (% of V)Number0—h3_magnitude
h3 angle (deg)Number0—h3_angle
h4 orderInteger11—h4_order
h4 magnitude (% of V)Number0—h4_magnitude
h4 angle (deg)Number0—h4_angle
h5 orderInteger13—h5_order
h5 magnitude (% of V)Number0—h5_magnitude
h5 angle (deg)Number0—h5_angle

Signal Names ​

ParameterTypeDefaultUnitsDescriptionID
Current nameTextIA (also kA)Signal name for the measured source branch current. Blank = skip. Pick the unit from the dropdown; the published value is scaled to it.current_name
P signal nameTextPW (also kW, MW)Signal name for filtered real power P. Blank = skip. Pick the unit from the dropdown; the published value is scaled to it.p_signal_name
Q signal nameTextQVAr (also kVAr, MVAr)Signal name for filtered reactive power Q. Blank = skip. Pick the unit from the dropdown; the published value is scaled to it.q_signal_name

Units ​

ParameterTypeDefaultUnitsDescriptionID
S_base (MVA)Number100—System base apparent power in MVA. Used by `pu` impedance / admittance conversions in this component's `computations` block.S_base
V_base (kV)Number230—Base RMS line-to-line voltage in kV. Used by `pu` impedance / admittance conversions in this component's `computations` block.V_base

Observables ​

Default nameKindRecorded whenDescriptionID
set by Current nameSignalMeasure current is onSource branch current, scaled to the chosen unit (A / kA). Active sign convention: positive when current flows OUT of the `p` terminal (and back IN at `n`), i.e. the source is delivering power. The arrow on the symbol points in the positive direction. Consistent across the ideal (MNA) and Norton companion impedance topologies. The direction switch keeps this sign by default and flips it the other way.branchCurrent
set by P signal nameSignalMeasure P is onSource real power P, low-pass filtered with τ = pq_time_constant, scaled to the chosen unit (W / kW / MW). Instantaneous v·i where v is the terminal voltage (`pq_location = terminal`) or the internal EMF behind the Thévenin impedance (`pq_location = source`). Defined in both DC and AC modes.p_filtered
set by Q signal nameSignalMeasure Q is onSource reactive power Q (AC only), low-pass filtered with τ = pq_time_constant, scaled to the chosen unit (VAr / kVAr / MVAr). Computed from the quarter-cycle (T/4) orthogonal-voltage product v(t−T/4)·i. v is the terminal voltage (`pq_location = terminal`) or the internal EMF (`pq_location = source`). Positive Q = the source supplies lagging (inductive) reactive power.q_filtered

Used in samples ​