> For the complete documentation index, see [llms.txt](https://docs.voltmasters.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voltmasters.io/control-algorithms/peak-shaving-reserve.md).

# Peak shaving reserve

The **peak shaving reserve** protects a part of the battery so it is always available to keep the **grid import below its limit**. When site load would push the import over the configured limit, the battery discharges just enough to hold the grid at that limit — regardless of what causes the peak.

This is useful when the hard constraint is **power, not price**: a transformer or grid connection that must never be exceeded (for example a site whose cooling load peaks above its connection capacity when the sun is low), or a battery that must keep headroom to support DC fast charging.

## How it works

The reserve is a percentage of the battery's state of charge (SoC). It changes the behaviour of the active control algorithm ([cost optimization](/control-algorithms/cost-optimization.md) or [self-supply](/control-algorithms/self-supply.md)) in three ways:

* **Peak shaving discharge (always allowed).** Whenever the load minus PV would exceed the grid import limit, the battery discharges exactly the overage so the grid stays **at** the limit — never below it, so it never exports to shave. This holds regardless of the energy price, because the import limit is a physical constraint on the connection. Any load counts: general site consumption, and EV fast charging as one particular case. This discharge may draw the battery all the way down to its minimum SoC.
* **Reserve floor (protects the reserve).** As long as the SoC is **above** the reserve, the battery is used freely by the normal strategy. Once it drops **to or below** the reserve, discharging for other purposes (self-supply balancing to zero, price arbitrage) is blocked — that energy is kept for shaving the next peak. Only the peak shaving discharge above may still use it.
* **Priority refill.** When the SoC is below the reserve, replenishing it takes priority over other charging strategies. The battery charges from PV surplus and, if needed, from the grid **regardless of price**, staying a small margin below the import limit so the refill itself never causes a peak.

{% hint style="info" %}
The peak shaving discharge only ever pulls the grid **down to** the import limit, never past it, so a site that is not allowed to export is never pushed into export by peak shaving.
{% endhint %}

## Choosing a value

Set the reserve high enough that the reserved energy covers the expected daily peak-shaving need, so the battery is charged in time for the recurring peaks (for example a morning and an evening peak when PV is low). A cost-agnostic site that only wants to protect its connection can set the reserve high, keeping the battery close to full and only tapping it during peaks; the midday PV surplus and the price-independent overnight refill top it back up.

A reserve of **0 (or empty)** disables the behaviour: the algorithm then runs without a protected reserve.

Configure the value under [project settings](/voltmasters-platform/10.-project-settings/10.5-project-settings.md). Consult your installer for the appropriate value for your specific installation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.voltmasters.io/control-algorithms/peak-shaving-reserve.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
