th_power_system

Function th_power_system 

Source
pub fn th_power_system() -> DiscreteDblTheory
Expand description

A theory of a power system.

Free models of this theory are models (in the colloquial sense) of a power system, such as a power grid.

§Motivation

This theory is inspired by the ontology behind PyPSA (Python for Power System Analysis), described with admirable precision in the Design section of the PyPSA User Guide.

According to PyPSA’s ontology, the fundamental nodes in a power system are buses and the connections between nodes are branches. Types of branches include:

  1. Passive branches: power flow is determined passively by impedances and power imbalances
    • lines include power transmission and distribution lines
    • transformers change AC voltage levels
  2. Controllable branches: power flow can be actively controlled by optimization
    • links encompass all controllable directed flows in PyPSA

These types of branches implicitly form a hierarchy, made explicit in the compositional formalization of this theory.

§Formalization

Morphisms between buses are lines; hence a composite of lines is again a line. This makes sense as lines are the most primitive type of branch, and it is standard to approximate a physical transmission line by a series of standard line components. See, for example, (Bergen & Vittal, Power Systems Analysis, 2nd ed, Section 4.3) and (Aljanaideh & Bernstein 2019, p. 105).

Transformers generalize lines. At least, comparing PyPSA’s line model and transformer model, the analytical model of a line is seen to specialize that of a transformer (set the tap ratio to one and the phase shift to zero). Lines and transformers are the only types of passive branch in PyPSA’s ontology. Rather than introducing a morphism type just for transformers, we introduce a morphism type for all passive branches along with a promonad structure relating lines and passive branches. Thus, every line can be cast to a passive branch, the composite of passive branches is another passive branch, and a generating passive branche is generically a transformer. Note that sub-networks formed by passive branches are meaningful.

Controllable branches are handled by another layer of promonad structure. Thus, every passive branch can be cast to a branch, the composite of branches is another branch, and a generating branch is generically a link.

In summary, the compositional structure of a power system is formalized as a (free) category graded by the linear order Line < Passive < Branch.