A real-time monitoring and diagnostic procedure for electrical distribution networks