Default post hero

Modeling and Simulating Power Grids in the Browser — A Practical Guide to BambooGrid

Valentin Topolovec
Valentin Topolovec
,
BambooGrid web application for power grids

Modeling and Simulating Power Grids in the Browser — A Practical Guide to BambooGrid

Power-system analysis has traditionally depended on specialized software, commercial licenses, or locally configured engineering environments. BambooGrid makes it easier to start exploring power networks directly in the browser.

Before connecting a new solar plant, battery, industrial load, cable, or transformer to a power network, engineers need to understand how it will affect the rest of the grid. Will bus voltages remain within acceptable limits? Could a line or transformer become overloaded? How much power will be imported from—or exported to—the wider network?

These are the kinds of questions answered by power flow analysis.

BambooGrid is an open-source, browser-based application for visually modeling and analyzing electrical power networks. Built on pandapower, it allows engineers, students, educators, and developers to create multi-voltage-level networks using a drag-and-drop editor and run calculations without installing desktop software or configuring a local Python environment.

In this article, we will build a small distribution network, connect a load and a solar installation, run a power flow calculation, observe reverse power flow, add a transformer and a second voltage level, and inspect the resulting network data.

BambooGrid application view

What Is Power Flow, and Why Does It Matter?

A power grid is not a passive pipe — it is a continuous balancing act. At every moment, the power being generated somewhere in the network must equal the power consumed somewhere else, plus the losses in the wires and transformers that connect them.

Power flow (also called load flow) is the mathematical calculation that tells you, for a given network topology and a given set of generation and load settings: what voltage will appear at every bus? How much current flows through every line and transformer? How much reactive power does each generator have to absorb or inject to keep voltages stable?

The calculation is nonlinear — voltages and power flows depend on each other — so it is solved iteratively. The most common algorithm is Newton-Raphson, the same method used to find roots of equations in any numerical mathematics course.

Power flow is the foundation of almost everything in grid engineering: planning new substations, sizing cables, studying how a large solar farm affects nearby voltage, determining whether a line can survive losing its parallel neighbor. Understanding it is the first step toward building, operating, or studying modern power grids.

The Building Blocks of a Power Network

Before you open the editor, it helps to know what the pieces mean. BambooGrid models the most important elements of a real grid — here is what each one does.

Bus

A bus (or bus bar) is simply a node in the network — a point at a defined nominal voltage (in kV) to which other elements connect. Think of it as a copper bar in a substation switchgear panel: generators, loads, cables, and transformers all bolt onto it. In the load flow, the voltage at every bus is one of the unknowns to be solved.

Every element in BambooGrid must connect to at least one bus. In the editor, buses are the horizontal bars you drag onto the canvas; everything else wires to them.

power grid bus

External Grid (Slack Bus)

The external grid models the connection to the wider transmission network — a system vast enough to absorb or supply any power imbalance in your local network.

In power flow analysis, every island (connected sub-network) needs exactly one voltage reference: a bus where the voltage magnitude and angle are fixed (typically 1.0 p.u., 0°). This bus is called the slack bus — it "takes up the slack" by absorbing whatever active and reactive power imbalance remains after all other generation and load is accounted for. Without it, the system of equations has no unique solution and the solver fails.

The slack bus is the bus itself — not the element connected to it. An external grid is the most common way to create one, but a generator can also be configured as slack. What matters is that exactly one bus in each island serves as the voltage reference and power balance point. The element you connect to that bus (external grid or generator) is what provides the physical ability to inject or absorb the balancing power.

slack bus

For most networks, an external grid is the natural choice: it represents the transmission system, which in practice has near-infinite capacity to absorb imbalances. A generator configured as slack is useful when modeling an isolated microgrid or an island system where a specific machine is responsible for frequency and voltage regulation.

Generator

