Problem Specifications
The main purpose of PowerModelsDistributionStateEstimation is to solve state estimation problems. For a number of purposes, it might be useful to perform power flow or OPF calculations, within the context of a state estimation study. For example, power flow calculations can be used to validate the accuracy of the state estimator, or to generate artificial measurement data, if these are not available. Power flow and OPF calculations can be accessed from PowerModelsDistribution. The description of these problems can be found in PowerModelsDistribution's documentation.
State estimation problem implementation
For a bus injection model, the structure of the state estimation problem is the following. See the implementation at src/prob/se.jl for all the models' implementations and their details. The functions preceded by a "_PMD." are imported from PowerModelsDistributions.jl. Those without prefix are original PowerModelsDistributionStateEstimation functions, those preceded by a "PowerModelsDistributionStateEstimation." are present in both and therefore needed disambiguation.
Variables
PowerModelsDistributionStateEstimation.variable_mc_bus_voltage(pm; bounded = true)
_PMD.variable_mc_branch_power(pm; bounded = true)
_PMD.variable_mc_transformer_power(pm; bounded = true)
_PMD.variable_mc_generator_power(pm; bounded = true)
variable_mc_load(pm; report = true)
variable_mc_residual(pm, bounded = true)
variable_mc_measurement(pm, bounded = false)
It can be seen that the first variables are bounded. It is up to the user to define reasonable upper/lower bounds that don't cut the feasible space of the problem. They can in principle be set as +/- infinity if no better information on the bounds is available.
Constraints
for (i,gen) in _PMD.ref(pm, :gen)
_PMD.constraint_mc_gen_setpoint(pm, i)
end
for (i,bus) in _PMD.ref(pm, :ref_buses)
@assert bus["bus_type"] == 3
_PMD.constraint_mc_theta_ref(pm, i)
end
for (i,bus) in _PMD.ref(pm, :bus)
PowerModelsDistributionStateEstimation.constraint_power_balance_se(pm, i)
end
for (i,branch) in _PMD.ref(pm, :branch)
_PMD.constraint_mc_ohms_yt_from(pm, i)
_PMD.constraint_mc_ohms_yt_to(pm,i)
end
for (i,meas) in _PMD.ref(pm, :meas)
constraint_mc_residual(pm, i)
end
for i in _PMD.ids(pm, :transformer)
_PMD.constraint_mc_transformer_power(pm, i)
end
Objective
objective_mc_se(pm)
For branch flow/linearized/SDP models, the variable space changes and also some of the constraints, while the objective always stays the same.
Mathematical formulation
For a detailed description of the mathematical model, please refer to the following publication. In the mathematical description below, the following sets are used,
- Bold characters indicate vectors and matrices
- The $\text{diag}(\cdot)$ operator takes the diagonal (vector) from a matrix
- The $(\cdot)^H$ indicates the conjugate transpose of a matrix
The julia problem above, can be associated to the following mathematical description
Variables:
Constraints:
Objective:
The residual $\rho_{m, \phi}$ is a function that allows to represent the uncertainty on a given measurement $m$, performed on conductor $\phi$. In the mathematical description above, it is identified as the function $r$, which is depending on the measurement $\mathbf{z}$, and another function: $f$.
The function $f_{m,\phi}$ are used to handle measurements $z_{m,\phi}$ that are performed on quantities that do not refer to the problems' variable space. There are the measurements conversions described in the Measurements And Conversions section of the documentation.
Function $r_{m,\phi}$, on the other hand, depends on what state estimation criterion is chosen, e.g., WLS, WLAV, MLE. The form that $r_{m,\phi}$ takes in the various cases is defined in the section State Estimation Criteria of the documentation.