electronics.power_factor_correction

Functions

_reactive_power_difference(→ float)

Validate the inputs and return the difference between the load's current and

shunt_capacitor_power_factor_correction(→ float)

Calculate the shunt capacitance (in farads) to add in parallel with the load

shunt_inductor_power_factor_correction(→ float)

Calculate the shunt inductance (in henries) to add in parallel with the load

Module Contents

electronics.power_factor_correction._reactive_power_difference(frequency: float, voltage: float, real_power: float, current_power_factor: float, expected_power_factor: float) float

Validate the inputs and return the difference between the load’s current and expected reactive power (ΔQ), shared by the capacitor and inductor helpers.

>>> round(_reactive_power_difference(60, 120, 4000, 0.8, 0.95), 6)
1685.263579
>>> _reactive_power_difference(0, 115, 800, 0.6, 0.87)
Traceback (most recent call last):
  ...
ValueError: frequency is zero dc circuit
>>> _reactive_power_difference(60, 0, 800, 0.6, 0.87)
Traceback (most recent call last):
  ...
ValueError: voltage is zero no excitation
electronics.power_factor_correction.shunt_capacitor_power_factor_correction(voltage: float, frequency: float, real_power: float, current_power_factor: float, expected_power_factor: float) float

Calculate the shunt capacitance (in farads) to add in parallel with the load in order to achieve the expected power factor.

Examples: >>> shunt_capacitor_power_factor_correction(120,60,4000,0.8,0.95) 0.00031043753362948597 >>> shunt_capacitor_power_factor_correction(150,50,2000,0.6,0.87) 0.00021690547192207782 >>> shunt_capacitor_power_factor_correction(115,0,800,0.6,0.87) Traceback (most recent call last):

ValueError: frequency is zero dc circuit >>> shunt_capacitor_power_factor_correction(0,60,800,0.6,0.87) Traceback (most recent call last):

ValueError: voltage is zero no excitation

electronics.power_factor_correction.shunt_inductor_power_factor_correction(voltage: float, frequency: float, real_power: float, current_power_factor: float, expected_power_factor: float) float

Calculate the shunt inductance (in henries) to add in parallel with the load in order to achieve the expected power factor.

Examples: >>> shunt_inductor_power_factor_correction(120,60,4000,0.8,0.95) 0.02266540783980564 >>> shunt_inductor_power_factor_correction(120,60,4000,-0.8,-0.4) 0.006195660726930193 >>> shunt_inductor_power_factor_correction(115,0,800,-0.6,0.87) Traceback (most recent call last):

ValueError: frequency is zero dc circuit >>> shunt_inductor_power_factor_correction(0,60,800,-0.6,0.87) Traceback (most recent call last):

ValueError: voltage is zero no excitation >>> shunt_inductor_power_factor_correction(120,60,4000,0.8,0.8) Traceback (most recent call last):

ValueError: current and expected power factors are equal, no correction needed