Three-Phase Grid (grid3)
A three-phase voltage source with a neutral, for grid-tied converters.
Group: Sources · Kind: {"kind":"grid3"}
When to use it
Use it for grid-tied inverters, rectifiers, chargers and power quality studies. It can add unbalance, harmonics and a voltage sag or swell on some or all phases. For a short circuit on the line, add a Fault.
Pins
| Pin | Domain | Meaning |
|---|---|---|
a |
electrical | Phase a |
b |
electrical | Phase b |
c |
electrical | Phase c |
n |
electrical | Neutral |
Common parameters
vll: Line-to-line rms voltage (Default: 380)freq: Frequency (Default: 60)harmonics: Harmonic order and percent pairs, such as 5 4 7 3 (Default: optional (off))sagDepth: How far the voltage drops during the sag, 0 to 1; below 0 it rises (a swell) (Default: 0)
Parameters
| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
vll |
V | 380 | Line-to-line rms voltage | |
freq |
Hz | 60 | Frequency | |
phase |
° | 0 | Angle of phase a at the start | |
ka |
— | 1 | Size of phase a compared with normal | |
kb |
— | 1 | Size of phase b compared with normal | |
kc |
— | 1 | Size of phase c compared with normal | |
harmonics |
— | optional (off) | Harmonic order and percent pairs, such as 5 4 7 3 | |
sagDepth |
— | 0 | How far the voltage drops during the sag, 0 to 1; below 0 it rises (a swell) | |
sagStart |
s | 0 | When the sag starts | |
sagEnd |
s | 0 | When the sag ends | |
sagPhases |
— | abc | Phases the sag or swell touches, such as a or abc | |
fDev |
Hz | 0 | How far the frequency moves in the excursion; below 0 it falls | |
fStart |
s | 0 | When the frequency starts to move | |
fEnd |
s | 0 | When the frequency starts back to normal | |
fRate |
Hz/s | optional (off) | How fast the frequency moves; none steps it at once | |
jumpDeg |
° | 0 | How far the phase angle jumps; below 0 it falls behind | |
jumpAt |
s | 0 | When the phase angle jumps | |
jumpPhases |
— | abc | Phases the jump touches, such as a or abc | |
rs |
Ω | 0 | Resistance inside the source | |
ls |
H | 0 | Inductance inside the source |
Parameter descriptions are in English in both languages.
Use for: Grid-tied inverters and chargers · Power quality studies · Voltage ride-through tests
Not for: An ideal balanced three-phase source → sine3VoltageSource
Formulas
| Formula | Equation | Source |
|---|---|---|
| Phase voltage, rms | Vph = Vll/√3 | Grainger & Stevenson, Power System Analysis (1994), ch. 2 (balanced three-phase voltages) |
| Phase voltage, peak | Vpk = √2·Vll/√3 | Grainger & Stevenson, Power System Analysis (1994), ch. 2 (balanced three-phase voltages) |
| Phase voltage during the sag | Vsag = Vph·(1 − depth) | IEEE Std 1159-2019, voltage sag definition |
| Voltage distortion | THD = √(h5² + h7²) in percent | IEEE Std 519-2022, definition of total harmonic distortion |
Quick check
Inputs:
vll: Line-to-line voltage, rms = 380 V,vllsagDepth: Sag depth = 0 —,sagDepthh5: 5th harmonic = 0 %h7: 7th harmonic = 0 %
Outputs:
vph: Phase voltage, rms =vll/sqrt(3)Vvpk: Phase voltage, peak =vll*sqrt(2)/sqrt(3)Vvsag: Phase voltage during the sag =vph*(1 - sagDepth)Vthd: Voltage distortion =sqrt(h5^2 + h7^2)%
Model logic
- Each phase is a voltage from n with the peak vll * sqrt(2) / sqrt(3), scaled by ka, kb or kc.
- Phase b lags phase a by 120 degrees and phase c leads it; the 5th harmonic turns the other way and the 3rd is the same in all phases.
- From sagStart to sagEnd the phases in sagPhases are multiplied by 1 - sagDepth; a negative sagDepth is a swell.
- rs and ls sit in series with each phase, and the current of name.a is the current into the a terminal.
Model
Each phase is a voltage from n with the peak vll * sqrt(2) / sqrt(3), scaled by ka, kb or kc. Phase a starts at the angle phase, phase b lags it by 120 degrees and phase c leads it by 120 degrees. Each harmonic in the list adds its percent of the fundamental at its order, shifted by the order times the phase shift, so the 5th turns the other way and the 3rd is the same in all phases. From sagStart to sagEnd, the phases named in sagPhases (abc for all, a for a single-phase sag) are multiplied by 1 - sagDepth; a negative sagDepth is a swell, so -0.2 raises them to 120 %. rs and ls are a resistance and an inductance in series with each phase. The current of the part named name.a is the current into the a terminal of that phase source.
Common mistakes
- vll is the line-to-line rms voltage, so 380 gives about 220 V rms from each phase to n. Do not enter the phase voltage.
- Connect n to ground or to a load neutral, or the source floats and the run fails.
- Without rs or ls, a rectifier with a large capacitor draws unrealistic current spikes. Set the grid impedance.
Datasheet and sources
vll and freq come from the supply you connect to. Take harmonics from a measurement or a grid code limit, and the sag depth and time from the ride-through test you want to run.
Example
Open the example with the command file.openExample and the name demo:grid3.
Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.