Network Reduction#

The grid-data-models (GDM) package provides helper functions to facilitate the reduction of distribution models, making them more computationally efficient for specific analyses. Model reduction techniques are particularly useful when studying large distribution networks where simulating the entire model is unnecessary or resource-intensive.

GDM currently supports two model reduction formulations:

  • Three-phase balanced representation

  • Primary network representation

We start by loading a sample DistributionSystem.

from gdm.distribution import DistributionSystem
from gdmloader.constants import GCS_CASE_SOURCE
from gdmloader.source import SystemLoader

gdm_loader = SystemLoader()
gdm_loader.add_source(GCS_CASE_SOURCE)

distribution_system: DistributionSystem = gdm_loader.load_dataset(
    source_name=GCS_CASE_SOURCE.name, 
    system_type=DistributionSystem, 
    dataset_name="p1rhs7_1247",
)
distribution_system.name = "p1rhs7_1247"
distribution_system.info()
/opt/homebrew/Caskroom/miniconda/base/envs/gdm2/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py:502: UserWarning: Ellipsis is not a Python type (it may be an instance of an object), Pydantic will allow any object with no validation since we cannot even enforce that the input is an instance of the given type. To get rid of this error wrap the type with `pydantic.SkipValidation`.
  warn(
System                                
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Property                    Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ System name          │ p1rhs7_1247 │
│ Data format version  │       2.0.1 │
│ Components attached  │       13370 │
│ Time Series attached │           0 │
│ Description          │             │
└──────────────────────┴─────────────┘
Component Information                       
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓
┃ Type                              Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩
│ DistributionBus                  │  2510 │
│ DistributionLoad                 │  1896 │
│ DistributionTransformer          │   503 │
│ DistributionTransformerEquipment │    10 │
│ DistributionVoltageSource        │     1 │
│ LoadEquipment                    │  1896 │
│ Location                         │  2510 │
│ MatrixImpedanceBranch            │  1841 │
│ MatrixImpedanceBranchEquipment   │    38 │
│ MatrixImpedanceFuse              │    81 │
│ MatrixImpedanceFuseEquipment     │     6 │
│ MatrixImpedanceSwitch            │    84 │
│ MatrixImpedanceSwitchEquipment   │    15 │
│ PhaseLoadEquipment               │  1948 │
│ PhaseVoltageSourceEquipment      │     3 │
│ TimeCurrentCurve                 │     1 │
│ VoltageLimitSet                  │     8 │
│ VoltageSourceEquipment           │     1 │
│ WindingEquipment                 │    18 │
└──────────────────────────────────┴───────┘

Three-Phase Balanced Representation#

The model is reduced to only the three-phase buses in the system.

from gdm.distribution.model_reduction import reduce_to_three_phase_system
from gdm.distribution  import DistributionSystem

three_phase_gdm_model: DistributionSystem = reduce_to_three_phase_system(
    distribution_system, 
    name="reduced_system", 
    agg_timeseries=False
)
three_phase_gdm_model.info()
System                                   
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Property                       Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ System name          │ reduced_system │
│ Data format version  │          2.0.1 │
│ Components attached  │           1953 │
│ Time Series attached │              0 │
│ Description          │                │
└──────────────────────┴────────────────┘
Component Information                       
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓
┃ Type                              Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩
│ DistributionBus                  │   328 │
│ DistributionLoad                 │   190 │
│ DistributionTransformer          │    22 │
│ DistributionTransformerEquipment │     2 │
│ DistributionVoltageSource        │     1 │
│ LoadEquipment                    │   190 │
│ Location                         │   328 │
│ MatrixImpedanceBranch            │   248 │
│ MatrixImpedanceBranchEquipment   │     8 │
│ MatrixImpedanceSwitch            │    57 │
│ MatrixImpedanceSwitchEquipment   │     9 │
│ PhaseLoadEquipment               │   556 │
│ PhaseVoltageSourceEquipment      │     3 │
│ VoltageLimitSet                  │     6 │
│ VoltageSourceEquipment           │     1 │
│ WindingEquipment                 │     4 │
└──────────────────────────────────┴───────┘

Primary Network Representation#

All secondary networks are removed.This approach involves lumping loads, generation, and capacitors and representing them on the primary network.

from gdm.distribution.model_reduction import reduce_to_primary_system
from gdm.distribution import DistributionSystem

primary_gdm_model: DistributionSystem = reduce_to_primary_system(
    distribution_system, 
    name="reduced_system", 
    agg_timeseries=False
)
primary_gdm_model.info()
System                                   
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Property                       Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ System name          │ reduced_system │
│ Data format version  │          2.0.1 │
│ Components attached  │           4289 │
│ Time Series attached │              0 │
│ Description          │                │
└──────────────────────┴────────────────┘
Component Information                       
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓
┃ Type                              Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩
│ DistributionBus                  │   796 │
│ DistributionLoad                 │   502 │
│ DistributionTransformer          │     1 │
│ DistributionTransformerEquipment │     1 │
│ DistributionVoltageSource        │     1 │
│ LoadEquipment                    │   502 │
│ Location                         │   796 │
│ MatrixImpedanceBranch            │   629 │
│ MatrixImpedanceBranchEquipment   │     8 │
│ MatrixImpedanceFuse              │    81 │
│ MatrixImpedanceFuseEquipment     │     6 │
│ MatrixImpedanceSwitch            │    84 │
│ MatrixImpedanceSwitchEquipment   │    15 │
│ PhaseLoadEquipment               │   856 │
│ PhaseVoltageSourceEquipment      │     3 │
│ TimeCurrentCurve                 │     1 │
│ VoltageLimitSet                  │     4 │
│ VoltageSourceEquipment           │     1 │
│ WindingEquipment                 │     2 │
└──────────────────────────────────┴───────┘

Support for Time Series Aggregation#

Model reduction algorithms aggregate load-modifying components, like DER, loads, and capacitors. Additionally, agg_timeseries can be set to true to aggregate time series profiles.

from infrasys.time_series_models import SingleTimeSeries

three_phase_gdm_model: DistributionSystem = reduce_to_three_phase_system(
    distribution_system, 
    name="reduced_system", 
    agg_timeseries=True, 
    time_series_type=SingleTimeSeries
)