Skip to content

Commit 9b733d8

Browse files
authored
Merge branch 'main' into feature/links-part-3
2 parents 74499f6 + eb01480 commit 9b733d8

17 files changed

Lines changed: 79 additions & 500 deletions

File tree

.github/workflows/build-test-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ jobs:
322322
run: echo "${{ steps.tag.outputs.tag }}"
323323

324324
- name: Create GitHub release
325-
uses: softprops/action-gh-release@v2
325+
uses: softprops/action-gh-release@v3
326326
if: (inputs.create_release)
327327
with:
328328
files: |

docs/algorithms/pf-algorithms.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,14 @@ For a summary and guidance on choosing the right algorithm, see
1515
The nodal equations of a power system network can be written as:
1616

1717
$$
18-
\begin{eqnarray}
19-
I_N & = Y_{bus}U_N
20-
\end{eqnarray}
18+
I_N = Y_{bus}U_N
2119
$$
2220

2321
Where $I_N$ is the $N$ vector of source currents injected into each bus and $U_N$ is the $N$ vector of bus voltages.
2422
The complex power delivered to bus $k$ is:
2523

2624
$$
27-
\begin{eqnarray}
28-
S_{k} & = P_k + jQ_k & = U_{k} I_{k}^{*}
29-
\end{eqnarray}
25+
S_{k} = P_k + jQ_k = U_{k} I_{k}^{*}
3026
$$
3127

3228
Power flow equations are based on solving the nodal equations above to obtain the voltage magnitude and voltage angle at
@@ -47,9 +43,7 @@ This is the traditional method for power flow calculations.
4743
This method uses a Taylor series, ignoring the higher order terms, to solve the nonlinear set of equations iteratively:
4844

4945
$$
50-
\begin{eqnarray}
51-
f(x) & = y
52-
\end{eqnarray}
46+
f(x) = y
5347
$$
5448

5549
Where:
@@ -101,19 +95,17 @@ As can be seen in the equations above $\delta_1$ and $V_1$ are omitted, because
10195
In each iteration $i$ the following equation is solved:
10296

10397
$$
104-
\begin{eqnarray}
105-
J(i) \Delta x(i) & = \Delta y(i)
106-
\end{eqnarray}
98+
J(i) \Delta x(i) = \Delta y(i)
10799
$$
108100

109101
Where
110102

111103
$$
112-
\begin{eqnarray}
113-
\Delta x(i) & = x(i+1) - x(i)
114-
\quad\text{and}\quad
115-
\Delta y(i) & = y - f(x(i))
116-
\end{eqnarray}
104+
\begin{aligned}
105+
\Delta x(i) & = x(i+1) - x(i)
106+
\quad\text{and}\quad
107+
\Delta y(i) & = y - f(x(i))
108+
\end{aligned}
117109
$$
118110

119111
$J$ is the [Jacobian](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant), a matrix with all partial

