Documentation

se-grid-codes

se-grid-codes is a C++ library that implements algorithms needed for IEEE 1547-2018 and IEEE 1547-2003 compliant grid operation. The library is available as C++14 source code and can be compiled into the firmware of any distributed energy resource device. To use the library, simply

  • Compute true RMS values with sufficient accuracy.
  • Update se-grid-codes every 10ms with these RMS values and a few additional parameters.
  • Configure se-grid-codes using the parameters received over any communication interface.

As a result of the update, receive a single data object containing all the values computed by se-grid-codes. Using this object, the firmware of the distributed energy resource device is told if it is allowed to connect to the grid or stay connected, and what the reactive and active power setpoints for grid operation are. The active and reactive power setpoints must be passed on to the power generation control of the distributed energy resource device. The following algorithms are part of se-grid-codes:

FunctionDescription
Prioritization of distributed energy resource responsesse-grid-codes contains the logic to prioritize the results of the monitoring, reactive power and derating functions.
Capability to disable permit servicese-grid-codes contains the logic to disable energy generation.
Enter Servicese-grid-codes contains algorithms implementing delayed enter service (Reconnect Time). se-grid-codes contains algorithms implementing the ramped power up to a configured setpoint during the enter service period (Enter Service Ramp).
Reactive Power Generationse-grid-codes contains a framework to activate one (mutually exclusive) of the contained reactive power algorithms.
Constant Power Factor Modese-grid-codes contains algorithms implementing the constant power factor mode (Fixed-Q).
Voltage-Reactive Power Modese-grid-codes contains algorithms implementing the voltage-reactive power mode, category B (Volt-Var).
Active Power-Reactive Power Modese-grid-codes contains algorithms implementing the active power – reactive power mode, category B (Watt-Var).
Constant Reactive Power Modese-grid-codes contains algorithms implementing the constant reactive power mode (Specified Power Factor - SPF).
Derating Algorithmse-grid-codes contains a framework to temporarily reduce the maximum charge and discharge power of the distributed energy resource device.
Limit Maximum Active Powerse-grid-codes contains algorithms to limit the maximum active power (Max-Power Derating).
Voltage-Active Power Modese-grid-codes contains algorithms implementing voltage-active power derating (Volt-Watt).
Frequency Droopse-grid-codes contains algorithms implementing frequency-droop derating (Frequency-Watt).
Monitoring Frameworkse-grid-codes contains a framework to monitor voltage and frequency of the distributed energy resource device.
Mandatory voltage tripping requirementsse-grid-codes contains algorithms implementing the mandatory voltage tripping requirements, Category II (Monitoring).
Mandatory frequency tripping requirementsse-grid-codes contains algorithms implementing the mandatory frequency tripping requirements (Monitoring).
Library Configurationse-grid-codes allows configuration of the above listed algorithms. The format of the parameters to do so is compatible with SunSpec Modbus.

se-grid-codes only contains the features listed in the table above. The library does not contain the mayor IEEE 1547-2018 features Fault Ride Trough and Anti Islanding. These features need to be executed at a much higher speed as the other algorithms and therefore do not fit into the theory of operation of se-grid-codes.