Skip to content

Commit ec3b44b

Browse files
committed
Final documentation polish [skip ci]
1 parent f8374e9 commit ec3b44b

34 files changed

Lines changed: 232 additions & 115 deletions

File tree

GridKit/Model/EMT/Component/Bus/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ $V = |V| \angle \phi$ and nominal angular frequency $\omega_0 = 2 \pi f_0$:
7373

7474
```math
7575
\begin{aligned}
76-
\mathbf{v}(0) = \sqrt{2}\,|V|
76+
\mathbf{v}(0) = \sqrt{2}|V|
7777
\begin{bmatrix}
7878
\cos(\phi) \\
7979
\cos(\phi - \tfrac{2\pi}{3}) \\
8080
\cos(\phi + \tfrac{2\pi}{3})
8181
\end{bmatrix} \\
82-
\dot{\mathbf{v}}(0) = -\sqrt{2}\,|V|\,\omega_0
82+
\dot{\mathbf{v}}(0) = -\sqrt{2}|V|\omega_0
8383
\begin{bmatrix}
8484
\sin(\phi) \\
8585
\sin(\phi - \tfrac{2\pi}{3}) \\

GridKit/Model/EMT/Component/Line/LineDistributed/README.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LineDistributed Model
22

3-
`LineDistributed` represents a distributed EMT line with
4-
characteristic admittance $\mathbf{y}_c$ and propagation model $\mathbf{H}$.
3+
`LineDistributed` represents a distributed EMT line with characteristic
4+
admittance $\mathbf{y}_c$ and propagation model $\mathbf{h}$.
55

66
## Block Diagram
77

@@ -13,11 +13,9 @@ characteristic admittance $\mathbf{y}_c$ and propagation model $\mathbf{H}$.
1313

1414
## Model Parameters
1515

16-
Symbol | Units | JSON | Description | Note
17-
----------------- | ----------- | ------------ | ------------------------------------------------------ | ----
18-
$\mathbf{P}_\phi$ | [-] | `conductors` | Permutation matrix mapping each conductor to its phase | $\mathbf{P}_\phi \in \mathbb{R}^{N \times K}$
19-
$\mathbf{y}_c$ | [S] | `Yc` | Characteristic admittance | $\mathbf{y}_c \in \mathbb{R}^{K \times N}$
20-
$\mathbf{h}$ | [-] | `H` | Propagation function | $\mathbf{h} \in \mathbb{R}^{K \times K}$
16+
Symbol | Units | JSON | Description | Note
17+
----------------- | ----- | ------------ | ------------------------------------------------------ | ----
18+
$\mathbf{P}_\phi$ | [-] | `conductors` | Permutation matrix mapping each conductor to its phase | $\mathbf{P}_\phi \in \mathbb{R}^{N \times K}$
2119

2220
### Parameter Validation
2321

@@ -28,6 +26,15 @@ None.
2826
The number of phases $N$ and conductors $K$ are the row and column counts of
2927
$\mathbf{P}_\phi$, respectively.
3028

29+
### Submodels
30+
31+
Submodel | Inputs | Parameters | Outputs
32+
-------- | ------ | ---------- | -------
33+
[`VectorFit`](../../../Operators/Rational/VectorFit/README.md) characteristic admittance $\mathbf{y}_c$ | $\mathbf{v}_{1}\in\mathbb{R}^N$ | `Yc` | $\mathbf{i}^{\mathrm{sh}}_{1}\in\mathbb{R}^K$
34+
[`VectorFit`](../../../Operators/Rational/VectorFit/README.md) characteristic admittance $\mathbf{y}_c$ | $\mathbf{v}_{2}\in\mathbb{R}^N$ | `Yc` | $\mathbf{i}^{\mathrm{sh}}_{2}\in\mathbb{R}^K$
35+
[`Propagation`](../../../Operators/Shift/Propagation/README.md) $\mathbf{h}$ | $2\mathbf{i}^{\mathrm{sh}}_{2}-\mathbf{i}^{\mathrm{inc}}_{2}$ | `H` | $\mathbf{i}^{\mathrm{inc}}_{1}\in\mathbb{R}^K$
36+
[`Propagation`](../../../Operators/Shift/Propagation/README.md) $\mathbf{h}$ | $2\mathbf{i}^{\mathrm{sh}}_{1}-\mathbf{i}^{\mathrm{inc}}_{1}$ | `H` | $\mathbf{i}^{\mathrm{inc}}_{2}\in\mathbb{R}^K$
37+
3138
## Model Variables
3239

3340
### Internal Variables
@@ -77,18 +84,18 @@ None.
7784
```math
7885
\begin{aligned}
7986
\mathbf{i}^{\mathrm{sh}}_{1} &=
80-
\mathbf{y}_c*\,\mathbf{v}_{1} \\
87+
\mathbf{y}_c*\mathbf{v}_{1} \\
8188
\mathbf{i}^{\mathrm{sh}}_{2} &=
82-
\mathbf{y}_c*\,\mathbf{v}_{2} \\
89+
\mathbf{y}_c*\mathbf{v}_{2} \\
8390
\mathbf{i}^{\mathrm{inc}}_{1} &=
84-
\mathbf{h}*\,\left(
85-
2\,\mathbf{i}^{\mathrm{sh}}_{2}
91+
\mathbf{h}*\left(
92+
2\mathbf{i}^{\mathrm{sh}}_{2}
8693
-
8794
\mathbf{i}^{\mathrm{inc}}_{2}
8895
\right) \\
8996
\mathbf{i}^{\mathrm{inc}}_{2} &=
90-
\mathbf{h}*\,\left(
91-
2\,\mathbf{i}^{\mathrm{sh}}_{1}
97+
\mathbf{h}*\left(
98+
2\mathbf{i}^{\mathrm{sh}}_{1}
9299
-
93100
\mathbf{i}^{\mathrm{inc}}_{1}
94101
\right) \\
@@ -115,10 +122,10 @@ equations:
115122

116123
```math
117124
\begin{aligned}
118-
\mathbf{i}^{\mathrm{sh}}_{1,0} &= \mathbf{y}_c*\,\mathbf{v}_{1,0} \\
119-
\mathbf{i}^{\mathrm{sh}}_{2,0} &= \mathbf{y}_c*\,\mathbf{v}_{2,0} \\
120-
\mathbf{i}^{\mathrm{inc}}_{1,0} &= \mathbf{h}*\,\left(2\,\mathbf{i}^{\mathrm{sh}}_{2,0} - \mathbf{i}^{\mathrm{inc}}_{2,0}\right) \\
121-
\mathbf{i}^{\mathrm{inc}}_{2,0} &= \mathbf{h}*\,\left(2\,\mathbf{i}^{\mathrm{sh}}_{1,0} - \mathbf{i}^{\mathrm{inc}}_{1,0}\right)
125+
\mathbf{i}^{\mathrm{sh}}_{1,0} &= \mathbf{y}_c*\mathbf{v}_{1,0} \\
126+
\mathbf{i}^{\mathrm{sh}}_{2,0} &= \mathbf{y}_c*\mathbf{v}_{2,0} \\
127+
\mathbf{i}^{\mathrm{inc}}_{1,0} &= \mathbf{h}*\left(2\mathbf{i}^{\mathrm{sh}}_{2,0} - \mathbf{i}^{\mathrm{inc}}_{2,0}\right) \\
128+
\mathbf{i}^{\mathrm{inc}}_{2,0} &= \mathbf{h}*\left(2\mathbf{i}^{\mathrm{sh}}_{1,0} - \mathbf{i}^{\mathrm{inc}}_{1,0}\right)
122129
\end{aligned}
123130
```
124131

GridKit/Model/EMT/Component/Line/LineLumped/README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ $\pi$-section equivalent over length $\Delta x$. Series current $\mathbf{i}$
55
is directed from terminal 1 to terminal 2.
66

77
Notes:
8-
- Alternatively, $\mathbf{Z}'$ and $\mathbf{Y}'$ may be given directly as
9-
`VectorFit` models. Otherwise, they are derived from constant `R`, `L`,
10-
`G`, and `C` matrices.
8+
- $\mathbf{Z}'$ and $\mathbf{Y}'$ may be supplied as per-unit-length
9+
`VectorFit` models or derived from constant `Rp`, `Lp`, `Gp`, and `Cp`
10+
matrices.
1111

1212
## Block Diagram
1313

@@ -19,41 +19,43 @@ Notes:
1919

2020
## Model Parameters
2121

22-
Symbol | Units | JSON | Description | Note
23-
---------------- | -------------- | ---- | ---------------------------------------- | ----
24-
$\mathbf{R}'$ | [$\Omega$/m] | `R` | Series resistance matrix per unit length | $\mathbb{R}^{N \times N}$
25-
$\mathbf{L}'$ | [H/m] | `L` | Series inductance matrix per unit length | $\mathbb{R}^{N \times N}$
26-
$\mathbf{G}'$ | [S/m] | `G` | Shunt conductance matrix per unit length | $\mathbb{R}^{N \times N}$
27-
$\mathbf{C}'$ | [F/m] | `C` | Shunt capacitance matrix per unit length | $\mathbb{R}^{N \times N}$
28-
$\Delta x$ | [m] | `dx` | Line segment length | $\mathbb{R}$
29-
$\mathbf{Z}'$ | [$\Omega$/m] | `Z` | Series impedance per unit length | $\mathbb{C}^{N\times N}$, optional `VectorFit` model
30-
$\mathbf{Y}'$ | [S/m] | `Y` | Shunt admittance per unit length | $\mathbb{C}^{N\times N}$, optional `VectorFit` model
22+
Symbol | Units | JSON | Description | Note
23+
---------------- | ------------ | ---- | ---------------------------------- | ----
24+
$\mathbf{Z}'$ | [$\Omega$/m] | `Zp` | Series impedance per unit length | $\mathbf{Z}'\in\mathbb{C}^{N \times N}$
25+
$\mathbf{Y}'$ | [S/m] | `Yp` | Shunt admittance per unit length | $\mathbf{Y}'\in\mathbb{C}^{N \times N}$
26+
$\Delta x$ | [m] | `dx` | Line segment length | $\mathbb{R}$
3127

3228
### Parameter Validation
3329

3430
None.
3531

3632
### Model Derived Parameters
3733

38-
For the constant `R`, `L`, `G`, and `C` alternative:
34+
The per-unit-length impedance and admittance models are:
3935

4036
```math
4137
\begin{aligned}
42-
\mathbf{R} &= \mathbf{R}'\Delta x & \mathbf{G} &= \dfrac{\mathbf{G}'\Delta x}{2} \\
43-
\mathbf{L} &= \mathbf{L}'\Delta x & \mathbf{C} &= \dfrac{\mathbf{C}'\Delta x}{2}
38+
\mathbf{Z}'(s) &= \mathbf{R}' + s\mathbf{L}' + \mathbf{Z}'_{\mathrm{rat}}(s) \\
39+
\mathbf{Y}'(s) &= \mathbf{G}' + s\mathbf{C}' + \mathbf{Y}'_{\mathrm{rat}}(s)
4440
\end{aligned}
4541
```
4642

47-
If `Z` and `Y` are not given, they are derived as:
43+
The segment impedance and shunt admittance operators used by the equations are:
4844

4945
```math
5046
\begin{aligned}
51-
\mathbf{Z} &= \mathbf{R} + s\mathbf{L} \qquad \text{or} \qquad = \Delta x \mathbf{Z}'\\
52-
\mathbf{Y} &= \mathbf{G} + s\mathbf{C} \qquad \text{or} \qquad = \dfrac{\Delta x \mathbf{Y}'}{2}
47+
\mathbf{Z} &= \Delta x \mathbf{Z}' \\
48+
\mathbf{Y} &= \dfrac{\Delta x \mathbf{Y}'}{2}
5349
\end{aligned}
5450
```
5551

56-
and modeled via `VectorFit`.
52+
### Submodels
53+
54+
Submodel | Inputs | Parameters | Outputs
55+
-------- | ------ | ---------- | -------
56+
[`VectorFit`](../../../Operators/Rational/VectorFit/README.md) series impedance $\mathbf{z}$ | $\mathbf{i}\in\mathbb{R}^N$ | `Zp`, `dx` | $\mathbf{z}*\mathbf{i}$
57+
[`VectorFit`](../../../Operators/Rational/VectorFit/README.md) shunt admittance $\mathbf{y}_1$ | $\mathbf{v}_1\in\mathbb{R}^N$ | `Yp`, `dx` | $\mathbf{y}_1*\mathbf{v}_1$
58+
[`VectorFit`](../../../Operators/Rational/VectorFit/README.md) shunt admittance $\mathbf{y}_2$ | $\mathbf{v}_2\in\mathbb{R}^N$ | `Yp`, `dx` | $\mathbf{y}_2*\mathbf{v}_2$
5759

5860
## Model Variables
5961

@@ -106,10 +108,10 @@ None.
106108
```math
107109
\begin{aligned}
108110
\mathbf{i}^{\mathrm{inj}}_{1} &=
109-
- \mathbf{y}*\mathbf{v}_1
111+
- \mathbf{y}_1*\mathbf{v}_1
110112
- \mathbf{i} \\
111113
\mathbf{i}^{\mathrm{inj}}_{2} &=
112-
- \mathbf{y}*\mathbf{v}_2
114+
- \mathbf{y}_2*\mathbf{v}_2
113115
+ \mathbf{i}
114116
\end{aligned}
115117
```

GridKit/Model/EMT/Component/Line/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ The nominal pi model is the constant-parameter lumped case.
2828
{
2929
"class": "LineLumped",
3030
"params": {
31-
"R": ...,
32-
"L": ...,
33-
"G": ...,
34-
"C": ...,
31+
"Rp": ...,
32+
"Lp": ...,
33+
"Gp": ...,
34+
"Cp": ...,
3535
"dx": ...
3636
}
3737
}
@@ -41,14 +41,16 @@ The nominal pi model is the constant-parameter lumped case.
4141

4242
The frequency-dependent pi model keeps the lumped topology and replaces the
4343
constant line matrices with rational parameter models.
44-
Note: using a `VectorFit` model with only $\mathbf{D}$ nonzero is an equivalent
45-
way to define the nominal pi model.
44+
Note: using `VectorFit` models for `Zp` and `Yp` with no poles or residues
45+
is an equivalent way to define the nominal pi model: for `Zp`,
46+
$\mathbf{D}=\mathbf{R}'$ and $\mathbf{E}=\mathbf{L}'$. For `Yp`,
47+
$\mathbf{D}=\mathbf{G}'$ and $\mathbf{E}=\mathbf{C}'$.
4648

4749
```js
4850
{
4951
"class": "LineLumped",
5052
"params": {
51-
"Z": {
53+
"Zp": {
5254
"class": "VectorFit",
5355
"params": {
5456
"D": ...,
@@ -57,7 +59,7 @@ way to define the nominal pi model.
5759
"residues": [...]
5860
}
5961
},
60-
"Y": {
62+
"Yp": {
6163
"class": "VectorFit",
6264
"params": {
6365
"D": ...,
@@ -96,9 +98,8 @@ $\mathbf{H}(s)=e^{-s\tau}$.
9698

9799
### Universal Line Model
98100

99-
The ULM is the general case where a `VectorFit` model defines the
100-
characteristic admittance $\mathbf{y}_c$ and a `Propagation` model defines the
101-
current-form propagation function $\mathbf{H}_i$.
101+
The ULM is the general case with characteristic admittance `Yc` and
102+
current-form propagation function `H`.
102103

103104
```js
104105
{

GridKit/Model/EMT/Component/Load/LoadRL/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ $\mathbf{i}^{\mathrm{inj}}$ | `i` | Output | [A] | Current injection at load por
7272
### Differential Equations
7373

7474
```math
75-
0 = \mathbf{R}\,\mathbf{i} + \mathbf{L}\dot{\mathbf{i}} + \mathbf{v}
75+
0 = \mathbf{R}\mathbf{i} + \mathbf{L}\dot{\mathbf{i}} + \mathbf{v}
7676
```
7777

7878
### Algebraic Equations
@@ -91,7 +91,7 @@ For a balanced three-phase initialization derived from phasor current injection
9191
$I^{\mathrm{inj}} = |I^{\mathrm{inj}}| \angle \theta$:
9292

9393
```math
94-
\mathbf{i}_0 = \sqrt{2}\,|I^{\mathrm{inj}}|
94+
\mathbf{i}_0 = \sqrt{2}|I^{\mathrm{inj}}|
9595
\begin{bmatrix}
9696
\cos(\theta) \\
9797
\cos(\theta - \tfrac{2\pi}{3}) \\

GridKit/Model/EMT/Component/Source/VoltageSource/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For phase count $N$:
1010

1111
Symbol | Units | JSON | Description | Note
1212
-------------------------------|---------|----------|-----------------------------------|-----
13-
$\mathbf{E}$ | [V] | `E` | Source voltage magnitudes | RMS, $\mathbf{E}\in\mathbb{R}^N$
13+
$\mathbf{E}$ | [V] | `E` | Source voltage magnitudes | $\mathbf{E}\in\mathbb{R}^N$, RMS
1414
$\boldsymbol{\phi}$ | [rad] | `phi` | Source phase offsets | $\boldsymbol{\phi}\in\mathbb{R}^N$
1515
$\omega$ | [rad/s] | `omega` | Source angular frequency |
1616
$\mathbf{g}_{\mathrm{s}}$ | [S] | `G` | Terminal conductance | $\mathbf{g}_{\mathrm{s}}\in\mathbb{R}^N$
@@ -78,7 +78,7 @@ i^{\mathrm{inj}}_n
7878
=
7979
g_{\mathrm{s},n}
8080
\left(
81-
\sqrt{2}\,E_n\cos\left(\omega t + \phi_n\right) - v_n
81+
\sqrt{2}E_n\cos\left(\omega t + \phi_n\right) - v_n
8282
\right)
8383
```
8484

@@ -91,7 +91,7 @@ i^{\mathrm{inj}}_{n,0}
9191
=
9292
g_{\mathrm{s},n}
9393
\left(
94-
\sqrt{2}\,E_n\cos\left(\phi_n\right) - v_{n,0}
94+
\sqrt{2}E_n\cos\left(\phi_n\right) - v_{n,0}
9595
\right)
9696
```
9797

GridKit/Model/EMT/Operators/Coordinate/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

GridKit/Model/EMT/Operators/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ Operator models are reusable EMT signal blocks used by component models.
66

77
- `Rational` (See [Rational](Rational/README.md))
88
- `Shift` (See [Shift](Shift/README.md))
9-
- `Coordinate` (See [Coordinate](Coordinate/README.md))

GridKit/Model/EMT/Operators/Rational/VectorFit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The rational approximation is represented in pole form:
77

88
```math
99
\mathbf{H}(s) \approx \mathbf{D} + s\mathbf{E}
10-
+ \sum_{q=1}^{Q} \frac{\mathbf{R}^q}{s - p_q}
10+
+ \sum_{q=1}^{Q} \frac{\mathbf{R}_q}{s - p_q}
1111
```
1212

1313
The Laplace domain representation of this model is:

GridKit/Model/EMT/Operators/Shift/Delay/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
The model maps input signal $u$ to delayed output $y_{\mathrm{out}}$.
55

66
Note:
7-
- This is an exact approximation when used with forward-euler.
8-
- For other integration methods this is a smooth approximation only.
7+
- This is exact with forward Euler when the integration step satisfies $h=T$.
8+
- For other integration methods or time steps, this is a smooth approximation only.
99

1010
## Block Diagram
1111

0 commit comments

Comments
 (0)