Optimal design for hybrid active power filter using particle swarm optimization