Appearance
Voltage Source
Single-phase ideal voltage source. Outputs a configurable DC or sinusoidal (optionally with harmonics) voltage between its two electrical terminals, 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
| Name | Direction | Value type | Notes |
|---|---|---|---|
p | electrical | double | |
n | electrical | double |
Parameters
Config
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
mode | Mode | enum (DC / AC) | 0 | — | 0=DC, 1=AC. In DC mode the source holds a constant magnitude; the frequency / phase / harmonics fields and reactive-power monitoring are hidden. |
voltage | V | double | 1 | V (V, kV, pu) | Source voltage (peak amplitude for AC, magnitude for DC). Pick a unit; pu multiplies by V_base from the Units tab. |
frequency | f | double | 60 | — | Fundamental frequency (Hz). Also drives the pu / reactance → henries conversion for the inductive impedance element and the quarter-cycle window for reactive-power monitoring. |
phase | φ | double | 0 | — | Phase angle (radians) of the fundamental sinusoid. |
waveform | Waveform | enum (AC / Harmonics) | ac | — | Pure sinusoidal AC, or AC + user-defined harmonics. Picking `Harmonics` reveals the Harmonics tab. |
impedance_type | Impedance | enum (Ideal / R / R-L / R∥L / R-R∥L) | R | — | 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. |
ramp_time | t_ramp | double | 0 | — | 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. |
measure_current | Measure current | enum (Off / On) | 0 | — | Emit source branch current as a simulator observable. Name + unit live on the Signal Names tab. |
measure_p | Measure P | enum (Off / On) | 0 | — | Emit real (active) power P as an observable. Available in both DC and AC. Instantaneous v·i, low-pass filtered with `pq_time_constant`. Name + unit on the Signal Names tab. |
measure_q | Measure Q | enum (Off / On) | 0 | — | 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`. Name + unit on the Signal Names tab. |
pq_time_constant | P/Q filter τ (sec) | double | 2 | — | 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_location | P/Q measured at | enum (Terminal / Internal source) | terminal | — | 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. |
Impedance
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
series_resistance | R (series) | double | 0.001 | physical (Ω, 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. |
l_main | L | double | 0 | physical (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). 0 drops the element. |
r_parallel | R (parallel) | double | 0.001 | physical (Ω, 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. |
Harmonics
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
num_harmonics | Number of harmonics | enum (None / 1 / 2 / 3 / 4 / 5) | 0 | — | Extra harmonic terms (1-5) added to the fundamental. Each k contributes mag·sin(kωt + angle). |
h1_order | h1 order | int | 3 | — | Harmonic order (integer multiple of f). Common: 3, 5, 7. |
h1_magnitude | h1 magnitude (% of V) | double | 0 | — | Magnitude as % of V (5.0 = 5%). |
h1_angle | h1 angle (deg) | double | 0 | — | Extra phase angle (deg) for this harmonic term. |
h2_order | h2 order | int | 5 | — | |
h2_magnitude | h2 magnitude (% of V) | double | 0 | — | |
h2_angle | h2 angle (deg) | double | 0 | — | |
h3_order | h3 order | int | 7 | — | |
h3_magnitude | h3 magnitude (% of V) | double | 0 | — | |
h3_angle | h3 angle (deg) | double | 0 | — | |
h4_order | h4 order | int | 11 | — | |
h4_magnitude | h4 magnitude (% of V) | double | 0 | — | |
h4_angle | h4 angle (deg) | double | 0 | — | |
h5_order | h5 order | int | 13 | — | |
h5_magnitude | h5 magnitude (% of V) | double | 0 | — | |
h5_angle | h5 angle (deg) | double | 0 | — |
Signal Names
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
current_name | Current name | string | I | A (A, kA) | Signal name for the measured source branch current. Blank = skip. Pick the unit from the dropdown; the published value is scaled to it. |
p_signal_name | P signal name | string | P | W (W, kW, MW) | Signal name for filtered real power P. Blank = skip. Pick the unit from the dropdown; the published value is scaled to it. |
q_signal_name | Q signal name | string | Q | VAr (VAr, kVAr, MVAr) | Signal name for filtered reactive power Q. Blank = skip. Pick the unit from the dropdown; the published value is scaled to it. |
Units
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
S_base | S_base (MVA) | double | 100 | — | System base apparent power in MVA. Used by `pu` impedance / admittance conversions in this component's `computations` block. |
V_base | V_base (kV) | double | 230 | — | Base RMS line-to-line voltage in kV. Used by `pu` impedance / admittance conversions in this component's `computations` block. |
Observables
| Signal | Type | Default name | Enable | Description |
|---|---|---|---|---|
branchCurrent | signal | from current_name | measure_current | Source 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. |
p_filtered | signal | from p_signal_name | measure_p | Source 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. |
q_filtered | signal | from q_signal_name | measure_q | Source 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. |
