Intelligent control of ventilation systems saves energy