In non-sinusoidal and unbalanced systems, optimal sizing of the capacitor banks is not a straightforward
task as in sinusoidal and balanced systems. In this paper, by means of qualitative and quantitative analysis, it is interpreted that the classical capacitor selection algorithm widely implemented in Reactive Power Control (RPC) relays does not achieve optimal power factor improvement in non-sinusoidal and unbalanced systems. Accordingly, a computationally efficient algorithm is proposed to find the optimal capacitor bank for smart RPC relays. It is further shown in a simulated test case by using Matlab software that the proposed algorithm provides better power factor improvement when compared with the classical algorithm. It is also figured out from the simulation results that both algorithms cause almost the same harmonic distortion and unbalance deterioration levels in the system