Module electrical
Expand description
The scalar electrical formulas both network families share, which live
in powerio-core (electrical::calc_impedance_base, the power factor
relations and the voltage power law term).
The scalar electrical formulas both network families share: the per unit
impedance base, the power factor relations and the voltage power law
term. Each is the one implementation the transmission, distribution,
composition and matrix crates call.
Enums§
- Apparent
Power Order - The order
calc_line_apparent_powermultiplies in. The orders are the same product and can differ in the last place. - Impedance
Ratio Form - Which ratio
calc_impedance_from_ratioreads and how it forms the split. The forms can differ in the last place. - Reactive
Ratio Form - How
calc_reactive_ratioformstan(acos |pf|). The forms are the same ratio and can differ in the last place. - Rebase
Order - The order in which
calc_impedance_rebaseformsvalue · Z_base(from) / Z_base(to). Each reader keeps the order it has always used, so its results stay bit for bit the same; the quantity is the same in every order.
Constants§
- LOAD_
VOLTAGE_ RATIO_ FLOOR - Below this voltage ratio a power law term with exponent below one is
continued by its tangent at the floor (
calc_voltage_power_term):x^γhas an unbounded slope at zero forγ < 1(and is itself unbounded forγ < 0), and an iterate can pass near zero on its way to a solution. - SQRT_3
√3, the line to line over line to neutral voltage ratio of a balanced three phase system.
Functions§
- calc_
admittance_ base - The admittance base
S / V²of a voltage base and a power base in consistent units (volts and volt amperes give siemens, kilovolts and megavolt amperes give siemens as well), formed aspower / (voltage · voltage).Noneunless both bases are positive and finite and the quotient is positive and finite. The one admittance base: dividing by it takes a susceptance or conductance to per unit as dividing bycalc_impedance_basetakes an impedance. - calc_
branch_ impedance_ base - The impedance base
V₁ V₂ / Sof a branch between two voltage bases at a power base, formed asfrom_voltage · to_voltage / power, in consistent units: the base on which a line joining two nominal voltages (an IIDM line between voltage levels) states its per unit series impedance. Withfrom_voltage == to_voltageit iscalc_impedance_base.Noneunless all three bases are positive and finite and the quotient is positive and finite. - calc_
impedance_ base - The impedance base
V² / Sof a voltage base and a power base in consistent units (volts and volt amperes give ohms, kilovolts and megavolt amperes give ohms as well).Noneunless both bases are positive and finite and the quotient is finite; the caller states what an unusable base means for its own quantity. The same quantity ascalc_branch_impedance_basewith one voltage at both ends. - calc_
impedance_ from_ ratio - The resistance and reactance
(R, X)of an impedance of magnitudemagnitudewith the givenR / XorX / Rratio, split asformstates overcalc_impedance_ratio_divisor. The one impedance from a magnitude and a ratio: the SINCAL multiconductor transformer, source and rated shunt readers and the OpenDSS source’s short circuit impedance read it. - calc_
impedance_ ratio_ divisor - The divisor
|Z| / Xof an impedance with the given ratio, formed asformstates:hypot(R/X, 1)or√(1 + 1 / (X/R)²). - calc_
impedance_ rebase valuetaken from the per unit base(from_voltage, from_power)to the base(to_voltage, to_power)when it is a per unit impedance, the factorZ_base(from) / Z_base(to); with the bases swapped it takes a per unit admittance fromfromtoto.orderpicks the operation order (RebaseOrder). The one per unit rebase: the SINCAL balanced transformer’s series impedance, the PSS/ECM=2magnetizing admittance and the integrated transmission and distribution transformer lowering read it.- calc_
line_ apparent_ power - The apparent power of a balanced current
currentat the voltagevoltage:factor · V · I, withfactorSQRT_3for a three phase rating at its line to line voltage and1for a single phase one, in consistent units (kilovolts and kiloamperes give megavolt amperes), the product taken inorder. The one rating conversion from current: the CGMES, UCTE, PowSybl PSS/E and SINCAL readers, the multiconductor to balanced lowering and the OpenDSS source read it. - calc_
line_ current - The balanced current of an apparent power
poweratvoltage,S / (factor · V): the inverse ofcalc_line_apparent_power. The CGMES, UCTE and SINCAL writers and the OpenDSS source and Thevenin writer read it. - calc_
log_ voltage_ power_ term - One voltage power law term
c x^γover the log voltage ratioℓ = ln x, formed asc e^{γ ℓ}, with its derivativeγ c e^{γ ℓ}with respect toℓ:calc_voltage_power_termon the positive voltage domain a log voltage lift defines, where no floor is needed. The one log voltage term evaluation: the multiconductor OPF load parameter sensitivity over its log voltage coordinate reads it. - calc_
power_ factor_ coefficients - The coefficients
[a, b]of a fixed power factor written as the rowa P + b Q = 0:a = √((1 − |pf|)(1 + |pf|))andb = −pf, so thatQ / P = a / pf(calc_reactive_ratio’sReactiveRatioForm::Sine) and a tiny nonzero power factor keeps a finite row. - calc_
power_ factor_ coefficients_ derivative - The derivatives of
calc_power_factor_coefficientswith respect topf:[−pf / √(1 − pf²), −1]on|pf| < 1. - calc_
power_ factor_ sine - The sine of a power factor’s angle,
sin(acos |pf|) = √((1 − |pf|)(1 + |pf|)), formed without the cancellation of1 − pf²near unity: thecalc_quadratureof a unit magnitude. Reactive power isStimes this for an apparent powerS.NaNwhen|pf| > 1. - calc_
quadrature - The quadrature leg
√(m² − r²)of a magnitudemand its in phase partr, formed as√((m − |r|)(m + |r|)), free of the cancellation ofm² − r²near|r| = m, and asm √((1 − q)(1 + q))withq = |r| / mwhere that product overflows: the reactance of a short circuit test from its impedance and resistance, the magnetizing current of a no load test from its exciting current and loss, the reactive power of an apparent power and its active part, and withm = 1the sine of a power factor (calc_power_factor_sine). Zero when both are zero;NaNwhen|r| > mor either isNaN. The caller states what an excess means for its quantity. - calc_
rated_ admittance - The admittance that draws
poweratvoltage,power / V², formed aspower / (voltage · voltage)in consistent units: a susceptance from a rated reactive power (a capacitor bank or a shunt section in Mvar at kilovolts), a conductance from an active power. The one power over voltage squared at a real power (calc_squared_voltage_admittance):calc_admittance_base, the capacitor stamp, the BMOPF capacitor lowering, the OpenDSS common return bank and the CGMES and PSS/E shunt and SVC conversions read it. - calc_
rated_ power - The power an admittance draws at
voltage,admittance · V², formed asadmittance · (voltage · voltage): the inverse ofcalc_rated_admittance. - calc_
reactive_ ratio - The reactive over active power ratio a power factor fixes, OpenDSS and
BMOPF by sign:
Q / P = tan(acos |pf|)withpf > 0, Q on the same side as P, and the opposite sign forpf < 0, formed asformstates. Infinite atpf = ±0andNaNwhen|pf| > 1. - calc_
reactive_ ratio_ derivative - The derivative of
calc_reactive_ratiowith respect topf(either form),−1 / (pf² √(1 − pf²))on0 < |pf| < 1. - calc_
squared_ voltage_ admittance - The admittance
S / V²that draws the powerpowerat a voltage whose squared magnitude isvoltage_squared, formed aspower / voltage_squared, for a real or a complex power (conj(S) / |V|²takesconj(S)). Unchecked, ascalc_squared_voltage_impedance. The one power over voltage squared:calc_rated_admittanceis it atvoltage · voltage, and the distribution load’s nominal admittance and the transformer magnetizing base read it. - calc_
squared_ voltage_ impedance - The impedance
V² / Sthat draws the powerpowerat a voltage whose squared magnitude isvoltage_squared, formed asvoltage_squared / power, for a real or a complex power (|V|² / conj(S)takesconj(S)). With an impedance in place of the power it is the power that impedance draws, the same quotient. Unchecked: the caller states what an unusable voltage or power means. The one voltage squared over a power:calc_branch_impedance_base(overV₁ V₂), the distribution ZIP coefficient and nominal power conversions and the OpenDSS rated reactor read it. - calc_
voltage_ power_ term - One voltage power law term
c x^γat the voltage ratiox = |V| / V_nomand its derivativeγ c x^(γ−1)with respect tox. Exponents 0, 1 and 2 (constant power, current and impedance) are evaluated withoutpowf. For any otherγ < 1andxbelowLOAD_VOLTAGE_RATIO_FLOORthe term follows its tangent at the floor,c (f₀ + f₀' (x − x₀)), so value and slope stay finite and consistent as a voltage approaches zero. - calc_
voltage_ power_ terms - The sum of voltage power law terms
[coefficient, exponent]at the voltage ratiox, with its derivative with respect tox, each term bycalc_voltage_power_term. - calc_
wye_ line_ voltage - The line to line voltage of a balanced three phase system from its line
to neutral voltage,
√3 V_LN: the inverse ofcalc_wye_phase_voltage. - calc_
wye_ phase_ voltage - The line to neutral voltage of a balanced three phase system from its
line to line voltage,
V_LL / √3. The one line to neutral conversion (OpenDSS, MG-RAVENS, pandapower, the transmission and distribution coupling).