Outputs¶
Each of the three operations returns its own result, and all three are extendable, so an implementation can attach what this API does not model without the API changing.
StateEstimationResult¶
An estimation returns the state it computed. With
ESTIMATE_OBSERVABLE_ISLANDS a single component can
come back partly estimated, and the set of BusResult entries says which of its buses carry a
value. Writing back is opt-in through
writeResultsToNetwork, and a caller holding a
result can write it at any time:
StateEstimationResult estimate = StateEstimation.estimate(network);
// compare, test for bad data, estimate again, then settle on one
StateEstimation.writeResultsToNetwork(network, estimate);
Every solved value on the variant is cleared first, through Networks.unsetSolvedValues. The
voltages then go onto the buses, and the flows onto the terminals of the branches, three-winding
transformers and injections. A bus the result does not mention is left at NaN, so the network
says which parts carry an estimate rather than mixing one with stale flows.
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
variantId |
String |
- |
yes |
- |
The variant the estimation ran against |
status |
Status |
- |
yes |
- |
|
componentResults |
List |
- |
yes |
- |
One entry per synchronous component the estimation covered |
busResults |
List |
- |
no |
Empty list |
The estimated state, one entry per estimated bus |
branchResults |
List |
- |
no |
Empty list |
The flows the state implies, one entry per estimated branch |
threeWindingsTransformerResults |
List |
- |
no |
Empty list |
The flows, one entry per estimated three-winding transformer |
injectionResults |
List |
- |
no |
Empty list |
The injections the state implies, one entry per estimated device |
measurementResults |
List |
- |
no |
Empty list |
One entry per measurement consumed, in no guaranteed order |
quantityAccuracies |
List |
- |
no |
Empty list |
The accuracy of each estimated quantity the implementation reports one for |
ComponentResult:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
status |
Status |
- |
yes |
- |
|
statusText |
String |
- |
no |
Empty string |
The status in the implementation’s own words |
iterationCount |
int |
- |
yes |
- |
Iterations taken |
referenceBusId |
String |
- |
yes |
- |
The bus whose voltage angle was held fixed |
objectiveFunctionValue |
double |
- |
no |
|
Weighted sum of squared residuals at the solution |
referenceBusId also identifies the component, since a component number would depend on
traversal order and would not survive a topology change.
objectiveFunctionValue is the quantity a least-squares estimator minimizes, and it is what a
chi-square test is computed from. An estimator in another family does not produce one and returns
NaN.
BusResult is in the units IIDM uses for a bus:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
busId |
String |
- |
yes |
- |
The bus, in the bus view |
voltageLevelId |
String |
- |
yes |
- |
The voltage level holding the bus |
v |
double |
kV |
yes |
- |
Estimated voltage magnitude |
angle |
double |
degrees |
yes |
- |
Estimated voltage angle |
Buses are those of the bus view, and so is referenceBusId on a ComponentResult. The same
identifier can name a different bus in each view, so an implementation working in the bus/breaker
view maps back before it reports.
BranchResult is in the units IIDM uses for a terminal, each quantity positive when flowing from
the bus into the branch at that side:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
branchId |
String |
- |
yes |
- |
The branch |
p1 |
double |
MW |
yes |
- |
Active power at side 1 |
q1 |
double |
MVar |
yes |
- |
Reactive power at side 1 |
i1 |
double |
A |
no |
|
Current magnitude at side 1 |
p2 |
double |
MW |
yes |
- |
Active power at side 2 |
q2 |
double |
MVar |
yes |
- |
Reactive power at side 2 |
i2 |
double |
A |
no |
|
Current magnitude at side 2 |
Flows follow from the voltages at the two ends and the branch admittance. They are carried so that a caller holding a result can write it back without rebuilding the network model.
A paired boundary line is reported through its tie line, which is itself a branch, and never through
the two boundary lines behind it, so summing branch flows does not count an interconnector twice. An
unpaired boundary line is reported as a BranchResult as well, with side 1 the network side and
side 2 the boundary side, even though IIDM models it as an injection.
ThreeWindingsTransformerResult is in the same units, each quantity positive when flowing from the
bus into the leg:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
threeWindingsTransformerId |
String |
- |
yes |
- |
The transformer |
p1, p2, p3 |
double |
MW |
yes |
- |
Active power at each leg |
q1, q2, q3 |
double |
MVar |
yes |
- |
Reactive power at each leg |
i1, i2, i3 |
double |
A |
no |
|
Current magnitude at each leg |
InjectionResult covers generators, loads, shunt compensators and static var compensators, each
quantity positive when flowing from the bus into the device:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
injectionId |
String |
- |
yes |
- |
The device |
p |
double |
MW |
yes |
- |
Active power |
q |
double |
MVar |
yes |
- |
Reactive power |
i |
double |
A |
no |
|
Current magnitude |
The estimated voltages fix what a bus injects in total, not how that total divides between the devices on it, so an injection is reported rather than derived.
MeasurementResult is in the unit the measurement was given in:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
measurementId |
String |
- |
yes |
- |
The measurement |
measuredValue |
double |
- |
yes |
- |
What the meter read |
estimatedValue |
double |
- |
yes |
- |
What a meter in this position would read in the estimated state |
residual |
double |
- |
yes |
- |
Measured minus estimated |
normalizedResidual |
double |
- |
yes |
- |
The residual divided by its own standard deviation, comparable across meters |
residualAboveThreshold |
boolean |
- |
yes |
- |
Whether its absolute value exceeded the threshold |
A normalized residual is signed: positive means the meter read above the estimate. The threshold is compared against the absolute value, so a measurement above residualThreshold can sit on either side.
QuantityAccuracy says how tightly the measurements determined one quantity of one element. The
redundancy half of the same question is on ObservabilityResult:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
elementId |
String |
- |
yes |
- |
The bus, injection or branch |
quantity |
Quantity |
- |
yes |
- |
|
side |
Optional |
- |
no |
Empty optional |
The branch side, always empty for a voltage |
standardDeviation |
double |
MW, MVar or kV |
yes |
- |
The standard deviation of the estimate |
An implementation that computes no accuracies returns an empty list.
ObservabilityResult¶
Computed from measurement placement and topology, so it is available whether or not an estimation converged. The vocabulary follows the IIDM observability extensions, so a provider can publish the same information onto the network without translating it first.
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
status |
Status |
- |
yes |
- |
|
statusText |
String |
- |
no |
Empty string |
The status in the implementation’s own words |
observableIslands |
List |
- |
no |
Empty list |
Connected sets of buses sharing one status |
elementObservabilities |
List |
- |
no |
Empty list |
Per-element observability |
A FAILED analysis reports nothing meaningful in the other two. It means the analysis could
not be carried out, which is different from a network the measurements leave undetermined: that
is a COMPLETED analysis reporting NON_OBSERVABLE islands.
getIsland(busId) and getElementObservability(elementId) look either list up by identifier and
return an empty Optional when there is no entry.
An ObservableIsland depends on where the measurements are rather than on connectivity, so one
connected component of the network can hold several of them. The structure mirrors
ObservabilityArea.AreaCharacteristics:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
islandNumber |
int |
- |
yes |
- |
The number this island carries in |
status |
IslandStatus |
- |
yes |
- |
|
busIds |
Set |
- |
yes |
- |
The buses in the island |
ElementObservability matches InjectionObservability for an injection and BranchObservability
for a branch:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
elementId |
String |
- |
yes |
- |
The element |
observable |
boolean |
- |
yes |
- |
One answer covering every quantity |
redundancies |
List |
- |
no |
Empty list |
What was determined, per quantity |
QuantityRedundancy carries the redundancy half of ObservabilityQuality. The standard
deviation it also holds describes an estimate, so it is on
StateEstimationResult as QuantityAccuracy:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
quantity |
Quantity |
- |
yes |
- |
|
side |
Optional |
- |
no |
Empty optional |
The branch side, always empty for a voltage |
redundant |
Optional |
- |
no |
Empty optional |
Whether anything else determines this quantity |
An empty redundant means the analysis did not establish it. false means the quantity is
critical: losing the measurement behind it would leave a region unobservable, and an error in it
cannot be detected.
BadDataResult¶
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
status |
Status |
- |
yes |
- |
|
statusText |
String |
- |
no |
Empty string |
The status in the implementation’s own words |
suspectMeasurements |
List |
- |
no |
Empty list |
The measurements that disagree with the estimate, worst first |
uncheckableMeasurementIds |
Set |
- |
no |
Empty set |
The measurements that could not be tested |
SuspectMeasurement:
Attribute |
Type |
Unit |
Required |
Default value |
Description |
|---|---|---|---|---|---|
measurementId |
String |
- |
yes |
- |
The measurement |
normalizedResidual |
double |
- |
yes |
- |
The residual divided by its own standard deviation |
The residual is signed here too, so the list holds readings that sit above and below the estimate.
A measurement that nothing else determines always has a residual of zero, whatever its value, so
it is listed under uncheckableMeasurementIds instead of being reported as correct. Those are the
quantities whose QuantityRedundancy reports redundant as false.
Nothing is removed or reweighted. See limitations.
Extensions¶
All three results extend Extendable, so an implementation attaches its own statistics as a typed
extension:
StateEstimationResult result = StateEstimation.estimate(network);
MyEstimatorStatistics statistics = result.getExtension(MyEstimatorStatistics.class);