You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Deviation between measurement values and estimated state
59
59
60
-
In order to perform a state estimation, the system should be observable. If the system is not observable, the calculation will raise either a `NotObservableError` or
61
-
a `SparseMatrixError`.
62
-
In short, meeting the requirement of observability indicates that the system is either an overdetermined system (when the number of measurements is larger than the number of unknowns.
63
-
For each node, there are two unknowns, `u` and `u_angle`. Due to the relative nature of `u_angle` (relevant only in systems with at least two nodes), in total the following conditions should be met:
60
+
In order to perform a state estimation, the system should be observable. If the system is not observable,
61
+
the calculation will raise either a `NotObservableError` or a `SparseMatrixError`.
62
+
In short, meeting the requirement of observability indicates that the system is either an overdetermined
63
+
system (when the number of independent measurements is larger than the number of unknowns) or an exactly
64
+
determined system (the number of independent measurements equals the number of unknowns).
65
+
For each node, there are two unknowns, `u` and `u_angle`. Due to the relative nature of `u_angle`
66
+
(relevant only in systems with at least two nodes), in total the following conditions should be met:
64
67
65
68
$$
66
69
\begin{eqnarray}
@@ -82,11 +85,15 @@ The number of measurements can be found by taking the sum of the following:
82
85
- two times the number of nodes with a voltage sensor with magnitude and angle
83
86
- two times the number of nodes without appliances connected
84
87
- two times the number of nodes where all connected appliances are measured by a power sensor
85
-
- two times the number of branches with a power sensor
88
+
- two times the number of branches with a power sensor and/or a current sensor
86
89
87
90
```{note}
88
91
Having enough measurements does not necessarily mean that the system is observable. The location of the measurements is
89
-
also of importance. Additionally, there should be at least one voltage measurement.
92
+
also of importance, i.e., the measurements should be topologically independent. Additionally, there should be at least one voltage measurement.
93
+
```
94
+
95
+
```{note}
96
+
Global angle current measurements require at least one voltage angle measurement to make sense. See also the [current sensor component documentation](./components.md#global-angle-current-sensors).
90
97
```
91
98
92
99
```{warning}
@@ -99,9 +106,13 @@ In observable systems this helps better outputting correct results. On the other
99
106
Based on the requirements of observability mentioned above, users need to satisfy at least the following conditions for state estimation calculation in `power-grid-model`.
100
107
101
108
-`n_voltage_sensor >= 1`
102
-
- If no voltage phasor sensors are available, then the following conditions should be satisfied: `n_unique_power_sensor >= n_bus - 1`. Otherwise: `n_unique_power_sensor + n_voltage_sensor_with_phasor >= n_bus`
109
+
- If no voltage phasor sensors are available, then both the following conditions shall be satisfied:
110
+
- There are no global angle current sensors.
111
+
-`n_unique_power_or_current_sensor >= n_bus - 1`.
112
+
- Otherwise (if there are voltage phasor sensors available), the following condition shall be satisfied:
`n_unique_power_sensor` can be calculated as sum of following:
115
+
`n_unique_power_or_current_sensor` can be calculated as sum of following:
105
116
106
117
- Zero injection or zero power flow constraint if present for all nodes.
107
118
- Complete injections for all nodes: All appliances in a node are measured or a node injection sensor is present. Either of them counts as one.
@@ -424,6 +435,8 @@ At the moment, the following state estimation algorithms are implemented.
424
435
By default, the [iterative linear](#iterative-linear-state-estimation) method is used.
425
436
```
426
437
438
+
#### State estimation measurement aggregation
439
+
427
440
There can be multiple sensors measuring the same physical quantity. For example, there can be multiple
428
441
voltage sensors on the same bus. The measurement data can be merged into one virtual measurement using a Kalman filter:
429
442
@@ -449,14 +462,51 @@ $$
449
462
450
463
Where $S_k$ and $\sigma_{P,k}$ and $\sigma_{Q,k}$ are the measured value and the standard deviation of the individual appliances.
451
464
465
+
#### State estimate sensor transformations
466
+
467
+
Sometimes, measurements need to be transformed between coordinate spaces. For example, current measurements are in polar coordinates (magnitude and angle), but it is beneficial to transform them to separate real and imaginary components per phase, with each their own variances.
468
+
Variances of the results of such transformations are estimated using the common linearization approximation.
469
+
E.g., for a real random variable $X$, the random variable $Y = F\left(X\right)$, with $F$ sufficiently well-behaved, exists.
470
+
The variances of $Y$ can then be estimated from the variance of $X$ using
This approach generalizes to extension fields and to more dimensions. Both generalizations are required for current sensors.
474
+
The current phasor is described by a complex random variable, which can be decomposed into a real and an imaginary component, or into a magnitude and a phasor.
475
+
Asymmetric sensors and asymmetric calculations, on the other hand, require multidimensional approaches.
476
+
The generalization is done as follows.
477
+
478
+
Let $A$ and $B$ be fields (or rings) that may be multidimensional and that may be extension fields.
479
+
Let $\boldsymbol{X}$ be a random variable with codomain $A$ with components $X_i$.
480
+
Let $\boldsymbol{Y} = \boldsymbol{F}\left(\boldsymbol{X}\right)$ be a random variable with codomain $B$, with $\boldsymbol{F}$ sufficiently well-behaved,
481
+
so that its components $Y_j = F_j\left(\boldsymbol{X}\right)$ are well-behaved.
482
+
Then the variances $\text{Var}\left(Y_i\right)$ of the components of $\boldsymbol{Y}$ can be estimated
483
+
in terms of the variances $\text{Var}\left(X_j\right)$ of the components of $\boldsymbol{X}$ using the following function.
where $\underline{U}$ is either measured voltage magnitude at the bus or assumed unity magnitude, with the intrinsic phase shift.
547
+
$\theta$ is the phase angle of the voltage.
548
+
549
+
- Branch/shunt power flow: To translate the power flow to a complex current phasor, the voltage at the terminal should
550
+
also be measured, otherwise the nominal voltage with zero angle is used as an estimation. Given the measured (linearized) voltage
471
551
phasor, the current phasor is calculated as follows:
472
552
473
553
$$
@@ -476,7 +556,7 @@ $$
476
556
\end{eqnarray}
477
557
$$
478
558
479
-
- Bus power injection: Linear WLS requires a complex current phasor. Similar as above, if the bus voltage is not measured,
559
+
- Bus power injection: Similar as above, to translate the power flow to a complex current phasor, if the bus voltage is not measured,
480
560
the nominal voltage with zero angle will be used as an estimation. The current phasor is calculated as follows:
481
561
482
562
$$
@@ -506,12 +586,28 @@ be the slack bus, which is connected to the external network (source). $\underli
506
586
- Normalize the voltage phasor angle by setting the angle of the slack bus to zero:
507
587
- If the maximum deviation between $\underline{U}^{(k)}$ and $\underline{U}^{(k-1)}$ is smaller than the error tolerance $\epsilon$,
508
588
stop the iteration. Otherwise, continue until the maximum number of iterations is reached.
509
-
589
+
510
590
In the iteration process, the phase angle of voltages at each bus is updated using the last iteration;
511
591
the system error of the phase shift converges to zero. Because the matrix is pre-built and
512
592
pre-factorized, the computation cost of each iteration is much smaller than for the [Newton-Raphson](#newton-raphson-state-estimation)
513
593
method, where the Jacobian matrix needs to be constructed and factorized each time.
514
594
595
+
Because the matrix depends on the variances of the linearized current measurements, pre-factorization
596
+
requires assuming that the magnitudes of the voltages remain constant throughout the iteration process.
597
+
This assumption is, of course, an approximation, and potentially results an inaccurate relative weighing
598
+
of the power measurements. However, the difference between the solution and the actual grid state is
599
+
usually small, because the error introduced by this is typically dominated by the following contributing
600
+
factors (see also [this thread](https://github.com/PowerGridModel/power-grid-model/pull/951#issuecomment-2805154436)).
601
+
602
+
- voltages in the distribution grid are usually close to 1 p.u..
603
+
- power sensor errors are usually best-effort estimates.
604
+
- the interpretation of power measurements as current measurements is an approximation.
605
+
606
+
```{warning}
607
+
In short, the pre-factorization may produce results that may deviate from the actual grid state.
608
+
If higher precision is desired, please consider using [Newton-Raphson state estimation](#newton-raphson-state-estimation) instead.
609
+
```
610
+
515
611
```{warning}
516
612
The algorithm will assume angles to be zero by default (see the details about voltage sensors). This produces more correct outputs when the system is observable, but will prevent the calculation from raising an exception, even if it is unobservable, therefore giving faulty results.
517
613
```
@@ -527,7 +623,7 @@ However, the Jacobian matrix needs to be calculated every iteration and cannot b
527
623
528
624
The Newton-Raphson method considers all measurements to be independent real measurements.
529
625
I.e., $\sigma_P$, $\sigma_Q$ and $\sigma_U$ are all independent values.
530
-
The rationale behind to calculation is similar to that of the [Newton-Raphson for power flow](#newton-raphson-power-flow).
626
+
The rationale behind to calculation is similar to that of the [Newton-Raphson method for power flow](#newton-raphson-power-flow).
531
627
Consequently, the iteration process differs slightly from that of [iterative linear state estimation](#iterative-linear-state-estimation), as shown below.
532
628
533
629
- Initialization: let $\boldsymbol{U}^{(k)}$ be the column vector of the estimated voltage magnitude and $\boldsymbol{\theta}^{(k)}$ the column vector of the
@@ -550,6 +646,10 @@ We initialize $\boldsymbol{U}^{(0)}$ and $\boldsymbol{\theta}^{(k)}$ as follows:
550
646
As for the [iterative linear](#iterative-linear-state-estimation) approach, during iterations, phase angles of voltage at each bus are updated using ones from the previous iteration.
551
647
The system error of the phase shift converges to zero.
552
648
649
+
```{note}
650
+
Newton-Raphson state estimation does not support current measurements at this moment. See also [this issue](https://github.com/PowerGridModel/power-grid-model/issues/765).
651
+
```
652
+
553
653
```{warning}
554
654
The algorithm will assume angles to be zero by default (see the details about voltage sensors). In observable systems this helps better outputting correct results. On the other hand with unobservable systems, exceptions raised from calculations due to faulty results will be prevented.
0 commit comments