Skip to content

Voltage Source (3-phase)

Three-phase voltage source with a configurable Thévenin impedance topology (Ideal / R-L series / R∥L parallel / R-R∥L), optional zero-sequence neutral grounding impedance (R-L or R∥L) on Y (gnd N) AND Y (ext N) connections, optional harmonic injection (up to five terms), and optional P/Q monitoring with a user-configurable low-pass filter time constant. Generates a balanced fundamental sinusoid (configurable amplitude, frequency, and phase reference). The Impedance tab exposes R (series) and R (parallel) independently — the topology selector enables only the relevant one(s). Inductors accept H, pu, or X (Ω at the source's own frequency). Each impedance / zero-sequence parameter carries its own unit selector; the auto-injected Units tab carries V_base / S_base when any pu selection is in use (frequency is taken from this source's frequency parameter).

Category: Three-Phase / Sources

Keywords: 3-phase, 3-ph, 3 ph, 3ph, three, three-phase, three phase, phase, ph, voltage source, vsrc, vs, EMF, supply, grid, balanced, harmonic, harmonics, thevenin, thévenin, zero sequence, zero-sequence, ideal, R-L, R||L, R-R||L, monitor, PQ, P, Q, power

Ports

NameDirectionValue typeNotes
buselectrical_3phdouble
nelectricaldoubleVisible when connection == 'external_neutral'

Parameters

Config

