Skip to content

aanishraj777/Energy-Optimization-Using-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ AI-Based Energy Consumption Optimization using Deep Reinforcement Learning (DQN)

Python TensorFlow Streamlit

🚀 Project Overview

This repository implements an AI-powered Energy Consumption Optimization System using Deep Reinforcement Learning (DQN).
The goal is to reduce cooling energy usage while maintaining stable indoor temperature.

Key components included in this project:

  • A DQN agent trained to minimize energy usage
  • A custom RL environment simulating HVAC-style temperature dynamics
  • Training and evaluation utilities
  • A Streamlit dashboard for real-time simulation

📌 Features

  • Deep Q-Learning agent with neural network function approximation
  • Custom temperature + energy reward system
  • Modular RL pipeline (environment, agent, training, evaluation)
  • Streamlit UI for demonstration and visualization
  • Easily extensible project structure

🧠 System Architecture (DQN Workflow)

Environment (HVAC)

  • Temperature simulation
  • Energy penalty calculation
    Outputs → state, reward

DQN Agent (Neural Network)

  • Predicts Q-values
  • Selects best action

Energy Control System

  • Applies cooling power based on chosen action

🛠 Installation

Clone the repository: git clone https://github.com/aanishraj777/Energy-Optimization-Using-AI.git cd Energy-Optimization-Using-AI

Install dependencies: pip install -r requirements.txt


🏋️ Training the Model

Run training: python src/train.py

Outputs:

  • Trained model saved in models/
  • Training plots saved in results/training_plots/

📈 Evaluating the Model

Run evaluation: python src/evaluate.py

Outputs:

  • Temperature comparison graph
  • Energy usage comparison graph
  • Metrics saved in results directory

🎮 Running the Streamlit Simulation

Start the dashboard: streamlit run app.py

This launches an interactive simulation comparing:

  • AI-controlled temperature
  • Baseline temperature
  • Energy usage differences

🧪 Running Tests

Run all tests: pytest tests/


📘 Technologies Used

  • Python
  • TensorFlow / Keras
  • NumPy
  • Matplotlib
  • Streamlit
  • PyYAML

📌 Future Improvements

  • Multi-agent reinforcement learning
  • Deploy Streamlit UI online
  • Integrate live IoT sensor data
  • Hyperparameter optimization (Optuna / Ray Tune)

🤝 Contributing

Pull requests are welcome!
Fork → Branch → Commit → Pull Request.


⭐ Support

If you find this useful, please consider giving the repository a star ⭐ on GitHub!

About

AI-powered HVAC energy optimizer using Deep Q-Learning to reduce cooling energy usage while maintaining comfortable indoor temperatures. Includes training pipeline, simulation environment, and an interactive Streamlit UI.

Topics

Resources

Stars

Watchers

Forks

Contributors