Skip to content

About

The model zoo for BMOPFTools.jl. Models and methods for uncertain four-wire distribution networks.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Repository files navigation

PowerOptLab.jl

CI Documentation License: BSD-3-Clause

PowerOptLab.jl: models and methods for uncertain four-wire distribution networks, covering estimation, devices, inverters, operating envelopes and operability

PowerOptLab provides models and numerical methods for four-wire distribution networks with uncertain states and parameters. It supports state and parameter estimation, generator and inverter studies, battery and EV scheduling, dynamic operating envelopes, and static voltage-operability checks.

The package builds on the BMOPFTools current–voltage OPF formulation, retaining explicit neutral conductors and per-unit scaling. The documentation explains each model's assumptions, validation and numerical limits.

Note

This is research software under active development. APIs may change, and the validation scope differs between models and methods.

Getting started

Use Julia 1.10 or later. Clone the repository and install its pinned dependencies:

git clone https://github.com/frederikgeth/PowerOptLab.jl.git
cd PowerOptLab.jl
julia --project=. scripts/instantiate_pinned.jl

For an existing checkout, run the last command from its root. BMOPFTools is unregistered; the setup script installs the tested commit declared in Project.toml and checks agreement with docs/Project.toml. It replaces a local BMOPFTools Pkg.develop override. Manifests remain local and untracked.

Start with Your first PowerOptLab study: a complete 230 V feeder and two-hour battery schedule, including network data, solver status and physical checks. Its Julia blocks execute during the documentation build.

Study topics

Study Questions and methods Start here
State and parameter estimation Estimate conductor voltages; calibrate selected line lengths and taps; retain overhead-line constructions consistent with sequence data. Estimation methods
Device models and scheduling Compare generator assumptions, select battery models, and schedule charging at fixed EV outlets. Device models
Inverter models and controls Examine filters, converter topology, neutral current, DC-link stress and local control laws. Inverter studies
Dynamic operating envelopes Allocate import/export capacity and test it over declared scenarios and participant utilisation points. DOE in 15 minutes
Power flow and voltage operability Compare nonlinear and HELM solutions; examine static voltage margins; reduce the neutral under declared grounding assumptions. Power-flow methods
Numerical formulations and solvers Compare smoothing, complementarity, exact PWL graphs and relaxations, with physical error budgets and solver diagnostics. Formulation studies

The API index locates topic references. The symbol index provides alphabetical lookup.

Generators, battery storage and electric vehicles

Family Models Guide
Generators GeneralizedGenerator and SourceGenerator: winding connections, internal voltage laws, source impedance, neutral grounding and operating limits. Generator models
Battery storage StorageDevice for AC power-energy scheduling; IVQBattery for cell current, voltage and charge under a supplied Rint model. Battery storage
Electric vehicles EV, EVSE and ChargingSession for vehicles, AC outlet capability and fixed visits; EVDevice for compact compatibility studies. EV models and sessions

Battery efficiencies and limits require data appropriate to the study boundary. The IVQ presets are illustrative, not calibrated cells. EV sessions use fixed outlet assignments and availability; trip modelling and assignment optimisation are outside the current model.

Inverters and controls

AdvancedInverter represents the internal converter node, reduced-L or explicit LCL filters, losses, current and apparent-power limits, and selected DC-link stresses. Its three-phase alternatives are a three-leg three-wire bridge, a four-leg four-wire bridge, and a three-leg four-wire split-capacitor bridge.

Switching limits use a sampled outer approximation of the continuous-time switching hull; inspect the independent dense switching-margin audit and sampling sensitivity near that boundary. Optional carrier-harmonic audits are local calculations around a solved fundamental operating point. Steady-state grid-forming constraints and these audits do not establish dynamic stability. See inverter models and controls for the equations, phase-aware local laws, fleet studies and validation. A separate PV/tap bilevel proof of concept uses DiffOpt sensitivities of a local lower-level response.

Worked studies

Each of these includes complete inputs, expected results and executable checks:

Run the published study and DOE code directly from the checkout:

julia --project=. scripts/run_study_tutorials.jl
julia --project=. scripts/run_doe_tutorials.jl

CI executes those pages on Julia 1.10 and current stable. The first-run, generator and formulation examples execute through Documenter. The battery and state-estimation figures are generated from solved data, with CI checks for stale inputs and rendering code.

For larger inverter campaigns, see the Australian LV study and the earlier ENWL retrofit experiment. Their guides state dataset requirements, conversion assumptions and provenance.

Interpreting results and research scope

A successful local nonlinear solve does not establish global optimality. Measurement fit, observability, covariance and physical validation are distinct claims. For nonlinear AC envelopes, finite scenario/corner tests alone do not certify a continuous uncertainty or utilisation set; sufficient static certificates apply to their stated model and region. See Concepts for units, signs, status and interpretation.

The longer-term research programme connects three questions: which states and network models fit the evidence, which additional measurements would distinguish them, and which operating decisions remain feasible under those alternatives. Current APIs provide separate estimation, optimisation and checking methods. Joint network-model identification and automatic experiment design remain research objectives described in the research programme.

Development and documentation

Run the package tests and build the documentation without deploying it:

julia --project=. -e 'using Pkg; Pkg.test()'
julia --project=docs scripts/instantiate_pinned.jl
DOCUMENTER_DEPLOY=false julia --project=docs docs/make.jl

Both package and documentation CI cover Julia 1.10 and current stable. For intentional upstream development, use Pkg.develop(path="../BMOPFTools.jl"); rerun the setup script to restore the tested revision before comparing with CI. See Contributing for extensions, documentation style, figure regeneration and compatibility checks. Development workflow records live in dev/notes/, outside the published documentation.

License

Dual-licensed:

About

The model zoo for BMOPFTools.jl. Models and methods for uncertain four-wire distribution networks.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages