MeshOS · Energy management system

Never breach your grid contract again

One quarter-hour above your contracted capacity is expensive. In the Netherlands it sets your peak charge and raises the contracted level for the rest of the year; in Poland the ten worst quarter-hours of the month are each billed at the capacity rate. And with the grid full, a bigger connection is often not on offer. Peak shaving in MeshOS plans your battery and flexible loads a day ahead on real day-ahead prices, then watches the main meter every 30 seconds and raises battery discharge the moment load crosses the limit.

Peak shaving in MeshOS: the site load curve against the contract limit, the battery discharging in the evening peak and a breach prediction for tomorrow

The grid is full, and your contract is the ceiling

Grid congestion means you probably cannot buy more capacity, so the contract you have is the capacity you have. Most factories manage that ceiling by hoping:

The peak of the month is discovered on the invoice, six weeks later.
Nobody knows which quarter-hour it was, or which machines were on.
The battery follows a timer that was set once by the installer.
A new line or a charger for the trucks comes in with no idea whether it fits under the contract.
The contract is raised as the fix, and the fixed cost goes up for good.
Or the contract is lowered to save money, and the penalty eats the saving.

A contract is a number, and a number can be managed: measure the load against it, plan under it, and act the moment you are about to cross it.

Three layers between your load and the limit

Peak shaving is not one trick. It is a plan for tomorrow, a correction right now, and a warning hours ahead. Each layer catches what the previous one missed.

A day-ahead plan on real prices
Every afternoon, when tomorrow's day-ahead prices are published, a solver schedules the battery: charge in the cheap hours, discharge in the expensive ones, and never let planned grid draw exceed contract minus a safety margin. A peak reserve stays in the battery for the risk hours.
A live governor every 30 seconds
The real main meter is read, headroom against the contract is computed, and the moment it goes negative, battery discharge is raised to cover it. Hysteresis keeps the battery from chattering. In a test run a 640 kW peak was pulled under a 550 kW contract within about two minutes.
Breach predictions hours ahead
The load forecast plus the battery plan is checked against the contract. If tomorrow's 17:00 does not fit, you know in the morning, with the largest contributor named in plain language.

No battery? The plan and the predictions still work, and the action becomes a shifted job or a switched load instead of a discharge.

Where this fits

Peak shaving is the acting layer of one system

The plan, the governor and the cards on this page are the last of four stages. They run on the meters, the forecast and the cost model described on the energy management system page.

The energy management system in MeshOS
The full picture: measure, understand, advise and act. Forecasts, action cards with money on them, and closed-loop battery control on day-ahead prices.
Energy monitoring
The measuring layer: sub-meters on the big consumers, kWh per line, shift, batch and product, and anomaly alerts against your own baseline.

Action cards with the money on them

Every proposal arrives as a card with the kW, the euros, the confidence and the evidence, and you approve or deny it. Six kinds:

Battery dispatch
Charge in tonight's cheapest hours, discharge in tomorrow's most expensive: expected daily saving on the card, realised saving settled afterwards on measured samples.
Load shift
With the production schedule connected: shift these three jobs off the peak, reduce load by 180 kW, valued at the capacity charge saved.
Peak alert
A breach detected, with the overrun cost under your regime, never a statistically softened severity.
Forecast alert
Tomorrow's predicted peak sits near the limit: pre-charge the battery tonight.
Contract review
You breach every month: here is what a higher contract costs against what the penalties cost.
Tariff arbitrage
The spread between tonight's cheapest and tomorrow's most expensive hour, as a theoretical ceiling for what the battery can earn.

Honest about control: what the system will not do

Peak shaving means commanding hardware, and hardware commanded on bad data is worse than no control. So a few rules are fixed in the software and not in a setting.

Every site starts read-only. Advisory mode means a person approves each card. Automatic mode acts within a safety floor you set. In every mode:

You will see the battery do less than a demo promises. What it does, you can defend to the grid operator.

  • No fresh main-meter reading (under two minutes old) means no charging and no live shaving. Only the approved discharge plan continues.
  • No authentic day-ahead price means no plan for that day. The system never synthesises a price.
  • Without an approved plan, automatic mode may only discharge to protect the contract. It never starts charging on its own.
  • The battery's state-of-charge floor is absolute: discharge stops there even if the peak is not covered.
  • Every command is logged with the headroom it was based on, for two years. Every approval, denial and revert is on the record with a name and a time.

Works with your battery, your meters and your contract

The plan and the governor need three things: the main meter, the battery's management system, and your contract limit and tariff.

Batteries are connected through their BMS over REST or Modbus; the main meter is read by the edge device. If the meter sits behind the battery, the battery's own power is subtracted so the grid draw is what is judged.

What goes into the site profile:

If any of that is missing, the related number shows 'not estimated' rather than a guess.

  • Contracted capacity in kW and the safety margin you want under it.
  • Tariff regime: Dutch monthly peak or Polish ten worst quarter-hours, with your rates.
  • Battery capacity, power, efficiency, cycle cap and the state-of-charge floor.
  • Governance mode: read-only, advisory or automatic within a safety floor.

Start read-only, act when you trust it

The safest way in is to let the system plan and predict for a few weeks before it commands anything.

Step 1: main meter and contract
The edge device reads the main feed; contract limit and tariff go into the site profile. Peak alerts and breach predictions start.

Step 2: the plan runs read-only
Every day a battery plan is made and compared with what actually happened. You see what it would have saved.

Step 3: advisory mode
Cards arrive; you approve the ones you agree with. Realised savings are settled on measured samples.

Step 4: automatic within your floor
Once the ledger shows plan and reality agree, switch to automatic for the hours and floor you choose.

Proof from the field

Peak shaving in practice

Real meters, real dashboards.

Demo case with energy meters and a live energy dashboard Energy monitoring
Dairy processor

Energy data that writes its own audit report

Sub-metering on the main consumers, one dashboard with kWh per line and per batch, and audit-ready ISO 50001 and CSRD reports generated from live data instead of a yearly spreadsheet scramble. The auditor's letter stopped being a fire drill.

Frequently asked questions about peak shaving

Does peak shaving work without a battery?

Partly. The peak alerts, breach predictions and load-shift cards work without one, and switching a non-critical load off is a valid action. What you lose is the seconds-level correction: only a battery can cover a peak that is already happening.

How fast does the live governor react?

The control loop runs every 30 seconds and raises discharge as soon as the main meter shows negative headroom. In a test run a 640 kW peak was brought under a 550 kW contract in about two minutes. The battery's own ramp rate is the limit.

What if the forecast is wrong?

The plan keeps a peak reserve in the battery for the hours where demand is predicted near the limit, and the live governor corrects on the real meter regardless of the forecast. A bad forecast costs you some arbitrage, not a breach.

Can it lower our contract?

It can tell you whether that is wise. The contract review card compares the cost of your current breaches with the cost of a higher contract, and the backtest shows what last month would have cost with the optimised profile. The decision stays with you.

Does it work in Poland and the Netherlands?

Yes. The tariff model knows both regimes: the Dutch monthly peak that raises the contracted level for the rest of the year, and the Polish rule that bills the ten largest quarter-hour overruns of the month. Rates come from your own contract.

Where do the savings numbers come from?

Planned savings from the forecast times delivered prices; realised savings from measured battery samples at the same prices, per day. A day with less than 90% of the samples is marked as an estimate. Avoided capacity charges are shown separately, because they settle monthly.

Send us your worst quarter-hour

The invoice shows the peak and the date. We tell you what it cost under your regime and what a battery or a shifted job would have done with it.