Blog

Batteries and Energy Storage

A battery does not store electricity. It stores chemistry and makes current on demand, always as DC. Part 17 builds a 400 kWh pack from 3.2 V cells, explains kW versus kWh, and sizes a battery to shave an office tower's 1,600 kW peak.

Tan Kok XinTan Kok XinElectricity Fundamentals
Cutaway battery cell with ions crossing inside while electrons power a lamp through an external circuit

Part 17 of 24 in Cobler's Electricity Fundamentals course. New here? Start with the course map.

The fan drive in Part 16 held 146 joules in its capacitor, and it tripped about 15 milliseconds into a voltage sag. So far in this course, every watt had to be generated the instant it was used.

Now let's put a 400 kWh battery in the plant room. That holds 400 × 3.6 MJ = 1,440 million joules, about ten million times as much.

And something kind of strange is going on in there, because a flat battery contains just as many electrons as a full one. So to see how batteries store energy, we have to set electricity aside for a moment, because what a battery really stores is chemistry.

It turns electrical energy into chemical energy, keeps it for hours or months, and then turns it back. That makes it the first thing in the course that gets around the instant-use rule.

How batteries store energy

Let's take two materials, one that gives up electrons easily and one that takes them readily. If they touched, they'd react at once and release their energy as heat.

So what if we keep them apart with a wall that lets charged atoms (ions) through, but not electrons? Now the reaction can only run when the electrons travel through our circuit.

That arrangement is what we call a cell. The two materials are its electrodes, and the wall is a thin porous separator soaked in an electrolyte.

Let's take a look at a real one, a lithium iron phosphate (LFP) cell, the chemistry of about 90 percent of new grid batteries (IEA). Its negative electrode is graphite holding lithium.

When we close the circuit, each lithium atom gives up an electron, and the lithium ion crosses the electrolyte to the iron phosphate electrode.

But its electron can't follow inside the cell, so it goes the long way round. It goes out of the negative terminal, through the copper of Part 1, through the lamp or the fan, and into the positive terminal. On the way, it delivers energy.

If we open the switch, the electrons have no path, so the ions stop too. That's why a battery can sit on a shelf for months.

Now charging is basically the same reaction run backwards. A charger pushes electrons back into the negative side, and the ions follow them home into the graphite. The number of electrons never changes, only where they sit and the chemistry holding them.

Cross-section of a battery cell: a negative electrode on the left, a positive electrode on the right, electrolyte and separator between them with ions moving across, and an external wire through a lamp carrying electrons from the negative to the positive terminal

Ions move inside the cell, but electrons can only travel through the outside circuit, and they deliver energy to the lamp on the way.

So where does the voltage come from? Well, in Part 2 we defined a volt as a joule per coulomb.

The reaction releases a fixed amount of energy for each electron that makes the trip, and the two materials set how much. For LFP it's about 3.2 joules per coulomb, so the cell's nominal voltage is 3.2 V.

And the size of the cell sets how many electrons can make the trip. That's its charge, which we measure in amp-hours (Ah). One amp for one hour is 3,600 coulombs, because 1 A = 1 C/s. So for a common large cell of 280 Ah:

$$E = Q \times V = (280 \times 3600 \text{ C}) \times 3.2 \text{ V} \approx 3.2 \text{ MJ} \approx 0.9 \text{ kWh}$$

That last step uses 1 kWh = 3.6 MJ from Part 5. That means one cell holds about as much energy as a 3 kW kettle uses in 18 minutes.

Batteries and DC

You might have noticed the electrons only ever go one way round. While the cell discharges, the reaction runs in one direction. So electrons leave the negative terminal and enter the positive, steadily, for as long as the reaction lasts.

There's nothing in the cell that flips that flow 100 times a second, the way AC (alternating current) does in Part 8. So what comes out is DC (direct current).

But a building runs on AC, so a battery needs Part 15's electronics between it and the switchboard. To discharge, an inverter turns DC into 50 Hz AC with pulse-width modulation. To charge, a rectifier turns AC back into DC.

And in a modern battery system, one bidirectional converter does both. The same transistor bridge works as an inverter one way and as an active rectifier the other.

Every conversion loses a little energy as heat, and so does the cell's own internal resistance (\(I^2 R\), from Part 3). The share we get back is what we call the round-trip efficiency.

Counted from AC in to AC out, a lithium-ion grid battery returns around 85 percent. That's the planning figure of the US National Renewable Energy Laboratory (NREL).

The US Energy Information Administration found the country's grid batteries averaged 82 percent in 2019 (EIA). And you still pay for the lost part when you charge.

Solar panels make DC too, from light rather than chemistry. That's why solar and batteries pair so easily, because both live on the DC side of an inverter. The optional extra How Solar Panels Make Electricity shows how.

Energy capacity and power rating

Now think of a rooftop water tank. How much water it holds is one size. How fast it can fill or empty is another, and the width of its pipe sets that. So a big tank on a thin pipe takes all day to drain.

A battery has the same two sizes:

  • How much it holds is its energy capacity, in kWh.
  • How fast it can take energy in or give it out is its power rating, in kW.

These are Part 5's two ideas, an amount and a rate, and different parts of the design set them.

Let's start with the kWh, which comes from the number of cells. One cell holds about 0.9 kWh, so how do we go from that to a pack that can carry a building through an afternoon?

Well, what if we wire hundreds of cells together with the two rules of Part 4? We know that in series, voltages add, and in parallel, currents add. Here's an illustrative pack:

  • 224 cells in series: 224 × 3.2 V ≈ 717 V DC, one string of 280 Ah.
  • Two strings in parallel: still 717 V, but 2 × 280 = 560 Ah.
  • Energy: 717 V × 560 Ah ≈ 401,000 Wh, about 400 kWh from 448 cells.

