Skip to content

What is a Battery Simulator? 

Brit Heller Brit Heller

If you’re building software for battery energy storage systems, you can’t just plug into a real battery every time you want to test something. That’s expensive, potentially damaging, and frankly impractical. That’s where battery simulators come in.

In Peter Gruenbaum’s course, Software for In Front of the Meter Battery Systems, one of the first things students do is build a battery simulator from scratch using Python and AI. It’s a hands-on way to understand both the software architecture behind battery systems and the role simulation plays in energy storage development.

What Is a Battery Simulator?

A battery simulator is a software representation of a physical battery – one that behaves the way a real battery would, without requiring any actual hardware. It tracks the battery’s state, responds to charge and discharge commands, and enforces realistic limits like maximum power and capacity.

At minimum, a useful battery simulator needs to model:

  • Energy capacity – how much energy the battery can hold
  • State of charge (SOC) – a value from 0 to 1 indicating how full the battery currently is
  • Energy to empty – capacity × state of charge
  • Energy to full – capacity × (1 − state of charge)
  • Maximum power charge  and maximum power discharge 

From there, you can add more realistic behaviors, like how a battery protects itself by tapering charge and discharge power as it approaches the top or bottom of its capacity range.

Why Are Simulators Essential in Battery Software Development?

Real-world battery systems involve expensive hardware, live energy markets, and external data sources like weather forecasts and grid signals. You can’t (and shouldn’t) test your software against all of that until you’re confident it works.

Professional battery software teams typically work across three environments:

Development (Dev): Everything external is simulated – including the battery itself. This lets you test the “plumbing” of your system: does data flow the way you expect? Does your code respond correctly to different battery states?

Quality Assurance (QA): Real data comes in, but outputs go to simulators or sandboxes. You can read from a real battery without actually affecting it. Most energy markets offer sandbox environments where you can practice submitting bids in the correct format before going live.

Production (Prod): The real thing – connected to a real battery, sending real bids to a real market. You only get here once the Dev and QA environments give you confidence.

Without simulators, you’d be forced to do your learning and your bug-fixing in production. That’s a costly mistake in any software context. In energy storage, it can mean hardware damage or financial penalties.

What You’ll Build in This Course

Peter’s course goes beyond this introductory battery simulator. Students build out progressively more sophisticated software, learning how battery systems actually operate in front-of-the-meter applications where batteries participate directly in wholesale energy markets.

By working with tools like Python and AI code generation, you’ll also build a market forecaster, a bid optimizer, and a market simulator.

Ready to Build Battery Software?

This course is for anyone who wants to understand how battery software actually works while  building it themselves.

Enroll in Software for In Front of the Meter Battery Systems today!

Brit Heller
Written by

Brit Heller

Director of Program Management @ HeatSpring. Brit holds two NABCEP certifications - Photovoltaic Installation Professional (PVIP) and Photovoltaic Technical Sales (PVTS). When she isn’t immersed in training, Brit is a budding regenerative farmer just outside of Atlanta where she is developing a 17-acre farm rooted in permaculture principles. She can be found building soil health, cultivating edible & medicinal plants, caring for her animals or building functional art.

More posts by Brit