Inspiration

As a power systems engineer, understanding complex models is always a challenge due to the number of interacting components and size of the interconnected system. We built GemmaPower as a solution to this.

What it does

GemmaPower makes it possible to "talk" to the grid, answering questions about system stability, critical contingencies, loading, and generation state. It acts as an intelligent assistant that bridges the gap between raw simulation data and actionable engineering insights.

How we built it

We built GemmaPower with a hybrid architecture combining pandapower's simulation engine with modern generative AI:

  • Core Simulation Engine: We used Python and Pandapower to handle the rigorous mathematical modeling of the electrical grid, allowing for real-time load flow and contingency analysis.
  • The "Brain": We integrated Google's Gemini models (via google-genai) to power the natural language understanding. The LLM acts as an agent—parsing user queries like "What happens if Line 4 fails?" and converting them into specific executable functions on the backend.
  • Backend: A FastAPI server creates the bridge between the frontend request and the Python simulation logic.
  • Frontend: The user interface was built with React and Vite

Challenges we ran into

  • Connecting the model with pandapower: Bridging the gap between unstructured natural language and a strict mathematical simulation engine was difficult. We had to design robust prompt engineering and function calling mechanisms to ensure that user queries triggered the accurate load flow calculations without error.
  • Hallucination Prevention: Ensuring the AI relied strictly on the pandapower simulation results rather than hallucinating plausible-sounding but physically incorrect values.

Accomplishments that we're proud of

  • The Interface: Creating a chat interface that feels like consulting a senior colleague—someone who can instantly run the math and report back the results.

What we learned

  • Hybrid Systems: The importance of combining the "creativity" of GenAI with the "accuracy" of traditional grid solving techniques to create a reliable engineering tool.

What's next for GemmaPower

  • Visual Topology Editing: Allow users to add or remove buses and lines simply by dragging and dropping elements in the UI.
  • Refining Chat: Enhancing the chat interface to handle even more complex queries, such as multi-step contingency analysis and optimization scenarios.
Share this project:

Updates