InspirationOur inspiration came from the "Duck Curve"—a phenomenon where the surge in renewable energy during the day followed by peak demand at night threatens to collapse power grids. We realized that while batteries exist, they lack the intelligence to act autonomously. We wanted to build a "brain" for the grid that doesn't just store power, but strategically deploys it to save money and prevent blackouts.What it doesGreen-Grid AI is an autonomous energy management system. It uses a Deep Reinforcement Learning agent to control home battery storage. The system monitors real-time grid load, weather conditions, and battery state-of-charge (SOC). It performs Energy Arbitrage (buying/charging when cheap, using/selling when expensive) and Peak Shaving (discharging during high-stress events) to ensure grid stability and consumer savings.How we built itThe Brain: We implemented the Proximal Policy Optimization (PPO) algorithm using Stable-Baselines3, treating energy management as a Markov Decision Process (MDP).The World: We built a custom OpenAI Gymnasium environment (grid_env.py) to simulate battery physics, including charge limits and discharge penalties.The Data: We processed Kaggle datasets on smart home usage and weather, normalizing features to help the neural network converge faster.The Interface: A real-time Streamlit dashboard that visualizes the AI's "Strategy" and battery health, including a "Grid Stress" toggle to test the agent's resilience under pressure.Challenges we ran intoThe biggest hurdle was Reward Engineering. Initially, the AI was "lazy"—it would simply keep the battery full to avoid penalties. We had to fine-tune the reward function to balance the risk of a blackout against the economic benefit of discharging during peak hours. We also encountered a StreamlitDuplicateElementId error when rendering our Plotly charts in a fast loop, which we solved by implementing unique keys for each element.Accomplishments that we're proud of90% Reduction in Value Loss: Our training logs show the agent successfully "converged," meaning it truly learned the patterns of the grid rather than just guessing.Autonomous Crisis Response: The system reacts to our "Grid Stress" trigger in milliseconds, instantly shifting from a charging strategy to a discharging strategy to save the system.Zero-Blackout Performance: In our testing episodes, the AI managed to keep the grid online 100% of the time.What we learnedWe learned that Reinforcement Learning is significantly more powerful than traditional rule-based programming for volatile systems like energy grids. We also gained deep insights into feature normalization—realizing that neural networks perform significantly better when environmental data is scaled between $0$ and $1$.What's next for Green GridWe plan to scale the project from a single-home simulation to a Multi-Agent Reinforcement Learning (MARL) system where hundreds of "Green-Grids" can communicate to balance an entire city’s load collectively. We also want to integrate live API data from NOAA for even more accurate weather-based forecasting.
Log in or sign up for Devpost to join the conversation.