Using statcoms for voltage dip mitigation