docs/algorithms/sc-algorithms.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ For a summary and guidance, see [Calculations](../user_manual/calculations.md#sh
1414
In the short circuit calculation, the following equations are solved with border conditions of faults added as
1515
constraints.
1616

17-
$$ \begin{eqnarray} I_N & = Y_{bus}U_N \end{eqnarray} $$
17+
$$
18+
I_N = Y_{bus}U_N
19+
$$
1820

1921
This gives the initial symmetrical short circuit current ($I_k^{\prime\prime}$) for a fault.
2022
This quantity is then used to derive almost all further calculations of short circuit studies applications.

docs/algorithms/se-algorithms.md

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ The goal of WLS state estimation is to evaluate the state variable with the high
3232
measurement input, by solving:
3333

3434
$$
35-
\begin{eqnarray}
36-
\min r(\underline{U}) = \dfrac{1}{2} (f(\underline{U}) - \underline{z})^H W (f(\underline{U}) - \underline{z})
37-
\end{eqnarray}
35+
\min r(\underline{U}) = \dfrac{1}{2} (f(\underline{U}) - \underline{z})^H W (f(\underline{U}) - \underline{z})
3836
$$
3937

4038
Where:
@@ -82,23 +80,21 @@ For example, there can be multiple voltage sensors on the same bus.
8280
The measurement data can be merged into one virtual measurement using a Kalman filter:
8381

8482
$$
85-
\begin{eqnarray}
86-
z = \dfrac{\sum_{k=1}^{N_{sensor}} z_k \sigma_k^{-2}}{\sum_{k=1}^{N_{sensor}} \sigma_k^{-2}}
87-
\end{eqnarray}
83+
z = \dfrac{\sum_{k=1}^{N_{sensor}} z_k \sigma_k^{-2}}{\sum_{k=1}^{N_{sensor}} \sigma_k^{-2}}
8884
$$
8985

9086
Where $z_k$ and $\sigma_k$ are the measured value and standard deviation of individual measurements.
9187

9288
Multiple appliance measurements (power measurements) on one bus are aggregated as the total injection at the bus:
9389

9490
$$
95-
\begin{eqnarray}
96-
\underline{S} = \sum_{k=1}^{N_{appliance}} \underline{S}_k
97-
\quad\text{and}\quad
98-
\sigma_P^2 = \sum_{k=1}^{N_{appliance}} \sigma_{P,k}^2
99-
\quad\text{and}\quad
100-
\sigma_Q^2 = \sum_{k=1}^{N_{appliance}} \sigma_{Q,k}^2
101-
\end{eqnarray}
91+
\begin{aligned}
92+
\underline{S} = \sum_{k=1}^{N_{appliance}} \underline{S}_k
93+
\quad\text{and}\quad
94+
\sigma_P^2 = \sum_{k=1}^{N_{appliance}} \sigma_{P,k}^2
95+
\quad\text{and}\quad
96+
\sigma_Q^2 = \sum_{k=1}^{N_{appliance}} \sigma_{Q,k}^2
97+
\end{aligned}
10298
$$
10399

104100
Where $S_k$ and $\sigma_{P,k}$ and $\sigma_{Q,k}$ are the measured value and the standard deviation of the individual
@@ -150,26 +146,14 @@ The following illustrates how this works for `sym_current_sensor`s in symmetric
150146
See also [the full mathematical workout](https://github.com/PowerGridModel/power-grid-model/issues/547).
151147

152148
$$
153-
\begin{eqnarray}
154-
& \mathrm{Re}\left\{I\right\} = I \cos\theta
155-
\end{eqnarray}
156-
$$
157-
$$
158-
\begin{eqnarray}
159-
& \mathrm{Im}\left\{I\right\} = I \sin\theta
160-
\end{eqnarray}
161-
$$
162-
$$
163-
\begin{eqnarray}
164-
& \text{Var}\left(\mathrm{Re}\left\{I\right\}\right) =
165-
\sigma_i^2 \cos^2\theta + I^2 \sigma_{\theta}^2\sin^2\theta
166-
\end{eqnarray}
167-
$$
168-
$$
169-
\begin{eqnarray}
170-
& \text{Var}\left(\mathrm{Im}\left\{I\right\}\right) =
171-
\sigma_i^2 \sin^2\theta + I^2 \sigma_{\theta}^2\cos^2\theta
172-
\end{eqnarray}
149+
\begin{aligned}
150+
& \mathrm{Re}\left\{I\right\} = I \cos\theta \\
151+
& \mathrm{Im}\left\{I\right\} = I \sin\theta \\
152+
& \text{Var}\left(\mathrm{Re}\left\{I\right\}\right) =
153+
\sigma_i^2 \cos^2\theta + I^2 \sigma_{\theta}^2\sin^2\theta \\
154+
& \text{Var}\left(\mathrm{Im}\left\{I\right\}\right) =
155+
\sigma_i^2 \sin^2\theta + I^2 \sigma_{\theta}^2\cos^2\theta
156+
\end{aligned}
173157
$$
174158

175159
## Iterative linear state estimation
@@ -188,9 +172,7 @@ Therefore, traditional measurements are linearized prior to running the algorith
188172
$\theta_i$ is the intrinsic transformer phase shift:
189173

190174
$$
191-
\begin{eqnarray}
192-
\underline{U}_i = U_i \cdot e^{j \theta_i}
193-
\end{eqnarray}
175+
\underline{U}_i = U_i \cdot e^{j \theta_i}
194176
$$
195177

196178
- Branch current with global angle: The global angle current measurement captures the phase offset relative to the same
@@ -201,9 +183,7 @@ $$
201183
angle).
202184

203185
$$
204-
\begin{eqnarray}
205-
\underline{I} = I_i \cdot e^{j \theta_i}
206-
\end{eqnarray}
186+
\underline{I} = I_i \cdot e^{j \theta_i}
207187
$$
208188

209189
- Branch current with local angle: Sometimes, (accurate) voltage measurements are not available for a branch, which
@@ -217,10 +197,8 @@ $$
217197
Given the measured (linearized) voltage phasor, the current phasor is calculated as follows:
218198

219199
$$
220-
\begin{equation}
221-
\underline{I} = \underline{I}_{\text{local}}^{*} \frac{\underline{U}}{|\underline{U}|}
222-
= \underline{I}_{\text{local}}^{*} \cdot e^{j \theta}
223-
\end{equation}
200+
\underline{I} = \underline{I}_{\text{local}}^{*} \frac{\underline{U}}{|\underline{U}|}
201+
= \underline{I}_{\text{local}}^{*} \cdot e^{j \theta}
224202
$$
225203

226204
where $\underline{U}$ is either measured voltage magnitude at the bus or assumed unity magnitude, with the intrinsic
@@ -232,19 +210,15 @@ $\theta$ is the phase angle of the voltage.
232210
Given the measured (linearized) voltage phasor, the current phasor is calculated as follows:
233211

234212
$$
235-
\begin{eqnarray}
236-
\underline{I} = (\underline{S}/\underline{U})^*
237-
\end{eqnarray}
213+
\underline{I} = (\underline{S}/\underline{U})^*
238214
$$
239215

240216
- Bus power injection: Similar as above, to translate the power flow to a complex current phasor, if the bus voltage is
241217
not measured, the nominal voltage with zero angle will be used as an estimation.
242218
The current phasor is calculated as follows:
243219

244220
$$
245-
\begin{eqnarray}
246-
\underline{I} = (\underline{S}/\underline{U})^*
247-
\end{eqnarray}
221+
\underline{I} = (\underline{S}/\underline{U})^*
248222
$$
249223

250224
The aggregated apparent power flow is considered as a single measurement, with variance

docs/user_manual/calculations.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,13 @@ Due to the relative nature of `u_angle` (relevant only in systems with at least
8585
conditions should be met:
8686

8787
$$
88-
\begin{eqnarray}
89-
n_{measurements} & >= & n_{unknowns}
90-
\end{eqnarray}
88+
n_{measurements} >= n_{unknowns}
9189
$$
9290

9391
Where
9492

9593
$$
96-
\begin{eqnarray}
97-
n_{unknowns} & = & 2 & \cdot & n_{nodes} - 1
98-
\end{eqnarray}
94+
n_{unknowns} = 2 \cdot n_{nodes} - 1
9995
$$
10096

10197
The number of measurements can be found by taking the sum of the following:
@@ -201,9 +197,7 @@ Output:
201197
Power flowing through a branch is calculated by voltage and current for any type of calculations in the following way:
202198

203199
$$
204-
\begin{eqnarray}
205-
\underline{S_{branch-side}} = \sqrt{3} \cdot \underline{U_{LL-side-node}} \cdot \underline{I_{branch-side}}
206-
\end{eqnarray}
200+
\underline{S_{branch-side}} = \sqrt{3} \cdot \underline{U_{LL-side-node}} \cdot \underline{I_{branch-side}}^*
207201
$$
208202

209203
These quantities are in complex form.

0 commit comments

Comments
 (0)