> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plantpredict.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Plant-Level Aggregation & AC Losses

export const CurtailmentCap = () => <Tooltip tip="Deliberate reduction of plant output to comply with grid constraints or interconnection agreements.">
    Curtailment
  </Tooltip>;

export const AvailabilityLossCap = () => <Tooltip tip="Energy loss from the plant or part of the plant being offline due to maintenance or unplanned outages.">
    Availability loss
  </Tooltip>;

export const MV = () => <Tooltip tip="Medium Voltage: electrical infrastructure between inverter output and the plant collection point, including step-up transformers and AC cabling.">
    MV
  </Tooltip>;

export const NighttimeDisconnect = () => <Tooltip tip="Operational mode that disconnects transformers and zeroes plant output when inverters are in shutdown or low-power regions.">
    nighttime disconnect
  </Tooltip>;

export const LGIA = () => <Tooltip tip="Large Generator Interconnection Agreement: contract defining the maximum power export limit at the point of interconnection.">
    LGIA
  </Tooltip>;

export const PointOfInterconnection = () => <Tooltip tip="Where the plant connects to the utility grid; metering and delivery point for contractual obligations.">
    point of interconnection
  </Tooltip>;

export const Transformers = () => <Tooltip tip="Devices connecting two AC circuits at different voltages; losses comprise constant no-load (core) and load-dependent (winding) components.">
    transformers
  </Tooltip>;

export const HV = () => <Tooltip tip="High Voltage: portion of a plant's electrical infrastructure connecting it to the utility grid via step-up transformers and transmission lines.">
    HV
  </Tooltip>;

## Summary

Plant-level calculations aggregate block outputs, apply <HV /> equipment losses—HV <Transformers /> and transmission lines in user-defined order—then apply <AvailabilityLossCap /> and the grid limit (<LGIA />) to produce the final power delivered to the <PointOfInterconnection />.

## Inputs

| Name                              | Symbol          | Units     | Description                                                                         |
| --------------------------------- | --------------- | --------- | ----------------------------------------------------------------------------------- |
| **Block Power**                   | $P_{block}$     | W         | AC power per block (from [Array-Level Aggregation & AC Losses](array_level_losses)) |
| **Block Repeater Count**          | $n_{rep,block}$ | —         | Number of identical blocks represented in the plant                                 |
| **HV Transformer Rating**         | $P_{HV,rated}$  | MVA       | HV transformer nameplate capacity                                                   |
| **HV No-Load Loss**               | $L_{NL,HV}$     | %         | HV transformer no-load loss as a percentage of $P_{HV,rated}$                       |
| **HV Full-Load Loss**             | $L_{FL,HV}$     | %         | HV transformer full-load loss as a percentage of $P_{HV,rated}$                     |
| **Transmission Line Length**      | $\ell_t$        | km        | Conductor length                                                                    |
| **Transmission Line Resistance**  | $R_{line}$      | Ω/1000 ft | Conductor resistance per unit length                                                |
| **Inverter Design Derate**        | $d_i$           | —         | Ratio of real power to apparent power (kW/kVA) for inverter $i$                     |
| **Inverter Repeater Count**       | $n_{rep,inv}$   | —         | Number of identical inverters per array                                             |
| **Array Repeater Count**          | $n_{rep,array}$ | —         | Number of identical arrays per block                                                |
| **Transformer High-Side Voltage** | $V_{HS}$        | kV        | Line-to-line voltage on transformer high side                                       |
| **Conductors per Phase**          | $N_{cond}$      | —         | Number of parallel conductors per phase                                             |
| **Availability Loss Factor**      | $f_{avail}$     | %         | Percentage reduction for system availability                                        |
| **Grid Limit (LGIA)**             | $P_{POI}$       | MW        | Maximum allowed power at point of interconnection                                   |

***

## Outputs

| Name           | Symbol     | Units | Description                 |
| -------------- | ---------- | ----- | --------------------------- |
| **Grid Power** | $P_{grid}$ | W     | Power delivered to the grid |

***

## Detailed Description

### Block-to-Plant Aggregation

Each plant may contain multiple blocks (with repeater counts). The total plant-level power before HV losses is the sum of all block outputs, weighted by their repeater counts:

$$
P_{plant} = \sum_{blocks} P_{block} \times n_{rep,block}
$$

### HV Equipment

