Analysis and control of static condenser for regulating AC voltage, power factor correction and load balancing