- Series RLC circuit at 50 Hz
- Three-phase motor and power factor correction
- Voltage drop and losses in a cable
- Higher-order modes of a coaxial cable
- Symmetrical components and voltage unbalance
- ABCD parameters and Ferranti effect of a 400 km line
- Short-circuit and peak current at a LV switchboard (IEC 60909)
- Skin depth of a copper busbar at the mains harmonics
- Distance protection: apparent impedance in a mho zone
- All-day efficiency of a distribution transformer
Series RLC circuit at 50 Hz
A series RLC load (10 ohm, 50 mH, 100 uF) is fed by 230 V / 50 Hz. The script builds the complex impedance, gives its modulus and phase, the current and the resonance frequency.
#1. Reactances of the series RLC at 50 Hz: R = 10 ohm, L = 50 mH, C = 100 uF; -> "[w]" (math calc "2*pi*50"); -> "[X]" (math calc "[w]*0.050 - 1/([w]*100e-6)"); #2. Complex impedance Z = R + jX; -> "[Z]" (complex add "10" (complex mul "i" [X])); #3. Modulus, phase and current under 230 V; -> "[mod]" (complex abs [Z]); -> "[phi]" (math rad_to_deg (complex arg [Z])); -> "[I]" (math calc "230/[mod]"); #4. Resonance frequency f0 = 1 / 2 pi sqrt LC; -> "[f0]" (unit calc "1/(2*pi*sqrt(50 mH * 100 uF))" "Hz"); concat "Z = " [Z] " ohm, |Z| = " (math round [mod] 2) " ohm, phase = " (math round [phi] 1) " deg, I = " (math round [I] 2) " A, f0 = " (math round [f0] 1) " Hz"
Z = 10-16.123025350430098i ohm, |Z| = 18.97 ohm, phase = -58.2 deg, I = 12.12 A, f0 = 71.2 Hz
- Sweep the frequency with
num tableon the modulus to draw the resonance curve - Compute the quality factor Q = (1/R) sqrt(L/C) with
math calc - Add a parallel branch with
complex divfor the product over sum formula
Three-phase motor and power factor correction
A 400 V three-phase motor draws 32 A at cos phi 0.85. The script computes P, Q and S, then sizes the delta capacitor bank that raises the power factor to 0.95.
#1. Three-phase motor 400 V, 32 A, cos phi = 0.85; -> "[P]" (unit calc "sqrt(3)*400 V*32 A*0.85" "kW"); -> "[S]" (unit calc "sqrt(3)*400 V*32 A" "kW"); -> "[Q]" (math calc "sqrt([S]^2-[P]^2)"); #2. Reactive power to compensate to reach cos phi = 0.95; -> "[Qc]" (math calc "[P]*(tan(acos(0.85))-tan(acos(0.95)))"); #3. Capacitance per phase of a delta bank: C = Qc / 3 w U^2; -> "[C]" (unit calc (concat [Qc] " kW / (3*2*pi*50 Hz*(400 V)^2)") "uF"); concat "P = " (math round [P] 2) " kW, Q = " (math round [Q] 2) " kvar, S = " (math round [S] 2) " kVA; bank: Qc = " (math round [Qc] 2) " kvar, C = " (math round [C] 1) " uF per phase in delta"
P = 18.84 kW, Q = 11.68 kvar, S = 22.17 kVA; bank: Qc = 5.48 kvar, C = 36.4 uF per phase in delta
- Use
complex from_polarto write the apparent power S = P + jQ - Compare a star connection: C = Qc / (w U^2) with the phase voltage
- Estimate the yearly saving on reactive energy with
math percent
Voltage drop and losses in a cable
A 40 m single-phase copper line of 2.5 mm2 carries 16 A. The script computes the loop resistance, the voltage drop against the 3 % lighting limit, the Joule losses and the energy lost per year.
#1. Single-phase line: copper rho = 0.0225 ohm.mm2/m, 40 m, 2.5 mm2, 16 A, cos phi = 1; -> "[R]" (unit calc "0.0225 ohm*mm^2/m * 2*40 m / 2.5 mm^2" "ohm"); #2. Voltage drop in V and in percent of 230 V; -> "[dU]" (unit calc (concat [R] " ohm * 16 A") "V"); -> "[pct]" (math calc "100*[dU]/230"); #3. Joule losses and energy lost over 2000 h per year; -> "[Pj]" (unit calc (concat [R] " ohm * (16 A)^2") "W"); -> "[E]" (unit calc (concat [Pj] " W * 2000 h") "kWh"); -> "[ok]" (if (<= [pct] 3) {"OK"} {"too high, use a larger section"}); concat "R = " [R] " ohm, dU = " (math round [dU] 2) " V = " (math round [pct] 2) " % -> " [ok] "; losses " (math round [Pj] 1) " W, " (math round [E] 0) " kWh/year"
R = 0.72 ohm, dU = 11.52 V = 5.01 % -> too high, use a larger section; losses 184.3 W, 369 kWh/year
- Find the smallest standard section that passes with
num solveon the drop formula - Correct rho for the conductor temperature with alpha = 0.00393 per K
- Add the reactance of the cable for long three-phase lines
Higher-order modes of a coaxial cable
A PTFE coaxial cable carries only the TEM mode below the cutoff of the first higher modes. The script computes the characteristic impedance, the TM01 cutoff from the cross product of Bessel functions J0 and Y0, and the TE11 cutoff, the upper limit of single-mode operation.
#1. PTFE coaxial cable: inner radius a = 1.5 mm, outer b = 5 mm, er = 2.1; -> "[a]" 1.5e-3; -> "[b]" 5e-3; -> "[er]" 2.1; -> "[c]" (math calc "[b]/[a]"); #2. Characteristic impedance of the TEM mode; -> "[Z0]" (math calc "60/sqrt([er])*ln([c])"); #3. TM01 cutoff: first root of J0 of x * Y0 of c x - J0 of c x * Y0 of x, x = kc a; -> "[x]" (num solve (concat "bessel_j(0, x)*bessel_y(0, " [c] "*x)-bessel_j(0, " [c] "*x)*bessel_y(0, x)") "x" 1.0 1.7); -> "[fTM]" (math calc "[x]/[a]*_c/(2*pi*sqrt([er]))"); #4. TE11, the first higher mode, with the usual approximation kc = 2/a+b; -> "[fTE]" (math calc "2/([a]+[b])*_c/(2*pi*sqrt([er]))"); concat "Z0 = " (math round [Z0] 1) " ohm, TE11 cutoff = " (math round (math calc "[fTE]/1e9") 2) " GHz, TM01 cutoff = " (math round (math calc "[fTM]/1e9") 2) " GHz: single mode below " (math round (math calc "[fTE]/1e9") 1) " GHz"
Z0 = 49.8 ohm, TE11 cutoff = 10.13 GHz, TM01 cutoff = 29.06 GHz: single mode below 10.1 GHz
Symmetrical components and voltage unbalance
The three phase voltages of a feeder are measured in per unit with their angles. Compute the zero, positive and negative sequence components with the Fortescue operator a, then the voltage unbalance factor V2 / V1 checked against the 2 pct limit of EN 50160.
#1. Measured phase voltages in per unit: unbalanced feeder; -> "[Va]" (complex from_polar 1.00 0); -> "[Vb]" (complex from_polar 0.85 (math calc "-125*pi/180")); -> "[Vc]" (complex from_polar 0.92 (math calc "112*pi/180")); #2. Fortescue operator a = 1 at 120 degrees, and a squared; -> "[a]" (complex from_polar 1 (math calc "2*pi/3")); -> "[a2]" (complex pow [a] 2); #3. Zero, positive and negative sequence components; -> "[V0]" (complex div (complex add (complex add [Va] [Vb]) [Vc]) 3); -> "[V1]" (complex div (complex add (complex add [Va] (complex mul [a] [Vb])) (complex mul [a2] [Vc])) 3); -> "[V2]" (complex div (complex add (complex add [Va] (complex mul [a2] [Vb])) (complex mul [a] [Vc])) 3); #4. Voltage unbalance factor VUF = V2 / V1, limit 2 pct in EN 50160; -> "[vuf]" (* 100 (/ (complex abs [V2]) (complex abs [V1]))); concat "V0 = " (math round (complex abs [V0]) 4) " pu, V1 = " (math round (complex abs [V1]) 4) " pu at " (math round (math calc (concat (complex arg [V1]) "*180/pi")) 2) " deg, V2 = " (math round (complex abs [V2]) 4) " pu | VUF = " (math round [vuf] 2) " pct" (if (> [vuf] 2) {" > 2 pct: out of EN 50160"} {" within EN 50160"})
V0 = 0.0765 pu, V1 = 0.9217 pu at -4.19 deg, V2 = 0.029 pu | VUF = 3.15 pct > 2 pct: out of EN 50160
- Apply the same transform to the currents to find a single-phase fault (I0 = I1 = I2).
- Write the Fortescue matrix and use
matrix mulon real and imaginary parts.
ABCD parameters and Ferranti effect of a 400 km line
A 400 kV, 400 km overhead line has z = 0.03 + j0.33 ohm/km and y = j3.8 uS/km. The script computes the propagation constant and surge impedance, the exact long-line A and B parameters with the complex cosh and sinh, the no-load voltage rise at the receiving end and the surge impedance loading.
#1. Line constants per km and length; -> "[z]" "0.03+0.33i"; -> "[y]" "0.0000038i"; -> "[l]" 400; #2. Propagation constant times length and surge impedance; -> "[gl]" (complex mul (complex sqrt (complex mul [z] [y])) [l]); -> "[Zc]" (complex sqrt (complex div [z] [y])); #3. Exact long-line parameters; -> "[A]" (complex cosh [gl]); -> "[B]" (complex mul [Zc] (complex sinh [gl])); #4. Receiving end voltage at no load and surge impedance loading; -> "[Vr]" (/ 400 (complex abs [A])); concat "gamma l = " (math round (complex re [gl]) 5) " + j" (math round (complex im [gl]) 5) " | Zc = " (math round (complex abs [Zc]) 1) " ohm | A = " (math round (complex abs [A]) 5) " at " (math round (math calc (concat (complex arg [A]) "*180/pi")) 3) " deg, |B| = " (math round (complex abs [B]) 2) " ohm | no-load Vr = " (math round [Vr] 1) " kV (+" (math round (* 100 (- (/ [Vr] 400) 1)) 2) " pct) | SIL = " (math round (/ 160000 (complex abs [Zc])) 0) " MW"
gamma l = 0.02034 + j0.44839 | Zc = 295.3 ohm | A = 0.90138 at 0.561 deg, |B| = 128.16 ohm | no-load Vr = 443.8 kV (+10.94 pct) | SIL = 542 MW
- Size a shunt reactor at the receiving end that brings Vr back to 400 kV
- Compare with the nominal pi model, A = 1 + ZY/2
Short-circuit and peak current at a LV switchboard (IEC 60909)
A 1000 kVA, 20/0.4 kV transformer (uk = 6 %, copper losses 10.5 kW) is fed by a 500 MVA network. The script builds the loop impedance at 400 V, computes the initial symmetrical short-circuit current Ik", the peak factor kappa and the peak current ip used to check the breaker making capacity.
#1. Transformer 1000 kVA, 400 V, uk 6 pct, copper losses 10.5 kW, voltage factor c = 1.05; -> "[U]" 400; -> "[S]" 1000000; -> "[c]" 1.05; -> "[Zt]" (/ (* 0.06 (* [U] [U])) [S]); -> "[Rt]" (/ (* 10500 (* [U] [U])) (* [S] [S])); -> "[Xt]" (math sqrt (- (* [Zt] [Zt]) (* [Rt] [Rt]))); #2. Network 500 MVA referred to 400 V, R/X = 0.1; -> "[Zq]" (/ (* [c] (* [U] [U])) 500000000); -> "[Xq]" (* 0.995 [Zq]); -> "[Rq]" (* 0.1 [Xq]); #3. Loop impedance and initial symmetrical short-circuit current; -> "[R]" (+ [Rt] [Rq]); -> "[X]" (+ [Xt] [Xq]); -> "[Z]" (math hypot [R] [X]); -> "[ik]" (/ (* [c] [U]) (* (math sqrt 3) [Z])); #4. Peak factor and peak current; -> "[kappa]" (+ 1.02 (* 0.98 (math exp (/ (* -3 [R]) [X])))); -> "[ip]" (* [kappa] (* (math sqrt 2) [ik])); concat "Z = " (math round (* 1000 [Z]) 3) " mohm at " (math round (math calc (concat (math atan (/ [X] [R])) "*180/pi")) 2) " deg, R/X = " (math round (/ [R] [X]) 4) " | Ik = " (math round (/ [ik] 1000) 2) " kA | kappa = " (math round [kappa] 4) " | ip = " (math round (/ [ip] 1000) 2) " kA -> " (if (< [ip] 63000) {"breaker 25 kA / 63 kA peak OK"} {"breaker too small"})
Z = 9.935 mohm at 80.07 deg, R/X = 0.1751 | Ik = 24.41 kA | kappa = 1.5996 | ip = 55.21 kA -> breaker 25 kA / 63 kA peak OK
- Add the busbar and cable impedances to get Ik at the end of a feeder
- Compute the minimum current with c = 0.95 and hot conductors to check the protection trips
Skin depth of a copper busbar at the mains harmonics
Harmonic currents increase the AC resistance of conductors. With mu0 and 2pi from the constant library, the script computes the skin depth of copper at 50 Hz and at the 5th, 11th and 20th harmonics, and the AC/DC resistance ratio of a 30 mm round conductor.
#1. Copper at 20 degC, mu0 and 2 pi from the constant library, conductor radius 15 mm; -> "[rho]" 0.0000000172; -> "[r]" 0.015; -> "[mu0]" (string regexp_extract (constant physics_perm_vac_magnetic) "[0-9.]+(E-[0-9]+)?" 0); -> "[twopi]" (string regexp_extract (constant math_two_pi) "[0-9.]+" 0); -> "[out]" ""; #2. Skin depth and Rac/Rdc for each harmonic order; json load "rx_p4f_h" "[1, 5, 11, 20]"; json parse_array "rx_p4f_h" "/" "[h]" { -> "[delta]" (math sqrt (/ (* 2 [rho]) (* (* [twopi] (* 50 [h])) [mu0]))); -> "[x]" (/ [r] [delta]); -> "[k]" (if (< [x] 2) {+ 1 (/ (math power [x] 4) 48)} {+ (/ [x] 2) 0.25}); -> "[out]" (concat [out] "h" [h] " " (* 50 [h]) " Hz: delta " (math round (* 1000 [delta]) 2) " mm, Rac/Rdc " (math round [k] 2) " | "); }; json unload "rx_p4f_h"; string left [out] (- (string length [out]) 3)
h1 50 Hz: delta 9.33 mm, Rac/Rdc 1.14 | h5 250 Hz: delta 4.17 mm, Rac/Rdc 2.05 | h11 550 Hz: delta 2.81 mm, Rac/Rdc 2.91 | h20 1000 Hz: delta 2.09 mm, Rac/Rdc 3.84
- Use flat busbars or hollow conductors when the skin depth is smaller than the thickness
- Weight Rac/Rdc by the harmonic spectrum of the load to get the transformer K factor
Distance protection: apparent impedance in a mho zone
A 110 kV line of 60 km (0.12 + j0.40 ohm/km) is protected by a distance relay whose zone 1 is a mho circle reaching 80 % of the line. During a fault the relay measures 38 kV and 2 kA lagging by 68 deg. The script computes the apparent impedance, tests it against the mho circle and estimates the fault location with the reactance method.
#1. Line impedance, its angle and zone 1 reach 80 pct; -> "[ZL]" (complex mul "0.12+0.40i" 60); -> "[ang]" (math atan (/ (complex im [ZL]) (complex re [ZL]))); -> "[Zr]" (complex mul [ZL] 0.8); #2. Phasors measured during the fault: 38 kV and 2 kA at -68 deg; -> "[V]" (complex from_polar 38000 0); -> "[I]" (complex from_polar 2000 (math calc "-68*pi/180")); -> "[Z]" (complex div [V] [I]); #3. Mho test: distance to the center of the circle smaller than the radius; -> "[d]" (complex abs (complex sub [Z] (complex div [Zr] 2))); -> "[rad]" (/ (complex abs [Zr]) 2); #4. Fault location with the reactance method; -> "[km]" (/ (complex im [Z]) 0.40); concat "line " (math round (complex abs [ZL]) 2) " ohm at " (math round (math calc (concat [ang] "*180/pi")) 2) " deg | Z seen = " (math round (complex re [Z]) 3) " + j" (math round (complex im [Z]) 3) " ohm | margin " (math round (- [rad] [d]) 3) " ohm -> " (if (< [d] [rad]) {"zone 1 trip"} {"no zone 1 trip"}) " | fault at " (math round [km] 1) " km = " (math round (/ (* 100 [km]) 60) 1) " pct of the line"
line 25.06 ohm at 73.3 deg | Z seen = 7.118 + j17.616 ohm | margin 0.955 ohm -> zone 1 trip | fault at 44 km = 73.4 pct of the line
- Add zone 2 at 120 pct with a 300 ms delay and check overlapping with the next line
- Model a fault resistance of 5 ohm: the point moves right and can leave the circle
All-day efficiency of a distribution transformer
A 630 kVA distribution transformer (no-load losses 1.0 kW, load losses 6.5 kW) feeds a residential area with a known hourly load profile at power factor 0.9. The script computes the energy delivered, the iron and copper losses over 24 h, the all-day efficiency and the load of maximum efficiency.
#1. Hourly load profile in kVA from 0 h to 23 h; -> "[S]" "[180, 160, 150, 145, 150, 190, 290, 380, 360, 330, 320, 340, 370, 350, 330, 340, 390, 480, 560, 590, 540, 450, 330, 230]"; -> "[Sn]" 630; -> "[P0]" 1.0; -> "[Pk]" 6.5; -> "[pf]" 0.9; #2. Energy delivered and losses over 24 h in kWh; -> "[E]" (* [pf] (stat sum [S])); -> "[Wfe]" (* 24 [P0]); -> "[Wcu]" (/ (* [Pk] (stat sum_sq [S])) (* [Sn] [Sn])); #3. All-day efficiency, average load factor and load of maximum efficiency; -> "[eta]" (/ [E] (+ [E] (+ [Wfe] [Wcu]))); concat "energy " (math round [E] 1) " kWh | iron " [Wfe] " kWh, copper " (math round [Wcu] 2) " kWh | all-day efficiency " (math round (* 100 [eta]) 3) " pct | mean load " (math round (* 100 (/ (math avg [S]) [Sn])) 1) " pct, max efficiency at " (math round (* 100 (math sqrt (/ [P0] [Pk]))) 1) " pct = " (math round (* [Sn] (math sqrt (/ [P0] [Pk]))) 0) " kVA"
energy 7159.5 kWh | iron 24 kWh, copper 49.61 kWh | all-day efficiency 98.982 pct | mean load 52.6 pct, max efficiency at 39.2 pct = 247 kVA
- Compare with a 400 kVA amorphous core unit (P0 = 0.25 kW) over 30 years of losses
- Add the hot-spot temperature from the IEC 60076-7 thermal model
