# Grid power target

> Balance the connection to a small standing import instead of to zero, so an external device that curtails production releases the energy it was holding back.

Source: https://voltmasters.io/en/docs/control-algorithms/grid-power-target/

By default the EMS balances the grid connection to **0 kW**: it steers the battery so that as little energy as possible flows in either direction. The **grid power target** moves that setpoint. Instead of aiming at zero, the EMS aims at a small standing **import**, and holds the connection there.

This is a specialist setting. On an ordinary installation the right value is `0 kW`, which is the default and keeps the behaviour described under [self-supply](https://voltmasters.io/en/docs/control-algorithms/self-supply/) and [cost optimization](https://voltmasters.io/en/docs/control-algorithms/cost-optimization/) unchanged.

## The problem it solves

On some sites a third-party device caps the solar production to prevent injection into the grid. That device does its job by holding the connection at roughly zero export, which means it caps production at whatever the site happens to consume.

That creates a deadlock with the battery:

1.  The external device caps production at the site load, so the connection sits at about 0 kW.
2.  The EMS measures no surplus, so the battery has nothing to store and stays idle.
3.  Because nothing extra is consumed, the external device never releases more production.

The installation settles in a state where the battery is empty, the panels are throttled, and the energy that could have been harvested is simply lost. Nothing in the measurements reveals it, because from the EMS point of view the site is perfectly balanced.

## How it works

A standing import target breaks that circle without the EMS having to detect it. Every control cycle the battery charges **the target on top of the measured surplus**:

1.  The battery charges a little more than the site is producing, so the connection shows import.
2.  The external device sees room and releases more production.
3.  The measured surplus rises by that amount, and the next cycle repeats the step.

The result is a ramp that runs at whatever rate the external device actually follows, because the battery only ever gets ahead of it by the target. It also ends by itself: once production can no longer follow, the import stays at the target and the balancing correction becomes zero. The whole cost of keeping it there is a standing import of at most the target.

> **Note**
>
> Keep the value small, in the order of a few kW. Whenever production runs without anything left to release, the target is simply bought from the grid.

## Only while producing

**Grid power target only while producing** caps the target at the current on-site generation. This is switched on by default, and it is what the curtailment case needs: with no production there is nothing to release, so the target drops to 0 kW and the EMS balances to zero as before, instead of buying the target hour after hour through the night.

The cap follows generation continuously rather than switching on and off at a threshold. Generation below the target therefore still starts the ramp, because every step releases more production, which in turn raises the cap.

Switching the option **off** holds the target around the clock. Only do that on a site that wants the import bias regardless of production, and be aware that it will import the target at night as well.

## How it affects the dead zone

The [dead zone](https://voltmasters.io/en/docs/voltmasters-platform/project-settings/general-settings/#grid-power-dead-zone) moves along with the target: the EMS leaves the battery alone while the connection is within the dead zone **of the target**, not of zero.

The EMS also narrows the dead zone to at most **half the target** when needed. Without that, a dead zone as wide as the target would contain 0 kW, which is where the site rests before any correction. The very first correction would then read as "already there" and the balancing would never start.

## Limits

-   The target is capped at the **grid import limit** of the project. The balancing loop settles with the connection at the target, so a target beyond the limit would be a standing limit violation.
-   Only **import** targets are supported. Injecting on purpose is driven by prices and trading signals rather than by a balancing offset, so a negative value is treated as 0 kW.

## Worked example

A site with a 2 kW target, solar production capped by an external device, and a load of 20 kW:

| Cycle | Production | Measured surplus | Battery charges | Grid |
| --- | --- | --- | --- | --- |
| 1 | 20 kW | 0 kW | 2 kW | 2 kW import |
| 2 | 22 kW | 2 kW | 4 kW | 2 kW import |
| 3 | 24 kW | 4 kW | 6 kW | 2 kW import |
| … | … | … | … | 2 kW import |
| n | at its ceiling | steady | steady | 2 kW import |

Each cycle the external device answers the extra import by releasing 2 kW more production, which the battery stores. The connection stays at the 2 kW target throughout, and the ramp stops by itself when production reaches its ceiling.

## Where to configure it

The field sits under **Configuration → Strategy**, next to the dead zone. See [project settings](https://voltmasters.io/en/docs/voltmasters-platform/project-settings/general-settings/#grid-power-target) for the fields themselves.

![The grid power target set to 15 kW, with the toggle grid power target only while producing switched on.](https://voltmasters.io/assets/docs/image-94.webp)

> **Note**
>
> The setting requires an EMS controller running **version 0.0.323 or newer**, and is only shown on installations where it applies. On an older controller the field stays hidden, because the balancing logic that aims at the target is not present there.
