Appearance
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
| Port | Kind | Signal | Notes |
|---|---|---|---|
p | Electrical terminal | — | |
n | Electrical terminal | — | |
in | Control input | Real | Shown when Mode is Controlled |
Parameters
Config
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Mode | Choice: DC / AC / Controlled | DC | — | 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 |
| V | Number | 1 | V (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 |
| f | Number | 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. Stays visible in Controlled mode for the inductance conversion. | frequency |
| φ | Number | 0 | rad (also deg) | Phase angle of the fundamental sinusoid. Radians or degrees via the unit dropdown. | phase |
| Waveform | Choice: AC / Harmonics | AC | — | Pure sinusoidal AC, or AC + user-defined harmonics. Picking `Harmonics` reveals the Harmonics tab. | waveform |
| Impedance | Choice: 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. | impedance_type |
| t_ramp | Number | 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. | ramp_time |
| Measure current | Choice: Off / On | Off | — | Emit source branch current as a simulator observable. The signal name and unit are on this row. | measure_current |
| Positive direction | Choice: +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 P | Choice: Off / On | Off | — | 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 Q | Choice: Off / On | Off | — | 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) | Number | 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_time_constant |
| P/Q measured at | Choice: 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. | pq_location |
Impedance
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| R (series) | Number | 0.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 |
| L | Number | 0 | H (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) | Number | 0.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
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Number of harmonics | Choice: None / 1 / 2 / 3 / 4 / 5 | None | — | Extra harmonic terms (1-5) added to the fundamental. Each k contributes mag·sin(kωt + angle). | num_harmonics |
| h1 order | Integer | 3 | — | Harmonic order (integer multiple of f). Common: 3, 5, 7. | h1_order |
| h1 magnitude (% of V) | Number | 0 | — | Magnitude as % of V (5.0 = 5%). | h1_magnitude |
| h1 angle (deg) | Number | 0 | — | Extra phase angle (deg) for this harmonic term. | h1_angle |
| h2 order | Integer | 5 | — | h2_order | |
| h2 magnitude (% of V) | Number | 0 | — | h2_magnitude | |
| h2 angle (deg) | Number | 0 | — | h2_angle | |
| h3 order | Integer | 7 | — | h3_order | |
| h3 magnitude (% of V) | Number | 0 | — | h3_magnitude | |
| h3 angle (deg) | Number | 0 | — | h3_angle | |
| h4 order | Integer | 11 | — | h4_order | |
| h4 magnitude (% of V) | Number | 0 | — | h4_magnitude | |
| h4 angle (deg) | Number | 0 | — | h4_angle | |
| h5 order | Integer | 13 | — | h5_order | |
| h5 magnitude (% of V) | Number | 0 | — | h5_magnitude | |
| h5 angle (deg) | Number | 0 | — | h5_angle |
Signal Names
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Current name | Text | I | A (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 name | Text | P | W (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 name | Text | Q | VAr (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
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| S_base (MVA) | Number | 100 | — | System base apparent power in MVA. Used by `pu` impedance / admittance conversions in this component's `computations` block. | S_base |
| V_base (kV) | Number | 230 | — | Base RMS line-to-line voltage in kV. Used by `pu` impedance / admittance conversions in this component's `computations` block. | V_base |
Observables
| Default name | Kind | Recorded when | Description | ID |
|---|---|---|---|---|
| set by Current name | Signal | Measure current is on | 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. The direction switch keeps this sign by default and flips it the other way. | branchCurrent |
| set by P signal name | Signal | Measure P is on | 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. | p_filtered |
| set by Q signal name | Signal | Measure Q is on | 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. | q_filtered |
Used in samples
- Active vs. reactive power
- Bergeron line step and reflection
- Buck
- Control loop delay
- Full bridge rectifier
- Half bridge rectifier
- Ideal transformer ratio
- Line open short
- PWM power control
- PWM subsystem
- RC charging
- RL step response
- Series RLC step response
- Short line (π section)
- Switching chatter after an inductive opening
- Voltage divider