A generator is a PV bus: you specify its active power output (MW) and the voltage it holds at its terminal bus. The solver works out how much reactive power (MVAr) it needs to inject or absorb to sustain that voltage. A dispatchable gas turbine, a hydro plant, or a CHP unit are all modeled this way.

A generator is not a voltage reference on its own — it holds its terminal voltage but does not balance the network. You still need an external grid (or another generator configured as slack) somewhere in the island.

generator

Static Generator

A static generator is a PQ bus: you fix both active (MW) and reactive (MVAr) power, and the solver does not adjust them. This is the right model for rooftop solar panels, wind turbines, and battery inverters that operate at a commanded set point — they inject what they inject, and the voltage is whatever it is.

A handy mental shortcut for the three source types: the external grid sets voltage and balances the network; a generator sets voltage but only its scheduled power; a static generator just injects a fixed amount.

static generator

Load

A load consumes fixed active power (P in MW) and reactive power (Q in MVAr). It is the simplest element — it represents a factory, a residential feeder, or any aggregated consumer whose demand you know in advance.

load

Shunt

A shunt is a fixed reactive device connected between a bus and ground — typically a capacitor bank (for voltage support, injecting reactive power) or a reactor (for absorbing excess reactive power on lightly loaded cables). Unlike an SVC it cannot regulate dynamically; it just sits there and contributes a constant susceptance to the bus equation.

Transformer

A transformer connects two buses at different voltage levels. BambooGrid supports:

·    2-winding transformers — the workhorse: one HV bus, one LV bus, chosen from a library of standard types (for example, 25 MVA 110/20 kV). After a load flow it shows its loading percentage — how close to its thermal limit it is operating.

·    3-winding transformers — connect an HV, an MV, and an LV bus simultaneously. A single 3-winding transformer can supply an entire substation serving two different voltage levels from one grid connection.

transformer

Both types support tap changers, which shift the voltage ratio slightly from nominal — a real transformer does this mechanically to keep downstream voltages in range as load changes.

Line, Switch, SVC, and Advanced Elements

A line carries power between two buses at the same voltage level. Unlike a closed switch it has resistance and reactance, so it introduces losses and a voltage drop proportional to the load it carries.

A switch connects two buses with zero impedance. Closed, they become a single electrical node; open, they are separated. A bus coupler switch lets you section a busbar: open it, and one section becomes an island that needs its own reference.

An SVC (Static Var Compensator) is a FACTS device that dynamically injects or absorbs reactive power to hold a target voltage — in effect an automatically adjusting capacitor-reactor combination.

Line, Switch, SVC, and Advanced Elements

Building Your First Grid in BambooGrid

The fastest way to learn is to build a small network from scratch. You can try via browser at bamboo.kickstage.com — no account needed, no installation.


Step 1 — Add a bus

Drag a Bus from the left palette onto the canvas. In the right-hand inspector, set its nominal voltage to 20 kV. This is the main medium-voltage bus of a small distribution substation.

Step 2 — Connect an external grid

Drag an External grid element and wire it to the 20 kV bus. Leave its voltage setpoint at 1.0 p.u. (nominal). This is the connection to the transmission network — the slack reference that will balance everything.

Step 3 — Add a load

Drag a Load and wire it to the same bus. Set its active power to 5 MW and reactive power to 1 MVAr — a small industrial customer.

Step 4 — Add a rooftop solar farm

Drag a Static gen and wire it to the bus. Set its active power to 2 MW, reactive power to 0 MVAr — a rooftop PV installation feeding its generation back onto the grid.

Step 5 — Run a load flow

Make sure Load flow is selected in the study mode selector, then click Run in the toolbar. The bus turns green — voltage is at 1.0 p.u. The external grid shows its solved output: 3 MW (5 MW load minus 2 MW solar). The load and static generator report their consumed and injected power. Raise the solar output to 6 MW and run again. The external grid goes negative — the bus is now exporting surplus generation back to the transmission network.

Step 6 — Add a transformer and a second voltage level

