Energy monitoring system in factories