...

Package inertia

import "github.com/G-PST/inertia"
Overview
Index
Subdirectories

Overview ▾

inertia is a Go package for real-time estimation of a power system's inertia levels. It defines software interfaces for ingesting and reporting data in real-time.

Unit commitment ("H-constant")-based estimation logic and data interfaces are available in the inertia/uc package. PMU-based estimation methods are planned as future work.

System integrators can provide deployment-specfic data ingestion code (e.g., developed for use with a specific EMS or historian system) that conforms to the stated data interfaces for the desired estimation method. Once these input interfaces are implemented, ingested data can be automatically processed and reported out via the package's real-time visualization framework.

This package provides two off-the-shelf visualization modules in inertia/sink/text and inertia/sink/web, but custom implementations of the [Visualizer] interface can also be used. Multiple Visualizers can be associated with a single real-time data stream, allowing for reporting to multiple outputs at the same time, for example logging to a text file while also visualizing results in a web browser.

func Run

func Run(source DataSource, sinks []DataSink,
    success_freq time.Duration, fail_freq time.Duration)

type DataSink

type DataSink interface {

    // Pass in static system parameters to the visualization.
    // Should be called exactly once, before any Updates are provided.
    Init(SystemMetadata) error

    // Pass in a new SystemState to be added to the visualization.
    Update(Snapshot)
}

type DataSource

type DataSource interface {

    // Types implementing DataSource should have a Metadata method that
    // returns SystemMetadata information.
    Metadata() SystemMetadata

    // Query the DataSource, returning the oldest unseen data if it's
    // available, or an error otherwise (e.g. if no new data is available).
    // This allows for making repeated queries until there's
    // nothing new to report, at which point the user can wait some amount of
    // time before trying again.
    Query() (Snapshot, error)
}

type Region

Region provides metadata on mutually-exclusive subsets of the full network

type Region struct {
    Name string `json:"name"`
}

type Snapshot

Snapshot is the common data structure used for reporting inertia levels at a point in time.

type Snapshot struct {
    Time        time.Time
    Requirement float64
    Total       UnitAggregation
    Categories  map[string]*UnitAggregation
    Regions     map[string]*UnitAggregation
}

type SystemMetadata

SystemMetadata brings together metadata about different aspects of the system

type SystemMetadata struct {
    Regions    map[string]*Region       `json:"regions"`
    Categories map[string]*UnitCategory `json:"categories"`
    Units      map[string]UnitMetadata
}

type SystemState

type SystemState struct {
    Time        time.Time
    Requirement float64
    Units       []UnitState
    System      *SystemMetadata
}

func (SystemState) Inertia

func (st SystemState) Inertia() (Snapshot, error)

type UnitAggregation

type UnitAggregation struct {
    Units        int     `json:"units"`
    TotalRating  float64 `json:"total_rating"`
    TotalInertia float64 `json:"total_inertia"`
}

func (*UnitAggregation) AddUnit

func (agg *UnitAggregation) AddUnit(h float64, rating float64)

type UnitCategory

UnitCategory provides metadata for logical groupings of generating units

type UnitCategory struct {
    Name  string `json:"name"`
    Color string `json:"color"`
    Order int    `json:"order"`
}

type UnitMetadata

UnitMetadata provides parameters and classifications for specific generating units

type UnitMetadata struct {
    Name     string
    Category *UnitCategory
    Region   *Region
    Rating   float64 // in MVA
    H        float64 // in s
}

type UnitState

type UnitState struct {
    UnitMetadata
    Committed bool
}

Subdirectories

Name Synopsis
..
sinks
text
test
web
test
sources
mock