Then the kW comes from the converter, and from how hard we can push the cells. If we fit a 100 kW converter, the pack runs for 400 ÷ 100 = 4 hours at full power.

At 100 kW the DC current is 100,000 ÷ 717 ≈ 140 A, or 70 A per string. Drawing 70 A from a 280 Ah cell would empty it in four hours, and engineers write that rate as 0.25C.

If we push harder, say at 1C, the cell would empty in one hour. But the \(I^2 R\) heat inside each cell rises with the square of the current. That's why fast batteries need more cooling, and wear sooner.

And batteries do wear out with use. Each full charge and discharge is what we call a cycle, and each cycle wears the cell slightly.

A battery is usually retired when it holds 70 to 80 percent of its original capacity. Long spells near full charge also wear lithium-ion cells, especially when they're warm.

Worth knowing: an LFP cell typically lasts around 6,000 cycles at 80 percent depth of discharge (the share of capacity used each cycle). Used gently, it can last up to 8,000 cycles before its health falls to 70 percent (NextG Power).

Batteries in buildings

So where do we find these in a building? Well, most buildings actually have batteries already, doing quiet jobs where even a one-second gap isn't allowed.

  • UPS for the server room. The office tower's 60 kVA UPS (uninterruptible power supply) is Part 15's rectifier and inverter with a battery on the DC link between them. The servers always run from the inverter, so when the mains fails there's no gap at all. The battery only has to bridge the seconds until the standby generator from Part 7 starts. Then the transfer switch moves the essential supply onto it (When the Mains Fails).
  • Trip batteries in the 11 kV switchgear. A breaker has to open in exactly the failure that kills its supply. So its trip coil runs from its own DC battery cabinet (Inside the Consumer Substation).
  • Emergency lights carry their own small batteries, so the stairwells stay lit.
  • Battery energy storage systems (BESS) scale the idea up, with hundreds of kWh of cells, a bidirectional converter and a connection to the building's supply. They store midday solar for the evening, or cut the building's peak demand.
Worth knowing: in Malaysia, the Energy Commission's MyBeST programme plans four grid batteries of 100 MW / 400 MWh each, targeted for 2027 (Energy-Storage.news). TNB (Tenaga Nasional Berhad) launched its Santong battery system, also 100 MW / 400 MWh, in May 2026. It was the first connected to the national grid (The Star).

Peak shaving

Let's take the office tower. Its maximum demand (Part 5) is 1,600 kW, and it's set on hot weekday afternoons, when the chillers work hardest. At this point you might be wondering whether that means we need a 1,600 kW battery. Well, we don't.

A battery that supplies only the slice above 1,500 kW during those half-hours still lowers the maximum demand the TNB meter records. But it does need both sizes to be right:

  • kW: it needs at least the 100 kW gap between the peak and the target, so the 100 kW converter above fits.
  • kWh: it needs enough to last as long as demand stays above the target. Say demand sits above 1,500 kW from 1:30 pm to 4:00 pm, by 60 kW on average (illustrative). That's 2.5 h × 60 kW = 150 kWh. So the 400 kWh pack covers it with room for a hotter day, without running the cells flat.
Illustrative weekday load curve for an office tower rising to a peak of 1,600 kW in the mid-afternoon. A dashed line at 1,500 kW shows the new target. The part of the peak above the line is shaded and labelled as supplied by the battery

Illustrative only: the battery supplies the part of the afternoon peak above 1,500 kW, so the meter records a lower maximum demand.

Then the battery recharges overnight. Now remember, maximum demand is the highest 30-minute average of the month (why one half-hour costs so much). So the battery has to hold every half-hour under 1,500 kW on every working day.

So what's that worth? A tower on an 11 kV supply pays capacity and network charges on its maximum demand. Together that's RM89.27 per kW on the General tariff, or RM97.06 per kW on Time-of-Use. We can lay out how the month can end, case by case:

  • Every peak caught: cutting 100 kW is worth RM8,927 to RM9,706 that month.
  • One half-hour missed: that half-hour sets the month's maximum demand, and the saving shrinks, to nothing if it reached the full 1,600 kW.
  • A low-voltage building: it pays no per-kW charge, so peak shaving does little for it either way.

If you want to go further, Battery Energy Storage for Peak Shaving works through sizing and payback.

The end of Act 2

So that completes Act 2. We started from one electron in Part 1, and we've followed electricity through the grid, the motors, the electronics and now into storage.

But look at what our peak-shaving plan assumed. It assumed someone knows the building's demand, half-hour by half-hour, and which loads are making it.

The TNB bill shows one maximum-demand number a month. Inside the tower, electricity splits into hundreds of circuits, and a battery can't shave a peak that nobody sees coming.

So how does the electricity actually get from the intake to all of those circuits, and how could we see it and control it there? That's what Act 3 is about, inside one building. Part 18 starts with the map, from the 11 kV intake to every load.


This is Part 17 of 24 in Cobler's Electricity Fundamentals course. Previous: Electrical Harmonics and Power Quality. Next: Building Electrical Distribution.

Cobler builds CobiNeural, which shows a building's demand half-hour by half-hour and alerts the team before a peak sets the month's bill. To see your own peaks, talk to us.

FAQ

Frequently asked questions

Ask us about this topic

Something in this article you want to dig into — or a situation in your own building it doesn't quite cover? Send us your question. We don't run public comments; the team replies to you directly by email.

0/500

Keep reading