DCE-340 · Lesson 6 of 12 · 28 min
Battery energy storage, grid services and on-site generation
Traditional backup power sits idle almost all the time: UPS batteries float at full charge and generators wait for an outage that comes once or twice a year. Large battery energy storage systems (BESS), grid-interactive UPS, and on-site generation can put those assets to work: shaving peaks to lower electricity bills, supporting the grid in emergencies, earning revenue from frequency regulation, integrating renewable power, and in some cases supplying the facility entirely from its own generation when grid capacity is short. This lesson covers facility-scale BESS, the services batteries and UPS systems can provide to the grid, on-site generation options from gas engines to fuel cells, and microgrids that combine them under one controller.
Facility-scale battery energy storage
A BESS for a data center is typically one or more containerized lithium-ion systems, usually lithium iron phosphate (LFP) chemistry for its thermal stability and cycle life, from a few megawatt-hours to hundreds. Each container holds battery racks with a battery management system, cooling and fire protection; power conversion systems (bidirectional inverters) connect it to medium-voltage switchgear through transformers.
A BESS differs from UPS batteries in purpose and duty:
| UPS battery | Facility BESS | |
|---|---|---|
| Typical runtime | 5–15 minutes at full load | 1–4 hours at rated power |
| Duty | Rare discharges, float charging | Daily or frequent cycling |
| Connection | DC bus of each UPS | Medium-voltage bus through inverters |
| Main purpose | Bridge to generators | Energy shifting, peak shaving, grid services, backup |
Some designs use a BESS together with, or partly in place of, generators: if the battery can carry the facility for several hours, it covers most utility outages, and generators (or fewer of them) cover the rare long ones.
Peak shaving and energy shifting
Commercial electricity tariffs often include demand charges based on the highest power drawn in a month (in $ per kW), and time-of-use energy prices that are higher at peak hours. A data center's IT load is fairly flat, but cooling peaks on hot afternoons, so its demand peak can be shaved by discharging a battery during those hours and recharging at night.
import numpy as np
# Peak shaving with a battery energy storage system (BESS) over one day, 15-minute steps
t = np.arange(96) / 4 # hours
it = 20.0 + 1.5 * np.sin(2 * np.pi * (t - 9) / 24) # MW of IT load
cooling = 2.0 + 2.5 * np.clip(np.sin(2 * np.pi * (t - 9) / 24), 0, None) # afternoon cooling peak
load = it + cooling
cap_mwh, p_max, eff = 8.0, 4.0, 0.92 # BESS energy, power and round-trip efficiency
target = 24.5 # MW import limit we try to hold
soc, imports, socs = cap_mwh, [], []
for L in load:
if L > target: # discharge to shave the peak
p = min(L - target, p_max, soc * 4)
soc -= p / 4
imports.append(L - p)
else: # recharge below the target
p = min(target - L, p_max, (cap_mwh - soc) * 4 / eff)
soc += p * eff / 4
imports.append(L + p)
socs.append(soc)
imports = np.array(imports)
print(f"peak load {load.max():.2f} MW; peak grid import with BESS {imports.max():.2f} MW")
print(f"lowest state of charge {min(socs):.2f} of {cap_mwh} MWh")
rate = 15.0 # $ per kW of monthly peak demand
print(f"monthly demand-charge saving about ${(load.max() - imports.max()) * 1000 * rate:,.0f}")peak load 26.00 MW; peak grid import with BESS 24.50 MW lowest state of charge 1.25 of 8.0 MWh monthly demand-charge saving about $22,500
The saving depends on the tariff, on how reliably the battery can hold the peak every day of the month (missing one day loses most of the saving), and on battery wear. The same battery can also shift energy from expensive to cheap hours, or store surplus from on-site solar.
Worked problem
Battery wear and value
An 8 MWh battery cycles once a day for peak shaving and is rated for 6,000 full cycles to 80% capacity. How long will it last at this duty, and what is the cost per cycle if it costs $3 million?
Show solution
- Life: \(6{,}000/365 = 16.4\) years of daily full cycles (calendar aging may shorten this).
- Cost per cycle: \(\$3{,}000{,}000/6{,}000 = \$500\).
Answer: About 16 years, at roughly $500 per cycle, so each cycle must save or earn more than that, plus energy losses. Partial cycles cause less wear, and the battery's backup value comes on top.
Grid services
Grid operators need flexible resources to keep supply and demand balanced every second. Batteries respond in milliseconds, faster than any power plant, and data centers have large ones:
- Frequency regulation and fast frequency response: injecting or absorbing power to correct small deviations of grid frequency, or responding within a fraction of a second to a large generator trip.
- Demand response: reducing grid consumption on request during emergencies or high-price periods, by discharging batteries, running generators, or shifting flexible computing workloads.
- Capacity: committing to be available to reduce load during the year's tightest hours, for payments in capacity markets.
UPS systems themselves can participate: grid-interactive UPS designs (demonstrated by several operators and vendors in Europe) use part of the UPS battery capacity to provide fast frequency response, keeping enough reserve for the backup function at all times. The control must guarantee that grid service never compromises protection of the IT load.
Worked problem
Reserve for backup and grid service
A UPS has batteries for 10 minutes at its 2 MW load. The operator commits 1 MW of fast frequency response, which may discharge the battery at 1 MW for up to 15 minutes before recovery. How much of the battery energy does this use, and is backup preserved?
Show solution
- Total energy: \(2 \times 10/60 = 0.333\) MWh.
- Grid service worst case: \(1 \times 15/60 = 0.25\) MWh, leaving 0.083 MWh, only 2.5 minutes of backup at 2 MW.
Answer: Not acceptable: the backup would fall far below its design. The grid commitment must be reduced (for example 1 MW for 2 to 3 minutes) or extra battery capacity installed, with controls that stop grid service when the reserve reaches the backup minimum.
On-site generation
Generators for backup run rarely. On-site generation that runs continuously, or for long periods, is different: it supplies energy, not just backup, and must be efficient, low-emission and economical. Options include:
- Natural gas reciprocating engines: efficient (about 40% to 45% electrical), fast-starting, modular from 1 MW to 20 MW each; widely used for continuous on-site power and peaking.
- Gas turbines: aeroderivative and industrial turbines from 5 MW to over 100 MW, efficient in combined-cycle plants with steam turbines on waste heat.
- Fuel cells: solid oxide fuel cells convert natural gas (or hydrogen) to electricity electrochemically at around 50% to 60% efficiency, with low local emissions and quiet operation; several data center operators use them as primary or supplemental power.
- Combined heat and power (CHP), using engine or turbine waste heat for absorption chillers or district heating.
- Renewables on site (solar, occasionally wind) and contracts for remote renewable and, increasingly, nuclear power (including agreements tied to restarting existing reactors or planned small modular reactors) supply energy, though not on-site backup.
In regions where the grid cannot supply new large loads for years, some campuses are being built with on-site gas generation as the main supply ("bridge power" or "behind-the-meter" generation), with the grid connection added later. This raises questions of emissions permits, fuel supply, and redundancy: on-site plants need N+1 or more units, because they are now the primary source.
Worked problem
Gas engine plant for a 50 MW campus
A campus needs 50 MW continuously. Gas engines of 9 MW each are available. How many are needed for N+2 redundancy, and what fuel energy is used per year at 44% electrical efficiency?
Show solution
- N: \(50/9 = 5.6\), so 6 engines; N+2: 8 engines.
- Electrical energy: \(50 \times 8{,}760 = 438{,}000\) MWh/yr.
- Fuel: \(438{,}000/0.44 = 995{,}000\) MWh/yr (about 3.6 million GJ).
Answer: Eight 9 MW engines, burning about 1 TWh of gas energy a year. With CHP or absorption chilling, part of the waste heat can replace electric cooling energy, raising overall efficiency.
Microgrids
A microgrid is a group of loads and sources, such as utility connection, generators, batteries, solar and fuel cells, that can operate connected to the grid or islanded from it, under a microgrid controller. In a data center microgrid:
- Connected to the grid, the controller dispatches the BESS and on-site generation for economics and grid services.
- When the grid fails, the controller islands the site: the battery holds voltage and frequency instantly (grid-forming inverters), generators start and synchronize, and loads are restored in planned steps.
- When the grid returns, the controller resynchronizes and reconnects without interrupting the load.
Grid-forming inverters are central: unlike ordinary grid-following inverters, which synchronize to an existing voltage, they create the voltage and frequency themselves, allowing a battery to start up an islanded system (black start) and stabilize it when generators and loads change.
Microgrids add complexity: protection must work with very different fault currents in grid-connected and islanded modes (inverters supply little fault current, Lesson 8), controls must be tested in every transition, and the operations team must understand a system with many sources.
Safety and siting of large batteries
A facility-scale BESS holds a great deal of energy in one place, and lithium-ion cells can enter thermal runaway, releasing flammable and toxic gases that can ignite or explode if they accumulate in an enclosure. Standards and codes now shape where and how a BESS is installed:
- UL 9540 lists the complete energy storage system, and UL 9540A is the cell-to-installation fire test that shows how a failure propagates and what gases it releases; NFPA 855 and the International Fire Code set separation distances, size limits and protection requirements.
- Outdoor containers are usually preferred for multi-megawatt systems, spaced from buildings and from each other, with deflagration venting or explosion prevention ventilation, gas detection and access for firefighters.
- Emergency response plans are agreed with the local fire service before energization, because a battery fire may need hours of cooling water and monitoring rather than direct suppression.
These requirements affect land area and layout, so a BESS must be planned into the site from the start rather than added late in a corner of the yard.
Choosing a strategy
For most data centers, UPS batteries and diesel generators remain the baseline. Additional storage and generation make sense when:
- Tariffs reward peak shaving or energy shifting enough to repay the investment.
- Grid operators pay for flexibility, and the backup reserve can be protected.
- Grid capacity is constrained, and on-site generation brings the facility online sooner.
- Sustainability targets require reducing diesel use, integrating renewables, or reusing heat.
Each option must be evaluated for its effect on reliability, because the first duty of the power system is to keep the IT load running.
Common mistakes
MistakeCommitting UPS batteries to grid services without a protected reserve.
InsteadReserve backup energy first and stop grid service at that limit.
MistakeEstimating demand-charge savings without considering every day of the month.
InsteadThe battery must hold the peak on the worst day; plan capacity accordingly.
MistakeTreating primary on-site generation like backup generators.
InsteadDesign for continuous duty, efficiency, emissions and N+1 or N+2 redundancy.
MistakeIgnoring low inverter fault current in islanded microgrids.
InsteadDesign protection for both grid-connected and islanded fault levels.
MistakeIgnoring battery wear in economic analysis.
InsteadInclude cycle cost and degradation in the value of each service.
Summary and key terms
- Facility BESS cycle frequently for hours of energy; UPS batteries bridge minutes to generators.
- Peak shaving and energy shifting lower bills when tariffs reward them.
- Batteries and grid-interactive UPS can provide fast frequency response and demand response, with backup reserve protected.
- Gas engines, turbines and fuel cells provide continuous on-site power; CHP uses their heat.
- Microgrids island and reconnect under a controller, with grid-forming inverters.
- Every option is judged first by its effect on reliability.
- BESS
- Battery energy storage system.
- LFP
- Lithium iron phosphate, a stable lithium-ion chemistry.
- Demand charge
- A charge based on the highest power drawn in a billing period.
- Peak shaving
- Reducing peak grid demand with storage or generation.
- Fast frequency response
- Rapid power injection to arrest a frequency drop.
- Demand response
- Reducing grid consumption on request.
- Grid-interactive UPS
- A UPS whose batteries also provide grid services.
- Combined heat and power
- Generating electricity and using the waste heat.
- Microgrid
- Loads and sources that can operate with or without the main grid.
- Grid-forming inverter
- An inverter that sets voltage and frequency itself.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Typical runtime of a facility BESS?
Show answer
1–4 hours at rated power.
Why is LFP chemistry common for BESS?
Show answer
Thermal stability and long cycle life.
Demand-charge saving for shaving 2 MW at $12/kW-month?
Show answer
$24,000 per month.
Life of a 5,000-cycle battery cycled daily?
Show answer
About 13.7 years (before calendar aging).
Energy in a 1.5 MW, 12-minute UPS battery?
Show answer
0.3 MWh.
Name three grid services batteries can provide.
Show answer
Frequency regulation, fast frequency response, demand response (also capacity).
Engines of 7 MW for 30 MW at N+1?
Show answer
5 + 1 = 6.
Fuel energy for 10 MW for a year at 40% efficiency?
Show answer
87,600/0.4 = 219,000 MWh.
What does a grid-forming inverter do?
Show answer
Creates voltage and frequency, enabling islanded operation and black start.
Why is microgrid protection difficult?
Show answer
Fault current differs greatly between grid-connected and islanded modes.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.