Added running median and voltage drop detection