Function formulations

Volt-var and volt-watt characteristics can be represented by smooth approximations, exact piecewise-linear constraints, complementarity conditions or convex-hull relaxations. The choice affects the optimisation problem, its numerical conditioning and the error relative to the specified characteristic.

This chapter compares those representations for bounded continuous piecewise-linear (PWL) curves in physical units. It also covers approximation error, solver tolerances and their use in the inverter models.

Worked comparisons

Your taskWorked guide
Model volt-var or volt-watt without tying the data to a solverVolt-var and volt-watt formulations
Exploit voltage bounds or distinguish tracking from a power limitVoltage bounds and constraints
Compare encodings, scales, starts and solver settings reproduciblyConfigurable experiments
Select smoothing in a physical feeder/inverter modelPhysical inverter example
Understand approximation error, derivatives and relaxation witnessesMathematics and analytic reference
Translate an engineering accuracy requirement into a numerical budgetPhysical error and conditioning
Interpret OpenDSS tolerances and choose a whole-model solverTolerances and solver choice
Implement a different smooth approximationSmoothing-family extension

Start with the control-characteristic example, the effect of voltage bounds, and the numerical experiments. The feeder example shows how formulation choices affect an inverter study. The analytical reference examines approximation error and stationary solutions. The examples are run when the documentation is built. The API reference gives the function arguments, and the references identify the relevant literature and software.

Choose the modelling interface

InterfaceModeler's responsibilityReturned object
VoltVarWattIntent and VoltVarWattEncodingSeparate physical curves/sensing from per-curve encoding choicesReusable intent and encoding data
formulate_control_curve! / formulate_pwl!Request a graph output and couple it to the rest of the modelPWLFormulationHandle
formulate_control_relation! / formulate_pwl_relation!Declare :equal, :upper or :lower for an existing output, with valid input boundsPWLRelationHandle with the selected lowering
lower_positive_policySelect smooth curves within the supported physical controller equationsController policy for the advanced IBR model
FormulationCaseBuild a fresh model and declare observations/custom metricsReproducible experiment definition

A curve is reusable; its lowering depends on the occurrence. A volt-watt upper limit over a concave portion may reduce exactly to linear inequalities even when tracking the same curve needs a nonlinear or discrete representation. Scalar convexity does not establish convexity of the network model.

Interpreting the formulations

  • Specified characteristic: the prescribed PWL function, before approximation.
  • Smoothed characteristic: equality to a smooth approximation; its error budget is a function-value bound, not a network equilibrium or DOE safety guarantee.
  • Exact constraints: a mathematically equivalent formulation on the declared domain; finite solver tolerances still require candidate checks.
  • Outer relaxation: a superset of the intended feasible set. A graph hull may admit points off the curve; some projected inequality relations are exact.
  • Solution checks: residuals at a returned point, separate from solver success, stationarity, global optimality and physical safety.

The library specializes scalar occurrences using declared bounds. It does not infer general network bounds, automatically convert whole AC controllers to MIP/MPCC/conic models, or supply global nonlinear error certificates. Discontinuous switching, hysteresis and dynamic controller state require explicit models.