A novel algorithm for capacitor placement to improve voltage stability of radial and meshed power systems