Intelligent airflow system