Skip to content

S2 example for PV

Ewoud Werkman edited this page Dec 6, 2024 · 27 revisions

S2 example for PV installations

This page serves as a guide for implementing an S2 RM for a PV installation. It provides example S2 messages that help developers to understand how to interact with PV installations and what kind of flexibility they can offer.

[ add architecture picture ]

Flexibility of a PV installation

A PV installation produces electricity by converting solar energy into electricity. This electricity can be used for several purposes, such as self-consumption or earning money by delivering electricity to the grid.

Usually a PV installation is not flexible at all, as it only produces electricity when there is sun and depending on weather circumstances (e.g. such as cloud coverage) it will produce more or less, i.e. its production is intermittent. But many PV inverters also allow to control the maximum output power of the PV installation, also known as curtailment. This curtailment is for example needed when too much installations are connected to the same local grid and produce at high power, pushing the voltage of the network above its acceptable limits, or when prices for delivering electricity back to the grid become to low (or even negative) to be profitable.

Choosing the S2 control type

S2 supports five different control types for flexibility (and one for no control possibility), each supporting a different way of modelling flexibility of a device. For PV installations the choice is somehow simple, as the capabilities of these installations are limited:

Control capability of PV installation Control type Remark
No control possible NOT_CONTROLABLE As there is no way to control this PV installation, the NOT_CONTROLABLE ControlType should be selected. Although nothing can be controlled, devices can still send PowerMeasurements and PowerForecasts
Set maximum output power POWER_ENVELOPE_BASED_CONTROL (PEBC) Based on the constraints of the PV installation (e.g. the minimum and maximum power output of the inverter), the CEM can provide the Resource Manager of the PV installation a PowerEnvelope that describes the minimum (usually 0) and maximum (e.g. -2kW, negative for production) that the inverter of the PV installation should produce

Example of controlling an PV inverter using Power Envelope Based control (PEBC)

This example describes how a PV interter can expose its curtailment capabilities to the CEM and let the CEM control this inverter by sending it messages that will ask it to curtail itself.

The following sequence diagram is an example of what a message exchange between a CEM and RM could look like, but messages could also be sent in a different order (see also State of communication and the FRBC Message reference). ReceptionStatus messages are omitted for readability.

First an overview of the messages is presented graphically, next sections will describe the example messages in more detail.

Communication between the PV installation and the Resource Manager (RM)

For the RM to work correctly, some information is required to fill in the messages between the RM and the CEM.

The diagram below depicts this process.

POxFIWD138VlynIX5nLg7w285CH33mLPmPENT3QjWPbacScqrQStMojqzPO_l-zBLjMmMCif65iYM0iRO-8lWgWvD-68nYgm9JiI2TW7GRS1bFvSlhm1YpjIEiV2pU0wZZoW63mzRy9rtqtRcSDhEL0nAZF0wh8GH8r0VUZfkK-MqvT4A4x-kVnofGh1Pm_tZoFyIq2hB7lWImI6e

Image generated using the following PlantUML code:

@startuml
title Initialize communication between the RM and the PV installation
'participant CEM
participant RM
participant "PV Inverter" as PV

note over RM, PV: Initialize connection between RM and PV Inverter

RM <-> PV: connect using inverter protocol
PV -> RM: Send constraints, \ne.g. maximum production power
loop every x seconds
PV -> RM: Send PV measurements
PV -> RM: Send forecasts (if available)
end loop
@enduml

Communication between de RM of the PV installation and a CEM

[intro]

XPBDRjGm4CVlVeevWWGy00TKcXgnKjD4IMcFgwap5AlEJB37BUNfiNSl5hjIJr7-7_EpxBb8Yb7p6enw3GJs3wvR-JfPrypUeNfXU21z8MBeR0_82qmzo4z06EzWnqanX4FER1ZLExyXQyss_wLZ38iIo3F5wdueqcUufuTPt1DfGJAJKrgCgPoFNmx-zy9Bl_29p5IrKcp5iyc9q

@startuml title Example communication between CEM and RM of a PV Installation participant CEM participant RM

note over CEM, RM: WebSocket connected

CEM -> RM: Handshake RM -> CEM: Handshake CEM -> RM: HandshakeResponse

note over CEM, RM: Initialized

RM -> CEM: ResourceManagerDetails CEM -> RM: SelectControlType(POWER_ENVELOPE_BASED_CONTROL)

note over CEM, RM: ControlType PEBC activated

RM -> CEM: PEBC.EnergyConstraint RM -> CEM: PEBC.PowerConstraint

loop in no particular order RM -> CEM: PowerMeasurement RM -> CEM: PowerForecast

CEM -> RM: PEBC.Instruction RM -> CEM: InstructionStatusUpdate end loop

RM -> CEM: SessionRequest

note over CEM, RM: WebSocket disconnected

@enduml