A digitally-controlled, real-time, analog power-system simulator for closed-loop protective relaying testing