An Adaptive Kalman Filter for Voltage Sag Detection in Power Systems