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:
| Function | Description |
|---|---|
| Prioritization of distributed energy resource responses | se-grid-codes contains the logic to prioritize the results of the monitoring, reactive power and derating functions. |
| Capability to disable permit service | se-grid-codes contains the logic to disable energy generation. |
| Enter Service | se-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 Generation | se-grid-codes contains a framework to activate one (mutually exclusive) of the contained reactive power algorithms. |
| Constant Power Factor Mode | se-grid-codes contains algorithms implementing the constant power factor mode (Fixed-Q). |
| Voltage-Reactive Power Mode | se-grid-codes contains algorithms implementing the voltage-reactive power mode, category B (Volt-Var). |
| Active Power-Reactive Power Mode | se-grid-codes contains algorithms implementing the active power – reactive power mode, category B (Watt-Var). |
| Constant Reactive Power Mode | se-grid-codes contains algorithms implementing the constant reactive power mode (Specified Power Factor - SPF). |
| Derating Algorithm | se-grid-codes contains a framework to temporarily reduce the maximum charge and discharge power of the distributed energy resource device. |
| Limit Maximum Active Power | se-grid-codes contains algorithms to limit the maximum active power (Max-Power Derating). |
| Voltage-Active Power Mode | se-grid-codes contains algorithms implementing voltage-active power derating (Volt-Watt). |
| Frequency Droop | se-grid-codes contains algorithms implementing frequency-droop derating (Frequency-Watt). |
| Monitoring Framework | se-grid-codes contains a framework to monitor voltage and frequency of the distributed energy resource device. |
| Mandatory voltage tripping requirements | se-grid-codes contains algorithms implementing the mandatory voltage tripping requirements, Category II (Monitoring). |
| Mandatory frequency tripping requirements | se-grid-codes contains algorithms implementing the mandatory frequency tripping requirements (Monitoring). |
| Library Configuration | se-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.