Appearance
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
| 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 |
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 | — | |
phase | φ | double | 0 | — | |
series_resistance | R_s | double | 0.001 | — | Series R for the Thévenin → Norton equivalent. Set 0 (or non-positive) for an ideal source via MNA. |
measure_current | Measure current | enum (Off / On) | 0 | — | Emit source branch current as a simulator observable. |
Current Monitoring
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
current_name | Current name | string | I | — | Observable id for the measured source branch current. |
Units
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
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 (A). Sign convention: positive flowing from `p` to `n` through the source's internal Norton (or MNA) branch. |
Used in samples
- Buck
- Full Bridge Rectifier V2
- Half Bridge Rectifier
- Pwm Power Control
- Pwm Subsystem
- Rc Charge
- Rl Transient
- Rlc Series
- Transmission Line Pi
- Voltage Divider
Implemented in C++ class SimCompElecVsrc (components/electrical/sim_comp_elec_vsrc/sim_comp_elec_vsrc.h).