Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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.

import sys

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

from loguru import logger
import plotly.io as pio

pio.renderers.default = "plotly_mimetype"

logger.remove()

# Add a new sink with the desired minimum level
logger.add(sys.stderr, level="WARNING")

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()
Loading...
Loading...
from gdm.distribution.enums import MapType, PlotingStyle

fig = distribution_system.plot(
    map_type=MapType.SCATTER_MAP,
    style=PlotingStyle.OPEN_STREET_MAP,
    show=False,
)
fig
Loading...

Three-Phase Balanced Representation

The model is reduced by representing only the three-phase buses in the system. This formulation is particularly useful for system-level studies where maintaining a balanced representation of the network is sufficient.

from gdm.distribution.model_reduction import reduce_to_three_phase_system

three_phase_gdm_model: DistributionSystem = reduce_to_three_phase_system(
    distribution_system, name="reduced_system", agg_time_series=False
)
three_phase_gdm_model.info()
Loading...
Loading...
fig = three_phase_gdm_model.plot(
    map_type=MapType.SCATTER_MAP,
    style=PlotingStyle.OPEN_STREET_MAP,
    show=False,
)
fig
Loading...

Primary Network Representation

This approach involves lumping loads, generation, and capacitors and representing them on the primary network. All secondary networks are removed, resulting in a streamlined model that captures the essential characteristics of the primary distribution network while discarding unnecessary details.

from gdm.distribution.model_reduction import reduce_to_primary_system

primary_gdm_model: DistributionSystem = reduce_to_primary_system(
    distribution_system, name="reduced_system", agg_time_series=False
)
primary_gdm_model.info()
Loading...
Loading...
fig = primary_gdm_model.plot(
    map_type=MapType.SCATTER_MAP,
    style=PlotingStyle.OPEN_STREET_MAP,
    show=False,
)
fig
Loading...

Support for Time Series Aggregation

Model reduction algorithms aggregate components. Additionally, agg_time_series 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_time_series=True,
    time_series_type=SingleTimeSeries,
)