Inspiration

What it does

How we built it

Challenges we ran into## Inspiration

The rapid adoption of Electric Vehicles (EVs) is a massive win for sustainability, but it presents a catastrophic threat to aging utility grids like BESCOM. The lack of coordination between EV fast-charging hubs and the local grid leads to peak load coincidence, dangerous voltage sags, and accelerated transformer thermal aging. We were inspired to bridge the gap between artificial intelligence, power electronics, and utility policy to create ChargeSense AI—a unified "brain" that coordinates EVs and the electrical grid to prevent infrastructure failure.

What it does

ChargeSense AI is a next-generation smart grid coordinator. It maps local grid topology to forecast capacity bottlenecks and actively prevents overloads by dynamically scheduling EV charging slots. By shifting heavy loads to off-peak hours and maximizing solar energy synergy, it protects transformers from thermal meltdowns. It also features a robust Gemini 2.5 Flash AI agent that automatically evaluates new charging station proposals, generates localized policy briefs, and acts as an interactive assistant for utility operators.

How we built it

We built ChargeSense AI with a focus on high-performance visualization, predictive modeling, and seamless AI integration:

  • Frontend: React, TypeScript, Vite, Tailwind CSS, and Framer Motion for a premium, glassmorphic UI.
  • LLM Engine: Google Gemini 2.5 Flash powers our AI planning assistant and policy brief builder, utilizing a dynamic key-rotation architecture to guarantee high availability.
  • Simulation & Math Engines: We implemented custom logic to simulate advanced grid physics and AI models:
    • Reinforcement Learning (Q-Learning): Used for adaptive Time-of-Use (TOU) slot scheduling. The agent optimizes a reward function balancing grid stability ($S_{grid}$), user satisfaction ($U_{sat}$), and peak load penalties ($P_{penalty}$): $$R = \alpha \cdot S_{grid} + \beta \cdot U_{sat} - \gamma \cdot P_{penalty}$$
    • Physics-Informed Modeling (PINN): We calculate the thermal aging acceleration factor ($F_{AA}$) of transformers using the Arrhenius equation based on simulated loads: $$F_{AA} = \exp\left[ \frac{E_A}{R_g} \left( \frac{1}{\Theta_{H,R} + 273} - \frac{1}{\Theta_H + 273} \right) \right]$$
    • Power Quality Analysis: We evaluate the Total Harmonic Distortion ($THD$) introduced by non-linear EV rectifiers to trigger grid health alerts: $$THD = \frac{\sqrt{\sum_{h=2}^{\infty} I_h^2}}{I_1} \times 100\%$$
  • 3D Visualization: We built a custom HTML5 Canvas rendering engine to display interactive 3D topological graphs of the grid network without relying on heavy external 3D libraries.

Challenges we ran into

  • AI Quota & Failovers: To ensure our Gemini AI agent remained highly available during intense data analysis and API rate limits, we had to engineer a custom seamless failover mechanism. It catches 403/429 network errors and instantly rotates to backup API keys, retrying the prompt invisibly to the user.
  • Complex Responsive UI Layouts: Fitting massive amounts of data—such as interactive week-long grid scheduler matrices, 3D canvases, and live alert feeds—onto mobile viewports without breaking the layout required intense CSS Grid refactoring.
  • Translating Physics to UI: Abstracting complex electrical engineering concepts (like load coincidence and harmonic distortion) into an intuitive, gamified dashboard that utility operators could easily understand and act upon.

What we learned

  • Advanced Prompt Engineering: We learned how to effectively inject complex mock-database schemas (JSON) into Gemini 2.5 Flash's context window, constraining the LLM to generate highly accurate, mathematically sound policy briefs without hallucinating.
  • Canvas Performance: We learned how to manage requestAnimationFrame loops, painter's algorithms, and 3D matrix projections purely in JavaScript to build our 3D grid visualizer.
  • Grid Economics: We gained a profound understanding of real-world utility economics, particularly how the "Duck Curve" and time-of-use (TOU) pricing can be manipulated via Virtual Power Plants (VPP) and V2G (Vehicle-to-Grid) tech to save utility companies millions in infrastructure upgrades.

What's next for ChargeSense AI

Our immediate next steps are to integrate live SCADA data feeds from utility transformers and partner with regional Charge Point Operators (CPOs) to test the Reinforcement Learning slot-booking APIs in real-world scenarios. We also plan to expand the V2G degradation models to support commercial electric bus fleets.

Accomplishments that we're proud of

What we learned

What's next for ChargeSense-AI

Built With

Share this project:

Updates