Drag a second bus, set it to 110 kV. Add a Transformer (25 MVA 110/20 kV standard type), wire its HV handle to the 110 kV bus and its LV handle to the 20 kV bus. Move the external grid to the 110 kV bus. Run the load flow again — the transformer now shows its loading percentage and the voltage drops slightly on the 20 kV side due to the transformer's impedance.

This network is also available as a ready-made example. Go to File › Open example › Substation with solar to load it in one click and skip the manual steps.


Visualizing Results

After a load flow the canvas updates in place:

  • Bus color reflects voltage deviation from nominal. Green is near 1.0 p.u. (healthy); amber is a moderate deviation; red is a significant deviation requiring attention.
  • Generators and external grids show their solved active and reactive power output.
  • Transformers show their loading percentage — how close to thermal limit they are.
  • Lines show loading percentage and current.

The Results toggle in the toolbar hides or reveals these overlays without re-running the calculation.


Importing and Exporting Networks

BambooGrid uses pandapower JSON as its native file format — a standard format used across the power systems research community.

Export (File › Export) downloads the full network as a single JSON file. The file is a valid pandapower net plus the editor's diagram layout tables, so it round-trips perfectly: import it back and the canvas is exactly as you left it, down to element positions.

Import (File › Import) loads any pandapower JSON — either one you exported from BambooGrid or a plain pandapower net from another source. If no layout is present, the editor computes an automatic diagram layout. This makes it possible to visualize and solve networks produced by pandapower scripts, research papers, or other tools without any manual redrawing.

Several built-in examples are also available under File › Open example, including the classic IEEE 14-bus reference network — a 14-bus, 15-line, 5-transformer benchmark widely used in power systems education.

Sharing Networks

The Share button in the toolbar creates a short link you can copy and send to anyone. When a recipient opens the link, BambooGrid creates an independent editable copy of the network in a new session — the original is completely untouched.

This makes BambooGrid practical for courses and workshops: an instructor can prepare a pre-wired network, share a link with students, and each student gets their own sandboxed copy to experiment with without affecting anyone else's session.

Cloud Saves with Google Sign-In

If you want your work to persist across browsers and devices, BambooGrid offers Google Sign-In. Signing in with your Google account gives you a personal grids library — you can save named networks to the cloud, reopen them later, rename them, and delete them. Guest sessions (no sign-in) still work fully and are restored from the server on reload for the lifetime of the session, but a saved library survives clearing your browser.


Running BambooGrid Yourself

BambooGrid is open source under the MIT License and ships as a single Docker container. The only external dependency is a PostgreSQL database for session persistence.

The repository is at github.com/kickstage/bamboogrid. Contributions are welcome — new element types, CGMES export, UI improvements, and more.

Start Exploring with BambooGrid

In this guide, we built a small distribution network, added load and solar generation, observed reverse power flow, introduced a second voltage level through a transformer, and explored how BambooGrid presents calculation results directly on the network diagram.

Power systems simulation has historically lived behind expensive commercial licenses and complex local installations. Tools like pandapower changed what was possible in Python; BambooGrid's goal is to make the same kind of exploration accessible directly in the browser — for engineers prototyping a new substation layout, for students working through their first load flow, or for anyone curious about how the grid that powers their home actually works.

Try it at bamboo.kickstage.com, explore the example networks, and let us know what you would like to see next. BambooGrid is open source under the MIT License. You can explore the code, report issues, contribute improvements, or give the project a star aa star on GitHub github.com/kickstage/bamboogrid ⭐ 


READ NEXT ARTICLES

Let’s realize your project

Looking for technical expertise to plan and implement digital solutions, allowing you to focus on your core business? We are here to support you. Visit us to discuss your requirements in person or contact us via the details below.

Contact us

Office

Radnička cesta 47, 10000, Zagreb, Croatia

Social

Valentin Topolovec

Project Manager