HV equipment consists of one or more transformers and transmission lines connected in series. The user defines the ordinal (sequence) of each element. The prediction iterates through the elements in ordinal order, passing the output of each element as the input to the next. For example, a plant stepping up from 34.5 kV to 230 kV via an intermediate 115 kV bus might define:

1. HV Transformer (34.5 kV → 115 kV) — quadratic transformer losses on $P_{plant}$
2. Transmission Line (at 115 kV) — I²R line losses at 115 kV current
3. HV Transformer (115 kV → 230 kV) — quadratic transformer losses on the remaining power
4. Transmission Line (at 230 kV) — I²R line losses at 230 kV current

#### HV Transformer

Each HV transformer applies the [Transformer Loss Model](transformer_loss_model). The calculation is identical to the <MV /> transformer, using the HV transformer's specific rating and loss fractions.

When <NighttimeDisconnect /> is enabled and triggered (see [Inverter Operating Regions](../inverter-models/inverter_operating_regions) for trigger conditions), the HV transformer no-load loss is set to zero, eliminating standby core losses. Additionally, if any inverter in the plant triggers disconnect, the entire plant output after HV equipment is set to zero (see [Transformer Loss Model](transformer_loss_model#nighttime-disconnect) for details).

#### Transmission Line Model

Transmission line losses are calculated from the I²R dissipation in the three-phase conductors. The model uses the line-to-line voltage on the high side of the preceding transformer (or the maximum MV transformer voltage if no HV transformer precedes the line), converted from kV to V.

**Resistance Calculation**

The line length is first converted from km to m. The total line resistance in ohms is then:

$$
R_{total} = \frac{\ell_t \times R_{line}}{304.8}
$$

where $R_{line} / 304.8$ converts from Ω/1000 ft to Ω/m (since 1000 ft = 304.8 m).

**Power Factor Calculation**

The inverter Design Derate ($d_i$) represents the power factor of each inverter—the ratio of its real power output (kW) to its apparent power rating (kVA). The PlantPredict logic tracks real (active) power throughout, but transmission line current accounts for active and reactive power and is, thus, proportional to the apparent power $P_{in} / PF$ where $PF$ is the power factor.

$PF$ is calculated as the repeater-weighted average of the individual inverter Design Derate values, computed once at the plant level (displayed as "Plant kVA Derate" in the UI):

$$
PF = \frac{\displaystyle\sum_{blocks}\; n_{rep,block} \sum_{arrays}\; n_{rep,array} \sum_{inv}\; n_{rep,inv} \times d_i}{\displaystyle\sum_{blocks}\; n_{rep,block} \sum_{arrays}\; n_{rep,array} \sum_{inv}\; n_{rep,inv}}
$$

**Resistive Loss Calculation**

For a given input power $P_{in}$ entering the transmission line, the three-phase line current is:

$$
I = \frac{P_{in}}{\sqrt{3}\, V_{HS}\, PF}
$$

The total three-phase dissipation, accounting for parallel conductors, is:

$$
L_{line} = \frac{3\, I^2\, R_{total}}{N_{cond}}
$$

The output power is:

$$
P_{out} = P_{in} - L_{line}
$$

$P_{in}$ can be negative during nighttime operation when the grid supplies power to keep transformers energized; in that case $P_{out}$ is also negative (further from zero due to the line loss).

### Availability Loss

After all HV equipment losses, a flat percentage availability deduction is applied to the output power from the last transformer or transmission line in the HV chain $P_{HV,out}$:

$$
P_{avail} = P_{HV,out} \times \frac{100 - f_{avail}}{100}
$$

This deduction represents estimated downtime due to maintenance and unplanned outages. It reduces power uniformly across all timesteps.

### Grid Limit (LGIA)

The final step enforces the capacity constraint at the point of interconnection. If configured, any power exceeding the limit (converted from MW to W) is curtailed:

$$
P_{grid} = \min(P_{avail},\, P_{POI})
$$

The LGIA limit can be specified as:

* **Constant value**: a fixed MW cap applied to all timesteps.
* **Time series**: a timestep-varying MW limit loaded from a time series input.
* **Off**: no cap is applied ($P_{grid} = P_{avail}$).

The loss due to <CurtailmentCap /> is reported as:

$$
L_{LGIA} = \max(0,\, P_{avail} - P_{POI})
$$

In practice, curtailment would reduce inverter setpoints and rebalance upstream losses (transformer loading, collection losses, etc.). The model applies the cap at the POI instead, which yields the same delivered energy while attributing the excess power entirely to curtailment loss rather than redistributing it across upstream loss categories.
