Intelligent System for Monitoring and Controlling the Energy Consumed