NameLabelTypeDefaultUnitsDescription
voltageV_magdouble230kV (V, kV, pu)Fundamental line-to-line RMS voltage. Each phase is driven at V_LN_peak = V_LL_rms·√(2/3); the 120° offset is applied internally.
frequencyf (Hz)double60Fundamental frequency (Hz). Drives the sinusoid generator and the pu → henries conversion when inductive elements are entered in pu.
phaseV_angdouble0deg (deg, rad)Phase A reference angle. B / C apply the 120° offset (sign from `sequence`). Degrees or radians via the unit dropdown.
connectionConnectionenum (Y (ext N) / Y (int N) / Y (gnd N) / Δ (delta))internal_neutralWinding connection. `Y (ext N)` exposes the star point N via the `n` port (directly, or through Z_n if set). `Y (int N)` floats N internally. `Y (gnd N)` ties N to ground (optionally via Z_n). `Δ` is delta — no neutral.
sequenceSequenceenum (ABC (+) / ACB (-))ABCPhase sequence: ABC (positive) or ACB (negative).
waveformWaveformenum (AC / Harmonics)acPure sinusoidal AC, or AC + user-defined harmonics. Picking `harmonics` reveals the Harmonics tab.
impedance_typeImpedanceenum (Ideal / R-L / R∥L / R-R∥L)R-LPer-phase Thévenin impedance between EMF and bus. `Ideal` = stiff source. `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.
zero_seq_typeZero-Seq Zenum (None / R-L / R∥L)noneNeutral-grounding impedance Z_n between N and the neutral terminal (ground in `gnd N`, the `n` port in `ext N`). `None` = direct tie. `R-L` = series R+L. `R∥L` = parallel R∥L. Active for `gnd N` / `ext N`.
ramp_timet_rampdouble0Voltage ramp-up time (s). Amplitude scales 0 → full linearly over `t_ramp`, then holds. Use ~1 fundamental period on HV sources to avoid t=0 inrush. 0 disables.
measure_currentMeasure currentenum (Off / On)0Emit per-phase source branch current as observables. Names live on the Signal Names tab.
monitor_pqMonitor P/Qenum (Off / On)0Emit real (P, W) and reactive (Q, VAR) power as observables. Uses the instantaneous Buchholz / Akagi form, low-pass filtered with `pq_time_constant` to reject 2ω ripple. Names on the Signal Names tab.
pq_time_constantP/Q filter τ (sec)double2Low-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.

Impedance

NameLabelTypeDefaultUnitsDescription
r_parallelR (parallel)double0.001physical (Ω, 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 (the topology then collapses to the L-only or R-pre-only case). Independent Ω / pu selector.
l_mainLdouble0physical (H, Ω, 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; no extra frequency input required). 0 drops the element.
r_seriesR (series)double0.001physical (Ω, pu)Series resistive element of the Thévenin impedance. Active for `R-L` (the series R between EMF and bus) and `R-R∥L` (the pre-series resistor: EMF → R(series) → R∥L → bus). Set 0 to drop the element. Independent Ω / pu selector.

Zero-Sequence

NameLabelTypeDefaultUnitsDescription
r_zeroR₀double0.001physical (Ω, pu)Resistive element of Z_n (neutral-grounding impedance). `R-L` series R; `R∥L` parallel R. 0 drops the element. Independent Ω / pu selector.
l_zeroL₀double0physical (H, Ω, pu)Inductive element of Z_n. Pick the unit: H (henries), X (Ω, 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.

Harmonics

NameLabelTypeDefaultUnitsDescription
num_harmonicsNumber of harmonicsenum (None / 1 / 2 / 3 / 4 / 5)0Extra harmonic terms (1-5) added to the fundamental. Each k contributes mag·sin(kωt + angle + k·offset_i). Triplens are co-phasal; 5 rotates backward; 7 forward.
h1_orderh1 orderint3Harmonic order (integer multiple of f). Common: 3 (triplen), 5 (-), 7 (+).
h1_magnitudeh1 magnitude (% of V_mag)double0Magnitude as % of V_mag (5.0 = 5%).
h1_angleh1 angle (deg)double0Extra phase angle (deg), added to the per-phase 120° × order offset.
h2_orderh2 orderint5
h2_magnitudeh2 magnitude (% of V_mag)double0
h2_angleh2 angle (deg)double0
h3_orderh3 orderint7
h3_magnitudeh3 magnitude (% of V_mag)double0
h3_angleh3 angle (deg)double0
h4_orderh4 orderint11
h4_magnitudeh4 magnitude (% of V_mag)double0
h4_angleh4 angle (deg)double0
h5_orderh5 orderint13
h5_magnitudeh5 magnitude (% of V_mag)double0
h5_angleh5 angle (deg)double0

Signal Names

NameLabelTypeDefaultUnitsDescription
current_name_aPhase A current namestringIaObservable id for Phase A branch current. Blank = skip this phase.
current_name_bPhase B current namestringIbObservable id for Phase B branch current. Blank = skip this phase.
current_name_cPhase C current namestringIcObservable id for Phase C branch current. Blank = skip this phase.
p_signal_nameP observable namestringPObservable id for filtered real-power P (W). Blank = skip.
q_signal_nameQ observable namestringQObservable id for filtered reactive-power Q (VAR). Blank = skip.

Power Flow

NameLabelTypeDefaultUnitsDescription
pf_p_mwP (MW)double0Real-power setpoint (MW). PSSE GENERATOR PG column. Positive = inject. Power-flow only — separate from the EMT settings on Config.
pf_q_mvarQ (MVAr)double0Reactive-power setpoint (MVAr). PSSE QG. Positive = inject (over-excited).
pf_v_puV setpoint (pu)double1Voltage-magnitude setpoint (pu on bus base kV). PSSE VS.
pf_q_max_mvarQ max (MVAr)double9999Max reactive output (PSSE QT). 9999 = effectively unconstrained.
pf_q_min_mvarQ min (MVAr)double-9999Min reactive output (PSSE QB). -9999 default.
pf_p_max_mwP max (MW)double9999Max real output (PSSE PT). 9999 default.
pf_p_min_mwP min (MW)double-9999Min real output (PSSE PB). -9999 default.

Units

NameLabelTypeDefaultUnitsDescription
S_baseS_base (MVA)double100System base apparent power in MVA. Used by `pu` impedance / admittance conversions in this component's `computations` block.
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
branchCurrent_asignalfrom current_name_ameasure_currentPhase A source branch current (A).
branchCurrent_bsignalfrom current_name_bmeasure_currentPhase B source branch current (A).
branchCurrent_csignalfrom current_name_cmeasure_currentPhase C source branch current (A).
p_filteredsignalfrom p_signal_namemonitor_pqSource real-power output P (W). Sum of instantaneous v_LN·i across the three phases, low-pass filtered with τ = pq_time_constant.
q_filteredsignalfrom q_signal_namemonitor_pqSource reactive-power output Q (VAR). Buchholz / Akagi instantaneous reactive power (1/√3)·(v_bc·i_a + v_ca·i_b + v_ab·i_c), low-pass filtered with τ = pq_time_constant.

Used in samples


Implemented in C++ class SimCompElecVsrc3ph (components/electrical/sim_comp_elec_vsrc_3ph/sim_comp_elec_vsrc_3ph.h).

Released under the MIT License.