

The Electrical Foundations of Power Flow
In the first part of this series, we built a small power network in BambooGrid using a 110 kV external grid, a 110/20 kV transformer, an industrial load, and a rooftop solar installation(static generator). After running the calculation, BambooGrid showed the voltage at each bus, the loading of the transformer, and the active and reactive power exchanged with the external grid.
But what is happening behind those results? Why does a load need both MW and MVAr values? And why do power-flow calculations use complex numbers?
In this article, we will use the same network from Part 1 to explain the electrical foundations behind a power-flow calculation.The goal is not to cover every equation used in power-system analysis. Instead, we will focus on the concepts needed to understand what BambooGrid calculates and how to interpret the results.
You can open this exact network directly in BambooGrid — try it live here — and follow along, changing one value at a time and re-running the load flow.
The example contains:
- A 110 kV external grid
- A 25 MVA, 110/20 kV transformer
- A load consuming 5 MW and 1 MVAr
- A solar installation producing 2 MW

Voltage and Current in AC Systems
In a direct-current system, voltage and current are steady, so a single number describes each one. Alternating current is different: voltage and current rise and fall sinusoidally many times a second (fifty on a 50 Hz system), so one number is no longer enough. To describe an AC quantity we need two: its magnitude (how large the swings are) and its phase angle (where it sits in its cycle — its timing relative to a chosen reference). For example, a voltage may have a magnitude of 20 kV and a phase angle of −2°.
Seeing a phase angle in BambooGrid
A phase angle is much easier to grasp when you can see it, and BambooGrid can plot it for you. After running a load flow, right-click any element — a load, a generator, or the external grid — and open the Graph menu. It offers two views: a Power triangle (which we'll return to when we discuss active, reactive, and apparent power) and a U/I waveform, which draws the voltage and current at that element as sine waves over one cycle. Choose U/I waveform to see the phase angle directly.

What is a phase angle?
In the figure, the blue curve is the voltage and the red curve is the current. They have the same shape and frequency, but they don't peak at the same instant. Here the current reaches its maximum slightly after the voltage — it lags by 11.3°, just under one thirty-second of a full 360° cycle. That 11.3° offset is the phase angle between voltage and current at the load.
This angle is exactly what the power factor measures: the closer the two waves line up (a small angle), the larger the share that is active, useful power, and the closer the power factor is to 1. When the current lags the voltage the element looks inductive (as our load does here); when it leads, it looks capacitive. Either way, the shift is a direct, visual picture of the power factor — a perfectly aligned voltage and current (0°) would mean no reactive power at all.
We'll put a number on this shortly. Power factor is simply the cosine of this angle, but the tidiest way to see it is from the power triangle — so we'll return to it once we've introduced apparent power.

Two kinds of angle
It's worth separating two things that both get called an "angle." The one above is local: it compares voltage and current at a single element, and it tells you that element's power factor and reactive power. The solver also reports a different angle — the voltage angle of each bus — and that one is global.
Every bus voltage angle is measured against a single reference: the slack bus (held by the external grid) is defined as 0°, and every other bus angle is stated relative to it. So a bus angle of −150.8° means that bus's voltage lags the slack by 150.8°. It is the differences between these bus angles that determine how active power flows from one bus to another, whereas the local voltage-versus-current angle at a device is about that device's reactive power and power factor.
A solved bus therefore carries two results — a voltage magnitude, such as 19.9 kV, and a voltage angle, such as −150.8° relative to the slack. The magnitude tells us whether the voltage is above or below its nominal value; the angle, measured against the slack, tells us how active power is flowing through the network. BambooGrid shows both the magnitude (in kV) and the angle at each bus, while the solver tracks every angle internally as it balances the network.
Resistance, Reactance, and Impedance
When current flows through a line, cable, or transformer, it encounters electrical opposition.
In an AC network, this opposition contains two main components: resistance and reactance.
Resistance
Resistance converts part of the electrical energy into heat.
It is responsible for effects such as:
- Heating in cables
- Transformer winding losses
- Power losses in conductors
The power lost through resistance increases with the square of the current:
This means that reducing current can significantly reduce electrical losses.
Reactance
Reactance is associated with energy stored in magnetic and electric fields.
Transformers, motors, and overhead lines are mainly inductive, while cables and capacitor banks can have a significant capacitive component.
Unlike resistance, reactance does not continuously convert energy into heat. Instead, energy is stored temporarily and returned to the system during each AC cycle.
Impedance
Resistance and reactance are combined into a single quantity called impedance:
Where:
- R is resistance
- X is reactance
- j indicates the imaginary part
That j is our first encounter with a complex number — a compact way to keep two related quantities (here resistance and reactance) bundled into one value. For now you can simply read Z = R + jX as "impedance is resistance and reactance together"; we'll return to what complex numbers really represent, and why AC analysis leans on them, later in the series.
Impedance determines how much current flows and how the current is shifted in phase relative to the voltage.
The AC version of Ohm’s law is:
or:
The transformer in our BambooGrid example has both resistance and reactance, but its reactance is much larger. This is typical for power transformers. Resistance still matters for losses, but reactance has a stronger influence on voltage drop and reactive-power flow.
Active, Reactive, and Apparent Power
The load in our example consumes:
P = 5 MW
Q = 1 MVAr
These values describe two different types of power.
Active Power
Active power is measured in watts, kilowatts, or megawatts.
It is the power converted into useful work or heat.
Examples include:
- Running a motor
- Heating equipment
- Powering lighting
- Operating computers and electronics
In our example, the load consumes 5 MW of active power.
Reactive Power
Reactive power is measured in var, kvar, or MVAr.
It is associated with the magnetic and electric fields required by equipment such as motors, transformers, and cables.
Reactive power does not perform useful work in the same way as active power. However, it still contributes to current, voltage drop, transformer loading, and network losses.
In our example, the load consumes 1 MVAr of reactive power.
Apparent Power
Active and reactive power combine into apparent power.
The relationship is:
The magnitude of apparent power is:
For our 5 MW and 1 MVAr load:
Although the load consumes 5 MW of active power, the transformer and conductors must carry current corresponding to approximately 5.10 MVA.
This is why evaluating a network only in megawatts can be misleading.
These three quantities form a right triangle — the power triangle — with P along the base, Q as the vertical side, and S as the hypotenuse. BambooGrid can draw it for any element: after a load flow, right-click the element, open the Graph menu, and choose Power triangle.

The angle between the base (P) and the hypotenuse (S) is the same phase angle we saw in the waveform earlier — here about 11.3°. Its cosine is the power factor, which we look at next.
Power Factor
Power factor shows how much of the apparent power is active power. It is the cosine of the voltage–current phase angle we saw earlier, and it can be read straight off the power triangle:
For our load:
That corresponds to a phase angle of about 11.3° (cos⁻¹ 0.98) between voltage and current at the load — the same kind of angle we plotted earlier, now with a number attached. This is a relatively good power factor, but the reactive-power demand still affects the network. A lower power factor would require more current to deliver the same active power, which would increase transformer loading, conductor losses, and voltage drop.
Current Without Local Solar Generation
Enough with the theory — let's look at a practical example now. Take our network from our last blog post and simply remove the static generator (the rooftop solar), leaving just the 5 MW + 1 MVAr load fed through the transformer. You can open this exact case in BambooGrid and follow along here: https://bamboo.kickstage.com/?s=zloVPqRy. Run the load flow and see how much current the transformer has to carry, then let's work out where that number comes from.

In a balanced three-phase system, apparent power is related to voltage and current through:
The approximate current is therefore:
For a 5.10 MVA load connected at 20 kV:
Ignoring transformer losses and small voltage differences, the transformer would carry approximately 147 A on its 20 kV side.
Compared with the transformer rating of 25 MVA:
The exact value shown by BambooGrid may differ slightly because the full calculation includes the solved voltage, transformer losses, magnetizing current, tap position, and other parameters. Running the full solve on this network gives 148 A and 20.6% loading — a whisker above our estimate, exactly as expected.
Adding 2 MW of Solar Generation
Now let's put the rooftop solar back. Starting from the load-only network above, we add a 2 MW static generator on the 20 kV bus — the same industrial site, now with a solar array on the roof — and re-run the load flow. Watch what happens to the transformer loading, the current, and the power exchanged with the external grid: with the panels feeding part of the demand locally, the transformer should have less to carry. Let's work out the new numbers and then compare them.
The solar generator produces:
The load still consumes:
The transformer therefore needs to supply approximately:
The power passing through the transformer is approximately:
The apparent power is:
The approximate current becomes:
The simplified transformer loading becomes:
Running the full run confirms it: BambooGrid reports about 92 A and 12.8% loading, right in line with our estimate.
The solar installation has reduced active-power import and transformer loading. However, it has not removed the reactive-power demand. The load still requires 1 MVAr, so reactive power continues to flow from the external grid through the transformer.
This leads to one of the most important lessons in the example: local solar generation can reduce active-power import without eliminating reactive-power flow.
What Happens During Reverse Power Flow?
In Part 1, we also increased the solar production to 6 MW.
The load still consumes:
5 MW + j1 MVAr
The solar installation now injects:
6 MW + j0 MVAr
The approximate power through the transformer becomes:
The negative active-power value means that 1 MW is exported from the 20 kV network toward the 110 kV grid.
At the same time, the positive reactive-power value means that the load still imports approximately 1 MVAr from the external grid.
Active and reactive power are therefore flowing in different directions:
- Active power flows from the solar installation toward the external grid.
- Reactive power flows from the external grid toward the load.
This is why reverse active-power flow does not necessarily mean that all electrical power is flowing in reverse.
The transformer also remains loaded because it still carries reactive current.
Why Voltage Drops Across a Line
Every line and cable has impedance — resistance R and reactance X together, Z = R + jX. Unlike a transformer, a line does not have a turns ratio and is not designed to change the voltage level. Instead, the voltage difference between its two ends is mainly caused by current flowing through the line’s series impedance. On longer or lightly loaded lines, the line’s capacitance can also influence the voltage.
Suppose we supply a load through a short 20 kV line connected to the transformer. As current flows through the line, the voltage at the receiving end generally becomes slightly lower than the voltage at the sending end.
For a balanced three-phase system, a useful approximation for the line-to-line voltage drop is:
where:
- (\Delta V) is the approximate line-to-line voltage drop
- (R) is the total line resistance
- (X) is the total line reactance
- (P) is the active power flowing through the line
- (Q) is the reactive power flowing through the line
- (V) is the line-to-line voltage
When (R) and (X) are expressed in ohms, (P) and (Q) in MW and MVAr, and (V) in kV, the resulting voltage drop is obtained directly in kV.
This is not the complete AC power-flow equation, but it captures the main relationship. The (RP) term represents the effect of active-power flow through the line resistance, while the (XQ) term represents the effect of reactive-power flow through the line reactance.
On overhead lines, reactance is often comparable to or greater than resistance. Reactive-power flow can therefore make a significant contribution to the voltage drop, even when the reactive demand is considerably smaller than the active demand.
In this example, the load consumes 1 MVAr of inductive reactive power. This reactive demand increases the current and contributes to the reduction in receiving-end voltage. If inductive reactive-power demand increases, the voltage drop generally becomes larger. If it decreases, the receiving-end voltage moves closer to the sending-end voltage.
Extending the BambooGrid Network
To demonstrate this effect in BambooGrid, we extended the original network with a third bus and a feeder.
Starting from the transformer’s 20 kV bus, we added a new Load Bus and connected it through a 10 km overhead line with the following parameters:
We then moved the 5 MW and 1 MVAr load, together with the 2 MW solar installation, to the far end of the line.
Assuming the solar installation supplies 2 MW at unity power factor and does not exchange reactive power, the feeder carries a net active-power demand of:
BambooGrid Results
After running the load flow, BambooGrid shows a sending-end voltage of 19.88 kV at the MV Bus and a receiving-end voltage of 19.38 kV at the Load Bus.

The voltage drop is therefore:
Relative to the nominal 20 kV voltage, this is a drop of approximately:
The feeder carries approximately 3 MW and 1 MVAr at 94 A, reaches about 20% loading, and produces a voltage-angle difference of roughly 1.4° between its two ends. You can open this exact network and try it in BambooGrid here: https://bamboo.kickstage.com/?s=mQwvj9g3
Checking the Approximate Voltage Drop
Checking the Approximate Voltage Drop Over 10 km, the total line resistance is:
The total line reactance is:
Using the simplified relationship:
and using the nominal voltage of 20 kV for the approximation, we obtain:
Expressed as a percentage of the nominal voltage:
The approximate calculation therefore predicts a voltage drop of 0.481 kV, compared with the 0.50 kV obtained from BambooGrid’s full AC power-flow calculation.
Active- and Reactive-Power Contributions
The approximate voltage-drop contribution associated with active power is:
The reactive-power component contributes approximately:
Together, these components give:
The reactive-power component accounts for approximately:
of the estimated voltage drop.
Reactive power therefore contributes almost 40% of the drop, even though the reactive-power flow is only one-third of the active-power flow. This happens because the line reactance is almost twice its resistance.
Why the Full Result Is Slightly Different
The simplified calculation gives approximately 0.481 kV, or 2.4%, while BambooGrid gives approximately 0.50 kV, or 2.5%.
The difference is small and expected. The simplified formula assumes that the voltage remains close to its nominal value and considers only the leading contribution from active and reactive power flowing through the series impedance.
The full AC power-flow calculation also accounts for:
- the actual voltage magnitude along the line
- active and reactive line losses
- changes in power flow between the sending and receiving ends
- the line’s shunt capacitance
- the nonlinear relationship between voltage, current, power and phase angle
The approximate calculation and the full solver therefore reach nearly the same result, while the full solver represents the network more accurately.
Line Capacitance and Voltage Rise
Lines do not always reduce voltage.
Longer lines and cables also have capacitance between their conductors and ground. This capacitance supplies reactive power to the network. On a long, lightly loaded line, the capacitive effect can become large enough for the receiving-end voltage to rise above the sending-end voltage.
This phenomenon is known as the Ferranti effect.
The example demonstrates why voltage depends on more than active-power demand alone. Resistance, reactance, reactive-power flow, line capacitance and phase angle all contribute to the final operating voltage.
This is also why reactive-power management is a network-wide concern. Capacitor banks, transformer tap changers and inverter-based reactive-power control are commonly used to keep voltages within the desired range.
Closing Thoughts
Power-flow software can calculate a network in seconds, but understanding the results requires more than reading the final voltage and loading values.
Complex numbers allow AC magnitudes and phase angles to be calculated together. Resistance and reactance combine into impedance. Active and reactive power combine into apparent power. The per-unit system makes values easier to compare across voltage levels, while admittance allows the physical network to be represented mathematically.
In our example, the 2 MW solar generator reduced active-power import and transformer loading. However, it did not eliminate the reactive-power demand of the load.
When solar production increased above local active-power consumption, active power reversed direction while reactive power continued flowing toward the load.
These relationships explain why the transformer remains loaded even when active-power import is low, why reactive power affects voltage, and why power-flow analysis requires more than simply adding up megawatts.
BambooGrid makes these effects visible directly in the browser. By changing one value at a time and comparing the results, you can connect the electrical theory with the actual behavior of the network.
Coming Next: How the Power-Flow Solver Works
In this article we treated the admittance matrix and the Newton-Raphson solver as black boxes. In Part 3 we open them up. In Part 3we introduce the two ideas at its core. First, the bus admittance matrix (Ybus)— how the grid diagram turns into a matrix, and what its entries represent. Second, Newton-Raphson — the idea of starting from an estimate of the bus
voltages and refining it step by step until the network equations balance. We'll keep it to a gentle introduction and build on it in later parts.
BambooGrid is an open-source, browser-based tool for visually modeling and analyzing electrical power networks using drag-and-drop, eliminating the need for desktop software or local Python setups. This post walks through building a small distribution grid from scratch—adding buses, loads, solar generation, and transformers—then running power flow calculations and interpreting the results.


