One Battery, Three Jobs: How a Swiss Campus Proved That Smart Storage Can Serve Buildings and the Grid at Once

There is a battery sitting in a technical building on the Energypolis campus in Sion, Switzerland, deep in the Rhône Valley. It stores 264 kilowatt-hours of energy and can push or pull up to 140 kilowatts of power. On any given day, it quietly does three different jobs at once: it absorbs surplus solar electricity from the rooftop rather than letting it spill back into the grid at a loss; it shaves the building's electricity demand at peak hours to avoid punitive tariff charges; and it responds, within seconds, to signals from the Swiss national grid operator, helping to keep the frequency of the entire transmission system stable.
That last service — called aFRR, or automatic Frequency Restoration Reserve (the secondary layer of grid balancing, where power plants and now batteries respond to automated signals to correct mismatches between generation and consumption) — typically requires resources of at least 1 MW in most European countries, and 5 MW in Switzerland. A 140 kW building battery is far below that threshold. And yet, the researchers behind this experiment argue convincingly that even without formal market access, a building BESS can capture real economic value from frequency balancing signals whenever prices rise above the retail electricity tariff. More importantly, they have shown exactly how to schedule and control a battery to do all of this simultaneously — not in simulation, but in a real building, in real time.
The paper, by Nour-eddine Id Omar, Alexandre Lê-Agopyan, and Fabrizio Sossan of HES-SO Valais-Wallis (Id Omar et al., 2026), is a rare thing in the energy storage literature: a study that does not just propose an optimization framework but actually runs it on hardware and reports what happens.
The Science
The central problem is one of conflicting demands on a finite resource. A battery has a fixed energy capacity and power rating. Every kilowatt-hour reserved for grid balancing is a kilowatt-hour unavailable for peak shaving. Every decision made the night before — about how much capacity to allocate to which service — must survive the uncertainty of tomorrow's solar generation, building loads, and electricity market prices.
The team's solution is a two-stage architecture
. The first stage runs the evening before: a day-ahead scheduler solves a constrained optimization problem to allocate battery capacity across local and grid services, using forecasts of building load, PV generation, and balancing market prices. Critically, this stage uses a scenario-based approach for balancing prices — rather than committing to a single forecast, the optimizer considers a range of plausible price trajectories drawn from historical data, and finds an allocation that performs well in expectation across all of them. This is a form of two-stage stochastic optimization: the battery's local service commitments are locked in first (stage one), and then the balancing power allocation is optimized for each price scenario (stage two), reflecting the fact that you don't know tomorrow's grid prices but you do know approximately what your building will consume.
The second stage runs in real time, recalculating battery set-points every 30 seconds based on three live inputs: current balancing market prices, the actual net load of the building (demand minus solar generation), and the battery's current state of charge. This is a Model Predictive Control (MPC) approach — a technique where the controller repeatedly solves a short-horizon optimization problem using the most up-to-date information, then executes only the first action before solving again. The short 30-second cycle means the system can react quickly to grid frequency events while still tracking its longer-term plan.
The building under study has a peak electrical demand of 300 kW and is equipped with a 264 kWh / 140 kW lithium-ion BESS. Load and PV generation forecasts were generated from historical building data and standard PV forecasting tools, as shown in
which illustrates how point predictions tracked realized values across the experimental period. The electricity billing structure reflects Swiss commercial tariffs: an energy charge based on total consumption in CHF/kWh, and a power charge based on the highest 15-minute average demand in CHF/kW — the latter being the main lever that peak shaving targets.
What They Found
The experimental results demonstrated that the two-stage framework successfully delivered all three services simultaneously under real operational conditions (Id Omar et al., 2026). The battery tracked its day-ahead dispatch plan while also responding to real-time aFRR signals, and did so without violating its state-of-charge or power constraints.
Building BESS Specifications — Energypolis Campus
Key hardware parameters of the lithium-ion BESS deployed at HES-SO Valais, Sion, Switzerland.
| Label | Value |
|---|---|
| Energy Capacity (kWh) | 264 kWh |
| Power Rating (kW) | 140 kWh |
| Building Peak Demand (kW) | 300 kWh |
The scheduling framework correctly resolved the inherent tension between services. Peak shaving requires the battery to discharge during high-demand periods, typically morning and evening. PV self-consumption requires the battery to charge during midday solar surplus. aFRR requires keeping reserves of both charge and discharge capacity available at all times. The day-ahead optimizer allocated capacity across these competing needs, and the MPC layer adapted the actual set-points as conditions evolved throughout each day
.
Minimum aFRR Market Entry Thresholds
Minimum capacity requirements to formally participate in automatic Frequency Restoration Reserve (aFRR) balancing markets, compared to the Energypolis BESS power rating.
| Label | Value |
|---|---|
| Most EU Countries (MW) | 1 MW |
| Switzerland (MW) | 5 MW |
| Energypolis BESS (MW) | 0.14 MW |
A key design choice was the treatment of balancing prices. The framework only activates the battery for aFRR when the regulation price exceeds the retail import tariff — in other words, when the grid is willing to pay more for the battery's response than the battery owner would otherwise pay to buy electricity. This prevents a perverse outcome where the battery charges using cheap grid power (disguised as a regulation response) in a way that would violate the building's electricity supply contract. It also makes the aFRR participation genuinely profitable rather than merely technically feasible.
The stochastic scenario approach proved its value in handling price uncertainty. Rather than using a single price forecast — which might be systematically wrong — the optimizer hedged across multiple historical price scenarios, producing a battery schedule that was robust to the realized prices on the day. The result was that the battery was positioned with appropriate state-of-charge reserves during the hours when balancing prices historically tend to spike, without over-committing capacity that might be needed for peak shaving.
Services Delivered by the Behind-the-Meter BESS
The three stacked services provided simultaneously by the Energypolis BESS, each targeting a different value stream.
| Label | Value |
|---|---|
| PV Self-Consumption | 3 |
| Peak-Load Reduction | 3 |
| aFRR Grid Balancing | 3 |
The real-time MPC layer, operating at 30-second resolution, successfully bridged the gap between the coarse 15-minute day-ahead plan and the second-by-second demands of frequency regulation. This is non-trivial: aFRR signals can request rapid charging or discharging within seconds, and the controller must execute these while simultaneously checking that the action doesn't push the battery outside its safe operating envelope or cause the building's grid connection to exceed its contracted peak.
Why This Changes Things
The economics of battery storage have long suffered from a fundamental problem: the value of a single service rarely justifies the capital cost. A 264 kWh battery system costs, depending on the market and application, somewhere between €100,000 and €300,000 installed. If it only shaves peaks on a commercial building's electricity bill, the payback period can stretch to 10–15 years. If it can stack revenues from multiple services — peak shaving, PV self-consumption, and grid balancing simultaneously — that payback period shrinks dramatically.
Earlier simulation studies had already pointed in this direction. Shi et al. (2018) found that joint optimization of peak shaving and frequency regulation yields savings up to 12% higher than either service alone. Engels et al. (2020) showed stochastic optimization could optimally combine peak shaving and frequency control. But most of this literature stops at simulation. The contribution of Id Omar et al. (2026) is to close the gap between theory and practice, running the full framework on real hardware in a live building — the kind of validation that matters when utilities, building owners, and policymakers need to make investment decisions.
The architecture has an important property that makes it commercially attractive: it does not require the building to formally commit battery capacity to the balancing market. Instead of selling a fixed block of megawatts in a day-ahead capacity market (which Switzerland's 5 MW minimum threshold would prohibit anyway), the building's battery simply responds opportunistically when prices are favorable. This is a lower-risk entry point for building owners. An aggregator could eventually bundle many such buildings to meet formal market thresholds — and the per-unit logic developed here would scale directly.
The implications reach beyond Switzerland. Across Europe, the phase-out of generous feed-in tariffs for rooftop solar has made self-consumption economically essential for building owners with PV. At the same time, the rapid growth of variable renewables — wind and solar now providing over 40% of EU electricity generation in some hours — is driving up the value and volatility of balancing services. A building battery that can straddle both worlds, optimally, is exactly the kind of distributed flexibility that grid operators are increasingly paying for.
What makes the Energypolis demonstration significant is also its physical setting. The campus sits in the Swiss Alps, connected to a grid that must balance hydropower's flexibility against growing solar penetration in the valley below. The experiment captures real load patterns, real weather, and real Swiss balancing market prices — not synthetic scenarios. The results are therefore directly credible to the engineers and policymakers who will decide whether to deploy similar systems at scale.
The mathematical structure of the framework is also worth noting for technically minded readers. The day-ahead problem is formulated as a convex optimization — meaning it can be solved efficiently and reliably to a global optimum, without the computational burden of mixed-integer programming. The convexity holds as long as the import tariff is higher than the export tariff, a condition that is almost universally satisfied in commercial electricity contracts. This means the framework is computationally practical for daily operation on standard hardware, not just in academic demonstrations.
The system architecture
elegantly separates concerns: the physical connections between PV panels, battery, building loads, and utility meter are straightforward; the intelligence lives entirely in the scheduling and control software. This means the approach is, in principle, retrofittable to existing behind-the-meter BESS installations, not just new builds.
What's Next
Several important questions remain open. The experimental validation, while genuine and rigorous, covers a finite set of operational days at a single building. How the framework performs across seasons — with winter heating loads, variable solar irradiance, and different aFRR price patterns — will matter for anyone considering deployment at scale. The authors acknowledge that the scenario-based approach relies on historical aFRR prices being representative of future outcomes; in periods of rapid energy market change, this assumption deserves scrutiny.
The aggregation question is also unresolved. Individual buildings of this size cannot access Swiss or European balancing markets directly, due to minimum capacity requirements of 1–5 MW. The framework assumes opportunistic participation without formal commitment, which sidesteps the problem but doesn't solve it. Future work connecting this local control logic to a virtual power plant or aggregation platform — where dozens of buildings collectively offer a compliant capacity block — would significantly strengthen the commercial case.
Reactive power control was explicitly left out of scope here. In low-voltage distribution grids, voltage regulation is an increasingly valuable service as rooftop solar penetration rises, and a future extension of this framework to include reactive power optimization could open another revenue stream.
The machine learning approaches appearing in the broader literature — reinforcement learning, imitation learning — were not compared against the convex MPC approach here. Recent work (Mueller et al., 2025; Cardo et al., 2025) suggests data-driven controllers can match or exceed MPC performance in some residential settings. A head-to-head comparison on a building of this scale and service complexity would be instructive.
None of these open questions diminish what has been accomplished. The energy transition requires that batteries work harder — not as single-purpose devices but as flexible, multi-tasking assets embedded in both buildings and grids. Id Omar et al. (2026) have provided one of the most complete demonstrations yet that this is achievable with today's technology, today's markets, and a well-designed optimization framework. The battery in Sion is already doing the work. The question now is how quickly the rest of the world's building stock catches up.