Create multiple independent phasor diagram sets, each with its own equations, canvas, and oscilloscope. Variables defined in any set are available in all other sets for cross-referencing.
This version supports multiple independent phasor diagram sets. Click + Add Phasor Set to create a new set. Each set has its own equation editor, phasor canvas, oscilloscope, adjustment sliders, and computed values table.
Cross-set variable sharing: Variables defined in any equation set are automatically available in all other sets. For example, define Z1 = 0.0 + j0.15 in Set 1, then use Z1 freely in Set 2's equations. Cross-referenced variables appear with a purple badge in the computed values table showing their source set. Sets are evaluated in order (Set 1 first, then Set 2, etc.), with a two-pass evaluation that resolves forward references between sets.
Set management: Rename sets by clicking the title. Collapse/expand sets to save screen space. Duplicate a set to fork it. Delete sets you no longer need (at least one must remain).
Each line in the equation editor defines a phasor variable. The format is Name = expression. Variables defined on earlier lines can be used in later equations. Lines starting with # or // are comments.
You can also use |X| (vertical bars) to get the magnitude of a phasor inline, and the variable angle operator d < 120 treats the left side as a magnitude variable rather than a literal number — so if you change d with a slider, the angle stays fixed.
| Input Format | Example | Description |
|---|---|---|
| Polar | Vs = 1.0 ∠ 30 or Vs = 1.0 < 30 | Magnitude (RMS) and angle in degrees |
| Rectangular | Z = 3 + j4 or Z = 3 + 4j | Real + imaginary components |
| Pure imaginary | X = j0.3 or X = -j5 | Imaginary only |
| Pure real | R = 0.05 | Real scalar value |
| Operator | Example | Description |
|---|---|---|
A + B | Vs = VR + VX | Phasor addition |
A - B | Vr = Vs - Vdrop | Phasor subtraction |
A * B | Vdrop = Z * I | Phasor multiplication (magnitudes multiply, angles add) |
A / B | I = V / Z | Phasor division (magnitudes divide, angles subtract) |
A ^ n | Zbase = Vbase ^ 2 / Sbase | Complex power: |A|n at angle n·θ |
-A | I2 = -I1 | Negate (180° phase shift) |
j * X | VX = j * X * I | 90° rotation (multiply by √−1) |
| Function | Example | Description |
|---|---|---|
abs(A) or |A| | Imag = abs(I1) | Magnitude (returns real scalar) |
ang(A) | theta = ang(V1) | Angle in degrees (returns real scalar) |
re(A) | Px = re(S) | Real part (returns real scalar) |
im(A) | Qx = im(S) | Imaginary part (returns real scalar) |
conj(A) | S = V * conj(I) | Complex conjugate (negates angle) |
sqrt(A) | VLN = VLL / sqrt3 | Complex square root: √|A| at θ/2 |
pow(A, n) | Z2 = pow(Z, 2) | Complex power: |A|n at n·θ (same as A^n) |
proj(A, deg) | BfA = proj(Ia, 0) | Signed projection of phasor A onto an axis at the specified angle. Returns real scalar: positive = along axis, negative = opposite. Used for extracting radial field components in motor analysis. |
| Function | Example | Description |
|---|---|---|
sin(x) | y = sin(30) → 0.5 | Sine (input in degrees) |
cos(x) | PF = cos(36.87) → 0.8 | Cosine (input in degrees) |
tan(x) | slope = tan(45) → 1.0 | Tangent (input in degrees) |
asin(x) | deg = asin(0.5) → 30 | Inverse sine (returns degrees) |
acos(x) | deg = acos(0.8) → 36.87 | Inverse cosine (returns degrees) |
atan(x) | deg = atan(1) → 45 | Inverse tangent (returns degrees) |
atan2(y, x) | deg = atan2(1, 1) → 45 | Two-argument arctangent (returns degrees, resolves quadrant) |
| Function | Example | Description |
|---|---|---|
ln(x) | y = ln(2.718) → 1.0 | Natural logarithm (base e) |
log(x) | dB = 20 * log(Vout/Vin) | Base-10 logarithm |
exp(x) | y = exp(1) → 2.718 | Exponential (ex) |
These functions perform the standard symmetrical component transformations using multi-assignment syntax. Each call takes three phasor inputs and assigns all three outputs at once.
| Syntax | Description |
|---|---|
| Phase → Sequence (forward transform) | |
V0, V1, V2 = seq(Vag, Vbg, Vcg) | Decompose line-to-ground phase quantities into zero, positive, and negative sequence components. V0 = ⅓(Vag + Vbg + Vcg) V1 = ⅓(Vag + a·Vbg + a²·Vcg) V2 = ⅓(Vag + a²·Vbg + a·Vcg) |
| Sequence → Phase (inverse transform) | |
Vag, Vbg, Vcg = phase(V0, V1, V2) | Reconstruct line-to-ground phase quantities from sequence components. Vag = V0 + V1 + V2 Vbg = V0 + a²·V1 + a·V2 Vcg = V0 + a·V1 + a²·V2 |
Where a = 1∠120° and a² = 1∠240° are applied internally. Aliases: toseq(), abc2seq() for the forward transform; tophase(), seq2abc() for the inverse. The single-output functions seq0(), seq1(), seq2(), pha(), phb(), phc() are also still available.
Multi-assignment functions to convert between line-to-neutral (LN), line-to-line (LL), and line-to-ground (LG) voltages. All take three phasor inputs and return three phasor outputs.
| Syntax | Description |
|---|---|
| Line-Neutral ↔ Line-Line | |
Vab, Vbc, Vca = lntoll(Van, Vbn, Vcn) | LN → LL. Vab = Van − Vbn, Vbc = Vbn − Vcn, Vca = Vcn − Van |
Van, Vbn, Vcn = lltoln(Vab, Vbc, Vca) | LL → LN. Van = ⅓(Vab − Vca), etc. |
| Line-Ground ↔ Line-Line | |
Vab, Vbc, Vca = lgtoll(Vag, Vbg, Vcg) | LG → LL. Vab = Vag − Vbg, etc. (V0 cancels in subtraction) |
Vag, Vbg, Vcg = lltolg(Vab, Vbc, Vca, V0) | LL → LG. Requires V0 as 4th argument — cannot recover zero-sequence from LL alone. |
| Line-Ground ↔ Line-Neutral | |
Van, Vbn, Vcn = lgtoln(Vag, Vbg, Vcg) | LG → LN. Extracts V0 = ⅓(Vag+Vbg+Vcg), then Van = Vag − V0 |
Vag, Vbg, Vcg = lntolg(Van, Vbn, Vcn, V0) | LN → LG. Requires V0 as 4th argument — true LN voltages have zero-sequence removed. |
Key relationships: Line-to-ground = line-to-neutral + zero sequence. For a balanced system with no ground path, LG = LN. During ground faults, V0 ≠ 0 and LG ≠ LN. Converting to line-to-ground always requires V0 as a 4th argument because that information is lost in LN and LL quantities. Converting from line-to-ground can extract V0 internally. Line-to-line voltages are always the same whether computed from LN or LG because V0 cancels.
Example — SLG fault showing LG ≠ LN:
# Start with faulted phase voltages (line-to-ground) Vag = 0.0 < 0 Vbg = 1.12 < -128 Vcg = 1.12 < 128 # Extract line-to-neutral (removes V0) Van, Vbn, Vcn = lgtoln(Vag, Vbg, Vcg) # Line-to-line (same from either LG or LN) Vab, Vbc, Vca = lgtoll(Vag, Vbg, Vcg) # Get V0 for round-trip back to LG V0 = seq0(Vag, Vbg, Vcg) # Reconstruct LG from LN + V0 Vag2, Vbg2, Vcg2 = lntolg(Van, Vbn, Vcn, V0)
| Function | Example | Description |
|---|---|---|
pf(V, I) | PF = pf(Vag, Ia) | Power factor = cos(∠V − ∠I). Positive = lagging, negative = leading. |
power(V, I) | S = power(Vag, Ia) | Complex power S = V × I*. Real part = P (watts), imaginary part = Q (vars). |
preal(V, I) | Pw = preal(Vag, Ia) | Real power P = |V|·|I|·cos(θ). Returns scalar. |
qreactive(V, I) | Qv = qreactive(Vag, Ia) | Reactive power Q = |V|·|I|·sin(θ). Positive = lagging/inductive. |
s3p(Vln, I) | S3 = s3p(Vag, Ia) | Three-phase complex power = 3 × Vln × I*. Use line-to-neutral (or LG when V0 = 0). |
| Function | Example | Description |
|---|---|---|
pu(actual, base) | Vpu = pu(Vact, Vbase) | Convert to per-unit: actual / base. |
frompu(pu_val, base) | Vact = frompu(Vpu, Vbase) | Convert from per-unit: pu × base. |
zbase(Vbase, Sbase) | Zb = zbase(138000, 100e6) | Impedance base = Vbase² / Sbase. |
Plot circles on the phasor diagram for relay operating characteristics, zone boundaries, or any circular region. The circle is drawn as a dashed outline with a light fill, and the variable stores the center point as a phasor.
| Syntax | Description |
|---|---|
Name = circle(Zfar, Znear) | Mho circle — diameter from Znear to Zfar. For a standard mho element passing through the origin, use circle(Zreach, 0 < 0). |
Name = circle(Zcenter, radius) | Offset circle — centered at Zcenter with the given radius (a non-negative real scalar). Use for offset mho or any arbitrary circle. |
Example — mho relay zones:
# Line impedance and zone reaches Zline = 0.02 + j0.18 :: ds Z1 = 0.80 * Zline :: ds Z2 = 1.20 * Zline :: ds # # Mho circles through origin Mho1 = circle(Z1, 0 < 0) Mho2 = circle(Z2, 0 < 0) # # Offset mho (reverse reach behind relay) Zrev = -0.25 * Zline :: ds Zfwd = 1.0 * Zline :: ds Mho3 = circle(Zfwd, Zrev)
Example — round-trip verification:
Vag = 1.00 < 0 Vbg = 0.85 < -130 Vcg = 0.92 < 115 V0, V1, V2 = seq(Vag, Vbg, Vcg) Vagx, Vbgx, Vcgx = phase(V0, V1, V2) # should match Vag, Vbg, Vcg
| Constant | Value | Usage |
|---|---|---|
pi or PI | 3.14159… | Circle constant. E.g. omega = 2 * pi * 60 |
e | 2.71828… | Euler's number. Base of natural logarithm. |
sqrt3 | 1.73205… | √3, used in three-phase conversions. E.g. VLL = VLN * sqrt3 |
j | 0 + j1 | Imaginary unit (√−1). Multiplying by j rotates 90°. |
:: SuffixAppend :: VarName to draw a phasor starting from the tip of another phasor (tail-to-tip placement). This is how voltage drop diagrams and sequence component sums are constructed. The phasor's computed value is unchanged — only its drawing position moves.
Vdrop = Z * I :: Vr | Draw Vdrop with its tail at the tip of Vr |
Z = 0.05 + j0.28 :: ds | Compute Z but don't draw it (hidden / "don't show") |
X = expr :: Vr ds | Anchor on Vr and also hide from diagram |
Ba = expr :: posA fixed | Exempt from animation rotation — stays on its axis. Re-evaluated each frame with rotated dependency values so magnitude updates but direction stays locked. Use for stator field arrows that must stay on a fixed radial axis. |
Van = expr :: d1 | Assign to diagram 1 in triple view. Use d2 or d3 for diagrams 2 and 3. Phasors without d1/d2/d3 appear in all three diagrams. Combine with other directives: :: posA fixed d1 |
Zflt = expr :: dot | Draw as a filled dot at the tip position instead of an arrow. Useful for marking specific points on the diagram such as fault locations on an impedance plane. Can be combined with other directives: :: dot d2 |
Van = expr :: osc1 | Assign to oscilloscope 1. Use osc2, osc3, etc. to split traces across multiple oscilloscope plots. Phasors without an osc directive go to oscilloscope 1. Example: put voltages on osc1 and currents on osc2. |
::To draw a sequence of phasors end-to-end, use multiple :: separators on the last phasor in the chain:
X = expr :: A :: B :: C
This draws all four phasors head-to-tail:
The parser automatically sets each intermediate phasor's tail on the next one in the chain. You only need to write the chain once, on the last phasor's line. Example:
C = 1.0 < 45 B = 1.0 < 90 A = 1.0 < 0 X = 0.8 < -30 :: A :: B :: C # draws C→B→A→X head-to-tail
You can also chain phasors one at a time using individual :: anchors — this gives the same result and is useful when each phasor is defined on its own line with its own anchor:
C = 1.0 < 45 B = 1.0 < 90 :: C A = 1.0 < 0 :: B X = 0.8 < -30 :: A
The standard pattern for showing voltage regulation:
1. Define the sending-end voltage as the reference: Vs = 1.0 < 0
2. Define current and impedance: I = 0.85 < -32, and Z = 0.05 + j0.28 :: ds (hidden)
3. Compute the voltage drop: Vdrop = Z * I
4. Compute the receiving-end voltage: Vr = Vs - Vdrop
5. Draw the drop bridging Vr to Vs: Vd = Vdrop :: Vr
This places Vr and Vs from the origin so you can compare their magnitudes, with the drop arrow visually bridging the gap from Vr's tip to Vs's tip.
Use the built-in seq() and phase() multi-assignment transforms instead of manually defining the a operator:
V0, V1, V2 = seq(Vag, Vbg, Vcg) — decompose LG phase → sequence
Vag, Vbg, Vcg = phase(V0, V1, V2) — reconstruct sequence → LG phase
For voltage conversions between LN, LL, and LG, use lntoll(), lltoln(), lgtoll(), lgtoln(), and the 4-argument forms lltolg(…, V0) and lntolg(…, V0) which require V0 because it cannot be derived from the inputs.
By default all visible phasors share one oscilloscope. Use :: osc1, :: osc2, etc. to split traces across multiple oscilloscope plots stacked vertically. Each scope has its own y-axis scaling and trace checkboxes. Common use: put voltages on osc1 and currents on osc2 so they don't share a scale.
Every base variable (one that doesn't reference other phasors) gets angle and magnitude sliders. Drag the Angle slider to rotate a phasor ±180°. Drag the Magnitude slider to scale from 0× to 10× (logarithmic, with 0× at the bottom). All dependent variables recompute automatically. Click the per-variable reset button or "Reset All" to restore original values.
The checkboxes above each oscilloscope control which phasors are visible on both the phasor diagram and that oscilloscope. Uncheck a variable to hide it from both displays. When equations change or a preset is loaded, all variables are shown by default. Use :: osc1, :: osc2, etc. directives to split traces across separate oscilloscope plots — each scope auto-scales its y-axis independently. Phasors without an osc directive default to oscilloscope 1.
Click ▶ Animate to rotate all phasors counter-clockwise at the selected frequency (0.1–0.5 Hz). The entire phasor system rotates uniformly, preserving all relative angles. The oscilloscope updates in sync, showing how the instantaneous waveforms evolve. The phasor diagram auto-scales to a fixed radius during animation so it doesn't zoom or pan. Click ⏸ Pause to freeze at the current angle.
Click Show values to display magnitude and angle labels on every phasor arrow in the diagram (e.g. Vs = 1.00∠0.0°). Click again to toggle back to name-only labels. Available in both normal and fullscreen modes.
Every phasor diagram and oscilloscope has a ⛶ expand button in the top-right corner. Click to open a fullscreen view that renders the plot at full window resolution with scaled-up labels, arrows, and traces.
The fullscreen controls bar includes the Animate button and speed slider, a Show values toggle (phasor only), and trace checkboxes to show/hide individual phasors or waveforms. Changes sync back to the main view.
Zoom & Pan (phasor only): Scroll wheel or +/− keys to zoom in/out. Click-drag or arrow keys to pan. Double-click to reset to auto-scale. Close with ✕, clicking the backdrop, or pressing Esc.
Use :: dot to render a variable as a filled circle at its tip instead of an arrow. Useful for marking specific points like fault locations on an impedance plane. Combine with other directives: Zflt = m * Zline :: dot.
The phasor diagram and computed values table display RMS magnitudes — the standard power systems convention. The oscilloscope shows instantaneous peak waveforms, where Vpeak = √2 × Vrms. For a 1.0 pu RMS phasor, the oscilloscope waveform swings ±1.414 pu.
Click any preset button to load a pre-built example. Each preset includes comment lines explaining every variable. Use them as starting templates — edit the values and equations to explore different operating conditions. Loading a preset resets all slider adjustments and stops animation.
A generator supplying current through a line with resistance R and reactance X to an inductive (lagging) load. This is the most common operating condition in power systems — motors and transformers draw lagging current.
The sending-end voltage Vs is the reference phasor at 1.0∠0°. The load current I lags Vs by 32° (approximately 0.85 power factor). The line impedance is split into R and X (both hidden) so the resistive drop VR = R·I (in phase with current) and reactive drop VX = jX·I (leading current by 90°) are shown separately. The receiving-end voltage Vr = Vs - VR - VX is smaller than Vs and rotated — this is voltage regulation. The drops are drawn tail-to-tip from Vr's tip back to Vs's tip, showing exactly how the IR and IX components bridge the gap.
Try: Use the I angle slider to sweep from lagging (-90°) through unity (0°) to leading (+90°) and watch how the voltage regulation changes. At leading power factors, Vr can exceed Vs.
A lightly loaded line with capacitive (leading) current — common in underground cable systems or lightly loaded transmission lines at night. The current leads the voltage by 28°.
With leading current, the reactive voltage drop partially cancels the resistive drop, and the receiving-end voltage Vr can actually be larger than the sending-end voltage Vs. This is related to the Ferranti effect seen on long, lightly loaded lines. The single impedance drop Z·I is shown bridging from Vr to Vs.
Try: Increase the current magnitude slider and observe Vr growing beyond Vs. This is why utilities sometimes need to absorb reactive power at light load.
A balanced three-phase system with line-to-ground voltages Vag, Vbg, Vcg separated by 120° and a common load impedance Zload = 1.5∠32° per phase. Uses triple diagram view (:: d1/d2/d3) to show each phase in its own diagram, and split oscilloscopes (:: osc1 for voltages, :: osc2 for currents). The power factor is computed with the built-in cos() and ang() functions.
Try: Click Animate to see each phase rotating in its own diagram. Switch to Single Diagram to see all six phasors together. Adjust the Zload angle slider to change from inductive to capacitive load and watch the power factor update.
A distribution feeder voltage drop study. The source bus is at 1.05 pu (slightly above nominal to compensate for drop), supplying 0.9 pu of current at 0.8 power factor lagging through a feeder with significant impedance (R = 0.08, X = 0.35 pu).
The voltage drop phasor Vdrop = Zline · Iload bridges from the load bus voltage Vload to the source voltage Vsrc. The difference in magnitude between Vsrc and Vload is the voltage regulation — a key metric in distribution system design.
Try: Increase Iload magnitude to simulate heavy loading and watch Vload sag. Adjust the current angle to see how power factor correction improves voltage at the load.
Demonstrates power factor correction by adding a capacitor bank in parallel with a lagging load. The original load draws 0.95 pu at PF = 0.72 lagging (44° lag). A cap bank injects 0.55 pu of leading current at 90°. The before/after power factors are computed using cos() and ang().
Two voltage drops are shown side by side: Vr1 before correction and Vr2 after correction. Vr2 is closer to Vs in both magnitude and angle.
Try: Adjust the Icap magnitude slider to find the optimal cap bank size. Too little correction leaves voltage low; too much makes the total current leading.
Demonstrates the symmetrical component transformation using the built-in phase() and seq() functions. Defines positive-sequence (V1), negative-sequence (V2), and zero-sequence (V0) components as inputs, then reconstructs all three phase voltages in one line:
Vag, Vbg, Vcg = phase(V0, V1, V2)
Verifies the round-trip by decomposing back with V0x, V1x, V2x = seq(Vag, Vbg, Vcg). The voltage unbalance factor VUF = abs(V2) / abs(V1) quantifies the degree of negative-sequence unbalance — IEEE limits this to 2–3% for most equipment.
Try: Set V2 and V0 to zero using the magnitude sliders — the system becomes perfectly balanced with 120° spacing. Increase V2 to introduce negative-sequence unbalance (common in unbalanced loads). Increase V0 to add zero-sequence (common in ground faults).
A bolted single-line-to-ground fault on phase A, computed using sequence impedances. All three sequence currents are equal: I1 = I2 = I0 = Vf / (Z1 + Z2 + Z0). Phase currents and voltages are reconstructed using the built-in phase() transform.
The fault current Ia = 3·I0 flows entirely in the faulted phase, while Ib = Ic = 0. On the voltage side, Vag collapses to zero (bolted fault), while Vbg and Vcg swell. The oscilloscope is split into two plots: osc1 for line-to-ground voltages and osc2 for currents, so the different magnitudes don't distort each other's scale.
Try: Adjust Z0 magnitude to simulate different grounding conditions — high Z0 limits fault current but causes severe voltage swell on unfaulted phases.
Kirchhoff's Voltage Law around a series RLC circuit. The current I is the reference at 0°. The voltage across each element is determined by its impedance: VR is in phase with I (resistor), VL leads I by 90° (inductor), and VC lags I by 90° (capacitor).
The three component voltages are drawn tail-to-tip: VR from the origin, VL from VR's tip, VC from VL's tip. The source voltage Vs = VR + VL + VC is their vector sum. Note that VL and VC partially cancel since they're 180° apart — the net reactance is VL - VC.
Try: Adjust VL and VC magnitudes to equal values — the reactive voltages completely cancel and Vs = VR (resonance). The source only needs to supply enough voltage to overcome the resistance. Make VC > VL to see the circuit become capacitive (Vs lags I).
A shunt capacitor bank installed at a load bus on a transmission or distribution line. The capacitor draws leading reactive current Ic = jBc·Vs (90° ahead of the bus voltage) from the line. The total line current is Inet = Iload + Ic — the leading Ic partially cancels the lagging reactive component of Iload, making Inet less lagging overall. The smaller reactive component of Inet reduces the reactive voltage drop jX·Inet, raising the bus voltage.
This is the most common form of static reactive compensation in power systems — fixed or switched capacitor banks are installed at substations and along feeders to support voltage and reduce reactive power flow on the transmission system.
Try: Use the Bc magnitude slider to increase the cap bank size. Watch Vbus rise toward Vs as the IX drop shrinks. Over-compensate (Bc too large) and Inet becomes leading — Vbus can overshoot Vs, which is undesirable at heavy load.
A shunt reactor absorbs reactive power on a lightly loaded or unloaded transmission line. Without compensation, the line's distributed shunt capacitance draws leading charging current even at no load. This leading current through the line's series reactance produces a voltage drop that is in phase with the sending-end voltage — it adds to the receiving-end voltage rather than subtracting, causing Vr to exceed Vs. This is the Ferranti effect.
The shunt reactor draws lagging current Ireac = −jBL·Vs, which adds an inductive component to the net line current. The resulting IX drop now opposes Vs, bringing Vr back down to an acceptable level. Shunt reactors are switched in at night or during light-load periods when the Ferranti effect is most pronounced.
Try: Set BL to zero using the magnitude slider (minimum) — Inet becomes just the tiny Iload, and Vr rises above Vs. Increase BL to see the reactor pull Vr back down. Find the value where Vr ≈ Vs (full compensation).
A bolted phase-to-phase fault between phases B and C. Boundary conditions: Ia = 0, Ib = −Ic, Vbg = Vcg. Only positive- and negative-sequence networks are involved (no zero-sequence for a line-line fault). Sequence currents: I1 = Vf / (Z1 + Z2), I2 = −I1. Phase quantities are reconstructed with phase().
For equal impedances (Z1 = Z2), the LL fault current is √3 × |I1| — about 87% of the three-phase fault level. The unfaulted phase A voltage remains at Vf while B and C collapse. Voltages and currents are split across osc1 and osc2.
Try: Confirm Ia ≈ 0 and Ic ≈ −Ib in the computed values table. Make Z1 ≠ Z2 to model a machine source with asymmetric impedances.
Demonstrates the relationship between line-to-ground, sequence, and line-to-line voltage representations of an unbalanced three-phase system. Switch to Triple Diagram view to see three perspectives side by side:
d1 — Line-to-ground voltages (Vag, Vbg, Vcg): the physical measurable quantities at each phase terminal referenced to ground. These are unbalanced inputs.
d2 — Sequence components (V0, V1, V2): the analytical decomposition. V1 is the balanced positive-sequence core, V2 represents unbalance, V0 is the zero-sequence shift between neutral and ground.
d3 — Line-to-line voltages (Vab, Vbc, Vca): derived from LG via lgtoll(). Notice V0 cancels — the LL diagram has no zero-sequence component regardless of grounding.
Three oscilloscope plots separate the waveforms by type. The hidden variables include LN voltages from lgtoln() and the round-trip verification from phase().
Try: Adjust Vag, Vbg, Vcg magnitudes and angles. Watch V0 and V2 change in d2 while the LL phasors in d3 remain unaffected by V0. Make all three phases equal at 120° apart and verify V0 = V2 = 0 (balanced system).
Demonstrates the power triangle using the built-in power functions pf(), power(), preal(), qreactive(), and s3p(). Switch to Triple Diagram view:
d1 — Voltage and current phasors. Vag is the reference at 0°. Current Ia lags by the impedance angle (36.87° for 0.8 PF lagging). The angle between V and I is the power factor angle θ.
d2 — Per-phase power triangle. Real power P is drawn along the horizontal axis, reactive power Q is drawn vertically from P's tip, and apparent power S is the hypotenuse from the origin. The triangle closes because S = P + jQ. For lagging loads Q points upward (inductive).
d3 — Three-phase power triangle. Same shape as d2 but scaled by 3×, computed using s3p(). In a balanced system, total three-phase power is simply 3 × per-phase power.
All power quantities are computed with the built-in functions — no manual conjugate operations or angle arithmetic needed.
Try: Adjust Zload angle from 36.87° toward 0° and watch the power triangle flatten as Q shrinks (approaching unity PF). Flip to negative angles to see leading power factor with Q pointing downward (capacitive). Change Zload magnitude to scale the current and power while keeping the same PF angle.
Models a phase distance (21) relay element measuring Vab/Iab during a B-C line-to-line fault. The phasor diagram is the impedance plane (R-X diagram) with offset mho circle characteristics drawn using circle(Zfar, Znear).
The visible elements on the diagram are:
Zrelay — the measured impedance Vab/Iab computed from relay CT/PT inputs.
Zln — the full protected line impedance.
Zflt — actual impedance from relay to fault point (m × Zline).
Mho1 — Zone 1 offset mho: 80% forward reach, 10% reverse reach. Instantaneous trip.
Mho2 — Zone 2 offset mho: 120% forward, 15% reverse. Time-delayed backup covering the remote bus.
Mho3 — Zone 3 offset mho: 150% forward, 25% reverse. Remote backup for adjacent lines.
Each mho circle is defined by its forward and reverse reach impedances as diameter endpoints. The reverse reach extends behind the relay to provide sensitivity for close-in reverse faults and to ensure the characteristic encloses the origin for proper polarization.
Try: Slide m from 0 to 1 and watch Zrelay move through the nested zones. Increase Rf to add fault resistance — Zrelay shifts toward the R-axis and may exit the mho circles. Adjust Z1rev/Z2rev/Z3rev magnitudes to change the reverse reach and observe how the circles shift.
A three-phase induction motor stator with balanced excitation. Uses two sets: Set 1 defines the balanced three-phase voltages (Vag, Vbg, Vcg at 120° spacing) and a derived current set. Set 2 uses proj() and :: fixed directives to project each phase current onto its winding axis and sum the results into a net rotating field vector Bnet.
This demonstrates the fundamental principle of AC motor operation — three stationary windings with 120° spatial displacement, fed by three currents with 120° temporal displacement, produce a single rotating magnetic field with constant magnitude.
Try: Click Animate to watch Bnet rotate smoothly while the three winding field contributions Ba, Bb, Bc oscillate along their fixed axes. Adjust phase voltages to unbalance the system and observe the effect on the rotating field.
Complete list of all built-in functions organized by category.
| Category | Functions |
|---|---|
| Phasor Operations | abs() ang() re() im() conj() sqrt() pow(A,n) proj(A,deg) |
| Trigonometric (degrees) | sin() cos() tan() asin() acos() atan() atan2(y,x) |
| Logarithmic / Exponential | ln() log() exp() |
| Sequence ↔ Phase | V0,V1,V2 = seq(Vag,Vbg,Vcg) Vag,Vbg,Vcg = phase(V0,V1,V2)Single-output: seq0() seq1() seq2() pha() phb() phc() |
| Voltage Conversions | lntoll() lltoln() — line-neutral ↔ line-linelgtoll() lltolg(…, V0) — line-ground ↔ line-linelgtoln() lntolg(…, V0) — line-ground ↔ line-neutral |
| Power Calculations | pf(V,I) power factor power(V,I) complex S = V×I*preal(V,I) real power P qreactive(V,I) reactive power Qs3p(Vln,I) three-phase complex power |
| Per-Unit Conversions | pu(actual,base) frompu(pu,base) zbase(Vbase,Sbase) |
| Circle (Relay Zones) | circle(Zfar, Znear) mho circle with diameter circle(Zcenter, radius) offset circle |
| Constants | pi e sqrt3 j |
Directives (::) | ds hide fixed lock axis dot point marker d1 d2 d3 triple diagram osc1 osc2 … oscilloscope group VarName tail placement |
Save all equation sets to a single text file, or load a previously saved file to restore all sets. The file uses ===SET: Title=== delimiters to separate each set's equations.
Shareable links: Click 🔗 Copy Shareable Link to generate a URL that encodes your current equations. Anyone who opens the link will see your exact diagram. You can also construct URLs manually:
?preset=phasedist — load a named preset (lag, lead, kvl, symcomp, seqtrip, llfault, 3phase, shuntcap, shuntreactor, powertri, phasedist)
?eq=Vs%3D1.0%3C0%0AI%3D0.85%3C-32 — URL-encoded equations for a single set
#Vs%3D1.0%3C0%0AI%3D0.85%3C-32 — same but in the URL hash (not sent to server)
?title=My+Diagram&eq=... — optionally set the title with the title parameter
Links are automatically compressed with deflate (typically 40–70% shorter). Check Strip comments before generating to exclude comment lines and blank lines for even shorter URLs. The link box shows character count and compression ratio.