Optimal shunt capacitance for sinusoidal power factor correction (source code)

= Optimal shunt capacitance for sinusoidal power factor correction
{title2=$C_*=Q_L/(\omega V^2)$}

<Optimal shunt capacitance for sinusoidal power factor correction> minimizes the source's RMS <electric current> for an ideal fixed sinusoidal supply and a fixed load with <active power> $P>0$ and inductive <reactive power> $Q_L>0$. A lossless parallel <capacitor> supplies signed <reactive power> $-\omega CV^2$, where $V$ is the supply RMS <electric potential difference> and $\omega>0$ the <angular frequency>.

The squared source <electric current> is
$$
F(C)=I(C)^2=\frac{P^2+(Q_L-\omega CV^2)^2}{V^2},\qquad C\ge0.
$$
Differentiating gives
$$
F'(C)=-2\omega(Q_L-\omega CV^2),\qquad F''(C)=2\omega^2V^2>0.
$$
Thus the unique minimum is
$$
\boxed{C_*=\frac{Q_L}{\omega V^2},\qquad I_{\min}=\frac PV.}
$$
The fundamental quadrature <electric current> vanishes there. Strict convexity proves this is a global optimum in the stated model, rather than merely a stationary point. The capacitive sign and one-frequency <complex electrical power> relation follow from the primary MIT derivation.<AC Power Flow in Linear Networks by James L. Kirtley Jr.>[Energy and Power, equations 61–65 and 71; §7.1 RMS amplitudes]{ref}

For an original example, $P=800\,\mathrm W$, $Q_L=600\,\mathrm{var}$, $V=100\,\mathrm V$ and $f=50\,\mathrm{Hz}$ give $C_*\approx190.99\,\mathrm{\mu F}$. Source <electric current> falls from $10\,\mathrm A$ to $8\,\mathrm A$. A <capacitance> 20% below or above $C_*$ leaves $Q_{\rm net}=+120$ or $-120\,\mathrm{var}$, respectively, and both draw about $8.0895\,\mathrm A$. They have the same <power factor> magnitude, about $0.9889$, but opposite lead/lag direction.

The exact excess above the optimal squared <electric current> is
$$
I(C)^2-I_{\min}^2=\omega^2V^2(C-C_*)^2.
$$
Small sizing errors therefore affect this loss objective quadratically around the optimum, while residual <reactive power> changes linearly and changes sign. An allowed interval $0\le C\le C_{\max}$ clips the optimum to its nearest feasible point. If the original load has $Q_L\le0$, the constrained optimum for added nonnegative <capacitance> is instead $C=0$.

The result assumes a fixed load, ideal sinusoidal supply, lossless correction and no additional network effects. It does not optimize a system with waveform distortion, component heating, variable terminal <electric potential difference> or discrete stages. The <current reduction interval for shunt reactive compensation> describes a wider set of beneficial choices, while <automatic power factor correction> follows a changing load with available stages.